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

Solved Movements tps (with Aid=X) suddenly get players to x = 0, y = 0, z = 0. +Pictures. SNOW problem!

bury

Active Member
Joined
Jul 27, 2008
Messages
421
Solutions
7
Reaction score
25
I'm using TFS 0.4

21/09/2017 6.19 AM:

IS NOT a VIP PROBLEM. A player reported me that another tp with actionid = X got him to the same place SO it was a GENERAL MALFUNCTION in the movements due to the snow. I read the fail of the snow in my console but I couldn't copy it (console updated info and error dissapeared). But, basically all movements had error due to snow.lua.

---------------------------------------------------------------------

Suddenly if you use the tp to vip island you gets in x = 0, y = 0, z = 0 in a snow tile. I got like a console error of a snow.lua movement. Maybe is because of that.

Picture:

problema4.jpg


Also in some places I get like strange snow tiles. Picture:


problema5.jpg


Do you see that snow tiles? Weird. Script:

snow.lua

Lua:
function onStepOut(cid, item, position, fromPosition)
if (isPlayerGhost(cid)) == false then
if(item.itemid == 670) then
doDecayItem(doCreateItem(6594, fromPosition))
else
doDecayItem(doCreateItem(item.itemid + 15, fromPosition))
end
end
return true
end

Tried to reload movements but didnt work.

Thanks.
 
Last edited:
Solution
Fine, that's easy to solve.

Edit the code this way:
Lua:
TILE_SNOW = 670
TILE_FOOTPRINT_I = 6594
TILE_FOOTPRINT_II = 6598

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if(isPlayerGhost(cid)) then
        return true
    end

    if(item.itemid == TILE_SNOW) then
        doTransformItem(item.uid, TILE_FOOTPRINT_I)
        doDecayItem(item.uid)
    elseif(item.itemid == TILE_FOOTPRINT_I) then
        doTransformItem(item.uid, TILE_FOOTPRINT_II)
        doDecayItem(item.uid)
    else
        doTransformItem(item.uid, item.itemid + 15)
        doDecayItem(item.uid)
    end

    return true
end

And the movements.xml tags like this:
Code:
<!-- Snow footprint tiles -->
<movevent type="StepIn"...
Try to:
Place the teleport in a tile which is not affected by snow.lua and then use it.
Restart the server.

About those "weird snow tiles" you're talking about, I guess you mean those tiles without borders. It seems that you have to add them with your map editor.
 
Try to:
Place the teleport in a tile which is not affected by snow.lua and then use it.
Restart the server.

About those "weird snow tiles" you're talking about, I guess you mean those tiles without borders. It seems that you have to add them with your map editor.

The teleport is in the depot and in the boat of Thais, so is not affected by snow :S Something wierd happened and I forgot to mention. One tile of snow appeared in the depot just the sqm front of the vip tp. I removed it manually with the GOD, doing /i the tile itemid

Also, its wierd because that tiles arent showed in map editor:

screenshot_2017-09-21-0-5-3.png


The snow without borders is itemid 670

MORE INFO:

When you get into the vip bugged tp, sometimes the client stops working. It keeps thinking and thinking like stopped answering.

MORE INFO2:

I restarted the server and every snow/ice tiles look correct, so something in the server causes that strange tiles without borders so ugly. But how could this affect to the vip script? :eek:
 
Last edited:
Well, try disabling the snow.lua so you can confirm the problem is in that script.

Can you post the piece of code of your movements.xml where are the items that use snow.lua and the piece of code of your items.xml relative to the snow and ice floor items shown in the picture? I think ice floor item id has been set to use snow.lua, so whenever a player walk over them, it decays into the snow item id because, for some reason only god knows, your items.xml has been edited to do that.
 
Last edited:
The teleport is in the depot and in the boat of Thais, so is not affected by snow :S Something wierd happened and I forgot to mention. One tile of snow appeared in the depot just the sqm front of the vip tp. I removed it manually with the GOD, doing /i the tile itemid

Also, its wierd because that tiles arent showed in map editor:

screenshot_2017-09-21-0-5-3.png


