Jump to content
  • 0

Delete Item


GM Djinsu

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  74
  • Reputation:   16
  • Joined:  05/08/12
  • Last Seen:  

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.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  74
  • Reputation:   16
  • Joined:  05/08/12
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  74
  • Reputation:   16
  • Joined:  05/08/12
  • Last Seen:  

True haha, well thank you very much Euphy, I appreciate the help, your always on top of it around here it seems.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Your item can't be sold to NPC?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  74
  • Reputation:   16
  • Joined:  05/08/12
  • Last Seen:  

They could but im aiming at something else, thank you though nanakiwurtz

Link to comment
Share on other sites

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.

×
×
  • Create New...