From NEAT Portal Wiki
(→Edited City References) |
(→Edited City References) |
||
Line 234: | Line 234: | ||
| m_city.cityManager.buildings[#].name<br> | | m_city.cityManager.buildings[#].name<br> | ||
| Building type for building #<br> | | Building type for building #<br> | ||
− | | e.g. Farm, Cottage (# = 0 - Number of buildings ... | + | | e.g. Farm, Cottage (# = 0 - Number of buildings ... 73 max)<br> |
|- | |- | ||
| m_city.cityManager.buildings[#].positionId<br> | | m_city.cityManager.buildings[#].positionId<br> | ||
| Gives the position id of building number #<br> | | Gives the position id of building number #<br> | ||
− | | e.g. 1015 (# = 0 - | + | | e.g. 1015 (# = 0 -73)<br> |
|- | |- | ||
| m_city.cityManager.buildings[#].startTime<br> | | m_city.cityManager.buildings[#].startTime<br> |
Revision as of 13:12, 30 May 2011
TEMPORARY COPY - NEEDS REFORMATTED STILL
Information may not be accurate.
Contents
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
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 |
Edited City References
Reference |
Usage |
*Notes |
m_city.AnyIdleHero(any) |
Checks for an idle hero. |
Either true or false. |
m_city.AnyIdleHero(ATK295) |
Checks if hero ATK295 is idle. |
Either true or false. |
m_city.IsHeroInCastle(HeroName) |
Checks if hero HeroName is based in this castle. |
Either true or false. |
|
|
|
m_city.cityManager.allowAlliance |
|
Not in YAEB |
m_city.cityManager.buildings[#] |
[object BuildingBean] |
Any use? |
m_city.cityManager.buildings[#].endTime |
Construction end time. |
0 if finnished. |
m_city.cityManager.buildings[#].level |
Building level that is in location # |
|
m_city.cityManager.buildings[#].name |
Building type for building # |
e.g. Farm, Cottage (# = 0 - Number of buildings ... 73 max) |
m_city.cityManager.buildings[#].positionId |
Gives the position id of building number # |
e.g. 1015 (# = 0 -73) |
m_city.cityManager.buildings[#].startTime |
Construction start time. |
o if complete. |
m_city.cityManager.buildings[#].status |
Construction status. |
0 = no construction, 1 = upgrading |
m_city.cityManager.buildings[#].typeId |
|
|
m_city.cityManager.fields[#].id |
|
|
m_city.cityManager.fields[#].level |
|
|
m_city.cityManager.fields[#].name |
|
|
m_city.cityManager.fields[#].status |
|
|
m_city.cityManager.fields[#].type |
|
|
m_city.cityManager.fortification.abatis |
|
|
m_city.cityManager.fortification.arrowTower |
|
|
m_city.cityManager.fortification.rockfall |
|
|
m_city.cityManager.fortification.rollingLogs |
|
what happens when u put loads of text into small cell does it wrap? |
m_city.cityManager.fortification.trap |
|
|
m_city.cityManager.goOutForBattle |
|
|
m_city.cityManager.hasEnemy |
|
|
m_city.cityManager.hasEnemy |
|
|
m_city.cityManager.heros[#].experience |
|
|
m_city.cityManager.heros[#].id |
|
|
m_city.cityManager.heros[#].itemAmount |
|
|
m_city.cityManager.heros[#].itemId |
|
|
m_city.cityManager.heros[#].level |
|
|
m_city.cityManager.heros[#].logoUrl |
|
|
m_city.cityManager.heros[#].loyalty |
|
|
m_city.cityManager.heros[#].management |
|
|
m_city.cityManager.heros[#].managementAdded |
|
|
m_city.cityManager.heros[#].managementBuffAdded |
|
|
m_city.cityManager.heros[#].name |
|
|
m_city.cityManager.heros[#].power |
|
|
m_city.cityManager.heros[#].powerAdded |
|
|
m_city.cityManager.heros[#].powerBuffAdded |
|
|
m_city.cityManager.heros[#].remainPoint |
|
|
m_city.cityManager.heros[#].staus |
|
|
m_city.cityManager.heros[#].stratagem |
|
|
m_city.cityManager.heros[#].stratagemAdded |
|
|
m_city.cityManager.heros[#].stratagemBuffAdded |
|
|
m_city.cityManager.heros[#].upgradeExp |
|
|
m_city.cityManager.id |
|
|
m_city.cityManager.logUrl not in yaeb |
|
|
m_city.cityManager.name |
|
|
m_city.cityManager.resource.buildPeople |
|
|
m_city.cityManager.resource.complaint |
|
|
m_city.cityManager.resource.curPopulation |
|
|
m_city.cityManager.resource.food |
|
|
m_city.cityManager.resource.food.amount |
|
|
m_city.cityManager.resource.food.increaseRate |
|
|
m_city.cityManager.resource.food.max |
|
|
m_city.cityManager.resource.food.storePercent |
|
|
m_city.cityManager.resource.food.workPeople |
|
|
m_city.cityManager.resource.gold |
|
|
m_city.cityManager.resource.gold |
|
|
m_city.cityManager.resource.gold.amount |
|
|
m_city.cityManager.resource.gold.increaseRate |
|
|
m_city.cityManager.resource.gold.max |
|
|
m_city.cityManager.resource.gold.workPeople |
|
|
m_city.cityManager.resource.heroSalary |
|
|
m_city.cityManager.resource.heroSalary |
|
|
m_city.cityManager.resource.iron |
|
Not implemented in YAEB |
m_city.cityManager.resource.iron.amount |
|
|
m_city.cityManager.resource.iron.increaseRate |
|
|
m_city.cityManager.resource.iron.max |
|
|
m_city.cityManager.resource.iron.storePercent |
|
|
m_city.cityManager.resource.iron.workPeople |
|
|
m_city.cityManager.resource.maxPopulation |
|
|
m_city.cityManager.resource.stone |
|
Not implemented in YAEB |
m_city.cityManager.resource.stone.amount |
|
|
m_city.cityManager.resource.stone.increaseRate |
|
|
m_city.cityManager.resource.stone.max |
|
|
m_city.cityManager.resource.stone.storeRercent |
|
|
m_city.cityManager.resource.stone.workPeople |
|
|
m_city.cityManager.resource.support |
|
|
m_city.cityManager.resource.support |
|
|
m_city.cityManager.resource.taxIncome |
|
|
m_city.cityManager.resource.taxIncome |
|
|
m_city.cityManager.resource.taxRate |
|
|
m_city.cityManager.resource.troopCostFood |
|
|
m_city.cityManager.resource.wood |
Total amount of wood |
Not implemented in YAEB |
m_city.cityManager.resource.wood.amount |
Current amount of wood |
|
m_city.cityManager.resource.wood.increaseRate |
Total Resource Rate of Production |
|
m_city.cityManager.resource.wood.max |
|
|
m_city.cityManager.resource.wood.storePercent |
|
|
m_city.cityManager.resource.wood.workPeople |
|
|
m_city.cityManager.resource.workPeople |
|
|
m_city.cityManager.status not in yaeb |
|
|
m_city.cityManager.troop.archer |
|
|
m_city.cityManager.troop.ballista |
|
|
m_city.cityManager.troop.batteringRam |
|
|
m_city.cityManager.troop.carriage |
|
|
m_city.cityManager.troop.catapult |
|
|
m_city.cityManager.troop.heavyCavalry |
|
|
m_city.cityManager.troop.lightCavalry |
|
|
m_city.cityManager.troop.militia |
|
|
m_city.cityManager.troop.peasants |
|
|
m_city.cityManager.troop.pikemen |
|
|
m_city.cityManager.troop.scouter |
|
|
m_city.cityManager.troop.swordsmen |
|
|