Yes, it's me again..
A little problem I got is that monsters can't really die on my server.. lol
I got an error in tfs
But I have noo idea how to sort that...
Here is that script
Plz help
Atleast I give you guys stuff to do lol
EDIT! If I relogg all monsters with 0/XXX hp are normal corpses and the error message won't come until I kill the next ...
A little problem I got is that monsters can't really die on my server.. lol
Code:
22:13 You see a medusa.
Health: [0 / 4500].
Position: [X: 804] [Y: 1278] [Z: 7].
Code:
[18/11/2014 22:15:22] [Error - CreatureScript Interface]
[18/11/2014 22:15:22] data/creaturescripts/scripts/Inquisition.lua:eek:nKill
[18/11/2014 22:15:22] Description:
[18/11/2014 22:15:22] data/creaturescripts/scripts/Inquisition.lua:28: attempt to index global 't' (a nil value)
[18/11/2014 22:15:23] stack traceback:
[18/11/2014 22:15:23] data/creaturescripts/scripts/Inquisition.lua:28: in function <data/creaturescripts/scripts/Inquisition.lua:19>
Here is that script
Code:
local config = {
timeToRemove = 120, -- seconds
message = "You now have 2 minutes to exit this room through the teleporter. It will bring you to the next room only during this time or the teleporter will disappear",
teleportId = 1387,
bosses = { -- Monster Name, Teleport Position
["Ushuriel"] = { pos={ x=1712, y=847, z=12, stackpos=1 }, aid=1001 },
["Zugurosh"] = { pos={ x=1745, y=846, z=12, stackpos=1 }, aid=1002},
["Madareth"] = { pos={ x=1720, y=882, z=12, stackpos=1 }, aid=1003},
["Annihilon"] = { pos={ x=1795, y=842, z=12, stackpos=1 }, aid=1005},
["Hellgorak"] = { pos={ x=1800, y=884, z=12, stackpos=1 }, aid=1006},
["Golgordan"] = { pos={ x=1755, y=884, z=12, stackpos=1 }, aid=1004}
}
}
local function removal(position)
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
return TRUE
end
function onKill(cid, target, lastHit)
if(config.bosses[getCreatureName(target)]) then
local t = config.bosses[getCreatureName(target)]
local teleport = doCreateItem(config.teleportId, t.pos)
local position = t.pos
doItemSetAttribute(teleport, "aid", t.aid)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
else
local teleport = doCreateItem(config.teleportId, t.pos)
local position = t.pos
doItemSetAttribute(teleport, "aid", t.aid)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
end
return true
end
Plz help
Atleast I give you guys stuff to do lol
EDIT! If I relogg all monsters with 0/XXX hp are normal corpses and the error message won't come until I kill the next ...
Last edited by a moderator: