Jump to content
  • 0

Question

Posted

I was wondering how to let a bindatcmd work only at town maps. else maps, will say this command is not available in non-towns.

 

here is the script:

-	script	vendwarp	-1,{
OnInit:
	bindatcmd("vend",strnpcinfo(0)+"::OnVend");
	end;
	
OnVend:
	warp "vend_zone",99,99;
	end;
}

 

4 answers to this question

Recommended Posts

Posted
-	script	vendwarp	-1,{
OnInit:
	bindatcmd("vend",strnpcinfo(0)+"::OnVend");
	end;
	
OnVend:
	if( !getmapflag( strcharinfo(3),mf_town ) ) {
		message strcharinfo(0), "not autorized";
		end;
	}
	warp "vend_zone",99,99;
	end;
}

 

getmapflag + mapflag town

Posted

hmm sorry but that script is used for my server. I mean the purpose of that is to warp the player to the vending map. That's its only purpose.

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