Jump to content
  • 0
Soul1992

OnNPCKillEvent Quest Npc same Map Help

Question

need a check if all users are on the same map.

 

 

abyss_01,22,36,1	script	Quest Helper#25	112,{
if(FuriousFerus >= 1  &&  Acidus >= 22  &&  Novus >= 35) goto l_allkills;
mes "[Helper]";
mes "You have to kill:";
mes "You have "+FuriousFerus+"/1 Furious Ferus...";
mes "You have "+Acidus+"/22 Acidus...";
mes "You have "+Novus+"/35 Novus";
next;
menu "^00FF00Quest Accept^0000FF",L_AbyssLakequest;

L_AbyssLakequest:
mes "[Helper]";
mes "Do you want to accept the Quest?";
next;
menu "Yes",L_AbyssLakekill,"No.....",L_No;

L_AbyssLakekill:
mes "[Helper]";
mes "You can now begin to Kill the Monsters !!";
set AbyssLakekill,0;
close;



l_allkills:
getitem,5531,1;
close;


OnNPCKillEvent:
if(AbyssLakekill) end;
	if(killedrid == 2832) // = Furious Ferus
	{
	addrid( 2, 0, getcharid(1) );
	if(AbyssLakekill) end;	
    if ( hp == 0 ) end;			
		set FuriousFerus,FuriousFerus + 1;
		if (FuriousFerus < 1) {
			dispbottom "You killed "+FuriousFerus+"/1 Furious Ferus.";
		}
		else if(FuriousFerus == 1) {
			dispbottom "You have killed all Furious Feruss.";
		}
	}
	else if (killedrid == 1716) // = Acidus
	{
	addrid( 2, 0, getcharid(1) );
	if(AbyssLakekill) end;	
    if ( hp == 0 ) end;			
		set Acidus,Acidus + 1;
		if (Acidus < 22) {
			dispbottom "You killed "+Acidus+"/22 Aciduss.";
		}
		else if(Acidus == 22) {
			dispbottom "You have killed all Aciduss.";
		}
	}
	else if (killedrid == 1715) // = Novus
	{
	addrid( 2, 0, getcharid(1) );
	if(AbyssLakekill) end;	
    if ( hp == 0 ) end;			
		set Novus,Novus + 1;
		if (Novus < 35) {
			dispbottom "You killed "+Novus+"/35 Novus.";
		}
		else if(Novus == 35) {
			dispbottom "You have killed all Novuss.";
		}
	}
	end;
	}

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

To check on which map a player is:
 

.@map$ = strcharinfo(PC_MAP, "%", .@account_id);

if (.@map$ == "%") {
    // player is not on a map
} else {
    // player is on a map
    // << add further checks here >>
}

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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