• 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 Help Request : Spell Damage Causes Visual(?) Bug On Monster Death

eupharias

New Member
Joined
Apr 17, 2023
Messages
13
Reaction score
1
Location
USA
#~I HAVE CREATED A NEW THREAD UNDER OTCLIENT~#

For those facing the same issue:
In my case, this issue is present only when using OTClient. While using the default client with Ipchanger, I don't see this issue. Please check out my other thread (above) for a potential resolution for OTClient. Cheers.



Notice in the clip below that I'm killing monsters two different ways. When the killing blow is dealt by the damage from my wand only, the creature dies and the corpse spawns as expected. However, when I trigger spell damage (Apprentice Fire Strike via hotkey in this example) as the killing blow, just as the wand's damage lands, the creature does die, but it doesn't remove the creature and it doesn't spawn the corpse.

Interestingly, if a creature dies in this way, they are still recognized as an obstacle for my player, but not for other monsters.

There are no console logs reporting issues for this. The only messages you'll see are from a script I'm running, and it's just debug information, but I'm including them here just for completion's sake.

Please share your thoughts. I couldn't find any similar reports on the forum about this issue. Please feel free to point me to another thread if you know of one that's already been answered.


Console Logs
EDIT: I AM INCLUDING THIS TO SHOW THAT THERE ARE NO ERRORS BEING RETURNED RELATING TO THIS ISSUE. PLEASE READ MY EXPLANATION ABOVE FOR CONTEXT

Code:
Cal Test Sorc has logged in.

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). wolves
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). wolves
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
data/creaturescripts/scripts/CreatureKillQuest.lua:15: attempt to index local 'monster' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). wolves
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). wolves
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>
Post automatically merged:



Updates
  • This is happening even if I don't use my wand. If the monster dies as a result of spell damage from any spell, the bug will occur.
  • I've tried this with several different characters, and the bug only occurs if spell damage drops the creature to zero hit points. Damage from any other source will delete the creature and spawn the corpse as expected. Tested using many different low level spells, the result is always the same.
  • It has nothing to do with debugPrint. Just to be sure, I've disabled the CreatureKillQuest.lua script to troubleshoot and the error persists.
  • Issue with OTClient identified. Closing this thread.
 
Last edited:
Notice in the clip below that I'm killing monsters two different ways. When the killing blow is dealt by the damage from my wand only, the creature dies and the corpse spawns as expected. However, when I trigger spell damage (Apprentice Fire Strike via hotkey in this example) as the killing blow, just as the wand's damage lands, the creature does die, but it doesn't remove the creature and it doesn't spawn the corpse.

Interestingly, if a creature dies in this way, they are still recognized as an obstacle for my player, but not for other monsters.

There are no console logs reporting issues for this. The only messages you'll see are from a script I'm running, and it's just debug information, but I'm including them here just for completion's sake.

Please share your thoughts. I couldn't find any similar reports on the forum about this issue. Please feel free to point me to another thread if you know of one that's already been answered.


Console Logs
Code:
Cal Test Sorc has logged in.

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). wolves
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). wolves
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
data/creaturescripts/scripts/CreatureKillQuest.lua:15: attempt to index local 'monster' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). wolves
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). wolves
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>
Post the script creaturekilllquest.lua
 
Post the script creaturekilllquest.lua

Lua:
local monsterList =
{
    ["wolf"] = {plural = "wolves", storage = 10001, count = 25, expe = 800},
    ["bear"] = {plural = "bears", storage = 10002, count = 20, expe = 1000},
    ["rat"] = {plural = "rats", storage = 10003, count = 30, expe = 600}
}

function onKill(cid, target)
    debugPrint("onKill function is called.")
    if(isPlayer(target) == true) then
        return true
    end
    
    local monster = monsterList[string.lower(getCreatureName(target))]
    debugPrint("" ..monster.plural.. "")
    
    if(not monster) then
        debugPrint("NOT MONSTER conditional was activated... this is bad!")
        return true
    end

    if getPlayerStorageValue(cid,monster.storage) == ((monster.count)-1) then
    setPlayerStorageValue(cid,monster.storage, (monster.count))
        doPlayerPopupFYI(cid, "*#Congratulations!#*\n\n\n You have killed " ..monster.count.. " " ..monster.plural.. " and finished your task!\n\n   *Go talk to Tom in town to receive your reward.")
    return true
    end
    
    if getPlayerStorageValue(cid, monster.storage) == ((monster.count)) then
        return true
    end
    
    if getPlayerStorageValue(cid, monster.storage) < 0 then
        return true
    end
    
    -- INCREMENT THE STORAGE VALUE BY 1 AFTER KILL.
    setPlayerStorageValue(cid, monster.storage, (getPlayerStorageValue(cid, monster.storage))+1)
    debugPrint(monster.count - getPlayerStorageValue(cid, monster.storage).. " monsters remaining.")
    doPlayerSendTextMessage(cid, 20, "You have killed " ..monster.count - getPlayerStorageValue(cid, monster.storage).. "/" ..monster.count.. " " ..monster.plural.. ".")
    return true
end
 
Lua:
local monsterList =
{
    ["wolf"] = {plural = "wolves", storage = 10001, count = 25, expe = 800},
    ["bear"] = {plural = "bears", storage = 10002, count = 20, expe = 1000},
    ["rat"] = {plural = "rats", storage = 10003, count = 30, expe = 600}
}

function onKill(cid, target)
    debugPrint("onKill function is called.")
    if(isPlayer(target) == true) then
        return true
    end
  
    local monster = monsterList[string.lower(getCreatureName(target))]
    debugPrint("" ..monster.plural.. "")
  
    if(not monster) then
        debugPrint("NOT MONSTER conditional was activated... this is bad!")
        return true
    end

    if getPlayerStorageValue(cid,monster.storage) == ((monster.count)-1) then
    setPlayerStorageValue(cid,monster.storage, (monster.count))
        doPlayerPopupFYI(cid, "*#Congratulations!#*\n\n\n You have killed " ..monster.count.. " " ..monster.plural.. " and finished your task!\n\n   *Go talk to Tom in town to receive your reward.")
    return true
    end
  
    if getPlayerStorageValue(cid, monster.storage) == ((monster.count)) then
        return true
    end
  
    if getPlayerStorageValue(cid, monster.storage) < 0 then
        return true
    end
  
    -- INCREMENT THE STORAGE VALUE BY 1 AFTER KILL.
    setPlayerStorageValue(cid, monster.storage, (getPlayerStorageValue(cid, monster.storage))+1)
    debugPrint(monster.count - getPlayerStorageValue(cid, monster.storage).. " monsters remaining.")
    doPlayerSendTextMessage(cid, 20, "You have killed " ..monster.count - getPlayerStorageValue(cid, monster.storage).. "/" ..monster.count.. " " ..monster.plural.. ".")
    return true
end
The problem is that function called debugPrint in your script, it exist in your server? If not, try changing to print only, like:

print("onKill function is called.") and print(monster.plural) as exemple

REMEMBER TO CHANGE ALL DEBUGPRINT TO PRINT
 
debugPrint is just printing information to the console for debugging purposes. In this case, I have it printing information so that I can troubleshoot other issues relating to a quest I'm working on. I'm certain it has nothing to do with this issue, as the issue still exists even if I remove the script altogether.
 
debugPrint is just printing information to the console for debugging purposes. In this case, I have it printing information so that I can troubleshoot other issues relating to a quest I'm working on. I'm certain it has nothing to do with this issue, as the issue still exists even if I remove the script altogether.


