antiblock
https://i.imgur.com/aJ17bf7.gif
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Radamanthos

Porcentagem de drop

Question

quest evento_teste begin
    state start begin
		     when login begin 
        if game.get_event_flag("evento") == 1 then 
            notice("O evento está ativo.") 
        end 
    end
   when 33002.chat."GM: Evento" with pc.is_gm() begin
    say_title(mob_name(npc.get_race()))
    say("")
    say("Olá "..pc.get_name().."!")
    say("Oque você deseja ?")
    say("")
     local s = select("Iniciar", "Desligar", "Cancelar")
      if s == 1 then
       game.set_event_flag("evento", 1)
       notice_all("O evento está ativo!")     
      elseif s == 2 then
       game.set_event_flag("evento", 0)
       notice_all("O evento está desativado!")
      elseif s == 3 then
     return
   end
  end
when 101.kill or 102.kill or 103.kill or 104.kill or 105.kill or 106.kill or 107.kill or 108.kill or 109.kill or 110.kill or 111.kill or 112.kill or 113.kill or 114.kill or 115.kill or 131.kill or 132.kill or 133.kill or 134.kill or 135.kill or 136.kill or 137.kill or 138.kill or 139.kill or 140.kill or 141.kill or 142.kill or 143.kill or 144.kill or 151.kill or 152.kill or 153.kill or 154.kill or 155.kill or 171.kill or 172.kill or 173.kill or 
174.kill or 175.kill or 176.kill or 177.kill or 178.kill or 179.kill or 180.kill or 181.kill or 182.kill or 183.kill or 184.kill or 185.kill or 191.kill or 192.kill or 193.kill or 194.kill or 301.kill or 302.kill or 303.kill or 304.kill or 331.kill or 332.kill or 333.kill or 334.kill or 351.kill or 352.kill or 353.kill or 354.kill or 391.kill or 392.kill or 393.kill or 394.kill or 395.kill or 396.kill or 397.kill or 398.kill or 401.kill or 
402.kill or 403.kill or 404.kill or 405.kill or 406.kill or 431.kill or 432.kill or 433.kill or 434.kill or 435.kill begin
if pc.level >= 1 and pc.level <= 30 and game.get_event_flag("evento")>0 then
local r=number(1, 100)
if r==1 then
pc.give_item2("50096", 1)
else 

end 
end
end 
  
 

Pessoal, nessa quest como faço para por porcentagem de drop maior ? Tipo até dropa, mas demora bastante!

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

amigo isso é evento kill de mobs 

 

para isso tera que instalar uma Quest retes aonde poderá alterar valores de drop

ou

criar uma tabela na common na mysql

 

CREATE TABLE `priv_settings
INSERT INTO `priv_settings` VALUES ('EMPIRE', '0', '1', '200', '2014-08-07 14:26:03');
INSERT INTO `priv_settings` VALUES ('EMPIRE', '0', '2', '66', '2014-08-07 14:26:03');
INSERT INTO `priv_settings` VALUES ('EMPIRE', '0', '3', '1', '2014-08-07 14:26:03');
INSERT INTO `priv_settings` VALUES ('EMPIRE', '0', '4', '15', '2014-08-07 14:26:03');

Share this post


Link to post
Share on other sites
antiblock
Elveron
  • 0

Boas, 

eu reparei que você ta usar pc.level e não afirmou que a variavel tem a função pc.get_level(), isso poderá dar erro durante a compilação, se não haver algum tipo de erro então está tudo bem

 

em relação a chance de drop você altera em :

local r = number(1,100)

  if r == 1 then 

 

aqui você altera assim:

local r=number(1,100)

   if r <= valor da percentagem de drop then

 

 

Edited by GameForge (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Obrigado pessoal

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now