Dimmi 19 Posted April 14, 2015 Share Posted April 14, 2015 Hi buddies, I've this quest, but when I compile files are not created in /object/. This is the quest: quest spider_cave_boss begin state start begin function ready_for_cave() begin if pc.count_item(80041) > 0 then local spider = { ["spiderworking"] = game.get_event_flag("spiderworking"), ["spiderpassword"] = game.get_event_flag("spiderpassword"), ["spiderowner"] = game.get_event_flag("spiderowner"), ["spiderboss"] = pc.getqf("spiderboss") } if spider["spiderworking"] == 0 and spider["spiderpassword"] == 0 and spider["spiderowner"] == 0 then if spider["spiderboss"] == 0 then return true else return "Incerci deja sa invingi regele." end else return "Cineva viteaz deja incearca sa invinga regele." end else return "Ai nevoie de "..item_name(80041).." pentru a intra." end end when 20371.chat."Temnita Paianjenilor 3" with pc.getqf("spiderboss") == 0 and game.get_event_flag("spiderworking") == 0 begin say_title(mob_name(20371)) say("") say("Salut, am auzit ca doresti sa intri in ") say("a treia temnita a paianjenilor impreuna cu un grup, ") say("pentru a omori Regina Paianjen... ") say(" ") say("E adevarat? ") say(" ") if select (locale.yes, locale.no) == 2 then return else say_title(mob_name(20371)) say(" ") say("Atunci trebuie sa stiti ca aveti nevoie, ") say("Trecerea Imparatului pentru ati da voie sa intri acolo. ") say("Daca nu ai acea trecere nu te voi lasa sa intri... ") say(" ") wait() say_title(mob_name(20371)) say(" ") say("Fii atent razboinicule, ") say("Regina Paianjen este foarte puternica si, ") say("nu a mai luat o masa de secole... ") say(" ") wait() say_title(mob_name(20371)) say(" ") say("Doriti sa intrati in Camera Regelui? ") say(" ") if select (locale.yes, locale.no) then return else local ready = spider_cave_boss.ready_for_cave() if ready == 1 then say_title(mob_name(20371)) say(" ") say("Oo.. ai un bilet! ") say(" ") say("Esti sigur ca doresti sa intri acolo? ") if select (locale.yes, locale.no) == 1 then say_title(mob_name(20371)) say(" ") say("Am nevoie de o parola cu ajutorul careia ") say("sa-i tin la deparare pe intrusi! ") local password = tonumber(input("")) game.set_event_flag("spiderpassword", password) game.set_event_flag("spiderworking", 1) game.set_event_flag("spiderowner", pc.get_name()) pc.setqf ("spiderboss", 1) pc.removeitem (80041) say_title(mob_name(20371)) say(" ") say("Dupa ce ai intrat nu mai pot sa te readuc pana nu omori regina. ") say("Succes! ") wait() pc.warp(88000, 614500) else say_title(mob_name(20371)) say(" ") say("Eu nu ma opun, ") say("dar ai nevoie de curaj pentru ai face fata regelui.. ") say(" ") say("Intoarcete inapoi cand, ") say("vei avea curaj sa infrunti regina! ") say(" ") end else say_title(mob_name(20371)) say(" ") say("Nu puteti intra! ") say(ready) say(" ") end end end end when 20371.chat."Ii sunt prieten cavalerului" with pc.getqf("spiderboss") == 0 and game.get_event_flag("spiderworking") == 1 begin say_title(mob_name(20371)) say(" ") local name = game.get_event_flag("spiderowner") say("Deci esti unul dintre prietenii lui "..name.."? ") say("Haha! Am nevoie de dovezi ca sa te cred! ") say("Mi-a lasat o parola inainte sa-l trimit acolo! ") say("Daca chiar ii esti prieten, spune-mi parola! ") local password = tonumber(input("")) if password == game.get_event_flag("spiderpassword") then say_title(mob_name(20371)) say(" ") say("Oh! Chiar ii esti prieten! ") say("Sa vedem daca esti apt pentru a intra in temnita! ") local ready = spider_cave_boss.ready_for_cave() if ready == 1 then pc.setqf ("spiderboss", 1) pc.removeitem (80041) say_reward ("Foarte bine! Sa mergem! ") wait() pc.warp(88000, 614500) else say_reward(ready) return end end end when login with pc.in_dungeon() begin if d.getf("spiderboss ") == 1 then notice_in_map("Temnita Paianjenilor 3: ") notice_in_map("Aveti 20 de minute la dispozitie ") notice_in_map("pentru a omora Metinele Paianjen! ") timer("time_spiderboss", 1200) local metinspiderboss = number(1, 5) local pos = { [1] = {367, 587}, [2] = {356, 575}, [3] = {383, 576}, [4] = {378, 598}, [5] = {358, 596} } local metingood = 8072 local metinbad = 8071 d.spawn_mob(metingood, pos[6-metinspiderboss][1], pos[6-metinspiderboss][2]) for i = 1, 5 do if i ~= 6 - metinspiderboss then d.spawn_mob(metinbad, pos[i][1], pos[i][2]) end end end end when 8071.kill with pc.in_dungeon() begin notice_in_map("Ati distrus metin-ul gresit.. ") end when 8072.kill with pc.in_dungeon() begin notice_in_map("Ati distrus metin-ul corect! ") d.kill_all() notice_in_map("Regina paianjen vine cu trupele sale dupa tine.. ") d.spawn_mob(2092, 367, 587) end when time_spiderboss0.timer begin notice_in_map("Ai la dispozitie 20 de minute pentru a omori Regina Paianjen! ") timer("time_spiderboss0", 1200) end when time_spiderboss5.timer begin notice_in_map("Au mai ramas 15 minute! ") timer("time_spiderboss5", 1200) end when time_spiderboss10.timer begin notice_in_map("Au mai ramas 10 minute! ") timer("time_spiderboss10", 1200) end when time_spiderboss15.timer begin notice_in_map("Au mai ramas 5 minute! ") timer("time_spiderboss15", 1200) end when time_spiderboss20.timer begin notice_in_map("Timpul a expirat, vei fi teleportat inapoi in oras. ") timer("time_spiderboss20", 1200) d.jump_all(178, 464) end when 2092.kill with pc.in_dungeon() begin notice_in_map("Spiritul raului te vrea plecat de aici. ") notice_in_map("Vei fi teleportat in aproximativ un minut! ") notice_in_map("Omoara mai repede, pana nu va fi prea tarziu. ") d.kill_all() nation = { "Shinsoo" , "Chunjo" , "Jinno" } notice_all("Echipa lui "..game.get_event_flag("spiderowner").." din regatul " .. nation [ pc.getempire() ] .. " au omorat Regina Paianjen! ") timer("spiderboss_time_out", 60) end when spiderboss_time_out.timer with pc.get_map_index() == 191 begin pc.setqf("spiderboss", 0) game.set_event_flag("spiderworking", 0) game.set_event_flag("spiderpassword", 0) game.set_event_flag("spiderowner", 0) d.jump_all(178, 464) end when 20371.chat."Misterul Temnitei" with pc.getqf("spiderboss ") == 1 begin say_title(mob_name(20371)) say(" ") say("Aceasta temnita cu mult timp in urma, ") say("era un parc de distractie pentru copii, ") say("dar intr-o zi un razboinic a omorat un paianjen si, ") say("blestemul a coborat asupra lui si intregii temnite.. ") say("De atunci nimeni nu a mai avut curajul sa intre acolo! ") say(" ") end end end end And this is shown in putty: QUEST : spider_cave_boss STATE : start FUNCTION ready_for_cave() Any ideas? Thanks a lot! Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted April 14, 2015 Premium Share Posted April 14, 2015 try quest spider_cave_boss begin state start begin function ready_for_cave() begin if pc.count_item(80041) > 0 then local spider = { ["spiderworking"] = game.get_event_flag("spiderworking"), ["spiderpassword"] = game.get_event_flag("spiderpassword"), ["spiderowner"] = game.get_event_flag("spiderowner"), ["spiderboss"] = pc.getqf("spiderboss") } if spider["spiderworking"] == 0 and spider["spiderpassword"] == 0 and spider["spiderowner"] == 0 then if spider["spiderboss"] == 0 then return true else return "Incerci deja sa invingi regele." end else return "Cineva viteaz deja incearca sa invinga regele." end else return "Ai nevoie de "..item_name(80041).." pentru a intra." end end when 20371.chat."Temnita Paianjenilor 3" with pc.getqf("spiderboss") == 0 and game.get_event_flag("spiderworking") == 0 begin say_title(mob_name(20371)) say("") say("Salut, am auzit ca doresti sa intri in ") say("a treia temnita a paianjenilor impreuna cu un grup, ") say("pentru a omori Regina Paianjen... ") say(" ") say("E adevarat? ") say(" ") if select (locale.yes, locale.no) == 2 then return else say_title(mob_name(20371)) say(" ") say("Atunci trebuie sa stiti ca aveti nevoie, ") say("Trecerea Imparatului pentru ati da voie sa intri acolo. ") say("Daca nu ai acea trecere nu te voi lasa sa intri... ") say(" ") wait() say_title(mob_name(20371)) say(" ") say("Fii atent razboinicule, ") say("Regina Paianjen este foarte puternica si, ") say("nu a mai luat o masa de secole... ") say(" ") wait() say_title(mob_name(20371)) say(" ") say("Doriti sa intrati in Camera Regelui? ") say(" ") if select (locale.yes, locale.no) then return else local ready = spider_cave_boss.ready_for_cave() if ready == true then say_title(mob_name(20371)) say(" ") say("Oo.. ai un bilet! ") say(" ") say("Esti sigur ca doresti sa intri acolo? ") if select (locale.yes, locale.no) == 1 then say_title(mob_name(20371)) say(" ") say("Am nevoie de o parola cu ajutorul careia ") say("sa-i tin la deparare pe intrusi! ") local password = tonumber(input("")) game.set_event_flag("spiderpassword", password) game.set_event_flag("spiderworking", 1) game.set_event_flag("spiderowner", pc.get_name()) pc.setqf ("spiderboss", 1) pc.removeitem (80041) say_title(mob_name(20371)) say(" ") say("Dupa ce ai intrat nu mai pot sa te readuc pana nu omori regina. ") say("Succes! ") wait() pc.warp(88000, 614500) else say_title(mob_name(20371)) say(" ") say("Eu nu ma opun, ") say("dar ai nevoie de curaj pentru ai face fata regelui.. ") say(" ") say("Intoarcete inapoi cand, ") say("vei avea curaj sa infrunti regina! ") say(" ") end else say_title(mob_name(20371)) say(" ") say("Nu puteti intra! ") say(" ") end end end end when 20371.chat."Ii sunt prieten cavalerului" with pc.getqf("spiderboss") == 0 and game.get_event_flag("spiderworking") == 1 begin say_title(mob_name(20371)) say(" ") local name = game.get_event_flag("spiderowner") say("Deci esti unul dintre prietenii lui "..name.."? ") say("Haha! Am nevoie de dovezi ca sa te cred! ") say("Mi-a lasat o parola inainte sa-l trimit acolo! ") say("Daca chiar ii esti prieten, spune-mi parola! ") local password = tonumber(input("")) if password == game.get_event_flag("spiderpassword") then say_title(mob_name(20371)) say(" ") say("Oh! Chiar ii esti prieten! ") say("Sa vedem daca esti apt pentru a intra in temnita! ") local ready = spider_cave_boss.ready_for_cave() if ready == true then pc.setqf ("spiderboss", 1) pc.removeitem (80041) say_reward ("Foarte bine! Sa mergem! ") wait() pc.warp(88000, 614500) else say_reward("not ready") return end end end when login with pc.in_dungeon() begin if d.getf("spiderboss ") == 1 then notice_in_map("Temnita Paianjenilor 3: ") notice_in_map("Aveti 20 de minute la dispozitie ") notice_in_map("pentru a omora Metinele Paianjen! ") timer("time_spiderboss", 1200) local metinspiderboss = number(1, 5) local pos = { [1] = {367, 587}, [2] = {356, 575}, [3] = {383, 576}, [4] = {378, 598}, [5] = {358, 596} } local metingood = 8072 local metinbad = 8071 d.spawn_mob(metingood, pos[6-metinspiderboss][1], pos[6-metinspiderboss][2]) for i in ipairs(pos) do if i ~= 6 - metinspiderboss then d.spawn_mob(metinbad, pos[i][1], pos[i][2]) end end end end when 8071.kill with pc.in_dungeon() begin notice_in_map("Ati distrus metin-ul gresit.. ") end when 8072.kill with pc.in_dungeon() begin notice_in_map("Ati distrus metin-ul corect! ") d.kill_all() notice_in_map("Regina paianjen vine cu trupele sale dupa tine.. ") d.spawn_mob(2092, 367, 587) end when time_spiderboss0.timer begin notice_in_map("Ai la dispozitie 20 de minute pentru a omori Regina Paianjen! ") timer("time_spiderboss0", 1200) end when time_spiderboss5.timer begin notice_in_map("Au mai ramas 15 minute! ") timer("time_spiderboss5", 1200) end when time_spiderboss10.timer begin notice_in_map("Au mai ramas 10 minute! ") timer("time_spiderboss10", 1200) end when time_spiderboss15.timer begin notice_in_map("Au mai ramas 5 minute! ") timer("time_spiderboss15", 1200) end when time_spiderboss20.timer begin notice_in_map("Timpul a expirat, vei fi teleportat inapoi in oras. ") timer("time_spiderboss20", 1200) d.jump_all(178, 464) end when 2092.kill with pc.in_dungeon() begin notice_in_map("Spiritul raului te vrea plecat de aici. ") notice_in_map("Vei fi teleportat in aproximativ un minut! ") notice_in_map("Omoara mai repede, pana nu va fi prea tarziu. ") d.kill_all() nation = { "Shinsoo" , "Chunjo" , "Jinno" } notice_all("Echipa lui "..game.get_event_flag("spiderowner").." din regatul " .. nation [ pc.getempire() ] .. " au omorat Regina Paianjen! ") timer("spiderboss_time_out", 60) end when spiderboss_time_out.timer with pc.get_map_index() == 191 begin pc.setqf("spiderboss", 0) game.set_event_flag("spiderworking", 0) game.set_event_flag("spiderpassword", 0) game.set_event_flag("spiderowner", 0) d.jump_all(178, 464) end when 20371.chat."Misterul Temnitei" with pc.getqf("spiderboss ") == 1 begin say_title(mob_name(20371)) say(" ") say("Aceasta temnita cu mult timp in urma, ") say("era un parc de distractie pentru copii, ") say("dar intr-o zi un razboinic a omorat un paianjen si, ") say("blestemul a coborat asupra lui si intregii temnite.. ") say("De atunci nimeni nu a mai avut curajul sa intre acolo! ") say(" ") end end end If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Solution Dimmi 19 Posted April 14, 2015 Author Solution Share Posted April 14, 2015 Same... I think not that function is the problem... Done. The problem was at function, I put a wrong begin there. 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