• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

problem with pick and shovel

Dogrinha

New Member
Joined
Oct 6, 2019
Messages
206
Solutions
1
Reaction score
2
Hello, my players are not able to open holes with pick or shivel if there are fluids on top of the hole, how can I open even with the fluids?
tfs 0.4

Lua:
unction onUse(cid, item, fromPosition, itemEx, toPosition)
    if((itemEx.uid <= 65535 or itemEx.actionid > 0) and isInArray({231,9059}, itemEx.itemid)) then
        doTransformItem(itemEx.uid, 489)
        doDecayItem(itemEx.uid)
        doSendMagicEffect(toPosition, CONST_ME_POFF)
        return true
    end
local newPosition = {x=33356, y=31180, z=8}
if(isInArray(HOLES, itemEx.itemid)) then
if(itemEx.itemid ~= 8579) then
itemEx.itemid = itemEx.itemid + 1
else
itemEx.itemid = 8585
end
doTransformItem(itemEx.uid, itemEx.itemid)
doDecayItem(itemEx.uid)

return true
elseif(SAND_HOLES[itemEx.itemid] ~= nil and itemEx.actionid == 100) then
doSendMagicEffect(toPosition, CONST_ME_POFF)
doTransformItem(itemEx.uid, SAND_HOLES[itemEx.itemid])
doDecayItem(itemEx.uid)
return true
elseif(itemEx.itemid == SAND and not isRookie(cid)) then

local rand = math.random(1, 100)
if(rand >= 1 and rand <= 5) then
doCreateItem(ITEM_SCARAB_COIN, 1, toPosition)
elseif(rand > 85) then
doCreateMonster("Scarab", toPosition, false)
end
doSendMagicEffect(toPosition, CONST_ME_POFF)

return true
elseif(itemEx.uid == 3623 and getPlayerStorageValue(cid,42324) == 2) then
doTeleportThing(cid, newPosition, TRUE)
doSendMagicEffect(newPosition, CONST_ME_POFF)
end
return false
end

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if((itemEx.uid <= 65535 or itemEx.actionid > 0) and isInArray({354, 355, 351, 352, 353}, itemEx.itemid)) then
        doTransformItem(itemEx.uid, 392)
        doDecayItem(itemEx.uid)
        return true
    end

    if(itemEx.itemid == 7200) then
        doTransformItem(itemEx.uid, 7236)
        doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
        return true
    end

    return false
end
 
Back
Top