The snow without borders is itemid 670

MORE INFO:

When you get into the vip bugged tp, sometimes the client stops working. It keeps thinking and thinking like stopped answering.

MORE INFO2:

I restarted the server and every snow/ice tiles look correct, so something in the server causes that strange tiles without borders so ugly. But how could this affect to the vip script? :eek:

The map issue: check if the itemid are the same, if they are then update items.otb, if they aren't the same clear the cache in your database.
If you can restart it and "fix it" then it's 99% a cache issue, when you change a position always delete the cache and send all the players to the temple position.

About the script: you point out an action script(tp), but you didn't upload it?
If you can please try to get the error log, even if it takes a couple of days it can help.
 
The map issue: check if the itemid are the same, if they are then update items.otb, if they aren't the same clear the cache in your database.
If you can restart it and "fix it" then it's 99% a cache issue, when you change a position always delete the cache and send all the players to the temple position.

About the script: you point out an action script(tp), but you didn't upload it?
If you can please try to get the error log, even if it takes a couple of days it can help.

Well, try disabling the snow.lua so you can confirm the problem is in that script.

Can you post the piece of code of your movements.xml where are the items that use snow.lua and the piece of code of your items.xml relative to the snow and ice floor items shown in the picture? I think ice floor item id has been set to use snow.lua, so whenever a player walk over them, it decays into the snow item id because, for some reason only god knows, your items.xml has been edited to do that.

I've news!

First of all I was thinking about the vip tp Issue. What happened finally is easy to understand. Action_ID was bugged in the magic force fields and it gets you to 0,0,0 (that is set on the magic force field properties). Although it should teleports you anywhere (you should be able to walk above it), it gets you there. I changed the teleport for a stone tile, and changed the action_id = 102 for 2012 (I think this is not important but) and works 100% now, even with the error of the snow again. This time I could write it down.

Code:
[Error - MoveEvents Interface] data/movements/scripts/snow.lua:onStepOut Description: (luaDoDecayItem) Item not found

The proof is that a player reported me that the arena of Svargrond doesnt work. Why? Because its a magic force field with an action_id with x = 0, y = 0, z = 0 property. The problem was the same, it tp you to 0,0,0 in a snow sqm lol while the tiles in depot etc which were bugged before, are working 100% now. What causes the snow error? A guy that is botting in frost dragon, and yea, now is all full of ugly snow SQM. Btw, this time I went into the bugged magic force field with the GOD and server crashed. First time my server crashes...

@WibbenZ yeah I uploaded it but edited the OP (to give a new explanation) because I realized that the problem was not in that script, it was on the snow that for some reason bugs ONLY the magic force field with movements>Action_ids. You mean they are the same of the mapeditor and ingame, no? Yes, look, as I restarted the server some minutes ago, nobody has hunted in the picture I post of frost dragon yet:

problema6.jpg


But if I go where the guy is botting in Frost Dragon (is a different respawn) is all full of snow sqm in the ice lol. Btw in data/logs I dont have the errors in any file. Do you know why? :/ I have an error.log but its empty.


@Memerto


Code:
<movevent type="StepOut" itemid="670" event="script" value="snow.lua"/>
<movevent type="StepOut" fromid="6580" toid="6593" event="script" value="snow.lua"/>

I used a normal player and walk for some minutes on a place full of ice and snow and worked properly without errors... so idk I think is when you walk like lot of times or something like that, it changes.

All the snow Ive found:

Code:
<item id="670" name="snow" />
<item fromid="4737" toid="4748" name="snow" />
<item fromid="6580" toid="6593" name="snow" />
    <item id="6594" name="snow">
        <attribute key="description" value="Someone must have walked here recently." />
        <attribute key="decayTo" value="670" />
        <attribute key="duration" value="10" />
    </item>
    <item id="6595" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6580" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6596" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6581" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6597" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6582" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6598" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6583" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6599" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6584" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6600" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6585" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6601" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6586" />
    <attribute key="duration" value="10" />
    </item>
<item id="6602" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6587" />
    <attribute key="duration" value="10" />
