Jump to content

[Quest]Evento Mineria


Metin2Arceus

Mensajes recomendados

Quiero dejar la quest puesta aqui para los que si algun dia les viene bien la puedan usar ya que fue probada y sirve Muchisimas gracias a Dilong por la quest

quest mineria begin
state start begin
when 20090.chat."Evento Mineria" with pc.is_gm() begin
coord_map_x = numero
coord_map_y = numero
index_map = index
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")
elseif event == 2 then
    game.set_event_flag("event1",0)
    notice_all("El Evento De Mineria Ha Terminado")
    return
end
end
when 20011.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 = {id1,id2,id3} -- 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 20011.chat."Obtener objetos" with game.get_event_flag("event1")==1 and pc.get_map_index()==index_map begin
local objetos = {
    {"objeto1", idmineral, cantidad,premio,cantidad},
    {"objeto2",    idmineral, cantidad,premio,cantidad},
    {"objeto3",    idmineral, cantidad,premio,cantidad},
    {"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

 

Quest echa por Dilong

Enlace para comentar
Compartir en otros sitios

  • 1 year later...

Unirse a la conversación

Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.

Guest
Responder a este tema...

×   Has pegado contenido con formato .   Eliminar formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incorporado automáticamente.   Mostrar un enlace en su lugar

×   Se ha restaurado el contenido anterior. .   Borrar editor

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

  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...