Mootie Posted November 17, 2012 Posted November 17, 2012 prontera,155,181,5 script Sample 757,{ mes "Wan to be Premium Users for 1 week ?"; mes "Then give me "+.Amount+" x "+getitemname(.ItemID); if( countitem( .ItemID ) >= .Amount ){ if( select("YES:NO") == 1 ){ delitem .ItemID,.Amount; set #PremiumUser,gettimetick(2) + ( .Day * 3600 * 24 ); sc_start SC_ITEMBOOST,( #PremiumUser * 1000 ),200; sc_start SC_EXPBOOST,( #PremiumUser * 1000 ),200; mes "Done. enjoy your Premium Services for 1 Week."; } } close; OnPCLoginEvent: if( #PremiumUser > gettimetick(2) ){ sc_start SC_ITEMBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),200; sc_start SC_EXPBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),200; } end; } i already set sc_start SC_ITEMBOOST,( #PremiumUser * 50 ),30; sc_start SC_EXPBOOST,( #PremiumUser * 50 ),30; still overflowing o.o Quote
Euphy Posted November 17, 2012 Posted November 17, 2012 Max int is 2147483648, your script produces 13531694210 (magnitude of 10 higher). 1 Quote
Lighta Posted November 17, 2012 Posted November 17, 2012 That cause you already have 1M from getttick and multiply by 50 but int32 it's limited to 2M when signed. Don'T get exactly why you giving such a big value on SC_ITEMBOOST and SC_EXPBOOST, what are you trying to do ?, the 1st argument is the ending tick wich I guess you already set by doing gettick+day... so why *1000 again ? That cause you already have 1M from getttick and multiply by 50 but int32 it's limited to 2M when signed. Don'T get exactly why you giving such a big value on SC_ITEMBOOST and SC_EXPBOOST, what are you trying to do ?, the 1st argument is the ending tick wich I guess you already set by doing gettick+day... so why *1000 again ? Quote
Emistry Posted November 17, 2012 Posted November 17, 2012 in your OnPCLoginEvent there...already show you a working method... sc_start SC_ITEMBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),200; sc_start SC_EXPBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),200; Quote
Mootie Posted November 17, 2012 Author Posted November 17, 2012 (edited) to prevent the overflowing what i need to do? change entire script? or re-edit something.... i already tryed all i know about scripting still nube @emis actually i get thisc script on http://upaste.me/851341191e32f77 made by you and i made some editing usual so boom overflow also possible for mvp card drop rate to be affect? Edited November 17, 2012 by Mootie Quote
Omnipotent Posted November 17, 2012 Posted November 17, 2012 (edited) prontera,155,181,5 script Sample 757,{ mes "Wan to be Premium Users for 1 week ?"; mes "Then give me "+.Amount+" x "+getitemname(.ItemID); if( countitem( .ItemID ) >= .Amount ){ if( select("YES:NO") == 1 ){ delitem .ItemID,.Amount; set #PremiumUser,gettimetick(2) + ( .Day * 3600 * 24 ); doevent "Sample::OnPCLoginEvent"; mes "Done. enjoy your Premium Services for 1 Week."; } } close; OnPCLoginEvent: if( #PremiumUser > gettimetick(2) ){ set .@t,#PremiumUser-gettimetick(2); if( .@t >= 3600 ){ addtimer 3600000,"Sample::OnPCLoginEvent"; set .@d,3600; } else{ addtimer .@t * 1000,"Sample::OnPCLoginEvent"; set .@d,.@t; } sc_start SC_ITEMBOOST,.@d * 1000,200; sc_start SC_EXPBOOST,.@d * 1000,200; } end; } Edited November 17, 2012 by Omnipotent Quote
Emistry Posted November 17, 2012 Posted November 17, 2012 @Mootie ya i know..i remember i made it ( and i remember i post a fixed one somewhere in forum i think ).. anyway the previous post i made is just to let you know there is already a "working" sample inside the script... all you have to do is just follow the same way .... in your script...the part you edit....you just do it in a wrong way only... and for the mvp card drop rate.... the sc_itemboost will affect All items include card , item , equipment and etc...... Quote
Question
Mootie
i already set
still overflowing o.o
6 answers to this question
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.