ralke
(҂ ͠❛ ෴ ͡❛)ᕤ
hi there! for anyone who's hosting a real map server, o something similar. Anyone had faced some issues at inquisition quest? I have been using the one at orts datapack, that I think should be the most recent one? orts2/data/scripts/quests/missions/the_inquisition.lua at main · EPuncker/orts2 (https://github.com/EPuncker/orts2/blob/main/data/scripts/quests/missions/the_inquisition.lua#L37) it is based on this post from otland. My issue is that sometimes, when you kill an inquisition boss such as Ushuriel, it doesn't trigger the portal and sends you to "Escaping back to the Retreat". Happened with Latrivan/Golgordan too. The weirdest thing is that sometimes it DOES work. Players kill the boss and the portal appears. What could be working wrong here? Thanks in advance!
Revscriptsys version:
The script I use (guess it's the same without revscriptsys).
If any piece of code is missing, please let me know. I hope you guys can help me identify where is the issue! Regards
Revscriptsys version:
orts2/data/scripts/quests/missions/the_inquisition.lua at main · EPuncker/orts2
ORTS datapack working on latest TFS. Contribute to EPuncker/orts2 development by creating an account on GitHub.
github.com
The script I use (guess it's the same without revscriptsys).
Lua:
local bosses = {
['ushuriel'] = 200,
['zugurosh'] = 201,
['madaret'] = 202,
['latrivan'] = 203,
['golgordan'] = 203,
['annihilon'] = 204,
['gorak infernal'] = 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
if Game.getStorageValue(bossStorage) == nil then
Game.setStorageValue(bossStorage, 0)
end
newValue = math.max(0, Game.getStorageValue(bossStorage)) + 1
end
Game.setStorageValue(bossStorage, newValue)
if newValue == 2 then
player:say('Ahora tienes 3 minutos para salir de esta habitacion a traves del teletransportador. Te llevara a la siguiente habitacion.', TALKTYPE_MONSTER_SAY)
addEvent(Game.setStorageValue, 3 * 60 * 1000, bossStorage, 0)
end
return true
end
Lua:
local teleports = {
[2150] = {text = 'Entrando en la sala de Ushuriel.', newPos = Position(971, 1201, 12), storage = 0, alwaysSetStorage = true}, -- to ushuriel ward
[2151] = {text = 'Entrando en las Cuevas de Cristal.', bossStorage = 200, newPos = Position(1076, 1194, 14), storage = 1}, -- from ushuriel ward
[2152] = {text = 'Escapando de vuelta al Refugio.', newPos = Position(948, 1227, 14)}, -- from crystal caves
[2153] = {text = 'Entrando en las Cuevas de Cristal.', newPos = Position(1076, 1194, 14), storage = 1}, -- to crystal caves
[2154] = {text = 'Entrando en las Cuevas Hundidas.', newPos = Position(952, 1206, 11)}, -- to sunken caves
[2155] = {text = 'Entrando al Laberinto de Espejos de la Locura.', newPos = Position(1072, 1184, 11)}, -- from sunken caves
[2156] = {text = 'Entrando en la sala de Zugurosh.', newPos = Position(1106, 1191, 11)}, -- to zugurosh ward
[2157] = {text = 'Entrando en los Pasillos Sangrientos.', bossStorage = 201, newPos = Position(1071, 1136, 14), storage = 2}, -- from zugurosh ward
[2158] = {text = 'Escapando de vuelta al Refugio.', newPos = Position(948, 1227, 14)}, -- from blood halls
[2159] = {text = 'Entrando en los Pasillos Sangrientos.', newPos = Position(1071, 1136, 14), storage = 2}, -- to blood halls
[2160] = {text = 'Entrando en la Fundicion.', newPos = Position(1053, 1111, 11)}, -- to foundry
[2161] = {text = 'Entrando en la sala de Madareth.', newPos = Position(1091, 1131, 11)}, -- to madareth ward
[2162] = {text = 'Entrando en los Tanques.', bossStorage = 202, newPos = Position(867, 1205, 12), storage = 3}, -- from madareth ward
[2163] = {text = 'Escapando de vuelta al Refugio.', newPos = Position(948, 1227, 14)}, -- from vats
[2164] = {text = 'Entrando en los Tanques.', newPos = Position(867, 1205, 12), storage = 3}, -- to vats
[2165] = {text = 'Entrando al Campo de Batalla.', newPos = Position(861, 1188, 11)}, -- to battlefield
[2166] = {text = 'Entrando en los Tanques.', newPos = Position(947, 1181, 12)}, -- from battlefield
[2167] = {text = 'Entrando en la Forja de Demonios.', newPos = Position(927, 1231, 11)}, -- to brothers ward
[2168] = {text = 'Entrando en el Arcanum.', bossStorage = 203, newPos = Position(859, 1236, 12), storage = 4}, -- from demon forge
[2169] = {text = 'Escapando de vuelta al Refugio.', newPos = Position(948, 1227, 14)}, -- from arcanum
[2170] = {text = 'Entrando en el Arcanum.', newPos = Position(859, 1236, 12), storage = 4}, -- to arcanum
[2171] = {text = 'Entrando en los Pozos de Almas.', newPos = Position(876, 1148, 13)}, -- to soul wells
[2172] = {text = 'Entrando en el Arcanum.', newPos = Position(1007, 1242, 12)}, -- from soul wells
[2173] = {text = 'Entrando en la sala de Annihilon.', newPos = Position(946, 1208, 13)}, -- to annihilon ward
[2174] = {text = 'Entrando en la Colmena.', bossStorage = 204, newPos = Position(1150, 1153, 15), storage = 5}, -- from annihilon ward
[2175] = {text = 'Escapando de vuelta al Refugio.', newPos = Position(948, 1227, 14)}, -- from hive
[2176] = {text = 'Entrando en la Colmena.', newPos = Position(1150, 1153, 15), storage = 5}, -- to hive
[2177] = {text = 'Entrando en la sala de Hellgorak.', newPos = Position(1106, 1135, 14)}, -- to hellgorak ward
[2178] = {text = 'Entrando en el Nexo Sombrío. Abandonen toda esperanza.', bossStorage = 205, newPos = Position(1148, 1135, 12), storage = 6}, -- from hellgorak ward
[2179] = {text = 'Escapando de vuelta al Refugio.', newPos = Position(948, 1227, 14)}, -- from nexo sombrio
[2180] = {text = 'Entrando en los Pasillos Sangrientos.', newPos = Position(1056, 1112, 12)} -- from foundry to blood halls
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local teleport = teleports[item.uid]
if teleport.alwaysSetStorage and player:getStorageValue(PlayerStorageKeys.TheInquisition.EnterTeleport) < teleport.storage then
player:setStorageValue(PlayerStorageKeys.TheInquisition.EnterTeleport, teleport.storage)
end
if teleport.bossStorage then
if Game.getStorageValue(teleport.bossStorage) == 2 then
if player:getStorageValue(PlayerStorageKeys.TheInquisition.EnterTeleport) < teleport.storage then
player:setStorageValue(PlayerStorageKeys.TheInquisition.EnterTeleport, teleport.storage)
end
else
player:teleportTo(Position(948, 1227, 14))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say('Escapando de vuelta al Refugio.', TALKTYPE_MONSTER_SAY)
return true
end
elseif teleport.storage and player:getStorageValue(PlayerStorageKeys.TheInquisition.EnterTeleport) < teleport.storage then
player:teleportTo(fromPosition)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say('No tienes suficiente energía para entrar en este portal.', TALKTYPE_MONSTER_SAY)
return true
end
player:teleportTo(teleport.newPos)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say(teleport.text, TALKTYPE_MONSTER_SAY)
return true
end
If any piece of code is missing, please let me know. I hope you guys can help me identify where is the issue! Regards