Jump to content
  • 0

Block specific command map.


Siberian

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   0
  • Joined:  02/07/12
  • Last Seen:  

Hi,

How do I block @die on a map?

Wanted to block specific commands on a map.

Thanks.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

I believe this could be done by using bindatcmd: http://rathena.org/b...__hl__bindatcmd

*bindatcmd "command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};
*bindatcmd("command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>});

This command will bind a NPC event label to an atcommand. Upon execution of
the atcommand, the user will invoke the NPC event label.

Example:

When a user types the command "@test", an angel effect will be shown.

-	script	atcmd_example	-1,{
OnInit:
bindatcmd("test","atcmd_example::OnAtcommand");
end;
OnAtcommand:
specialeffect2 338;
end;
}

and using strcharinfo(3) to make sure that when they do use @die, it'll check if the player is on the specific map.

*strcharinfo(<type>)

This function will return either the name, party name or guild name for the
invoking character. Whatever it returns is determined by type.

0 - Character's name.
1 - The name of the party they're in if any.
2 - The name of the guild they're in if any.
3 - The name of the map the character is in.

If a character is not a member of any party or guild, an empty string will be  
returned when requesting that information.

Basically with bindatcmd, you would want to configure it so that when they do use @die, you can use the strcharinfo(3) function to check if they're on the right map and if they are, you can put a NPC message saying "You are not allowed to use @die on this map."

Another alternative way.. is using the nocommands mapflag.. but it blocks all commands.. =/

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