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

Action Yalahar Last Mission {BIG POST}

Updated, Bug Fixed, Optimized

Movements\scripts\yalahar_azerus_quest.lua
Lua:
--Config--
local starting = {x = XXXXX, y = XXXXX, z = XXXXX, stackpos = 253} -- Top Left of the Final Room
local ending = {x = XXXXX, y = XXXXX, z = XXXXX, stackpos = 253} -- Bottom Right of the Final Romm
local checking = {x = starting.x, y = starting.y, z = starting.z, stackpos = starting.stackpos} -- Don't touch
local player_pos_entrada = {x = XXXXX, y = XXXXX, z = XXXXX} -- Where player spawns when entering the tp to the final room
local storageID = XXXXX --Storage ID, used for the door to the reward room
local canBeEnteredAgain = false -- Can you enter the place where you defeat Azerus many times? true/false
--End Config--

function onStepIn(cid, item, position, fromPosition)
	local queststatus = getPlayerStorageValue(cid, storageID) 
	
	if item.actionid == 1974 and queststatus == -1 then
		doCreatureSay(cid, "It seems by defeating Azarus you have stopprd this army from entering your world! Better leave this ghastly place forever.", TALKTYPE_ORANGE_1)
		setPlayerStorageValue(cid, storageID, 1)
		return TRUE
	end
	
	if item.actionid == 1973 and (queststatus == -1 or canBeEnteredAgain) 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
		doTeleportThing(cid, fromPosition, false)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You have already defeated Azarus, and decided to stay out of this haunted place.')
	end
end

actions\scripts\yalahar_azerus_quest.lua

Lua:
--Config--
local statue_pos = {x = XXXXX, y = XXXXX, z = XXXXX} -- Place of the thing in the middle
local portal_quest01_pos = {x = XXXXX, y = XXXXX, z = XXXXX, stackpos = 2} -- Where the tp to the room is
local portal_quest02_pos = {x = XXXXX, y = XXXXX, z = XXXXX, stackpos = 2} -- Where the tp out of the room is
local new_portal_pos = {x = XXXXX, y = XXXXX, z = XXXXX, stackpos = 1} -- Where the tp to final final room is
local new_pos = {x = XXXXX, y = XXXXX, z = XXXXX} -- Where the tp ^ leads too
--End Config--

function onUse(cid, item, frompos, item2, topos)
	if item.uid == 1968 and getThingfromPos(portal_quest01_pos).itemid ~= 9772 then
		doCreateItem(9772,1,portal_quest01_pos)
		doCreateItem(9772,1,portal_quest02_pos)
		Potwory1()
	else
		doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
	end
	return TRUE
end

local function Potwory1()
	if math.random (1,8) ~= 8 then
		doCreateMonster('Azerus Immortal', {x = statue_pos.x, y = statue_pos.y, z = statue_pos.z})
	end
	
	doCreateMonster('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z})
	doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z})
	doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z})
	doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z})
	doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z})
	
	addEvent(Potwory2, 30 * 1000)
end

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

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

