Jump to content
  • 0

Ayuda con esta Quest no Crear Gremio


ChuchoGamer

Pregunta

hola buenas amigos mi quest no Crea el Gremio les explico voy al npc quiero crear un gremio pero se me cierra cuando le pico crear gremio y se cierra Alguien me puede ayudar

aqui les dejo la quest 

para ver se me pueden ayudar porfavor

 

quest guild_manage begin
    state start begin
    when guild_man1.chat."GM: Comprobar la Fecha" or 
        guild_man2.chat."GM: Comprobar la Fecha" or
        guild_man3.chat."GM: Comprobar la Fecha" 
        with pc.is_gm() begin

        say("Introduzca por favor, usted quiere asegurarse de que el nombre del usuario.")
        local u_name = input()
        local u_vid=find_pc_by_name(u_name)

        if u_vid==0 then 
        say_title("este usuario no existe. ")
        say(u_name)
        return
        end

        local old_vid = pc.select(u_vid)
        u_withdrawTime=pc.getqf("new_withdraw_time")
        u_disbandTime=pc.getqf("new_disband_time")
        pc.select(old_vid)

        withdrawDelay=game.get_event_flag("guild_withdraw_delay")
        disbandDelay=game.get_event_flag("guild_disband_delay")

        say_title("Compruebe que puede agregar la fecha")

        if u_withdrawTime>0 then
        say("De temps: "..time_to_str(u_withdrawTime))
        say("(Latence: "..withdrawDelay.." Jour)")
        say("")
        end

        if u_disbandTime>0 then
        say("Tiempo de disolución: "..time_to_str(u_disbandTime))
        say("(Latencia: "..disbandDelay.." Jour)")
        say("")
        end

        local retryTime1 = u_withdrawTime + withdrawDelay*86400
        local retryTime2 = u_disbandTime + disbandDelay*86400
    
        local retryTime = 0
        if retryTime1 > retryTime2 then 
        retryTime = retryTime1
         else 
         retryTime = retryTime2 
        end

        local curTime = get_time()
        if curTime < retryTime then
        say("Pour remettre a zero le temps: "..time_to_str(retryTime))
        say("(Gauche : "..((retryTime-curTime)/3600).."Heure)")
        say("")

        if is_test_server() then
            local s=select("Reset", "Fermer")
            if s==1 then
            local old_vid = pc.select(u_vid)
            local curTime=get_time()
            pc.setqf("new_withdraw_time", curTime-withdrawDelay*86400)
            pc.setqf("new_disband_time", curTime-disbandDelay*86400)
            pc.select(old_vid)
            end
        end
        else
        say("Inscrivez-vous maintenant");
        say("")
        end
    end
    when     guild_man1.chat."GM: Asociacion de las variables relevantes" or 
        guild_man2.chat."GM: Asociacion de las variables relevantes" or
        guild_man3.chat."GM: Asociacion de las variables relevantes" 
            with pc.is_gm() begin

        test_chat("pc.has_guild: "..bool_to_str(pc.has_guild()))
        test_chat("pc.is_guildmaster: "..bool_to_str(pc.isguildmaster()))
        test_chat("pc.empire: "..pc.empire)
        test_chat("npc.empire: "..npc.empire)
    end
    when guild_man1.chat.locale.guild.withdraw or 
        guild_man2.chat.locale.guild.withdraw or 
        guild_man3.chat.locale.guild.withdraw 
        with pc.hasguild() and not pc.isguildmaster() and (pc.is_gm() or npc.empire == pc.empire) begin
        -- ??
        say(locale.guild.withdraw_confirm)
        local s = select(locale.guild.yes, locale.guild.no)
        if s==1 then
        say(locale.guild.withdraw_msg)
        pc.remove_from_guild()
        pc.setqf("new_withdraw_time",get_global_time())
        end
    end

    when guild_man1.chat.locale.guild.disband or 
        guild_man2.chat.locale.guild.disband or 
        guild_man3.chat.locale.guild.disband 
        with pc.hasguild() and pc.isguildmaster() and (pc.is_gm() or npc.empire == pc.empire) begin
        -- ??
        say(locale.guild.disband_confirm)
        local s = select(locale.guild.yes, locale.guild.no)
        if s==1 then
        say(locale.guild.disband_msg)
        pc.destroy_guild()
        pc.setqf("new_disband_time",get_global_time())
        pc.setqf("new_withdraw_time",get_global_time())
        end
    end

    when guild_man1.chat." Crear Gremio" or 
        guild_man2.chat." Crear Gremio" or 
        guild_man3.chat." Crear Gremio" 
        with (pc.is_gm() or npc.empire == pc.empire) begin
        local level_limit;
        local guild_create_item

        if get_locale() == "euckr" then
        level_limit = 45
        guild_create_item = false
        else
        level_limit = 45
        guild_create_item = false 
        end
        
        if pc.hasguild() then
        return
        end
        if game.get_event_flag("guild_withdraw_delay")*86400 > 
        get_global_time() - pc.getqf("new_withdraw_time") then

        say(string.format("Después de borrar un gremio, debe esperar un tiempo para crear otro.", game.get_event_flag("guild_withdraw_delay")))
        return
        end

        if game.get_event_flag("guild_disband_delay")*86400 > 
        get_global_time() - pc.getqf("new_disband_time") then
        
        say(string.format("Usted tiene que eliminar el gremio!, No se puede crear otro gremio", game.get_event_flag("guild_disband_delay")))
        return
        end

        say(locale.guild.create_confirm)
        local s = select(locale.guild.yes, locale.guild.no)
        if s == 2 then
        return
        end

        if pc.level >= level_limit then
        if pc.gold >= 200000 then
            if not guild_create_item or pc.countitem(guild_create_item)>0 then
            game.request_make_guild()
            else
            say(locale.guild.no_guild_create_item)
            end
        else
            say(locale.guild.create_not_enough_money)
        end
        else
        say(locale.guild.not_enough_leadership)
        end
    end
    end
