Jump to content
  • 0

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


Question

Posted

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!

2 answers to this question

Recommended Posts

Posted

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

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