Jump to content
  • 0
Sign in to follow this  
Kei

can someone help me with this script

Question

i have a problem with this script.. it didn't get back my original name after 1minute and after 1minute i need to logout to return my name to its original

 

heres the code

 

-	script	login	-1,{OnPCLoginEvent:	if ( !#dragonslayer ) end;	 if ( #dragonslayer > gettimetick(2) )	atcommand "@fakename [Dragon Slayer] "+ strcharinfo(0);	else	atcommand "@fakename"; } -	script	kjfhsdfkjhsd	-1,{OnPCStatCalcEvent:    if ( #dragonslayer > gettimetick(2) )         bonus bStr,100;    end;} prontera,150,150,4	script	Dragon Slayer	54,{	mes "Would you like to become Dragon Slayer or Demon Slayer?";	next;	switch(select("Yes:No.")) {	case 1:		mes "Select what you want to become";		switch(select("Dragon Slayer:Demon Slayer")) {		case 1:		if(countitem(7777) > 0) {		delitem 7777,1;		atcommand "@fakename [Dragon Slayer] "+ strcharinfo(0);		set #dragonslayer, gettimetick(2) + 60;		addtimer 60000, strnpcinfo(0)+"::Ontitle";		close;		Ontitle:		atcommand "@fakename";		end;		}		else {		mes "You don't have any requirements for Dragon Slayer or Demon Slayer.";		mes "Come back when you get one.";		close;		}				case 2:		if(countitem(7778) > 0) {		delitem 7778,1;		atcommand "@fakename [Demon Slayer] "+ strcharinfo(0);		mes "Congrats You've become Demon Slayer";		close;		}		else {		mes "You don't have any requirements for Dragon Slayer or Demon Slayer.";		mes "Come back when you get one.";		close;		}		}	 case 2:		mes "Very well, I shall be here if you change your mind.";		close;		}}

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

use OnTimer<ms>: add this to your script

OnTimer60000:	stopnpctimer;		if ( #dragonslayer > gettimetick(2) )			atcommand "@fakename [Dragon Slayer] "+ strcharinfo(0);		else			atcommand "@fakename";	initnpctimer;	end;

Share this post


Link to post
Share on other sites
  • 0

 

use OnTimer<ms>: add this to your script

OnTimer60000:	stopnpctimer;		if ( #dragonslayer > gettimetick(2) )			atcommand "@fakename [Dragon Slayer] "+ strcharinfo(0);		else			atcommand "@fakename";	initnpctimer;	end;

 

so i'll remove the onpcloginevent and place the ontimer?

Share this post


Link to post
Share on other sites
  • 0

no. simply add that like this

OnPCLoginEvent:	if ( !#dragonslayer ) end;		if ( #dragonslayer > gettimetick(2) )			atcommand "@fakename [Dragon Slayer] "+ strcharinfo(0);		else			atcommand "@fakename";OnTimer60000: // check every 1 min	stopnpctimer;		if ( #dragonslayer > gettimetick(2) )			atcommand "@fakename [Dragon Slayer] "+ strcharinfo(0);		else			atcommand "@fakename";	initnpctimer;	end;

Share this post


Link to post
Share on other sites
  • 0

 

no. simply add that like this

OnPCLoginEvent:	if ( !#dragonslayer ) end;		if ( #dragonslayer > gettimetick(2) )			atcommand "@fakename [Dragon Slayer] "+ strcharinfo(0);		else			atcommand "@fakename";OnTimer60000: // check every 1 min	stopnpctimer;		if ( #dragonslayer > gettimetick(2) )			atcommand "@fakename [Dragon Slayer] "+ strcharinfo(0);		else			atcommand "@fakename";	initnpctimer;	end;

thanks but i still have problem.. theres still remaining time then i logout and login .. its still continue the fakename even the time over 1min..

Share this post


Link to post
Share on other sites

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

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.