- Mesaj
- 295
- Çözümler
- 10
- Beğeni
- 137
- Puan
- 514
- Ticaret Puanı
- 0
Sa dostlar filesime dungeon info ekledim
questleri eklerken core alıyorum yardımcı olurmusunuz acaba
questler
dungeo info questi
zindan içi quest
yediğim qore hatası
questleri eklerken core alıyorum yardımcı olurmusunuz acaba
questler
dungeo info questi
dungeoninfo.quest:
quest dungeoninfo begin
state start begin
when login or enter begin
cmdchat("dungeon_info_qid "..q.getcurrentquestindex())
end
when button begin
cmdchat("getinputbegin")
local cmd = split(input(cmdchat("dungeon_info_cmd")), "#")
cmdchat("getinputend")
local mobIdx = tonumber(cmd[2])
if cmd[1] == "WARP" then
if pc.get_gold() < 250000 then
return chat(locale_quest(12088))
end
if mobIdx == 693 then
if pc.get_level() < 50 then
return chat(locale_quest(2086))
end
if pc.get_level() > 90 then
return chat(locale_quest(14253))
end
if not pc.warp(358500, 741858) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 1093 then
if pc.get_level() < 40 then
return chat(locale_quest(2086))
end
if pc.get_level() > 100 then
return chat(locale_quest(14253))
end
if not pc.warp(590800, 111100) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 2598 then
if pc.get_level() < 75 then
return chat(locale_quest(2086))
end
if pc.get_level() > 105 then
return chat(locale_quest(14253))
end
if not pc.warp(591800,100200) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 2092 then
if pc.get_level() < 60 then
return chat(locale_quest(2086))
end
if pc.get_level() > 90 then
return chat(locale_quest(14253))
end
if not pc.warp(69000, 611200) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 2493 then
if pc.get_level() < 75 then
return chat(locale_quest(2086))
end
if pc.get_level() > 105 then
return chat(locale_quest(14253))
end
if not pc.warp(180200, 1220200) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 6091 then
if pc.get_level() < 95 then
return chat(locale_quest(2086))
end
if pc.get_level() > 105 then
return chat(locale_quest(14253))
end
if not pc.warp(614100, 707100) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 6191 then
if pc.get_level() < 95 then
return chat(locale_quest(2086))
end
if pc.get_level() > 105 then
return chat(locale_quest(14253))
end
if not pc.warp(432200, 164600) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 6192 then
if pc.get_level() < 105 then
return chat(locale_quest(2086))
end
if pc.get_level() > 115 then
return chat(locale_quest(14253))
end
if not pc.warp(828900, 1418500) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 3962 then
if pc.get_level() < 105 then
return chat(locale_quest(2086))
end
if pc.get_level() > 115 then
return chat(locale_quest(14253))
end
if not pc.warp(1108300, 1782100) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 4469 then
if pc.get_level() < 90 then
return chat(locale_quest(2086))
end
if pc.get_level() > 105 then
return chat(locale_quest(14253))
end
if not pc.warp(614100, 707100) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 6500 or mobIdx == 6501 then
if pc.get_level() < 115 then
return chat(locale_quest(2086))
end
if pc.get_level() > 120 then
return chat(locale_quest(14253))
end
if not pc.warp(177500, 1179100) then
return
end
pc.change_gold(-250000)
elseif mobIdx == 2872 then
if pc.get_level() < 116 then
return chat(locale_quest(2086))
end
if pc.get_level() > 120 then
return chat(locale_quest(14253))
end
if not pc.warp(1331800,845300) then
return
end
pc.change_gold(-250000)
end
end
end
end
end
zindan içi quest
dungeon_devil_tower.quest:
quest dungeon_devil_tower begin
state start begin
when 20348.chat.locale_quest(839) begin
if pc.get_map_index() != 65 then
return
end
if if_not_available("dungeon_devil_tower") then
return say(locale_quest(20078))
end
local MIN_LEVEL = 40
local MAX_LEVEL = 100
local DUNGEON_TICKET = 30320
say_title(locale_quest(849))
say(locale_quest(861))
-- select dungeon types
local dungeon_type = select(locale_quest(874), locale_quest(14284), locale_quest(875)) -- do, test, close
if dungeon_type == 1 then -- normal
if party.is_party() then -- if in party, he enter in party
if dungeon_join_party("dungeon_devil_tower", MIN_LEVEL, MAX_LEVEL, DUNGEON_TICKET) == true then
enter_dungeon(66, 2171, 7274, true, false, DUNGEON_TICKET)
end
else -- solo dungeon
if dungeon_join_solo("dungeon_devil_tower", MIN_LEVEL, MAX_LEVEL, DUNGEON_TICKET) then
enter_dungeon(66, 2171, 7274, false, false, DUNGEON_TICKET)
end
end
elseif dungeon_type == 2 then -- test
say_title(mob_name(npc.get_vnum()))
say_reward(locale_quest(14285))
local select = select(locale_quest(14284), locale_quest(39))
if select == 1 then
if dungeon_join_test(MIN_LEVEL, MAX_LEVEL) then
enter_dungeon(66, 2700, 6852, false, true, 0)
end
end
end
end
-- kill functions
when 1001.kill or 1002.kill or 1003.kill or 1004.kill or 1031.kill or 1032.kill or 1033.kill or 1034.kill or 1035.kill or 1036.kill or 1037.kill or 1038.kill or 1039.kill or 1040.kill or 1041.kill begin
if not pc_in_dungeon(66) then
return
end
if d.getf("dt_4") == 1 then
local KILL_COUNT_FOR_DROP_KEY = 150
local n = d.getf("count") + 1
d.setf("count", n)
if n == KILL_COUNT_FOR_DROP_KEY then
local n_keys = d.getf("count_keys_4") + 1
if n_keys < 7 then
game.drop_item(50084, 1)
d.setf("count", 0)
d.setf("count_keys_4", n_keys)
end
end
end
if d.getf("dt_5") == 1 then
if d.getf("pt1") == 1 then
local KILL_COUNT_FOR_DROP_KEY_5 = 150
local n = d.getf("count_5") + 1
d.setf("count_5", n)
if n == KILL_COUNT_FOR_DROP_KEY_5 then
game.drop_item(30304, 1)
d.setf("count_5", 0)
end
end
end
end
when 8015.kill with pc_in_dungeon(66) begin
if d.getf("dt_1") == 1 then
d.notice(14288)
d.kill_all()
d.setf("level", 2)
server_timer("dt_2", 5, d.get_map_index())
end
end
when 8018.kill with pc_in_dungeon(66) begin
if d.getf("dt_5") == 1 then
local count = d.getf("high_stones")-1
d.setf("high_stones", count)
if count < 1 then
d.notice(14294)
d.kill_all()
d.setf("pt1", 1)
-- spawn mobs for key drop
d.regen_file("data/dungeon/deviltower8_regen.txt")
end
end
end
when 1091.kill with pc_in_dungeon(66) begin
if d.getf("dt_2") == 1 then
d.notice(14288)
d.kill_all()
server_timer("dt_3", 5, d.get_map_index())
d.setf("level", 3)
end
end
-- already in dungeon, start of the dungeon
function quest_event_when_login()
if not pc_in_dungeon(66) then
return
end
local index = pc.get_map_index()
d.set_warp_location(65,5905,1108)
if check_if_test() then
d.setf("first_regen", 0)
d.setf("final", 1)
server_timer("final_boss", 1, d.get_map_index())
server_timer("timer", 60*10, d.get_map_index())
d.setf("real_time", get_global_time()+60*10)
d.setf("floor", 6)
cmdchat_in_map(index, string.format("RefreshDungeonTimer %d %d",d.getf("floor"),d.getf("real_time")-get_global_time()))
return
end
if d.getf("timer_check") == 1 and d.getf("floor") > 0 then
cmdchat_in_map(index, string.format("RefreshDungeonTimer %d %d",d.getf("floor"),d.getf("real_time")-get_global_time()))
return
end
if d.getf("first_regen") == 1 then
server_timer("dt_1", 1, d.get_map_index())
d.setf("early_check", 1)
d.setf("first_Regen", 0)
server_timer("timer", 60*30, d.get_map_index())
d.setf("real_time", get_global_time()+60*30)
cmdchat_in_map(index, string.format("RefreshDungeonTimer %d %d",d.getf("floor"),d.getf("real_time")-get_global_time()))
d.setf("real_time_fastest", get_global_time())
d.setf("timer_check", 1)
d.setf("level", 1)
end
set_cooltime(60*20, "dungeon_devil_tower")
end
when login with pc_in_dungeon(66) begin
timer("devil_tower_login_check", 1)
end
when devil_tower_login_check.timer with pc_in_dungeon(66) begin
dungeon_devil_tower.quest_event_when_login()
end
-- first level: destroy metin stone to advance
when dt_1.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("early_check") == 1 then
d.setf("early_check", 0)
d.setf("dt_1", 1)
d.notice(14286)
d.regen_file("data/dungeon/deviltower1_regen.txt")
d.setf("floor", 1)
cmdchat_in_map(d.get_map_index(), string.format("RefreshDungeonFloor %d",d.getf("floor")))
end
end
end
-- second level: kill demon king to get teleported
when dt_2.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("dt_1") == 1 then
d.setf("dt_1", 0)
d.setf("dt_2", 1)
d.jump_all(2182, 6803)
d.kill_all()
d.regen_file("data/dungeon/deviltower3_regen.txt")
d.notice(14289)
d.setf("floor", 2)
cmdchat_in_map(d.get_map_index(), string.format("RefreshDungeonFloor %d",d.getf("floor")))
end
end
end
-- third level: kill all metin stones
when dt_3.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("dt_2") == 1 then
d.setf("dt_2", 0)
d.setf("dt_3", 1)
d.jump_all(2477, 7298)
d.regen_file("data/dungeon/deviltower4_regen.txt")
d.setf("stones_left", 8)
d.notice(14290)
d.setf("floor", 3)
cmdchat_in_map(d.get_map_index(), string.format("RefreshDungeonFloor %d",d.getf("floor")))
end
end
end
when 8017.kill with pc_in_dungeon(66) begin
if d.getf("dt_3") == 1 then
local count = d.getf("stones_left")-1
d.setf("stones_left", count)
if count < 1 then
d.notice(14288)
d.kill_all()
server_timer("dt_4", 5, d.get_map_index())
d.setf("level", 4)
end
end
end
-- fourth level: unlock all the seals in order to continue
when dt_4.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("dt_3") == 1 then
d.setf("dt_3", 0)
d.setf("dt_4", 1)
d.jump_all(2443, 7048)
d.regen_file("data/dungeon/deviltower5_regen.txt")
d.spawn_mob(4021, 360, 414, 0, 1)
d.spawn_mob(4021, 360, 443, 0, 1)
d.spawn_mob(4021, 379, 466, 0, 1)
d.spawn_mob(4021, 412, 464, 0, 1)
d.spawn_mob(4021, 433, 441, 0, 1)
d.spawn_mob(4021, 431, 411, 0, 1)
d.setf("seals_left", 6)
d.notice(14291)
d.setf("floor", 4)
cmdchat_in_map(d.get_map_index(), string.format("RefreshDungeonFloor %d",d.getf("floor")))
end
end
end
when 4021.take with item.get_vnum() == 50084 begin
if d.getf("dt_4") == 1 then
local count = d.getf("seals_left")-1
d.setf("seals_left", count)
pc.remove_item(item.get_vnum(), item.get_count())
d.notice(14292)
npc.purge()
if d.count_monster() < 200 and count > 0 then
d.regen_file("data/dungeon/deviltower5_regen.txt")
end
if count < 1 then
d.notice(14288)
d.kill_all()
server_timer("dt_5", 5, d.get_map_index())
d.setf("level", 5)
end
end
end
-- fifth level: part-1: destroy all metin stones
when dt_5.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("dt_4") == 1 then
d.setf("dt_4", 0)
d.setf("dt_5", 1)
d.jump_all(2679, 7352)
d.setf("high_stones", 5)
d.spawn_mob(8018, 600, 650, 0, 1)
d.spawn_mob(8018, 601, 674, 0, 1)
d.spawn_mob(8018, 624, 685, 0, 1)
d.spawn_mob(8018, 638, 663, 0, 1)
d.spawn_mob(8018, 622, 643, 0, 1)
d.notice(14293)
d.setf("floor", 5)
cmdchat_in_map(d.get_map_index(), string.format("RefreshDungeonFloor %d",d.getf("floor")))
end
end
end
-- fifth level: part-2: find key to continue
when 30304.use begin
if d.getf("dt_5") == 1 then
d.setf("pt1", 0)
item.remove()
d.kill_all()
d.notice(14288)
d.setf("level", 6)
server_timer("final_boss_spawn", 5, d.get_map_index())
end
end
when final_boss_spawn.server_timer begin
if d.select(get_server_timer_arg()) then
if d.getf("dt_5") == 1 then
d.setf("dt_5", 0)
d.setf("final", 1)
d.jump_all(2700, 6852)
d.notice(14296)
server_timer("final_boss", 1, d.get_map_index())
d.setf("floor", 6)
cmdchat_in_map(d.get_map_index(), string.format("RefreshDungeonFloor %d",d.getf("floor")))
end
end
end
-- sixth level: kill the boss to finish
when final_boss.server_timer begin
if d.select(get_server_timer_arg()) then
if check_if_test() then
if d.getf("boss_already_spawned") == 0 then -- protect the boss from multiple spawning it.
d.setf("boss_already_spawned", 1)
d.regen_file("data/dungeon/deviltower9_regen.txt")
end
return
end
if d.getf("final") == 1 then
if d.getf("boss_already_spawned") == 0 then -- protect the boss from multiple spawning it.
d.setf("boss_already_spawned", 1)
d.regen_file("data/dungeon/deviltower9_regen.txt")
end
end
end
end
when 1093.kill with pc_in_dungeon(66) begin
if d.select(pc.get_map_index()) then
if d.getf("final") == 1 then
give_event_reward(30320, check_if_test())
d.notice(14297)
d.kill_all()
d.setf("final", 0)
d.setf("floor", 6)
killed_boss(1093, check_if_test(), d.getf("real_time_fastest"), pc.get_map_index())
end
end
end
-- dungeon timers
when timer.server_timer begin
if d.select(get_server_timer_arg()) and map_in_dungeon(66) then
execute_timer(true, 590500, 110800, get_server_timer_arg(), 1)
end
end
when timer_end.server_timer begin
if d.select(get_server_timer_arg()) and map_in_dungeon(66) then
execute_timer(false, 590500, 110800, get_server_timer_arg(), 1)
end
end
end
end
yediğim qore hatası
Kod:
QUEST : dungeon_devil_tower
STATE : start
WHEN : 20348.chat (locale_quest)
./.pre_qc/dungeon_devil_tower.quest:3:when doesn't have begin-end clause. (()
Error 134 occured on quest ./.pre_qc/dungeon_devil_tower.quest
quest completed
root@ASServerFiles:/usr/home/main #