local function Potwory4()
	-- Not sure which one it will detect, so let's remove both ;) However we only need it looking for the first one if that monster exists.
	if getCreatureName("Azerus Immortal") == TRUE then
		doRemoveCreature(monster)
	elseif monster = getCreatureName("Azerus") == TRUE then
		doRemoveCreature(monster)
	end
	
	doCreateMonster('Azerus', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('War Golem', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('War Golem', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('War Golem', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z})
	doCreateMonster('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z})
	addEvent(NewPortal, 90 * 1000)
end

local function NewPortal()
	doCreateTeleport(1387, new_pos, new_portal_pos)
	addEvent(RemoveAll, 60 * 1000)
end

local function RemoveAll()
	doRemoveItem(getThingfromPos(portal_quest01_pos).uid,1)
	doRemoveItem(getThingfromPos(portal_quest02_pos).uid,1)
	doRemoveItem(getThingfromPos(new_portal_pos).uid,1)
end


Also Required the following monster

Azerus Immortal.xml
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Azerus" nameDescription="azerus" race="blood" experience="6000" speed="268" manacost="0">
    <health now="8000" max="8000"/>
    <look type="309" head="20" body="30" legs="40" feet="50" corpse="6080"/>
    <targetchange interval="5000" chance="8"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="0"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="90"/>
        <flag runonhealth="0"/>
    </flags>
    <attacks>
        <attack name="melee" interval="2000" min="-0" max="-900"/>
        <attack name="manadrain" interval="2000" chance="10" range="7" min="-0" max="-2000">
            <attribute key="shootEffect" value="energy"/>
            <attribute key="areaEffect" value="poff"/>
        </attack>
          <attack name="manadrain" interval="2000" chance="15" range="7" radius="7" target="1" min="-0" max="-800">
            <attribute key="shootEffect" value="fire"/>
            <attribute key="areaEffect" value="bigclouds"/>
        </attack>
        <attack name="death" interval="2000" chance="20" range="7" min="-0" max="-524">
                  <attribute key="shootEffect" value="suddendeath"/>
                <attribute key="areaEffect" value="mortarea"/>
          </attack>
        <attack name="lifedrain" interval="1000" chance="10" length="8" spread="0" min="-100" max="-500">
            <attribute key="areaEffect" value="sleep"/>
        </attack>
    </attacks>
    <defenses armor="30" defense="20">
        <defense name="healing" interval="1000" chance="15" min="150" max="500">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
    </defenses>
    <elements>
        <element energyPercent="100"/>
        <element icePercent="100"/>
        <element firePercent="100"/>
        <element holyPercent="100"/>
        <element earthPercent="100"/>
        <element physicalPercent="100"/>
        <element deathPercent="100"/>
    </elements>
    <immunities>
        <immunity paralyze="1"/>
        <immunity invisible="1"/>
    </immunities>
  <voices interval="5000" chance="10">
    <voice sentence="The ultimate will finally consume this unworthy existence!" yell="1"/>
    <voice sentence="My masters and I will tear down barriers and join the ultimate in its realm!" yell="1"/>
    <voice sentence="The power of the Yalahari will all be mine!" yell="1"/>
    <voice sentence="We will open the rift for a new time to come!"/>
    <voice sentence="He who has returned from beyond has taught me secrets you can't even grasp!"/>
    <voice sentence="The end of times has come!"/>
    <voice sentence="The great machinator will make his entrance soon!"/>
    <voice sentence="You might scratch my shields but they will never break!"/>
    <voice sentence="You can't hope to penetrate my shields!"/>
    <voice sentence="Do you really think you could beat me?"/>
  </voices>
    <loot>
    </loot>
</monster>

monsters.xml

PHP:
<monster name="Azerus Immortal" file="Azerus Immortal.xml"/>
 
Updated, Bug Fixed, Optimized

actions\scripts\yalahar_azerus_quest.lua

Lua:
--Config--
local statue_pos = {x = XXXXX, y = XXXXX, z = XXXXX} -- Place of the thing in the middle
local portal_quest01_pos = {x = XXXXX, y = XXXXX, z = XXXXX, stackpos = 2} -- Where the tp to the room is
local portal_quest02_pos = {x = XXXXX, y = XXXXX, z = XXXXX, stackpos = 2} -- Where the tp out of the room is
local new_portal_pos = {x = XXXXX, y = XXXXX, z = XXXXX, stackpos = 1} -- Where the tp to final final room is
local new_pos = {x = XXXXX, y = XXXXX, z = XXXXX} -- Where the tp ^ leads too
--End Config--

function onUse(cid, item, frompos, item2, topos)
	if item.uid == 1968 and getThingfromPos(portal_quest01_pos).itemid ~= 9772 then
		doCreateItem(9772,1,portal_quest01_pos)
		doCreateItem(9772,1,portal_quest02_pos)
		Potwory1()
	else
		doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
	end
	return TRUE
end

local function Potwory1()
	if math.random (1,8) ~= 8 then
		doCreateMonster('Azerus Immortal', {x = statue_pos.x, y = statue_pos.y, z = statue_pos.z})
	end
	
	doCreateMonster('Rift Brood', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('Rift Brood', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('Rift Brood', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z})
	doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z})
	doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y, z = statue_pos.z})
	doCreateMonster('Rift Worm', {x = statue_pos.x+1, y = statue_pos.y-1, z = statue_pos.z})
	doCreateMonster('Rift Worm', {x = statue_pos.x-1, y = statue_pos.y-1, z = statue_pos.z})
	
	addEvent(Potwory2, 30 * 1000)
end

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

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

