• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction TFS 1.0 Command !go (Guild)

Webo

Otland 4ever
Joined
Oct 20, 2013
Messages
621
Solutions
10
Reaction score
229
Location
Warsaw
Hello This script !go to change Outfits

Author Script: Login1

/data/talkactions/talkactions.xml
Code:
<talkaction words="!go" script="go.lua"/>

/data/talkactions/scripts/go.lua
Code:
--[[
outfit.lookMount = getField<uint16_t>(L, arg, "lookMount");
    outfit.lookAddons = getField<uint8_t>(L, arg, "lookAddons");

    outfit.lookFeet = getField<uint8_t>(L, arg, "lookFeet");
    outfit.lookLegs = getField<uint8_t>(L, arg, "lookLegs");
    outfit.lookBody = getField<uint8_t>(L, arg, "lookBody");
    outfit.lookHead = getField<uint8_t>(L, arg, "lookHead");--]]

function onSay(cid, words, param, channel)
local player = Player(cid)
local playerGuildLevel = getPlayerGuildLevel(cid)
        if(playerGuildLevel < GUILDLEVEL_LEADER) then
            doPlayerSendCancel(cid, "Você precisa ser lider de sua guild para utilizar este comando!")
            return TRUE
        end
        local playerGuild = getPlayerGuildId(cid)
        if(playerGuild == FALSE) then
            doPlayerSendCancel(cid, "Desculpe, você não possuí uma guild.")
            return TRUE
        end

local outfit = getCreatureOutfit(cid)
outfit.lookMount = 0
outfit.lookAddons = 0
local no = 0
local members = getOnlinePlayers()
        for i = 1,#members do
            if(getPlayerGuildId(members[i]) == playerGuild and cid ~= members[i]) then
                if canPlayerWearOutfit(members[i], outfit.lookType, addons) then
                outfit.lookAddons = outfit.lookAddons
                doCreatureChangeOutfit(members[i], outfit)
                else
                outfit.lookAddons = getCreatureOutfit(members[i]).lookAddons
                doCreatureChangeOutfit(members[i], outfit)
                end
                    if player:hasMount(getCreatureOutfit(members[i]).lookMount) then
                        outfit.lookMount = 0
                        doCreatureChangeOutfit(members[i], outfit)
                    else
                        outfit.lookMount = 0
                        doCreatureChangeOutfit(members[i], outfit)
                    end
                    no = no + 1
                    doPlayerSendCancel(cid, ""..no.." tiveram suas outifits mudadas com sucesso!")
            end
        end
    return true
end
 
Back
Top