• 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 0.X doCreatureSay causing client assertion

-vG

New Member
Joined
Oct 18, 2018
Messages
39
Solutions
1
Reaction score
4
Location
Brazil
Hello everyone,
I'm trying to use the source of the old svn tfs that is found in github

is based on version 0.2

The problem is that all the scripts you have
doCreatureSay with TALKTYPE_ORANGE_1 causing debugging on tibia client

Does anyone know a possible solution? I already tried to change the numbers that stay in the global.lua but it did not work

client version 8.60
 
Hello everyone,
I'm trying to use the source of the old svn tfs that is found in github

is based on version 0.2

The problem is that all the scripts you have
doCreatureSay with TALKTYPE_ORANGE_1 causing debugging on tibia client

Does anyone know a possible solution? I already tried to change the numbers that stay in the global.lua but it did not work

client version 8.60
can you post you sources here?
 
Lua:
local food =
{
    [2362] = {8, "Crunch."},
    [2666] = {15, "Munch."},
    [2667] = {12, "Munch."},
    [2668] = {10, "Mmmm."},
    [2669] = {17, "Munch."},
    [2670] = {4, "Gulp."},
    [2671] = {30, "Chomp."},
    [2672] = {60, "Chomp."},
    [2673] = {5, "Yum."},
    [2674] = {6, "Yum."},
    [2675] = {13, "Yum."},
    [2676] = {8, "Yum."},
    [2677] = {1, "Yum."},
    [2678] = {18, "Slurp."},
    [2679] = {1, "Yum."},
    [2680] = {2, "Yum."},
    [2681] = {9, "Yum."},
    [2682] = {20, "Yum."},
    [2683] = {17, "Munch."},
    [2684] = {8, "Crunch."},
    [2685] = {6, "Munch."},
    [2686] = {9, "Crunch."},
    [2687] = {2, "Crunch."},
    [2688] = {9, "Munch."},
    [2689] = {10, "Crunch."},
    [2690] = {3, "Crunch."},
    [2691] = {8, "Crunch."},
    [2792] = {6, "Munch."},
    [2793] = {9, "Munch."},
    [2695] = {6, "Gulp."},
    [2696] = {9, "Smack."},
    [2787] = {9, "Munch."},
    [2788] = {4, "Munch."},
    [2789] = {22, "Munch."},
    [2790] = {30, "Munch."},
    [2791] = {30, "Munch."},
    [2792] = {6, "Munch."},
    [2794] = {3, "Munch."},
    [2795] = {36, "Munch."},
    [2796] = {5, "Munch."},
    [2793] = {9, "Munch."},
    [5097] = {4, "Yum."},
    [6125] = {8, "Gulp."},
    [6278] = {10, "Mmmm."},
    [6279] = {15, "Mmmm."},
    [6393] = {12, "Mmmm."},
    [6394] = {15, "Mmmm."},
    [6501] = {20, "Mmmm."},
    [6541] = {6, "Gulp."},
    [6542] = {6, "Gulp."},
    [6543] = {6, "Gulp."},
    [6544] = {6, "Gulp."},
    [6545] = {6, "Gulp."},
    [6569] = {1, "Mmmm."},
    [6574] = {4, "Mmmm."},
    [7158] = {15, "Munch."},
    [7159] = {13, "Munch."},
    [7372] = {7, "Yum."},
    [7373] = {7, "Yum."},
    [7374] = {7, "Yum."},
    [7375] = {7, "Yum."},
    [7376] = {7, "Yum."},
    [7377] = {7, "Yum."}
}
function onUse(cid, item, frompos, item2, topos)
    if(food[item.itemid] ~= nil) then
        if (getPlayerFood(cid) + food[item.itemid][1]) >= 400 then
            doPlayerSendCancel(cid, "You are full.")
        else
            doPlayerFeed(cid, food[item.itemid][1] * 4)
            doCreatureSay(cid, food[item.itemid][2], TALKTYPE_ORANGE_1)
            doRemoveItem(item.uid, 1)
        end
        return TRUE
    end
    return FALSE
end

everything has to do with
TALKTYPE_ORANGE_1

debug cause
 
