EvilPuncker Posted September 5, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Share Posted September 5, 2012 I would like to suggest the addition of this patch from ToastOfDoom into rA: http://pastebin.com/fE8WGC9E 1 Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted September 5, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: January 24 Share Posted September 5, 2012 so this can be used to restrict a certain @command in a certain map? this would be helpful additon with rathena:) Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted September 5, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Author Share Posted September 5, 2012 so this can be used to restrict a certain @command in a certain map? yes Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted September 8, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Author Share Posted September 8, 2012 bump! this would be a helpful additon to rathena Quote Link to comment Share on other sites More sharing options...
Tepoo Posted September 8, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 104 Reputation: 4 Joined: 02/06/12 Last Seen: September 13, 2022 Share Posted September 8, 2012 i agree to this. Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted September 16, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Author Share Posted September 16, 2012 sorry for bumping it again xD Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted September 30, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Author Share Posted September 30, 2012 well, seems like ToastOfDoom is back active would be nice to see this diff updated and added to svn Quote Link to comment Share on other sites More sharing options...
GmOcean Posted September 30, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted September 30, 2012 (edited) 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 September 30, 2012 by GmOcean Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted September 30, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Author Share Posted September 30, 2012 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 Quote Link to comment Share on other sites More sharing options...
GmOcean Posted September 30, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted September 30, 2012 (edited) 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 September 30, 2012 by GmOcean Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted September 30, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Author Share Posted September 30, 2012 (edited) 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 and I want it as simple as restrictatcmd(prontera,uptime,60); and btw now we have strcharinfo(3) so there is no need to use getmapxy just to get mapname xD Edited September 30, 2012 by EvilPuncker Quote Link to comment Share on other sites More sharing options...
GmOcean Posted September 30, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted September 30, 2012 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. 1 Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted October 31, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Author Share Posted October 31, 2012 bump for this! Quote Link to comment Share on other sites More sharing options...
ToastOfDoom Posted November 19, 2012 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 44 Reputation: 49 Joined: 11/19/11 Last Seen: January 4, 2019 Share Posted November 19, 2012 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. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.