BR

(Pedido) Itens

Por BrunoMaciel, 13 de fev. de 2020 em Scripts

5
1.3k
BrunoMacielB
13 de fevereiro de 2020 às 22:19

Preciso de uma ajuda em itens !!

 

Bom meu server ele tem um bau que da kit inicial pros players iniciantes.

 

Porem eu queria deixa estes itens como unique.

 

O formado da script ta como Quest com BAU.

 

Aii os itens queria deixa eles unique os player que pega os itens do BAU vim unique ^^

 

SCRIPT

function onUse (cid,item,frompos,item2,topos)
          
        UID_DO_BAU = 53440
        STORAGE_VALUE = 53437
        ID_DO_PREMIO = 2394
	    ID_DO_PREMIO2 = 2152        
	    ID_DO_PREMIO3 = 12346
	    ID_DO_PREMIO4 = 12344
          if getPlayerLevel(cid) >= 1 then
          if item.uid == UID_DO_BAU then
          queststatus = getPlayerStorageValue(cid,STORAGE_VALUE)
          if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"Voce Pegou Seu Kit Inicial, Boa Sorte Na Sua Jornada") 
        doPlayerAddItem(cid,ID_DO_PREMIO,20)
        doPlayerAddItem(cid,ID_DO_PREMIO2,10)
        doPlayerAddItem(cid,ID_DO_PREMIO3,5)
	    doPlayerAddItem(cid,ID_DO_PREMIO4,5)
        setPlayerStorageValue(cid,STORAGE_VALUE,1)
          else
        doPlayerSendTextMessage(cid,22,"Ta Vazio")
          end
  end
        else
  doPlayerSendCancel(cid,'Somente LvL 10+')
        end
return 1
end

Quem puder ajudar ^^

 

Rep+++

13 de fevereiro de 2020 às 22:41
function onUse (cid,item,frompos,item2,topos)

  UID_DO_BAU = 53440
  STORAGE_VALUE = 53437
  ID_DO_PREMIO = 2394
  ID_DO_PREMIO2 = 2152
  ID_DO_PREMIO3 = 12346
  ID_DO_PREMIO4 = 12344
  if getPlayerLevel(cid) >= 1 then
    if item.uid == UID_DO_BAU then
      queststatus = getPlayerStorageValue(cid,STORAGE_VALUE)
      if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"Voce Pegou Seu Kit Inicial, Boa Sorte Na Sua Jornada")
        local item1 = doPlayerAddItem(cid,ID_DO_PREMIO,20)
        doItemSetAttribute(item1, "unique", 1)
        local item2 = doPlayerAddItem(cid,ID_DO_PREMIO2,10)
        doItemSetAttribute(item2, "unique", 1)
        local item3 = doPlayerAddItem(cid,ID_DO_PREMIO3,5)
        doItemSetAttribute(item3, "unique", 1)
        local item4 = doPlayerAddItem(cid,ID_DO_PREMIO4,5)
        doItemSetAttribute(item4, "unique", 1)

        setPlayerStorageValue(cid,STORAGE_VALUE,1)
      else
        doPlayerSendTextMessage(cid,22,"Ta Vazio")
      end
    end
  else
    doPlayerSendCancel(cid,'Somente LvL 10+')
  end
  return 1
end

 

BrunoMacielB
13 de fevereiro de 2020 às 23:34
52 minutos atrás, FlamesAdmin disse:
function onUse (cid,item,frompos,item2,topos)

  UID_DO_BAU = 53440
  STORAGE_VALUE = 53437
  ID_DO_PREMIO = 2394
  ID_DO_PREMIO2 = 2152
  ID_DO_PREMIO3 = 12346
  ID_DO_PREMIO4 = 12344
  if getPlayerLevel(cid) >= 1 then
    if item.uid == UID_DO_BAU then
      queststatus = getPlayerStorageValue(cid,STORAGE_VALUE)
      if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"Voce Pegou Seu Kit Inicial, Boa Sorte Na Sua Jornada")
        local item1 = doPlayerAddItem(cid,ID_DO_PREMIO,20)
        doItemSetAttribute(item1, "unique", 1)
        local item2 = doPlayerAddItem(cid,ID_DO_PREMIO2,10)
        doItemSetAttribute(item2, "unique", 1)
        local item3 = doPlayerAddItem(cid,ID_DO_PREMIO3,5)
        doItemSetAttribute(item3, "unique", 1)
        local item4 = doPlayerAddItem(cid,ID_DO_PREMIO4,5)
        doItemSetAttribute(item4, "unique", 1)

        setPlayerStorageValue(cid,STORAGE_VALUE,1)
      else
        doPlayerSendTextMessage(cid,22,"Ta Vazio")
      end
    end
  else
    doPlayerSendCancel(cid,'Somente LvL 10+')
  end
  return 1
end

 

ja ja vou da uma olhada e posto aqui se deu certo ou nao ^^

1 hora atrás, FlamesAdmin disse:
function onUse (cid,item,frompos,item2,topos)

  UID_DO_BAU = 53440
  STORAGE_VALUE = 53437
  ID_DO_PREMIO = 2394
  ID_DO_PREMIO2 = 2152
  ID_DO_PREMIO3 = 12346
  ID_DO_PREMIO4 = 12344
  if getPlayerLevel(cid) >= 1 then
    if item.uid == UID_DO_BAU then
      queststatus = getPlayerStorageValue(cid,STORAGE_VALUE)
      if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"Voce Pegou Seu Kit Inicial, Boa Sorte Na Sua Jornada")
        local item1 = doPlayerAddItem(cid,ID_DO_PREMIO,20)
        doItemSetAttribute(item1, "unique", 1)
        local item2 = doPlayerAddItem(cid,ID_DO_PREMIO2,10)
        doItemSetAttribute(item2, "unique", 1)
        local item3 = doPlayerAddItem(cid,ID_DO_PREMIO3,5)
        doItemSetAttribute(item3, "unique", 1)
        local item4 = doPlayerAddItem(cid,ID_DO_PREMIO4,5)
        doItemSetAttribute(item4, "unique", 1)

        setPlayerStorageValue(cid,STORAGE_VALUE,1)
      else
        doPlayerSendTextMessage(cid,22,"Ta Vazio")
      end
    end
  else
    doPlayerSendCancel(cid,'Somente LvL 10+')
  end
  return 1
end

 

Bom quando do look no item ele fala que ta unique porem consigo joga o item no chao e quando pego do chao e coloco na BAG de volta sai o unique do look fico tipo item normal.

 

Queria deixa unique sem consegui joga no chao normal

14 de fevereiro de 2020 às 00:28

deve ser seu unique system

https://www.xtibia.com/forum/topic/249391-c-unique-item-system-atualizado-no-bugs/

BrunoMacielB
14 de fevereiro de 2020 às 01:32
1 hora atrás, FlamesAdmin disse:

Haa beleza vou da uma olhada sim bom valeuu 

 

Rep++