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

Lua Random crashes?

CorruptEnzo

Zanarkand OT Owner.
Joined
Jul 22, 2009
Messages
49
Reaction score
0
Location
Ohio
My server has been crashing for no reason about once or twice a day..Im thinking it might be one of these errors...( I have Roxor 8.5 TFS )

[28/07/2009 09:02:07] Lua Script Error: [MoveEvents Interface]
[28/07/2009 09:02:07] data/movements/scripts/tp spawn.lua: on StepIn
[28/07/2009 09:02:07] luaDoPlayerSendTextMessage(). Player not found
[28/07/2009 08:34:17] Lua Script Error: [MoveEvents Interface]
[28/07/2009 08:34:17] data/movements/scripts/orsha tile.lua: on StepIn
[28/07/2009 07:01:34] data/movements/scripts/spawn on tile 3.lua: onStepIn
[28/07/2009 07:01:34] luaDoSummonCreature(). Can not summon monster: Ferumbras
[28/07/2009 03:40:18] Lua Script Error: [Spell Interface]
[28/07/2009 03:40:18] in a timer event called from:
[28/07/2009 03:40:18] data/spells/scripts/attack/frozen berserk.lua: onCastSpell

If any of these could be crashing my server please tell me or tell me how to fix any of these..
 
movements/scripts/tp spawn.lua
Code:
function onStepIn(cid, item, pos)

	if item.uid == 1041 and getPlayerStorageValue(cid,97250) == 1 then
	doPlayerSendTextMessage(cid, 20, 'You have finished! Use your new power carefully!!')
	local npos = {x=736,y=634,z=7}
		doTeleportThing(cid,npos)

else if item.uid == 1042 and getPlayerStorageValue(cid,97250) == 1 then
	doPlayerSendTextMessage(cid, 20, 'You have finished! Use your new power carefully!!')
	local npos1 = {x=764,y=634,z=7}
		doTeleportThing(cid,npos1)

else if item.uid == 1043 and getPlayerStorageValue(cid,97250) == 1 then
	doPlayerSendTextMessage(cid, 20, 'You have finished! Use your new power carefully!!')
	local npos2 = {x=806,y=634,z=7}
		doTeleportThing(cid,npos2)

else
 	doPlayerSendTextMessage(cid, 20, 'Only those who have finished the quest can use the power of those tiles!')
    end
end
end
end

movements/scripts/orsha tile.lua
Code:
function onStepIn(cid, item, pos)
local npos = {x=669,y=629,z=8}
	if item.uid == 2501 and getPlayerStorageValue(cid,92345) == 1 then
				orsha1pos = {x=680, y=629, z=8}
				demon2pos = {x=682, y=629, z=8}
				doSummonCreature("Orshabaal of Braveness", orsha1pos)
				doSummonCreature("Demon", demon2pos)
				setPlayerStorageValue(cid,92345,2)
				setPlayerStorageValue(cid,30001,2)
			doPlayerSendTextMessage(cid, 20, 'WHAAHAHAHAHAHAHAHAH!')
			doPlayerSendTextMessage(cid, 19, 'The Demon Oak Monk will accept you now!')
	else
			doTeleportThing(cid,npos)
			doPlayerSendTextMessage(cid, 20, 'Only the Sultan Throne will give you access here! You can also only do this one time!')

    end
end

movements/scripts/spawn on tile 3.lua
Code:
function onStepIn(cid, item, pos)



	
	if item.uid == 1030 and getPlayerStorageValue(cid,97250) == 1 then
				
				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("Ferumbras", dl1pos)
				doCreatureSay(cid, "1 Ferumbras comming!", TALKTYPE_ORANGE_1)


	else if item.uid == 1031 and getPlayerStorageValue(cid,97250) == 1 then
				
				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("Orshabaal", dl1pos)
				doCreatureSay(cid, "1 Orshabaal Coming!", TALKTYPE_ORANGE_1)

	else if item.uid == 1032 and getPlayerStorageValue(cid,97250) == 1 then

				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("Thul", dl1pos)
				doCreatureSay(cid, "1 Thul Comming!", TALKTYPE_ORANGE_1)

	else if item.uid == 1033 and getPlayerStorageValue(cid,97250) == 1 then
				
				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("Morgaroth", dl1pos)
				doCreatureSay(cid, "1 Morgaroth Comming1", TALKTYPE_ORANGE_1)

	else if item.uid == 1034 and getPlayerStorageValue(cid,97250) == 1 then
				
				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("The Demon Oak", dl1pos)
				doCreatureSay(cid, "1 Demon Oak Going To Own you now!", TALKTYPE_ORANGE_1)

	

	else doPlayerSendTextMessage(cid, 20, 'Only those who have finished the quest can use the power of those tiles!')
    end
end
end
end
end
end

Ugh??? ;S
 
