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

[BUG] Svargrond Arena bugged & Help with LUA & Gesior Bugged

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hello, I want help with 2 scripts that one isn't working, and another is to create another part..

The Svargrond Arena isn't working, I kill the monsters, but the player doesn't go to next part, and keep saying "First kill the monsters".

LUA:
function onStepIn(cid, item, position, fromPosition)
	if InitArenaScript == 0 then
		InitArenaScript = 1
		-- make arena rooms free
		for i = 0,9 do
			setGlobalStorageValue(42300+i, 0)
			setGlobalStorageValue(42400+i, 0)
		end
	checkArenaRooms({})
	end
	
local arena_room = item.actionid
local player_arena = getPlayerStorageValue(cid, 42355)
if getPlayerStorageValue(cid, arena_room+getPlayerStorageValue(cid, 42355)*10-1) == 1 or arena_room+getPlayerStorageValue(cid, 42355)*10-1 == 42299 then
	if getGlobalStorageValue(cid, arena_room) == 0 then
		local monster_uid = getGlobalStorageValue(arena_room+100)
		if monster_uid > 0 then
			if isCreature(monster_uid) == TRUE then
				doRemoveCreature(monster_uid)
			end
		end
		local spawn_pos = getThingPos(arena_room)
		local monster = doCreateMonster(arena_monsters[arena_room+getPlayerStorageValue(cid, 42355)*10], {x=spawn_pos.x-1,y=spawn_pos.y-1,z=spawn_pos.z})
		setGlobalStorageValue(arena_room+100, monster)
		doTeleportThing(cid, spawn_pos, TRUE)
		setGlobalStorageValue(arena_room, cid)
		setGlobalStorageValue(arena_room-1, 0)
		setPlayerStorageValue(cid, 42350, os.time()+arena_room_max_time)
	else
	doTeleportThing(cid, fromPosition, TRUE)
	doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, getCreatureName(getGlobalStorageValue(cid, arena_room))..' is now in next room. Wait a moment and try again.')
	end
else
	doTeleportThing(cid, fromPosition, TRUE)
	doCreatureSay(cid, 'First kill monster!', TALKTYPE_ORANGE_1, false, cid)
end
if arena_room == 42300 then
	setPlayerStorageValue(cid, 42351, 0)
	setPlayerStorageValue(cid, 42352, 1)
end
return TRUE
end

function checkArenaRooms(param)
	addEvent(checkArenaRooms, 1000, {})
		for i = 42300, 42309 do
		local player = getGlobalStorageValue(i)
		if isPlayer(player) == TRUE then
		local player_storage = getPlayerStorageValue(player, 42350)
			if player_storage <= os.time() then
			local leave = {x=32312, y=31134, z=6}
				doTeleportThing(player, leave, TRUE)
				setPlayerStorageValue(player, 42350, 0)
				setGlobalStorageValue(i, 0)
				doPlayerSendTextMessage(player, MESSAGE_EVENT_ADVANCE,'You have been kicked from arena! You have only ' .. arena_room_max_time .. ' seconds for one room.')
			elseif player_storage - 10 <= os.time() then
				doPlayerSendTextMessage(player, MESSAGE_EVENT_ADVANCE, 'You\'ll be kicked in ' .. player_storage - os.time() .. ' seconds.')
			end
		else
		setGlobalStorageValue(i, 0)
	end
end
end

And, I want make a part for the Zullaza Gate:

I want like:

- If have Zulazza in the position from: local from = {x = 33343, y = 31606, z = 1} - local to = {x = 33351, y = 31613, z = 1} - So, will open the gate and after 10 minutes the gate will be close again. And will open a teleport in a postion 999, 999, 7.

LUA:
removals = {
	{item = 9486, pos = {x=33303, y=31491 , z=7 }},
	{item = 9486, pos = {x=33304, y=31491 , z=7 }},	
	{item = 9486, pos = {x=33305, y=31491 , z=7 }},
	{item = 9486, pos = {x=33306, y=31491 , z=7 }},  
	{item = 9486, pos = {x=33307, y=31491 , z=7 }},
	{item = 9486, pos = {x=33308, y=31491 , z=7 }}, 
	{item = 9486, pos = {x=33309,  y=31491 , z=7 }},
	
	{item = 9485, pos = {x=33303,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33304,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33305,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33306,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33307,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33308,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33309,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33310,  y=31498 , z=7 }}

	}
	
