myserver Posted September 3, 2018 Group: Members Topic Count: 15 Topics Per Day: 0.01 Content Count: 45 Reputation: 0 Joined: 08/27/18 Last Seen: October 23, 2018 Share Posted September 3, 2018 the normal player have a @item but he/she can have a restriction item. sample normal player she/he used the command @item Yggdrasil Berry amout cannot use. but the gm she/he can used that command Quote Link to comment Share on other sites More sharing options...
0 HD Scripts Posted September 3, 2018 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 184 Reputation: 15 Joined: 06/10/12 Last Seen: 21 hours ago Share Posted September 3, 2018 here: here 2: Quote Link to comment Share on other sites More sharing options...
0 myserver Posted September 3, 2018 Group: Members Topic Count: 15 Topics Per Day: 0.01 Content Count: 45 Reputation: 0 Joined: 08/27/18 Last Seen: October 23, 2018 Author Share Posted September 3, 2018 i got error from the 1st choice Spoiler //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; } Quote Link to comment Share on other sites More sharing options...
0 HD Scripts Posted September 3, 2018 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 184 Reputation: 15 Joined: 06/10/12 Last Seen: 21 hours ago Share Posted September 3, 2018 change bindatcmd "item", strnpcinfo(3)+"::OnAtcommand"; by: bindatcmd "item", "atcmd_noitem::OnAtcommand"; Quote Link to comment Share on other sites More sharing options...
0 myserver Posted September 3, 2018 Group: Members Topic Count: 15 Topics Per Day: 0.01 Content Count: 45 Reputation: 0 Joined: 08/27/18 Last Seen: October 23, 2018 Author Share Posted September 3, 2018 same error sir i used this script there are no error but the normal playerhe cannot use @item any item from ratemyserver - script atcmd_noitem -1,{ OnInit: bindatcmd "item", "atcmd_noitem::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 < 0 ){ 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; } Quote Link to comment Share on other sites More sharing options...
1 sader1992 Posted September 3, 2018 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: Yesterday at 07:50 PM Share Posted September 3, 2018 (edited) bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>}; atcommand level - script atcmd_noitem -1,{ OnInit: bindatcmd("item",strnpcinfo(3)+"::OnAtcommand",0,99); setarray .item_restrict,607,501; end; OnAtcommand: .@itemid = atoi(.@atcmd_parameters$[0]); if(!getgmlevel()){ if(inarray(.item_restrict,.@itemid) != -1){ 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; } Edited September 3, 2018 by sader1992 1 Quote Link to comment Share on other sites More sharing options...
0 myserver Posted September 5, 2018 Group: Members Topic Count: 15 Topics Per Day: 0.01 Content Count: 45 Reputation: 0 Joined: 08/27/18 Last Seen: October 23, 2018 Author Share Posted September 5, 2018 On 9/4/2018 at 2:29 AM, sader1992 said: bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>}; atcommand level - script atcmd_noitem -1,{ OnInit: bindatcmd("item",strnpcinfo(3)+"::OnAtcommand",0,99); setarray .item_restrict,607,501; end; OnAtcommand: .@itemid = atoi(.@atcmd_parameters$[0]); if(!getgmlevel()){ if(inarray(.item_restrict,.@itemid) != -1){ 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; } same issue the normal player cannot use the @item any item. the command is not working from the normal player when i paste to renewal i got error Quote Link to comment Share on other sites More sharing options...
Question
myserver
the normal player have a @item but he/she can have a restriction item.
sample
normal player she/he used the command @item Yggdrasil Berry amout cannot use.
but the gm she/he can used that command
Link to comment
Share on other sites
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.