SphereCommunity
Drink Total mana with Function.... - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Drink Total mana with Function.... (/Thread-Drink-Total-mana-with-Function)



Drink Total mana with Function.... - Jonathan7 - 05-25-2014 12:51 PM

Hi Guys,

I need some help.. i want to make a Function.. by exemple ( .mp ) to drink a Total mana Bottle.. Same thing for Heal ... Anyone know how i can make this script please for 56b ?!

Thanks ! =)


RE: Drink Total mana with Function.... - Coruja - 05-25-2014 01:14 PM

Code:
[FUNCTION mp]
IF (<FINDLAYER.layer_pack.FINDID.i_mana_potion>)
  FINDLAYER.layer_pack.FINDID.i_mana_potion.USE
ELSE
  SYSMESSAGE Potion not found.
ENDIF



RE: Drink Total mana with Function.... - XuN - 05-25-2014 11:35 PM

Code:
[function mp]
UsePotion i_mana_potion
[function hp] // you can make it useable for another potions too.
UsePotion i_potion_heal

[function UsePotion]
if !(<def0.<args>>)
return 0
endif
if (<restest <local.id>>)
if (<tag0.potion_delay_<local.id>>)
  return 0
endif
findid.<args>.dclick
tag.potion_delay_<local.id>=1
timerf 20,tag.potion_delay_<local.id>
endif