Jump to content
  • 0
Sign in to follow this  
Phenex

Disable item consumption when hp and sp are full

Question

5 answers to this question

Recommended Posts

  • 0

It depends, if you want it to work for ALL healing items, then your best bet is a src edit.

However, if you only want to make a select few items have this effect, you can do so with script code.

 

Example of the latter:

This is the original Item for 607 (Yggdrasilberry).

{	Id: 607	AegisName: "Yggdrasilberry"	Name: "Yggdrasil Berry"	Type: 0	Buy: 5000	Weight: 300	BuyingStore: true	Delay: 5000	Script: <" percentheal 100,100; ">},

 

This is the modified version to fit your request:

{	Id: 607	AegisName: "Yggdrasilberry"	Name: "Yggdrasil Berry"	Type: 0	Buy: 5000	Weight: 300	BuyingStore: true	Delay: 5000	KeepAfterUse: true	Script: <" if (readparam(Hp) == readparam(MaxHP) || readparam(Sp) == readparam(MaxSP)) { end; }			   else { percentheal 100,100; delitem 607,1; } ">},

 

You'll notice the KeepAfterUse: true

this will prevent the item from being deleted upon using it, even if they had maxHP/SP.

Then if they weren't, we heal them, and manually delete the item.

Share this post


Link to post
Share on other sites
  • 0

What do you mean...?? ok, I just want some one to tell me how this is done If this is possible to do. If it's through src, then which file and where do i edit it kinda thing.

Edited by Phenex

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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