Ir para conteúdo
  • Cadastre-se

(Resolvido)Scripts quest inicial stone como restringir


Ir para solução Resolvido por jpn12,

Posts Recomendados

Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website).

Ex. TFS 1.0

Base: 

 

poke generation

Qual erro está surgindo/O que você procura?

estou querendo fazer uma quest  de 3 stone igual otp mais estou  aprendendo agora scripts então nuca fiz um com 3 stone mais a pessoa só pode pega 1 não to conseguido restringir cada stone alguém pode me ajuda com isso.

 

Você tem o código disponível? Se tiver publique-o aqui:

 

function onUse(cid, item, frompos, topos , toPosition)

   if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11447,1)  -- Fire stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   
   if getPlayerStorageValue(cid, 7781) == -1 then
   doPlayerAddItem(cid, 11442,1) -- Water Stone --
   setPlayerStorageValue(cid,7781,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   
   if getPlayerStorageValue(cid, 7782) == -1 then
   doPlayerAddItem(cid, 11441,1) -- leaf stone --
   setPlayerStorageValue(cid,7782,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end  

 

<action actionid="7780;7781;7782" event="script" value="Novas Quest/Inicial Stone.lua"/>

 

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.

Screenshot_2.png

Screenshot_3.png

Screenshot_4.png

Screenshot_5.png

obrigado consegui resolver ja fiz um script para cada usando a storage no mesmo script o marcos me ajudo pelo discord do tibia king

 

   function onUse(cid, item, frompos, topos , toPosition)
   
    if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11441,1) -- leaf stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end

 

 

function onUse(cid, item, frompos, topos , toPosition)

   if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11447,1)  -- Fire stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end  

 

function onUse(cid, item, frompos, topos)

 if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11442,1) -- Water Stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end
   

 

<action actionid="7782" event="script" value="Novas Quest/Fire stone.lua"/>
    <action actionid="7781" event="script" value="Novas Quest/Water stone.lua"/>
    <action actionid="7780" event="script" value="Novas Quest/Leaf stone.lua"/>

Editado por DarkRed (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • Solução

brother faz muito tempo que parei com o tibia, mas que me lembre. esse seu problema se resolve nas storage.

se  você olha as storage das stone estão todas diferentes uma da outra. se você colocar uma storage pra todas o player só vai poder escolher uma stone

Sem título.png

Link para o post
Compartilhar em outros sites

vlw fiz assim criei um scripts para cada e usei uma storagem em todas e fucino 

 

   function onUse(cid, item, frompos, topos , toPosition)
   
    if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11441,1) -- leaf stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end

 

 

function onUse(cid, item, frompos, topos)

 if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11442,1) -- Water Stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end
   

 

function onUse(cid, item, frompos, topos , toPosition)

   if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11447,1)  -- Fire stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end  

 

 

Link para o post
Compartilhar em outros sites
20 horas atrás, DarkRed disse:

vlw fiz assim criei um scripts para cada e usei uma storagem em todas e fucino 

 

   function onUse(cid, item, frompos, topos , toPosition)
   
    if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11441,1) -- leaf stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end

 

 

function onUse(cid, item, frompos, topos)

 if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11442,1) -- Water Stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end
   

 

function onUse(cid, item, frompos, topos , toPosition)

   if getPlayerStorageValue(cid, 7780) == -1 then
   doPlayerAddItem(cid, 11447,1)  -- Fire stone --
   setPlayerStorageValue(cid,7780,1)
   doPlayerSendTextMessage(cid, 25, "Parabens Voce Completou a Quest Inicial Stone")
   doPlayerSendTextMessage(cid, 15, "Voce ja fez a Inicial Stone")
   return true
   end
   end  

 

 

 

Pq n faz um baú com as 3? basta colocar uma function onUse, qnd o cara clicar ele pegar as 3 stones, doPlayerrAdd... 3x com o id de cada stone

Link para o post
Compartilhar em outros sites
3 horas atrás, kiinho disse:

Pq n faz um baú com as 3? basta colocar uma function onUse, qnd o cara clicar ele pegar as 3 stones, doPlayerrAdd... 3x com o id de cada stone

 

Porque são 3 áreas diferentes e para decidir qual Stone pega e só pode uma mais já consegui vlw

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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo