Jump to content
  • 0

bindatcmd only in town


Mabuhay

Question


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

-	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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Maybe u can use onpcloadmap event and unbindatcmd

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

Useful. /codebtn

Edited by Kaze
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

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.

Link to comment
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.   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.

×
×
  • Create New...