Action Yalahar Last Mission {BIG POST}

Gilahof

RepzorMe
Joined
Dec 11, 2007
Messages
87
Best answers
0
Reaction score
1
Location
Brazil
REP++ If u like
-----------------
Version: 8.4x
Tested on: TFS 0.3.4 (Crying Damson) Patch Level 2
Credits: Land and T4ae
-----------------

All that is in RED is important to the script work correctly and is where you need to change according to your map!
The PINK are the Action ID's

Movements:
In "data\movements\scripts\yalahar_azerus_quest.lua":
Code:
function onStepIn(cid, item, position, fromPosition)

--Config-->
local starting = {x = [COLOR="Red"]XXXXX[/COLOR], y = [COLOR="Red"]XXXXX[/COLOR], z = [COLOR="Red"]XXXXX[/COLOR], stackpos = 253}
local ending = {x = [COLOR="Red"]XXXXX[/COLOR], y = [COLOR="Red"]XXXXX[/COLOR], z = [COLOR="Red"]XXXXX[/COLOR], stackpos = 253}
local checking = {x = starting.x, y = starting.y, z = starting.z, stackpos = starting.stackpos}
local queststatus = getPlayerStorageValue(cid, [COLOR="Red"]XXXXX[/COLOR]) --[COLOR="Red"]Value ID OF QUEST WHEN YOU HAVE CATCH THE ITEM[/COLOR]
local player_pos_entrada = {x = [COLOR="Red"]XXXXX[/COLOR], y = [COLOR="Red"]XXXXX[/COLOR], z = [COLOR="Red"]XXXXX[/COLOR]}
--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 == [COLOR="Magenta"]1974[/COLOR] 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, [COLOR="Red"]XXXXX[/COLOR], 1) --[COLOR="Red"]Value ID WHAT THE PLAYER CAN ENTER THE DOOR WHERE ARE THE REWARDS[/COLOR]
return TRUE
end

if item.actionid == [COLOR="Magenta"]1973[/COLOR] 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
IN THE TELEPORT TO ENTER THE QUEST ADD ACTIONID 1973 AS THE IMAGE:


STARTING,ENDING: ARE THE COORDINATES TO CHECK IF THE ANY MONSTER INSIDE ROOM, IF ANY HE REMOVE. [see image]


AT THE FINAL ADD ACTIONID 1974 THE TILE AS TO WHEN THE FIGURE PLAYER HIT DISPLAYS THE MESSAGE SPEAKING HE CANINTO THE ROOM OF REWARDS. [see image]


NOW THE ACTION SCRIPT OF 1974 WHERE ARE THE 'XXX' Add a VALUE, AND THE DOORS OF QUEST PUT THE SAME VALUE AS THE IMAGE BELOW TO JOIN AFTER THE PLAYER CAN FINISH THE QUEST.


movements.xml:
Code:
<!-- Yalahar Set Quest -->
<movevent type="StepIn" actionid="1973" event="script" value="yalahar_azerus_quest.lua" />
<movevent type="StepIn" actionid="1974" event="script" value="yalahar_azerus_quest.lua" />
<!-- End Yalahar Set Quest -->

Actions:
In "data\actions\scripts\yalahar_azerus_quest.lua":
Code:
function onUse(cid, item, frompos, item2, topos)

--Config-->
local statue_pos = {x = [COLOR="Red"]XXXXX[/COLOR], y = [COLOR="Red"]XXXXX[/COLOR], z = [COLOR="Red"]XXXXX[/COLOR]}
local portal_quest01_pos = {x = [COLOR="Red"]XXXXX[/COLOR], y = [COLOR="Red"]XXXXX[/COLOR], z = [COLOR="Red"]XXXXX[/COLOR], stackpos = 2}
local portal_quest02_pos = {x = [COLOR="Red"]XXXXX[/COLOR], y = [COLOR="Red"]XXXXX[/COLOR], z = [COLOR="Red"]XXXXX[/COLOR], stackpos = 2}
local new_portal_pos = {x = [COLOR="Red"]XXXXX[/COLOR], y = [COLOR="Red"]XXXXX[/COLOR], z = [COLOR="Red"]XXXXX[/COLOR], stackpos = 1}
local new_pos = {x = [COLOR="Red"]XXXXX[/COLOR], y = [COLOR="Red"]XXXXX[/COLOR], z = [COLOR="Red"]XXXXX[/COLOR]}
--End Config-->

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

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

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

if item.uid == [COLOR="Magenta"]1968[/COLOR] and getThingfromPos(portal_quest01_pos).itemid ~= 9772 then
doCreateItem(9772,1,portal_quest01_pos)
doCreateItem(9772,1,portal_quest02_pos)
addEvent(Potwory1, 0)
else
doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
end
return TRUE
end
STATUE_POS: WHERE IS THE STATUE, ON THE STATUE ADD UniqueID 1968
NEW_PORTAL_POS: WHERE THE TELEPORT WILL APPEAR WHEN FINISH THE QUEST
PORTAL_QUEST01_POS: WHERE THE TELEPORT INSIDE THE ROOM. {THIS IS FOR CREATE A "ORB" ON THE TELEPORT, FOR NOBODY EXIT}.


