joshi 34 Posted January 24, 2020 Share Posted January 24, 2020 I have a mission that starts like this quest fq begin state start begin when login or levelup with pc.get_level >= 10 begin if pc.getf("fq", "mission") == 1 then set_state(information) end end end end Why not show it when the previous quest is completed? It only shows when I teleport, quit. Why? Thanks in advance! Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted January 24, 2020 Premium Share Posted January 24, 2020 ..because "login or levelup" duh. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
joshi 34 Posted January 24, 2020 Author Share Posted January 24, 2020 mate i have other quest and working login or levelup but if i use pc.getf then error... Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted January 24, 2020 Premium Share Posted January 24, 2020 I'm not even sure what you're trying to pull off here, maybe if you could explain yourself properly.. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
joshi 34 Posted January 24, 2020 Author Share Posted January 24, 2020 ---------------------------------------------------- --- Küldetést készítette Joshi a BBMT2 csapatból --- ---------------------------------------------------- quest diary_lv32_2 begin state start begin when login or levelup with pc.get_level() >= 32 begin if pc.getf("diary", "mission") == 1 then set_state(information) end end end state information begin when letter begin local v = find_npc_by_vnum(20011) if v != 0 then target.vid("__TARGET__", v, "Uriel") end send_letter_ex(" A titkos napló oldalai #2 ", "blue", "333") q.set_icon("scroll_open_blue.tga") end when button or info begin say_title("A napló második oldala") say("Uriel keres egy fontos ügyben.") say("Keresd meg Urielt.") say("") end when __TARGET__.target.click or 20011.chat."Második oldal" begin target.delete("__TARGET__") say_title(mob_name(20011)..":") say("Szia kedves kalandor!") say("Egy napló oldalai hiányoznak és") say("ahhoz, hogy megfejtsem kellenek") say("ezek az oldalak. Ha nincs meg nem") say("tudok haladni a dolgokkal.") say("Jelenleg az második oldalról van tudomásom,") say("hogy Yang-Shin a vadász tudja hol van.") say("") set_state(__page2__) end end state __page2__ begin when letter begin local v = find_npc_by_vnum(20019) if v != 0 then target.vid("__TARGET__", v, "Yang-Shin") end send_letter_ex(" A titkos napló oldalai #2 ", "blue", "333") q.set_icon("scroll_open_blue.tga") end when button or info begin say_title("A második oldal") say("Uriel tudja, hogy a második oldalról") say("Yang-Shin többet tud. Keresd fel") say("Yang-Shint.") say("") end when __TARGET__.target.click or 20019.chat."A második oldal" begin target.delete("__TARGET__") say_title(mob_name(20019)..":") say("Igen! Tudok róla információkat.") say("De most nem tudom oda adni neked.") say("Mert ellopták tőlem a büszke ork") say("varázslók. Menj és szerezd vissza.") say("") set_state(__orc__) end end state __orc__ begin when letter begin send_letter_ex(" Keresd meg a második oldalt ", "blue", "333") q.set_icon("scroll_open_blue.tga") end when buttor or info begin say_title("Keresd meg a második oldalt") say("A Büszke ork varázslók ellopták a") say("vadásztól! Szerezd vissza tőlük, hogy") say("oda add Urielnek.") say("") end when 634.kill begin local s = number(1,100) if s <= 10 and pc.count_item(30150) == 0 then pc.give_item2(30150,1) notice("Meg van a második oldal!") set_state(__uriel__) end end end state __uriel__ begin when letter begin local v = find_npc_by_vnum(20011) if v != 0 then target.vid("__TARGET__", v, "Uriel") end send_letter_ex(" A titkos napló oldalai #2 - Megtalálva ", "blue", "333") q.set_icon("scroll_open_blue.tga") end when button or info begin say_title("A második oldal megtalálva") say("Térj vissza Urielhez a napló ") say("oldallal.") say("") end when __TARGET__.target.click or 20011.chat."Második oldal" begin target.delete("__TARGET__") if pc.count_item(30150) > 0 then say_title(mob_name(20011)..":") say("Remek! Ezzel tudom folytatni") say("a kutatást! Majd kereslek!") say("Köszönöm.") say("") say_reward("Kaptál:") say_reward("- 2.000.000 tapasztalat") say_reward("- 5.000.000 yang") say_reward("- 10 darab fehér zászló ") say("") pc.setf("diary", "mission", pc.getf("diary", "mission")+1) pc.give_exp2(2000000) pc.change_gold(5000000) pc.give_item2(70008,10) pc.remove_item(30150,1) clear_letter() set_state(__complete) else say_title(mob_name(20011)..":") say("Hol van?! Keresd tovább!") say("") return end end end state __complete begin end end this is the quest Link to comment Share on other sites More sharing options...
Braxy 618 Posted January 24, 2020 Share Posted January 24, 2020 So, what are you saying does not even make logic. The quest does exactly what it's supposed to. What you need is the "enter" event, with that, the quest know it must execute the code below. So you dont have to change a thing in the first state, the second state with the informations must be changed, from when letter begin into when login or enter begin, when you set_state(information) in the first state it means that you enter a new state and that triggers the event and execute your things without need of teleport. (This is from what im remembering, i might be wrong tho, i didn't docummented myself so i can say 100% sure but yea it should work like that xD) 1 As long as I'll be a threat for you , i will always be your target :3 Link to comment Share on other sites More sharing options...
joshi 34 Posted January 24, 2020 Author Share Posted January 24, 2020 Thanks bro. I'll try it. Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted January 24, 2020 Premium Share Posted January 24, 2020 As I previously stated, you can't expect to receive the quest as soon as you finish the other one without using the proper triggers. you are not even using set_quest_state, so what you're trying to do doesn't make much sense. You should end your previous quest like this set_quest_state("diary_lv32_2", "information"); and then: quest diary_lv32_2 begin state start begin -- Empty since the quest should only be run after the previous one. end -- state state information begin when letter begin local v = find_npc_by_vnum(20011) if v != 0 then target.vid("__TARGET__", v, "Uriel") end send_letter_ex(" A titkos napló oldalai #2 ", "blue", "333") q.set_icon("scroll_open_blue.tga") end -- when end ... end 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now