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

Waves in specific order

bybbzan

mapper
Joined
Aug 4, 2012
Messages
809
Solutions
2
Reaction score
136
Location
Sweden
Hello. ^_^

I want these "waves" to run in a specific order, not randomly.
Should i just remove
XML:
if math.random (1,8) == 4 then
Or what?

LUA:
function Potwory1()
if math.random (1,8) == 4 then
doCreateMonster('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory2, 30 * 1000)
else
doCreateMonster('Azerus', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory2, 30 * 1000)
end
end

function Potwory2()
doCreateMonster('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
addEvent(Potwory3, 35 * 1000)
end

function Potwory3()
doCreateMonster('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Scythe', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doCreateMonster('Rift Scythe', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
addEvent(Potwory4, 40 * 1000)
end

function Potwory4()
doCreateMonster('Azerus', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('War Golem', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('War Golem', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z, stackpos = 253})
doCreateMonster('War Golem', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z, stackpos = 253})
doCreateMonster('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z, stackpos = 253})
addEvent(NewPortal, 90 * 1000)
end
 
They should already run in order. That first part randomizes where Azerus will spawn, either in the first wave or the fourth wave if he hasn't already been summoned.

Okay well nvm.
I do get this error all the time.. can't find the problem :S
Code:
[Error - MoveEvents Interface]
data/movements/scripts/yalahar_azerus_quest.lua:onStepIn
Description:
(luaGetThingFromPos) Tile not found

script
LUA:
function onStepIn(cid, item, position, fromPosition)

--Config-->
local starting = {x = 892, y = 1312, z = 9, stackpos = 253}
local ending = {x = 909, y = 1333, z = 9, stackpos = 253}
local checking = {x = starting.x, y = starting.y, z = starting.z, stackpos = starting.stackpos}
local queststatus = getPlayerStorageValue(cid, 23999) --Value ID OF QUEST WHEN YOU HAVE CATCH THE ITEM
local player_pos_entrada = {x = 901, y = 1330, z = 9}
--EndConfig-->

--Do not touch this--
if getPlayerLookDir(cid) == 0 then
newdir = 2
elseif getPlayerLookDir(cid) == 1 then
newdir = 3
elseif getPlayerLookDir(cid) == 2 then
newdir = 0
else
newdir = 1
end
--Don't edit this unless you know what you are doing.

if item.actionid == 1974 and queststatus == -1 then
doCreatureSay(cid, "It seems by defeating Azerus you have stopped this army from entering your world! Better leave this ghastly place forever.", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 23999, 1) --Value ID WHAT THE PLAYER CAN ENTER THE DOOR WHERE ARE THE REWARDS
return TRUE
end

if item.actionid == 1973 and queststatus == -1 then
totalmonsters = 0
monster = {}

repeat
creature = getThingfromPos(checking)

if creature.itemid > 0 then
if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
totalmonsters = totalmonsters + 1
monster[totalmonsters] = creature.uid
end
end

checking.x = checking.x + 1

if checking.x > ending.x then
checking.x = starting.x
checking.y = checking.y + 1
end

until checking.y > ending.y

if totalmonsters ~= 0 then
current = 0
repeat
current = current + 1
doRemoveCreature(monster[current])
until current >= totalmonsters
end

doTeleportThing(cid, player_pos_entrada)
doSendMagicEffect(player_pos_entrada, 10)

else
doMoveCreature(cid, newdir)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Someone has already done this quest.')
end
end
 
put this line
LUA:
local starting = {x = 909, y = 1333, z = 9, stackpos = 0}
instead of this
LUA:
local starting = {x = 909, y = 1333, z = 9, stackpos = 253}

btw the problem is when he try to check for the creature there or item he find nothing try this and tell me
 
put this line
LUA:
local starting = {x = 909, y = 1333, z = 9, stackpos = 0}
instead of this
LUA:
local starting = {x = 909, y = 1333, z = 9, stackpos = 253}

btw the problem is when he try to check for the creature there or item he find nothing try this and tell me

Well now it sais "Creature not found" instead.

Code:
[Error - MoveEvents Interface]
data/movements/scripts/yalahar_azerus_quest.lua:onStepIn
Description:
(luaDoRemoveCreature) Creature not found
 
kk now i found it

change

LUA:
local starting = {x = 892, y = 1312, z = 9, stackpos = 0}
TO
LUA:
local starting = {x = 892, y = 1312, z = 9, stackpos = 253}
and edit the position inside not outside

the coordinations of the place where player will be teleport to
i hope you understand me well
 
first Change This::: Tell me if it Worked :):p
LUA:
local starting = {x = 892, y = 1312, z = 9, stackpos = 0}
To
LUA:
local starting = {x = 892, y = 1312, z = 9, stackpos = 253}
Then Lets Edit The Config:
LUA:
local starting = {x = 892, y = 1312, z = 9, stackpos = 253}-------Accroding To The Image------------
LUA:
local ending = {x = 909, y = 1333, z = 9, stackpos = 253}-------According To The Image--------------
Here Is a Picture
imagem6v1.jpg
 
That wouldnt be correct, look:

If you edit the coordinates to your photo, its not searching and cleaning the whole area, just from where we edited the coordinates like this.
imagem6v1.jpg
The space outside the red-striped area would not be cleaned.
Do you understand?
 
try this

LUA:
function onStepIn(cid, item, position, fromPosition)
 
	--Config-->
	local starting = {x = 892, y = 1312, z = 9}
	local ending = {x = 909, y = 1333, z = 9}
	local checking = {x = starting.x, y = starting.y, z = starting.z}
	local queststatus = getPlayerStorageValue(cid, 23999) --Value ID OF QUEST WHEN YOU HAVE CATCH THE ITEM
	local player_pos_entrada = {x = 901, y = 1330, z = 9}
	--EndConfig-->
 
	--Do not touch this--
	if getPlayerLookDir(cid) == 0 then
		newdir = 2
	elseif getPlayerLookDir(cid) == 1 then
		newdir = 3
	elseif getPlayerLookDir(cid) == 2 then
		newdir = 0
	else
		newdir = 1
	end
	--Don't edit this unless you know what you are doing.
 
	if item.actionid == 1974 and queststatus == -1 then
		doCreatureSay(cid, "It seems by defeating Azerus you have stopped this army from entering your world! Better leave this ghastly place forever.", TALKTYPE_ORANGE_1)
		setPlayerStorageValue(cid, 23999, 1) --Value ID WHAT THE PLAYER CAN ENTER THE DOOR WHERE ARE THE REWARDS
		return TRUE
	end
 
	if item.actionid == 1973 and queststatus == -1 then
		totalmonsters = 0
		monster = {}
		
		repeat
			creature = getThingfromPos(checking)
			
			while creature.uid ~= 0 do
				if isMonster(creature.uid) then
					totalmonsters = totalmonsters + 1
					monster[totalmonsters] = creature.uid
				end
				checking.stackpos = checking.stackpos + 1
				creature = getThingfromPos(checking)
			end
			 
			checking.x = checking.x + 1
			 
			if checking.x > ending.x then
				checking.x = starting.x
				checking.y = checking.y + 1
			end
			 
		until checking.y > ending.y
		 
		if totalmonsters ~= 0 then
			current = 0
			repeat
				current = current + 1
				if isMonster(monster[current]) then doRemoveCreature(monster[current]) end
			until current >= totalmonsters
		end
		 
		doTeleportThing(cid, player_pos_entrada)
		doSendMagicEffect(player_pos_entrada, 10)
		 
	else
		doMoveCreature(cid, newdir)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Someone has already done this quest.')
	end
	return TRUE
end
 
Back
Top