Ir para conteúdo
  • Cadastre-se

[PEDIDO] NoMove e FirstItem


Posts Recomendados

1 - Eu tenho um sistema que a cada level o player ganha um amuleto diferente no slot necklace.

Gostaria que me ajudassem a fazer um script pra ele não poder mover o amuleto de lá, mas que quando upasse o amuleto fosse trocado mesmo assim.

Eu tentei fazer o script por movements mas não funcionou muito bem:

local itemsnoMove = {2130}
function onDeEquip(cid, target, item, targetItem)
if (isInArray(itemsnoMove, item.itemid)) then
doPlayerSendCancel (cid, "You can't move this item.")
return false
end
return true
end

2 - Gostaria de um sistema de first items onde o amuleto vem direto no slot e não na mão ou na backpack, a id do amuleto é 2130.

Link para o post
Compartilhar em outros sites
local firstItems = {}
firstItems[0] =
{
2130,
2643
}
firstItems[1] =
{
2130,
2643
}
firstItems[2] =
{
2130,
2643
}
firstItems[3] =
{
2130,
2643
}
firstItems[4] =
{
2130,
2643
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2465, 1)
else
doPlayerAddItem(cid, 2465, 1)
end
local bag = doPlayerAddItem(cid, 10518, 1)
doAddContainerItem(bag, 2160, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 7618, 1)
doAddContainerItem(bag, 2383, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
Link para o post
Compartilhar em outros sites

local firstItems = {
   [0] = {
      [7] = 2130,
      [8] = 2643
   },
 
   [1] ={
      [7] = 2130,
      [8] = 2643
   },
 
   [2] = {
      [7] = 2130,
      [8] = 2643
   },
 
   [3] = {
      [7] = 2130,
      [8] = 2643
   },
 
   [4] = {
      [7] = 2130,
      [8] = 2643
   },
}
 
function onLogin(cid)
   if getPlayerStorageValue(cid, 30001) == -1 then
      for slot, id in pairs(firstItems[getPlayerVocation(cid)]) do
         doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1, false, slot)
      end
 
      if getPlayerSex(cid) == 0 then
         doPlayerAddItem(cid, 2465, 1)
      else
         doPlayerAddItem(cid, 2465, 1)
      end
 
      local bag = doPlayerAddItem(cid, 10518, 1)
      doAddContainerItem(bag, 2160, 1)
      doAddContainerItem(bag, 2554, 1)
      doAddContainerItem(bag, 2120, 1)
      doAddContainerItem(bag, 7618, 1)
      doAddContainerItem(bag, 2383, 1)
      setPlayerStorageValue(cid, 30001, 1)
   end
 
   return true
end
 

 

Entre as [] você coloca o id do slot e depois da igualdade o id do item.

 

   [0] = {
      [7] = 2130,
      [8] = 2643
   },

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo