ManaReq=25
TreeStrength=188
TreeGrowth=5000
CurrSpawn=0

If GetUserInvItem(#USERID,GetUserEquippedWeapon(#USERID))<>355
	;UserSkill 35 is Restore More - So I changed it to 32, which is Wild Growth
	;SetUserSkill(#USERID,32,0)
	;Goto End
Endif

If GetUserWisdom(#USERID)>10
	TreeStrength=189
Endif

If GetUserWisdom(#USERID)>20
	TreeStrength=190
Endif

If GetUserWisdom(#USERID)>40
	TreeStrength=191
Endif

If GetUserWisdom(#USERID)>60
	TreeStrength=192
Endif

If GetUserAccess(#USERID)>0
	TreeStrength=278
Endif

;If GetUserMana(#USERID)<ManaReq
;	SendMessageToUser(#USERID,"You need "+Floor(ManaReq-GetUserMana(#USERID))+" more blood to grow a tree!",#MSG_CRITICAL)
;Else
	;SetUserMana(#USERID,GetUserMana(#USERID)-ManaReq)
	CreateEffect(25,TreeGrowth,0,#DIR_UP,GetUserMap(#USERID),GetUserX(#USERID),GetUserY(#USERID),0,#USERID,0)
	Timer5(457,TreeGrowth-500,GetUserMap(#USERID),GetUserX(#USERID),GetUserY(#USERID),TreeStrength,#USERID)
	Timer5(455,180000,GetUserMap(#USERID),GetUserX(#USERID),GetUserY(#USERID),TreeStrength,#USERID)
;Endif

Label End

Continue = 1