Ir para conteúdo
  • 0

mylorc

Pergunta

[Resolvido]Olá galera,tenho um sistema de war aqui que postarei em baixo.Porém o sistema falta algumas coisas,preciso arrumar para que pessoas da mesma team não se ataquem,e preciso mudar o outifit azul por verde e que os player quando passar no teleport não possa a cor do outifit(Preciso disso sem mexer no sistema geral "config.ua").

Além disso preciso de um script de desativação,quando passa pelo teleport de saida o player podera mudar o seu outfit a cor normalmente.

Alguém pode me ajudar nisso?

 

 

 

Blue.lua

 

function onStepIn(cid, item, frompos, item2, topos)

local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 3}

if item.actionid == 5031 and isPlayer(cid) then
doCreatureChangeOutfit(cid, outfit)
end
return true
end

 

 

 

Red.lua

 

function onStepIn(cid, item, frompos, item2, topos)

local outfit = {lookType = 128, lookHead = 94, lookBody = 114, lookLegs = 114, lookFeet = 94, lookAddons = 3}

if item.actionid == 5032 and isPlayer(cid) then
doCreatureChangeOutfit(cid, outfit)
end
return true
end

 

 

Para maiores detalhes olhem o tutorial que peguei: http://www.xtibia.com/forum/topic/131054-854-team-war/

Editado por mylorc
Link para o comentário
Compartilhar em outros sites

12 respostass a esta questão

Posts Recomendados

  • 0

Testa esse aqui!

 

blueteam

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 3}
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
     local pSex = getPlayerSex(cid)
     outfit.lookType = pSex == PLAYERSEX_FEMALE and 605 or 604
     return isPlayer(cid) and doSetCreatureOutfit(cid, outfit, -1)
end

 

redteam

 

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
local outfit = {lookType = 128, lookHead = 94, lookBody = 114, lookLegs = 114, lookFeet = 94, lookAddons = 3}
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
     local pSex = getPlayerSex(cid)
     outfit.lookType = pSex == PLAYERSEX_FEMALE and 605 or 604
     return isPlayer(cid) and doSetCreatureOutfit(cid, outfit, -1)
end

 

exitpvp

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
doRemoveCondition(cid, CONDITION_OUTFIT)
end
 
Link para o comentário
Compartilhar em outros sites

  • 0

O Player não mudou de outifit.

Tente resolver por favor?

 

 

 

 

Testa esse aqui!

 

blueteam

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 3}
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
     local pSex = getPlayerSex(cid)
     outfit.lookType = pSex == PLAYERSEX_FEMALE and 605 or 604
     return isPlayer(cid) and doSetCreatureOutfit(cid, outfit, -1)
end

redteam

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
local outfit = {lookType = 128, lookHead = 94, lookBody = 114, lookLegs = 114, lookFeet = 94, lookAddons = 3}
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
     local pSex = getPlayerSex(cid)
     outfit.lookType = pSex == PLAYERSEX_FEMALE and 605 or 604
     return isPlayer(cid) and doSetCreatureOutfit(cid, outfit, -1)
end

exitpvp

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
doRemoveCondition(cid, CONDITION_OUTFIT)
end
 
Link para o comentário
Compartilhar em outros sites

  • 0

 

O Player não mudou de outifit.

Tente resolver por favor?

 

 

 

 

Testa esse aqui!

 

blueteam

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 3}
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
     local pSex = getPlayerSex(cid)
     outfit.lookType = pSex == PLAYERSEX_FEMALE and 605 or 604
     return isPlayer(cid) and doSetCreatureOutfit(cid, outfit, -1)
end

redteam

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
local outfit = {lookType = 128, lookHead = 94, lookBody = 114, lookLegs = 114, lookFeet = 94, lookAddons = 3}
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
     local pSex = getPlayerSex(cid)
     outfit.lookType = pSex == PLAYERSEX_FEMALE and 605 or 604
     return isPlayer(cid) and doSetCreatureOutfit(cid, outfit, -1)
end

exitpvp

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
doRemoveCondition(cid, CONDITION_OUTFIT)
end
 

 

 

 

Você registro os scripts em movements.xml

?

Link para o comentário
Compartilhar em outros sites

  • 0

 

 

O Player não mudou de outifit.

Tente resolver por favor?

 

 

 

 

