Jump to content

Question

Posted

I am requesting a item deletion script that hopefully is possible without any extensive src edits etc. I would like the script to behave as such; Talk to NPC click "I have Items to delete" and I would like a window to appear with all the items in the inventory (Similar to Identify Item Window or Card Slot Window) then after selecting the item a second confirmation before the item is disposed of. SQL Logs will not be required. Any help would be greatly appreciated, thank you in advance.

6 answers to this question

Recommended Posts

Posted

Anything requiring windows to function differently than they're supposed to will require extensive source edits.

Well could we pull the item ID's and post in a message window and allow selection of the items through menu instead of using a window.

[NPC NAME]

"You have these items;"

"Item Name""Item Name"

"Item Name""Item Name"

"Item Name""Item Name"

Next

[NPC NAME]

"Item Name""Item Name"

"Item Name""Item Name"

"Item Name""Item Name"

Then a menu with selection of those items

Or is this still not practical?

Posted

I'd recommend displaying the item IDs as well as names in the window, and using 'input' instead of 'menu' since you'd likely get huge menus that are hard to find things in. xP

	mes "Your inventory:";

getinventorylist;

for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1)

mes "[ "+@inventorylist_id[.@i]+" ] "+getitemname(@inventorylist_id[.@i])+" x"+@inventorylist_amount[.@i];

next;

input .@item;

if (getitemname(.@item) != "null") {

if (countitem(.@item)) {

input .@amount;

if (.@amount && countitem(.@item) >= .@amount) {

delitem .@item,.@amount;

mes getitemname(.@item)+" x"+.@amount+" deleted.";

close;

} else {

mes "Invalid amount "+.@amount+".";

close;

}

}

}

mes "Invalid input "+.@item+".";

close;

Or better yet, invoke the atcommands @itemlist / @delitem if you want to save yourself work. (Not that it matters since I gave you the script, but in the future... XD)
  • Upvote 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...