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

[10.77][TFS 1.2] ORTS, a real map project

is the melting horn...
local function revertIce(position, itemId, transformId)
local item = Tile(position):getItemById(itemId)
if item then
item:transform(transformId)
end
end
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local rand = math.random(1, 100)
if target.itemid == 22726 and player:getStorageValue(22724) < 1 then
if((rand >= 1) and (rand < 50)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The ice cracked and the frozen creature with it - be more careful next time!')
item:remove(1)
target:transform(22729)
addEvent(revertIce, 40000, toPosition, 22729, 22726)
elseif((rand >= 50) and (rand < 100)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You managed to melt about half of the ice blook. Quickly now, it\'s ice cold here and the ice block could freeze over again.')
target:transform(22727)
end
end
if target.itemid == 22727 and player:getStorageValue(22724) < 1 then
if((rand >= 1) and (rand < 50)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The ice cracked and the frozen creature with it - be more careful next time!')
item:remove(1)
target:transform(22729)
addEvent(revertIce, 40000, toPosition, 22729, 22726)
elseif((rand >= 50) and (rand < 100)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You managed to melt almost the whole block, only the feet of the creature are still stuck in the ice. Finish the job!')
target:transform(22728)
end
end
if target.itemid == 22728 and player:getStorageValue(22724) < 1 then
if((rand >= 1) and (rand < 50)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The ice cracked and the frozen creature with it - be more careful next time!')
item:remove(1)
target:transform(22729)
addEvent(revertIce, 40000, toPosition, 22729, 22726)
elseif((rand >= 50) and (rand < 100)) then
item:remove(1)
target:transform(22729)
player:addMount(38)
player:setStorageValue(22724, 1)
addEvent(revertIce, 40000, toPosition, 22729, 22726)
return player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The freed ursagrodon look at you with glowing, obedient eyes.')
end
end
if player:getStorageValue(22724) >= 1 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You already have the obedience of ursagrodon.')
end
return true
end
here, have a bug when used the first time ... when he will enter in the second if "
elseif((rand >= 50) and (rand < 100)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You managed to melt about half of the ice blook. Quickly now, it\'s ice cold here and the ice block could freeze over again.')
target:transform(22727)
end"
he bug and enter in all second ifs

this part "
here, have a bug when used the first time ... when he will enter in the second if "
elseif((rand >= 50) and (rand < 100)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You managed to melt about half of the ice blook. Quickly now, it\'s ice cold here and the ice block could freeze over again.')
target:transform(22727)
end"
he bug and enter in all second ifs

"
is my coment, not is part of the script ^^
 
Last edited by a moderator:
this part "
here, have a bug when used the first time ... when he will enter in the second if "
elseif((rand >= 50) and (rand < 100)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You managed to melt about half of the ice blook. Quickly now, it\'s ice cold here and the ice block could freeze over again.')
target:transform(22727)
end"
he bug and enter in all second ifs

"
is my coment, not is part of the script ^^
Code:
     elseif(rand >= 50) then

Either use [.code]code[/.code](without dots) or upload the code to a page like paste.ots.me.
Not fun to read a code when it isen't tabbed etc etc.
There is no need to check if the integer is below 100 since the max value you requested from the math.random function is 100.
You can also just use math.random(100).

But I hardly think that is the issue, what is the error message(can't find it on page 96 either).

well, in all tutorials that I've see they say to remove all coments...
Some of the older 0.x series did not support it for some reason. There is no problems using it with 1.x series.
 
Currently using:
https://github.com/orts/server the x64-Release.exe and/or x64-Debug.exe nightly build , Map:
https://github.com/orts/world/
dlls from: http://static.otland.net/dl/tfs-sdk-2.0.zip
sql files from: https://github.com/otland/forgottenserver

First I got this error: FIXED by deleting the extra ")" on row 29 and now that one works.

Now this happends:
yF8YYDn.png

Closed down google chrome to release more memory and now It crashes after map is loaded sometimes with the same Errors, sometimes without any error.

I'm able to start it using x64-Debug.exe, running on 7.8GB of my 8GB ram. Still crashes after awhile though.

EDIT: Today I was able to start with the x64-Release.exe only running on 2.8GB RAM. Only error I got was NPC The Gate Keeper missing, anyone got it? Still crashes after awhile though.


And I get this error when I try to connect to localhost using https://github.com/Znote/ZnoteAAC
UtbT2Hh.png


I get it to work using
https://github.com/gesior/Gesior2012/tree/TFS-1.0
But had to add:

-- Storage
passwordType = "sha1"

To my config.lua.
 
Last edited:
Okey so I compiled a new one using the https://otland.net/threads/compilin...-32-bits-pics-and-lots-of-explanation.204532/ and got it to work. Still crashes after about 6 minutes. Running it using Compatibility mode with Windwos Server 2008 and it lasts much longer(crashed after 26 minutes) and uses HELLA' lot of memory. Which also the nightly realese of debug version does but using this the server isn't crashing eiter.

How come the server crashes only, when using the self-compiled realease version running on normal mode?

And, Im trying to use Znote AAC with Wamp, but the only thing i get when I'm try to get the mysql connection error is 500 Internal Server Error. Any idés why?
 
Last edited:
bro, I think that the windows have a limit to open a big map ... can be it ...
my map never run in my pc 4 GB :/ 120 mb of map not run, I think that linux not have this limit, I recomend use linux
if you want forgot some games haha
 
I heard that it depends on compilation. 32 bit might have problem with bigger maps.
 
Hi

Would any1 be able to compile this server on Ubuntu or Debian server? I can give you full access to the server (its empty so nothing to break, can be restored to snapshot easily).

Thanks
 
Guys, I'm using this server with an custom 10.76 version, it's running smoothly on Debian 8.

Altought i'm missing the npc gate keeper npc.
 
Hello I am having similar crash issues as Tickit was. Basically server crashes randomly after a few mins. x64 OS and using x64 compiled tfs1.1 I thought was memory issues but upgraded ram and still happens. Any ideas?
 
Back
Top