Wow man please can you think of anything..it just crashed while i was reading this topic seeing if anybody responded...

whatthefuck.jpg


Ok wow is it my files or is somebody crashing my server..is that possible..? It just crashed twice within 2 minutes. Its never done that.
 
Last edited:
first off all comment this scripts in movements.lua

i mean

LUA:
<!--
    <movevent type="StepIn" uniqueid="1030" script="spawn on tile 3.lua.lua"/>
    <movevent type="StepIn" uniqueid="1031" script="spawn on tile 3.lua"/>
    <movevent type="StepIn" uniqueid="1032" script="spawn on tile 3.lua"/>
    <movevent type="StepIn" uniqueid="1033" script="spawn on tile 3.lua"/>
    <movevent type="StepIn" uniqueid="1034" script="spawn on tile 3.lua"/>

    <movevent type="StepIn" uniqueid="2501" script="orsha tile.lua"/>


    <movevent type="StepIn" uniqueid="1041" script="tp spawn.lua.lua"/>

    <movevent type="StepIn" uniqueid="1042" script="tp spawn.lua.lua"/>

    <movevent type="StepIn" uniqueid="1043" script="tp spawn.lua.lua"/>

-->

comments means do this marks between code:

LUA:
<!--

CODE

-->

if u do it then this scripts won't load. And if server will still crash, then this is no a reason why.
 
Like this
Code:
<!-- (Depot & Level) tiles -->
	<movevent event="StepIn" itemid="416" script="tiles.lua"/>
	<movevent event="StepOut" itemid="417" script="tiles.lua"/>
	<movevent event="StepIn" itemid="426" script="tiles.lua"/>
	<movevent event="StepOut" itemid="425" script="tiles.lua"/>
	<movevent event="StepIn" itemid="446" script="tiles.lua"/>
	<movevent event="StepOut" itemid="447" script="tiles.lua"/>
	<movevent event="StepOut" itemid="3217" script="tiles.lua"/>


Or this

Code:
	<!--
	<movevent event="StepIn" itemid="416" script="tiles.lua"/>
	<movevent event="StepOut" itemid="417" script="tiles.lua"/>
	<movevent event="StepIn" itemid="426" script="tiles.lua"/>
	<movevent event="StepOut" itemid="425" script="tiles.lua"/>
	<movevent event="StepIn" itemid="446" script="tiles.lua"/>
	<movevent event="StepOut" itemid="447" script="tiles.lua"/>
	<movevent event="StepOut" itemid="3217" script="tiles.lua"/>
-->

If these are both wrong then I dont understand what you are telling me to do..
 
Your confusing me..I still dont see what the problem is and how adding <!-- and --> fixes it..


Edit ::

70 views and only one person can help me? wow.
 
Last edited:
Just a little note, try to not use that much ends always and in lua it's elseif not else if

first script:
LUA:
function onStepIn(cid, item, pos)
	if item.uid == 1041 and getPlayerStorageValue(cid,97250) == 1 then
		doPlayerSendTextMessage(cid, 20, 'You have finished! Use your new power carefully!!')
		local npos = {x=736,y=634,z=7}
		doTeleportThing(cid,npos)
	elseif item.uid == 1042 and getPlayerStorageValue(cid,97250) == 1 then
		doPlayerSendTextMessage(cid, 20, 'You have finished! Use your new power carefully!!')
		local npos1 = {x=764,y=634,z=7}
		doTeleportThing(cid,npos1)
	elseif item.uid == 1043 and getPlayerStorageValue(cid,97250) == 1 then
		doPlayerSendTextMessage(cid, 20, 'You have finished! Use your new power carefully!!')
		local npos2 = {x=806,y=634,z=7}
		doTeleportThing(cid,npos2)
	else
		doPlayerSendTextMessage(cid, 20, 'Only those who have finished the quest can use the power of those tiles!')
    end
	return TRUE
end

second script:
LUA:
function onStepIn(cid, item, pos)
local npos = {x=669,y=629,z=8}
	if item.uid == 2501 and getPlayerStorageValue(cid,92345) == 1 then
		orsha1pos = {x=680, y=629, z=8}
		demon2pos = {x=682, y=629, z=8}
		doSummonCreature("Orshabaal of Braveness", orsha1pos)
		doSummonCreature("Demon", demon2pos)
		setPlayerStorageValue(cid,92345,2)
		setPlayerStorageValue(cid,30001,2)
		doPlayerSendTextMessage(cid, 20, 'WHAAHAHAHAHAHAHAHAH!')
		doPlayerSendTextMessage(cid, 19, 'The Demon Oak Monk will accept you now!')
	else
		doTeleportThing(cid,npos)
		doPlayerSendTextMessage(cid, 20, 'Only the Sultan Throne will give you access here! You can also only do this one time!')
    end
	return TRUE
end

