• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Issue with /commands

OneDJ

New Member
Joined
May 7, 2020
Messages
6
Reaction score
0
Hi,

I have started a new OTS and whenever I try to type /commands (this happens on either GM account or normal account) Tibia crashes.
1589470309077.png
Would anyone please help me? Thanks a lot
 
Client version? TFS Version? Post your /commands script?
Please read Support board rules, You are supposed to post as much useful information as possible.
 
Client version: 8.6
I'm not sure about TFS version but this seems to be OTX server 3.
Script:
LUA:
local config = {
    guildTalksEnabled = getBooleanFromString(getConfigValue('ingameGuildManagement'))
}

function onSay(cid, words, param, channel)
    local playerAccess, t = getPlayerAccess(cid), {}
    for i, talk in ipairs(getTalkActionList()) do
        if(not talk.hide and playerAccess >= talk.access) then
            local tmp = talk.words:sub(1, 1):trim()
            if((guildTalksEnabled or (talk.words ~= "!joinguild" and talk.words ~= "!createguild")) and (tmp == "!" or tmp == "/")) then
                table.insert(t, talk)
            end
        end
    end

    table.sort(t, function(a, b) return a.access > b.access end)
    local lastAccess, str = -1, ""
    for i, talk in ipairs(t) do
        local line = ""
        if(lastAccess ~= talk.access) then
            if(i ~= 1) then
                line = "\n"
            end
            lastAccess = talk.access
        end
        str = str .. line .. talk.words .. "\n"
    end

    doShowTextDialog(cid, 2160, str)
    return true
end
 