Testa esse aqui!

 

blueteam

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 3}
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
     local pSex = getPlayerSex(cid)
     outfit.lookType = pSex == PLAYERSEX_FEMALE and 605 or 604
     return isPlayer(cid) and doSetCreatureOutfit(cid, outfit, -1)
end

redteam

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
local outfit = {lookType = 128, lookHead = 94, lookBody = 114, lookLegs = 114, lookFeet = 94, lookAddons = 3}
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
     local pSex = getPlayerSex(cid)
     outfit.lookType = pSex == PLAYERSEX_FEMALE and 605 or 604
     return isPlayer(cid) and doSetCreatureOutfit(cid, outfit, -1)
end

exitpvp

function onStepIn(cid, item, fromPosition, itemEx, toPosition)
 
 
if getPlayerStorageValue(cid, 20000) == 1 then 
doTeleportThing(cid, fromPosition)
elseif getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doTeleportThing(cid, fromPosition)
elseif isCreature(cid) then
doTeleportThing(cid, fromPosition)
return true 
end
 
doRemoveCondition(cid, CONDITION_OUTFIT)
end
 

 

 

 

Você registro os scripts em movements.xml

?

 

Sim eu registrei.

Link para o comentário
Compartilhar em outros sites

  • 0

Só pra testar, veja se está mudando a outfit, e retirando no de saída.

Blue team

function onStepIn(cid, item, frompos, item2, topos)
 
local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 3}
 
    if item.actionid == 5031 then
        if not isCreature(cid) then return true end
        doSetCreatureOutfit(cid, outfit, -1)
    end
    return true
end
Saída
function onStepIn(cid, item, frompos, item2, topos)
 
    if getCreatureCondition(cid, CONDITION_OUTFIT) then
        doRemoveCondition(cid, CONDITION_OUTFIT)
    end
    return true
end
Editado por zipter98
Link para o comentário
Compartilhar em outros sites

  • 0

O que eu deveria fazer é excluir o tópico, mas em respeito aos membros que já responderam, vou mover pra área correta e vou te dar 24hs pra renomear o tópico. Se não fizer isso até lá, vou renomear e alertá-lo.

Por favor, preste mais atenção e leia as regras.

Link para o comentário
Compartilhar em outros sites

  • 0

Esta sim cara,você pode mudar de azul para verde para mim ?

E coloque o do vermelho para mim por favor?

 

Obs:Não testei a War se player não mata player da mesma team eu não sei.

 

Obrigado.

 

 

 

 

Só pra testar, veja se está mudando a outfit, e retirando no de saída.

Blue team

function onStepIn(cid, item, frompos, item2, topos)
 
local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 3}
 
    if item.actionid == 5031 then
        if not isCreature(cid) then return true end
        doSetCreatureOutfit(cid, outfit, -1)
    end
    return true
end
Saída
function onStepIn(cid, item, frompos, item2, topos)
 
    if getCreatureCondition(cid, CONDITION_OUTFIT) then
        doRemoveCondition(cid, CONDITION_OUTFIT)
    end
    return true
end

 

Link para o comentário
Compartilhar em outros sites

  • 0

Verde:

function onStepIn(cid, item, frompos, item2, topos)
 
local outfit = {lookType = 128, lookHead = 82, lookBody = 114, lookLegs = 114, lookFeet = 82, lookAddons = 3}
 
    if item.actionid == 5031 then
        if not isCreature(cid) then return true end
        doSetCreatureOutfit(cid, outfit, -1)
    end
    return true
end
Vermelho:
function onStepIn(cid, item, frompos, item2, topos)
 
local outfit = {lookType = 128, lookHead = 94, lookBody = 114, lookLegs = 114, lookFeet = 94, lookAddons = 3}
 
    if item.actionid == 5032 then
        if not isCreature(cid) then return true end
        doSetCreatureOutfit(cid, outfit, -1)
    end
    return true
end
Editado por zipter98
Link para o comentário
Compartilhar em outros sites

  • 0

Otimos script,porém quando o player morre dentro da area ele não volta com o outifit de antes mais sim com o outifit do time verde ou vermelho,além disso o time vermelho pode matar membros do time vermelho e o time verde faz a mesma coisa.

 

 

Tem como arrumar?Espero a ajuda de vocês.

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...