local function Potwory4()
	-- Not sure which one it will detect, so let's remove both ;) However we only need it looking for the first one if that monster exists.
	if getCreatureName("Azerus Immortal") == TRUE then
		doRemoveCreature(monster)
	elseif monster = getCreatureName("Azerus") == TRUE then
		doRemoveCreature(monster)
	end
	
	doCreateMonster('Azerus', {x = statue_pos.x, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('War Golem', {x = statue_pos.x+1, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('War Golem', {x = statue_pos.x-1, y = statue_pos.y+1, z = statue_pos.z})
	doCreateMonster('War Golem', {x = statue_pos.x, y = statue_pos.y-1, z = statue_pos.z})
	doCreateMonster('War Golem', {x = statue_pos.x-1, y = statue_pos.y, z = statue_pos.z})
	addEvent(NewPortal, 90 * 1000)
end

local function NewPortal()
	doCreateTeleport(1387, new_pos, new_portal_pos)
	addEvent(RemoveAll, 60 * 1000)
end

local function RemoveAll()
	doRemoveItem(getThingfromPos(portal_quest01_pos).uid,1)
	doRemoveItem(getThingfromPos(portal_quest02_pos).uid,1)
	doRemoveItem(getThingfromPos(new_portal_pos).uid,1)
end

Hello I got a console debug on this item:
PHP:
Warning: [Event::checkScript] Can not load script. /scripts/yalahar/yalahar_azerus_quest.lua
data/actions/scripts/yalahar/yalahar_azerus_quest.lua:56: 'then' expected near '='
It's this line here :
PHP:
         elseif monster = getCreatureName("Azerus") == TRUE then

What can I do to fix this? Im Running TFS 0.2.5
 
this script is retarded lol look at the functions

it has a change to summon Azerus on the first try here:
Code:
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

and if that happens it will end up summoning him again in the end function:
Code:
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})
end

wtf..this wat supposed to happen?
 
Rizz, do you really thinks that it would works? o_O?

Lua:
        if getCreatureName("Azerus Immortal") == TRUE then
                doRemoveCreature(monster)
        elseif monster = getCreatureName("Azerus") == TRUE then
                doRemoveCreature(monster)
        end

looks at my thread of Yalahari 10th...
 
Great, I changed somethings to make it work on tfs 2.5 and Im receiving the following error:

[26/09/2009 01:12:51] Lua Script Error: [MoveEvents Interface]
[26/09/2009 01:12:51] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[26/09/2009 01:12:51] luaGetThingfromPos(). ( 00572 / 00557 / 010 ) Tile not found

[26/09/2009 01:12:51] Lua Script Error: [MoveEvents Interface]
[26/09/2009 01:12:51] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[26/09/2009 01:12:51] luaGetThingfromPos(). ( 00573 / 00557 / 010 ) Tile not found

[26/09/2009 01:12:51] Lua Script Error: [MoveEvents Interface]
[26/09/2009 01:12:51] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[26/09/2009 01:12:51] luaGetThingfromPos(). ( 00574 / 00557 / 010 ) Tile not found

[26/09/2009 01:12:51] Lua Script Error: [MoveEvents Interface]
[26/09/2009 01:12:51] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[26/09/2009 01:12:51] luaGetThingfromPos(). ( 00575 / 00557 / 010 ) Tile not found

[26/09/2009 01:12:51] Lua Script Error: [MoveEvents Interface]
[26/09/2009 01:12:51] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[26/09/2009 01:12:51] luaGetThingfromPos(). ( 00576 / 00557 / 010 ) Tile not found

[26/09/2009 01:12:51] Lua Script Error: [MoveEvents Interface]
[26/09/2009 01:12:51] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[26/09/2009 01:12:51] luaGetThingfromPos(). ( 00572 / 00559 / 010 ) Tile not found

[26/09/2009 01:12:51] Lua Script Error: [MoveEvents Interface]
[26/09/2009 01:12:51] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[26/09/2009 01:12:51] luaGetThingfromPos(). ( 00573 / 00559 / 010 ) Tile not found
 
This happend when I I go through the first teleport:

[08/10/2009 13:24:14] Lua Script Error: [MoveEvents Interface]
[08/10/2009 13:24:14] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[08/10/2009 13:24:14] luaGetThingFromPos(). Tile not found

[08/10/2009 13:24:14] Lua Script Error: [MoveEvents Interface]
[08/10/2009 13:24:14] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[08/10/2009 13:24:14] luaGetThingFromPos(). Tile not found

[08/10/2009 13:24:14] Lua Script Error: [MoveEvents Interface]
[08/10/2009 13:24:14] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[08/10/2009 13:24:14] luaGetThingFromPos(). Tile not found

[08/10/2009 13:24:14] Lua Script Error: [MoveEvents Interface]
[08/10/2009 13:24:14] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[08/10/2009 13:24:14] luaGetThingFromPos(). Tile not found

[08/10/2009 13:24:14] Lua Script Error: [MoveEvents Interface]
[08/10/2009 13:24:14] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[08/10/2009 13:24:14] luaGetThingFromPos(). Tile not found

[08/10/2009 13:24:14] Lua Script Error: [MoveEvents Interface]
[08/10/2009 13:24:14] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[08/10/2009 13:24:14] luaGetThingFromPos(). Tile not found

[08/10/2009 13:24:14] Lua Script Error: [MoveEvents Interface]
[08/10/2009 13:24:14] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[08/10/2009 13:24:14] luaGetThingFromPos(). Tile not found

[08/10/2009 13:24:14] Lua Script Error: [MoveEvents Interface]
[08/10/2009 13:24:14] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[08/10/2009 13:24:14] luaGetThingFromPos(). Tile not found

[08/10/2009 13:24:14] Lua Script Error: [MoveEvents Interface]
[08/10/2009 13:24:14] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[08/10/2009 13:24:14] luaGetThingFromPos(). Tile not found


Im using Crying Damson 0.3.5.

Thanks anyway!
 
[25/10/2009 14:28:37] Lua Script Error: [MoveEvents Interface]
[25/10/2009 14:28:37] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[25/10/2009 14:28:37] luaGetThingfromPos(). ( 00576 / 00557 / 010 ) Tile not found

[25/10/2009 14:28:37] Lua Script Error: [MoveEvents Interface]
[25/10/2009 14:28:37] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[25/10/2009 14:28:37] luaGetThingfromPos(). ( 00572 / 00559 / 010 ) Tile not found

[25/10/2009 14:28:37] Lua Script Error: [MoveEvents Interface]
[25/10/2009 14:28:37] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[25/10/2009 14:28:37] luaGetThingfromPos(). ( 00573 / 00559 / 010 ) Tile not found

[25/10/2009 14:28:37] Lua Script Error: [MoveEvents Interface]
[25/10/2009 14:28:37] data/movements/scripts/yalahar_azerus_quest.lua:eek:nStepIn

[25/10/2009 14:28:37] luaGetThingfromPos(). ( 00589 / 00576 / 010 ) Tile not found



How can i fix it?
 
Last edited:
Bug OnstepIn FIXED!
USE IT SCRIPT!

Lua:
--Config-->
local starting = {x = 572, y = 556, z = 10, stackpos = 253}
local final = {x = 580, y = 577, z = 9, stackpos = 253}
local ending = {x = 589, y = 575, z = 10, stackpos = 253}
local checking = {x = starting.x, y = starting.y, z = starting.z, stackpos = starting.stackpos}
local queststatus = getPlayerStorageValue(cid, 58270) --Value ID DA QUEST QUANDO VOCE JA PEGO O ITEM
local player_pos_entrada = {x = 579, y = 575, z = 10}
--EndConfig-->

function onStepIn(cid, item, position, fromPosition)
	local queststatus = getPlayerStorageValue(cid, storageID) 
 
	if item.actionid == 1974 and queststatus == -1 then
		doCreatureSay(cid, "It seems by defeating Azarus you have stopprd this army from entering your world! Better 

leave this ghastly place forever.", TALKTYPE_ORANGE_1)
		setPlayerStorageValue(cid, storageID, 1)
		return TRUE
	end
 
	if item.actionid == 1973 and (queststatus == -1 or canBeEnteredAgain) 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
 
	else
		doTeleportThing(cid, fromPosition, false)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You have already defeated Azarus, and 

decided to stay out of this haunted place.')
	doTeleportThing(cid, final)
		doSendMagicEffect(final, 10)
	end
end
 
Last edited by a moderator:
At the end are two Azerus in the room. And the room is not clean for the next players .

ruZFDAD.png
 
Last edited:

Similar threads

Back
Top