MuffinEater Posted April 24, 2016 Posted April 24, 2016 (edited) pano po ayusin to at gawing 1 - 100 random single stats 0- 200 allstats (low chance ) Tia prontera,150,160,5 script Randomizer 84,{ mes "[Randomizer]"; mes "Hey I can give you a random stat bonus if you want, for only:"; mes "1x Red Potion"; mes "1,000 Zeny"; next; menu "Yes",-,"No",L_no; next; mes "[Randomizer]"; if(countitem(501) && Zeny >= 1000) { set bonus_stat, rand(1,16); if(rand(100) <= 5) { set bonus_param,rand(450,700); } if(rand(100) <= 10) { set bonus_param,rand(300,450); } if(rand(100) <= 20) { set bonus_param,rand(100,300); } if(rand(100) <= 40) { set bonus_param,rand(40,100); } else { set bonus_param,rand(5,40); } delitem 7029,1; set Zeny, Zeny-1000; mes "Wait for a moment..."; next; mes "[Randomizer]"; mes "Ok done.. Please reequip your items ^_^"; query_sql "INSERT INTO randomize_log VALUES('"+getcharid(0)+"', NOW(), '"+bonus_param+"', '"+bonus_stat+"' ) ON DUPLICATE KEY UPDATE logdate=NOW(), bonus_param='"+bonus_param+"', bonus_stat='"+bonus_stat+"'"; switch(bonus_stat) { case 1: set .@bonustr$, "All Stats + "+bonus_param; break; case 2: set .@bonustr$, "Str + "+bonus_param; break; case 3: set .@bonustr$, "Agi + "+bonus_param; break; case 4: set .@bonustr$, "Int + "+bonus_param; break; case 5: set .@bonustr$, "Dex + "+bonus_param; break; case 6: set .@bonustr$, "Luk + "+bonus_param; break; case 7: set .@bonustr$, "Str + "+bonus_param+" Agi + "+bonus_param; break; case 8: set .@bonustr$, "Str + "+bonus_param+" Int + "+bonus_param; break; case 9: set .@bonustr$, "Vit + "+bonus_param+" Int + "+bonus_param; break; case 10: set .@bonustr$, "Str + "+bonus_param+" Dex + "+bonus_param; break; case 11: set .@bonustr$, "Int + "+bonus_param+" Vit + "+bonus_param; break; case 12: set .@bonustr$, "Agi + "+bonus_param+" Luk + "+bonus_param; break; case 13: set .@bonustr$, "Str + "+bonus_param+" Agi + "+bonus_param+" Int + "+bonus_param; break; case 14: set .@bonustr$, "Int + "+bonus_param+" Vit + "+bonus_param+" Dex + "+bonus_param; break; case 15: set .@bonustr$, "Str + "+bonus_param+" Agi + "+bonus_param+" Dex + "+bonus_param; break; case 16: set .@bonustr$, "Str + "+bonus_param+" Agi + "+bonus_param+" Luk + "+bonus_param; break; } mes .@bonustr$; } else { mes "Hey! Are you insulting me??!"; } close; L_no: next; mes "[Randomizer]"; mes "Ok fine."; close; OnPCStatCalcEvent: switch(bonus_stat) { case 1: bonus bAllStats, bonus_param; break; case 2: bonus bStr, bonus_param; break; case 3: bonus bAgi, bonus_param; break; case 4: bonus bInt, bonus_param; break; case 5: bonus bDex, bonus_param; break; case 6: bonus bLuk, bonus_param; break; case 7: bonus bStr, bonus_param; bonus bAgi,bonus_param; break; case 8: bonus bStr, bonus_param; bonus bInt,bonus_param; break; case 9: bonus bVit, bonus_param; bonus bAgi,bonus_param; break; case 10: bonus bStr, bonus_param; bonus bDex,bonus_param; break; case 11: bonus bInt, bonus_param; bonus bVit,bonus_param; break; case 12: bonus bAgi, bonus_param; bonus bLuk,bonus_param; break; case 13: bonus bStr, bonus_param; bonus bAgi,bonus_param; bonus bInt,bonus_param; break; case 14: bonus bInt, bonus_param; bonus bVit,bonus_param; bonus bDex,bonus_param; break; case 15: bonus bStr, bonus_param; bonus bAgi,bonus_param; bonus bDex,bonus_param; break; case 16: bonus bStr, bonus_param; bonus bAgi,bonus_param; bonus bLuk,bonus_param; break; } sleep2 250; end; } Edited April 26, 2016 by MuffinEater Quote
MuffinEater Posted April 7, 2022 Author Posted April 7, 2022 Quote rathena_pre\src\map\script.cpp:17080 - INSERT INTO randomize_log VALUES('150001', NOW(), '28', '10' ) ON DUPLICATE KEY UPDATE logdate=NOW(), bonus_param='28', bonus_stat='10' [Debug]: Source (NPC): Randomizer Having an error Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.