Radian Posted November 30, 2018 Posted November 30, 2018 Hey guys, I am trying to create a bindatcmd script that works like @ccommand "options" Options: market - (warps the player to the market area) bg - (warp the player to the bg area) In-game will look like this. Quote
0 n0tttt Posted November 30, 2018 Posted November 30, 2018 Sorry. .@str$ = strtolower(.@atcmd_parameter$[0]); Change to: .@str$ = strtolower(.@atcmd_parameters$[0]); 2 Quote
1 n0tttt Posted November 30, 2018 Posted November 30, 2018 (edited) Not possible to detect them as of now by scripting (@commands show them well though), you'd have to add them and their descriptions manually. - script CCommand -1,{ OnCommand: if(!.@atcmd_numparameters) { message strcharinfo(0),"Use @ccommands options to check the options."; } else { setarray .@options$[0],"options","bg","market"; .@str$ = strtolower(.@atcmd_parameters$[0]); .@command = inarray(.@options$,.@str$); switch(.@command) { case 1: warp "bg",0,0; break; case 2: warp "market",0,0; break; default: message strcharinfo(0),"Avaiaible commands:"; message strcharinfo(0),"@market: warps you to the Market."; message strcharinfo(0),"@bg: warps you to the BattleGrounds arena."; break; } } end; OnInit: bindatcmd "ccommand","CCommand::OnCommand"; end; } Edited November 30, 2018 by n0tttt 1 1 Quote
0 n0tttt Posted November 30, 2018 Posted November 30, 2018 I don't know if I understood very well. - script CCommand -1,{ OnCommand: if(!.@atcmd_numparameters) { message strcharinfo(0),"Use @ccommands options to check the options."; } else { setarray .@options$[0],"options","bg","market"; .@str$ = strtolower(.@atcmd_parameter$[0]); .@command = inarray(.@options$,.@str$); switch(.@command) { case 1: warp "bg",0,0; break; case 2: warp "market",0,0; break; default: .@mes$ = implode(.@options$,", "); message strcharinfo(0),"Avaiaible commands: "+.@mes$; break; } } end; OnInit: bindatcmd "ccommand","CCommand::OnCommand"; end; } 2 Quote
0 Radian Posted November 30, 2018 Author Posted November 30, 2018 16 minutes ago, n0tttt said: I don't know if I understood very well. - script CCommand -1,{ OnCommand: if(!.@atcmd_numparameters) { message strcharinfo(0),"Use @ccommands options to check the options."; } else { setarray .@options$[0],"options","bg","market"; .@str$ = strtolower(.@atcmd_parameter$[0]); .@command = inarray(.@options$,.@str$); switch(.@command) { case 1: warp "bg",0,0; break; case 2: warp "market",0,0; break; default: .@mes$ = implode(.@options$,", "); message strcharinfo(0),"Avaiaible commands: "+.@mes$; break; } } end; OnInit: bindatcmd "ccommand","CCommand::OnCommand"; end; } Yup this is what i wanted... but it didn't it only reads the default part. Quote
0 maken06 Posted November 30, 2018 Posted November 30, 2018 (edited) Is it possible to modify this command in order to consult the custom commands in the server? and also to be able to know what they are for? Edited November 30, 2018 by maken06 Quote
Question
Radian
Hey guys, I am trying to create a bindatcmd script that works like @ccommand "options"
Options:
In-game will look like this.
6 answers to this question
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.