| 
  
   Size: 1091 
  
  Comment:  
 | 
  
   Size: 1138 
  
  Comment:  
 | 
| Deletions are marked like this. | Additions are marked like this. | 
| Line 9: | Line 9: | 
| coords="123,456" targetId = GetFieldId(coords) troops = "s:100k" | {{{ coords="123,456" targetId =GetFieldId(coords) // converts coords into fieldId  | 
| Line 11: | Line 14: | 
| troopBean = GetTroops(troops) // converts troop string into troopBean object | troops = "s:100k" troopBean = GetTroops(troops) // converts troop string into troopBean object  | 
| Line 13: | Line 18: | 
| transTime = city.getTravelTime(city.fieldId, targetId, troopBean, 2) // returns time to transport or reinforce target coords in seconds - from point A (city.fieldId) to point B (targetId) using specified troopBean | transTime = city.getTravelTime(city.fieldId, targetId, troopBean, 2) // returns time to transport or reinforce target coords in seconds - from point A (city.fieldId) to point B (targetId) using specified troopBean | 
| Line 15: | Line 20: | 
| attackTime = city.getTravelTime(city.fieldId, targetId, troopBean, 5) // returns time to send attack or scout to targeth coords in seconds - from point A (city.fieldId) to point B (targetId) using specified troopBean | attackTime = city.getTravelTime(city.fieldId, targetId, troopBean, 5)  // returns time to send attack or scout to targeth coords in seconds - from point A (city.fieldId) to point B (targetId) using specified troopBean }}}  | 
this function will return the time in seconds it takes to march from point A to point B using a particular type of troops
usage:
city.getTravelTime(fieldId1,fieldId2,troopBean,type)
fieldId1 and fieldId2 are the fieldId's which represent coordinates for point A and B, troopBean is a special object representing a single wave of troops of any type or combination, and type can be 2 for transport or reinforcement waves or 5 for attack or scout waves.
example:
coords="123,456" targetId =GetFieldId(coords) // converts coords into fieldId troops = "s:100k" troopBean = GetTroops(troops) // converts troop string into troopBean object transTime = city.getTravelTime(city.fieldId, targetId, troopBean, 2) // returns time to transport or reinforce target coords in seconds - from point A (city.fieldId) to point B (targetId) using specified troopBean attackTime = city.getTravelTime(city.fieldId, targetId, troopBean, 5) // returns time to send attack or scout to targeth coords in seconds - from point A (city.fieldId) to point B (targetId) using specified troopBean

![[+]](/moin_static/explorer/img/toggle1.png)

![[-]](/moin_static/explorer/img/toggle0.png)