</item>
<item id="6603" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6588" />
    <attribute key="duration" value="10" />
</item>
<item id="6604" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6589" />
    <attribute key="duration" value="10" />
</item>
<item id="6605" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6590" />
    <attribute key="duration" value="10" />
    </item>
<item id="6606" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6591" />
    <attribute key="duration" value="10" />
</item>
<item id="6607" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6592" />
    <attribute key="duration" value="10" />
</item>
<item id="6608" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6593" />
    <attribute key="duration" value="10" />
</item>
    <item id="6609" name="snow drift" />
    <item fromid="6610" toid="6626" name="snow" />
<item fromid="6756" toid="6760" name="snow" />
<item fromid="6822" toid="6838" name="snow" />
<item fromid="6939" toid="6950" name="snow" />

And the ice:

Code:
<item fromid="6683" toid="6686" name="ice" />
<item fromid="6695" toid="6718" name="ice" />
<item fromid="6869" toid="6881" name="ice" />
<item fromid="6925" toid="6937" name="ice" />
<item fromid="6951" toid="6952" name="ice" />
<item id="7107" name="ice" />
<item fromid="7110" toid="7120" name="ice" />
<item fromid="7145" toid="7157" name="ice" />
<item id="8570" name="ice" />
<item id="671" name="ice" />

Thanks you guys!
 
I've news!

First of all I was thinking about the vip tp Issue. What happened finally is easy to understand. Action_ID was bugged in the magic force fields and it gets you to 0,0,0 (that is set on the magic force field properties). Although it should teleports you anywhere (you should be able to walk above it), it gets you there. I changed the teleport for a stone tile, and changed the action_id = 102 for 2012 (I think this is not important but) and works 100% now, even with the error of the snow again. This time I could write it down.

Code:
[Error - MoveEvents Interface] data/movements/scripts/snow.lua:onStepOut Description: (luaDoDecayItem) Item not found

The proof is that a player reported me that the arena of Svargrond doesnt work. Why? Because its a magic force field with an action_id with x = 0, y = 0, z = 0 property. The problem was the same, it tp you to 0,0,0 in a snow sqm lol while the tiles in depot etc which were bugged before, are working 100% now. What causes the snow error? A guy that is botting in frost dragon, and yea, now is all full of ugly snow SQM. Btw, this time I went into the bugged magic force field with the GOD and server crashed. First time my server crashes...

@WibbenZ yeah I uploaded it but edited the OP (to give a new explanation) because I realized that the problem was not in that script, it was on the snow that for some reason bugs ONLY the magic force field with movements>Action_ids. You mean they are the same of the mapeditor and ingame, no? Yes, look, as I restarted the server some minutes ago, nobody has hunted in the picture I post of frost dragon yet:

problema6.jpg


But if I go where the guy is botting in Frost Dragon (is a different respawn) is all full of snow sqm in the ice lol. Btw in data/logs I dont have the errors in any file. Do you know why? :/ I have an error.log but its empty.


@Memerto


Code:
<movevent type="StepOut" itemid="670" event="script" value="snow.lua"/>
<movevent type="StepOut" fromid="6580" toid="6593" event="script" value="snow.lua"/>

I used a normal player and walk for some minutes on a place full of ice and snow and worked properly without errors... so idk I think is when you walk like lot of times or something like that, it changes.

All the snow Ive found:

Code:
<item id="670" name="snow" />
<item fromid="4737" toid="4748" name="snow" />
<item fromid="6580" toid="6593" name="snow" />
    <item id="6594" name="snow">
        <attribute key="description" value="Someone must have walked here recently." />
        <attribute key="decayTo" value="670" />
        <attribute key="duration" value="10" />
    </item>
    <item id="6595" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6580" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6596" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6581" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6597" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6582" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6598" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6583" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6599" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6584" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6600" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6585" />
    <attribute key="duration" value="10" />
    </item>
    <item id="6601" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6586" />
    <attribute key="duration" value="10" />
    </item>
<item id="6602" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6587" />
    <attribute key="duration" value="10" />
