Hi all.
I need the sd3 quest. (All group members need the dungeon ticket )
I found this forum the sd3 quest but not working.
Code
- quest spider_dungeon3 begin
- state start begin
- function setting()
- return
- {
- ["object"] = 30324,
- ["droped_object"] = 30327,
- ["sp"] = { ["MinLv"] = 49, ["MaxLv"] = 75},
- ["map"] = { ["index_map"] = 217, ["coordx"] = 880, ["coordy"] = 6143},
- ["monster"] = { ["vnum"] = 2094, ["coordx"] = 368, ["coordy"] = 562}
- }
- end
- ---***npc
- when 20404.chat."Die Bruthöhle betreten!" begin
- if not party.is_party then
- say("Du brauchst eine Gruppe für die Bruthöhle!")
- return
- end
- ---***party check :3
- local pids = {party.get_member_pids()}
- local notEnoughLevelMembers = {}
- local noTicketMembers = {}
- local notEnoughtTime = {}
- local levelCheck = true
- local ticketCheck = true
- for i, pid in next, pids, nil do
- q.begin_other_pc_block(pid)
- local canPass = false
- if pc.count_item(spider_dungeon3.setting().object) >= 1 then
- canPass = true
- end
- if not canPass then
- table.insert(noTicketMembers, pc.get_name())
- ticketCheck = false
- end
- if pc.get_level() < spider_dungeon3.setting().sp.MinLv or pc.get_level() > spider_dungeon3.setting().sp.MaxLv then
- table.insert(notEnoughLevelMembers, pc.get_name())
- levelCheck = false
- end
- q.end_other_pc_block(pid)
- end
- if not ticketCheck then
- say("Folgende Gruppenmitglieder haben keinen Arachnidenschlüssel:")
- for i, name in next, noTicketMembers, nil do
- say(" "..name)
- end
- return
- end
- if not levelCheck then
- say_title(mob_name(20404))
- say()
- say("Folgende Gruppenmitglieder sind nicht Lv 50 - 74:")
- for i, name in next, notEnoughLevelMembers, nil do
- say(" "..name)
- end
- return
- end
- if party.is_leader() then
- say_title("Guardian Spider dungeon")
- say("")
- say("Du willst die Spinnenbaroness töten?")
- local s = select("Ja ich will!", "Nein doch nicht...")
- if s == 1 then
- timer("spider_one", 4)
- notice_all("Die Gruppe von "..pc.get_name().." versucht die Spinnenbaroness zu töten!")
- else
- return
- end
- end
- end
- ---*** login for remove object
- when login with pc.in_dungeon() begin
- if d.getf("spider_dungeon") == 1 and pc.getqf("object") == 0 begin
- pc.remove_item(spider_dungeon3.setting().object , 1)
- pc.setqf("object", 1)
- end
- end
- ---****logout
- when logout with d.getf("spider_dungeon") == 1 begin
- pc.setqf("object", 0)
- end
- ---***timer dungeon
- when spider_one.timer begin
- d.new_jump_party(spider_dungeon3.setting().map.index_map, spider_dungeon3.setting().map.coordx, spider_dungeon3.setting().map.coordy)
- d.setf("spider_dungeon", 1)
- d.spawn_mob(spider_dungeon3.setting().monster.vnum, spider_dungeon3.setting().monster.coordx, spider_dungeon3.setting().monster.coordy)
- d.regen_file("data/dungeon/spider_dungeon3/spiders.txt")
- end
- ---***kill first monster
- when 2094.kill with d.getf("spider_dungeon") == 1 and pc.in_dungeon() begin
- pc.give_item2(spider_dungeon3.setting().droped_object ,1)
- d.notice("Du hast die Arachnidenflöte in dein Inventar gelegt! Spiele sie um die Eier zu spawnen!")
- end
- ----****use object droped by the monster
- when 30327.use with d.getf("spider_dungeon") == 1 and pc.in_dungeon() begin
- d.setf("little_spiders", 6)
- local t = {
- {393, 571},
- {391, 591},
- {378, 593},
- {354, 583},
- {351, 559},
- {370, 548},
- }
- for i = 1,6 do
- d.spawn_mob(2095, t[i][1], t[i][2])
- end
- end
- ---***kill little spiders
- when 2095.kill with d.getf("spider_dungeon") == 1 and pc.in_dungeon() begin
- d.setf("little_spiders", d.getf("little_spiders")-1)
- if d.getf("little_spiders") == 0 then
- d.notice("Du hast alle Eier zerstört! Nun erscheint die Spinnenbaroness!")
- vid = d.spawn_mob(2092, 370, 587)
- d.set_unique("boss", vid)
- else
- d.notice("Ein Spinnen-Ei wurde zerstört! Die Spinnenbaroness ist wütend!")
- end
- ---d.unique_set_def_grade("boss", -50)
- end
- ---***boss queen
- when 2092.kill with d.getf("spider_dungeon") == 1 and pc.in_dungeon() begin
- d.notice("Gute Arbeit, die Spinne wurde besiegt!")
- notice_all("Die Gruppe von "..pc.get_name().." hat die Spinnenbaroness getötet! ")
- d.notice("Ihr habt anschließend 45 Sekunden um die Drops aufzuheben!")
- timer("bye_spiders", 45)
- end
- when bye_spiders.timer begin
- d.exit_all()
- end
- end
- end