undead mage
Active Member
So im using the scripts for both Yalahar quest and Inquisition quest from https://github.com/orts/server
but at yalahar quest when I kill Azerus he doesn't spawn a teleport and at inquisition when like Ushuriel gets killed no message appears like "you have 3 minutes to enter the teleport" and if you enter the teleport it doesn't teleport you to the crystal cave but it just teleports you back. Im pretty sure that I configured everything right. Does anyone know what the problem could be?
Im using tfs 1.2 and these are the scripts
data/creaturescripts/creaturescripts.xml
data/creaturescripts/scripts/quests/yalahar/AzerusKill.lua
data/creaturescripts/creaturescripts.xml
data/creaturescripts/scripts/quests/inquisition/inquisitionQuestBosses.lua
but at yalahar quest when I kill Azerus he doesn't spawn a teleport and at inquisition when like Ushuriel gets killed no message appears like "you have 3 minutes to enter the teleport" and if you enter the teleport it doesn't teleport you to the crystal cave but it just teleports you back. Im pretty sure that I configured everything right. Does anyone know what the problem could be?
Im using tfs 1.2 and these are the scripts
data/creaturescripts/creaturescripts.xml
Code:
<event type="kill" name="ServiceOfYalaharAzerus" script="quests/yalahar/AzerusKill.lua" />
data/creaturescripts/scripts/quests/yalahar/AzerusKill.lua
Code:
local teleportToPosition = Position(1070, 735, 14)
local function removeTeleport(position)
local teleportItem = Tile(position):getItemById(1387)
if teleportItem then
teleportItem:remove()
position:sendMagicEffect(CONST_ME_POFF)
end
end
function onKill(creature, target)
local targetMonster = target:getMonster()
if not targetMonster or targetMonster:getName():lower() ~= 'azerus' then
return true
end
local position = targetMonster:getPosition()
position:sendMagicEffect(CONST_ME_TELEPORT)
local item = Game.createItem(1387, 1, position)
if item:isTeleport() then
item:setDestination(teleportToPosition)
end
targetMonster:say('Azerus ran into teleporter! It will disappear in 2 minutes. Enter it!', TALKTYPE_MONSTER_SAY, 0, 0, position)
--remove portal after 2 min
addEvent(removeTeleport, 2 * 60 * 1000, position)
--clean arena of monsters
local spectators, spectator = Game.getSpectators(Position(1066, 735, 10), false, false, 10, 10, 10, 10)
for i = 1, #spectators do
spectator = spectators[i]
if spectator:isMonster() then
spectator:getPosition():sendMagicEffect(CONST_ME_POFF)
spectator:remove()
end
end
return true
end
data/creaturescripts/creaturescripts.xml
Code:
<event type="kill" name="InquisitionBosses" script="quests/inquisition/inquisitionQuestBosses.lua" />
data/creaturescripts/scripts/quests/inquisition/inquisitionQuestBosses.lua
Code:
local bosses = {
['ushuriel'] = 200,
['zugurosh'] = 201,
['madareth'] = 202,
['latrivan'] = 203,
['golgordan'] = 203,
['annihilon'] = 204,
['hellgorak'] = 205
}
function onKill(player, target)
local targetMonster = target:getMonster()
if not targetMonster then
return true
end
local targetName = targetMonster:getName():lower()
local bossStorage = bosses[targetName]
if not bossStorage then
return true
end
local newValue = 2
if targetName == 'latrivan' or targetName == 'golgordan' then
newValue = math.max(0, Game.getStorageValue(bossStorage)) + 1
end
Game.setStorageValue(bossStorage, newValue)
if newValue == 2 then
player:say('You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room.', TALKTYPE_MONSTER_SAY)
addEvent(Game.setStorageValue, 3 * 60 * 1000, bossStorage, 0)
end
return true
end
Last edited: