• 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!

TFS 1.X+ NPC "trade" crash

Hayvosh

Member
Joined
Feb 7, 2019
Messages
40
Solutions
2
Reaction score
10
Location
Sweden
Hello,

I just noticed a bug I think with TFS 1.5 Nekiro downgrade using 7.72.
When walking to a NPC and saying "Hi" and then saying "trade" the client completly crashes with the following error:


Code:
Debug Assertion 7.72 Control.cpp 1274
Sun Dec 26 13:58:46 2021
Windows Version: 6.2 build 9200 on 2
Graphic Engine: 2
Last Packet Types: 122 170 170 107 170 101 109 101 109 104
Last Packet: 004 001 170 005 000 000 000 010 000 071 079 068 032 072 097 121
Player Position: [33215,31812,6]
Player.cpp 383: exception occurred, reason:
Network.cpp 885: exception occurred (ErrorCode = 0), reason:
Control.cpp 1280: exception occurred (Type = 122), reason:
Control.cpp 1274: unknown packet type during game (Type = 122)

As the trade feature from NPCs wasnt implemented on clien 7.72, is there a way to disable the NPCs from "listening" to the Trade command?
 
Thank you @Nekiro !
Support from the master :)

Worked wonders!
Post automatically merged:

@Nekiro one final question, then I should be on my merry way and not have any bugs left I think.
When using house spells, like invite guest and subowner to a house, there is no reaction when typing the commands.

I am the owner of a house, and when I am standing inside (or outside the door) and type "aleta sio" there is nothing at all happening, no error message, nothing.

This is from spells.xml

XML:
    <!-- House Spells -->

    <instant spellid="71" name="House Guest List" words="aleta sio" selftarget="1" aggressive="0" function="editHouseGuest" />
    <instant spellid="72" name="House Subowner List" words="aleta som" selftarget="1" aggressive="0" function="editHouseSubOwner" />
    <instant spellid="73" name="House Door List" words="aleta grav" selftarget="1" aggressive="0" function="editHouseDoor" />
    <instant spellid="74" name="House Kick" words="alana sio" params="1" aggressive="0" function="houseKick" />

And this is from "editHouseGest" lua (invite_guests.lua)

Lua:
function onCastSpell(creature, variant)
    local house = creature:getTile():getHouse()
    if not house or not house:canEditAccessList(GUEST_LIST, creature) then
        creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
        creature:getPosition():sendMagicEffect(CONST_ME_POFF)
        return false
    end

    creature:setEditHouse(house, GUEST_LIST)
    creature:sendHouseWindow(house, GUEST_LIST)
    return true
end

What am I missing?
 
Thank you @Nekiro !
Support from the master :)

Worked wonders!
Post automatically merged:

@Nekiro one final question, then I should be on my merry way and not have any bugs left I think.
When using house spells, like invite guest and subowner to a house, there is no reaction when typing the commands.

I am the owner of a house, and when I am standing inside (or outside the door) and type "aleta sio" there is nothing at all happening, no error message, nothing.

This is from spells.xml

XML:
    <!-- House Spells -->

    <instant spellid="71" name="House Guest List" words="aleta sio" selftarget="1" aggressive="0" function="editHouseGuest" />
    <instant spellid="72" name="House Subowner List" words="aleta som" selftarget="1" aggressive="0" function="editHouseSubOwner" />
    <instant spellid="73" name="House Door List" words="aleta grav" selftarget="1" aggressive="0" function="editHouseDoor" />
    <instant spellid="74" name="House Kick" words="alana sio" params="1" aggressive="0" function="houseKick" />

And this is from "editHouseGest" lua (invite_guests.lua)

Lua:
function onCastSpell(creature, variant)
    local house = creature:getTile():getHouse()
    if not house or not house:canEditAccessList(GUEST_LIST, creature) then
        creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
        creature:getPosition():sendMagicEffect(CONST_ME_POFF)
        return false
    end

    creature:setEditHouse(house, GUEST_LIST)
    creature:sendHouseWindow(house, GUEST_LIST)
    return true
end

What am I missing?
Your spells.xml is pointing to hardcoded functions "function=""", you have to use script tag and point to proper file inside your spells/scripts directory
 

Similar threads

Back
Top