PORTAL_QUEST02_POS: IS THE POSITION OF THE TELEPORT OUT OF THE ROOM. {THIS IS FOR WHEN THE QUEST TURNED ON NOBODY CAN ENTER}.


NEW_POS: IS THE POSITION WHERE THE PLAYERS WILL BE TELEPORTED AFTER DONE THE QUEST.


actions.xml:
Code:
<!-- Yalahar Set Quest -->
<action uniqueid="1968" script="yalahar_azerus_quest.lua"/>
<!-- End Yalahar Set Quest -->
Monsters: http://otland.net/f83/monsters-last-room-yalahar-37812/
 
Last edited:

Bam

Member
Joined
Aug 11, 2007
Messages
1,401
Best answers
0
Reaction score
10
Location
Sweden
Really awesome dude! I will use it! rep+
 

Sync

Ø,ø
Joined
May 26, 2009
Messages
1,876
Best answers
0
Reaction score
19
Location
Canada
Well done, and well done tutorial so people know how to set it up.
 

Kamikade

New Member
Joined
Jan 18, 2008
Messages
140
Best answers
0
Reaction score
0
Location
Poland/Rzeszów
[28/06/2009 00:10:49] Lua Script Error: [MoveEvents Interface]
[28/06/2009 00:10:49] data/movements/scripts/yalahar/yalahar_azerus_quest.lua:eek:nStepIn

[28/06/2009 00:10:49] luaGetThingFromPos(). Tile not found

and

[28/06/2009 00:12:52] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/yalahar_azerus_quest.lua)
[28/06/2009 00:12:52] data/actions/scripts/quests/yalahar_azerus_quest.lua:75: '<eof>' expected near 'end'

help i have TFS 0.3.4
 

marcryzius

New Member
Joined
Mar 22, 2009
Messages
61
Best answers
0
Reaction score
0
iasjduahuashuas

trouxe do xtibia pra ca que legal eim...
 

Tuchol

falania.com
Joined
Nov 21, 2008
Messages
387
Best answers
0
Reaction score
13
Location
Uzbekistan
doesn't work :
the door after doing is jammed
a bit vague guide-write such positions which they they fit for real of the map
 

adek23

New Member
Joined
Sep 29, 2008
Messages
39
Best answers
0
Reaction score
0
[28/06/2009 00:10:49] Lua Script Error: [MoveEvents Interface]
[28/06/2009 00:10:49] data/movements/scripts/yalahar/yalahar_azerus_quest.luanStepIn

[28/06/2009 00:10:49] luaGetThingFromPos(). Tile not found
then i go in first tp in console i see this and on server i have a big lagg i use tfs 0.3.4pl2
 

Kamikade

New Member
Joined
Jan 18, 2008
Messages
140
Best answers
0
Reaction score
0
Location
Poland/Rzeszów
[28/06/2009 00:10:49] Lua Script Error: [MoveEvents Interface]
[28/06/2009 00:10:49] data/movements/scripts/yalahar/yalahar_azerus_quest.lua:eek:nStepIn

[28/06/2009 00:10:49] luaGetThingFromPos(). Tile not found

and

[28/06/2009 00:12:52] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/yalahar_azerus_quest.lua)
[28/06/2009 00:12:52] data/actions/scripts/quests/yalahar_azerus_quest.lua:75: '<eof>' expected near 'end'

help i have TFS 0.3.4
help....
 

QuaS

Cykotitan Pwned =/
Joined
Sep 11, 2008
Messages
833
Best answers
0
Reaction score
26
Location
Poland/ Wroclaw
PHP:
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

i am just wondering, what happened if player get 2 Azerus.:

function potwory1: Rand = 4 azerus is summoned, and next in potwory 4 azerus is summoned for second time. players would get mad. xD


btw i have done this mission: Azerus immortal for all summoning, and get mortal again then golems were summonning. :)
 

FLE

Active Member
Joined
Oct 5, 2008
Messages
428
Best answers
0
Reaction score
25
Location
Vancouver Canada
can u explain what "starting" ,"ending", "checking", and "entrada" represent.. thanks.
 

FLE

Active Member
Joined
Oct 5, 2008
Messages
428
Best answers
0
Reaction score
25
Location
Vancouver Canada
WoW , When i go thru portal 1 , 1973 - i get debug and server crash.

whats the problem?

im using cryingdamson pl2

anybody know something about it?
 

Kanto

So.. you want a cookie?
Joined
Feb 28, 2008
Messages
90
Best answers
0
Reaction score
0
Location
Jämtland. :)
Not working.
[15/07/2009 13:38:19] Error: [MoveEvent::configureMoveEvent] No valid event name script
[15/07/2009 13:38:19] Warning: [BaseEvents::loadFromXml] Can not configure event
[15/07/2009 13:38:19] Error: [MoveEvent::configureMoveEvent] No valid event name script
[15/07/2009 13:38:19] Warning: [BaseEvents::loadFromXml] Can not configure event
 
Top