Hello sir help how to add blocklist id number in Item giver npc

jimboy09232

New member
Messages
36
Points
0
Hi sir here's the script

how can I block 5377 , 5374 and godlikes items in this script 

I mean how to add restricted items in this script.

prontera,209,229,5    script    Item Giver    106,{
mes "[item Giver]";
mes "Please input the ITEM NUMBER that you want to receive.";
mes " ";
mes "You could use @ii <item name> to look for it or browse at ratemyserver.net";
input .@itemnum;
next;
mes "[item Giver]";
mes "How many pieces of this item do you want to receive?";
input .@itemcount;
next;
mes "[item Giver]";
mes "Here you go! Come again!";
getitem .@itemnum,.@itemcount;
close;
end;
}
 
something like this using if .@item equals your id.

prontera,209,229,5    script    Item Giver    106,{
mes "[Item Giver]";
mes "Please input the ITEM NUMBER that you want to receive.";
mes " ";
mes "You could use @ii <item name> to look for it or browse at ratemyserver.net";
input .@itemnum;
next;
 
if (.@itemnum == 5377 || .@itemnum == 5374) {
mes "[Item Giver]";
mes "You cannot use " + getitemname(.@itemnum) + ".";
close;
}

else {
next;
mes "[Item Giver]";
mes "How many pieces of this item do you want to receive?";
input .@itemcount;
next;
mes "[Item Giver]";
mes "Here you go! Come again!";
getitem .@itemnum,.@itemcount;
close;
end;
}
}



Also if you want, instead of "How many pieces of this item do you want to receive, you can do the following to show the name.

Code:
mes "How many pieces of " + getitemname(.@itemnum) + " do you want to receive?";
 
Last edited by a moderator:
Back
Top