Jump to content
  • 0

Premium Account NPC debug


Question

Posted

celestiaj,90,80,3	script	Premium Account Plus	757,{
	if (getgmlevel() > 0) {
		Emotion e_rice;
		mes "[Premium Account Plus]";
		mes "I see that you have a Premium Account!";
		mes "Would you like to see more bonus for your account?";
		menu "Yes",On_Premium,"No",-;
		close;
	}
	mes "[Premium Account Plus]";
	mes "Welcome to ^FF0000Premium Account Plus^000000";
	mes "Premium account is a premium membership that delivers several benefits!";
	mes "This premium mode runs for all characters in your account.";
	mes "Before I continue, do you wanna know more about Premium Account Plus?";
	next;
	if ( select ( "Go ahead", "No " ) == 2 ) {
		Emotion e_ho;
		mes "[Premium Account Plus]";
		mes "Ok, bye!";
		close;
	}
	else if ( .start != 1 ) { // time
		Emotion e_ok;
		mes "[Premium Account Plus]";
		mes "Premium account requires you to donate.";
		mes "It cost 1000 vRO credit for 3 months.";
		mes "Your membership can be extended at anytime for another 3 months.";
		next;
		Emotion e_slur;
		mes "[VapeRO Character Aura]";
		mes "This auras are unchangeable. You can only pick 3 auras and the GM will be the one to put it in your 3 characters.";
		mes "Once you delete your character with Aura, GM will not enable those Aura again.";
		mes "You can look for Aura sprites on our Fan Page album.";
		next;
		Emotion e_gg;
		mes "[VapeRO Boost]";
		mes " • Item Drop Rate + 50%";
		mes " • Exp Rate + 300%";
		mes "This is available for all characters in your Premium Account. Once you are already a premium member, you just have to talk to me to activate these features.";
		mes "So for example, if the MVP card drop rate is 5%, the drop rate will be boosted up to 7.5%.";
		mes "Cool isn't it?  ";
		next;
		Emotion e_ok;
		mes "[VapeRO Free Services]";
		mes "This enables you to use NPC services for FREE!";
		mes "Hypnotist NPC (Reset Stats/Skills for free)";
		mes "Card Remover NPC (Remove cards from your equipment for free)";
		next;
		Emotion e_oops;
		mes "[VapeRO Premium Commands]";
		mes "@mount (Allow you to mount dragons, falcons, and more by using this command).";
		mes "@petrename (Allow you to change your pet name).";
		next;
		Emotion e_rice;
		mes "[VapeRO Discount]";
		mes "Save money on VapeRO Donate Shop with a discount of 10% off!";
		next;
		mes "[Premium Account Plus]";
		Emotion e_ok;
		mes "To activate Premium Account, just talk to a GM about the payment methods";
		mes "Donate donate donate ~";
		mes "  ";
		mes "Just a little reminder before I end the conversation.";
		mes "Donations are not for GM's. Donations are used for the betterment of the Server.";
		mes ":)";
		next;
		mes "[Premium Account Plus]";
		Emotion e_heh;
		mes "So what are you waiting for?!";
		mes "Donate now to avail these features!! :)";
		close;
	}
	end;

On_Premium:
Emotion e_ho;
next;
mes "Do you want to activate the following:";
mes " • EXP Rate +300%";
mes " • Item Drop Rate + 50%";
	if( select("YES:NO") == 1 ){
		set #PremiumUser,gettimetick(2) + ( .Day * 3600 * 24 );
		sc_start SC_ITEMBOOST,( #PremiumUser * 1000 ),50;
		sc_start SC_EXPBOOST,( #PremiumUser * 1000 ),300;
		mes "Done. enjoy your Premium Services for 1 Week.";
	}
close;

OnPCLoginEvent:
if( #PremiumUser > gettimetick(2) ){
	sc_start SC_ITEMBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),50;
	sc_start SC_EXPBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),300;
}
end;
}

 

Everytime a player click on this NPC. It cause an error making the client crash. Also, sometimes when this npc is clicked, it cause the player to sudden stack. Like after warp/go to somewhere, they can walk once then, they will hang, they can still talk, receive any message, but they cannot move anymore.

 

I also want to request, how to change the time of this to 1 hour only. I don't understand the timetick really. Can someone help me please? Thank you in advance!

bump please help

6 answers to this question

Recommended Posts

Posted

If you don' have any error on your map-serv console, the only thing that can make crash your server is the 'emoticon' command.

Your client probably miss one of them, they get a gravity error and bye.

Posted

set #PremiumUser,gettimetick(2) + ( .Day * 3600 * 24 ); -- what is .Day varible? where it define? need full script, not only copypast of some parts, or link to script where you get this.

 

gettimetick(<tick type>)

This function will return a tick depending on <tick type>:
 0: The server's tick, a measurement in milliseconds used by the server's timer
    system. This tick is an unsigned int which loops every ~50 days.
 1: The time, in seconds, since the start of the current day.
 2: The system time in UNIX epoch time, or the number of seconds elapsed since
    January 1st, 1970. Useful for reliably measuring time intervals.

3600 = 60 seconds * 60 = 1 hour

24 = number of hours

so, it this script say mes "Done. enjoy your Premium Services for 1 Week.";

.Day must be 7, but as i said above - you take part from another script and make it bad.

 

simple change to:

set #PremiumUser,gettimetick(2) + 3600 ;

Posted
else if ( .start != 1 ) {

.start is undefined (so the value is always 0)

 

Like Phenomena said .Day is undefined

set #PremiumUser,gettimetick(2) + ( .Day * 3600 * 24 );// .Day must be 7

 

you forgot gettimetick(2) in theses lines, so the mapserv throw an overflow

		sc_start SC_ITEMBOOST,( #PremiumUser * 1000 ),50;// must be : sc_start SC_ITEMBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),50;
		sc_start SC_EXPBOOST,( #PremiumUser * 1000 ),300;// idem : sc_start SC_EXPBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),300;
Posted
else if ( .start != 1 ) {

.start is undefined (so the value is always 0)

 

Like Phenomena said .Day is undefined

set #PremiumUser,gettimetick(2) + ( .Day * 3600 * 24 );// .Day must be 7

 

you forgot gettimetick(2) in theses lines, so the mapserv throw an overflow

		sc_start SC_ITEMBOOST,( #PremiumUser * 1000 ),50;// must be : sc_start SC_ITEMBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),50;
		sc_start SC_EXPBOOST,( #PremiumUser * 1000 ),300;// idem : sc_start SC_EXPBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),300;

 

 

What edit should I do in .start != 1?

 

So I'll just change the .day to 7 right?

 

 

 

sc_start SC_ITEMBOOST,( #PremiumUser * 1000 ),50;// must be : sc_start SC_ITEMBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),50;
        sc_start SC_EXPBOOST,( #PremiumUser * 1000 ),300;// idem : sc_start SC_EXPBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),300;

 

 

What should i do with this?

 

This one?

sc_start SC_ITEMBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),50;

sc_start SC_EXPBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),300;

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