Darkenes
New Member
- Joined
- Jan 5, 2014
- Messages
- 14
- Reaction score
- 2
is there a way to
in this?
as if the shovel were an exori vis the same exhausted and the same combat conditions
Lua:
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
in this?
Lua:
local holes = {468, 481, 483, 7932, 8579}
local sand = {231, 9059}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local storage = 100
local time = 0 -- time in seconds
if exhaustion.check(cid, storage) then
return true
end
if(isInArray(holes, itemEx.itemid)) then
local newId = itemEx.itemid + 1
if(itemEx.itemid == 8579) then
newId = 8585
end
exhaustion.set(cid, storage, time)
doTransformItem(itemEx.uid, newId)
doDecayItem(itemEx.uid)
elseif(isInArray(sand, itemEx.itemid)) then
local rand = math.random(1, 100)
if(itemEx.actionid == 100 and rand <= 20) then
exhaustion.set(cid, storage, time)
doTransformItem(itemEx.uid, 489)
doDecayItem(itemEx.uid)
elseif(rand >= 1 and rand <= 5) then
doCreateItem(2159, 1, toPosition)
end
exhaustion.set(cid, storage, time)
doSendMagicEffect(toPosition, CONST_ME_POFF)
end
return true
end
as if the shovel were an exori vis the same exhausted and the same combat conditions