Size: 1159
Comment:
|
Size: 1701
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
Allows you to jump to a subroutine. | Allows you to jump to a subroutine, perform the actions there, and then return to continue to the next scripted line. In the following example, the bot will read line 1, jump to label medalfarm, perform the attack there, return to the original place and read line 2, jump to label trainarch, queue up the archers, return to the original place and read line 3, jump to label upgradecot, upgrade the cottage twice, return to the original place and read line 4, sleep 30 seconds, and then loop back to line 1 where it will begin the process again with label medalfarm. |
Line 11: | Line 13: |
sleep 30 | |
Line 12: | Line 15: |
Line 15: | Line 19: |
// | |
Line 20: | Line 24: |
// | |
Line 29: | Line 33: |
CategoryAllScripts CategoryFunctionScripts | CategoryAllScripts CategoryGeneralScripts |
Usage: |
gosub label |
Example: |
gosub medalfarm |
Allows you to jump to a subroutine, perform the actions there, and then return to continue to the next scripted line.
In the following example, the bot will read line 1, jump to label medalfarm, perform the attack there, return to the original place and read line 2, jump to label trainarch, queue up the archers, return to the original place and read line 3, jump to label upgradecot, upgrade the cottage twice, return to the original place and read line 4, sleep 30 seconds, and then loop back to line 1 where it will begin the process again with label medalfarm.
gosub medalfarm gosub trainarch gosub upgradecot sleep 30 loop 0 label medalfarm attack 123,300 !Bubba,!Xavier,any t:400,b:400 gosubreturn label upgradecot upgrade house repeat 2 gosubreturn label trainarch train arch:2500 Hero gosubreturn
Do not forget to add the GosubReturn at the end of each subroutine to avoid errors.