Jump to content
  • 0
Sign in to follow this  
WhiteEagle

auto itemusing on pickup

Question

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.

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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:

consumeitem <item_id>;delitem <item_id>,1;
Edited by Oxxy

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

 

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 :(

Share this post


Link to post
Share on other sites
  • 0

 

 

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 :(

Its not the ONLY. If you will use this script, then you will get items deleted even if they wasn't picked up. They will be deleted one by one every 10 milliseconds.

Share this post


Link to post
Share on other sites
  • 0

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
 

 

Share this post


Link to post
Share on other sites
  • 0

 

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.

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.