Ir para conteúdo

Featured Replies

Postado

Uso Acc manager uso script team X team !

Quando player mata o outro da a famosa TEMPLE POSITION IS WRONG ! 

 

So quando um player mata o outro na hora de logar vai normal !

 

Mostrar conteúdo oculto

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

  • Respostas 25
  • Visualizações 1.9k
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor
  Em 27/04/2013 em 18:43, Luquinha disse:

Eae , aparece algum erro no distro ?

 

Tem um templo só ?

 

Me manda teu login.lua

 

2 templos , não aparece buug login abaixo (uso sqlite sem site )

Mostrar conteúdo oculto

local config = {

loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
 
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
 
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
 
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
 
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
 
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
 
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
return true
end

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo