Problema [Quest change empire]

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
Gudy
Nou Venit

Nou Venit
Mesaje: 5
Membru din: 23 Iul 2014, 10:45
Aprecieri: 1  
Mulţumiri: 0
Medalii

Salutare..am nevoie de ajutor la Quest-ul pentru Schimbarea de regat nu functioneaza.. e implementat si are permisiunea : 777 si nu functioneaza.

Cod: Selectaţi tot

quest change_empire_item begin
       state start begin
          when login with pc.getqf("special_func") == 0 begin
             if pc.get_empire() == 1 then
                affect.add_collect(apply.GOLD_DOUBLE_BONUS,10,60*60*24*365*4)
                affect.add_collect(apply.ITEM_DROP_BONUS,10,60*60*24*365*4)
                affect.add_collect(apply.ATT_BONUS_TO_MONSTER,10,60*60*24*365*4)
                pc.setqf("special_func", 1)
             elseif pc.get_empire() == 2 then
                affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*4)
                affect.add_collect(apply.MAX_HP,1000,60*60*24*365*4)
                affect.add_collect(apply.EXP_DOUBLE_BONUS,10,60*60*24*365*4)
                pc.setqf("special_func", 2)
             elseif pc.get_empire() == 3 then
                affect.add_collect(apply.STR,10,60*60*24*365*4)
                affect.add_collect(apply.CON,10,60*60*24*365*4)
                affect.add_collect(apply.INT,10,60*60*24*365*4)
                affect.add_collect(apply.DEX,10,60*60*24*365*4)
                affect.add_collect(apply.GOLD_DOUBLE_BONUS,10,60*60*24*365*4)
                pc.setqf("special_func", 3)
             end         
          end     
          when 71054.use begin
             say_title("Tinctura Regatului")
             say("Cu această tinctură poţi să")
             say("îţi schimbi regatul cu unul nou")
             say("pe care tu îl doreşti.")
             say("")
             if get_time() < pc.getqf("next_use_time") then
                say_reward("Nu puteţi schimba regatul.")
                if pc.is_gm() then
                   pc.setqf("next_use_time", 0)
                end
                return
             end
             if change_empire_item.move_pc() == true then
                if pc.getqf("special_func")==1 then
                   affect.remove_collect(apply.GOLD_DOUBLE_BONUS,10)
                   affect.remove_collect(apply.ITEM_DROP_BONUS,10)
                   affect.remove_collect(apply.ATT_BONUS_TO_MONSTER,10)
                elseif pc.getqf("special_func")==2 then
                   affect.remove_collect(apply.ATT_GRADE_BONUS)
                   affect.remove_collect(apply.MAX_HP,1000)
                   affect.remove_collect(apply.EXP_DOUBLE_BONUS,10)
                elseif pc.getqf("special_func")==3 then   
                   affect.remove_collect(apply.STR,10)
                   affect.remove_collect(apply.CON,10)
                   affect.remove_collect(apply.INT,10)
                   affect.remove_collect(apply.DEX,10)
                   affect.remove_collect(apply.GOLD_DOUBLE_BONUS,10)
                end
                pc.setqf("special_func", 0)
                pc.setqf("next_use_time", get_time() + time_hour_to_sec(24*7))
             end
          end
          function move_pc()
             if pc.is_engaged() then
                say_reward("Eşti căsătorit/ă.")
                say_reward("Nu poţi schimba regatul.")
                return false
             end
             if pc.is_married() then
                say_reward("Eşti căsătorit/ă.")
                say_reward("Nu poţi schimba regatul.")
                return false
             end
             if pc.is_polymorphed() then
                say_reward("Eşti transformat.")
                say_reward("Nu poţi schimba regatul.")
                return false
             end
             if pc.has_guild() then
                say_reward("Eşti într-o breaslă.")
                say_reward("Nu poţi schimba regatul.")
                return false
             end
             if pc.money < 500000 then
                say_reward("Nu ai suficient Yang.")
                say_reward("Pentru a schimba regatul ai nevoie de 500.000 Yang.")
                return false
             end
             say_reward("In ce regat vrei sa te muti?")
             local s = select("Regatul Roşu", "Regatul Galben", "Regatul Albastru", "Nu mai vreau")
             if 4==s then
                return false
             end
             say_title("Tinctura Regatelor")
             say("Vrei să părăseşti acest regat?")
             say("Pentru trădare nu există scuze!")
             local a = select("Schimb Regatul", "Nu mai vreau")
             if 2== a then
                return false
             end
             local ret = pc.change_empire(s)
             local oldempire = pc.get_empire()
             if ret == 999 then
                say_title("Tinctura Regatelor")
                say("Ai schimbat regatul cu succes.")
                say("Dacă vei dori să schimbi din nou regatul")
                say("va trebui să aştepţi o săptămână.")
                say("Vă rugăm relogaţi-vă.")
                pc.change_gold(-500000)         
                pc.remove_item(71054)         
                return  true
             elseif ret == 1 then
                say("Eşti deja în acest regat.")
                say("Te rog să selectezi alt regat.")
             elseif ret == 2 then
                say("Încă nu poţi schimba regatul.")
                say("Nu poţi schimba regatul,")
                say("deoarece ai fost într-o breslă recent.")
             elseif ret == 3 then
                say("Nu poţi schimba regatul.")
                say("Nu poţi schimba regatul,")
                say("deoarece ai fost casatorit recent.")
             end
             return false
          end
       end
    end

Cam asa ceva :)!

Multumesc anticipat !
Ultima oară modificat 27 Iul 2014, 12:31 de către [Cruel], modificat de 2 ori în total.
Motiv: Foloseste CODE!
Avatar utilizator
[Cruel]
Utilizator interzis !

Utilizator interzis !
Mesaje: 250
Membru din: 13 Ian 2014, 14:14
Server: FreakzMetin2
Regat: Jinno
Aprecieri: 0
Mulţumiri: 2  
 Contact:
Medalii

Ce eroare are? Mai multe detalii.
Daca e din putty, fa screen.
Daca din server, descrie mai detaliat!
Imagine
Yahoo Messenger| Afiseaza codul
dead.cruell
Afișează semnătura
Avatar utilizator
Gudy
Nou Venit

Nou Venit
Mesaje: 5
Membru din: 23 Iul 2014, 10:45
Aprecieri: 1  
Mulţumiri: 0
Medalii

Cruel scrie:Ce eroare are? Mai multe detalii.
Daca e din putty, fa screen.
Daca din server, descrie mai detaliat!
Pur si simplu din server, nu poti schimba regatul, atat.
Închis
Răspunsuri
3
Vizualizări
415
Răspunsuri
0
Vizualizări
150
Răspunsuri
2
Vizualizări
533
Răspunsuri
4
Vizualizări
258

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 171 vizitatori