Jump to content
  • 0

@item restriction


ajaytrix

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   0
  • Joined:  03/29/12
  • Last Seen:  

Good day rA!

 

Requesting for this script.

 

A script that restricts specific item when using @item.

 

Case:

Example:

Restricted @item : 607, 7227, Apple, etc.

Only GM with this level = prefer GM 99 can override the restricted item.

GM Below 99 cannot @item the said restricted item. 

Thanks! :D

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   0
  • Joined:  05/31/13
  • Last Seen:  

The normal player level is 0  cannot used the @item except restrictions item 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   0
  • Joined:  03/29/12
  • Last Seen:  

 

This error comes up whether I'm GM 99 and below.

 

3466ed2.png

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

It may be an issue. Replace the 2 OnAtCommand by OnAtcommand

Also replace

if( getitemname( .@itemid ) != "" && .@quantity ){

by

if( getitemname( .@itemid ) != "null" && .@quantity ){

getitemname return "null" for an non-existent item

 

EDIT wth I post after your report and my post is above your xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

I tried this script, I can't @item any item haha. I removed the script, and the effect is still there haha now I can't @item anything

 

 

fixed my problem with:

 

-    script    unbinditem    -1,{
OnInit:
unbindatcmd "item";
}

 

 

 

I REALLY do hope that there's a working script that works like this :/

Edited by orochimakoto
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

I tried this script, I can't @item any item haha. I removed the script, and the effect is still there haha now I can't @item anything

Tried removing it from conf and reloading the script?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


- script atcmd_example -1,{

OnInit:

bindatcmd "item",strnpcinfo(3)+"::OnAtcommand";

setarray .item_restrict,

607,

7227;

.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),"Cant create this items.";

end;

}

}

if( getitemname( .@itemid ) != "null" ){

.@quantity = atoi( .@atcmd_parameters$[1] );

if ( .@quantity < 1 ) .@quantity = 1;

getitem .@itemid,.@quantity;

}

}

end;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

-	script	atcmd_example	-1,{
OnInit:
	bindatcmd "item",strnpcinfo(3)+"::OnAtcommand";
	setarray .item_restrict,
		607,
		7227;
	.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),"Cant create this items.";
					end;
				}
		}
		if( getitemname( .@itemid ) != "null" ){
			.@quantity = atoi( .@atcmd_parameters$[1] );
			if ( .@quantity < 1 ) .@quantity = 1;
			getitem .@itemid,.@quantity;
		}
	}
	end;

}

still not able to use @item even with GM LVL 99 , using latest SVN

bump

bump

buuuuuuump need help

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

it's working for me...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

im using rathena 17701.. and it doesnt work :(

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