MY
pedido

Script de war

Por mylorc, 13 de nov. de 2013 em Scripts

script de war
resolvido
otserv
tibia
script
13
1.5k
mylorcM
13 de novembro de 2013 às 21:00

[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 Novembro 14 por mylorc

RickSoaresR
13 de novembro de 2013 às 21:18

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

KluivertK
13 de novembro de 2013 às 21:22

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
 
mylorcM
13 de novembro de 2013 às 21:38

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
 
KluivertK
13 de novembro de 2013 às 21:44

 

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

?

mylorcM
13 de novembro de 2013 às 22:15

 

 

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.

zipter98Z
13 de novembro de 2013 às 22:40

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 Novembro 13 por zipter98

mylorcM
13 de novembro de 2013 às 22:47

Podem ajudar?

OmegaO
13 de novembro de 2013 às 23:50

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.

mylorcM
14 de novembro de 2013 às 00:09

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

 

zipter98Z
14 de novembro de 2013 às 00:46

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 Novembro 14 por zipter98

OmegaO
14 de novembro de 2013 às 11:36

Tópico movido para a seção de dúvidas e pedidos resolvidos.

1 mês depois...
MycryM
09 de dezembro de 2013 às 14:53

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.