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

draw well [help]

Mummrik

Hey!
Joined
Oct 22, 2007
Messages
707
Solutions
28
Reaction score
126
Location
Sweden
does anyone know how to remove the "draw well" teleport thing?
i mean like in fibula you use the draw well to go down anyone know where that data is stored? since now you can use all the draw well's to pz bugg and that is anoying i will make a custom action script for all my draw well's i want to go down i have search in items.xml and actions.xml but i did not find anything

You see a draw well.
ItemID: [1368].

edit: im useing TFS 0.3.2
 
Have you searched in the other folders where weapons scripts are?

Also, if you want to remove them from your mapeditor you can just search for the item IN your mapeditor and then manually remove them.
 
Open up your data/actions/scripts/others/teleport.lua file and replace the content with this (remember to switch the drawWellAid to anything you'd like to make it possible to enter draw wells, or anything else with that action id):
PHP:
local upFloorIds = {1386, 3678, 5543, 8599}
local drawWellAid = 3434
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(isInArray(upFloorIds, item.itemid) == TRUE) then
        fromPosition.y = fromPosition.y + 1
        fromPosition.z = fromPosition.z - 1
    else
        if item.itemid == 1369 and item.actionid == drawWellAid then
            fromPosition.z = fromPosition.z + 1
        elseif item.itemid ~= 1369 then
            fromPosition.z = fromPosition.z + 1
        end
    end

    doTeleportThing(cid, fromPosition, FALSE)
    return TRUE
end
 
Open up your data/actions/scripts/others/teleport.lua file and replace the content with this (remember to switch the drawWellAid to anything you'd like to make it possible to enter draw wells, or anything else with that action id):
PHP:
local upFloorIds = {1386, 3678, 5543, 8599}
local drawWellAid = 3434
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(isInArray(upFloorIds, item.itemid) == TRUE) then
        fromPosition.y = fromPosition.y + 1
        fromPosition.z = fromPosition.z - 1
    else
        if item.itemid == 1369 and item.actionid == drawWellAid then
            fromPosition.z = fromPosition.z + 1
        elseif item.itemid ~= 1369 then
            fromPosition.z = fromPosition.z + 1
        end
    end

    doTeleportThing(cid, fromPosition, FALSE)
    return TRUE
end

thx alot that is just what i was looking for to make it possible to use 1 or 2 wells
 
I have made a new script since the old one was bugged you did get tp to the well if there was no aid but this one will work 100%

make new lua file
draw_well.lua
Code:
local drawWellAid = 1000
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.itemid == 1369 and item.actionid == drawWellAid then
		doTeleportThing(cid, {x = toPosition.x, y = toPosition.y, z = toPosition.z + 1}, TRUE)
        elseif item.itemid == 1369 then
                doPlayerSendCancel(cid, "You can not use this object.")
        end
    end

in actions.xml
change:

Code:
	<action itemid="1369" event="script" value="other/teleport.lua"/>

to:
Code:
	<action itemid="1369" event="script" value="other/draw_well.lua"/>
 
Back
Top