From NEAT Portal Wiki
Jump to: navigation, search
Line 2: Line 2:
 
'''<span style="color:red">Information may not be completely accurate with Y.A.E.B.</span>'''
 
'''<span style="color:red">Information may not be completely accurate with Y.A.E.B.</span>'''
  
=== Script References ===
+
==Script References==
  
 
References allow for the smooth operation of a City.  
 
References allow for the smooth operation of a City.  
Line 14: Line 14:
 
<br>  
 
<br>  
  
==== Material Resources ====
+
==Material Resources==
  
 
Applicable Resources&nbsp;: food, wood, stone, iron<br><br>  
 
Applicable Resources&nbsp;: food, wood, stone, iron<br><br>  
Line 49: Line 49:
 
       ifgosub ( m_city.castle.resource.iron.increaseRate &lt; 5000 ) buildMoreMines
 
       ifgosub ( m_city.castle.resource.iron.increaseRate &lt; 5000 ) buildMoreMines
 
</pre>  
 
</pre>  
==== <br> Troops ====
+
==Troops==
  
 
<br>  
 
<br>  
Line 103: Line 103:
 
<br>  
 
<br>  
  
==== Heroes ====
+
==Heroes==
  
 
<br>These are some Commonly Used Hero References.  
 
<br>These are some Commonly Used Hero References.  
  
===== IsHeroInCastle<br>  =====
+
==IsHeroInCastle==
 
<blockquote><br>Arg&nbsp;: m_city.IsHeroInCastle(heroname)<br>Explanation&nbsp;: Checks your city for a named Hero.<br>*Note: Checks only if your city has hero registered not if he/she is idle. </blockquote>  
 
<blockquote><br>Arg&nbsp;: m_city.IsHeroInCastle(heroname)<br>Explanation&nbsp;: Checks your city for a named Hero.<br>*Note: Checks only if your city has hero registered not if he/she is idle. </blockquote>  
 
<br>Coded Example&nbsp;:  
 
<br>Coded Example&nbsp;:  
Line 124: Line 124:
 
<br>  
 
<br>  
  
===== AnyIdleHero<br>  =====
+
==AnyIdleHero==
 +
 
 
<blockquote><br>Arg&nbsp;: m_city.AnyIdleHero(heroname/any)<br>Explanation&nbsp;: Checks your city for a named Hero or any Hero that is idle. </blockquote>  
 
<blockquote><br>Arg&nbsp;: m_city.AnyIdleHero(heroname/any)<br>Explanation&nbsp;: Checks your city for a named Hero or any Hero that is idle. </blockquote>  
 
Coded Example&nbsp;:  
 
Coded Example&nbsp;:  

Revision as of 09:21, 30 May 2011

TEMPORARY COPY FROM EVOBOT WIKI - NEEDS REFORMATTED STILL
Information may not be completely accurate with Y.A.E.B.

Script References

References allow for the smooth operation of a City.

Resources, Troops, Walldefenses, & Miscellaneous City Information can be referenced from within a script.


Note: All references must begin with ‘m_city.cityManager.’


Material Resources

Applicable Resources : food, wood, stone, iron

Summary of Reference Resource Parameters
amount

current amount of resources
increaseRate

Total Resource Rate of Production
max

Max Production of Resources at Current Levels
storeRercent

 Storage Percentage
workPeople

Total number of workers used in production of the resource


Examples :

//===================================================
// Check current amount of Wood, if greater than 10,000 gosub JumpToTraining
// Check if enough Iron is Being Produced, if not, gosub buildMoreMines
//===================================================
      ifgosub ( m_city.castle.resource.wood.amount > 10000 ) JumpToTraining
      ifgosub ( m_city.castle.resource.iron.increaseRate < 5000 ) buildMoreMines

Troops


Reference Troops Names to EvoBot Equivalent
archer
arch,a
ballista
balli,b
batteringRam
ram,r
carriage
tran,t
catapult
pult,cp
heavyCavalry
cata
lightCavalry
cav
militia
warr,w
peasants
worker,wo
pikemen
pike,p
scouter
scout,s
swordsmen
sword,sw


Example :

      ifgosub ( m_city.castle.troop.archer < 100000 ) buildArchers
      ifgosub ( m_city.castle.troop.heavyCavalry < 100000 ) buildPhracts
      ifgosub ( m_city.castle.troop.catapults < 15000 ) buildPults


Heroes


These are some Commonly Used Hero References.

IsHeroInCastle


Arg : m_city.IsHeroInCastle(heroname)
Explanation : Checks your city for a named Hero.
*Note: Checks only if your city has hero registered not if he/she is idle.


Coded Example :


      ifgoto ( m_city.IsHeroInCastle(AtkA) == true ) buildArcher
      ifgoto ( m_city.IsHeroInCastle(AtkS) == true ) buildScout
      ifgoto ( m_city.IsHeroInCastle(AtkP) == true ) buildPike
      ifgoto ( m_city.IsHeroInCastle(AtkW) == true ) buildWarr
      ifgoto ( m_city.IsHeroInCastle(AtkSw) == true ) buildSword
      //
      label buildArcher
      …


Note : Reference Must be spelled & spaced exactly as shown.


AnyIdleHero


Arg : m_city.AnyIdleHero(heroname/any)
Explanation : Checks your city for a named Hero or any Hero that is idle.

Coded Example :


//=======================================
// Attack lvl5 NPC
// goto Check subroutine
// train archers
// Check if ATK295 is Idle, if yes then goto TrainBig
// CHeck if any Hero is Idle, if yes then return to Farming
//=======================================
      attack XXX,YYY any b:400,t:400
      gosub Check
      …
      //
      label Check
      train a:2000 any all
      ifgosub ( m_city.AnyIdleHero(ATK295) == true ) TrainBig
      ifgoto ( m_city.AnyIdleHero(any) == true ) goBack
      sleep 600
      loop Check 0
      label goBack
      gosubreturn
      //
      label TrainBig
      train cata:400 any all
      gosubreturn


Note : Reference Must be spelled & spaced exactly as shown.


City References


Note : Reference Must be spelled & spaced exactly as shown.

Reference
Usage
*Notes
gold
m_city.castle.resource.gold
'.amount' is not needed to display total
complaint
m_city.castle.resource.complaint
Public Grievances
curPopulation
m_city.castle.resource.curPopulation

maxPopulation
m_city.castle.resource.maxPopulation

heroSalary
m_city.castle.resource.heroSalary

support
m_city.castle.resource.support
Loyalty
taxIncome
m_city.castle.resource.taxIncome

hasEnemy
m_city.castle.hasEnemy
Not Sure if this one actually works, I've tried it & while under attack still displays false