Takizuki 0 Posted August 6, 2014 Hi, is it possible to disable specific item using @item command? only npc can release it what i mean is... example if i type @item 607 (ygg) it wont give me the item i want, but if i talk to ygg dealer npc it can gives me a ygg. ( make sense? ) coz i know that you can disable an item on itemdb so that you cant get it even your using @item. Quote Share this post Link to post Share on other sites
0 Happy 28 Posted August 6, 2014 Hello, You can create a @item via bindatcmd to overwrite the original @item and add the restrictions that you want. http://herc.ws/wiki/Bindatcmd 1 jTynne reacted to this Quote Share this post Link to post Share on other sites
0 jTynne 101 Posted August 7, 2014 Tossed this together quickly, haven't tested, but should work. - script itembind -1,{// Script-Based @item Alternative by Eiphes// Version: 1.0 - August 2014// Feel free to edit this script or simply use it as a base. OnInit: unbindatcmd "item"; bindatcmd("item","itembind::OnAtcommand",0,10); end; OnAtcommand:if(getgroupid() < 1) { dispbottom "[Server] : You are not authorized to use this command."; end; }set @item$,.@atcmd_parameters$[0]; // Group-Based Restrictionsif(@item$ == "" || @item$ == "" && getgroupid() < 99) {// Add new IDs into the quotations. Things in here can't be created by anyone lower than group 99 (Admin). dispbottom "[Server] : Your group ID is not authorized to create that item."; end;}// Create new sections by copy/pasting the above code and modifying the IDs and groupid level accordingly.} Quote Share this post Link to post Share on other sites
0 Takizuki 0 Posted August 7, 2014 thank you ill try this out Quote Share this post Link to post Share on other sites
0 Takizuki 0 Posted August 7, 2014 tried it but it wont allow them to use @item even the item is not restricted on this line if(@item$ == "" || @item$ == "" && getgroupid() < 99) { also even a GM 99 cant also do @item saying that Your group ID is not authorized to create that item. i think the script wont allow the use of @item on any group id no error in the console Quote Share this post Link to post Share on other sites
0 jTynne 101 Posted August 7, 2014 - script itembind -1,{// Script-Based @item Alternative by Eiphes// Version: 1.0 - August 2014// Feel free to edit this script or simply use it as a base. OnInit: unbindatcmd "item"; bindatcmd("item","itembind::OnAtcommand",10,10); end; OnAtcommand:if(getgroupid() < 10) { dispbottom "[Server] : You are not authorized to use this command."; end; }set .@item$,.@atcmd_parameters$[0];set .@amount$,.@atcmd_parameters$[1]; // Group-Based Restrictionsif(.@item$ == "504" || .@item$ == "505" && getgroupid() < 99) {// Add new IDs into the quotations. Things in here can't be created by anyone lower than group 99 (Admin). dispbottom "[Server] : Your group ID is not authorized to create that item."; end;}// Create new sections by copy/pasting the above code and modifying the IDs and groupid level accordingly.set .@item,.@item$;set .@amount,.@amount$;if(.@amount < 1) { set .@amount,1;}getitem .@item,.@amount;end;} Quote Share this post Link to post Share on other sites
0 jTynne 101 Posted August 7, 2014 Double-posting because it keeps messing up the code box; Edit the ID numbers (in the example I've given, 504, and 505) to what you want restricted. The code is unoptimized, and will probably show warnings in the console, but just tested it and it works. The original code I posted didn't give items, whoops. Fixed and added some more code in my previous response. Quote Share this post Link to post Share on other sites
Hi, is it possible to disable specific item using @item command? only npc can release it
what i mean is... example
if i type @item 607 (ygg) it wont give me the item i want, but if i talk to ygg dealer npc it can gives me a ygg. ( make sense? )
coz i know that you can disable an item on itemdb so that you cant get it even your using @item.
Share this post
Link to post
Share on other sites