Jump to content
  • 0

About delitem command


kyeme

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

How can I delete or what is the command for deleting equipment of the player (not in the inventory) example i have 2 pcs Shield in my inventory, and 1 shied (put on)in my Equipment, <<< -- so how can i delete this Shield in my equipment (not the 2 pcs Shield in my inventory) ? :)

Edited by kyeme
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  08/19/17
  • Last Seen:  

On 9/21/2012 at 9:43 PM, Z3R0 said:

http://ea.dj-yhn.com...etinventorylist

@inventorylist_id[] - array of item ids.

@inventorylist_amount[] - their corresponding item amounts.

@inventorylist_equip[] - whether the item is equipped or not.

@inventorylist_refine[] - for how much it is refine

So you can use the following

 


 function del_equipped_item(.@item_id) {
getinventorylist;

for (set .@a, 0; .@a < @inventorylist_count; set .@a, .@a + 1) {
  if (@inventorylist_id[.@a] == .@item_id && @inventorylist_equip[.@a]) {
	delitem @inventorylist_id[.@a], 1;
	goto L_item_delete;
  }
}

mes "Item Not Found";
close;

L_item_delete:
mes "Item Deleted";
close;
 }
 

 

SIGH!!!! Damn you emistry, I didn't even see your post, and oddly enough we posted the exact same piece of code... lol

Still not work properly when we have the same item ID in the inventory. Is there any other function for delete item in specific item's ID?

Edited by SiRoCu
I mean Object ID of an item
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  123
  • Reputation:   9
  • Joined:  08/20/12
  • Last Seen:  

why not just put the other one in storage then delete the other?

and usually @delitem deletes the one in the equipment first (correct me if im wrong)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

I mean delitem in script command :)

*delitem <item id>,<amount>{,<account ID>};

*delitem "<item name>",<amount>{,<account ID>};

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try this..

prontera,155,181,5 script Sample 757,{
getinventorylist;
for( set .@i,0; .@i < @inventorylist_count; set .@i,.@i + 1 )
if( @inventorylist_id[.@i] == 1234 && @inventorylist_equip[.@i] ){
 delitem @inventorylist_id[.@i],1;
 mes "DONE";
}
close;
}

change the itemID here..

@inventorylist_id[.@i] == 1234

@Kyeme..

delitem cant work properly here.....it might delete the wrong item if you have more than 1 in your inventory.....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

@Sir Emistry I already test the script but the command is for only deleting item in the inventory not in my equipped -> in the equipment slot. So there's no command here? or impossible?

I want to delete first the Equipped -> in my equipment slot, before the item in my inventory.

Edited by kyeme
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:  

So you only want to delete your 'equipped' item? Not from inventory?

I think I had made such command last week /hmm

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

http://ea.dj-yhn.com...etinventorylist

@inventorylist_id[] - array of item ids.

@inventorylist_amount[] - their corresponding item amounts.

@inventorylist_equip[] - whether the item is equipped or not.

@inventorylist_refine[] - for how much it is refine

So you can use the following

 function del_equipped_item(.@item_id) {
getinventorylist;

for (set .@a, 0; .@a < @inventorylist_count; set .@a, .@a + 1) {
  if (@inventorylist_id[.@a] == .@item_id && @inventorylist_equip[.@a]) {
	delitem @inventorylist_id[.@a], 1;
	goto L_item_delete;
  }
}

mes "Item Not Found";
close;

L_item_delete:
mes "Item Deleted";
close;
 }

SIGH!!!! Damn you emistry, I didn't even see your post, and oddly enough we posted the exact same piece of code... lol

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...