GmOcean Posted November 28, 2012 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 ( [email protected]$ ) 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: [email protected]$ = test [email protected]_parameters$[0] = Testing [email protected]_parameters$[1] = Atcommand - script at_cmd -1,{ OnInit: bindatcmd("test","at_cmd::OnUseCmd"); end; OnUseCmd: dispbottom "You used: @"+ [email protected]$+" "+ [email protected]_parameters$[0] + [email protected]_parameters$[1]; end; Link to comment Share on other sites More sharing options...
Brian Posted November 28, 2012 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 [email protected]$, "test"; goto OnUseCmd; at_test2: set [email protected]$, "test2"; goto OnUseCmd; at_hello: set [email protected]$, "hello"; goto OnUseCmd; OnUseCmd: dispbottom "You used: @"+ [email protected]$+" "+ [email protected]_parameters$[0] + [email protected]_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, "[email protected]_command$", 0, (void *)command, NULL); Edited November 28, 2012 by Brian 2 Link to comment Share on other sites More sharing options...