Jump to content
  • 0
Sign in to follow this  
Legend

Count total number of items

Question

I don't know if this is possible ...

an NPC that would count total number of specific items that i looted.

ie: 

i loot for an apple (itemid 512) for 200pcs... some of them are already consumed and some of them stored in storage/cart...

then, when i talk to the NPC, still same count 200pcs of apple

 

total number of the specific item (ie: apple) will be added everytime i loot.


Hoping for an answer to my request

Thanks in advance!

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

ok then I coded it

then you know apple doesn't have unique ID

 

OnPCPickUpEvent

prontera,155,185,5	script	kjsdhfdksfj	1_F_MARIA,{
	setarray .@a, 1203,1,4,0, 4001,4001,4859,4701;
	getitem2 .@a[0],1,.@a[1],.@a[2],.@a[3], .@a[4],.@a[5],.@a[6],.@a[7];
	end;
OnPCPickUpEvent:
	announce strcharinfo(0) +" has obtained "+ @pickup[PICKUP_AMOUNT] +"x "+ getitemname(@pickup[PICKUP_ITEMID])
	//+ callfunc( "getitemname2", @pickup[PICKUP_ITEMID], @pickup[PICKUP_IDENTIFY], @pickup[PICKUP_REFINE], @pickup[PICKUP_BROKEN],	@pickup[PICKUP_CARD1], @pickup[PICKUP_CARD2], @pickup[PICKUP_CARD3], @pickup[PICKUP_CARD4] )
	+" at "+ strcharinfo(3) +","+ @pickup[PICKUP_POSX] +","+ @pickup[PICKUP_POSY], bc_all;
	dispbottom "unique ID = "+ @pickup[PICKUP_UNIQUEID];
	end;
}

Knife ->

post-4102-0-45557600-1450501132_thumb.jpg

Apple ->

post-4102-0-44647300-1450501155_thumb.jpg

 

so its impossible

 

EDIT: or maybe if you make it undroppable ...

nodrop: true

in the item_db.conf ... hmm ...

 

 

EDIT2: the idea of this modification came from

https://www.eathena.ws/board/index.php?s=&showtopic=247755&view=findpost&p=1487853

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

coding OnPCPickUpEvent now ... ok I'm not coding it =/

 

EDIT: how to check if the player actually just drop the apple and pick up, repeating the process to bypass this system ?

I just found Hercules unique_id is not meant for stackable items, only equipments

 

thus it is currently impossible to check, I guess ?

 

looks impossible currently

Edited by AnnieRuru

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.