Risolto problema con la quest

Stato
Discussione chiusa ad ulteriori risposte.

LegendDragon

Utente Emerald
1 Ottobre 2011
1,207
123
212
648
Ultima modifica:
CSS:
quest system_corruzione begin
    state start begin
        -- LOGIN
        when login begin
            local corruption = pc.getqf("corruption_points")
           
            if corruption < 0 then
                pc.setqf("corruption_points", 0)
            end
            if corruption > 500 then
                pc.setqf("corruption_points", 500)
            end
           
            -- Timer controllo anti-frode (ogni 10 minuti)
            timer("check_items_fraud", 600)
        end
       
        -- CONTROLLO ANTI-FRODE
        when check_items_fraud.timer begin
            local is_corrupted = pc.getqf("is_corrupted")
            local corruption = pc.getqf("corruption_points")
           
            -- Se NON è corrotto, rimuovi TUTTO
            if is_corrupted == 0 then
                if pc.count_item(41202) > 0 then
                    pc.remove_item(41202, pc.count_item(41202))
                    syschat("COSTUME RIMOSSO: non sei più corrotto!")
                end
               
                if pc.count_item(41203) > 0 then
                    pc.remove_item(41203, pc.count_item(41203))
                    syschat("ELMO RIMOSSO: non sei più corrotto!")
                end
            else
                -- Se è corrotto, controlla requisiti
                if pc.count_item(41202) > 0 and corruption < 400 then
                    pc.remove_item(41202, pc.count_item(41202))
                    syschat("COSTUME RIMOSSO: corruzione sotto 400!")
                end
               
                if pc.count_item(41203) > 0 and corruption < 100 then
                    pc.remove_item(41203, pc.count_item(41203))
                    syschat("ELMO RIMOSSO: corruzione sotto 100!")
                end
            end
           
            -- Ricontrolla tra 10 minuti
            timer("check_items_fraud", 600)
        end
       
        -- ABBRACCIARE L'OSCURITÀ
        when 9700.chat."Abbraccia il Potere Oscuro" begin
            local is_corrupted = pc.getqf("is_corrupted")
           
            if is_corrupted == 1 then
                local corruption = pc.getqf("corruption_points")
                say_title("Maestro Oscuro:")
                say("Hai già abbracciato l'oscurità.")
                say("Corruzione: " .. corruption .. "/500")
                return
            end
           
            say_title("Maestro Oscuro:")
            say("Vuoi abbracciare il Potere Oscuro?")
            say("")
            say_reward("Otterrai:")
            say("- Titoli esclusivi")
            say("- Possibilità di comprare Costume ed Elmo")
            say("")
           
            local s = select("Sì, abbraccia", "No")
           
            if s == 1 then
                pc.setqf("is_corrupted", 1)
                pc.setqf("corruption_points", 15)
                pc.setqf("last_level", 0)
               
                say_title("Maestro Oscuro:")
                say("Benvenuto nell'oscurità!")
               
                notice_all(pc.get_name() .. " ha abbracciato il Potere Oscuro!")
            end
        end
       
        -- UCCIDERE GIOCATORI
        when kill with npc.is_pc() begin
            local is_corrupted = pc.getqf("is_corrupted")
           
            if is_corrupted == 1 then
                local corruption = pc.getqf("corruption_points")
               
                if corruption < 500 then
                    corruption = corruption + 10
                    pc.setqf("corruption_points", corruption)
                    syschat("POTERE OSCURO +10! [" .. corruption .. "/500]")
                   
                    corruption_system.check_level()
                end
            end
        end
       
        -- UCCIDERE NPC INNOCENTI
        when 101.kill begin
            local is_corrupted = pc.getqf("is_corrupted")
           
            if is_corrupted == 1 then
                local corruption = pc.getqf("corruption_points")
               
                if corruption < 500 then
                    corruption = corruption + 5
                    pc.setqf("corruption_points", corruption)
                    syschat("Innocente ucciso! +5 [" .. corruption .. "/500]")
                   
                    corruption_system.check_level()
                end
            end
        end
       
        -- SACRIFICARE OGGETTI
        when 9700.chat."Sacrifica oggetti per potere" begin
            local is_corrupted = pc.getqf("is_corrupted")
           
            if is_corrupted == 0 then
                say_title("Altare Oscuro:")
                say("Solo i corrotti possono usare questo altare.")
                return
            end
           
            local corruption = pc.getqf("corruption_points")
           
            if corruption >= 500 then
                say_title("Altare Oscuro:")
                say("Hai raggiunto il massimo potere!")
                return
            end
           
            say_title("Altare Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            say("")
           
            local s = select("10 Pietre Anima (+5)", "1 Pietra Drago (+10)", "100M Yang (+15)", "Chiudi")
           
            if s == 1 then
                if pc.count_item(30301) >= 10 then
                    pc.remove_item(30301, 10)
                    corruption = math.min(corruption + 5, 500)
                    pc.setqf("corruption_points", corruption)
                    syschat("Sacrificio accettato! +5")
                    corruption_system.check_level()
                else
                    say("Non hai abbastanza Pietre Anima!")
                end
               
            elseif s == 2 then
                if pc.count_item(30000) >= 1 then
                    pc.remove_item(30000, 1)
                    corruption = math.min(corruption + 10, 500)
                    pc.setqf("corruption_points", corruption)
                    syschat("Sacrificio potente! +10")
                    corruption_system.check_level()
                else
                    say("Non hai la Pietra Drago!")
                end
               
            elseif s == 3 then
                if pc.get_gold() >= 100000000 then
                    pc.change_gold(-100000000)
                    corruption = math.min(corruption + 15, 500)
                    pc.setqf("corruption_points", corruption)
                    syschat("Sacrificio massiccio! +15")
                    corruption_system.check_level()
                else
                    say("Non hai abbastanza Yang!")
                end
            end
        end
       
        -- CONTROLLA STATO
        when 33009.chat."Controlla Potere Oscuro" begin
            local is_corrupted = pc.getqf("is_corrupted")
           
            if is_corrupted == 0 then
                say_title("Stato:")
                say_reward("NON SEI CORROTTO")
                say("")
                say("Parla con il Maestro Oscuro!")
                return
            end
           
            local corruption = pc.getqf("corruption_points")
           
            say_title("Potere Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            say("")
           
            if corruption >= 500 then
                say_reward("LIVELLO 5 - SIGNORE SUPREMO MAX")
            elseif corruption >= 400 then
                say_reward("LIVELLO 4 - SIGNORE SUPREMO")
            elseif corruption >= 350 then
                say_reward("LIVELLO 3 - SIGNORE DEMONE")
            elseif corruption >= 31 then
                say_reward("LIVELLO 2 - GUERRIERO OSCURO")
            else
                say_reward("LIVELLO 1 - INIZIATO OSCURO")
            end
        end
       
        -- NEGOZIO OSCURO
        when 33009.chat."Negozio Potere Oscuro" begin
            local is_corrupted = pc.getqf("is_corrupted")
           
            if is_corrupted == 0 then
                say_title("Mercante Oscuro:")
                say("Solo i corrotti possono comprare!")
                return
            end
           
            local corruption = pc.getqf("corruption_points")
           
            say_title("Negozio Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            say("")
            say_item("Costume Supremo - 400 Corruzione", 41202, 0)
            say_item("Elmo Supremo - 100 Corruzione", 41203, 0)
            say("")
           
            local s = select("Costume (400)", "Elmo (100)", "Chiudi")
           
            if s == 1 then
                if corruption >= 400 then
                    if pc.count_item(41202) > 0 then
                        say("Hai già il Costume Supremo!")
                    else
                        pc.give_item2(41202, 1)
                        say_title("Mercante:")
                        say("Ecco il tuo COSTUME SUPREMO!")
                        notice_all(pc.get_name() .. " ha acquistato il COSTUME SUPREMO!")
                    end
                else
                    say("Serve 400 corruzione!")
                    say("Ne hai: " .. corruption)
                end
               
            elseif s == 2 then
                if corruption >= 100 then
                    if pc.count_item(41203) > 0 then
                        say("Hai già l'Elmo Supremo!")
                    else
                        pc.give_item2(41203, 1)
                        say_title("Mercante:")
                        say("Ecco il tuo ELMO SUPREMO!")
                        notice_all(pc.get_name() .. " ha acquistato l'ELMO SUPREMO!")
                    end
                else
                    say("Serve 100 corruzione!")
                    say("Ne hai: " .. corruption)
                end
            end
        end
       
        -- ABBANDONA OSCURITÀ
        when 9700.chat."Abbandona Potere Oscuro (5M Yang)" begin
            local is_corrupted = pc.getqf("is_corrupted")
           
            if is_corrupted == 0 then
                say_title("Sacerdote:")
                say("Sei già puro.")
                return
            end
           
            local corruption = pc.getqf("corruption_points")
           
            say_title("Sacerdote:")
            say("Vuoi abbandonare l'oscurità?")
            say("")
            say("Costa: 5.000.000 Yang")
            say("Perdi tutto (corruzione, titoli, oggetti)")
            say("")
           
            local s = select("Sì", "No")
           
            if s == 1 then
                if pc.get_gold() >= 5000000 then
                    -- PRIMA rimuovi gli oggetti
                    local removed_items = false
                   
                    if pc.count_item(41202) > 0 then
                        pc.remove_item(41202, pc.count_item(41202))
                        removed_items = true
                        syschat("Costume Supremo rimosso!")
                    end
                   
                    if pc.count_item(41203) > 0 then
                        pc.remove_item(41203, pc.count_item(41203))
                        removed_items = true
                        syschat("Elmo Supremo rimosso!")
                    end
                   
                    -- POI resetta tutto
                    pc.change_gold(-5000000)
                    pc.setqf("is_corrupted", 0)
                    pc.setqf("corruption_points", 0)
                    pc.setqf("last_level", 0)
                    pc.remove_title()
                   
                    say_title("Sacerdote:")
                    say("Sei purificato!")
                    if removed_items then
                        say("")
                        say("Costume ed Elmo sono stati rimossi!")
                    end
                   
                    notice_all(pc.get_name() .. " ha abbandonato il Potere Oscuro!")
                else
                    say("Non hai abbastanza Yang!")
                end
            end
        end
       
        -- FUNZIONE CONTROLLA LIVELLO
        function check_level()
            local corruption = pc.getqf("corruption_points")
            local last_level = pc.getqf("last_level")
            local new_level = 0
           
            -- Calcola livello attuale
            if corruption >= 500 then
                new_level = 5
            elseif corruption >= 400 then
                new_level = 4
            elseif corruption >= 350 then
                new_level = 3
            elseif corruption >= 31 then
                new_level = 2
            elseif corruption >= 1 then
                new_level = 1
            end
           
            -- Se è cambiato livello
            if new_level > last_level then
                pc.setqf("last_level", new_level)
               
                -- LIVELLO 2
                if new_level == 2 then
                    pc.set_title("[CORROTTO]")
                    syschat("Sei diventato GUERRIERO OSCURO!")
                    notice_all(pc.get_name() .. " e' diventato GUERRIERO OSCURO! (Livello 2)")
                   
                -- LIVELLO 3
                elseif new_level == 3 then
                    pc.set_title("[DEMONE]")
                    syschat("Sei diventato SIGNORE DEMONE!")
                    notice_all(pc.get_name() .. " e' diventato SIGNORE DEMONE! (Livello 3)")
                   
                -- LIVELLO 4
                elseif new_level == 4 then
                    pc.set_title("[SUPREMO]")
                    syschat("Sei diventato SIGNORE SUPREMO!")
                    notice_all(pc.get_name() .. " e' diventato SIGNORE SUPREMO! (Livello 4)")
                   
                -- LIVELLO 5
                elseif new_level == 5 then
                    pc.set_title("[SUPREMO]")
                    syschat("HAI RAGGIUNTO IL POTERE MASSIMO!")
                    notice_all("████ " .. pc.get_name() .. " HA RAGGIUNTO IL MASSIMO POTERE! (Livello 5) ████")
                end
            end
        end
    end
end




CIAO RAGAZZI, ho un problema con questa quest, funziona tutto l'unica cosa che quando torno puro al posto di eliminarmi i costumi dall'inventario mi elimina solo quello dell'inventario invece se l'ho indosso non lo elimina, come posso risolvere?
 
Ultima modifica:
CSS:
quest system_corruzione begin
    state start begin
        -- LOGIN
        when login begin
            local corruption = pc.getqf("corruption_points")
       
            if corruption < 0 then
                pc.setqf("corruption_points", 0)
            end
            if corruption > 500 then
                pc.setqf("corruption_points", 500)
            end
       
            -- Timer controllo anti-frode (ogni 10 minuti)
            timer("check_items_fraud", 600)
        end
   
        -- CONTROLLO ANTI-FRODE
        when check_items_fraud.timer begin
            local is_corrupted = pc.getqf("is_corrupted")
            local corruption = pc.getqf("corruption_points")
       
            -- Se NON è corrotto, rimuovi TUTTO
            if is_corrupted == 0 then
                if pc.count_item(41202) > 0 then
                    pc.remove_item(41202, pc.count_item(41202))
                    syschat("COSTUME RIMOSSO: non sei più corrotto!")
                end
           
                if pc.count_item(41203) > 0 then
                    pc.remove_item(41203, pc.count_item(41203))
                    syschat("ELMO RIMOSSO: non sei più corrotto!")
                end
            else
                -- Se è corrotto, controlla requisiti
                if pc.count_item(41202) > 0 and corruption < 400 then
                    pc.remove_item(41202, pc.count_item(41202))
                    syschat("COSTUME RIMOSSO: corruzione sotto 400!")
                end
           
                if pc.count_item(41203) > 0 and corruption < 100 then
                    pc.remove_item(41203, pc.count_item(41203))
                    syschat("ELMO RIMOSSO: corruzione sotto 100!")
                end
            end
       
            -- Ricontrolla tra 10 minuti
            timer("check_items_fraud", 600)
        end
   
        -- ABBRACCIARE L'OSCURITÀ
        when 9700.chat."Abbraccia il Potere Oscuro" begin
            local is_corrupted = pc.getqf("is_corrupted")
       
            if is_corrupted == 1 then
                local corruption = pc.getqf("corruption_points")
                say_title("Maestro Oscuro:")
                say("Hai già abbracciato l'oscurità.")
                say("Corruzione: " .. corruption .. "/500")
                return
            end
       
            say_title("Maestro Oscuro:")
            say("Vuoi abbracciare il Potere Oscuro?")
            say("")
            say_reward("Otterrai:")
            say("- Titoli esclusivi")
            say("- Possibilità di comprare Costume ed Elmo")
            say("")
       
            local s = select("Sì, abbraccia", "No")
       
            if s == 1 then
                pc.setqf("is_corrupted", 1)
                pc.setqf("corruption_points", 15)
                pc.setqf("last_level", 0)
           
                say_title("Maestro Oscuro:")
                say("Benvenuto nell'oscurità!")
           
                notice_all(pc.get_name() .. " ha abbracciato il Potere Oscuro!")
            end
        end
   
        -- UCCIDERE GIOCATORI
        when kill with npc.is_pc() begin
            local is_corrupted = pc.getqf("is_corrupted")
       
            if is_corrupted == 1 then
                local corruption = pc.getqf("corruption_points")
           
                if corruption < 500 then
                    corruption = corruption + 10
                    pc.setqf("corruption_points", corruption)
                    syschat("POTERE OSCURO +10! [" .. corruption .. "/500]")
               
                    corruption_system.check_level()
                end
            end
        end
   
        -- UCCIDERE NPC INNOCENTI
        when 101.kill begin
            local is_corrupted = pc.getqf("is_corrupted")
       
            if is_corrupted == 1 then
                local corruption = pc.getqf("corruption_points")
           
                if corruption < 500 then
                    corruption = corruption + 5
                    pc.setqf("corruption_points", corruption)
                    syschat("Innocente ucciso! +5 [" .. corruption .. "/500]")
               
                    corruption_system.check_level()
                end
            end
        end
   
        -- SACRIFICARE OGGETTI
        when 9700.chat."Sacrifica oggetti per potere" begin
            local is_corrupted = pc.getqf("is_corrupted")
       
            if is_corrupted == 0 then
                say_title("Altare Oscuro:")
                say("Solo i corrotti possono usare questo altare.")
                return
            end
       
            local corruption = pc.getqf("corruption_points")
       
            if corruption >= 500 then
                say_title("Altare Oscuro:")
                say("Hai raggiunto il massimo potere!")
                return
            end
       
            say_title("Altare Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            say("")
       
            local s = select("10 Pietre Anima (+5)", "1 Pietra Drago (+10)", "100M Yang (+15)", "Chiudi")
       
            if s == 1 then
                if pc.count_item(30301) >= 10 then
                    pc.remove_item(30301, 10)
                    corruption = math.min(corruption + 5, 500)
                    pc.setqf("corruption_points", corruption)
                    syschat("Sacrificio accettato! +5")
                    corruption_system.check_level()
                else
                    say("Non hai abbastanza Pietre Anima!")
                end
           
            elseif s == 2 then
                if pc.count_item(30000) >= 1 then
                    pc.remove_item(30000, 1)
                    corruption = math.min(corruption + 10, 500)
                    pc.setqf("corruption_points", corruption)
                    syschat("Sacrificio potente! +10")
                    corruption_system.check_level()
                else
                    say("Non hai la Pietra Drago!")
                end
           
            elseif s == 3 then
                if pc.get_gold() >= 100000000 then
                    pc.change_gold(-100000000)
                    corruption = math.min(corruption + 15, 500)
                    pc.setqf("corruption_points", corruption)
                    syschat("Sacrificio massiccio! +15")
                    corruption_system.check_level()
                else
                    say("Non hai abbastanza Yang!")
                end
            end
        end
   
        -- CONTROLLA STATO
        when 33009.chat."Controlla Potere Oscuro" begin
            local is_corrupted = pc.getqf("is_corrupted")
       
            if is_corrupted == 0 then
                say_title("Stato:")
                say_reward("NON SEI CORROTTO")
                say("")
                say("Parla con il Maestro Oscuro!")
                return
            end
       
            local corruption = pc.getqf("corruption_points")
       
            say_title("Potere Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            say("")
       
            if corruption >= 500 then
                say_reward("LIVELLO 5 - SIGNORE SUPREMO MAX")
            elseif corruption >= 400 then
                say_reward("LIVELLO 4 - SIGNORE SUPREMO")
            elseif corruption >= 350 then
                say_reward("LIVELLO 3 - SIGNORE DEMONE")
            elseif corruption >= 31 then
                say_reward("LIVELLO 2 - GUERRIERO OSCURO")
            else
                say_reward("LIVELLO 1 - INIZIATO OSCURO")
            end
        end
   
        -- NEGOZIO OSCURO
        when 33009.chat."Negozio Potere Oscuro" begin
            local is_corrupted = pc.getqf("is_corrupted")
       
            if is_corrupted == 0 then
                say_title("Mercante Oscuro:")
                say("Solo i corrotti possono comprare!")
                return
            end
       
            local corruption = pc.getqf("corruption_points")
       
            say_title("Negozio Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            say("")
            say_item("Costume Supremo - 400 Corruzione", 41202, 0)
            say_item("Elmo Supremo - 100 Corruzione", 41203, 0)
            say("")
       
            local s = select("Costume (400)", "Elmo (100)", "Chiudi")
       
            if s == 1 then
                if corruption >= 400 then
                    if pc.count_item(41202) > 0 then
                        say("Hai già il Costume Supremo!")
                    else
                        pc.give_item2(41202, 1)
                        say_title("Mercante:")
                        say("Ecco il tuo COSTUME SUPREMO!")
                        notice_all(pc.get_name() .. " ha acquistato il COSTUME SUPREMO!")
                    end
                else
                    say("Serve 400 corruzione!")
                    say("Ne hai: " .. corruption)
                end
           
            elseif s == 2 then
                if corruption >= 100 then
                    if pc.count_item(41203) > 0 then
                        say("Hai già l'Elmo Supremo!")
                    else
                        pc.give_item2(41203, 1)
                        say_title("Mercante:")
                        say("Ecco il tuo ELMO SUPREMO!")
                        notice_all(pc.get_name() .. " ha acquistato l'ELMO SUPREMO!")
                    end
                else
                    say("Serve 100 corruzione!")
                    say("Ne hai: " .. corruption)
                end
            end
        end
   
        -- ABBANDONA OSCURITÀ
        when 9700.chat."Abbandona Potere Oscuro (5M Yang)" begin
            local is_corrupted = pc.getqf("is_corrupted")
       
            if is_corrupted == 0 then
                say_title("Sacerdote:")
                say("Sei già puro.")
                return
            end
       
            local corruption = pc.getqf("corruption_points")
       
            say_title("Sacerdote:")
            say("Vuoi abbandonare l'oscurità?")
            say("")
            say("Costa: 5.000.000 Yang")
            say("Perdi tutto (corruzione, titoli, oggetti)")
            say("")
       
            local s = select("Sì", "No")
       
            if s == 1 then
                if pc.get_gold() >= 5000000 then
                    -- PRIMA rimuovi gli oggetti
                    local removed_items = false
               
                    if pc.count_item(41202) > 0 then
                        pc.remove_item(41202, pc.count_item(41202))
                        removed_items = true
                        syschat("Costume Supremo rimosso!")
                    end
               
                    if pc.count_item(41203) > 0 then
                        pc.remove_item(41203, pc.count_item(41203))
                        removed_items = true
                        syschat("Elmo Supremo rimosso!")
                    end
               
                    -- POI resetta tutto
                    pc.change_gold(-5000000)
                    pc.setqf("is_corrupted", 0)
                    pc.setqf("corruption_points", 0)
                    pc.setqf("last_level", 0)
                    pc.remove_title()
               
                    say_title("Sacerdote:")
                    say("Sei purificato!")
                    if removed_items then
                        say("")
                        say("Costume ed Elmo sono stati rimossi!")
                    end
               
                    notice_all(pc.get_name() .. " ha abbandonato il Potere Oscuro!")
                else
                    say("Non hai abbastanza Yang!")
                end
            end
        end
   
        -- FUNZIONE CONTROLLA LIVELLO
        function check_level()
            local corruption = pc.getqf("corruption_points")
            local last_level = pc.getqf("last_level")
            local new_level = 0
       
            -- Calcola livello attuale
            if corruption >= 500 then
                new_level = 5
            elseif corruption >= 400 then
                new_level = 4
            elseif corruption >= 350 then
                new_level = 3
            elseif corruption >= 31 then
                new_level = 2
            elseif corruption >= 1 then
                new_level = 1
            end
       
            -- Se è cambiato livello
            if new_level > last_level then
                pc.setqf("last_level", new_level)
           
                -- LIVELLO 2
                if new_level == 2 then
                    pc.set_title("[CORROTTO]")
                    syschat("Sei diventato GUERRIERO OSCURO!")
                    notice_all(pc.get_name() .. " e' diventato GUERRIERO OSCURO! (Livello 2)")
               
                -- LIVELLO 3
                elseif new_level == 3 then
                    pc.set_title("[DEMONE]")
                    syschat("Sei diventato SIGNORE DEMONE!")
                    notice_all(pc.get_name() .. " e' diventato SIGNORE DEMONE! (Livello 3)")
               
                -- LIVELLO 4
                elseif new_level == 4 then
                    pc.set_title("[SUPREMO]")
                    syschat("Sei diventato SIGNORE SUPREMO!")
                    notice_all(pc.get_name() .. " e' diventato SIGNORE SUPREMO! (Livello 4)")
               
                -- LIVELLO 5
                elseif new_level == 5 then
                    pc.set_title("[SUPREMO]")
                    syschat("HAI RAGGIUNTO IL POTERE MASSIMO!")
                    notice_all("████ " .. pc.get_name() .. " HA RAGGIUNTO IL MASSIMO POTERE! (Livello 5) ████")
                end
            end
        end
    end
end




CIAO RAGAZZI, ho un problema con questa quest, funziona tutto l'unica cosa che quando torno puro al posto di eliminarmi i costumi dall'inventario mi elimina solo quello dell'inventario invece se l'ho indosso non lo elimina, come posso risolvere?

Prova cosi:

CSS:
Edit: aggiornato sotto.

Ho riordinato un po' il codice se non ti ritrovi, te lo spiego
 
ciao grazie mille per l'ordina del codice, ma ancora non mi elimina il costume indossato, quindi nell'inventario costume continua ad esserci
 
ciao grazie mille per l'ordina del codice, ma ancora non mi elimina il costume indossato, quindi nell'inventario costume continua ad esserci

La funzione pc.remove_item non sempre gestisce correttamente gli oggetti già indossati dal personaggio. Per sistemare ti ho implementato una logica più efficace che forza la rimozione dell'item in ogni caso. Ho modificato il codice precedente che ti ho scritto.
 
La funzione pc.remove_item non sempre gestisce correttamente gli oggetti già indossati dal personaggio. Per sistemare ti ho implementato una logica più efficace che forza la rimozione dell'item in ogni caso. Ho modificato il codice precedente che ti ho scritto.
Niente rimane ancora nell'inventario costume (quello indossato) invece quello non indossato sparisce.
 
Ultima modifica:
Niente rimane ancora nell'inventario costume (quello indossato) invece quello non indossato sparisce.

Il bug è sempre in pc.remove_item su molti core non ha i permessi per eliminare roba che stai indossando o che sta negli slot speciali. In pratica vede solo l'inventario normale. Proviamo a inserire un comando per togliere l'oggetto dall'equipaggiamento prima della rimozione:

CSS:
Edit: aggiornato sotto.
 
allora errori: quando arrivo a 500/500 continua a mostrarmi il syschat, continua a non essere rimosso dall'inventario costumi, non mi fa abbandonare la corruzione (rimango a 500- viene rimosso solo costume) elmo rimane nell'inventario, che sia normale o inventario costume.
 
Ultima modifica:
allora errori: quando arrivo a 500/500 continua a mostrarmi il syschat, continua a non essere rimosso dall'inventario costumi, non mi fa abbandonare la corruzione (rimango a 500- viene rimosso solo costume) elmo rimane nell'inventario, che sia normale o inventario costume.

Prova cosi è da anni ormai che non tocco file di metin:


-

Ho aggiunto pc.unequip_item(VNUM) prima di pc.remove_item. Questo disarma il giocatore portando l'oggetto dal corpo all'inventario e dopo viene rimosso istantaneamente. Funziona sia per l'inventario normale che per quello costumi.

Ho corretto la sezione "Abbandona Oscurità" forzando il reset di is_corrupted a 0 e chiamando immediatamente la rimozione degli oggetti così non devi aspettare il timer di 10 minuti.
 
Dimmi precisamente quali somo i compiti che deve svolgere questa quest che magari domani con calma controllo tutto il codice
allora, se uccidono i player aumenta corruzione, se uccidono un determinato npc aumenta corruzione (per testare c'e' 101), se viene ucciso perde tot di corruzione, quando raggiungono 400 possono prendere costume dal negozio, quando arrivano a 500 prendono elmo costume.

Problema: quando ritornano puri o scendono sotto i 400 viene eliminato solo il costume (se presente) dall'inventario principale solo che io vorrei eliminarlo anche dall'inventario costume quindi se indossato, deve sparire.
 
Ultima modifica:
Ho inserito la questa ora non ti fa abbandonare la corruzione. Praticamente quando clicco su abbandona mi si chiude la finestra (continua a rimanere corrotto) anche con la funziona gm non funziona
 
Ultima modifica:
questa è completa? devo sostituirla alla mia?

Mancava del codice questo è quello completo: @LegendDragon

CSS:
quest system_corruzione begin
    state start begin
        when login begin
            local corruption = pc.getqf("corruption_points")
            if corruption < 0 then
                pc.setqf("corruption_points", 0)
            end
            if corruption > 500 then
                pc.setqf("corruption_points", 500)
            end
            timer("check_items_fraud", 600)
        end

        when check_items_fraud.timer begin
            local is_corrupted = pc.getqf("is_corrupted")
            local corruption = pc.getqf("corruption_points")
            local items_to_check = {41202, 41203}

            if is_corrupted == 0 then
                for _, vnum in ipairs(items_to_check) do
                    if pc.count_item(vnum) > 0 or pc.is_worn(vnum) then
                        pc.remove_item(vnum, pc.count_item(vnum) + 10)
                        syschat("OGGETTO RIMOSSO: Non sei più corrotto!")
                    end
                end
            else
                if pc.count_item(41202) > 0 and corruption < 400 then
                    pc.remove_item(41202, pc.count_item(41202) + 10)
                    syschat("COSTUME RIMOSSO: Corruzione insufficiente!")
                end
                if pc.count_item(41203) > 0 and corruption < 100 then
                    pc.remove_item(41203, pc.count_item(41203) + 10)
                    syschat("ELMO RIMOSSO: Corruzione insufficiente!")
                end
            end
            timer("check_items_fraud", 600)
        end

        when 9700.chat."Abbraccia il Potere Oscuro" begin
            if pc.getqf("is_corrupted") == 1 then
                say_title("Maestro Oscuro:")
                say("Hai già abbracciato l'oscurità.")
                say("Corruzione: " .. pc.getqf("corruption_points") .. "/500")
                return
            end
            say_title("Maestro Oscuro:")
            say("Vuoi abbracciare il Potere Oscuro?")
            say("")
            say_reward("Otterrai:")
            say("- Titoli esclusivi")
            say("- Possibilità di comprare Costume ed Elmo")
            say("")
            if select("Sì, abbraccia", "No") == 1 then
                pc.setqf("is_corrupted", 1)
                pc.setqf("corruption_points", 15)
                pc.setqf("last_level", 0)
                say_title("Maestro Oscuro:")
                say("Benvenuto nell'oscurità!")
                notice_all(pc.get_name() .. " ha abbracciato il Potere Oscuro!")
            end
        end

        when kill with npc.is_pc() begin
            if pc.getqf("is_corrupted") == 1 then
                local corruption = pc.getqf("corruption_points")
                if corruption < 500 then
                    corruption = corruption + 10
                    pc.setqf("corruption_points", corruption)
                    syschat("POTERE OSCURO +10! [" .. corruption .. "/500]")
                    system_corruzione.check_level()
                end
            end
        end

        when 101.kill begin
            if pc.getqf("is_corrupted") == 1 then
                local corruption = pc.getqf("corruption_points")
                if corruption < 500 then
                    corruption = corruption + 5
                    pc.setqf("corruption_points", corruption)
                    syschat("Innocente ucciso! +5 [" .. corruption .. "/500]")
                    system_corruzione.check_level()
                end
            end
        end

        when 9700.chat."Sacrifica oggetti per potere" begin
            if pc.getqf("is_corrupted") == 0 then
                say_title("Altare Oscuro:")
                say("Solo i corrotti possono usare questo altare.")
                return
            end
            local corruption = pc.getqf("corruption_points")
            if corruption >= 500 then
                say_title("Altare Oscuro:")
                say("Hai raggiunto il massimo potere!")
                return
            end
            say_title("Altare Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            local s = select("10 Pietre Anima (+5)", "1 Pietra Drago (+10)", "100M Yang (+15)", "Chiudi")
            if s == 1 then
                if pc.count_item(30301) >= 10 then
                    pc.remove_item(30301, 10)
                    pc.setqf("corruption_points", math.min(corruption + 5, 500))
                    syschat("Sacrificio accettato! +5")
                    system_corruzione.check_level()
                else
                    say("Non hai abbastanza Pietre Anima!")
                end
            elseif s == 2 then
                if pc.count_item(30000) >= 1 then
                    pc.remove_item(30000, 1)
                    pc.setqf("corruption_points", math.min(corruption + 10, 500))
                    syschat("Sacrificio potente! +10")
                    system_corruzione.check_level()
                else
                    say("Non hai la Pietra Drago!")
                end
            elseif s == 3 then
                if pc.get_gold() >= 100000000 then
                    pc.change_gold(-100000000)
                    pc.setqf("corruption_points", math.min(corruption + 15, 500))
                    syschat("Sacrificio massiccio! +15")
                    system_corruzione.check_level()
                else
                    say("Non hai abbastanza Yang!")
                end
            end
        end

        when 33009.chat."Controlla Potere Oscuro" begin
            if pc.getqf("is_corrupted") == 0 then
                say_title("Stato:")
                say_reward("NON SEI CORROTTO")
                say("Parla con il Maestro Oscuro!")
                return
            end
            local corruption = pc.getqf("corruption_points")
            say_title("Potere Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            if corruption >= 500 then say_reward("LIVELLO 5 - SIGNORE SUPREMO MAX")
            elseif corruption >= 400 then say_reward("LIVELLO 4 - SIGNORE SUPREMO")
            elseif corruption >= 350 then say_reward("LIVELLO 3 - SIGNORE DEMONE")
            elseif corruption >= 31 then say_reward("LIVELLO 2 - GUERRIERO OSCURO")
            else say_reward("LIVELLO 1 - INIZIATO OSCURO") end
        end

        when 33009.chat."Negozio Potere Oscuro" begin
            if pc.getqf("is_corrupted") == 0 then
                say_title("Mercante Oscuro:")
                say("Solo i corrotti possono comprare!")
                return
            end
            local corruption = pc.getqf("corruption_points")
            say_title("Negozio Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            say_item("Costume Supremo", 41202, "")
            say_item("Elmo Supremo", 41203, "")
            local s = select("Costume (400)", "Elmo (100)", "Chiudi")
            if s == 1 then
                if corruption >= 400 then
                    if pc.count_item(41202) > 0 then say("Lo possiedi già!")
                    else pc.give_item2(41202, 1) notice_all(pc.get_name() .. " ha ottenuto il COSTUME SUPREMO!") end
                else say("Corruzione insufficiente!") end
            elseif s == 2 then
                if corruption >= 100 then
                    if pc.count_item(41203) > 0 then say("Lo possiedi già!")
                    else pc.give_item2(41203, 1) notice_all(pc.get_name() .. " ha ottenuto l'ELMO SUPREMO!") end
                else say("Corruzione insufficiente!") end
            end
        end

        when 9700.chat."Abbandona Potere Oscuro (5M Yang)" begin
            if pc.getqf("is_corrupted") == 0 then
                say_title("Sacerdote:")
                say("Sei già puro.")
                return
            end
            say_title("Sacerdote:")
            say("Vuoi abbandonare l'oscurità?")
            say("Costo: 5.000.000 Yang")
            if select("Sì", "No") == 1 then
                if pc.get_gold() >= 5000000 then
                    pc.change_gold(-5000000)
                    local items = {41202, 41203}
                    for _, v in ipairs(items) do
                        if pc.count_item(v) > 0 or pc.is_worn(v) then
                            pc.remove_item(v, pc.count_item(v) + 10)
                        end
                    end
                    pc.setqf("is_corrupted", 0)
                    pc.setqf("corruption_points", 0)
                    pc.setqf("last_level", 0)
                    pc.remove_title()
                    say_title("Sacerdote:")
                    say("Sei purificato e i tuoi oggetti oscuri sono spariti!")
                    notice_all(pc.get_name() .. " ha abbandonato il Potere Oscuro!")
                else
                    say("Yang insufficienti!")
                end
            end
        end

        function check_level()
            local corruption = pc.getqf("corruption_points")
            local last_level = pc.getqf("last_level")
            local new_level = 0
            if corruption >= 500 then new_level = 5
            elseif corruption >= 400 then new_level = 4
            elseif corruption >= 350 then new_level = 3
            elseif corruption >= 31 then new_level = 2
            elseif corruption >= 1 then new_level = 1 end
            if new_level > last_level then
                pc.setqf("last_level", new_level)
                if new_level == 2 then pc.set_title("[CORROTTO]") notice_all(pc.get_name() .. " e' un GUERRIERO OSCURO!")
                elseif new_level == 3 then pc.set_title("[DEMONE]") notice_all(pc.get_name() .. " e' un SIGNORE DEMONE!")
                elseif new_level == 4 then pc.set_title("[SUPREMO]") notice_all(pc.get_name() .. " e' un SIGNORE SUPREMO!")
                elseif new_level == 5 then pc.set_title("[SUPREMO]") notice_all("██ " .. pc.get_name() .. " HA IL POTERE MASSIMO! ██") end
            end
        end
    end
end
 
Mancava del codice questo è quello completo: @LegendDragon

CSS:
quest system_corruzione begin
    state start begin
        when login begin
            local corruption = pc.getqf("corruption_points")
            if corruption < 0 then
                pc.setqf("corruption_points", 0)
            end
            if corruption > 500 then
                pc.setqf("corruption_points", 500)
            end
            timer("check_items_fraud", 600)
        end

        when check_items_fraud.timer begin
            local is_corrupted = pc.getqf("is_corrupted")
            local corruption = pc.getqf("corruption_points")
            local items_to_check = {41202, 41203}

            if is_corrupted == 0 then
                for _, vnum in ipairs(items_to_check) do
                    if pc.count_item(vnum) > 0 or pc.is_worn(vnum) then
                        pc.remove_item(vnum, pc.count_item(vnum) + 10)
                        syschat("OGGETTO RIMOSSO: Non sei più corrotto!")
                    end
                end
            else
                if pc.count_item(41202) > 0 and corruption < 400 then
                    pc.remove_item(41202, pc.count_item(41202) + 10)
                    syschat("COSTUME RIMOSSO: Corruzione insufficiente!")
                end
                if pc.count_item(41203) > 0 and corruption < 100 then
                    pc.remove_item(41203, pc.count_item(41203) + 10)
                    syschat("ELMO RIMOSSO: Corruzione insufficiente!")
                end
            end
            timer("check_items_fraud", 600)
        end

        when 9700.chat."Abbraccia il Potere Oscuro" begin
            if pc.getqf("is_corrupted") == 1 then
                say_title("Maestro Oscuro:")
                say("Hai già abbracciato l'oscurità.")
                say("Corruzione: " .. pc.getqf("corruption_points") .. "/500")
                return
            end
            say_title("Maestro Oscuro:")
            say("Vuoi abbracciare il Potere Oscuro?")
            say("")
            say_reward("Otterrai:")
            say("- Titoli esclusivi")
            say("- Possibilità di comprare Costume ed Elmo")
            say("")
            if select("Sì, abbraccia", "No") == 1 then
                pc.setqf("is_corrupted", 1)
                pc.setqf("corruption_points", 15)
                pc.setqf("last_level", 0)
                say_title("Maestro Oscuro:")
                say("Benvenuto nell'oscurità!")
                notice_all(pc.get_name() .. " ha abbracciato il Potere Oscuro!")
            end
        end

        when kill with npc.is_pc() begin
            if pc.getqf("is_corrupted") == 1 then
                local corruption = pc.getqf("corruption_points")
                if corruption < 500 then
                    corruption = corruption + 10
                    pc.setqf("corruption_points", corruption)
                    syschat("POTERE OSCURO +10! [" .. corruption .. "/500]")
                    system_corruzione.check_level()
                end
            end
        end

        when 101.kill begin
            if pc.getqf("is_corrupted") == 1 then
                local corruption = pc.getqf("corruption_points")
                if corruption < 500 then
                    corruption = corruption + 5
                    pc.setqf("corruption_points", corruption)
                    syschat("Innocente ucciso! +5 [" .. corruption .. "/500]")
                    system_corruzione.check_level()
                end
            end
        end

        when 9700.chat."Sacrifica oggetti per potere" begin
            if pc.getqf("is_corrupted") == 0 then
                say_title("Altare Oscuro:")
                say("Solo i corrotti possono usare questo altare.")
                return
            end
            local corruption = pc.getqf("corruption_points")
            if corruption >= 500 then
                say_title("Altare Oscuro:")
                say("Hai raggiunto il massimo potere!")
                return
            end
            say_title("Altare Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            local s = select("10 Pietre Anima (+5)", "1 Pietra Drago (+10)", "100M Yang (+15)", "Chiudi")
            if s == 1 then
                if pc.count_item(30301) >= 10 then
                    pc.remove_item(30301, 10)
                    pc.setqf("corruption_points", math.min(corruption + 5, 500))
                    syschat("Sacrificio accettato! +5")
                    system_corruzione.check_level()
                else
                    say("Non hai abbastanza Pietre Anima!")
                end
            elseif s == 2 then
                if pc.count_item(30000) >= 1 then
                    pc.remove_item(30000, 1)
                    pc.setqf("corruption_points", math.min(corruption + 10, 500))
                    syschat("Sacrificio potente! +10")
                    system_corruzione.check_level()
                else
                    say("Non hai la Pietra Drago!")
                end
            elseif s == 3 then
                if pc.get_gold() >= 100000000 then
                    pc.change_gold(-100000000)
                    pc.setqf("corruption_points", math.min(corruption + 15, 500))
                    syschat("Sacrificio massiccio! +15")
                    system_corruzione.check_level()
                else
                    say("Non hai abbastanza Yang!")
                end
            end
        end

        when 33009.chat."Controlla Potere Oscuro" begin
            if pc.getqf("is_corrupted") == 0 then
                say_title("Stato:")
                say_reward("NON SEI CORROTTO")
                say("Parla con il Maestro Oscuro!")
                return
            end
            local corruption = pc.getqf("corruption_points")
            say_title("Potere Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            if corruption >= 500 then say_reward("LIVELLO 5 - SIGNORE SUPREMO MAX")
            elseif corruption >= 400 then say_reward("LIVELLO 4 - SIGNORE SUPREMO")
            elseif corruption >= 350 then say_reward("LIVELLO 3 - SIGNORE DEMONE")
            elseif corruption >= 31 then say_reward("LIVELLO 2 - GUERRIERO OSCURO")
            else say_reward("LIVELLO 1 - INIZIATO OSCURO") end
        end

        when 33009.chat."Negozio Potere Oscuro" begin
            if pc.getqf("is_corrupted") == 0 then
                say_title("Mercante Oscuro:")
                say("Solo i corrotti possono comprare!")
                return
            end
            local corruption = pc.getqf("corruption_points")
            say_title("Negozio Oscuro:")
            say("Corruzione: " .. corruption .. "/500")
            say_item("Costume Supremo", 41202, "")
            say_item("Elmo Supremo", 41203, "")
            local s = select("Costume (400)", "Elmo (100)", "Chiudi")
            if s == 1 then
                if corruption >= 400 then
                    if pc.count_item(41202) > 0 then say("Lo possiedi già!")
                    else pc.give_item2(41202, 1) notice_all(pc.get_name() .. " ha ottenuto il COSTUME SUPREMO!") end
                else say("Corruzione insufficiente!") end
            elseif s == 2 then
                if corruption >= 100 then
                    if pc.count_item(41203) > 0 then say("Lo possiedi già!")
                    else pc.give_item2(41203, 1) notice_all(pc.get_name() .. " ha ottenuto l'ELMO SUPREMO!") end
                else say("Corruzione insufficiente!") end
            end
        end

        when 9700.chat."Abbandona Potere Oscuro (5M Yang)" begin
            if pc.getqf("is_corrupted") == 0 then
                say_title("Sacerdote:")
                say("Sei già puro.")
                return
            end
            say_title("Sacerdote:")
            say("Vuoi abbandonare l'oscurità?")
            say("Costo: 5.000.000 Yang")
            if select("Sì", "No") == 1 then
                if pc.get_gold() >= 5000000 then
                    pc.change_gold(-5000000)
                    local items = {41202, 41203}
                    for _, v in ipairs(items) do
                        if pc.count_item(v) > 0 or pc.is_worn(v) then
                            pc.remove_item(v, pc.count_item(v) + 10)
                        end
                    end
                    pc.setqf("is_corrupted", 0)
                    pc.setqf("corruption_points", 0)
                    pc.setqf("last_level", 0)
                    pc.remove_title()
                    say_title("Sacerdote:")
                    say("Sei purificato e i tuoi oggetti oscuri sono spariti!")
                    notice_all(pc.get_name() .. " ha abbandonato il Potere Oscuro!")
                else
                    say("Yang insufficienti!")
                end
            end
        end

        function check_level()
            local corruption = pc.getqf("corruption_points")
            local last_level = pc.getqf("last_level")
            local new_level = 0
            if corruption >= 500 then new_level = 5
            elseif corruption >= 400 then new_level = 4
            elseif corruption >= 350 then new_level = 3
            elseif corruption >= 31 then new_level = 2
            elseif corruption >= 1 then new_level = 1 end
            if new_level > last_level then
                pc.setqf("last_level", new_level)
                if new_level == 2 then pc.set_title("[CORROTTO]") notice_all(pc.get_name() .. " e' un GUERRIERO OSCURO!")
                elseif new_level == 3 then pc.set_title("[DEMONE]") notice_all(pc.get_name() .. " e' un SIGNORE DEMONE!")
                elseif new_level == 4 then pc.set_title("[SUPREMO]") notice_all(pc.get_name() .. " e' un SIGNORE SUPREMO!")
                elseif new_level == 5 then pc.set_title("[SUPREMO]") notice_all("██ " .. pc.get_name() .. " HA IL POTERE MASSIMO! ██") end
            end
        end
    end
end
ho messo la quest, quando clicco su abbandona corruzione mi elimina solo costumi nell'inventario principale ma continuo ad avere 500 di corruzione (invece nell inventario costume CONTINUA A NON CANCELLARSI)
 
ho messo la quest, quando clicco su abbandona corruzione mi elimina solo costumi nell'inventario principale ma continuo ad avere 500 di corruzione (invece nell inventario costume CONTINUA A NON CANCELLARSI)

Vedi:

CSS:
quest system_corruzione begin
    state start begin
        when login begin
            local corruption = pc.getqf("corruption_points")
            if corruption < 0 then pc.setqf("corruption_points", 0) end
            if corruption > 500 then pc.setqf("corruption_points", 500) end
            timer("check_items_fraud", 600)
        end

        when check_items_fraud.timer begin
            local is_corrupted = pc.getqf("is_corrupted")
            local corruption = pc.getqf("corruption_points")
            if is_corrupted == 0 then
                system_corruzione.force_remove_all()
            else
                if pc.count_item(41202) > 0 and corruption < 400 then
                    system_corruzione.force_remove_all()
                    syschat("COSTUME RIMOSSO: Corruzione insufficiente!")
                end
                if pc.count_item(41203) > 0 and corruption < 100 then
                    system_corruzione.force_remove_all()
                    syschat("ELMO RIMOSSO: Corruzione insufficiente!")
                end
            end
            timer("check_items_fraud", 600)
        end

        when 9700.chat."Abbraccia il Potere Oscuro" begin
            if pc.getqf("is_corrupted") == 1 then
                say_title("Maestro Oscuro:")
                say("Hai già abbracciato l'oscurità.")
                return
            end
            say_title("Maestro Oscuro:")
            say("Vuoi abbracciare il Potere Oscuro?")
            if select("Sì", "No") == 1 then
                pc.setqf("is_corrupted", 1)
                pc.setqf("corruption_points", 15)
                pc.setqf("last_level", 0)
                notice_all(pc.get_name() .. " ha abbracciato l'oscurità!")
            end
        end

        when 9700.chat."Abbandona Potere Oscuro (5M Yang)" begin
            if pc.getqf("is_corrupted") == 0 then
                say("Sei già puro.")
                return
            end
            say_title("Sacerdote:")
            say("Vuoi purificarti?")
            if select("Sì, purifica", "No") == 1 then
                if pc.get_gold() >= 5000000 then
                    pc.change_gold(-5000000)
                    pc.setqf("is_corrupted", 0)
                    pc.setqf("corruption_points", 0)
                    pc.setqf("last_level", 0)
                    pc.remove_title()
                    system_corruzione.force_remove_all()
                    say_title("Sacerdote:")
                    say("Sei stato purificato!")
                    notice_all(pc.get_name() .. " è tornato alla luce!")
                else
                    say("Yang insufficienti!")
                end
            end
        end

        function force_remove_all()
            local items = {41202, 41203}
            for _, vnum in ipairs(items) do
                if pc.is_worn(vnum) then
                    pc.remove_item(vnum, 1)
                end
                if pc.count_item(vnum) > 0 then
                    pc.remove_item(vnum, pc.count_item(vnum))
                end
            end
        end

        when kill with npc.is_pc() or 101.kill begin
            if pc.getqf("is_corrupted") == 1 then
                local p = npc.is_pc() and 10 or 5
                local cur = pc.getqf("corruption_points")
                if cur < 500 then
                    pc.setqf("corruption_points", math.min(cur + p, 500))
                    system_corruzione.check_level()
                end
            end
        end

        when 33009.chat."Negozio Potere Oscuro" begin
            if pc.getqf("is_corrupted") == 0 then return end
            local c = pc.getqf("corruption_points")
            say_title("Negozio Oscuro:")
            local s = select("Costume (400)", "Elmo (100)", "Chiudi")
            if s == 1 and c >= 400 then
                pc.give_item2(41202, 1)
            elseif s == 2 and c >= 100 then
                pc.give_item2(41203, 1)
            end
        end

        function check_level()
            local c = pc.getqf("corruption_points")
            local l = pc.getqf("last_level")
            local n = 0
            if c >= 500 then n = 5 elseif c >= 400 then n = 4 elseif c >= 350 then n = 3 elseif c >= 31 then n = 2 end
            if n > l then
                pc.setqf("last_level", n)
                if n == 2 then pc.set_title("[CORROTTO]")
                elseif n == 3 then pc.set_title("[DEMONE]")
                elseif n >= 4 then pc.set_title("[SUPREMO]") end
            end
        end
    end
end
 
Stato
Discussione chiusa ad ulteriori risposte.
Indietro
Top Bottom