• 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.3] Talkactions -> some God commands not work

ivvanek

New Member
Joined
Mar 24, 2009
Messages
113
Reaction score
3
Hi,

Some commands works good, like /kick , /goto , /c ,

I have some commands not working and dont know why, for example i cant use /B for broadcasting, no errors on console when typing.

Here is my talkactions.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
    <!-- commands -->
    <talkaction words="/ban" separator=" " script="ban.lua" />
    <talkaction words="/ipban" separator=" " script="ipban.lua" />
    <talkaction words="/unban" separator=" " script="unban.lua" />
    <talkaction words="/up" script="up.lua" />
    <talkaction words="/down" script="down.lua" />
    <talkaction words="/c" separator=" " script="teleport_creature_here.lua" />
    <talkaction words="/goto" separator=" " script="teleport_to_creature.lua" />
    <talkaction words="/owner" separator=" " script="owner.lua" />
    <talkaction words="/t" script="teleport_home.lua" />
    <talkaction words="/town" separator=" " script="teleport_to_town.lua" />
    <talkaction words="/a" separator=" " script="teleport_ntiles.lua" />
    <talkaction words="/info" separator=" " script="info.lua" />
    <talkaction words="/r" separator=" " script="removething.lua" />
    <talkaction words="/kick" separator=" " script="kick.lua" />
    <talkaction words="/openserver" script="openserver.lua" />
    <talkaction words="/closeserver" separator=" " script="closeserver.lua" />
    <talkaction words="/B" separator=" " script="broadcast.lua" />
    <talkaction words="/m" separator=" " script="place_monster.lua" />
    <talkaction words="/i" separator=" " script="create_item.lua" />
    <talkaction words="/s" separator=" " script="place_npc.lua" />
    <talkaction words="/addtutor" separator=" " script="add_tutor.lua" />
    <talkaction words="/removetutor" separator=" " script="remove_tutor.lua" />
    <talkaction words="/looktype" separator=" " script="looktype.lua" />
    <talkaction words="/summon" separator=" " script="place_summon.lua" />
    <talkaction words="/chameleon" separator=" " script="chameleon.lua" />
    <talkaction words="/addskill" separator=" " script="add_skill.lua" />
    <talkaction words="/mccheck" script="mccheck.lua" />
    <talkaction words="/ghost" script="ghost.lua" />
    <talkaction words="/clean" script="clean.lua" />
    <talkaction words="/hide" script="hide.lua" />
    <talkaction words="/reload" separator=" " script="reload.lua" />
    <talkaction words="/raid" separator=" " script="force_raid.lua" />

    <!-- player talkactions -->
    <talkaction words="!buypremium" script="buyprem.lua" />
    <talkaction words="!buyhouse" script="buyhouse.lua" />
    <talkaction words="!sellhouse" separator=" " script="sellhouse.lua" />
    <talkaction words="!leavehouse" script="leavehouse.lua" />
    <talkaction words="!changesex" script="changesex.lua" />
    <talkaction words="!uptime" script="uptime.lua" />
    <talkaction words="!deathlist" script="deathlist.lua" />
    <talkaction words="!kills" script="kills.lua" />
    <talkaction words="!online" script="online.lua" />
    <talkaction words="!serverinfo" script="serverinfo.lua" />

    <!-- test talkactions -->
    <talkaction words="!z" separator=" " script="magiceffect.lua" />
    <talkaction words="!x" separator=" " script="animationeffect.lua" />
</talkactions>

broadcast.lua
Code:
function onSay(player, words, param)
    if not player:hasFlag(PlayerFlag_CanBroadcast) then
        return true
    end

    print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".")
    for _, targetPlayer in ipairs(Game.getPlayers()) do
        targetPlayer:sendPrivateMessage(player, param, TALKTYPE_BROADCAST)
    end
    return false
end

and maybe it is problem with the flags?

