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

Need script to create ladder.

Kubuxxx

Title
Joined
May 25, 2009
Messages
91
Reaction score
2
Hello.
Somebody have script(or can make) to create ladder on XYZ2, when player stay on XYZ, and when player go out from XYZ2, ladder will be removed ?

Sorry for BAD English. :)

I need this script to ladder on poi quest, so.. please. :)
 
Last edited:
After i say that nobody helped you, I decided to make the script for you.
Here it is...
Lua:
ladder_pos = {
	x =xxx,
	y =yyy,
	z =z
}

	local ladder = getThingfromPos(ladder_pos)

function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) == TRUE then
		doCreateItem(1386,1,ladder_pos)
	end
	retun TRUE
end

function onStepOut(cid, item, position, fromPosition)
	if isPlayer(cid) == TRUE then
		doRemoveItem(ladder.uid)
	end
	return TRUE
end
NOT Tested
-> Post Errors and I'll fix it.

Regards,
Shawak
 
Last edited:
Code:
function onStepIn(cid, item, position, fromPosition)
  if isPlayer(cid) then
    doCreateItem(1386,1,{x=100,y=100,z=7})
  end
  return true
end
 
function onStepOut(cid, item, position, fromPosition)
  if isPlayer(cid) then
    doRemoveItem(getThingPos({x=100,y=100,z=7}))
  end
  return TRUE
end

this maybe works, dunno ;t
 
Code:
local ladder_pos = {
	x = xxx,
	y = yyy,
	z = z
}

function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) then
		doCreateItem(1386, 1, ladder_pos)
	end
end
 
function onStepOut(cid, item, position, fromPosition)
	if isPlayer(cid) == TRUE then
		doRemoveItem(getTileItemById(ladder_pos, 1386).uid)
	end
end
 
Code:
local ladder_pos = {
    x = xxx,
    y = yyy,
    z = z
}
function onStepIn(cid, item, position, fromPosition)
if (global:IsPlayer) then
 Map:createItem(1386, 1, ladder_pos)
end

end

function onStepOut(cid, item, position, fromPosition)
    if isPlayer(cid) == TRUE then
        Map:deleteThingFromPos(ladder_pos, 1386, 1)
    end
end
 
This works (tested), Rep++

Lua:
local config = {
       uniqi = 10225 --unique ID of a tile
	   }
function onStepIn(cid, item, frompos, item2, topos) 
	wall1 = {x=461, y=1374, z=10, stackpos=1} --ladder position
	getwall1 = getThingfromPos(wall1)

	if item.uid == config.uniqi then
		doTransformItem(item.uid, item.itemid - 1)
		doCreateItem(1386,1,wall1)
end
end

function onStepOut(cid, item, frompos, item2, topos)
	wall1 = {x=461, y=1374, z=10, stackpos=1} --ladder position
	getwall1 = getThingfromPos(wall1)

	if item.uid == config.uniqi then
		doTransformItem(item.uid, item.itemid + 1)
		doRemoveItem(getwall1.uid,1)

	end

	return 1
end
 
Back
Top