auto itemusing on pickup

WhiteEagle

New member
Messages
52
Points
0
Emulator
How is it possible to use items automatically as soon as it is pick uped?

Example:

A monster drop a White Herb and when I pick up this item, it will be used.

Thanks in advance.

 
You should move that request into a source request, it is maybe possible but it would be quirky, hardly performant or not exactly as you would want it to be.

 
You will need to create a new event, something like OnPCPickItemUP, and then just create a simple NPC script.
 
If you will manage to make that new event, the two commands you will need after are:

Code:
consumeitem <item_id>;delitem <item_id>,1;
 
Last edited by a moderator:
Hmm, I'd say it's pretty much possible to make with src edits, and we even have an analogue to look up to (*autoequip).

 
Zhao Chow

Special thanks. This is exactly what I am looking for.
note that this will be a lot of resource consuming since it will be executing a timer each 10ms to each player in the server
yeah the only disadvantage
default_sad.png


 
Yea I know.

I have some custom Items which droped global. 

So, no important Items will be deleted. ^-^

I don't know how much performance will be used for this script.

If it will be to much, I use it only for events.

My serverperformance:

Intel® Core™ i7-4770 
Quad-Core Haswell

32 GB DDR3 RAM
 
 
Yea I know.

I have some custom Items which droped global. 

So, no important Items will be deleted. ^-^

I don't know how much performance will be used for this script.

If it will be to much, I use it only for events.

My serverperformance:


Intel® Core™ i7-4770 Quad-Core Haswell


32 GB DDR3 RAM
Don't worry, that specs is k.

 
Back
Top