Jump to content
  • 0

Overflow


Question

Posted

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;
}

post-9398-0-89388500-1353169559_thumb.png

i already set

    sc_start SC_ITEMBOOST,( #PremiumUser * 50 ),30;
    sc_start SC_EXPBOOST,( #PremiumUser * 50 ),30;

still overflowing o.o

6 answers to this question

Recommended Posts

Posted

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 ?

Posted

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;

Posted (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 /whisp

@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 by Mootie
Posted (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 by Omnipotent
Posted

@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......

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...