GmOcean Posted November 28, 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 November 28, 2012 Okay, as of right now, bindatcmd works as intended no problems at all, even the support for parameters is very useful. I would just also like for there to be a variable added as well, so we can figure out which command is used. Now before anyone says anything, YES i do know you specify an event label, which in turn renders this suggestion useless. However, with a variable ( .@atcmd$ ) we can in turn use 1 label for all of our bound-atcmds and determine how to calculate it from there. I for one, would perfer to have this added, mainly because i like to use commands like this dynamically if i could. I had to stop mid-way writting a script to allow the dynamic build of atcmds because, i was unable to figure out which command was used. e.g if i were to use: @test Testing Atcommand it would set the following: .@atcmd$ = test .@atcmd_parameters$[0] = Testing .@atcmd_parameters$[1] = Atcommand - script at_cmd -1,{ OnInit: bindatcmd("test","at_cmd::OnUseCmd"); end; OnUseCmd: dispbottom "You used: @"+ .@atcmd$+" "+ .@atcmd_parameters$[0] + .@atcmd_parameters$[1]; end; Link to comment Share on other sites More sharing options...
Brian Posted November 28, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted November 28, 2012 (edited) - script at_cmd -1,{ OnInit: bindatcmd "test","at_cmd::at_test"; bindatcmd "test2","at_cmd::at_test2"; bindatcmd "hello","at_cmd::at_hello"; end; at_test: set .@atcmd$, "test"; goto OnUseCmd; at_test2: set .@atcmd$, "test2"; goto OnUseCmd; at_hello: set .@atcmd$, "hello"; goto OnUseCmd; OnUseCmd: dispbottom "You used: @"+ .@atcmd$+" "+ .@atcmd_parameters$[0] + .@atcmd_parameters$[1]; end; } EDIT: on a more serious note, it looks like this is already implemented, but not documented. r16471/trunk/src/map/npc.c setd_sub(st, NULL, ".@atcmd_command$", 0, (void *)command, NULL); Edited November 28, 2012 by Brian 2 Link to comment Share on other sites More sharing options...
Recommended Posts