Mootie Posted November 17, 2012 Group: Members Topic Count: 43 Topics Per Day: 0.01 Content Count: 815 Reputation: 86 Joined: 10/26/12 Last Seen: June 10, 2022 Share 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 Link to comment Share on other sites More sharing options...
Euphy Posted November 17, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted November 17, 2012 Max int is 2147483648, your script produces 13531694210 (magnitude of 10 higher). 1 Quote Link to comment Share on other sites More sharing options...
Lighta Posted November 17, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted November 17, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: April 20 Share 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 Link to comment Share on other sites More sharing options...
Mootie Posted November 17, 2012 Group: Members Topic Count: 43 Topics Per Day: 0.01 Content Count: 815 Reputation: 86 Joined: 10/26/12 Last Seen: June 10, 2022 Author Share 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 Link to comment Share on other sites More sharing options...
Omnipotent Posted November 17, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 71 Reputation: 25 Joined: 11/23/11 Last Seen: May 16, 2024 Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted November 17, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: April 20 Share 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 Link to comment Share on other sites More sharing options...
Question
Mootie
i already set
still overflowing o.o
Link to comment
Share on other sites
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.