Ir para conteúdo

[Talkaction] Change Party And Guild Outfit


Malexus

Posts Recomendados

Eaww galera :smile_positivo:

Vo passar pra vcs uma script q eu achei na net,e q pode ser bastante utilizada.Concerteza vcs já viram...

Voce fala o comando, e os player da party fica com a mesma outfit q a sua, tbm funciona com guilds.

 

Vá em talkaction e crie changeparty.lua, e cole dentro (esse funciona somente com as pt)

local config =

{

sexChangeable = false,

copyOutfitAndAddonsEverytime = false

}

 

function onSay(cid, words, param, channel)

party = getPlayerParty(cid)

if (config.sexChangeable == true) then

sex = getPlayerSex(cid)

end

if (party) then

if (party == cid) then

outfit = getCreatureOutfit(cid)

members = getPartyMembers(party)

if (#members >= 1) then

tmp = outfit

for i=1,#members do

if (config.sexChangeable == true) then

if (sex ~= getPlayerSex(members)) then

doPlayerSetSex(members, sex)

end

end

if(config.copyOutfitAndAddonsEverytime == false and canPlayerWearOutfit(members, tmp.lookType, tmp.lookAddons) ~= true) then

local tmpOutfit = getCreatureOutfit(members)

tmp.lookType = tmpOutfit.lookType

tmp.lookAddons = tmpOutfit.lookAddons

end

doCreatureChangeOutfit(members, tmp)

doSendMagicEffect(getCreaturePosition(members), 66)

end

end

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This command can use only leader of a party!")

end

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must be in a party!")

end

return true

end

 

depois vá em talkactions.xml e adicione essa linha no lugar dos players

 

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

 

 

agora a q funciona em guilds

 

crie guildoutfit.lue e cole isso 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

 

talkactions.xml

 

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

 

Fotos:

 

http://imageshack.us/photo/my-images/59/imagemzkj.jpg/

 

creditos:

averatec

slawkens

 

 

ta ae intaum t+

Link para o comentário
Compartilhar em outros sites

  • 1 year later...
×
×
  • Criar Novo...