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

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

×
×
  • Create New...

Important Information

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