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

Teleport Storage Floor HELP !!!

Sh4dy

New Member
Joined
Jan 17, 2014
Messages
11
Reaction score
1
Location
Mielec
Hi everyone.
I have a serious problem with the script because when the player is standing on FLOOR the script works
but if it enters a teleport that is supposed to teleport to that mesh, it is a bug and crashes the game
I will add that actionIf is set on the 9050 map

Code:
<movevent type="StepIn" actionid="9050" event="script" value="IceCityFloor.lua" />
Lua:
--VIP Floor script By Sh4dy All Rights Reserved--

function onStepIn(cid, item, position, fromPosition)
if getPlayerStorageValue(cid, 10137) > 0 then
doCreatureSay(cid, "Ice City Player!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 30)
else
doTeleportThing(cid, fromPosition)
doCreatureSay(cid, "Sorry, but only Ice City can enter player after completing the Ice City Quest!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 2)
end
return true
end
@@ EDIT @@
It only happens when the player does not have a given storage and I am going to teleport to the square that should not
 

Attachments

Works fine over here.

I bet something else is causing overflow error

Skärmavbild 2021-03-21 kl. 12.25.10.pngSkärmavbild 2021-03-21 kl. 12.25.17.png

Lua:
function onStepIn(cid, item, position, fromPosition)
    local storage = getPlayerStorageValue(cid, 10137)
 
    if not storage or storage <= 0 then
        doTeleportThing(cid, fromPosition)
        doCreatureSay(cid, "You need to complete the Ice City Quest first.", TALKTYPE_ORANGE_1)
        doSendMagicEffect(getCreaturePosition(cid), 2)
        return false
    end

    doCreatureSay(cid, "Ice City Player!", TALKTYPE_ORANGE_1)
    doSendMagicEffect(getCreaturePosition(cid), 30)
    return true
end
 
Unfortunately, I still have the same error: /

Unfortunately, you did not understand me, the teleport is supposed to teleport to the tile that has the same 9050 storage that allows the player to enter the ice island.
The grille is to check the storage and the teleport, if it's okay, the teleport is to teleport to this grate.
 

Attachments

So if I understood you now;

The teleport doesn't have actionid 9050 but the destination position has actionid 9050 ?
If that is the case then that is your problem; because if you dont have the storage id and enter the teleport,
the teleport will send you to the destination which has 9050 actionid, and you will be sent back to the teleport again, and the teleport tries to send you back to the same destination, this causes an infinite loop and server crashes.

Edit; The picture you uploaded shows that the TP has actionid 9050 ?! 😖
What are you trying to say? What is grille?

... trying one more time;
The teleport has 9050 and destination also has 9050 as actionid?
 
@@ EDIT@@
I think that the best solution to this error will be to create a script that will check storage 10137, if the player has it, it will teleport it to the selected place, if not, it will move it back down. Are you able to help me?


The teleport has the same actionID as the one that works properly, because entering it teleports us to the grid backwards, but entering the teleport without any rights (storage), it teleports us and crashes the debug


The grille works properly when we have storage (10137), we go inside, when we do not have to retract us. But the teleport having the same ActionID as grid 9050, when the player has storage (10137), it teleports him, and when he is not, it also teleports him and crashes an error
 

Attachments

Last edited by a moderator:
Back
Top