Lua:
local monsterList =
{
    ["wolf"] = {plural = "wolves", storage = 10001, count = 25, expe = 800},
    ["bear"] = {plural = "bears", storage = 10002, count = 20, expe = 1000},
    ["rat"] = {plural = "rats", storage = 10003, count = 30, expe = 600}
}

function onKill(cid, target)
    debugPrint("onKill function is called.")
    local monster = monsterList[getCreatureName(target):lower()]
    if(not monster) then
        debugPrint("NOT MONSTER conditional was activated... monster ".. getCreatureName(target) .." doesn't exist in the table.. make sure to add later!")
        return true
    end
    debugPrint(monster.plural)
    if (isPlayer(target) == true) then
        return true
    end
 

    if getPlayerStorageValue(cid,monster.storage) == ((monster.count)-1) then
    setPlayerStorageValue(cid,monster.storage, (monster.count))
        doPlayerPopupFYI(cid, "*#Congratulations!#*\n\n\n You have killed " ..monster.count.. " " ..monster.plural.. " and finished your task!\n\n   *Go talk to Tom in town to receive your reward.")
    return true
    end
 
    if getPlayerStorageValue(cid, monster.storage) == ((monster.count)) then
        return true
    end
 
    if getPlayerStorageValue(cid, monster.storage) < 0 then
        return true
    end
 
    -- INCREMENT THE STORAGE VALUE BY 1 AFTER KILL.
    setPlayerStorageValue(cid, monster.storage, (getPlayerStorageValue(cid, monster.storage))+1)
    debugPrint(monster.count - getPlayerStorageValue(cid, monster.storage).. " monsters remaining.")
    doPlayerSendTextMessage(cid, 20, "You have killed " ..monster.count - getPlayerStorageValue(cid, monster.storage).. "/" ..monster.count.. " " ..monster.plural.. ".")
    return true
end
 
Lua:
local monsterList =
{
    ["wolf"] = {plural = "wolves", storage = 10001, count = 25, expe = 800},
    ["bear"] = {plural = "bears", storage = 10002, count = 20, expe = 1000},
    ["rat"] = {plural = "rats", storage = 10003, count = 30, expe = 600}
}

function onKill(cid, target)
    debugPrint("onKill function is called.")
    local monster = monsterList[getCreatureName(target):lower()]
    if(not monster) then
        debugPrint("NOT MONSTER conditional was activated... this is bad!")
        return true
    end
    debugPrint(monster.plural)
    if (isPlayer(target) == true) then
        return true
    end
   

    if getPlayerStorageValue(cid,monster.storage) == ((monster.count)-1) then
    setPlayerStorageValue(cid,monster.storage, (monster.count))
        doPlayerPopupFYI(cid, "*#Congratulations!#*\n\n\n You have killed " ..monster.count.. " " ..monster.plural.. " and finished your task!\n\n   *Go talk to Tom in town to receive your reward.")
    return true
    end
   
    if getPlayerStorageValue(cid, monster.storage) == ((monster.count)) then
        return true
    end
   
    if getPlayerStorageValue(cid, monster.storage) < 0 then
        return true
    end
   
    -- INCREMENT THE STORAGE VALUE BY 1 AFTER KILL.
    setPlayerStorageValue(cid, monster.storage, (getPlayerStorageValue(cid, monster.storage))+1)
    debugPrint(monster.count - getPlayerStorageValue(cid, monster.storage).. " monsters remaining.")
    doPlayerSendTextMessage(cid, 20, "You have killed " ..monster.count - getPlayerStorageValue(cid, monster.storage).. "/" ..monster.count.. " " ..monster.plural.. ".")
    return true
end

Please forget about this script. I've disabled it. It's not the problem.
 
You're focusing entirely on the wrong part of my post. My issue has nothing to do with any scripts that are running, or anything at all to do with CreatureKillQuest.lua. I posted those things at your request, because you seemed to believe my issue had something to do with it - and it doesn't.

