Ir para conteúdo

Featured Replies

Postado

Pedido: Gostaria de uma script em que se o jogador alcançasse um "x" nível, recebesse alguns itens (configurados por mim mesmo).

Problema: Vou fazer 40 níveis editados com suas devidas recompensas. E só acho script em que só dá items para um nível configurado (necessitando fazer 40 scripts para cada nível)

Solução: Gostaria de em uma só script aplicar os níveis editados e os itens que eu quero(evitando eu fazer 40 scripts para cada nível e configuração)

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

Postado
  • Autor
5 minutos atrás, Sttorm disse:

Essa script já existe , procure no fórum antes de postar um tópico sobre dúvidas.

 

 

Estou ciente amigão, já testei essa script, é funcional, porém, ela só dá um item por nível, como citei lá em cima, é pra entregar alguns itens a cada nível, não apenas um item por nível!

Postado

Eu tenho esse que é usado pela otx.

Versão 1.3x otx-tfs
Explicando como colocar, tu pega e add as tags no script depois de then e se for adicionais mais leveis, mude a storage.

fiz aqui e funcionou, parada e simples linda e funciona, se for pra outra versão não deve ser dificil modificar.

Sempre que for adicionar mais leveis, veja a storage e muda pra nao ficar igual.

 

	if getPlayerLevel(cid) >= 8 and getPlayerStorageValue(cid, 99963) ~= 1 then
Se quiser que o player ganhe grana tbm.						    doPlayerSetBalance(cid, getPlayerBalance(cid) + 2000)
Item							doPlayerAddItem(cid, 5942)
Item							doPlayerAddItem(cid, 5942)
Item							doPlayerAddItem(cid, 5942)
Item							doPlayerAddItem(cid, 5942)
Aqui e a storage		    setPlayerStorageValue(cid, 99963, 1)
						    doPlayerSendTextMessage(cid, 19, "You have received 2000 gold in your bank for advancing to Level 8.")

 

 

Citar

Em login add 'Recompense'

 <event type="advance" name="Recompense" script="others/recompense.lua"/>
 

data/Creaturescript/other/recompense.lua

function onAdvance(cid, skill, oldlevel, newlevel)

	       	if getPlayerLevel(cid) >= 8 and getPlayerStorageValue(cid, 99963) ~= 1 then
						    doPlayerSetBalance(cid, getPlayerBalance(cid) + 2000)
						    setPlayerStorageValue(cid, 99963, 1)
						    doPlayerSendTextMessage(cid, 19, "You have received 2000 gold in your bank for advancing to Level 8.")

		    elseif getPlayerLevel(cid) >= 40 and getPlayerStorageValue(cid, 99964) ~= 1 then
						    doPlayerSetBalance(cid, getPlayerBalance(cid) + 10000)
						    setPlayerStorageValue(cid, 99964, 1)
						    doPlayerSendTextMessage(cid, 19, "You have received 10000 gold in your bank for advancing to Level 40.")

		   elseif getPlayerLevel(cid) >= 50 and getPlayerStorageValue(cid, 99965) ~= 1 then
						    doPlayerSetBalance(cid, getPlayerBalance(cid) + 30000)
						    setPlayerStorageValue(cid, 99965, 1)
						    doPlayerSendTextMessage(cid, 19, "You have received 30000 gold in your bank for advancing to Level 50.")

		     elseif getPlayerLevel(cid) >= 75 and getPlayerStorageValue(cid, 99966) ~= 1 then
						    doPlayerSetBalance(cid, getPlayerBalance(cid) + 60000)
						    setPlayerStorageValue(cid, 99966, 1)
						    doPlayerSendTextMessage(cid, 19, "You have received 60000 gold in your bank for advancing to Level 75.")
				
							
			elseif getPlayerLevel(cid) >= 100 and getPlayerStorageValue(cid, 99969) ~= 1 then
						    doPlayerSetBalance(cid, getPlayerBalance(cid) + 100000)
						    setPlayerStorageValue(cid, 99969, 1)
						   doPlayerSendTextMessage(cid, 19, "You have received 10000 gold in your bank for advancing to Level 100.")
							
							
			
            elseif getPlayerLevel(cid) >= 150 and getPlayerStorageValue(cid, 99970) ~= 1 then
						    doPlayerAddItem(cid, 5942)
						    setPlayerStorageValue(cid, 99970, 1)
						    doPlayerSendTextMessage(cid, 19, "You have received one blessed wooden stake because you reached level 150.")

					

 elseif getPlayerLevel(cid) >= 200 and getPlayerStorageValue(cid, 99971) ~= 1 then
						    doPlayerAddItem(cid, 2195)
						    setPlayerStorageValue(cid, 99971, 1)
						    doPlayerSendTextMessage(cid, 19, "You have been awarded with 1 boots of haste for reaching level 200.")

												
						    end
		    return TRUE
end

  

image.png

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo