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

MoveEvent [TFS 1.1] "Catacombs" Teleporter like Diablo 3 Teleport - Great for RPG servers

Thanks for this system! this looks awesome! I'm trying to run it on Tfs 1.2 and getting this error

Lua Script Error: [MoveEvents Interface]
data/movements/scripts/catacombs/teleporter.lua:eek:nStepIn
data/movements/scripts/catacombs/teleporter.lua:6: attempt to index local 'player' (a nil value)
stack traceback:
[C]: in function '__index'
data/movements/scripts/catacombs/teleporter.lua:6: in function <data/movements/scripts/catacombs/teleporter.lua:3>

Can anyone help me get this running on 1.2? would be awesome of you!

BUMP I'm not asking for someone to re write the script for me. I'm trying to learn but I cant seem to figure out what I'm doing wrong. I'm just asking if someone can give me a tip or an idea of what to do to make it work on TFS 1.2 I've searched and searched and tried to figure it out but cant get it working. I can get the error to go away but the modalwindow doesn't pop up. are the functions on 1.2 really that different from 1.1?
 
Last edited by a moderator:
converstion to 1.2 for dummies:
There is a better way to do it. It's just a workaround for people who don't know scripting.

creaturescripts\scripts file catacomb_window.lua
replace
Code:
function onModalWindow(cid, modalWindowId, buttonId, choiceId)
to
Code:
function onModalWindow(player, modalWindowId, buttonId, choiceId)
local cid = player:getId()

In folder data\movements\scripts\catacombs\ file teleporter.lua
replace
Code:
function onStepIn(cid, item, position, fromPosition)
to
Code:
function onStepIn(player, item, position, fromPosition)
local cid = player:getId()
 
I can use it ... on a pokemon server ? im using Kpdo datapack

idk what TFS it is ... how may i know it ?

i like it a lot wanna put it on my server
 
Can anyone help me with this? (TFS 1.2)
I can unlock every teleport, Ive got modalwindow but it doesnt teleport me.

I also changed those lines:
converstion to 1.2 for dummies:
There is a better way to do it. It's just a workaround for people who don't know scripting.

creaturescripts\scripts file catacomb_window.lua
replace
Code:
function onModalWindow(cid, modalWindowId, buttonId, choiceId)
to
Code:
function onModalWindow(player, modalWindowId, buttonId, choiceId)
local cid = player:getId()

In folder data\movements\scripts\catacombs\ file teleporter.lua
replace
Code:
function onStepIn(cid, item, position, fromPosition)
to
Code:
function onStepIn(player, item, position, fromPosition)
local cid = player:getId()

catacomb_window.lua now
Code:
function onModalWindow(player, modalWindowId, buttonId, choiceId)

	local cid = player:getId()
    local pos = player:getPosition()

    if modalWindowId ~= 1900 then
        return false
    end
  
    if buttonId == 1 then -- Teleport
  
    if getCreatureStorage(cid, places[choiceId].placeStorage) == 1 then
        pos:sendMagicEffect(11)
        player:teleportTo(places[choiceId].placepos)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have succesfully teleported to ' .. places[choiceId].placeName .. '.')
        doSendMagicEffect(places[choiceId].placepos, 11)
    else
        sendCatacombWindow(cid)
    end
  
    elseif buttonId == 255 then
        doPlayerPopupFYI(cid,"Please use a button.")
        sendCatacombWindow(cid)
    end
  
return true
end

teleporter.lua now
Code:
local choose = {}

function onStepIn(player, item, position, fromPosition)

	local cid = player:getId()
    local pos = player:getPosition()

    if not player then
        return true
    end

    if getPlayerStorageValue(cid, 6661) == 1 then
    return sendCatacombWindow(cid)
    end
  
    return true
end
 
It doenst opens the modal window to teleport, It just says that i Unlocked the Teleporter
 
Hey, has anyone been able to solve this? i have the original script + zbizu corrections for tfs 1.2, however i have tfs 1.3, i have no errors in console, but when i step in the portals nothing happens, not even modal window, i tried changing the id of the modalwindow but that didnt work either, any ideas? D:
 
Back
Top