themon 63 Posted October 15, 2013 (edited) I maid this hourlybonus.txt script but not that good at arrayPlease make it an array version hourlybonus.txt hourlybonus Array Version.txt Edited October 17, 2013 by themon Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted October 15, 2013 (edited) Here you go, hourlybonus.txt NOTE: Array can handle maximum 128 values, so If you want more values, just create a new array and utilize it. (Side Note: There may be some error, haven't tested it) Edited October 15, 2013 by Dastgir Pojee Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted October 15, 2013 (edited) ^ oninit part should be setarray. GJ. here try? prontera,150,150,3 script Hourly Bonus 865,{if ($DLogin == 0) { set $DLogin,rand (100000,999999); // dunno what this is. i am keeping it anyway. lol end;}if (#DLogin) { mes "You had already received your gift", "Please! come back again after an hour."; emotion e_bzz; close;} mes "Im glad to give you your Hourly Bonus!";OnItemBuild: set .@ran,rand (1,20); set .@rand, rand ( 0 , ( getarraysize(.item_id) - 1 ) ); if (.@ran < 10) callsub OnHourlyPrizeZeny, rand( 1 ,10 ), rand( 1, 100000 ); else callsub OnHourlyPrizeItem, .item_id[.@rand], .item_id1[.@rand]; close; OnHourlyPrizeZeny: // Zeny Prize. set .@claim,( getarg(1) * getarg(0) ); set Zeny, Zeny + .@claim; Announce strcharinfo(0) + " got " + .@claim + "z!",8; emotion e_thx; set #DLogin, $DLogin; close;OnHourlyPrizeItem: // Item Prize. set .@claim,rand ( getarg(0), getarg(1) ); if ( getitemname( .@claim ) == "null") goto OnItemBuild; getitem .@claim,1; Announce strcharinfo(0) + " got " + getitemname( .@claim ) + ".",8; emotion e_thx; set #DLogin, $DLogin; close; OnMinute00: OnClock1048: OnClock1428: // Trigger npc Announce "You can now claim your Hourly Bonus!",8; set $DLogin,rand (100000,999999); // dunno what this is. i am keeping it anyway. lol end;OnInit: // two array so you could add more items. setarray .item_id[0], 4001, 4700, 401, 1101, 1151, 1201, 1250, 1301, 1351, 1401, 1451; // Item Id. 4001 <- 4001, 4555 setarray .item_id1[0], 4555, 4871, 599, 1149, 1199, 1249, 1296, 1317, 1398, 1436, 1493; // Item Id. 4555 <- 4001, 4555 end;} Edited October 15, 2013 by quesoph Quote Share this post Link to post Share on other sites
I maid this hourlybonus.txt script but not that good at array
Please make it an array version
hourlybonus.txt
hourlybonus Array Version.txt
Edited by themonShare this post
Link to post
Share on other sites