• 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!

Pick on ground get teleported

Rider Ones

New Member
Joined
Jan 12, 2009
Messages
104
Reaction score
2
Tibia version 8.60
OTX Server version 2.51
use the pick in one place and be teleported, example use pick in the crack ground like fenrock

help?
 
Last edited:
Please reference the stickied posting rules.
We require the Server version, the script, and any Errors In console.

We ask for this information so we can help you.
Without all available information we are simply guessing what the problem is and it's frustrating for both you and us if we guess wrong.

Please edit your post with updated information or reply with it.

Thank you.

Xikini
 
Code:
function onUse(cid, item, fromPosition, target, toPosition)
    if(target.itemid == xxxx) then
        doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
    end
    return true
end

Change target itemid, position array and setup the xml file.
 
Yes, you can add the if statement part to the pick.lua script, change target to itemEx then since the rest of the script is using that.
 
I need some help with this if someone could lend a hand what should the script look like? i cant figure it out, whenever i try it doesnt seem to work here is my script.-

local holes = {468, 481, 483, 7932, 385}
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 385, 3135, 3136}
function onUse(cid, item, fromPosition, itemEx, toPosition)

-- Shovel
if isInArray(holes, itemEx.itemid) == TRUE then
doTransformItem(itemEx.uid, itemEx.itemid + 1)
doDecayItem(itemEx.uid)
return FALSE
-- Rope
elseif toPosition.x == CONTAINER_POSITION or toPosition.x == 0 and toPosition.y == 0 and toPosition.z == 0 then
return FALSE
end
local groundTile = getThingfromPos(toPosition)
if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
elseif isInArray(holeId, itemEx.itemid) == TRUE 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
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return FALSE
-- Pick
elseif (itemEx.uid <= 65535 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355 or itemEx.itemid == 9024 or itemEx.itemid == 9025) then
doTransformItem(itemEx.uid, 392)
doDecayItem(itemEx.uid)
return TRUE
elseif itemEx.uid == 60001 then
doTeleportThing(cid, {x=329, y=772, z=10})
doSendMagicEffect({x=329, y=772, z=10},10)
return TRUE
-- Machete
elseif itemEx.itemid == 2782 then
doTransformItem(itemEx.uid, 2781)
doDecayItem(itemEx.uid)
return TRUE
elseif itemEx.itemid == 1499 then
doRemoveItem(itemEx.uid)
return TRUE
-- Scythe
elseif itemEx.itemid == 2739 then
doTransformItem(itemEx.uid, 2737)
doCreateItem(2694, 1, toPosition)
doDecayItem(itemEx.uid)
return TRUE
end
return destroyItem(cid, itemEx, toPosition)
end
 
Last edited:
I need some help with this if someone could lend a hand what should the script look like? i cant figure it out, whenever i try it doesnt seem to work here is my script.-

local holes = {468, 481, 483, 7932, 385}
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 385, 3135, 3136}
function onUse(cid, item, fromPosition, itemEx, toPosition)

-- Shovel
if isInArray(holes, itemEx.itemid) == TRUE then
doTransformItem(itemEx.uid, itemEx.itemid + 1)
doDecayItem(itemEx.uid)
return FALSE
-- Rope
elseif toPosition.x == CONTAINER_POSITION or toPosition.x == 0 and toPosition.y == 0 and toPosition.z == 0 then
return FALSE
end
local groundTile = getThingfromPos(toPosition)
if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
elseif isInArray(holeId, itemEx.itemid) == TRUE 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
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return FALSE
-- Pick
elseif (itemEx.uid <= 65535 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355 or itemEx.itemid == 9024 or itemEx.itemid == 9025) then
doTransformItem(itemEx.uid, 392)
doDecayItem(itemEx.uid)
return TRUE
elseif itemEx.uid == 60001 then
doTeleportThing(cid, {x=329, y=772, z=10})
doSendMagicEffect({x=329, y=772, z=10},10)
return TRUE
-- Machete
elseif itemEx.itemid == 2782 then
doTransformItem(itemEx.uid, 2781)
doDecayItem(itemEx.uid)
return TRUE
elseif itemEx.itemid == 1499 then
doRemoveItem(itemEx.uid)
return TRUE
-- Scythe
elseif itemEx.itemid == 2739 then
doTransformItem(itemEx.uid, 2737)
doCreateItem(2694, 1, toPosition)
doDecayItem(itemEx.uid)
return TRUE
end
return destroyItem(cid, itemEx, toPosition)
end

