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

10.91 talkaction

bybbzan

mapper
Joined
Aug 4, 2012
Messages
809
Solutions
2
Reaction score
136
Location
Sweden
Hello.

Im using : tfs 1.2 10.90

I got problems with some "god" commands like /i , /n , /ghost and a shitload of others.
I dont get any errors in console tho..
Also, when im using /c demon and attacks it, this happens.
It doesnt die, just disappears.

https://imgflip.com/gifgenerator

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="/pos" separator=" " script="position.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" />

    <!-- player talkactions -->
    <talkaction words="!buypremium" script="buyprem.lua" />
    <talkaction words="!buyhouse" script="buyhouse.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" />
    <talkaction words="!cast" separator=" " script="start_cast.lua" />
    <talkaction words="!stopcast" script="stop_cast.lua" />

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

create_item.lua
Code:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end

    local split = param:split(",")

    local itemType = ItemType(split[1])
    if itemType:getId() == 0 then
        itemType = ItemType(tonumber(split[1]))
        if itemType:getId() == 0 then
            player:sendCancelMessage("There is no item with that id or name.")
            return false
        end
    end

    local count = tonumber(split[2])
    if count ~= nil then
        if itemType:isStackable() then
            count = math.min(10000, math.max(1, count))
        elseif not itemType:isFluidContainer() then
            count = math.min(100, math.max(1, count))
        else
            count = math.max(0, count)
        end
    else
        if not itemType:isFluidContainer() then
            count = 1
        else
            count = 0
        end
    end

    local result = player:addItem(itemType:getId(), count)
    if result ~= nil then
        if not itemType:isStackable() then
            if type(result) == "table" then
                for _, item in ipairs(result) do
                    item:decay()
                end
            else
                result:decay()
            end
        end
        player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
    end
    return false
end

Thanks in advance.
 
Your account need to have type 5, and the player need group_id 3.
For the demon, idk what /c does but do you not wanna do /m demon ?
 
Your account need to have type 5, and the player need group_id 3.
For the demon, idk what /c does but do you not wanna do /m demon ?
/c does teleport monster or player to you, so in this case, it's teleporting random "Demon" from the map to him.
 
Your account need to have type 5, and the player need group_id 3.
For the demon, idk what /c does but do you not wanna do /m demon ?

Mind explaning me why the account id needs to be 5? I have the same problem with the gods talkcations, bunch of them doesnt work.
 
Back
Top