From NEAT Portal Wiki
(Created page with "'''<span style="color:red">TEMPORARY COPY FROM EVOBOT WIKI - NEEDS REFORMATTED STILL</span>''' === Script References === References allow for the smooth operation of a City. R...") |
(No difference)
|
Revision as of 20:46, 28 May 2011
TEMPORARY COPY FROM EVOBOT WIKI - NEEDS REFORMATTED STILL
Contents
Script References
References allow for the smooth operation of a City. Resources, Troops, Walldefenses, & Miscellaneous City Information can now be
Note: All references must begin with ‘m_city.castle.’
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
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 |