• 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 Nothing special, problem with doCreateMonster.

Potar

SocialWorld
Senator
Joined
Mar 1, 2009
Messages
1,661
Reaction score
125
Location
Warsaw, Poland
Hello i have problem, i tested it in test server (all working fine!) but when i update my server a lot of people said me arena doesn't working, (credits to: Cykotitan) there is not any next monsters... Like AddEvent doesn't working.

LUA:
local from = {x=1767, y=100, z=3}
local to = {x=1789, y=121, z=3}
 
local monsters = {
	{{x=1784, y=110, z=3}, 'Baron Brute'},
	{{x=1784, y=110, z=3}, 'The Axeorcist'}
}
 
local players = {
	{{x=1794, y=90, z=2}, {x=1776, y=103, z=3}},
	{{x=1795, y=90, z=2}, {x=1778, y=103, z=3}}
}
 
local level = 150

local statue_pos = {x = 1779, y = 110, z = 3}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local t = {}
	if item.itemid == 1945 then
		for i = 1, #players do
			t[i] = getTopCreature(players[i][1]).uid
			if not isPlayer(t[i]) then
				return doCreatureSay(cid, 'You need ' .. #players .. ' players to do this quest.', TALKTYPE_ORANGE_1, false, cid)
			elseif getPlayerLevel(cid) < level then
				return doCreatureSay(cid, 'All players have to be level ' .. level .. ' to do this quest.', TALKTYPE_ORANGE_1, false, cid)
			end
		end
		for i = 1, #t do
			doTeleportThing(t[i], players[i][2])
			doSendMagicEffect(players[i][1], CONST_ME_TELEPORT)
			doSendMagicEffect(players[i][2], CONST_ME_TELEPORT)
		end
	doCreateMonster('Baron Brute', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
	doCreateMonster('The Axeorcist', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
			addEvent(Potwory2, 60 * 1000)
	else
		for x = from.x, to.x do
			for y = from.y, to.y do
				local v = getTopCreature({x=x, y=y, z=from.z}).uid
				if isPlayer(v) then
					return doCreatureSay(cid, 'There is already a team in the battle room.', TALKTYPE_ORANGE_1, false, cid)
				elseif isMonster(v) then
					table.insert(t, v)
				end
			end
		end
		for i = 1, #t do
			doRemoveCreature(t[i])
		end
	end
 
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end

function Potwory2()
doCreateMonster('Menace', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Fatality', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory4, 60 * 1000)
return true
end
function Potwory4()
doCreateMonster('Incineron', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Coldheart', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory5, 60 * 1000)
return true
end
function Potwory5()
doCreateMonster('Dreadwing', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Doomhowl', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory6, 60 * 1000)
return true
end
function Potwory6()
doCreateMonster('Haunter', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('The Dreadorian', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory7, 60 * 1000)
return true
end
function Potwory7()
doCreateMonster('Tremorak', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rocko', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory8, 60 * 1000)
return true
end
function Potwory8()
doCreateMonster('Tirecz', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
return true
end
 
No, there is not any errors, before when i openserver to all players, everything was fine but when i open it players can't do this quest idk why.

I can summon like /m the monsters.
 
Back
Top