Jump to content
  • 0
Sign in to follow this  
boker9999

ayuda con evento mineria

Question

Quote
Quote

 

 

quest mineria begin
state start begin
when 20001.chat."Evento Mineria" with pc.is_gm() begin
coord_map_x = 15000
coord_map_y = 7000
index_map = 105
say_title("Evento De Mineria")
say("Mineria")
local event = select("Activar","Finalizar","Cerrar")
if event == 1 then
    game.set_event_flag("event1",1)
    notice_all("El Evento De Mineria Esta Activo, entra a traves del alquimista.")
elseif event == 2 then
    game.set_event_flag("event1",0)
    notice_all("El Evento De Mineria Ha Terminado")
    return
end
end
when 20001.chat."Mapa de Mineria" with game.get_event_flag("event1")==1 begin
local map = select("Entrar","Cancelar")
if map == 1 then
    pc.warp(coord_map_x,coord_map_y)
    return
end
end
when login with pc.get_map_index()==index_map and get_event_flag("event1")==1 begin
loop_timer("eliminarobjeto",5)
loop_timer("warp",10)
end
when warp.timer begin
if game.get_event_flag("event1")==0 then
    cleartimer("warp")
    warp_to_village()
end end
when eliminarobjeto.timer begin
if game.get_event_flag("event1")==0 then
    local lista_mineral = {50601,50602,50603,50604,50605,50606,50607,50608,50609,50610,50611,50612,50613,50614,50615,50616,50617,50618,50619} -- elimina los minerales cuando acaba el evento, se debe poner las ids aqui
    for i=1,table.getn(lista_mineral) do
        pc.remove_item(lista_mineral,999)
        cleartimer("eliminarobjeto")
    end end end
when 20001.chat."Obtener objetos" with game.get_event_flag("event1")==1 and pc.get_map_index()==index_map begin
local objetos = {
    {"objeto1", 50601, 100,50621,2},
    {"objeto2", 50602, 100,50622,2},
    {"objeto3", 50603, 100,50623,2},
    {"objeto3", 50604, 100,50624,2},
    {"objeto3", 50605, 100,50625,2},
    {"objeto3", 50606, 100,50626,2},
    {"objeto3", 50607, 100,50627,2},
    {"objeto3", 50608, 100,50628,2},
    {"objeto3", 50609, 100,50629,2},
    {"objeto3", 50610, 100,50630,2},
    {"objeto3", 50611, 100,50631,2},
    {"objeto3", 50612, 100,50632,2},
    {"objeto3", 50613, 100,50633,2},
    {"objeto3", 50614, 100,50634,2},
    {"objeto3", 50615, 100,50635,2},
    {"objeto3", 50616, 100,50636,2},
    {"objeto3", 50617, 100,50637,2},
    {"objeto3", 50618, 100,50638,2},
    {"objeto3", 50619, 100,50639,2},
    {"Cerrar"}
}
local objetos2 = {}
for i = 1, table.getn(objetos) do
    table.insert(objetos2, objetos[1])
end
local sel = select_table(objetos2)
if pc.count_item(objetos[sel][2]) < objetos[sel][3] then
    say_reward("No tienes la cantidad necesaria")
    return end
    pc.remove_item(objetos[sel][2],objetos[sel][3])
    pc.give_item2(objetos[sel][4],objetos[sel][5])
end
end
end

 

lo que quiero es que al dalr a terminar evento teleporter a todos a la city.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
hace 8 minutos, Desmint dijo:

Facil, copea las lineas de la quest de OX y pegas demoras menos

lo e intentado pero no funciona sigue sin teleportar a la gente

Share this post


Link to post
Share on other sites
  • 0

ya lo arregle, tuve que añadir un when.

 

        when 20001.chat."GM: Cerrar mapa mineria" with pc.is_gm() and pc.get_map_index() == 105 begin
            say_title("Budokan:")
            say("La Entrada al Mapa de mineria ha sido cerrada")
            say("Todos los jugadores serán teletransportados a la ciudad.")
            say("")
            warp_all_to_village( pc.get_map_index() , 1 )
        end

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...