Script looks alright, I have also tested it in-game OTX/TFS and it worked properly.
It has to be something else causes the crash.
Any console errors? Post your talkactions.xml and also try removing/tagging few lines of it and then retest /commands looks like its due to length.
 
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
<talkaction log="yes" words="/ban" access="4" event="script" value="ban.lua"/>
    <talkaction words="!vipdays;/addvip;/delvip;/checkvip" script="vip/vip.lua"/>
    <talkaction words="!addon" event="script" value="AddonDoll.lua"/>
    <talkaction words="!add" event="script" value="AddonDollinfinito.lua"/>
    <!-- Barra Marcelo -->
    <talkaction words="!saldo;!depositar;!verpontos;!addpontos;!removerpontos" event="script" value="sacarpontos.lua"/>

    
    <!-- WoE -->
    <talkaction words="/woe" event="script" value="woe.lua"/>
    <talkaction words="!recall" event="script" value="woe.lua"/>
    <talkaction words="!guild" event="script" value="register_woe.lua"/>
    
    
    <!-- Gods -->
    <talkaction log="yes" words="/attr" access="5" event="function" value="thingProporties"/>
    <talkaction log="yes" words="/serverdiag" access="5" event="function" value="diagnostics"/>
    <talkaction log="yes" words="/openserver" access="5" event="script" value="closeopen.lua"/>
    <talkaction log="yes" access="5" words="/mode" event="script" value="mode.lua"/>
    <talkaction log="yes" words="/closeserver" access="5" event="script" value="closeopen.lua"/>
    <talkaction log="yes" words="/skill;/addskill" access="5" event="script" value="skill.lua"/>

    <!-- Community Managers -->
    <talkaction log="yes" words="/s" access="4" event="script" value="summon.lua"/>
    <talkaction log="yes" words="/n" access="4" event="script" value="creature.lua"/>
    <talkaction log="yes" words="/m" access="4" event="script" value="creature.lua"/>
    <talkaction log="yes" words="/reload" access="4" event="script" value="reload.lua"/>
    <talkaction log="yes" words="/raid" access="4" event="script" value="raid.lua"/>
    <talkaction log="yes" words="/newtype" access="4" event="script" value="newtype.lua"/>
    <talkaction log="yes" words="/r" access="4" event="script" value="remove.lua"/>
    <talkaction log="yes" words="/owner" access="4" event="script" value="owner.lua"/>
    <talkaction log="yes" words="/storage" access="4" event="script" value="storage.lua"/>
    <talkaction log="yes" words="/config" access="4" event="script" value="configinfo.lua"/>
    <talkaction access="4" words="/z" event="script" value="magiceffect.lua"/>
    <talkaction access="4" words="/x" event="script" value="animationeffect.lua"/>
    <talkaction access="4" words="/y" event="script" value="animatedtext.lua"/>
    <talkaction log="yes" words="/bc" access="4" event="script" value="broadcastclass.lua"/>
    <talkaction log="yes" access="4" words="/mkick" event="script" value="masskick.lua"/>

    <!-- Gamemasters -->
    <talkaction log="yes" words="/ghost" access="3" event="function" value="ghost"/>
    <talkaction log="yes" words="/squelch" access="3" event="script" value="gamemaster.lua"/>
    <talkaction log="yes" words="/cliport" access="3" event="script" value="gamemaster.lua"/>
    <talkaction log="yes" words="/t" access="3" event="script" value="teleportmaster.lua"/>
    <talkaction log="yes" words="/c" access="3" event="script" value="teleporthere.lua"/>
    <talkaction log="yes" words="/goto" access="3" event="script" value="teleportto.lua"/>
    <talkaction log="yes" words="/a" access="3" event="script" value="teleporttiles.lua"/>
    <talkaction log="yes" words="/kick" access="3" event="script" value="kick.lua"/>
    <talkaction log="yes" words="/send" access="3" event="script" value="teleportsend.lua"/>
    <talkaction log="yes" words="/unban" access="3" event="script" value="unban.lua"/>
    <talkaction log="yes" words="/town" access="3" event="script" value="teleporttown.lua"/>
    <talkaction log="yes" words="/up" access="3" event="script" value="teleportfloor.lua"/>
    <talkaction log="yes" words="/down" access="3" event="script" value="teleportfloor.lua"/>
    <talkaction log="yes" words="/save" access="3" event="script" value="save.lua"/>
    <talkaction log="yes" words="/clean" access="3" event="script" value="clean.lua"/>
    <talkaction log="yes" words="/reports" access="3" event="script" value="reports.lua"/>
    <talkaction log="yes" words="/i" access="4" event="script" value="createitem.lua"/>
    <talkaction log="yes" words="/mc" access="3" event="script" value="multicheck.lua"/>
    <talkaction log="yes" access="3" words="/wp" event="script" value="waypoints.lua"/>


    <!-- Senior Tutors -->
    <talkaction log="yes" words="/notations" access="2" event="script" value="notations.lua"/>
    <talkaction log="yes" words="/info" access="2" event="script" value="playerinfo.lua"/>
    <talkaction log="yes" words="/gethouse" access="2" event="script" value="gethouse.lua"/>

    <!-- Tutors -->
    <talkaction log="yes" words="/baninfo" access="1" event="function" value="banishmentInfo"/>
    <talkaction log="yes" access="1" words="/pos" event="script" value="position.lua"/>
    <talkaction log="yes" access="2" words="/b" event="script" value="broadcast.lua"/>

    <!-- Players -->
    <talkaction words="!online" event="script" value="online.lua"/>
    <talkaction words="!uptime" event="script" value="uptime.lua"/>
    <talkaction words="!deathlist" event="script" value="deathlist.lua"/>
    <talkaction words="!pvp" event="script" value="pvp.lua"/>
    <talkaction words="!q" event="script" value="money.lua"/>
    <talkaction words="!serverinfo" event="script" value="serverinfo.lua"/>
    <talkaction words="!soft" script="soft.lua"/>
    <talkaction words="!bp" script="backpack.lua" />
    <talkaction words="!aol" script="aol.lua" />
    <talkaction words="!bless" script="bless.lua" />
    <talkaction words="!premium" script="premium.lua" />
    <talkaction words="!spells" script="spells.lua"/>
    <talkaction words="!frags" event="script" value="frags.lua"/>
    <talkaction words="/commands" event="script" value="commands.lua"/>


    <!-- Houses -->
    <talkaction words="!buyhouse" filter="word-spaced" event="function" value="houseBuy"/>
    <talkaction words="!sellhouse" filter="word-spaced" event="function" value="houseSell"/>
    <talkaction words="alana sio" filter="word-spaced" event="function" value="houseKick"/>
    <talkaction words="aleta grav" filter="word-spaced" event="function" value="houseDoorList"/>
    <talkaction words="aleta sio" filter="word-spaced" event="function" value="houseGuestList"/>
    <talkaction words="aleta som" filter="word-spaced" event="function" value="houseSubOwnerList"/>
    <talkaction words="!leavehouse" filter="word-spaced" event="script" value="leavehouse.lua"/>
    <talkaction words="!eject" event="script" value="exp_house.lua"/>

    <!-- Guilds -->
    <talkaction words="/war" channel="0" event="script" value="war.lua" desc="(Guild channel command) War management."/>

    <!-- (Deprecated) Redirect old '/' to '!' -->
    <talkaction words="/online" hide="yes" event="script" value="online.lua"/>
    <talkaction words="/uptime" hide="yes" event="script" value="uptime.lua"/>
    <talkaction words="/deathlist" hide="yes" event="script" value="deathlist.lua"/>
    <talkaction words="/pvp" hide="yes" event="script" value="pvp.lua"/>
    <talkaction words="/serverinfo" hide="yes" event="script" value="serverinfo.lua"/>
    <talkaction log="yes" access="1" hide="yes" words="!pos" event="script" value="position.lua"/>

    <!--Cast System-->
        <talkaction words="/cast;!cast" event="script" value="cast.lua"/>
        <!-- <talkaction words="/cast;!cast" event="script" value="cast.lua"/> -->