My problem is that spell damage reducing creatures to zero HP causes them to freeze, become untargetable, and delays the production of a creature corpse by upwards of a full minute. This issue occurs 100% of the time, and is reproduceable on a fresh installation of TFS 1.4. I appreciate you taking the time to look at my post, but please read my original message before responding. Don't simply look at the Console.log and assume there are issues there - I included the Console.log to show everyone that there are no issues being reported in the logs.

I'm still looking for help on this issue, if anyone else has any ideas.
 
You're focusing entirely on the wrong part of my post. My issue has nothing to do with any scripts that are running, or anything at all to do with CreatureKillQuest.lua. I posted those things at your request, because you seemed to believe my issue had something to do with it - and it doesn't.

My problem is that spell damage reducing creatures to zero HP causes them to freeze, become untargetable, and delays the production of a creature corpse by upwards of a full minute. This issue occurs 100% of the time, and is reproduceable on a fresh installation of TFS 1.4. I appreciate you taking the time to look at my post, but please read my original message before responding. Don't simply look at the Console.log and assume there are issues there - I included the Console.log to show everyone that there are no issues being reported in the logs.

I'm still looking for help on this issue, if anyone else has any ideas.

Maybe, just maybe, okay? The reason why I focused on this problem is because your console demonstrates error in this script, since for example in your script table the orc creature does not exist, being impossible to return the debugprint(monster.plural) to this creature, thus causing the script to malfunction and preventing the monster from dying as it should (something very normal in script of this type where it does not work).

Your console free of errors:
Code:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). onKill function is called.
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:9: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/CreatureKillQuest.lua:onKill
LuaScriptInterface::luaDebugPrint(). wolves
stack traceback:
        [C]: in function 'debugPrint'
        data/creaturescripts/scripts/CreatureKillQuest.lua:15: in function <data/creaturescripts/scripts/CreatureKillQuest.lua:8>

How did you include the console log to show that there are no problems when it clearly shows a problem in the debugprint function in the script in line 9 and 15? If you look at the picture of my console, this is how an error-free console should look.

Anyway, had you been editing your original post with more information, thinking I would read it every moment? and there's also another problem, you seem to me too harsh for someone who has asked for help with someone who is trying to help you. If you don't have the patience to do so, there is a session where you can hire a good scripter to see your problems.

I think I can also try to help you with this, click here.
 
you seem to me too harsh for someone who has asked for help with someone who is trying to help you
You're right about this, and I apologize. I've been trying to figure it out for a while now and I'm frustrated, but that's no excuse. I appreciate your time spent helping me.

The reason why I focused on this problem is because your console demonstrates error in this script, since for example in your script table the orc creature does not exist, being impossible to return the debugprint(monster.plural) to this creature, thus causing the script to malfunction and preventing the monster from dying as it should (something very normal in script of this type where it does not work).
This, however, is not the cause for my issue. I appreciate that you are spending time trying to help me resolve it, but I ask that we focus on something else. Let me explain.

Firstly, as I've said, I have my CreatureKillQuest.lua script disabled now. You'll see that in the logs below. It's not causing any issues, the console messages in my original post are just informing me that 'Orc' isn't in my iterable list of creature types for the quest, while 'wolves' are. If you look at the original video, you can see that both Wolves and Orcs exhibit the freezing issue, regardless of whether or not they're in that debugPrint list.

But let's move on from that, and I'll share another example.




This video shows two things:
  1. When I kill the first chicken, I'm using damage from a spell (Specifically damage from 'exori flam min', Apprentice Flame Strike.) The chicken does die, and it becomes untargetable, and it does not create a corpse.
  2. The second and third chickens that I'm killing, I've used a wand to do so. Killing a creature in this way creates a corpse as expected, and does not produce the bug.
Note that only spell damage is causing this issue. I can kill enemies with wands, rods, swords, clubs, my fists, you name it. They all work fine. Only spell damage is creating the bug that I'm facing.

