Ir para conteúdo
  • Cadastre-se

(Resolvido)Talkaction Outfits !Go (Troca Outfits)


Ir para solução Resolvido por Absolute,

Posts Recomendados

Bom eu jah vir em um otserv um talkactions que quando varios pessoas esta na war e todos na party quando o lider fala !Go todos que estiver na party ficará com a msm cor da roupa que o lider esta usando e tb aparece o efeito maneiro em todos da party. entao eu vir aqui perdi esse talkaction pra min coloca no meu otserv war.

Link para o post
Compartilhar em outros sites

Este comando !go adiciona pra galera da Guild e não da party...

YDmXTU2.png

 

Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui

Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui

 

Muitos querem aquilo que você tem, 
mas vão desistir quando souberem o preço que você pagou.

 

skype-favicon.png lu.lukinha

message-16.png [email protected]

Link para o post
Compartilhar em outros sites
  • Solução
<talkaction words="!go" event="script" value="guildoutfit.lua"/>
local config = {
	exhaustionInSeconds = 360,
	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

Fiz rapidinho teste:

<talkaction words="!goparty" event="script" value="partyoutfit.lua"/>
local config = {
	exhaustionInSeconds = 360,
	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 playerParty = getPlayerParty(cid)
	if(playerParty == FALSE) then
		doPlayerSendCancel(cid, "Sorry, you're not in a Party.")
		return TRUE
	end
 
	local playerPartyLevel = getPlayerPartyLevel(cid)
	if(playerPartyLevel < PARTYLEVEL_LEADER) then
		doPlayerSendCancel(cid, "You have to be Leader of your party to change outfits!")
		return TRUE
	end
 
	local players = getPlayersOnline()
	local outfit = getCreatureOutfit(cid)
	local message = "*Party* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")"
	local members = 0
	local tmp = {}
	for i, tid in ipairs(players) do
		if(getPlayerParty(tid) == playerParty 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, "Party members outfit has been changed. (Total: " .. members .. ")")
	return TRUE
end

YDmXTU2.png

 

Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui

Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui

 

Muitos querem aquilo que você tem, 
mas vão desistir quando souberem o preço que você pagou.

 

skype-favicon.png lu.lukinha

message-16.png [email protected]

Link para o post
Compartilhar em outros sites

Deu esse erro no console qual versao foi testada pqp o meu é 8.40

 

post-90243-0-60684500-1412285557_thumb.p

Editado por CreatServer (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
<talkaction words="!go" event="script" value="guildoutfit.lua"/>
local config = {
	exhaustionInSeconds = 360,
	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

Fiz rapidinho teste:

<talkaction words="!goparty" event="script" value="partyoutfit.lua"/>
local config = {
	exhaustionInSeconds = 360,
	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 playerParty = getPlayerParty(cid)
	if(playerParty == FALSE) then
		doPlayerSendCancel(cid, "Sorry, you're not in a Party.")
		return TRUE
	end
 
	local playerPartyLevel = getPlayerPartyLevel(cid)
	if(playerPartyLevel < PARTYLEVEL_LEADER) then
		doPlayerSendCancel(cid, "You have to be Leader of your party to change outfits!")
		return TRUE
	end
 
	local players = getPlayersOnline()
	local outfit = getCreatureOutfit(cid)
	local message = "*Party* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")"
	local members = 0
	local tmp = {}
	for i, tid in ipairs(players) do
		if(getPlayerParty(tid) == playerParty 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, "Party members outfit has been changed. (Total: " .. members .. ")")
	return TRUE
end

Vlw ae,Absolute Rep+

Link para o post
Compartilhar em outros sites
  • 2 years later...

pode me ajudar? o script ta ta dando isso aqui

 

Citar

[19:26:10.355] [Error - TalkAction Interface]
[19:26:10.357] data/talkactions/scripts/go.lua:onSay
[19:26:10.357] Description:
[19:26:10.358] data/lib/034-exhaustion.lua:4: field 'day' missing in date table
[19:26:10.359] stack traceback:
[19:26:10.359]  [C]: in function 'time'
[19:26:10.360]  data/lib/034-exhaustion.lua:4: in function 'check'
[19:26:10.360]  data/talkactions/scripts/go.lua:7: in function <data/talkactions/scripts/go.lua:6>

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo