-- <action actionid="45000" event="script" value="walls_energy_spirit_power.lua"/>
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 45001 and getPlayerStorageValue(cid, 45001) < 1 then
setPlayerStorageValue(cid, 45001, 1)
doCreatureSay(cid, "You have absorbed some energy", TALKTYPE_ORANGE_1, cid)
elseif item.uid == 45002 and getPlayerStorageValue(cid, 45002) < 1 then
setPlayerStorageValue(cid, 45002, 1)
doCreatureSay(cid, "You have absorbed some spirit", TALKTYPE_ORANGE_1, cid)
elseif item.uid == 45003 and getPlayerStorageValue(cid, 45003) < 1 then
setPlayerStorageValue(cid, 45003, 1)
doCreatureSay(cid, "You have absorbed some power", TALKTYPE_ORANGE_1, cid)
end
return true
end
-- <movevent type="StepIn" actionid="45001" event="script" value="energy.lua"/>
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == FALSE then
return true
end
if getPlayerStorageValue(cid, 45001) == 1 then
doCreatureSay(cid, "The energy courses through you.", TALKTYPE_ORANGE_1, cid)
else
doCreatureSay(cid, "No energy cources through you.", TALKTYPE_ORANGE_1, cid)
doTeleportThing(cid, fromPosition, false)
end
return true
end
-- <movevent type="StepIn" actionid="45002" event="script" value="spirit.lua"/>
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == FALSE then
return true
end
if getPlayerStorageValue(cid, 45002) == 1 then
doCreatureSay(cid, "The spirit courses through you.", TALKTYPE_ORANGE_1, cid)
else
doCreatureSay(cid, "No spirit cources through you.", TALKTYPE_ORANGE_1, cid)
doTeleportThing(cid, fromPosition, false)
end
return true
end
--<movevent type="StepIn" actionid="45003" event="script" value="power.lua"/>
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == FALSE then
return true
end
if getPlayerStorageValue(cid, 45003) == 1 then
doCreatureSay(cid, "The power courses through you.", TALKTYPE_ORANGE_1, cid)
else
doCreatureSay(cid, "No power cources through you.", TALKTYPE_ORANGE_1, cid)
doTeleportThing(cid, fromPosition, false)
end
return true
end