Currently Posted October 18, 2016 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
0 TiMz Posted October 18, 2016 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
0 Currently Posted October 21, 2016 Author 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
0 TiMz Posted October 21, 2016 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
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?
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.