local from = {x = 33343, y = 31606, z = 1}
local to = {x = 33351, y = 31613, z = 1}
local monsters = {"zulazza the corruptor"}


function onThink(interval, lastExecution, thinkInterval)

for x = from.x, to.x do
	for y = from.y, to.y do
		local v = getTopCreature({x = x, y = y, z = 1}).uid
		if isPlayer(v) then
			return true
		elseif isMonster(v) then
			table.insert(monsters, v)
		end
	end
end			

for i = 1, #removals do
	removals[i].pos.stackpos = 1
	doRemoveItem(getThingfromPos(removals[i].pos).uid, 1)
end	

return TRUE
end

# Gesior

When I try create a new page in the Gesior all menus come to like this:

2vma07.png


Thanks.
 
Gesior bug, have you edited the initialize.js so it keeps all the other menues closed except news?
Code:
self.name = "news=[COLOR=#00ff00]1[/COLOR]&abouttibia=[COLOR=#ff0000]0[/COLOR]&gameguides=[COLOR=#ff0000]0[/COLOR]&library=[COLOR=#ff0000]0[/COLOR]&community=[COLOR=#ff0000]0[/COLOR]&forum=[COLOR=#ff0000]0[/COLOR]&account=[COLOR=#ff0000]0[/COLOR]&support=[COLOR=#ff0000]0[/COLOR]&shops=[COLOR=#ff0000]0[/COLOR]&;"
 
Edited the initialize.js.. My initialize.js is like your code, and still having problem, and about the LUA, you can't help me with that?
 
What is your script supposed to do? It doesn't look like it's related to Zulazza.
All you're doing is inserting monsters into a table called monsters, then doing nothing with it.
What is removals?
 
What is your script supposed to do? It doesn't look like it's related to Zulazza.
All you're doing is inserting monsters into a table called monsters, then doing nothing with it.
What is removals?

It's related to Zullaza. It's supposed to do like:

- If zullaza was summoned so will open the gate, will remove the gate (removals is that). If Zulazza was killed, so will wait 10 minutes and will make the gate again (in the same position of removals), and goes create a teleport in Position: 100, 100, 7 to teleport to position 150, 150, 7.
 
Why do you need to check the area for Zulazza?
Why can't you just have the globalevent just summon Zulazza, then open the gates.
Then use creaturescripts to check if Zulazza has died (onDeath), if he dies, then set up 10 minutes to close the gates and create portals.
 
Why do you need to check the area for Zulazza?
Why can't you just have the globalevent just summon Zulazza, then open the gates.
Then use creaturescripts to check if Zulazza has died (onDeath), if he dies, then set up 10 minutes to close the gates and create portals.

Because I didn't know how to do that?
 
I have to go get my computer repaired, I won't be back for awhile, but here's what I only have so far (I'm trying to get my morning together too).

LUA:
removals = {
	{item = 9486, pos = {x=33303, y=31491 , z=7 }},
	{item = 9486, pos = {x=33304, y=31491 , z=7 }},	
	{item = 9486, pos = {x=33305, y=31491 , z=7 }},
	{item = 9486, pos = {x=33306, y=31491 , z=7 }},  
	{item = 9486, pos = {x=33307, y=31491 , z=7 }},
	{item = 9486, pos = {x=33308, y=31491 , z=7 }}, 
	{item = 9486, pos = {x=33309,  y=31491 , z=7 }},
 
	{item = 9485, pos = {x=33303,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33304,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33305,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33306,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33307,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33308,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33309,  y=31498 , z=7 }},
	{item = 9485, pos = {x=33310,  y=31498 , z=7 }}
 }
 
local from = {x = 33343, y = 31606, z = 1}
local to = {x = 33351, y = 31613, z = 1}
 
function onThink(interval, lastExecution, thinkInterval)
	for x = from.x, to.x do
		for y = from.y, to.y do
			local v = getTopCreature({x = x, y = y, z = 1}).uid
			if isPlayer(v) or getCreatureName(v) ~= "Zulazza the Corruptor" then
				return true
			elseif isMonster(v) and getCreatureName(v) == "Zulazza the Corruptor" then	
				for i = 1, #removals do
					removals[i].pos.stackpos = 1
					doRemoveItem(getThingfromPos(removals[i].pos).uid, 1)
				end	
			end
		end
	end			
	return TRUE
end

I have not tested it, but that should (from my understanding) remove the gates.
 
Back
Top