</item>
<item id="6603" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6588" />
    <attribute key="duration" value="10" />
</item>
<item id="6604" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6589" />
    <attribute key="duration" value="10" />
</item>
<item id="6605" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6590" />
    <attribute key="duration" value="10" />
    </item>
<item id="6606" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6591" />
    <attribute key="duration" value="10" />
</item>
<item id="6607" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6592" />
    <attribute key="duration" value="10" />
</item>
<item id="6608" name="snow">
    <attribute key="description" value="Someone must have walked here recently." />
    <attribute key="decayTo" value="6593" />
    <attribute key="duration" value="10" />
</item>
    <item id="6609" name="snow drift" />
    <item fromid="6610" toid="6626" name="snow" />
<item fromid="6756" toid="6760" name="snow" />
<item fromid="6822" toid="6838" name="snow" />
<item fromid="6939" toid="6950" name="snow" />

And the ice:

Code:
<item fromid="6683" toid="6686" name="ice" />
<item fromid="6695" toid="6718" name="ice" />
<item fromid="6869" toid="6881" name="ice" />
<item fromid="6925" toid="6937" name="ice" />
<item fromid="6951" toid="6952" name="ice" />
<item id="7107" name="ice" />
<item fromid="7110" toid="7120" name="ice" />
<item fromid="7145" toid="7157" name="ice" />
<item id="8570" name="ice" />
<item id="671" name="ice" />

Thanks you guys!

So if someone walks over that tile it bugs? Not sure what you mean tbh
But if thats it you got a problem in items.xml, look at decayTo
 
So if someone walks over that tile it bugs? Not sure what you mean tbh
But if thats it you got a problem in items.xml, look at decayTo