Lua:
local food =
{
    [2362] = {8, "Crunch."},
    [2666] = {15, "Munch."},
    [2667] = {12, "Munch."},
    [2668] = {10, "Mmmm."},
    [2669] = {17, "Munch."},
    [2670] = {4, "Gulp."},
    [2671] = {30, "Chomp."},
    [2672] = {60, "Chomp."},
    [2673] = {5, "Yum."},
    [2674] = {6, "Yum."},
    [2675] = {13, "Yum."},
    [2676] = {8, "Yum."},
    [2677] = {1, "Yum."},
    [2678] = {18, "Slurp."},
    [2679] = {1, "Yum."},
    [2680] = {2, "Yum."},
    [2681] = {9, "Yum."},
    [2682] = {20, "Yum."},
    [2683] = {17, "Munch."},
    [2684] = {8, "Crunch."},
    [2685] = {6, "Munch."},
    [2686] = {9, "Crunch."},
    [2687] = {2, "Crunch."},
    [2688] = {9, "Munch."},
    [2689] = {10, "Crunch."},
    [2690] = {3, "Crunch."},
    [2691] = {8, "Crunch."},
    [2792] = {6, "Munch."},
    [2793] = {9, "Munch."},
    [2695] = {6, "Gulp."},
    [2696] = {9, "Smack."},
    [2787] = {9, "Munch."},
    [2788] = {4, "Munch."},
    [2789] = {22, "Munch."},
    [2790] = {30, "Munch."},
    [2791] = {30, "Munch."},
    [2792] = {6, "Munch."},
    [2794] = {3, "Munch."},
    [2795] = {36, "Munch."},
    [2796] = {5, "Munch."},
    [2793] = {9, "Munch."},
    [5097] = {4, "Yum."},
    [6125] = {8, "Gulp."},
    [6278] = {10, "Mmmm."},
    [6279] = {15, "Mmmm."},
    [6393] = {12, "Mmmm."},
    [6394] = {15, "Mmmm."},
    [6501] = {20, "Mmmm."},
    [6541] = {6, "Gulp."},
    [6542] = {6, "Gulp."},
    [6543] = {6, "Gulp."},
    [6544] = {6, "Gulp."},
    [6545] = {6, "Gulp."},
    [6569] = {1, "Mmmm."},
    [6574] = {4, "Mmmm."},
    [7158] = {15, "Munch."},
    [7159] = {13, "Munch."},
    [7372] = {7, "Yum."},
    [7373] = {7, "Yum."},
    [7374] = {7, "Yum."},
    [7375] = {7, "Yum."},
    [7376] = {7, "Yum."},
    [7377] = {7, "Yum."}
}
function onUse(cid, item, frompos, item2, topos)
    if(food[item.itemid] ~= nil) then
        if (getPlayerFood(cid) + food[item.itemid][1]) >= 400 then
            doPlayerSendCancel(cid, "You are full.")
        else
            doPlayerFeed(cid, food[item.itemid][1] * 4)
            doCreatureSay(cid, food[item.itemid][2], TALKTYPE_ORANGE_1)
            doRemoveItem(item.uid, 1)
        end
        return TRUE
    end
    return FALSE
end

everything has to do with
TALKTYPE_ORANGE_1

debug cause
maybe can you try to change this
Lua:
doCreatureSay(cid, food[item.itemid][2], TALKTYPE_ORANGE_1)
TO
Lua:
doCreatureSay(cid, food[item.itemid][2], TALKTYPE_MONSTER)
not tested
 
I looked at the speakclass in the const.h and SPEAK_MONSTER_SAY is assigned the value 0x0D which is 13 in decimal and if you look at global.lua you'll see that TALKTYPE_ORANGE_1 is also assigned the value of 13.

Did you make any changes in the source doCreatureSay? If not then maybe you should use a more stable distribution preferably 1.x.
 
You said you use client 8.60 but the "SpeakClasses" in the src looks like it was 7.60 because on 8.60 "SPEAK_MONSTER_SAY" must be 19 not 13 and that's the problem, did these src originally was for 8.60 or someone modify them?
 
I get the source of github
in this link

so the solution is to change from 13 to 19?
change 13 to 19 not working
SPEAK_MONSTER_SAY is 34 according to the sources

You can use this to convert the hex values in the future for the SpeakClasses
C++:
enum SpeakClasses
{
    SPEAK_SAY        = 0x01,
    SPEAK_WHISPER        = 0x02,
    SPEAK_YELL        = 0x03,
    SPEAK_PRIVATE_FROM    = 0x04,
    SPEAK_PRIVATE_TO    = 0x05,
    SPEAK_CHANNEL_Y        = 0x07,
    SPEAK_CHANNEL_O        = 0x08,
    SPEAK_PRIVATE_NP    = 0x0A,
    SPEAK_PRIVATE_PN    = 0x0B,
    SPEAK_BROADCAST        = 0x0C,
    SPEAK_CHANNEL_R1        = 0x0D, //red - #c text
    SPEAK_PRIVATE_RED_FROM    = 0x0E, //@name@text
    SPEAK_PRIVATE_RED_TO    = 0x0F, //@name@text
    SPEAK_MONSTER_SAY    = 0x22,
    SPEAK_MONSTER_YELL    = 0x23,

    SPEAK_CHANNEL_R2    = 0xFF + 4, //#d
    SPEAK_CHANNEL_W        = 0xFF + 5
};
 
Back
Top