can someone help me with this script

Kei

New member
Messages
101
Points
0
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

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;		}}
 
use OnTimer<ms>: add this to your script

Code:
OnTimer60000:	stopnpctimer;		if ( #dragonslayer > gettimetick(2) )			atcommand "@fakename [Dragon Slayer] "+ strcharinfo(0);		else			atcommand "@fakename";	initnpctimer;	end;
 
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?

 
no. simply add that like this

Code:
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;
 
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..

 
Back
Top