Jump to content
  • 0

bindatcmd only @commands not #commands


paw

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  05/19/17
  • Last Seen:  

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

  • 1

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

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;
}

 

  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

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 by Kaze
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  05/19/17
  • Last Seen:  

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 by paw
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  05/19/17
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  05/19/17
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  05/19/17
  • Last Seen:  

I'll try it later

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   1
  • Joined:  05/19/17
  • Last Seen:  

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...