Currently Posted October 18, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.03 Content Count: 313 Reputation: 1 Joined: 01/22/12 Last Seen: November 17, 2023 Share Posted October 18, 2016 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? Quote Link to comment Share on other sites More sharing options...
0 TiMz Posted October 18, 2016 Group: Members Topic Count: 51 Topics Per Day: 0.01 Content Count: 192 Reputation: 9 Joined: 05/08/13 Last Seen: August 23, 2024 Share Posted October 18, 2016 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; } 1 Quote Link to comment Share on other sites More sharing options...
0 Yonko Posted October 19, 2016 Group: Members Topic Count: 166 Topics Per Day: 0.03 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Share Posted October 19, 2016 here link 1 Quote Link to comment Share on other sites More sharing options...
0 Currently Posted October 21, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.03 Content Count: 313 Reputation: 1 Joined: 01/22/12 Last Seen: November 17, 2023 Author Share Posted October 21, 2016 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 Quote Link to comment Share on other sites More sharing options...
0 TiMz Posted October 21, 2016 Group: Members Topic Count: 51 Topics Per Day: 0.01 Content Count: 192 Reputation: 9 Joined: 05/08/13 Last Seen: August 23, 2024 Share Posted October 21, 2016 Change this: item: [true, true] to item: [false, false] Also add an item line to id: 99 and set to false. Quote Link to comment Share on other sites More sharing options...
Question
Currently
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.