third script:
LUA:
function onStepIn(cid, item, pos)
	if item.uid == 1030 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("Ferumbras", dl1pos)
		doCreatureSay(cid, "1 Ferumbras comming!", TALKTYPE_ORANGE_1)
	elseif item.uid == 1031 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("Orshabaal", dl1pos)
		doCreatureSay(cid, "1 Orshabaal Coming!", TALKTYPE_ORANGE_1)
	elseif item.uid == 1032 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("Thul", dl1pos)
		doCreatureSay(cid, "1 Thul Comming!", TALKTYPE_ORANGE_1)
	elseif item.uid == 1033 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("Morgaroth", dl1pos)
		doCreatureSay(cid, "1 Morgaroth Comming1", TALKTYPE_ORANGE_1)
	elseif item.uid == 1034 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("The Demon Oak", dl1pos)
		doCreatureSay(cid, "1 Demon Oak Going To Own you now!", TALKTYPE_ORANGE_1)
	else 
		doPlayerSendTextMessage(cid, 20, 'Only those who have finished the quest can use the power of those tiles!')
    end
	return TRUE
end

I didn't tested them, I've just tabbed them and erased the obvious errors.


kind regards, Evil Hero
 
Just a little note, try to not use that much ends always and in lua it's elseif not else if

first script:
LUA:
function onStepIn(cid, item, pos)
	if item.uid == 1041 and getPlayerStorageValue(cid,97250) == 1 then
		doPlayerSendTextMessage(cid, 20, 'You have finished! Use your new power carefully!!')
		local npos = {x=736,y=634,z=7}
		doTeleportThing(cid,npos)
	elseif item.uid == 1042 and getPlayerStorageValue(cid,97250) == 1 then
		doPlayerSendTextMessage(cid, 20, 'You have finished! Use your new power carefully!!')
		local npos1 = {x=764,y=634,z=7}
		doTeleportThing(cid,npos1)
	elseif item.uid == 1043 and getPlayerStorageValue(cid,97250) == 1 then
		doPlayerSendTextMessage(cid, 20, 'You have finished! Use your new power carefully!!')
		local npos2 = {x=806,y=634,z=7}
		doTeleportThing(cid,npos2)
	else
		doPlayerSendTextMessage(cid, 20, 'Only those who have finished the quest can use the power of those tiles!')
    end
	return TRUE
end

second script:
LUA:
function onStepIn(cid, item, pos)
local npos = {x=669,y=629,z=8}
	if item.uid == 2501 and getPlayerStorageValue(cid,92345) == 1 then
		orsha1pos = {x=680, y=629, z=8}
		demon2pos = {x=682, y=629, z=8}
		doSummonCreature("Orshabaal of Braveness", orsha1pos)
		doSummonCreature("Demon", demon2pos)
		setPlayerStorageValue(cid,92345,2)
		setPlayerStorageValue(cid,30001,2)
		doPlayerSendTextMessage(cid, 20, 'WHAAHAHAHAHAHAHAHAH!')
		doPlayerSendTextMessage(cid, 19, 'The Demon Oak Monk will accept you now!')
	else
		doTeleportThing(cid,npos)
		doPlayerSendTextMessage(cid, 20, 'Only the Sultan Throne will give you access here! You can also only do this one time!')
    end
	return TRUE
end

third script:
LUA:
function onStepIn(cid, item, pos)
	if item.uid == 1030 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("Ferumbras", dl1pos)
		doCreatureSay(cid, "1 Ferumbras comming!", TALKTYPE_ORANGE_1)
	elseif item.uid == 1031 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("Orshabaal", dl1pos)
		doCreatureSay(cid, "1 Orshabaal Coming!", TALKTYPE_ORANGE_1)
	elseif item.uid == 1032 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("Thul", dl1pos)
		doCreatureSay(cid, "1 Thul Comming!", TALKTYPE_ORANGE_1)
	elseif item.uid == 1033 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("Morgaroth", dl1pos)
		doCreatureSay(cid, "1 Morgaroth Comming1", TALKTYPE_ORANGE_1)
	elseif item.uid == 1034 and getPlayerStorageValue(cid,97250) == 1 then
		dl1pos = {x=811, y=625, z=7}
		doSummonCreature("The Demon Oak", dl1pos)
		doCreatureSay(cid, "1 Demon Oak Going To Own you now!", TALKTYPE_ORANGE_1)
	else 
		doPlayerSendTextMessage(cid, 20, 'Only those who have finished the quest can use the power of those tiles!')
    end
	return TRUE
end

I didn't tested them, I've just tabbed them and erased the obvious errors.


kind regards, Evil Hero


Ahh thanks..but these are the scripts that came with the server..I didnt make them...
 
The movements arent why his server is getting crashed...

on his server theres tiles that will summon a monster, thats just one error the server gives.

None of those are the reason the server crashs.


Fickle things these OT's
 
Back
Top