Script de war

mylorc
Por mylorc
em Scripts

mylorc

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 01/08/10Posts: 108Char no Tibia: mylorc

[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/

RickSoares

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 01/11/13Posts: 23

kra não entendi direito oque você quer explique melhor pra mim intender!

warz.png

Kluivert

:)
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 06/07/13Posts: 634Gênero: MasculinoChar no Tibia: Kayinsz

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
 

Att,

Kluivert.

 

2lQynzLAD.png

mylorc

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 01/08/10Posts: 108Char no Tibia: mylorc

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
 

Kluivert

:)
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 06/07/13Posts: 634Gênero: MasculinoChar no Tibia: Kayinsz

 

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

?

Att,

Kluivert.

 

2lQynzLAD.png

mylorc

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 01/08/10Posts: 108Char no Tibia: mylorc

 

 

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.

zipter98

avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 20/09/12Posts: 2553Gênero: Masculino

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

Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.

mylorc

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 01/08/10Posts: 108Char no Tibia: mylorc

Podem ajudar?

Omega

o/
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 17/06/07Posts: 1165Gênero: MasculinoChar no Tibia: Nenhum

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.

mylorc

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 01/08/10Posts: 108Char no Tibia: mylorc

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

 

zipter98

avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 20/09/12Posts: 2553Gênero: Masculino

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

Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.

Mycry

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 22/11/13Posts: 51

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.