//IF YOU RUN OUT OF GOLD YOUR HEROES WILL LEAVE!!! //CHHOSE YOUR LIMITS CAREFULLY, WATCH WHAT HAPPENS.. //IF THE PROGRAM IS CONTINUALLY BUYING, LOWER THE //BUY RATE, IF IT SELLS TO MUCH, ASK FOR MORE MONEY.. //IF YOU RUN OUT OF GOLD YOUR HEROES WILL LEAVE!!! //^^^^^^^^^^^^^^^^^ //set the amount on line #4 to the min. amt of gold to //keep. if set wrong the program may generate a sell //error. if gold is below this amt, the program will make 2 //Attempts to sell 1m food at the current rate to raise //cash, provided you have more than %fdmin% //^^^^^^^^^^^^^^^^^ //^^^^^^^^^^^^^^^^^ //this is the price you are willing to pay //if set to high, you will spend all your gold set byfd 4.1 set bywd 9.9 set byst 1.83 set byin 13 //^^^^^^^^^^^^^^^^^ //^^^^^^^^^^^^^^^^^ //once you have this much, don't buy any more... //(the commodity will be offedered for sale //1 time before the limit is checked.... set fdmax 5000000000 set wdmax 40000000 set stmax 1000000000 set inmax 30000000 //^^^^^^^^^^^^^^^^^ //^^^^^^^^^^^^^^^^^ //this is the price you will sell for. if set too low //you will sell all of your stuff... set slfd 6 set slwd 11 set slst 3 set slin 19 //^^^^^^^^^^^^^^^^^ //^^^^^^^^^^^^^^^^^ //the program will stop selling at this limit set fdmin 50000000 set wdmin 15000000 set stmin 30000000 set inmin 10000000 //^^^^^^^^^^^^^^^^^ //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //IF YOU RUN OUT OF GOLD YOUR HEROES WILL LEAVE!!! //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //gosub setup 1: label wait 2: print x checking 3: ifgoto ( m_city.cityManager.resource.gold < 15000000 ) end 4: Ifgosub ( m_city.cityManager.tradesArray.length < 8 ) find1 5: print x waiting 6: sleep rnd:3 7: loop wait 8: label find1 9: print x checking if we bought food 10: ifgoto ( m_city.cityManager.tradesArray[0].amount == 500001 ) find2 11: ifgoto ( m_city.cityManager.tradesArray[1].amount == 500001 ) find2 12: ifgoto ( m_city.cityManager.tradesArray[2].amount == 500001 ) find2 13: ifgoto ( m_city.cityManager.tradesArray[3].amount == 500001 ) find2 14: ifgoto ( m_city.cityManager.tradesArray[4].amount == 500001 ) find2 15: ifgoto ( m_city.cityManager.tradesArray[5].amount == 500001 ) find2 16: ifgoto ( m_city.cityManager.tradesArray[6].amount == 500001 ) find2 17: ifgoto ( m_city.cityManager.resource.food.amount < %fdmax% ) okbyfd 18: print x limit reached so no longer buying food 19: buy food 500001 .01 20: gosubreturn 21: label okbyfd 22: buy food 500001 %byfd% 23: gosubreturn 24: label find2 25: print x checking if we bought wood 26: ifgoto ( m_city.cityManager.tradesArray[1].amount == 500002 ) find3 27: ifgoto ( m_city.cityManager.tradesArray[0].amount == 500002 ) find3 28: ifgoto ( m_city.cityManager.tradesArray[2].amount == 500002 ) find3 29: ifgoto ( m_city.cityManager.tradesArray[3].amount == 500002 ) find3 30: ifgoto ( m_city.cityManager.tradesArray[4].amount == 500002 ) find3 31: ifgoto ( m_city.cityManager.tradesArray[5].amount == 500002 ) find3 32: ifgoto ( m_city.cityManager.tradesArray[6].amount == 500002 ) find3 33: ifgoto ( m_city.cityManager.resource.wood.amount < %wdmax% ) okbywd 34: print x limit reached so no longer buying wood 35: buy wood 500002 .01 36: gosubreturn 37: label okbywd 38: buy lumber 500002 %bywd% 39: gosubreturn 40: label find3 41: print x checking if we bought iron 42: ifgoto ( m_city.cityManager.tradesArray[2].amount == 500003 ) find4 43: ifgoto ( m_city.cityManager.tradesArray[0].amount == 500003 ) find4 44: ifgoto ( m_city.cityManager.tradesArray[1].amount == 500003 ) find4 45: ifgoto ( m_city.cityManager.tradesArray[3].amount == 500003 ) find4 46: ifgoto ( m_city.cityManager.tradesArray[4].amount == 500003 ) find4 47: ifgoto ( m_city.cityManager.tradesArray[5].amount == 500003 ) find4 48: ifgoto ( m_city.cityManager.tradesArray[6].amount == 500003 ) find4 49: ifgoto ( m_city.cityManager.resource.iron.amount < %inmax% ) okbyin 50: print x limit reached so no longer buying iron 51: buy iron 500003 .01 52: gosubreturn 53: label okbyin 54: buy iron 500003 %byin% 55: gosubreturn 56: label find4 57: print x checking if we bought stone 58: ifgoto ( m_city.cityManager.tradesArray[3].amount == 5000004 ) find5 59: ifgoto ( m_city.cityManager.tradesArray[0].amount == 5000004 ) find5 60: ifgoto ( m_city.cityManager.tradesArray[1].amount == 5000004 ) find5 61: ifgoto ( m_city.cityManager.tradesArray[2].amount == 5000004 ) find5 62: ifgoto ( m_city.cityManager.tradesArray[4].amount == 5000004 ) find5 63: ifgoto ( m_city.cityManager.tradesArray[5].amount == 5000004 ) find5 64: ifgoto ( m_city.cityManager.tradesArray[6].amount == 5000004 ) find5 65: ifgoto ( m_city.cityManager.resource.stone.amount < %stmax% ) okbyst 66: print x limit reached so no longer buying stone 67: buy stone 5000004 .01 68: gosubreturn 69: label okbyst 70: buy stone 5000004 %byst% 71: gosubreturn 72: label find5 73: print x seeing if we sold food 74: ifgoto ( m_city.cityManager.tradesArray[4].amount == 500005 ) find6 75: ifgoto ( m_city.cityManager.tradesArray[0].amount == 500005 ) find6 76: ifgoto ( m_city.cityManager.tradesArray[1].amount == 500005 ) find6 77: ifgoto ( m_city.cityManager.tradesArray[2].amount == 500005 ) find6 78: ifgoto ( m_city.cityManager.tradesArray[3].amount == 500005 ) find6 79: ifgoto ( m_city.cityManager.tradesArray[5].amount == 500005 ) find6 80: ifgoto ( m_city.cityManager.tradesArray[6].amount == 500005 ) find6 81: ifgoto ( m_city.cityManager.resource.food.amount > %fdmin% ) okslfd 82: print x limit reached so not selling any more food 83: sell food 500005 99 84: gosubreturn 85: label okslfd 86: sell food 500005 %slfd% 87: gosubreturn 88: label find6 89: print x seeing if we sold wood 90: ifgoto ( m_city.cityManager.tradesArray[5].amount == 500006 ) find7 91: ifgoto ( m_city.cityManager.tradesArray[0].amount == 500006 ) find7 92: ifgoto ( m_city.cityManager.tradesArray[1].amount == 500006 ) find7 93: ifgoto ( m_city.cityManager.tradesArray[2].amount == 500006 ) find7 94: ifgoto ( m_city.cityManager.tradesArray[3].amount == 500006 ) find7 95: ifgoto ( m_city.cityManager.tradesArray[4].amount == 500006 ) find7 96: ifgoto ( m_city.cityManager.tradesArray[6].amount == 500006 ) find7 97: ifgoto ( m_city.cityManager.resource.wood.amount > %wdmin% ) okslwd 98: print x limit reached so not selling any more wood 99: sell lumber 500006 99 100: gosubreturn 101: label okslwd 102: sell lumber 500006 %slwd% 103: gosubreturn 104: label find7 105: print x seeing if we sold iron 106: ifgoto ( m_city.cityManager.tradesArray[6].amount == 500007 ) find8 107: ifgoto ( m_city.cityManager.tradesArray[0].amount == 500007 ) find8 108: ifgoto ( m_city.cityManager.tradesArray[1].amount == 500007 ) find8 109: ifgoto ( m_city.cityManager.tradesArray[2].amount == 500007 ) find8 110: ifgoto ( m_city.cityManager.tradesArray[3].amount == 500007 ) find8 111: ifgoto ( m_city.cityManager.tradesArray[4].amount == 500007 ) find8 112: ifgoto ( m_city.cityManager.tradesArray[5].amount == 500007 ) find8 113: ifgoto ( m_city.cityManager.resource.iron.amount > %inmin% ) okslin 114: print x limit reached so not selling any more iron 115: sell iron 500007 99 116: gosubreturn 117: label okslin 118: sell iron 500007 %slin% 119: gosubreturn 120: label find8 121: print x musta sold stone 122: ifgoto ( m_city.cityManager.resource.stone.amount > %stmin% ) okslst 123: print x limit reached so not selling any more stone 124: sell stone 5000008 99 125: gosubreturn 126: label okslst 127: sell stone 5000008 %slst% 128: gosubreturn 129: label setup 130: config trade:0 131: canceltrade 132: print x initializing 133: canceltrade 134: buy food 500001 %byfd% 135: buy lumber 500002 %bywd% 136: buy iron 500003 %byin% 137: buy stone 5000004 %byst% 138: sell food 500005 %slfd% 139: sell lumber 500006 %slwd% 140: sell iron 500007 %slin% 141: sell stone 5000008 %slst% 142: Gosubreturn 143: label end 144: ifgoto ( m_city.cityManager.resource.food.amount < %fdmin% ) done 145: print x WARNING we are going to sell food 146: print x Warning 30 sec 147: sleep 10 148: print x 20 seconds 149: print x Warning 150: print x Warning selling 10m food @5 151: print x 12 seconds 152: print x Warning 153: print x Warning 154: print x 8 seconds 155: print x Warning 156: print x too late 157: sell food 9999999 5 158: loop wait 2 159: goto finished 160: label done 161: print x not enough food to sell to raise cash 162: print x i hope your limit was not too low 163: print x or your heroes may be running away 164: goto exit 165: label finished 166: print x Thats it, we ran out cash twice. 167: print x the good news is we did sell food before 168: print x exiting, so the heroes are safe 169: label exit 170: print x thank you. come again. 171: print x don't forget to thank the author