RealmCrafter Wiki
Register
Advertisement

Created by Taz.

Using "RC_Core.rcm"
; Date/Time: 7:47:55 PM on 10/7/2010
; By Naddaz on TAZCO
;Basic health potion. Must have item name "Health Potion" in the editer or change the name in this script.
Function Main()

Player = Actor()
HPmax% = MaxAttribute(Player, "Health")
HP% = Attribute(Player, "Health")



If (HP <= 0)
OutPut(Player, "You are dead, and can not use potions", 255, 255, 255)
Return
Endif

TotPotionheal% = HP + 350

If (HP < HPmax)
	
		If (HasItem(Actor(), "Health Potion", 1))
		  AnimateActor(Player, "Drink", 2)
		  DoEvents(500)
		  SetAttribute(Player, "Health", TotPotionheal)
 		  Output(Player, "You have gained " + PotionHeal + " health", 100, 255, 50)
		  GiveItem(Player, "Health Potion", - 1)
		  Return
		Else
		 OutPut(Player, "You dont have any health potions left!", 255, 0, 0)
	     Return
		Endif
	
	
Else
Output(Player, "You dont need any health!", 255, 0, 0)
Return
EndIf
Return

End Function
Advertisement