Ir para conteúdo

Featured Replies

Postado

em creaturescripts/scripts:



  local commonItems = {

  -- ITEMS ALL VOCS RECEIVE

  {itemid=2120, count=1}, -- rope

  {itemid=5710, count=1}, -- shovel

  {itemid=2160, count=1}, -- 10 k

  {itemid=2173, count=1}, -- aol

  {itemid=2789, count=10}, -- brown mushrooms

}


local firstItems = {

  { -- SORC ITEMS

    {itemid=2323, count=1}, -- hat of the mad

    {itemid=8870, count=1}, -- spirit cloak

    {itemid=2647, count=1}, -- plate legs

    {itemid=3982, count=1}, -- crocodile boots

    {itemid=2175, count=1}, -- spellbook

    {itemid=2190, count=1}, -- wand of vortex 


    {itemid=2268, count=1}, -- sd

    {itemid=2273, count=1}, -- uh

    {itemid=7620, count=1}, -- mapa potions

  },

  { -- DRUID ITEMS

    {itemid=2323, count=1}, -- hat of the mad

    {itemid=8870, count=1}, -- spirit cloak

    {itemid=2647, count=1}, -- plate legs

    {itemid=3982, count=1}, -- crocodile boots

    {itemid=2175, count=1}, -- spellbook

    {itemid=2182, count=1}, -- snakebite rod 


    {itemid=2268, count=1}, -- sd

    {itemid=2273, count=1}, -- uh

    {itemid=7620, count=1}, -- mana potion

  },

  { -- PALADIN ITEMS

    {itemid=2457, count=1}, -- steel helmet

    {itemid=8872, count=1}, -- belted cape

    {itemid=2647, count=1}, -- plate legs

    {itemid=3982, count=1}, -- crocodile boots

    {itemid=2525, count=1}, -- dwarven shield

    {itemid=2389, count=1}, -- spear


    {itemid=2268, count=1}, -- sd

    {itemid=2273, count=1}, -- uh

    {itemid=7620, count=1}, -- mana potion

  },

  { -- KNIGHT ITEMS

    {itemid=2457, count=1}, -- steel helmet

    {itemid=2463, count=1}, -- plate armor

    {itemid=2647, count=1}, -- plate legs

    {itemid=3982, count=1}, -- crocodile boots

    {itemid=2525, count=1}, -- dwarven shield

    {itemid=2409, count=1}, -- serpent sword

    {itemid=2428, count=1}, -- orcish Axe

    {itemid=2417, count=1}, -- battle hammer


    {itemid=7620, count=1}, -- mana potion

    {itemid=2273, count=1}, -- uh

  }

}


for _, items in ipairs(firstItems) do

  for _, item in ipairs(commonItems) do

    table.insert(items, item)

  end

end


function onLogin(cid)

  if getPlayerGroupId(cid) < 2 then

    local hasReceivedFirstItems = getPlayerStorageValue(cid, 67708)


    if hasReceivedFirstItems == -1 then

      --[[local backpack = ]]doPlayerAddItem(cid, 1988, 1)


      local giveItems = firstItems[getPlayerVocation(cid)]


      if giveItems ~= nil then

        for _, v in ipairs(giveItems) do

          --doAddContainerItem(backpack, v.itemid, v.count or 1)

          doPlayerAddItem(cid, v.itemid, v.count or 1)

        end


        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bem Vindo você acaba de receber seus primeiros equipamentos.")

        setPlayerStorageValue(cid, 67708, 1)  

      end

    end

  end

  return TRUE

end 

em creaturescripts.xml:

<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>

Se não funfar avisa.

  • Respostas 15
  • Visualizações 2.3k
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Se o script não está em mods ele pode estar em creaturescripts como Ariius falou.

@Tiago.

Tente não agir como um membro da equipe, isso é contra as regras. Não tire o assunto do tópico falando que reportou e fazer o trabalho da equipe, somente reporte.

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