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":
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:
Actions:
In "data\actions\scripts\yalahar_azerus_quest.lua":
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:
Monsters: http://otland.net/f83/monsters-last-room-yalahar-37812/
-----------------
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: