paw Posted June 13, 2017 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 21 Reputation: 1 Joined: 05/19/17 Last Seen: July 7, 2017 Share Posted June 13, 2017 how to let custom command not allow #commands. players can #storage other players which can be annoying during pvp or woe. example command i got from the forums. - script storage -1,{ OnInit: bindatcmd "storage",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: if(getmapflag(strcharinfo(3),mf_gvg)); openstorage; end; } Quote Link to comment Share on other sites More sharing options...
1 Cyro Posted June 14, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted June 14, 2017 9 minutes ago, paw said: No storage on my groups.conf groups: ( { id: 0 /* group 0 is the default group for every new account */ name: "Player" level: 0 inherit: ( /*empty list*/ ) commands: { commands: true rates: true refresh: true go: true iteminfo: true mobinfo: true whodrops: true whereis: true time: true hominfo: true homstats: true noask: true noks: true autoloot: true alootid: true autoloottype: true autotrade: true breakguild: true changegm: true duel: true invite: true accept: true reject: true leave: true } permissions: { /* without this basic permissions regular players could not trade or party */ can_trade: true can_party: true command_enable: true } }, I'm using this. - script storage -1,{ OnInit: bindatcmd "storage",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: if(getmapflag(strcharinfo(3),mf_gvg)); openstorage; end; } try this - script storage -1,{ OnInit: bindatcmd "storage",strnpcinfo(3)+"::OnSTORAGE",0,99; end; OnSTORAGE: if(getmapflag(strcharinfo(3),mf_gvg)); openstorage; end; } 2 Quote Link to comment Share on other sites More sharing options...
0 Deleted User Posted June 13, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 235 Reputation: 55 Joined: 12/02/11 Last Seen: February 26, 2021 Share Posted June 13, 2017 (edited) I don't understand what are you trying to say. you want this command @storage command not allowed in GvG? if you want a command does not allow a certain map. Simple use mapflag: Quote guild_vs3 mapflag nocommand 99 99 - Level of groupid() can bypass the nocommand mapflag I working script: - script restricted_storage -1,{ OnInit: bindatcmd "storage",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: if(getmapflag(strcharinfo(3),mf_gvg)) { dispbottom "This command is not available to used."; end; } else { openstorage; end; } } Edited June 13, 2017 by Kaze Quote Link to comment Share on other sites More sharing options...
0 paw Posted June 13, 2017 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 21 Reputation: 1 Joined: 05/19/17 Last Seen: July 7, 2017 Author Share Posted June 13, 2017 (edited) 16 minutes ago, Kaze said: I don't understand what are you trying to say. you want this command @storage command not allowed in GvG? if you want a command does not allow a certain map. Simple use mapflag: 99 - Level of groupid() can bypass the nocommand mapflag I working script: - script restricted_storage -1,{ OnInit: bindatcmd "storage",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: if(getmapflag(strcharinfo(3),mf_gvg)) { dispbottom "This command is not available to used."; end; } else { openstorage; end; } } The script is working. The problem is a player can "#storage anotherplayersname" so that another players storage opens, which can disturb that another player. In other words, a player should not be able to use charcommand; only atcommand. Edited June 13, 2017 by paw Quote Link to comment Share on other sites More sharing options...
0 Deleted User Posted June 13, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 235 Reputation: 55 Joined: 12/02/11 Last Seen: February 26, 2021 Share Posted June 13, 2017 I don't have any idea where did you get that "#" unless if your Game Master or Administrator. in Normal Player they can't use # commands. because i tested ingame with normal player no #commands only @commands. Please check your groups.conf Quote Link to comment Share on other sites More sharing options...
0 paw Posted June 13, 2017 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 21 Reputation: 1 Joined: 05/19/17 Last Seen: July 7, 2017 Author Share Posted June 13, 2017 24 minutes ago, Kaze said: I don't have any idea where did you get that "#" unless if your Game Master or Administrator. in Normal Player they can't use # commands. because i tested ingame with normal player no #commands only @commands. Please check your groups.conf I do not have @storage in my players group.conf. I tried it on normal character, #storage works. Maybe a bug of my Git version? Quote Link to comment Share on other sites More sharing options...
0 Cyro Posted June 14, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted June 14, 2017 18 hours ago, paw said: I do not have @storage in my players group.conf. I tried it on normal character, #storage works. Maybe a bug of my Git version? you might be using custom storage script try checking it from you scripts also paste your groups.conf here try adding "storage: [true, false]" to your players Quote Link to comment Share on other sites More sharing options...
0 paw Posted June 14, 2017 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 21 Reputation: 1 Joined: 05/19/17 Last Seen: July 7, 2017 Author Share Posted June 14, 2017 2 minutes ago, Cyro said: you might be using custom storage script try checking it from you scripts also paste your groups.conf here try adding "storage: [true, false]" to your players No storage on my groups.conf groups: ( { id: 0 /* group 0 is the default group for every new account */ name: "Player" level: 0 inherit: ( /*empty list*/ ) commands: { commands: true rates: true refresh: true go: true iteminfo: true mobinfo: true whodrops: true whereis: true time: true hominfo: true homstats: true noask: true noks: true autoloot: true alootid: true autoloottype: true autotrade: true breakguild: true changegm: true duel: true invite: true accept: true reject: true leave: true } permissions: { /* without this basic permissions regular players could not trade or party */ can_trade: true can_party: true command_enable: true } }, I'm using this. - script storage -1,{ OnInit: bindatcmd "storage",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: if(getmapflag(strcharinfo(3),mf_gvg)); openstorage; end; } Quote Link to comment Share on other sites More sharing options...
0 paw Posted June 15, 2017 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 21 Reputation: 1 Joined: 05/19/17 Last Seen: July 7, 2017 Author Share Posted June 15, 2017 I'll try it later Quote Link to comment Share on other sites More sharing options...
0 paw Posted June 19, 2017 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 21 Reputation: 1 Joined: 05/19/17 Last Seen: July 7, 2017 Author Share Posted June 19, 2017 On 6/15/2017 at 1:09 AM, Cyro said: try this - script storage -1,{ OnInit: bindatcmd "storage",strnpcinfo(3)+"::OnSTORAGE",0,99; end; OnSTORAGE: if(getmapflag(strcharinfo(3),mf_gvg)); openstorage; end; } This worked. Thank you sir! Quote Link to comment Share on other sites More sharing options...
Question
paw
how to let custom command not allow #commands. players can #storage other players which can be annoying during pvp or woe.
example command i got from the forums.
- script storage -1,{ OnInit: bindatcmd "storage",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: if(getmapflag(strcharinfo(3),mf_gvg)); openstorage; end; }
Link to comment
Share on other sites
9 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.