Comando !go Rep++

MaginusDarklord
em Lixeira Pública

MaginusDarklord

Andressa F.
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/12/11Posts: 17Char no Tibia: Andressa Lindinha

Gente queria por esse comando !go no meu ot de war e quando usar ficar da mesma cor do que o lider...

 

obrigada do REP++

Snowsz

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 22/01/12Posts: 121Char no Tibia: Not...

Por favor explique melhor assim nimguem vai entender.

Oi '-'

joao33

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 24/01/11Posts: 254Char no Tibia: Zemekiz

VA EM SEU OT DATA/TALKACTIONS/SCRIPTS E CRIA 1 ARQUIVO CHAMADO GO.LUA E PONHA ISSU DENTRO

 

local config = {

exhaustionInSeconds = 30,

storage = 34534

}

 

function onSay(cid, words, param)

if(exhaustion.check(cid, config.storage) == TRUE) then

doPlayerSendCancel(cid, "You can change outfit only 1 time per " .. config.exhaustionInSeconds .. " seconds.")

return TRUE

end

 

local playerGuild = getPlayerGuildId(cid)

if(playerGuild == FALSE) then

doPlayerSendCancel(cid, "Sorry, you're not in a guild.")

return TRUE

end

 

local playerGuildLevel = getPlayerGuildLevel(cid)

if(playerGuildLevel < GUILDLEVEL_LEADER) then

doPlayerSendCancel(cid, "You have to be Leader of your guild to change outfits!")

return TRUE

end

 

local players = getPlayersOnline()

local outfit = getCreatureOutfit(cid)

local message = "*Guild* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")"

local members = 0

local tmp = {}

for i, tid in ipairs(players) do

if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then

tmp = outfit

if(canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons) ~= TRUE) then

local tidOutfit = getCreatureOutfit(tid)

tmp.lookType = tidOutfit.lookType

tmp.lookAddons = tidOutfit.lookAddons

end

 

doSendMagicEffect(getCreaturePosition(tid), 66)

doCreatureChangeOutfit(tid, tmp)

doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message)

members = members + 1

end

end

 

exhaustion.set(cid, config.storage, config.exhaustionInSeconds)

doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")")

return TRUE

 

end

 

dps va em talkactions.xml e ponha

 

<talkaction words="!go" event="script" value="go.lua"/>

 

 

KD MEU REP?