Here's my updated console log, as you can see CreatureKillQuest.lua has been completely removed, and the quest is broken now.
Please forget about this script. I've disabled it. It's not the problem.

Code:
C:\Dane\forgottenserver-1.4.1-custom>tfs.exe
The Forgotten Server - Version v1.4
Git SHA1 063a6bfd dated 2021-09-17T19:21:40-04:00


Compiled with Microsoft Visual C++ version 14.2
Compiled on Sep 17 2021 23:26:25 for platform x64
Linked with LuaJIT 2.0.5 for Lua support


A server developed by Mark Samman
Visit our forum for updates, support, and resources: https://otland.net/.


>> Loading config
>> Establishing database connection... MySQL 10.5.5
>> Running database manager
>> Loading vocations
>> Loading items
>> Loading script systems
>> Using LuaJIT 2.0.5
>> Loading lua libs
[Warning - Event::checkScript] Can not load script: scripts/CreatureKillQuest.lua
cannot open data/creaturescripts/scripts/CreatureKillQuest.lua: No such file or directory
>> Loading lua scripts
>> Loading monsters
>> Loading lua monsters
>> Loading outfits
>> Checking world type... PVP
>> Loading map
> Map size: 34143x33812.
Duplicate unique id: 1000
Duplicate unique id: 1003
Duplicate unique id: 1002
Duplicate unique id: 1001
Duplicate unique id: 3116
> Map loading time: 11.628 seconds.
> Loaded house items in: 0.008 s
>> Initializing gamestate
>> Loaded all modules, server starting up...
>> Rookgaard Expanded Server Online!


Cal Test Sorc has logged in.
 
You're right about this, and I apologize. I've been trying to figure it out for a while now and I'm frustrated, but that's no excuse. I appreciate your time spent helping me.


This, however, is not the cause for my issue. I appreciate that you are spending time trying to help me resolve it, but I ask that we focus on something else. Let me explain.

Firstly, as I've said, I have my CreatureKillQuest.lua script disabled now. You'll see that in the logs below. It's not causing any issues, the console messages in my original post are just informing me that 'Orc' isn't in my iterable list of creature types for the quest, while 'wolves' are. If you look at the original video, you can see that both Wolves and Orcs exhibit the freezing issue, regardless of whether or not they're in that debugPrint list.

But let's move on from that, and I'll share another example.




This video shows two things:
  1. When I kill the first chicken, I'm using damage from a spell (Specifically damage from 'exori flam min', Apprentice Flame Strike.) The chicken does die, and it becomes untargetable, and it does not create a corpse.
  2. The second and third chickens that I'm killing, I've used a wand to do so. Killing a creature in this way creates a corpse as expected, and does not produce the bug.
Note that only spell damage is causing this issue. I can kill enemies with wands, rods, swords, clubs, my fists, you name it. They all work fine. Only spell damage is creating the bug that I'm facing.

Here's my updated console log, as you can see CreatureKillQuest.lua has been completely removed, and the quest is broken now.


Code:
C:\Dane\forgottenserver-1.4.1-custom>tfs.exe
The Forgotten Server - Version v1.4
Git SHA1 063a6bfd dated 2021-09-17T19:21:40-04:00


Compiled with Microsoft Visual C++ version 14.2
Compiled on Sep 17 2021 23:26:25 for platform x64
Linked with LuaJIT 2.0.5 for Lua support


A server developed by Mark Samman
Visit our forum for updates, support, and resources: https://otland.net/.


