Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

Refined weapon/equip as quest item using getinventory list then delete after


Zirius

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   1
  • Joined:  07/22/14
  • Last Seen:  

Hello! Can somebody help me how to run loop on "getinventorylist" array.

Suppose, let's say, we want +10 Muffler and +10 Manteau as quest requirement, how do you successfully check for it and delete it? ???

Any example?

Thanks!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   21
  • Joined:  01/31/12
  • Last Seen:  

Updated from the wiki:
 

getinventorylist; 
	for(.@i = 0; .@i < @inventorylist_count; .@i += 1){
		if(@inventorylist_id[.@i] == 512){ // 512 is the item id for apple
			mes "You have an apple with you!";
			close;
		}
	}
	mes "You don't have an apple with you :(";
	close;

Read which variables are set by getinventorylist; Here

  • Upvote 1
Link to comment
Share on other sites


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

you can

use countitem2 to check for specific refined item

and

use delitem2 to delete the refined item

  • Upvote 1
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...