Code:
local holes = {468, 481, 483, 7932, 385}
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 385, 3135, 3136}



function onUse(cid, item, fromPosition, itemEx, toPosition)

-- It goes between here  ^




if(target.itemid == xxxx) then
     doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
     return true
end




-- and here  v

-- Shovel



if isInArray(holes, itemEx.itemid) == TRUE then
doTransformItem(itemEx.uid, itemEx.itemid + 1)
doDecayItem(itemEx.uid)
return FALSE
-- Rope
elseif toPosition.x == CONTAINER_POSITION or toPosition.x == 0 and toPosition.y == 0 and toPosition.z == 0 then
return FALSE
end
local groundTile = getThingfromPos(toPosition)
if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
elseif isInArray(holeId, itemEx.itemid) == TRUE 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
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return FALSE
-- Pick
elseif (itemEx.uid <= 65535 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355 or itemEx.itemid == 9024 or itemEx.itemid == 9025) then
doTransformItem(itemEx.uid, 392)
doDecayItem(itemEx.uid)
return TRUE
elseif itemEx.uid == 60001 then
doTeleportThing(cid, {x=329, y=772, z=10})
doSendMagicEffect({x=329, y=772, z=10},10)
return TRUE
-- Machete
elseif itemEx.itemid == 2782 then
doTransformItem(itemEx.uid, 2781)
doDecayItem(itemEx.uid)
return TRUE
elseif itemEx.itemid == 1499 then
doRemoveItem(itemEx.uid)
return TRUE
-- Scythe
elseif itemEx.itemid == 2739 then
doTransformItem(itemEx.uid, 2737)
doCreateItem(2694, 1, toPosition)
doDecayItem(itemEx.uid)
return TRUE
end
return destroyItem(cid, itemEx, toPosition)
end
 
Code:
local holes = {468, 481, 483, 7932, 385}
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 385, 3135, 3136}



function onUse(cid, item, fromPosition, itemEx, toPosition)

-- It goes between here  ^




if(target.itemid == xxxx) then
     doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
     return true
end




-- and here  v

-- Shovel



if isInArray(holes, itemEx.itemid) == TRUE then
doTransformItem(itemEx.uid, itemEx.itemid + 1)
doDecayItem(itemEx.uid)
return FALSE
-- Rope
elseif toPosition.x == CONTAINER_POSITION or toPosition.x == 0 and toPosition.y == 0 and toPosition.z == 0 then
return FALSE
end
local groundTile = getThingfromPos(toPosition)
if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
elseif isInArray(holeId, itemEx.itemid) == TRUE 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
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return FALSE
-- Pick
elseif (itemEx.uid <= 65535 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355 or itemEx.itemid == 9024 or itemEx.itemid == 9025) then
doTransformItem(itemEx.uid, 392)
doDecayItem(itemEx.uid)
return TRUE
elseif itemEx.uid == 60001 then
doTeleportThing(cid, {x=329, y=772, z=10})
doSendMagicEffect({x=329, y=772, z=10},10)
return TRUE
-- Machete
elseif itemEx.itemid == 2782 then
doTransformItem(itemEx.uid, 2781)
doDecayItem(itemEx.uid)
return TRUE
elseif itemEx.itemid == 1499 then
doRemoveItem(itemEx.uid)
return TRUE
-- Scythe
elseif itemEx.itemid == 2739 then
doTransformItem(itemEx.uid, 2737)
doCreateItem(2694, 1, toPosition)
doDecayItem(itemEx.uid)
return TRUE
end
return destroyItem(cid, itemEx, toPosition)
end
It's soo big... I know thats what she said :p
 
Back
Top