>> Loading config
>> Establishing database connection... MySQL 10.5.5
>> Running database manager
>> Loading vocations
>> Loading items
>> Loading script systems
>> Using LuaJIT 2.0.5
>> Loading lua libs
[Warning - Event::checkScript] Can not load script: scripts/CreatureKillQuest.lua
cannot open data/creaturescripts/scripts/CreatureKillQuest.lua: No such file or directory
>> Loading lua scripts
>> Loading monsters
>> Loading lua monsters
>> Loading outfits
>> Checking world type... PVP
>> Loading map
> Map size: 34143x33812.
Duplicate unique id: 1000
Duplicate unique id: 1003
Duplicate unique id: 1002
Duplicate unique id: 1001
Duplicate unique id: 3116
> Map loading time: 11.628 seconds.
> Loaded house items in: 0.008 s
>> Initializing gamestate
>> Loaded all modules, server starting up...
>> Rookgaard Expanded Server Online!


Cal Test Sorc has logged in.
cant help u about that, doesnt have a tfs 1.4.1 or 1.4.2 in my system, its clean? I see rookgaard map, so maybe u already added more scripts, if not clean, try a clean one and see if that occurs, if with a clean tfs u got that problem, maybe in the repository they have the solution.

here is your script as revscript with updated functions name that i tested here(i know its not your problem now, but I do that before, so here it is).
Lua:
local monsterList = {
    ["wolf"] = {plural = "wolves", storage = 10004, count = 25, expe = 800},
    ["bear"] = {plural = "bears", storage = 10005, count = 20, expe = 1000},
    ["rat"] = {plural = "rats", storage = 10006, count = 30, expe = 600}
}

local creatureonkill = CreatureEvent("creatureOnKill")
function creatureonkill.onKill(player, target)
    print("onKill function is called.")
    local info = monsterList[target:getName():lower()]
    if not info or target:getMaster() or target:isPlayer() then
        return print("NOT MONSTER conditional was activated... monster ".. target:getName() .." doesn't exist in the table, can be a player or even a summon.. make sure to add later!")
    end

    local getStorage = player:getStorageValue(info.storage)
    -- LETS CHECK IF PLAYER ALREADY KILLED MAX MONSTERS OR DOESNT GET THE QUEST WITH STORAGE BELOW 0
    if getStorage == info.count or getStorage < 0 then
        return print("player has no storage to start or storage is already " .. info.count .." kills!")
    end
   
    -- LETS REWARD WITH MAX STORAGE AND SEND POPUPFYI
    if getStorage == info.count - 1 then
        player:setStorageValue(info.storage, info.count)
        return player:popupFYI("*#Congratulations!#*\n\n\n You have killed " ..info.count.. " " ..info.plural.. " and finished your task!\n\n   *Go talk to Tom in town to receive your reward.")
    end

    -- INCREMENT THE STORAGE VALUE BY 1 AFTER KILL.
    player:setStorageValue(info.storage, getStorage + 1)
    player:sendTextMessage(20, string.format("You have killed %s/%s %s.", getStorage + 1, info.count, info.plural))
    local calc = (info.count - (getStorage + 1))
    print(string.format("%s monsters remaining.", calc < 0 and 0 or calc))
    return true
end
creatureonkill:register()


--lets register the script above
local creaturelogin = CreatureEvent("creatureLogin")
function creaturelogin.onLogin(player)
    player:registerEvent("creatureOnKill")
    return true
end
creaturelogin:register()
 
cant help u about that, doesnt have a tfs 1.4.1 or 1.4.2 in my system, its clean?
This example isn't clean, but I tried it with a clean installation just to make sure it wasn't anything I'd done to screw it up.

Thank you for trying to help, I appreciate it.
Post automatically merged:

Bump, if anyone has any ideas why this might be occurring?
Post automatically merged:

Additional Update:
The issue appears to be client-sided, which is odd. If I log in with two characters at once and observe Character A killing a creature with a spell, the creature dies and the body spawns appropriately for Character B. In this instance, Character A is the only one that experiences the issue.

issue_a.png
Post automatically merged:

RESOLVED
The issue is something to do with OTClient. I still need to troubleshoot what's going on there, but I'm going to close this thread as resolved since it has nothing to do with TFS.
 
Last edited:
Back
Top