</talkactions>
 
That's what I think, even though I don't really know that much about it. I had some problems with the set up and it seems like I have OTX version 3 but I had to use sql schema from 0.3.6 (crying damson)...
Post automatically merged:

I have replaces my old commands.lua script with the one I found in the source of OTX 3.3:
LUA:
function onSay(player, words, param)
    if player:getExhaustion(1000) <= 0 then
        player:setExhaustion(1000, 2)
        player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Player commands:" .. "\n"
            .. "!buypremium" .. "\n"
            .. "!kills" .. "\n"
            .. "!bless" .. "\n"
            .. "!buyhouse" .. "\n"
            .. "!leavehouse" .. "\n"
            .. "!sellhouse" .. "\n"
            .. "!saveme" .. "\n"
            .. "!serverinfo" .. "\n"
            .. "!online" .. "\n"
            .. "!commands")
        return false
    else
        player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You\'re exhausted for: '..player:getExhaustion(1000)..' seconds.')
    end
end

But now neither /commands nor !commands work. Any idea? I would really appreciate your help
 
Last edited:
That's what I think, even though I don't really know that much about it. I had some problems with the set up and it seems like I have OTX version 3 but I had to use sql schema from 0.3.6 (crying damson)...
Post automatically merged:

I have replaces my old commands.lua script with the one I found in the source of OTX 3.3:
LUA:
function onSay(player, words, param)
    if player:getExhaustion(1000) <= 0 then
        player:setExhaustion(1000, 2)
        player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Player commands:" .. "\n"
            .. "!buypremium" .. "\n"
            .. "!kills" .. "\n"
            .. "!bless" .. "\n"
            .. "!buyhouse" .. "\n"
            .. "!leavehouse" .. "\n"
            .. "!sellhouse" .. "\n"
            .. "!saveme" .. "\n"
            .. "!serverinfo" .. "\n"
            .. "!online" .. "\n"
            .. "!commands")
        return false
    else
        player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You\'re exhausted for: '..player:getExhaustion(1000)..' seconds.')
    end
end

But now neither /commands nor !commands work. Any idea? I would really appreciate your help
I mean what errors are you getting, if any?
 
No errors now. They just don't work since I replaced that script with the one I found in sources of OTX 3.3.
Well, at least the tibia client doesn't crash... But I would really love to get them working as they should
 
LUA:
function onSay(cid, words, param, channel)
    doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Player commands:" .. "\n"
            .. "!buypremium" .. "\n"
            .. "!kills" .. "\n"
            .. "!bless" .. "\n"
            .. "!buyhouse" .. "\n"
            .. "!leavehouse" .. "\n"
            .. "!sellhouse" .. "\n"
            .. "!saveme" .. "\n"
            .. "!serverinfo" .. "\n"
            .. "!online" .. "\n"
            .. "!commands")
        return true
end
Maybe try something like this
 
Back
Top