Ir para conteúdo

Featured Replies

Postado

Tente mais 1 vez !

local config = {

rateExperience = getConfigInfo('rateExperience'),

rateSkill = getConfigInfo('rateSkill'),

rateLoot = getConfigInfo('rateLoot'),

rateMagic = getConfigInfo('rateMagic'),

rateSpawn = getConfigInfo('rateSpawn'),

protectionLevel = getConfigInfo('protectionLevel'),

stages = getBooleanFromString(getConfigInfo('experienceStages'))

}


local exp = config.rateExperience

local storage = 67777

function onLogin(cid)

local config = {

  voc_items = {

   { -- SORC

    {2190}, -- wand of vortex

    {2175}, -- spellbook

    {8820}, -- mage hat

    {8819} -- mage robe

   },

   { -- DRUID

    {2182}, -- snakebite rod

    {2175}, -- spellbook

    {8820}, -- mage hat

    {8819} -- mage robe

   },

   { -- PALADIN

    {2410, 7}, -- throwing knife

    {2530}, -- copper shield

    {2480}, -- legion helmet

    {2464} -- chain armor

   },

   { -- KNIGHT

    {2409}, -- serpent sword

    {2530}, -- copper shield

    {2480}, -- legion helmet

    {2465} -- brass armor

   }

  },

  all_items = {

   {2468}, -- studded legs

   {2160, 1}, -- 10k

   {2643} -- leather boots

  },

  extra_items = {

   {2789, 10},

   {2120},

   {5710}

  },

  knight_weapons = {

   {2398}, -- mace

   {2388} -- hatchet

  }

}

if getPlayerGroupId(cid) < 3 then

  if getPlayerStorageValue(cid, storage) == -1 then

   doPlayerPopupFYI(cid, "Server Information:\n\nExperience rate: x" .. exp .. "\nSkills rate: x" .. config.rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn .. "\nProtection level: " .. config.protectionLevel)

   local common = config.voc_items[getPlayerVocation(cid)]

   if common ~= nil then

    for _, v in ipairs(common) do

         doPlayerAddItem(cid, v[1], v[2] or 1)

    end

   end


   local all = config.all_items

   if all ~= nil then

    for _, v in ipairs(all) do

         doPlayerAddItem(cid, v[1], v[2] or 1)

    end

   end


   local extra = config.extra_items

   local bp = doPlayerAddItem(cid, 1988, 1)

   if extra ~= nil then

    for _, v in ipairs(extra) do

         doAddContainerItem(bp, v[1], v[2] or 1)

    end

   end


   local weapons = config.knight_weapons

   if weapons ~= nil then

    for _, w in ipairs(weapons) do

         if isKnight(cid) then

          doAddContainerItem(bp, w[1], w[2] or 1)

         end

    end

   end


   setPlayerStorageValue(cid, storage, 1)

  end

end

return true

end

Jared Leto

  • Respostas 32
  • Visualizações 3.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • todos os ot existem. Senão não existiria nada em seu ot localizando: pasta do seu ot/data/creaturescripts/scripts/login.lua

  • Você pode por assim : Protection level: 50") Você muda o numero só né xD Exatamente do jeito que eu botei. Jared Leto

  • Bl. Depois eu edito do seu jeito. Vou por tópico resolvido, depois que eu fazer tudo certo eu posto aqui novamente. Tópico Resolvido. A mensagem após o tópico resolvido será considera

Postado

se o do Jared nao funciona tenta esse

coloca ele no login.lua



local config = {

rateExperience = getConfigInfo('rateExperience'),

rateSkill = getConfigInfo('rateSkill'),

rateLoot = getConfigInfo('rateLoot'),

rateMagic = getConfigInfo('rateMagic'),

rateSpawn = getConfigInfo('rateSpawn'),

protectionLevel = getConfigInfo('protectionLevel'),

stages = getBooleanFromString(getConfigInfo('experienceStages'))

}


function onLogin(cid)


function onSay(cid, words, param, channel)

local exp = config.rateExperience

if(config.stages) then

exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)

end

doPlayerPopupFYI(cid, "Server Information:\n\nExperience rate: x" .. exp .. "\nSkills rate: x" .. config.rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn .. "\nProtection level: " .. config.protectionLevel)

Obs:nao testei

Editado por Alberess (veja o histórico de edições)

Postado

Só de visualizar Alberess,

O seu script está errado, alem de faltar vários "end" e outros, pois ele quer que aconteça isso apenas uma vez.

Generator, você precisa criar um char novo para testar o script que eu mandei, pois a mensagem que aparece, vai junto com os itens inicias, se você tentar com player que já tenha os itens inicias não vai dar certo !

Jared Leto

Postado
  • Autor

Testei + deu erro no distro de novo,

na hora que eu dei reload não apareceu nenhum erro,

+ na hora que eu tentei logar o novo char, deu erro

veja na imagem:

c5pbxuzwomon0kutqe7x.jpg

desculpa a demora, os site de host imagem tão sobrecarregados

Postado

Jared Leto aquilo que mandei pra ele era pra ele adicionar no login.lua tipo esse exemplo ai em baixo v




local config = {

rateExperience = getConfigInfo('rateExperience'),

rateSkill = getConfigInfo('rateSkill'),

rateLoot = getConfigInfo('rateLoot'),

rateMagic = getConfigInfo('rateMagic'),

rateSpawn = getConfigInfo('rateSpawn'),

protectionLevel = getConfigInfo('protectionLevel'),

stages = getBooleanFromString(getConfigInfo('experienceStages'))

}


function onLogin(cid)


function onSay(cid, words, param, channel)

local exp = config.rateExperience

if(config.stages) then

exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)

end


doPlayerPopupFYI(cid, "Server Information:\n\nExperience rate: x" .. exp .. "\nSkills rate: x" .. config.rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn .. "\nProtection level: " .. config.protectionLevel)




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 .. " Por favor, escolha sua roupa."

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, "Olá, diga 'account' para gerir sua conta e se quiser começar denovo, diga 'cancel'.")

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Olá, diga 'account' para criar conta ou diga 'recover' para recuperar a conta.")

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

Eu nao testei porque eu nao tenho nenhum mapa baixado o unico que tenho (tinha) tava com virus o exe poriso eu nao testei

Editado por Alberess (veja o histórico de edições)

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