• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Creatures won't die (lol) TFS 0.3.6

Finduz

New Member
Joined
Nov 13, 2014
Messages
40
Reaction score
0
Yes, it's me again..

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].
I got an error in tfs
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>
But I have noo idea how to sort that...
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:
Remove this
Code:
  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)
 
Remove this
Code:
  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)
Now this happens "The forgotten server has stopped working"
UinD2-sn5.png
 
Try different libmysql.dll.
http://www.speedy*****malware.localhost/wRVA6/libmysql.dll
Okay, the new .dll file fixed so I can start tfs again.
BUT monsters are still not dying lol, they just stand there with 0/XXX hp until I relog.
I don't get an error message now tho

EDIT Monsters do attack on 0/XXX hp, just they won't move and have no hp bar nor name
 
Post the script with the changes.
You can also look for other kill scripts in creaturescripts and post them too.
 
Post the script with the changes.
You can also look for other kill scripts in creaturescripts and post them too.
I took another look it seems as I deleted an "end" in the script, fixed it and it works as it should now!
Thanks again!
More problems are to be expected the comming week lol
You have been warned :p
 
Back
Top