Jump to content

atcmd_restrictions_v100 by toastie


EvilPuncker

Recommended Posts


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

I would like to suggest the addition of this patch from ToastOfDoom into rA:

http://pastebin.com/fE8WGC9E

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

so this can be used to restrict a certain @command in a certain map?

this would be helpful additon with rathena:)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

so this can be used to restrict a certain @command in a certain map?

yes

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

bump! this would be a helpful additon to rathena

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   4
  • Joined:  02/06/12
  • Last Seen:  

i agree to this.

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

well, seems like ToastOfDoom is back active :D would be nice to see this diff updated and added to svn

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Hmm, I'm not saying it "shouldn't" be added, but we already currently have something like it.

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

With this you can litterally do the exact same thing, and make it so player's can't use the command on certain maps.

Additionally we have with i.

*unbindatcmd "command";
*unbindatcmd("command");
This command will unbind a NPC event label from an atcommand.

So, you can pretty much make atcommands only accessible after meeting requirements and so on.

Edited by GmOcean
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

Hmm, I'm not saying it "shouldn't" be added, but we already currently have something like it.

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

With this you can litterally do the exact same thing, and make it so player's can't use the command on certain maps.

Additionally we have with i.

*unbindatcmd "command";
*unbindatcmd("command");
This command will unbind a NPC event label from an atcommand.

So, you can pretty much make atcommands only accessible after meeting requirements and so on.

but that is a really weird way of doing this xDD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

I wouldn't think so.

-	script	test_npc	-1,{
OnInit:
bindatcmd("@storage","test_npc::OnStorage");
end;
OnStorage:
set .@maps$[0],"prontera","payon","alberta","etc...";
getmapxy(.@m$,.@x,.@y,0);
for(set .@i,0; .@i<getarraysize(.@maps$); set .@i,.@i+1)
{if(.@m$==.@maps$[.@i]){dispbottom "@storage is disabled on this map."; end;}}
openstorage;
end;
}

Personally, I just think that using the bindatcmd script command is better since it is more versatile. Your basically free to put any pre-requisists for using a command/limitations for using one while using the script. Example: Limit @warp to only work during 18:00 -> 00:00. Or making @storage only useable 5->10x a day, then after that charge them zeny or an item to use it further past that amount/time. There really is limitless possibilities, just depends on your imagination.

Edited by GmOcean
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

I wouldn't think so.

-	script	test_npc	-1,{
OnInit:
bindatcmd("@storage","test_npc::OnStorage");
end;
OnStorage:
set .@maps$[0],"prontera","payon","alberta","etc...";
getmapxy(.@m$,.@x,.@y,0);
for(set .@i,0; .@i<getarraysize(.@maps$); set .@i,.@i+1)
{if(.@m$==.@maps$[.@i]){dispbottom "@storage is disabled on this map."; end;}}
openstorage;
end;
}

Personally, I just think that using the bindatcmd script command is better since it is more versatile. Your basically free to put any pre-requisists for using a command/limitations for using one while using the script. Example: Limit @warp to only work during 18:00 -> 00:00. Or making @storage only useable 5->10x a day, then after that charge them zeny or an item to use it further past that amount/time. There really is limitless possibilities, just depends on your imagination.

I know how could I use the way you told me to, but you don't really got what I'm trying to achieve here :P and I want it as simple as restrictatcmd(prontera,uptime,60); :P and btw now we have strcharinfo(3) so there is no need to use getmapxy just to get mapname xD

Edited by EvilPuncker
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Okay lol. I got what you were saying, I just thought maybe you didn't know the possibilities an existing command. But I agree, simpiler is better in some cases.

  • Upvote 1
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   48
  • Joined:  11/19/11
  • Last Seen:  

While yes this can be very easily implemented using bindatcmd, it would force you to go through the script engine pipeline which is abit excessive for just an extra comparison every atcommand.

  • Upvote 1
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
Reply to this topic...

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