Tried to explain it the best I could :( xD

Is not when someone walks over the tile, it's like when someone walks on the snow for much time. Suddenly the bug appears, but it appears only once. Meanwhile, the ice is transforming to that ugly snow sqms little by little. For some reason the error makes the movements a_ids fail, and the magic force fields with action_id= x brings you to x = 0, y = 0, z = 0 as it's set on its properties.

Yeah, checked it but dont know exactly what id should I change. Or if the problem is the script.
 
It's apparentely creating tiles on new position while stepping out of a snow ground.
When you walked out of a snow into the ice its creating new snow tiles over and over again.
The same if you walk into teleport.

Script looks kinda weird. It sould transform an item instead making a new one.
Why are you not using a default one?

forgottenserver036pl1/snow.lua at master · peonso/forgottenserver036pl1 · GitHub

Check items.xml aswell, to be clear it's all good.
 
It's apparentely creating tiles on new position while stepping out of a snow ground.
When you walked out of a snow into the ice its creating new snow tiles over and over again.
The same if you walk into teleport.

Script looks kinda weird. It sould transform an item instead making a new one.
Why are you not using a default one?

forgottenserver036pl1/snow.lua at master · peonso/forgottenserver036pl1 · GitHub

Check items.xml aswell, to be clear it's all good.

This also works in tfs 0.4?
 
Uhmm...such a strange bug. It would be helpful if you find what's the behaviour of the bug. I mean, if the bug happens when you stay there for some time, if it does when you step out of the snow...etc.

We can try to change your snow.lua to solve this. The one 2Rec said is 0.3.6pl1 version, let's try with this. Make a back up of your current snow.lua and replace the code in snow.lua with this:
Lua:
TILE_SNOW = 670
TILE_FOOTPRINT_I = 6594
TILE_FOOTPRINT_II = 6598

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if(isPlayerGhost(cid)) then
        return true
    end

    if(item.itemid == TILE_SNOW) then
        doTransformItem(item.uid, TILE_FOOTPRINT_I)
        doDecayItem(item.uid)
    elseif(item.itemid == TILE_FOOTPRINT_I) then
        doTransformItem(item.uid, TILE_FOOTPRINT_II)
        doDecayItem(item.uid)
    else
        doTransformItem(item.uid, TILE_FOOTPRINT_I)
    end

    return true
end

And paste this into your movements.xml
XML:
<!-- Snow footprint tiles -->
<movevent type="StepIn" itemid="670" event="script" value="snow.lua"/>
<movevent type="StepIn" itemid="6594" event="script" value="snow.lua"/>

Finally, put the tags on movements.xml that were related to snow.lua before the changes between <!-- and -->, so they become a comment. It should be something like this:

XML:
<!-- <movevent type="StepOut" itemid="670" event="script" value="snow.lua"/>
<movevent type="StepOut" fromid="6580" toid="6593" event="script" value="snow.lua"/> -->

Don't forget to not to delete any file or single line of code. Make backups of every file before any edit and change the code to make it become a comment.

Post what happens with the bug after the changes.
 
Last edited:
Uhmm...such a strange bug. It would be helpful if you find what's the behaviour of the bug. I mean, if the bug happens when you stay there for some time, if it does when you step out of the snow...etc.

We can try to change your snow.lua to solve this. The one 2Rec said is 0.3.6pl1 version, let's try with this. Make a back up of your current snow.lua and replace the code in snow.lua with this:
Lua:
TILE_SNOW = 670
TILE_FOOTPRINT_I = 6594
TILE_FOOTPRINT_II = 6598

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if(isPlayerGhost(cid)) then
        return true
    end

    if(item.itemid == TILE_SNOW) then
        doTransformItem(item.uid, TILE_FOOTPRINT_I)
        doDecayItem(item.uid)
    elseif(item.itemid == TILE_FOOTPRINT_I) then
        doTransformItem(item.uid, TILE_FOOTPRINT_II)
        doDecayItem(item.uid)
    else
        doTransformItem(item.uid, TILE_FOOTPRINT_I)
    end

    return true
end

And paste this into your movements.xml
XML:
<!-- Snow footprint tiles -->
<movevent type="StepIn" itemid="670" event="script" value="snow.lua"/>
<movevent type="StepIn" itemid="6594" event="script" value="snow.lua"/>

Finally, put the tags on movements.xml that were related to snow.lua before the changes between <!-- and -->, so they become a comment. It should be something like this:

XML:
<!-- <movevent type="StepOut" itemid="670" event="script" value="snow.lua"/>
<movevent type="StepOut" fromid="6580" toid="6593" event="script" value="snow.lua"/> -->

Don't forget to not to delete any file or single line of code. Make backups of every file before any edit and change the code to make it become a comment.

Post what happens with the bug after the changes.

Thanks! I always make backups.

It's curious, I had that script as snow_old.lua so I remember something went wrong with that script and changed for the one I pasted here.

I've just tested it and it only makes footprint in some parts of the snow lol. In a snow way for example, it makes only a footprint in X tile, always the same. So the others have different ids I guess? Im trying it on svargrond.
 
Fine, that's easy to solve.

Edit the code this way:
Lua:
TILE_SNOW = 670
TILE_FOOTPRINT_I = 6594
TILE_FOOTPRINT_II = 6598

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if(isPlayerGhost(cid)) then
        return true
    end

    if(item.itemid == TILE_SNOW) then
        doTransformItem(item.uid, TILE_FOOTPRINT_I)
        doDecayItem(item.uid)
    elseif(item.itemid == TILE_FOOTPRINT_I) then
        doTransformItem(item.uid, TILE_FOOTPRINT_II)
        doDecayItem(item.uid)
    else
        doTransformItem(item.uid, item.itemid + 15)
        doDecayItem(item.uid)
    end

    return true
end

And the movements.xml tags like this:
Code:
<!-- Snow footprint tiles -->
<movevent type="StepIn" itemid="670" event="script" value="snow.lua"/>
<movevent type="StepIn" fromid="6580" toid="6594" event="script" value="snow.lua"/>

Let's try with this changes.

EDIT: Hi again @bury ! If your problem has been solved, please mark it as Solved. If not, tell us more about the problem.
 
Last edited:
Solution
@Memerto Thanks man, forgot to mark it as solved. The last fix worked 100% (all footprints are shown) and the most important, the strange thing of the first image doesn't happen anymore.

TY REALLY :D
 
Back
Top