Here is groups.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<groups>
    <group id="1" name="player" access="0" maxdepotitems="5000" maxvipentries="50" />
    <group id="2" name="gamemaster" access="1" maxdepotitems="0" maxvipentries="200" >
        <flags>
            <flag cannotusecombat="0" />
            <flag cannotattackplayer="0" />
            <flag cannotattackmonster="0" />
            <flag cannotbeattacked="1" />
            <flag canconvinceall="1" />
            <flag cansummonall="1" />
            <flag canillusionall="1" />
            <flag cansenseinvisibility="1" />
            <flag ignoredbymonsters="0" />
            <flag notgaininfight="1" />
            <flag hasinfinitemana="1" />
            <flag hasinfinitesoul="1" />
            <flag hasnoexhaustion="1" />
            <flag canalwayslogin="1" />
            <flag cannotbepushed="1" />
            <flag hasinfinitecapacity="1" />
            <flag cannotpushallcreatures="1" />
            <flag cantalkredprivate="1" />
            <flag cantalkredchannel="1" />
            <flag talkorangehelpchannel="1" />
            <flag notgainexperience="1" />
            <flag notgainmana="1" />
            <flag notgainhealth="1" />
            <flag notgainskill="1" />
            <flag setmaxspeed="1" />
            <flag specialvip="1" />
            <flag notgenerateloot="1" />
            <flag cantalkredchannelanonymous="1" />
            <flag ignoreprotectionzone="1" />
            <flag ignorespellcheck="1" />
            <flag ignoreweaponcheck="1" />
            <flag cannotbemuted="1" />
            <flag isalwayspremium="1" />
        </flags>
    </group>
    <group id="3" name="god" access="1" maxdepotitems="0" maxvipentries="200" >
        <flags>
            <flag cannotusecombat="1" />
            <flag cannotattackplayer="1" />
            <flag cannotattackmonster="1" />
            <flag cannotbeattacked="1" />
            <flag canconvinceall="1" />
            <flag cansummonall="1" />
            <flag canillusionall="1" />
            <flag cansenseinvisibility="1" />
            <flag ignoredbymonsters="1" />
            <flag notgaininfight="1" />
            <flag hasinfinitemana="1" />
            <flag hasinfinitesoul="1" />
            <flag hasnoexhaustion="1" />
            <flag canalwayslogin="1" />
            <flag canedithouses="1" />
            <flag cannotbebanned="1" />
            <flag cannotbepushed="1" />
            <flag hasinfinitecapacity="1" />
            <flag cannotpushallcreatures="1" />
            <flag cantalkredprivate="1" />
            <flag cantalkredchannel="1" />
            <flag talkorangehelpchannel="1" />
            <flag notgainexperience="1" />
            <flag notgainmana="1" />
            <flag notgainhealth="1" />
            <flag notgainskill="1" />
            <flag setmaxspeed="1" />
            <flag specialvip="1" />
            <flag notgenerateloot="1" />
            <flag cantalkredchannelanonymous="1" />
            <flag ignoreprotectionzone="1" />
            <flag ignorespellcheck="1" />
            <flag ignoreweaponcheck="1" />
            <flag cannotbemuted="1" />
            <flag isalwayspremium="1" />
        </flags>
    </group>
</groups>
 
Thank you for fast answer, it is possible to easy disable show the name of gamemaster broadcasting?
Yeah, just edit it to look like this
Lua:
function onSay(player, words, param)
    if not player:hasFlag(PlayerFlag_CanBroadcast) then
        return true
    end

    print(">  \"" .. param .. "\".")
    for _, targetPlayer in ipairs(Game.getPlayers()) do
        targetPlayer:sendPrivateMessage(player, param, TALKTYPE_BROADCAST)
    end
    return false
end
 
Yeah, just edit it to look like this
Lua:
function onSay(player, words, param)
    if not player:hasFlag(PlayerFlag_CanBroadcast) then
        return true
    end

    print(">  \"" .. param .. "\".")
    for _, targetPlayer in ipairs(Game.getPlayers()) do
        targetPlayer:sendPrivateMessage(player, param, TALKTYPE_BROADCAST)
    end
    return false
end
Not working, still shows name.
 
Lua:
function onSay(player, words, param)
    if not player:hasFlag(PlayerFlag_CanBroadcast) then
        return true
    end

    print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".")
    for _, targetPlayer in ipairs(Game.getPlayers()) do
        targetPlayer:sendPrivateMessage(param, TALKTYPE_BROADCAST)
    end
    return false
end
try this
 
Lua:
function onSay(player, words, param)
    if not player:hasFlag(PlayerFlag_CanBroadcast) then
        return true
    end

    print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".")
    for _, targetPlayer in ipairs(Game.getPlayers()) do
        targetPlayer:sendTextMessage(MESSAGE_CONSOLE_STATUS_ORANGE, param)
    end
    return false
end
 
Back
Top