end
 

Enlace para comentar
Compartir en otros sitios

2 respuestas a esta pregunta

Mensajes recomendados

  • 0

Prueba asi,  

Quote

quest guild_manage begin
    state start begin
    when guild_man1.chat."GM: Comprobar la Fecha" or 
        guild_man2.chat."GM: Comprobar la Fecha" or
        guild_man3.chat."GM: Comprobar la Fecha" 
        with pc.is_gm() begin

        say("Introduzca por favor, usted quiere asegurarse de que el nombre del usuario.")
        local u_name = input()
        local u_vid=find_pc_by_name(u_name)

        if u_vid==0 then 
        say_title("este usuario no existe. ")
        say(u_name)
        return
        end

        local old_vid = pc.select(u_vid)
        u_withdrawTime=pc.getqf("new_withdraw_time")
        u_disbandTime=pc.getqf("new_disband_time")
        pc.select(old_vid)

        withdrawDelay=game.get_event_flag("guild_withdraw_delay")
        disbandDelay=game.get_event_flag("guild_disband_delay")

        say_title("Compruebe que puede agregar la fecha")

        if u_withdrawTime>0 then
        say("De temps: "..time_to_str(u_withdrawTime))
        say("(Latence: "..withdrawDelay.." Jour)")
        say("")
        end

        if u_disbandTime>0 then
        say("Tiempo de disolución: "..time_to_str(u_disbandTime))
        say("(Latencia: "..disbandDelay.." Jour)")
        say("")
        end

        local retryTime1 = u_withdrawTime + withdrawDelay*86400
        local retryTime2 = u_disbandTime + disbandDelay*86400
    
        local retryTime = 0
        if retryTime1 > retryTime2 then 
        retryTime = retryTime1
         else 
         retryTime = retryTime2 
        end

        local curTime = get_time()
        if curTime < retryTime then
        say("Pour remettre a zero le temps: "..time_to_str(retryTime))
        say("(Gauche : "..((retryTime-curTime)/3600).."Heure)")
        say("")

        if is_test_server() then
            local s=select("Reset", "Fermer")
            if s==1 then
            local old_vid = pc.select(u_vid)
            local curTime=get_time()
            pc.setqf("new_withdraw_time", curTime-withdrawDelay*86400)
            pc.setqf("new_disband_time", curTime-disbandDelay*86400)
            pc.select(old_vid)
            end
        end
        else
        say("Inscrivez-vous maintenant");
        say("")
        end
    end
    when     guild_man1.chat."GM: Asociacion de las variables relevantes" or 
        guild_man2.chat."GM: Asociacion de las variables relevantes" or
        guild_man3.chat."GM: Asociacion de las variables relevantes" 
            with pc.is_gm() begin

        test_chat("pc.has_guild: "..bool_to_str(pc.has_guild()))
        test_chat("pc.is_guildmaster: "..bool_to_str(pc.isguildmaster()))
        test_chat("pc.empire: "..pc.empire)
        test_chat("npc.empire: "..npc.empire)
    end
    when guild_man1.chat.locale.guild.withdraw or 
        guild_man2.chat.locale.guild.withdraw or 
        guild_man3.chat.locale.guild.withdraw 
        with pc.hasguild() and not pc.isguildmaster() and (pc.is_gm() or npc.empire == pc.empire) begin
        -- ??
        say(locale.guild.withdraw_confirm)
        local s = select(locale.guild.yes, locale.guild.no)
        if s==1 then
        say(locale.guild.withdraw_msg)
        pc.remove_from_guild()
        pc.setqf("new_withdraw_time",get_global_time())
        end
    end

    when guild_man1.chat.locale.guild.disband or 
        guild_man2.chat.locale.guild.disband or 
        guild_man3.chat.locale.guild.disband 
        with pc.hasguild() and pc.isguildmaster() and (pc.is_gm() or npc.empire == pc.empire) begin
        -- ??
        say(locale.guild.disband_confirm)
        local s = select(locale.guild.yes, locale.guild.no)
        if s==1 then
        say(locale.guild.disband_msg)
        pc.destroy_guild()
        pc.setqf("new_disband_time",get_global_time())
        pc.setqf("new_withdraw_time",get_global_time())
        end
    end

    when guild_man1.chat."Establecer un nuevo gremio" or
                        guild_man2.chat."Establecer un nuevo gremio" or
                        guild_man3.chat."Establecer un nuevo gremio" with not pc.hasguild() or not pc.isguildmaster() begin
                        ----with (pc.is_gm() or npc.empire == pc.empire)
                        --------------------------------------------------------------
                        local level_limit;
                        local guild_create_item

                        level_limit = 40
                        guild_create_item = false
        -----------------------------------------------------------------------
        if pc.hasguild() then
        return
        end
        if game.get_event_flag("guild_withdraw_delay")*86400 > 
        get_global_time() - pc.getqf("new_withdraw_time") then

        say(string.format("Después de borrar un gremio, debe esperar un tiempo para crear otro.", game.get_event_flag("guild_withdraw_delay")))
        return
        end

        if game.get_event_flag("guild_disband_delay")*86400 > 
        get_global_time() - pc.getqf("new_disband_time") then
        
        say(string.format("Usted tiene que eliminar el gremio!, No se puede crear otro gremio", game.get_event_flag("guild_disband_delay")))
        return
        end

        say(locale.guild.create_confirm)
        local s = select(locale.guild.yes, locale.guild.no)
        if s == 2 then
        return
        end

        if pc.level >= level_limit then
        if pc.gold >= 200000 then
            if not guild_create_item or pc.countitem(guild_create_item)>0 then
            game.request_make_guild()
            else
            say(locale.guild.no_guild_create_item)
            end
        else
            say(locale.guild.create_not_enough_money)
        end
        else
        say(locale.guild.not_enough_leadership)
        end
    end
    end
end

 

Enlace para comentar
Compartir en otros sitios

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 esta pregunta...

×   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...