Jump to content
  • 0

Only item id's of 20000 and above to continue npc conversation.


Question

8 answers to this question

Recommended Posts

Posted (edited)

Can anybody help? 

 

NPC check IF statement that a player must have an item id of 20000 or above in inventory to proceed?

 

From https://rathena.org/wiki/Getinventorylist

 

Try this:

	getinventorylist; 
	for(set .@i,0; .@i < @inventorylist_count; set .@i,.@i+1){
		if(@inventorylist_id[.@i] >= 20000){ // Item ID 20000 +
			mes "You have an " + .@i + " with you!";
			close;
		}
	}
	mes "You don't have an apple with you :(";
	close;

Dunno if what i did on mes is right, i guess you could make something out of that one you wanted.

Edited by Mary Magdalene
  • Upvote 1
Posted

 

thank you!

-Bump-

 

Sorry, but I just realized that the player must be wearing the headgear that is item ID of 20000 and above.

 

I don't know if that's possible but please check this:

 

https://rathena.org/wiki/Getequipid

 

 

simple

if(getequipid(EQI_HEAD_TOP) > 20000 || getequipid(EQI_HEAD_MID) > 20000 || getequipid(EQI_HEAD_LOW) > 20000)
  • Upvote 1
Posted

 

 

thank you!

-Bump-

 

Sorry, but I just realized that the player must be wearing the headgear that is item ID of 20000 and above.

 

I don't know if that's possible but please check this:

 

https://rathena.org/wiki/Getequipid

 

 

simple

if(getequipid(EQI_HEAD_TOP) > 20000 || getequipid(EQI_HEAD_MID) > 20000 || getequipid(EQI_HEAD_LOW) > 20000)

 

Lol i wasn't thinking very well. This'll work.

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