Ir para conteúdo
  • 0

Alguem me ajuda para editar esse script.


ravely13

Pergunta

local config = {

storageTeamOne = 68473,

storageTeamTwo = 68474,

teamOne = { outfitMale = {lookType = 128, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94}, -- 94 representa a cor vermelha.

outfitFemale = {lookType = 136, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94},

templeId = 1

},

teamTwo = { outfitMale = {lookType = 128, lookHead = 82, lookBody = 82, lookLegs = 82, lookFeet = 82}, -- 82 representa a cor verde.

outfitFemale = {lookType = 136, lookHead = 82, lookBody = 82, lookLegs = 82, lookFeet = 82},

templeId = 2

}

}

 

function onLogin(cid)

local vermelho = getGlobalStorageValue(config.teamOne)

local verde = getGlobalStorageValue(config.storageTeamTwo)

if vermelho > verde then

if getPlayerSex(cid) == 0 then

doCreatureChangeOutfit(cid, config.teamTwo.outfitFemale)

else

doCreatureChangeOutfit(cid, config.teamTwo.outfitMale)

end

doTeleportThing(cid, getTownTemplePosition(config.teamTwo.templeId))

setGlobalStorageValue(config.storageTeamTwo, verde+1)

setPlayerStorageValue(cid, config.storageTeamTwo, 1)

else

if getPlayerSex(cid) == 0 then

doCreatureChangeOutfit(cid, config.teamOne.outfitFemale)

else

doCreatureChangeOutfit(cid, config.teamOne.outfitMale)

end

doTeleportThing(cid, getTownTemplePosition(config.teamOne.templeId))

setGlobalStorageValue(config.teamOne, vermelho+1)

setPlayerStorageValue(cid, config.teamOne, 1)

end

registerCreatureEvent(cid, "LogoutTeam")

registerCreatureEvent(cid, "DeathTeam")

return true

end

 

function onDeath(cid, corpse, deathList)

if getPlayerStorageValue(cid, config.storageTeamTwo) == 1 then

setPlayerStorageValue(cid, config.storageTeamTwo, 0)

setGlobalStorageValue(config.storageTeamTwo, getGlobalStorageValue(config.storageTeamTwo)-1)

else

setPlayerStorageValue(cid, config.teamOne, 0)

setGlobalStorageValue(config.teamOne, getGlobalStorageValue(config.teamOne)-1)

end

return true

end

 

function onLogout(cid)

if getPlayerStorageValue(cid, config.storageTeamTwo) == 1 then

setPlayerStorageValue(cid, config.storageTeamTwo, 0)

setGlobalStorageValue(config.storageTeamTwo, getGlobalStorageValue(config.storageTeamTwo)-1)

else

setPlayerStorageValue(cid, config.teamOne, 0)

setGlobalStorageValue(config.teamOne, getGlobalStorageValue(config.teamOne)-1)

end

return true

end

 

 

 

<event type="login" name="LoginTeam" event="script" value="loginTeam.lua"/>

<event type="logout" name="LogoutTeam" event="script" value="loginTeam.lua"/>

<event type="death" name="DeathTeam" event="script" value="loginTeam.lua"/>

 

 

Esse script é de 2 team , mais infelizmente os 2 team nasce no mesmo canto , eu queria que alguem me ajuda-se a editá-lo para cada team nasce em sua base .

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

1 resposta a esta questão

Posts Recomendados

  • 0

Creio eu, que você precise criar dois templos no seu Mapa.

 

Ou então, poe manualmente/diretamente as coordenadas de cada templo no script.

Nos campos marcados abaixo:

local config = {

storageTeamOne = 68473,

storageTeamTwo = 68474,

teamOne = { outfitMale = {lookType = 128, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94}, -- 94 representa a cor vermelha.

outfitFemale = {lookType = 136, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94},

templeId = {x = 0, y = 0, z= 0}

},

teamTwo = { outfitMale = {lookType = 128, lookHead = 82, lookBody = 82, lookLegs = 82, lookFeet = 82}, -- 82 representa a cor verde.

outfitFemale = {lookType = 136, lookHead = 82, lookBody = 82, lookLegs = 82, lookFeet = 82},

templeId = {x = 0, y = 0, z= 0}

}

}

 

function onLogin(cid)

local vermelho = getGlobalStorageValue(config.teamOne)

local verde = getGlobalStorageValue(config.storageTeamTwo)

if vermelho > verde then

if getPlayerSex(cid) == 0 then

doCreatureChangeOutfit(cid, config.teamTwo.outfitFemale)

else

doCreatureChangeOutfit(cid, config.teamTwo.outfitMale)

end

doTeleportThing(cid, getTownTemplePosition(config.teamTwo.templeId))

setGlobalStorageValue(config.storageTeamTwo, verde+1)

setPlayerStorageValue(cid, config.storageTeamTwo, 1)

else

if getPlayerSex(cid) == 0 then

doCreatureChangeOutfit(cid, config.teamOne.outfitFemale)

else

doCreatureChangeOutfit(cid, config.teamOne.outfitMale)

end

doTeleportThing(cid, getTownTemplePosition(config.teamOne.templeId))

setGlobalStorageValue(config.teamOne, vermelho+1)

setPlayerStorageValue(cid, config.teamOne, 1)

end

registerCreatureEvent(cid, "LogoutTeam")

registerCreatureEvent(cid, "DeathTeam")

return true

end

 

function onDeath(cid, corpse, deathList)

if getPlayerStorageValue(cid, config.storageTeamTwo) == 1 then

setPlayerStorageValue(cid, config.storageTeamTwo, 0)

setGlobalStorageValue(config.storageTeamTwo, getGlobalStorageValue(config.storageTeamTwo)-1)

else

setPlayerStorageValue(cid, config.teamOne, 0)

setGlobalStorageValue(config.teamOne, getGlobalStorageValue(config.teamOne)-1)

end

return true

end

 

function onLogout(cid)

if getPlayerStorageValue(cid, config.storageTeamTwo) == 1 then

setPlayerStorageValue(cid, config.storageTeamTwo, 0)

setGlobalStorageValue(config.storageTeamTwo, getGlobalStorageValue(config.storageTeamTwo)-1)

else

setPlayerStorageValue(cid, config.teamOne, 0)

setGlobalStorageValue(config.teamOne, getGlobalStorageValue(config.teamOne)-1)

end

return true

end

 

 

Creio que seja isso, boa sorte.

Caso não funcione, poste e tentaremos resolver.

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

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...