Jump to content
  • 0

No @item specific items.


Currently

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Not sure if this should be in script section or here but..

 

Anybody know how to make specific items not able to obtain from @item?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  192
  • Reputation:   9
  • Joined:  05/08/13
  • Last Seen:  

Not sure if this should be in script section or here but..

 

Anybody know how to make specific items not able to obtain from @item?

 

Hello. You can either use a source modification or a script to achieve that.

 

Should you choose to use a script, you'll first have to remove @item access via groups.conf then run this script.

//By Capuche

-	script	atcmd_noitem	-1,{
OnInit:
	bindatcmd "item",strnpcinfo(3)+"::OnAtcommand";
	setarray .item_restrict,
		607, //1st item to be restricted
		501; //2nd item to be restricted
	.item_restrict_size = getarraysize( .item_restrict );
	end;
OnAtcommand:
	.@gmlevel = getgmlevel();
	if( .@gmlevel && .@atcmd_numparameters ){
		.@itemid = atoi( .@atcmd_parameters$[0] );
		if( .@gmlevel < 99 ){
			for( .@i = 0; .@i < .item_restrict_size; .@i++ )
				if( .@itemid == .item_restrict[.@i] ){
					message strcharinfo(0),"You cannot create this item.";
					end;
				}
		}
		if( getitemname( .@itemid ) != "null" ){
			.@quantity = atoi( .@atcmd_parameters$[1] );
			if ( .@quantity < 1 ) .@quantity = 1;
			getitem .@itemid,.@quantity;
		}
	}
	end;

}
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

here 


link

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

 

Not sure if this should be in script section or here but..

 

Anybody know how to make specific items not able to obtain from @item?

 

Hello. You can either use a source modification or a script to achieve that.

 

Should you choose to use a script, you'll first have to remove @item access via groups.conf then run this script.

//By Capuche

-	script	atcmd_noitem	-1,{
OnInit:
	bindatcmd "item",strnpcinfo(3)+"::OnAtcommand";
	setarray .item_restrict,
		607, //1st item to be restricted
		501; //2nd item to be restricted
	.item_restrict_size = getarraysize( .item_restrict );
	end;
OnAtcommand:
	.@gmlevel = getgmlevel();
	if( .@gmlevel && .@atcmd_numparameters ){
		.@itemid = atoi( .@atcmd_parameters$[0] );
		if( .@gmlevel < 99 ){
			for( .@i = 0; .@i < .item_restrict_size; .@i++ )
				if( .@itemid == .item_restrict[.@i] ){
					message strcharinfo(0),"You cannot create this item.";
					end;
				}
		}
		if( getitemname( .@itemid ) != "null" ){
			.@quantity = atoi( .@atcmd_parameters$[1] );
			if ( .@quantity < 1 ) .@quantity = 1;
			getitem .@itemid,.@quantity;
		}
	}
	end;

}

 

So, I set my Super Player to have the item:

 

id: 1
name: "Super Player"
inherit: ( "Player" ) /* can do everything Players can and more */
level: 0
commands: {
/* informational commands */
item: true

and as default on Event Managers:

id: 4
name: "Event Manager"
inherit: ( "Support" )
level: 1
commands: {
monster: true
monstersmall: true
monsterbig: true
killmonster2: true
cleanarea: true
cleanmap: true
item: [true, true]

So should I remove these both? How about the Admin level though since it has all commands? Lol

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  192
  • Reputation:   9
  • Joined:  05/08/13
  • Last Seen:  

Change this:

item: [true, true]

to

item: [false, false]

Also add an item line to id: 99 and set to false.

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...