Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int item_id_req = 501; // item id
- int item_qty_req = 5; // item quantity
- int i = 0, found = 0;
- for (; i < MAX_INVENTORY; i++)
- {
- if (sd->status.inventory[i].nameid == item_id_req &&
- sd->status.inventory[i].amount >= item_qty_req &&
- !sd->status.inventory[i].equip &&
- sd->status.inventory[i].identify)
- {
- found = 1;
- }
- else
- continue;
- }
- if (!found)
- {
- sprintf(atcmd_output, "You need %dx %s in order to use this command", item_qty_req, itemdb_jname(item_id_req));
- clif_displaymessage(sd->fd, atcmd_output);
- return -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement