Saints Anathema
Old School Doleran
Heres a issue ive come across that i havent been able to even learn more about on here.
my original script was
that was a working script for tfs 0.2.4
since i upgraded to tfs 0.4 REV 4389 all my ladders dont work ladder id (1386)
so my friend chan suggested using
and putting
After i tried that,
Ladders say Cannot use this item, and shows no errors in console
dont know if this has anything to do with it, but i replaced the items.otb to the newest version from my REV, and for whatever reason dont konw if this has anything to do with it, but my /newtype command only shows me monsters up to 352-370? the rest are ground tiles, but then my mounted monsters show up after the ground tiles.
Any suggestions?
REP+ to all positive posts.
my original script was
Code:
local upFloorIds = {1386, 3678, 5543}
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
fromPosition.z = fromPosition.z + 1
end
doTeleportThing(cid, fromPosition, FALSE)
return TRUE
end
that was a working script for tfs 0.2.4
since i upgraded to tfs 0.4 REV 4389 all my ladders dont work ladder id (1386)
so my friend chan suggested using
Code:
local UP_FLOORS = {1386, 3678, 5543, 8599, 10035}
local FIELDS = {1497, 1499, 11095, 11096}
local DRAW_WELL = 1369
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == DRAW_WELL and item.actionid ~= 100) then
return false
end
local check = false
fromPosition.stackpos = STACKPOS_GROUND
if(isInArray(UP_FLOORS, item.itemid)) then
fromPosition.z = fromPosition.z - 1
fromPosition.y = fromPosition.y + 1
if(doTileQueryAdd(cid, fromPosition, 38, false) ~= RETURNVALUE_NOERROR) then
local field = getTileItemByType(fromPosition, ITEM_TYPE_MAGICFIELD)
if(field.uid == 0 or not isInArray(FIELDS, field.itemid)) then
fromPosition.y = fromPosition.y - 2
else
check = true
end
end
else
fromPosition.z = fromPosition.z + 1
end
if(not check and doTileQueryAdd(cid, fromPosition, 38, false) ~= RETURNVALUE_NOERROR) then
local field = getTileItemByType(fromPosition, ITEM_TYPE_MAGICFIELD)
if(field.uid == 0 or not isInArray(FIELDS, field.itemid)) then
return false
end
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
and putting
Code:
<!-- Teleport (stairs, ladders) -->
<action itemid="430" event="script" value="other/teleport.lua"/>
<action itemid="1369" event="script" value="other/teleport.lua"/>
<action itemid="1386" event="script" value="other/teleport.lua"/>
<action itemid="3678" event="script" value="other/teleport.lua"/>
<action itemid="5543" event="script" value="other/teleport.lua"/>
<action itemid="8580" event="script" value="other/teleport.lua"/>
<action itemid="8599" event="script" value="other/teleport.lua"/>
<action itemid="10035" event="script" value="other/teleport.lua"/>
After i tried that,
Ladders say Cannot use this item, and shows no errors in console
dont know if this has anything to do with it, but i replaced the items.otb to the newest version from my REV, and for whatever reason dont konw if this has anything to do with it, but my /newtype command only shows me monsters up to 352-370? the rest are ground tiles, but then my mounted monsters show up after the ground tiles.
Any suggestions?
REP+ to all positive posts.