Acrenactive
★Designer★
Biginners Tutorial; Manarune Script
This Work trust me.
OBS! This script is not made by me
Acrenactive\data\actions
Go now in Action.xml and add this.
Create manarune.lua
This Work trust me.
OBS! This script is not made by me
Acrenactive\data\actions
Go now in Action.xml and add this.
HTML:
<action itemid="2270" event="script" value="liquids/manarune.lua"/>
Create manarune.lua
HTML:
local MIN = 130
local MAX = 230
local EMPTY_POTION = 7636
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == FALSE then
return FALSE
end
if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
return FALSE
end
doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Ohh...", TALKTYPE_ORANGE_1)
return TRUE
end
Last edited: