• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Need help with Deep Fibula draw well

Bulet

Knight of Apocalypse
Joined
Jul 12, 2009
Messages
183
Reaction score
9
Location
Brazil
deepfibula.jpg


I want to click on draw well and go down but i use these scripts and dont work

First script
Code:
function onStepIn(cid, item, position, fromPosition)
      local pos = {x = position.x+1, y = position.y, z = position.z-1}
	doTeleportThing(cid, pos)
	doSendMagicEffect(pos,10)
	end

Please if any one can help me im REP++
Tks a lot
 
Last edited:
hmm I need this script too, I was about to do it some months ago
 
I disabled that a while ago in Rmp.

data/actions/actions.xml
Code:
	<action itemid="1368" script="other/drawwell.lua"/>

data/actions/scripts/other/drawwell.lua (could merge with teleport.lua as well)
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.actionid >= 100 then
		doTeleportThing(cid, {x=toPosition.x, y=toPosition.y, z=toPosition.z-1}, FALSE)
		return TRUE
	end
	return FALSE
end

And all you have to do afterwards is set the action ID of the draw well (the part which has ID 1368) to 100.
 
I disabled that a while ago in Rmp.

data/actions/actions.xml
Code:
	<action itemid="1368" script="other/drawwell.lua"/>

data/actions/scripts/other/drawwell.lua (could merge with teleport.lua as well)
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.actionid >= 100 then
		doTeleportThing(cid, {x=toPosition.x, y=toPosition.y, z=toPosition.z-1}, FALSE)
		return TRUE
	end
	return FALSE
end

And all you have to do afterwards is set the action ID of the draw well (the part which has ID 1368) to 100.

I try use him on 0.3.5 but dont work and found on action_ids doc the way is same system just set action id 100 to DRAW_WELL = 1369

Code:
local UP_FLOORS = {1386, 3678, 5543, 8599, 10035}
local DRAW_WELL = 1369

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(item.itemid == DRAW_WELL and item.actionid ~= 100) then
		return false
	end

	if(isInArray(UP_FLOORS, item.itemid)) then
		fromPosition.z = fromPosition.z - 1
		fromPosition.y = fromPosition.y + 1

		fromPosition.stackpos = STACKPOS_GROUND
		if(item.actionid == 100 or getThingFromPos(fromPosition, false).itemid == 0) then
			fromPosition.y = fromPosition.y - 2
		end
	else
		fromPosition.z = fromPosition.z + 1
	end

	local pos, dir = getCreaturePosition(cid), SOUTH
	if(pos.x < fromPosition.x) then
		dir = EAST
	elseif(pos.x == fromPosition.x) then
		if(pos.y == fromPosition.y) then
			dir = getCreatureLookDirection(cid)
		elseif(pos.y > fromPosition.y) then
			dir = NORTH
		end
	elseif(pos.x > fromPosition.x) then
		dir = WEST
	end

	doTeleportThing(cid, fromPosition, false)
	doCreatureSetLookDirection(cid, dir)
	return true
end
 
Back
Top