• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Tools from Secret Service Quest

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,349
Reaction score
76
Location
Germany
Heya I wanna use the script that the items from Secret Service Whacking Driller of fate are usable as Shovel/Rope/Machete


Code:
local config = {
functions = {
[10511],
[10513],
[10515]

end

local spotId = {384, 418, 8278, 8592}
local holeId = {
    294, 369, 370, 383, 392,
    408, 409, 427, 428, 430,
    462, 469, 470, 482, 484,
    485, 489, 924, 3135, 3136,
    7933, 7938, 8170, 8286, 8285,
    8284, 8281, 8280, 8279, 8277,
    8276, 8323, 8380, 8567, 8585,
    8596, 8595, 8249, 8250, 8251,
    8252, 8253, 8254, 8255, 8256,
    8972, 9606, 9625
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(toPosition.x == CONTAINER_POSITION) then
        doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
        return true
    end

    local itemGround = getThingFromPos(toPosition)
    if(isInArray(spotId, itemGround.itemid)) then
        doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, false)
    elseif(isInArray(holeId, itemEx.itemid)) then
        local hole = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
        if(hole.itemid > 0) then
            doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false)
        else
            doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
        end
    else
        return false
    end

    return true

if


local JUNGLE_GRASS = {2782, 3985}
local SPIDER_WEB = {7538, 7539}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(isInArray(JUNGLE_GRASS, itemEx.itemid)) then
        doTransformItem(itemEx.uid, itemEx.itemid - 1)
        doDecayItem(itemEx.uid)
        return true
    end

    if(isInArray(SPIDER_WEB, itemEx.itemid)) then
        doTransformItem(itemEx.uid, (itemEx.itemid + 6))
        doDecayItem(itemEx.uid)
        return true
    end

    if(itemEx.itemid == 1499) then
        doSendMagicEffect(toPosition, CONST_ME_POFF)
        doRemoveItem(itemEx.uid)
        return true
    end

    return destroyItem(cid, itemEx, toPosition)
end

if

local holes = {468, 481, 483, 7932, 8579}
local sand = {231, 9059}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(isInArray(holes, itemEx.itemid)) then
        local newId = itemEx.itemid + 1
        if(itemEx.itemid == 8579) then
            newId = 8585
        end

        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
            doTransformItem(itemEx.uid, 489)
            doDecayItem(itemEx.uid)
        elseif(rand >= 1 and rand <= 5) then
            doCreateItem(2159, 1, toPosition)
        elseif(rand > 85) then
            doCreateMonster("Scarab", toPosition, false)
        end

        doSendMagicEffect(toPosition, CONST_ME_POFF)
    end

    return true
end
 
try this one
actions.xml
Code:
  <action itemid="10511" event="script" value="tools/squeezings.lua" />
  <action itemid="10512" event="script" value="tools/squeezings.lua" />
  <action itemid="10513" event="script" value="tools/squeezings.lua" />
  <action itemid="10514" event="script" value="tools/squeezings.lua" />
  <action itemid="10515" event="script" value="tools/squeezings.lua" />
  <action itemid="10516" event="script" value="tools/squeezings.lua" />
add this in the tools folder or edit the actions up there
squeezings.lua
Code:
local holes = {468, 481, 483, 7932}
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136, 8276, 8277, 8279, 8280, 8284, 8285}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if toPosition.x == 0 or toPosition.x == 65535 then
        return false
    elseif itemEx.itemid == 2739 then
        doTransformItem(itemEx.uid, 2737)
        doCreateItem(2694, 1, toPosition)
        doDecayItem(itemEx.uid)
    elseif itemEx.itemid == 2782 then
        doTransformItem(itemEx.uid, 2781)
        doDecayItem(itemEx.uid)
    elseif itemEx.itemid == 1499 then
        doRemoveItem(itemEx.uid)
    elseif (itemEx.itemid == 355 or itemEx.itemid == 9025) and (itemEx.uid <= 65535 or itemEx.actionid ~= 0) then
        doTransformItem(itemEx.uid, 392)
        doDecayItem(itemEx.uid)
    elseif itemEx.uid == 60001 then
        doTeleportThing(cid, {x=329, y=772, z=10})
        doSendMagicEffect({x=329, y=772, z=10},10)
    elseif isInArray(holes, itemEx.itemid) then
        doTransformItem(itemEx.uid, itemEx.itemid + 1)
        doDecayItem(itemEx.uid)
    elseif isInArray(holeId, itemEx.itemid) then
        local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}).uid
        if hole ~= 0 then
            doTeleportThing(hole, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z})
        end
    elseif table.find({384, 418, 8278}, getThingfromPos(toPosition).itemid) then
        doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1})
    else
        return false
    end
    return true
end
 
Back
Top