summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/battlegrounds.conf101
-rw-r--r--db/quest_db.txt12
-rw-r--r--doc/permissions.txt4
-rw-r--r--doc/script_commands.txt122
-rw-r--r--npc/airports/airships.txt14
-rw-r--r--npc/airports/hugel.txt10
-rw-r--r--npc/airports/izlude.txt10
-rw-r--r--npc/airports/rachel.txt10
-rw-r--r--npc/custom/etc/floating_rates.txt4
-rw-r--r--npc/custom/etc/lottery.txt4
-rw-r--r--npc/custom/etc/marriage.txt4
-rw-r--r--npc/custom/etc/monster_arena.txt4
-rw-r--r--npc/custom/etc/morroc_raceway.txt4
-rw-r--r--npc/custom/etc/mvp_arena.txt4
-rw-r--r--npc/custom/etc/penal_servitude.txt4
-rw-r--r--npc/custom/etc/quest_warper.txt16
-rw-r--r--npc/custom/etc/rpsroulette.txt4
-rw-r--r--npc/custom/etc/shifty_assassin.txt4
-rw-r--r--npc/custom/etc/stock_market.txt4
-rw-r--r--npc/custom/events/disguise.txt4
-rw-r--r--npc/custom/events/hallow06.txt4
-rw-r--r--npc/custom/events/mushroom_event.txt12
-rw-r--r--npc/custom/events/uneasy_cemetery.txt4
-rw-r--r--npc/custom/events/valentinesdayexp.txt4
-rw-r--r--npc/custom/events/xmas_rings_event.txt4
-rw-r--r--npc/custom/healer.txt4
-rw-r--r--npc/custom/item_signer.txt4
-rw-r--r--npc/custom/itemmall.txt6
-rw-r--r--npc/custom/jobmaster.txt4
-rw-r--r--npc/custom/platinum_skills.txt4
-rw-r--r--npc/custom/quests/dead_branch.txt12
-rw-r--r--npc/custom/quests/elvenear.txt4
-rw-r--r--npc/custom/quests/event_6_new_hats.txt4
-rw-r--r--npc/custom/quests/hunting_missions.txt4
-rw-r--r--npc/custom/quests/jewel_case.txt6
-rw-r--r--npc/custom/quests/kaho_balmung.txt4
-rw-r--r--npc/custom/quests/kahohorn.txt4
-rw-r--r--npc/custom/quests/kings_items.txt4
-rw-r--r--npc/custom/quests/may_hats.txt4
-rw-r--r--npc/custom/quests/quest_shop.txt4
-rw-r--r--npc/custom/quests/questboard.txt4
-rw-r--r--npc/custom/quests/sphinx_mask.txt4
-rw-r--r--npc/custom/quests/sunglasses.txt4
-rw-r--r--npc/custom/quests/tha_statues.txt4
-rw-r--r--npc/custom/quests/thq/THQS_ChatingNPC.txt4
-rw-r--r--npc/custom/quests/thq/THQS_GuildNPC.txt4
-rw-r--r--npc/custom/quests/thq/THQS_QuestNPC.txt4
-rw-r--r--npc/custom/quests/thq/THQS_Quests.txt4
-rw-r--r--npc/custom/quests/thq/THQS_TTShop.txt4
-rw-r--r--npc/custom/quests/umbalian_language.txt14
-rw-r--r--npc/custom/quests/valhallen.txt16
-rw-r--r--npc/custom/resetnpc.txt2
-rw-r--r--npc/custom/stylist.txt4
-rw-r--r--npc/custom/warper.txt4
-rw-r--r--npc/custom/woe_controller.txt4
-rw-r--r--npc/instances/EndlessTower.txt447
-rw-r--r--npc/instances/NydhoggsNest.txt83
-rw-r--r--npc/instances/OrcsMemory.txt88
-rw-r--r--npc/instances/SealedShrine.txt76
-rw-r--r--npc/jobs/novice/novice.txt76
-rw-r--r--npc/merchants/hd_refine.txt318
-rw-r--r--npc/quests/cooking_quest.txt16
-rw-r--r--npc/quests/doomed_swords.txt4
-rw-r--r--npc/quests/doomed_swords_quest.txt4
-rw-r--r--npc/quests/first_class/tu_acolyte.txt6
-rw-r--r--npc/quests/first_class/tu_merchant.txt6
-rw-r--r--npc/quests/gunslinger_quests.txt4
-rw-r--r--npc/quests/juice_maker.txt4
-rw-r--r--npc/quests/kiel_hyre_quest.txt143
-rw-r--r--npc/quests/lvl4_weapon_quest.txt16
-rw-r--r--npc/quests/quests_13_1.txt6
-rw-r--r--npc/quests/quests_13_2.txt10
-rw-r--r--npc/quests/seals/god_global.txt4
-rw-r--r--npc/quests/seals/god_weapon_creation.txt14
-rw-r--r--npc/quests/skills/archer_skills.txt2
-rw-r--r--npc/quests/skills/knight_skills.txt4
-rw-r--r--npc/quests/skills/wizard_skills.txt14
-rw-r--r--npc/re/airports/izlude.txt2
-rw-r--r--npc/re/cities/dewata.txt4
-rw-r--r--npc/re/cities/dicastes.txt14
-rw-r--r--npc/re/cities/izlude.txt4
-rw-r--r--npc/re/cities/malangdo.txt4
-rw-r--r--npc/re/cities/malaya.txt1520
-rw-r--r--npc/re/cities/mora.txt4
-rw-r--r--npc/re/guides/guides_alberta.txt16
-rw-r--r--npc/re/guides/guides_aldebaran.txt16
-rw-r--r--npc/re/guides/guides_amatsu.txt16
-rw-r--r--npc/re/guides/guides_ayothaya.txt16
-rw-r--r--npc/re/guides/guides_brasilis.txt16
-rw-r--r--npc/re/guides/guides_comodo.txt16
-rw-r--r--npc/re/guides/guides_dewata.txt4
-rw-r--r--npc/re/guides/guides_dicastes.txt4
-rw-r--r--npc/re/guides/guides_einbroch.txt4
-rw-r--r--npc/re/guides/guides_geffen.txt4
-rw-r--r--npc/re/guides/guides_gonryun.txt4
-rw-r--r--npc/re/guides/guides_hugel.txt4
-rw-r--r--npc/re/guides/guides_izlude.txt4
-rw-r--r--npc/re/guides/guides_juno.txt4
-rw-r--r--npc/re/guides/guides_lighthalzen.txt4
-rw-r--r--npc/re/guides/guides_louyang.txt4
-rw-r--r--npc/re/guides/guides_lutie.txt4
-rw-r--r--npc/re/guides/guides_mora.txt215
-rw-r--r--npc/re/guides/guides_morroc.txt4
-rw-r--r--npc/re/guides/guides_moscovia.txt4
-rw-r--r--npc/re/guides/guides_niflheim.txt4
-rw-r--r--npc/re/guides/guides_payon.txt4
-rw-r--r--npc/re/guides/guides_prontera.txt4
-rw-r--r--npc/re/guides/guides_rachel.txt4
-rw-r--r--npc/re/guides/guides_umbala.txt4
-rw-r--r--npc/re/guides/guides_veins.txt4
-rw-r--r--npc/re/jobs/1-1/mage.txt4
-rw-r--r--npc/re/jobs/1-1/merchant.txt4
-rw-r--r--npc/re/jobs/1-1/swordman.txt4
-rw-r--r--npc/re/jobs/1-1/thief.txt4
-rw-r--r--npc/re/jobs/3-1/guillotine_cross.txt4
-rw-r--r--npc/re/jobs/3-1/mechanic.txt4
-rw-r--r--npc/re/jobs/3-1/ranger.txt4
-rw-r--r--npc/re/jobs/3-1/warlock.txt4
-rw-r--r--npc/re/jobs/3-2/genetic.txt14
-rw-r--r--npc/re/jobs/3-2/minstrel.txt4
-rw-r--r--npc/re/jobs/3-2/royal_guard.txt4
-rw-r--r--npc/re/jobs/3-2/shadow_chaser.txt4
-rw-r--r--npc/re/jobs/3-2/sorcerer.txt4
-rw-r--r--npc/re/jobs/3-2/sura.txt4
-rw-r--r--npc/re/jobs/3-2/wanderer.txt4
-rw-r--r--npc/re/jobs/novice/novice.txt2053
-rw-r--r--npc/re/jobs/novice/supernovice_ex.txt4
-rw-r--r--npc/re/kafras/kafras.txt4
-rw-r--r--npc/re/merchants/card_separation.txt4
-rw-r--r--npc/re/merchants/coin_exchange.txt4
-rw-r--r--npc/re/merchants/diamond.txt4
-rw-r--r--npc/re/merchants/enchan_mal.txt16
-rw-r--r--npc/re/merchants/flute.txt16
-rw-r--r--npc/re/merchants/inn.txt4
-rw-r--r--npc/re/merchants/quivers.txt121
-rw-r--r--npc/re/merchants/refine.txt2
-rw-r--r--npc/re/merchants/renters.txt2
-rw-r--r--npc/re/merchants/shops.txt2
-rw-r--r--npc/re/mobs/dungeons/dew_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/dic_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/ein_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/gef_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/gefenia.txt2
-rw-r--r--npc/re/mobs/dungeons/glastheim.txt4
-rw-r--r--npc/re/mobs/dungeons/gld_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/gld_dunSE.txt4
-rw-r--r--npc/re/mobs/dungeons/gon_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/ice_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/in_sphinx.txt4
-rw-r--r--npc/re/mobs/dungeons/iz_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/juperos.txt2
-rw-r--r--npc/re/mobs/dungeons/kh_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/lhz_dun.txt2
-rw-r--r--npc/re/mobs/dungeons/lou_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/ma_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/mag_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/mal_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/mjo_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/moc_pryd.txt4
-rw-r--r--npc/re/mobs/dungeons/mosk_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/nyd_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/odin.txt4
-rw-r--r--npc/re/mobs/dungeons/orcsdun.txt4
-rw-r--r--npc/re/mobs/dungeons/pay_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/prt_maze.txt4
-rw-r--r--npc/re/mobs/dungeons/prt_sew.txt4
-rw-r--r--npc/re/mobs/dungeons/ra_san.txt4
-rw-r--r--npc/re/mobs/dungeons/tha_t.txt4
-rw-r--r--npc/re/mobs/dungeons/thor_v.txt4
-rw-r--r--npc/re/mobs/dungeons/treasure.txt4
-rw-r--r--npc/re/mobs/dungeons/tur_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/xmas_dun.txt4
-rw-r--r--npc/re/mobs/dungeons/yggdrasil.txt4
-rw-r--r--npc/re/mobs/fields/bifrost.txt25
-rw-r--r--npc/re/mobs/fields/lighthalzen.txt2
-rw-r--r--npc/re/other/mercenary_rent.txt4
-rw-r--r--npc/re/quests/cupet.txt4
-rw-r--r--npc/re/quests/eden/eden_common.txt4
-rw-r--r--npc/re/quests/eden/eden_quests.txt4
-rw-r--r--npc/re/quests/eden/eden_service.txt4
-rw-r--r--npc/re/quests/homu_s.txt4
-rw-r--r--npc/re/quests/magic_books.txt4
-rw-r--r--npc/re/quests/mrsmile.txt4
-rw-r--r--npc/re/quests/pile_bunker.txt4
-rw-r--r--npc/re/quests/quests_brasilis.txt4
-rw-r--r--npc/re/quests/quests_dewata.txt4
-rw-r--r--npc/re/quests/quests_dicastes.txt408
-rw-r--r--npc/re/quests/quests_izlude.txt4
-rw-r--r--npc/re/quests/quests_mora.txt5315
-rw-r--r--npc/re/quests/quests_veins.txt4
-rw-r--r--npc/re/scripts.conf6
-rw-r--r--npc/re/scripts_main.conf8
-rw-r--r--npc/re/warps/cities/dewata.txt4
-rw-r--r--npc/re/warps/cities/dicastes.txt4
-rw-r--r--npc/re/warps/cities/eclage.txt4
-rw-r--r--npc/re/warps/cities/malaya.txt122
-rw-r--r--npc/re/warps/cities/rachel.txt4
-rw-r--r--npc/re/warps/cities/yggdrasil.txt4
-rw-r--r--npc/re/warps/dungeons/dic_dun.txt4
-rw-r--r--npc/re/warps/dungeons/ecl_dun.txt4
-rw-r--r--npc/re/warps/dungeons/iz_dun.txt4
-rw-r--r--npc/re/warps/fields/bif_fild.txt42
-rw-r--r--npc/re/warps/fields/com_fild.txt4
-rw-r--r--npc/re/warps/fields/dic_fild.txt4
-rw-r--r--npc/re/warps/fields/geffen_fild.txt4
-rw-r--r--npc/re/warps/fields/hugel_fild.txt4
-rw-r--r--npc/re/warps/fields/morroc_fild.txt4
-rw-r--r--npc/re/warps/fields/payon_fild.txt4
-rw-r--r--npc/re/warps/fields/prontera_fild.txt4
-rw-r--r--npc/re/warps/fields/rachel_fild.txt4
-rw-r--r--npc/re/warps/fields/veins_fild.txt4
-rw-r--r--npc/re/warps/fields/yuno_fild.txt4
-rw-r--r--npc/re/warps/other/jobquests.txt4
-rw-r--r--npc/re/warps/other/paradise.txt4
-rw-r--r--npc/re/warps/other/s_workshop.txt4
-rw-r--r--npc/re/warps/other/sign.txt4
-rw-r--r--npc/scripts.conf6
-rw-r--r--npc/scripts_jobs.conf1
-rw-r--r--npc/warps/guildcastles.txt4
-rw-r--r--npc/warps/pvp.txt2
-rw-r--r--src/char/char.c46
-rw-r--r--src/char/char.h2
-rw-r--r--src/common/console.c6
-rw-r--r--src/common/malloc.c102
-rw-r--r--src/common/malloc.h2
-rw-r--r--src/common/mmo.h7
-rw-r--r--src/common/socket.c60
-rw-r--r--src/common/socket.h14
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/battleground.c508
-rw-r--r--src/map/battleground.h66
-rw-r--r--src/map/chrif.c7
-rw-r--r--src/map/clif.c253
-rw-r--r--src/map/clif.h41
-rw-r--r--src/map/guild.c10
-rw-r--r--src/map/instance.c484
-rw-r--r--src/map/instance.h76
-rw-r--r--src/map/intif.c2
-rw-r--r--src/map/irc-bot.c6
-rw-r--r--src/map/map.c467
-rw-r--r--src/map/map.h37
-rw-r--r--src/map/mob.c7
-rw-r--r--src/map/npc.c327
-rw-r--r--src/map/npc.h12
-rw-r--r--src/map/packets.h5
-rw-r--r--src/map/packets_struct.h62
-rw-r--r--src/map/party.c107
-rw-r--r--src/map/party.h3
-rw-r--r--src/map/path.c36
-rw-r--r--src/map/pc.c148
-rw-r--r--src/map/pc.h15
-rw-r--r--src/map/script.c711
-rw-r--r--src/map/script.h38
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/status.c19
-rw-r--r--src/map/unit.c37
256 files changed, 13657 insertions, 2398 deletions
diff --git a/conf/battlegrounds.conf b/conf/battlegrounds.conf
new file mode 100644
index 000000000..b43899dd7
--- /dev/null
+++ b/conf/battlegrounds.conf
@@ -0,0 +1,101 @@
+//====================================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//=
+//= http://hercules.ws/board/
+//====================================================
+//= Link~u! <description> <link to wiki/topic>
+//= http://hercules.ws/board/topic/928-memory-slasher-may-30-patch/
+battlegrounds: (
+{
+ /* feature is not complete */
+ feature_off:true
+ /* character variable for global bg delay */
+ global_delay_var: "BG_Delay_Tick"
+ /* how many seconds to consider a player "afk" and kick him out? */
+ maximum_afk_seconds: 30
+
+ /* one can add as many as he wishes */
+ /* for custom ones, need to edit "lua files/entryqueue/entryqueuelist.lua" [Ind/Hercules] */
+ arenas: ({
+ name: "Tierra Gorge" //must match the name in client files
+ event: "Tierra_BG2::OnPlayerListReady"
+ minLevel: 80
+ maxLevel: 150
+ reward: {/* amount of badges awarded on each case */
+ win: 3
+ loss: 1
+ draw: 1
+ }
+ minPlayers: 6 /* minimum amount of players to start */
+ maxPlayers: 60 /* maximum amount of players */
+ minTeamPlayers: 6 /* minimum amount of team members required for a team (party or guild) to join */
+ delay_var: "Tierra_BG_Tick" /* npc variable name that will store the delay for this match */
+ maxDuration: 30 /* maximum duration in minutes, if reached game ends and highest score wins (or calls a draw if scores are equal) */
+ },{
+ name: "Flavius" //must match the name in client files
+ event: "Flavius_BG1::OnPlayerListReady"
+ minLevel: 80
+ maxLevel: 150
+ reward: {/* amount of badges awarded on each case */
+ win: 9
+ loss: 3
+ draw: 3
+ }
+ minPlayers: 6 /* minimum amount of players to start */
+ maxPlayers: 60 /* maximum amount of players */
+ minTeamPlayers: 6 /* minimum amount of team members required for a team (party or guild) to join */
+ delay_var: "Flavius_BG_Tick" /* npc variable name that will store the delay for this match */
+ maxDuration: 30 /* maximum duration in minutes, if reached game ends and highest score wins (or calls a draw if scores are equal) */
+ },{
+ name: "KVM (Level 80 and up)" //must match the name in client files
+ event: "KvM03_BG::OnPlayerListReady"
+ minLevel: 80
+ maxLevel: 150
+ reward: {/* amount of badges awarded on each case */
+ win: 5
+ loss: 1
+ draw: 1
+ }
+ minPlayers: 4 /* minimum amount of players to start */
+ maxPlayers: 60 /* maximum amount of players */
+ minTeamPlayers: 5 /* minimum amount of team members required for a team (party or guild) to join */
+ delay_var: "KVM_BG_Tick" /* npc variable name that will store the delay for this match */
+ maxDuration: 30 /* maximum duration in minutes, if reached game ends and highest score wins (or calls a draw if scores are equal) */
+ },{
+ name: "KVM (Level 60~79)" //must match the name in client files
+ event: "KvM03_BG::OnPlayerListReady"
+ minLevel: 60
+ maxLevel: 79
+ reward: {/* amount of badges awarded on each case */
+ win: 2
+ loss: 0
+ draw: 1
+ }
+ minPlayers: 4 /* minimum amount of players to start */
+ maxPlayers: 60 /* maximum amount of players */
+ minTeamPlayers: 5 /* minimum amount of team members required for a team (party or guild) to join */
+ delay_var: "KVM_BG_Tick" /* npc variable name that will store the delay for this match */
+ maxDuration: 30 /* maximum duration in minutes, if reached game ends and highest score wins (or calls a draw if scores are equal) */
+ },{
+ name: "KVM (Level 59 and below)" //must match the name in client files
+ event: "KvM03_BG::OnPlayerListReady"
+ minLevel: 1
+ maxLevel: 59
+ reward: {/* amount of badges awarded on each case */
+ win: 1
+ loss: 0
+ draw: 0
+ }
+ minPlayers: 4 /* minimum amount of players to start */
+ maxPlayers: 60 /* maximum amount of players */
+ minTeamPlayers: 5 /* minimum amount of team members required for a team (party or guild) to join */
+ delay_var: "KVM_BG_Tick" /* npc variable name that will store the delay for this match */
+ maxDuration: 30 /* maximum duration in minutes, if reached game ends and highest score wins (or calls a draw if scores are equal) */
+ }
+ )
+}) \ No newline at end of file
diff --git a/db/quest_db.txt b/db/quest_db.txt
index ad5af4472..025a9e6ec 100644
--- a/db/quest_db.txt
+++ b/db/quest_db.txt
@@ -33,6 +33,7 @@
1117,0,0,0,0,0,0,0,"Ropewa & Yuridi - Eternal Promise, Broken Ring"
// Ropewa Clue Quest
1118,0,0,0,0,0,0,0,"Neighborhood Knight - I Need Clues"
+1119,82800,0,0,0,0,0,0,"Neighborhood Knight - Cooldown"
1145,0,0,0,0,0,0,0,"Help the poor cat"
1146,0,0,0,0,0,0,0,"Help the poor cat"
@@ -527,6 +528,11 @@
5028,43200,0,0,0,0,0,0,"Inspection of the Sample"
5029,3600,0,0,0,0,0,0,"Unidentified Creature"
+5030,0,0,0,0,0,0,0,"The creature's family"
+5031,0,0,0,0,0,0,0,"The creature's family"
+5032,0,0,0,0,0,0,0,"The creature's family"
+5033,0,0,0,0,0,0,0,"The creature's family"
+5034,0,0,0,0,0,0,0,"News from the family"
5035,0,0,0,0,0,0,0,"Help the old man!"
5036,0,0,0,0,0,0,0,"Help the old man!"
5037,0,0,0,0,0,0,0,"Help the old man!"
@@ -854,7 +860,7 @@
// New Sapha's Honor Quest
7206,0,0,0,0,0,0,0,"New Day for Cheshire"
7207,0,0,0,0,0,0,0,"Cheshire's Box"
-7208,82800,0,0,0,0,0,0,"Wait for Cheshire?"
+7208,86400,0,0,0,0,0,0,"Wait for Cheshire?"
// Misty Forest Labyrinth
7211,9000,0,0,0,0,0,0,"Misty Forest Labyrinth Exploration"
@@ -1683,8 +1689,8 @@
//Mora Quests
// == Roast Beef Quest
-11182,180,0,0,0,0,0,0,"Teohre's Report"
-11183,0,0,0,0,0,0,0,"Teohre's Favor"
+11182,60,0,0,0,0,0,0,"Theore's Report"
+11183,0,0,0,0,0,0,0,"Theore's Favor"
// == Theo
11184,0,0,0,0,0,0,0,"Runaway Laphine"
11185,0,0,0,0,0,0,0,"Pouch"
diff --git a/doc/permissions.txt b/doc/permissions.txt
index be51a1821..6cfb98897 100644
--- a/doc/permissions.txt
+++ b/doc/permissions.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20130330
+//= 20130528
//===== Description: =========================================
//= Player group permissions, configured in /conf/groups.conf.
//============================================================
@@ -31,4 +31,4 @@ show_bossmobs : Ability to see boss mobs with @showmobs.
disable_pvm : Ability to disable Player vs. Monster.
disable_pvp : Ability to disable Player vs. Player.
disable_commands_when_dead : Ability to disable @command usage when dead.
-hchsys_admin : Hercules Chat System Admin (can modify channels settings regardless of ownership and join password-protected channels without password) \ No newline at end of file
+hchsys_admin : Hercules Chat System Admin (Ability to modify channel settings regardless of ownership and join password-protected channels without requiring a password.) \ No newline at end of file
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 5fbf652a4..af3d90262 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -7610,10 +7610,9 @@ This will open a book item at the specified page.
========================
---------------------------------------
-*instance_create("<instance name>",<party id>);
+*instance_create("<instance name>",<owner id>{,<optional owner_type>});
-Create an instance using the name "<instance name>" for the Party of
-<party id>.
+Create an instance using the name "<instance name>" for the <owner_id> of owner_type (when not provided, defaults to IOT_PARTY)
Most instance_* commands are used in conjunction with this command and
depend on the ID this command returns.
@@ -7644,30 +7643,32 @@ Example:
*instance_destroy {<instance id>};
Destroys instance with the ID <instance id>. If no ID is specified, the
-instance the script is attached to is used. If the script is not attached
-to an instance, the instance of the currently attached player's party is
-used. If no player is currently attached, the command fails and causes the
-script to halt.
+instance the script is attached to is used. If in the end no instance_id,
+is found the command halts the script execution.
---------------------------------------
-*instance_attachmap("<map name>",<instance id>{,<use base name>});
+*instance_attachmap("<map name>",<instance id>{,<use base name>{,"<new map name>"}});
Attaches the map "<map name>" to the instance specified with
<instance id>. The optional parameter specifies, whether a map requires
-emulation for instancing (1) or not (0 = default).
+emulation for instancing (1) or not (0 = default). if use base name is specified,
+and "<new map name>" too the server will instance the map under the "<new map name>",
+name.
Returns the resulting map name on success or an empty string on failure.
+Example:
+ instance_attachmap("prontera", .@instance_id,1,"via");
+^ the above creates a instance (or clone) of prontera, on a map called "via"
+
---------------------------------------
*instance_detachmap "<map name>"{,<instance id>};
Detach the map "<map name>" to the instance with the <instance id>. If no
-ID is specified, the instance the script is attached to is used. If the
-script is not attached to an instance, the instance of the currently
-attached player's party is used. If no player is currently attached, the
-command fails and causes the script to halt.
+ID is specified, the instance the script is attached to is used. If in the
+end no instance_id is found the command halts the script execution.
---------------------------------------
@@ -7681,10 +7682,8 @@ the source maps to the instanced maps.
*instance_announce <instance id>,"<text>",<flag>{,<fontColor>{,<fontType>{,<fontSize>{,<fontAlign>{,<fontY>}}}}};
Works like announce, but has the <instance id> parameter. If instance id
-is 0, the instance the script is attached to is used. If the script is not
-attached to an instance, the instance of the currently attached player's
-party is used. If no player is currently attached, the command fails and
-causes the script to halt.
+is -1, the instance the script is attached to is used. If in the
+end no instance_id is found the command halts the script execution.
---------------------------------------
@@ -7698,10 +7697,8 @@ Attaches the current script to the instance given by <instance id>.
Retrieves the unique name given to a copy of an NPC given by "<npc name>"
in an instance specified <instance id>. If no ID is specified, the
-instance the script is attached to is used. If the script is not attached
-to an instance, the instance of the currently attached player's party is
-used. If no player is currently attached, the command fails and causes the
-script to halt.
+instance the script is attached to is used. If in the end no instance_id,
+is found the command halts the script execution.
---------------------------------------
@@ -7709,22 +7706,18 @@ script to halt.
Checks whether or not the given map belongs to specified instance. If no
ID is specified, the instance the script is attached to is used. If the
-script is not attached to an instance, the instance of the currently
-attached player's party is used. If no player is currently attached, the
-command fails and causes the script to halt.
+script is not attached to an instance, it'll try to check whether the,
+player attached to the script possesses an instance with a map matching
+"<map name>". If in the end no instance_id is found the command halts the,
+script execution.
Returns name of the instanced map on success, otherwise an empty string.
---------------------------------------
-*instance_id({<type>});
+*instance_id();
-Retrieves the instance id, depending on <type>. If type is not given, it
-defaults to 0.
-
-Type:
- 0 - Instance ID the script is attached to.
- 1 - Instance ID of the currently attached player's party.
+Retrieves the instance id of the script it is being run on.
---------------------------------------
@@ -7732,19 +7725,16 @@ Type:
Warps all players in the instance <instance id> to <map name> at given
coordinates. If no ID is specified, the instance the script is attached to
-is used. If the script is not attached to an instance, the instance of the
-currently attached player's party is used. If no player is currently
-attached, the command fails and causes the script to halt.
+is used. If in the end no instance_id is found the command halts the,
+script execution.
---------------------------------------
*instance_set_timeout <alive timeout>,<idle timeout>{,<instance id>};
Sets the timeout values for an instance given by <instance id>. If no ID
-is specified, the instance the script is attached to is used. If the
-script is not attached to an instance, the instance of the currently
-attached player's party is used. If no player is currently attached, the
-command fails and causes the script to halt.
+is specified, the instance the script is attached to is used. If in the end,
+no instance_id is found the command halts the script execution.
Parameter <alive timeout> specifies the total amount of time the instance
will exist. Parameter <idle timeout> specifies how long players have, when
@@ -8080,3 +8070,59 @@ If the character does not have a mercenary, the command returns ""
for name and 0 for all other types.
----------------------------------------
+
+==========================
+|11.- Queue Commands .|
+==========================
+---------------------------------------
+Queue Author's note: the following sucks, probably breaks formatting, please fix if you're willing to (you may remove this note)
+---------------------------------------
+*queue()
+creates a new queue instance, returns created queue id
+
+---------------------------------------
+*queuesize(<queue_id>)
+returns the amount of entries in queue instance of <queue_id>.
+
+---------------------------------------
+*queueadd(<queue_id>,<var_id>)
+adds <var_id> to queue of <queue_id>, returns 1 if <var_id> is already present in the queue, 0 otherwise.
+
+---------------------------------------
+*queueremove(<queue_id>,<var_id>)
+removes <var_id> from queue of <queue_id>, returns 1 if <var_id> is not present in the queue, 0 otherwise.
+
+---------------------------------------
+*queueopt(<queue_id>,<optionType>,{Optional <option val>})
+modifies <queue_id>'s <optionType>, when <option val> is not present, <optionType> is removed from <queue_id>, when present it modifies <queue_id>'s <optionType> with the new <option val> value.
+Currently 3 options are available, HQO_OnDeath (0), HQO_OnLogout (1), HQO_OnMapChange (2) (the constant names are not final).
+
+Example:
+ queueopt(.@queue_id,0,"MyNPC::MyOnQueueMemberDeathEventName");
+
+---------------------------------------
+*queuedel(<queue_id>)
+deletes <queue_id> returns 1 when <queue_id> is not found, 0 otherwise.
+
+---------------------------------------
+*queueiterator(<queue_id>)
+creates a new queue iterator instance, a queue iterator is not a reference to a queue's actual members, it copies the queues members when initialized, this way you can loop through them even if you remove them from the queue
+
+---------------------------------------
+*qicheck(<queue_iterator_id>)
+checks whether there is a next member in the iterator's queue, 1 when it does, 0 otherwise.
+
+---------------------------------------
+*qiget(<queue_iterator_id>)
+obtains the next member in the iterator's queue, returns the next member's id or 0 when it doesnt exist.
+
+Example:
+ for( set .@elem,qiget(.@queue_iterator_id); qicheck(.@queue_iterator_id); set .@elem,qiget(.@queue_iterator_id) ) {
+ //Do something
+ }
+
+---------------------------------------
+*qiclear(<queue_iterator_id>)
+deletes a queue iterator from memory, returns 1 when it fails, 0 otherwise.
+
+--------------------------------------- \ No newline at end of file
diff --git a/npc/airports/airships.txt b/npc/airports/airships.txt
index eb621c9bf..b45d20312 100644
--- a/npc/airports/airships.txt
+++ b/npc/airports/airships.txt
@@ -1,18 +1,18 @@
//===== Hercules Script ======================================
//= The Airship System Script
-//===== By: ==================================================
-//= rAthena Dev Team
-//===== Description: =========================================
+//===== By: ==================================================
+//= Hercules Dev Team
+//===== Description: =========================================
//= The Airship System used in the official servers.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= Official NPCs.
-//============================================================
+//============================================================
-//============================================================
+//============================================================
//= Domestic Airship Route
//= ... -> Juno -> Einbroch -> Lighthalzen -> Einbroch
//= -> Juno -> Hugel -> ...
-//============================================================
+//============================================================
airplane,243,73,0 script #AirshipWarp-1 45,1,1,{
end;
diff --git a/npc/airports/hugel.txt b/npc/airports/hugel.txt
index d5f3155ed..2d65fdc30 100644
--- a/npc/airports/hugel.txt
+++ b/npc/airports/hugel.txt
@@ -1,12 +1,12 @@
//===== Hercules Script ======================================
//= Hugel Airport NPCs
-//===== By: ==================================================
-//= rAthena Dev Team
-//===== Description: =========================================
+//===== By: ==================================================
+//= Hercules Dev Team
+//===== Description: =========================================
//= Hugel Airport NPCs
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= Official NPCs.
-//============================================================
+//============================================================
hugel,178,142,0 script toairplane#hugel 45,1,1,{
end;
diff --git a/npc/airports/izlude.txt b/npc/airports/izlude.txt
index 48ccbde79..fe46c1169 100644
--- a/npc/airports/izlude.txt
+++ b/npc/airports/izlude.txt
@@ -1,12 +1,12 @@
//===== Hercules Script ======================================
//= Izlude Airport NPCs
-//===== By: ==================================================
-//= rAthena Dev Team
-//===== Description: =========================================
+//===== By: ==================================================
+//= Hercules Dev Team
+//===== Description: =========================================
//= Izlude Airport NPCs
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= Official NPCs.
-//============================================================
+//============================================================
- script ::Airship_Staff_izlude -1,{
mes "[Airship Staff]";
diff --git a/npc/airports/rachel.txt b/npc/airports/rachel.txt
index 87749961c..88c48cd16 100644
--- a/npc/airports/rachel.txt
+++ b/npc/airports/rachel.txt
@@ -1,12 +1,12 @@
//===== Hercules Script ======================================
//= Rachel Airport NPCs
-//===== By: ==================================================
-//= rAthena Dev Team
-//===== Description: =========================================
+//===== By: ==================================================
+//= Hercules Dev Team
+//===== Description: =========================================
//= Rachel Airport NPCs
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= Official NPCs.
-//============================================================
+//============================================================
ra_fild12,295,208,0 script toairplane#rachel 45,1,1,{
end;
diff --git a/npc/custom/etc/floating_rates.txt b/npc/custom/etc/floating_rates.txt
index daa11878e..f499a4f9d 100644
--- a/npc/custom/etc/floating_rates.txt
+++ b/npc/custom/etc/floating_rates.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Floating Server Rates
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= It's a simply example of setbattleflag
//= This script will change your server rates from 1x to 1.5x every 6 hours
diff --git a/npc/custom/etc/lottery.txt b/npc/custom/etc/lottery.txt
index 7cc9a53f1..1e35280a4 100644
--- a/npc/custom/etc/lottery.txt
+++ b/npc/custom/etc/lottery.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Lottery
//===== By: ==================================================
//= acky
//===== Current Version: =====================================
//= 1.2.1a
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Daily lottery draw
//===== Additional Comments: =================================
diff --git a/npc/custom/etc/marriage.txt b/npc/custom/etc/marriage.txt
index 0f21c46e7..00f44193a 100644
--- a/npc/custom/etc/marriage.txt
+++ b/npc/custom/etc/marriage.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Wedding Script
//===== By: ==================================================
//= AppleGirl, Evera
//===== Current Version: =====================================
//= 2.9
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Fully working wedding script for all kind of weddings
//===== Additional Comments: =================================
diff --git a/npc/custom/etc/monster_arena.txt b/npc/custom/etc/monster_arena.txt
index 0b6b1cc96..52ffa115b 100644
--- a/npc/custom/etc/monster_arena.txt
+++ b/npc/custom/etc/monster_arena.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Monster vs Monster
//===== By: ==================================================
//= acky
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Players train monsters and battle other players.
//= Experience can be earned and monsters upgraded.
diff --git a/npc/custom/etc/morroc_raceway.txt b/npc/custom/etc/morroc_raceway.txt
index 768084173..34614538a 100644
--- a/npc/custom/etc/morroc_raceway.txt
+++ b/npc/custom/etc/morroc_raceway.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Morroc Raceway
//===== By: ==================================================
//= acky
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Lets players race around Morroc (pvp_y_1-5)
//===== Additional Comments: =================================
diff --git a/npc/custom/etc/mvp_arena.txt b/npc/custom/etc/mvp_arena.txt
index de4eb542b..d95ed7621 100644
--- a/npc/custom/etc/mvp_arena.txt
+++ b/npc/custom/etc/mvp_arena.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= MVP Arena
//===== By: ==================================================
//= Darkchild
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Rooms containing 16 different MVPs
//===== Additional Comments: =================================
diff --git a/npc/custom/etc/penal_servitude.txt b/npc/custom/etc/penal_servitude.txt
index bfbd39c63..414458cb9 100644
--- a/npc/custom/etc/penal_servitude.txt
+++ b/npc/custom/etc/penal_servitude.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Penal Servitude
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= A simple Penal Servitude Script.
//= It could cheer up your prisoners a bit.
diff --git a/npc/custom/etc/quest_warper.txt b/npc/custom/etc/quest_warper.txt
index 2c2d31083..840325636 100644
--- a/npc/custom/etc/quest_warper.txt
+++ b/npc/custom/etc/quest_warper.txt
@@ -1,14 +1,14 @@
-//===== rAthena Script ============================================
+//===== Hercules Script ======================================
//= Quest Warper Script
-//===== By: =======================================================
+//===== By: ==================================================
//= DZeroX, Darkchild, Neouni
-//===== Current Version: ==========================================
+//===== Current Version: =====================================
//= 2.3
-//===== Compatible With: ==========================================
-//= rAthena SVN
-//===== Description: ==============================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= Warper that works only after locations are unlocked.
-//===== Additional Comments: ======================================
+//===== Additional Comments: =================================
//= 1.0 - NPCs created
//= 1.1 - Add Dungeons by sturm
//= 1.2 - Add All char in account unlocked by ace_killer
@@ -66,7 +66,7 @@
//= 2.3 - Added new town maps, cleanup, and removed pre-1.8 backwards fix. [Euphy]
//=================================================================
-//========================Function=&=Script========================
+//========================Function & Script========================
function script Q_Warpra {
mes "[Warpra]";
diff --git a/npc/custom/etc/rpsroulette.txt b/npc/custom/etc/rpsroulette.txt
index 8e3d04a3e..87048a97b 100644
--- a/npc/custom/etc/rpsroulette.txt
+++ b/npc/custom/etc/rpsroulette.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Rock Scissors Roulette
//===== By: ==================================================
//= acky
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Plays a hybrid Russian Roulette Rock Scissors Paper game.
//===== Additional Comments: =================================
diff --git a/npc/custom/etc/shifty_assassin.txt b/npc/custom/etc/shifty_assassin.txt
index 46d3aab07..d0fe41d45 100644
--- a/npc/custom/etc/shifty_assassin.txt
+++ b/npc/custom/etc/shifty_assassin.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Shifty Assassin
//===== By: ==================================================
//= acky
//===== Current Version: =====================================
//= 1.1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Players buy ninjas to assassinate other players
//===== Additional Comments: =================================
diff --git a/npc/custom/etc/stock_market.txt b/npc/custom/etc/stock_market.txt
index 6f90bcaef..26d368cdf 100644
--- a/npc/custom/etc/stock_market.txt
+++ b/npc/custom/etc/stock_market.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Stock Market Game
//===== By: ==================================================
//= acky
//===== Current Version: =====================================
//= 1.3.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= NPC for a stock market game.
//===== Additional Comments: =================================
diff --git a/npc/custom/events/disguise.txt b/npc/custom/events/disguise.txt
index a3113a288..ad5ba1185 100644
--- a/npc/custom/events/disguise.txt
+++ b/npc/custom/events/disguise.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Disguise Event
//===== By: ==================================================
//= GmOcean
//===== Current Version: =====================================
//= 5.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Additional Comments: =================================
//= Note: This script requires PCRE to run properly.
//= 5.0 Last update by GmOcean.
diff --git a/npc/custom/events/hallow06.txt b/npc/custom/events/hallow06.txt
index 57c4ebdf6..4663ab996 100644
--- a/npc/custom/events/hallow06.txt
+++ b/npc/custom/events/hallow06.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Custom Halloween Event 2006
//===== By: ==================================================
//= Stryker
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Halloween Event Script
//===== Additional Comments: =================================
diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt
index 9ebd3211a..c13bde1cc 100644
--- a/npc/custom/events/mushroom_event.txt
+++ b/npc/custom/events/mushroom_event.txt
@@ -1,18 +1,18 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Find the Mushroom
//===== By: ==================================================
//= Mysterious
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 3.6a
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= Find the Mushroom - random amount of Mushrooms spawns in random maps.
//= Players need to find these mushrooms and kill them to gain prizes!
//===== Additional Comments: =================================
//= 3.0 Fully Functional with Rewritten script. [Mysterious]
//= 3.6a Slightly edited. [Euphy]
-//============================================================
+//============================================================
prontera,142,228,6 script Find the Mushroom 1084,{
mes "[ Find The Mushroom ]";
diff --git a/npc/custom/events/uneasy_cemetery.txt b/npc/custom/events/uneasy_cemetery.txt
index 60d569483..50262933d 100644
--- a/npc/custom/events/uneasy_cemetery.txt
+++ b/npc/custom/events/uneasy_cemetery.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Uneasy Prontera Cemetery Quest
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 1.2a (Tested and fully working!)
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= A periodical quest of the Uneasy Cemetery (Kill undead / Prevent their appearance)
//= Every day, at the midnight Prontera receive a wave of Undeads.
diff --git a/npc/custom/events/valentinesdayexp.txt b/npc/custom/events/valentinesdayexp.txt
index 509b25f71..065d4e32d 100644
--- a/npc/custom/events/valentinesdayexp.txt
+++ b/npc/custom/events/valentinesdayexp.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Valentine Event Script + EXP bonus
//===== By: ==================================================
//= Lupus (based on Muad_Dib's work)
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN; 4500+
+//= Hercules
//===== Description: =========================================
// Close to other official stValentine event (added white chocolate)
// Custom: Handmade choco gives some EXP bonuses to married people
diff --git a/npc/custom/events/xmas_rings_event.txt b/npc/custom/events/xmas_rings_event.txt
index 1a52fd43a..7c0ec5bf0 100644
--- a/npc/custom/events/xmas_rings_event.txt
+++ b/npc/custom/events/xmas_rings_event.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Karachun Event (Xmas Rings Quest)
//===== By: ==================================================
//= Lupus (1.0)
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN; 4880+ (with 'setItemScript' command)
+//= Hercules
//===== Description: =========================================
//= Custom event: Karachun (from 8 Dec till 8 Jan), X-Mas, HNY
//===== Additional Comments: =================================
diff --git a/npc/custom/healer.txt b/npc/custom/healer.txt
index 5533330cd..31f247695 100644
--- a/npc/custom/healer.txt
+++ b/npc/custom/healer.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Healer
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Basic healer script.
//============================================================
diff --git a/npc/custom/item_signer.txt b/npc/custom/item_signer.txt
index 96c33ba00..b70244ed1 100644
--- a/npc/custom/item_signer.txt
+++ b/npc/custom/item_signer.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Sign Your Items
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 1.1a
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Write you name on your rare equipment or weapon ^_-
//===== Additional Comments: =================================
diff --git a/npc/custom/itemmall.txt b/npc/custom/itemmall.txt
index b6c4bb800..6eb162f9c 100644
--- a/npc/custom/itemmall.txt
+++ b/npc/custom/itemmall.txt
@@ -1,13 +1,13 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Shop Street
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
-//= A Shop Street in Prontera.
+//= Street shops in Prontera.
//============================================================
prontera,147,240,5 shop Armor 99,2304:10000,2306:20000,2308:20000,2310:50000,2311:50000,2313:50000,2315:75000,2317:100000,2322:20000,2326:60000,2331:75000,2342:100000,2353:75000,2364:150000,2367:100000,2399:50000
diff --git a/npc/custom/jobmaster.txt b/npc/custom/jobmaster.txt
index c4c259b64..00963bf36 100644
--- a/npc/custom/jobmaster.txt
+++ b/npc/custom/jobmaster.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Job Master
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN r16114+
+//= Hercules
//===== Description: =========================================
//= A fully functional job changer.
//===== Additional Comments: =================================
diff --git a/npc/custom/platinum_skills.txt b/npc/custom/platinum_skills.txt
index 4de742817..7f80158a3 100644
--- a/npc/custom/platinum_skills.txt
+++ b/npc/custom/platinum_skills.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Platinum Skills
//===== By: ==================================================
//= Keichii, DarkChild
//===== Current Version: =====================================
//= 2.8
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Single NPC that assigns quests skills for all classes
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/dead_branch.txt b/npc/custom/quests/dead_branch.txt
index 505da6c0a..306a553c8 100644
--- a/npc/custom/quests/dead_branch.txt
+++ b/npc/custom/quests/dead_branch.txt
@@ -1,16 +1,16 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Dead Branch (+Bloody Branch) Quest
-//===== By: ==================================================
+//===== By: ==================================================
//= GM-Yevon
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//= Hercules
+//===== Description: =========================================
// Simple item trade-in quest, a person can get a Dead Branch
// by simply providing the items: Log x3 (7201), Wooden Heart x1 (7189),
// Trunk x5 (1019), and Wooden Gnarl x1 (7222).
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.1 Optimized, added Bloody Branch with 0.01% chance [Lupus]
//============================================================
diff --git a/npc/custom/quests/elvenear.txt b/npc/custom/quests/elvenear.txt
index c547bf524..4cb5c11de 100644
--- a/npc/custom/quests/elvenear.txt
+++ b/npc/custom/quests/elvenear.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Daily Job Quest For Elven Ears
//===== By: ==================================================
//= someone
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Elven Ears (require 75+ Base Level)
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/event_6_new_hats.txt b/npc/custom/quests/event_6_new_hats.txt
index 56edaed19..37b5e52b7 100644
--- a/npc/custom/quests/event_6_new_hats.txt
+++ b/npc/custom/quests/event_6_new_hats.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Custom Quest For New Headgears
//===== By: ==================================================
//= RedxSwordxHero, Lupus
//===== Current Version: =====================================
//= 1.4b
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= 4 brothers give you quests to get 6 new hats (missing
//= from official quests)
diff --git a/npc/custom/quests/hunting_missions.txt b/npc/custom/quests/hunting_missions.txt
index d89ad3281..fd07b8de6 100644
--- a/npc/custom/quests/hunting_missions.txt
+++ b/npc/custom/quests/hunting_missions.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Hunting Missions
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Random hunting missions.
//= Rewards are based on quest difficulty.
diff --git a/npc/custom/quests/jewel_case.txt b/npc/custom/quests/jewel_case.txt
index dfa52bdf6..9ec952a23 100644
--- a/npc/custom/quests/jewel_case.txt
+++ b/npc/custom/quests/jewel_case.txt
@@ -1,16 +1,14 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Jewel Case Quest
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= A quest for players at base level 99,
//= with Jewel Case as a reward.
-//===== Additional Comments: =================================
-//=
//============================================================
lighthalzen,108,229,2 script La Fenn 766,{
diff --git a/npc/custom/quests/kaho_balmung.txt b/npc/custom/quests/kaho_balmung.txt
index f3a82def4..a2a154acf 100644
--- a/npc/custom/quests/kaho_balmung.txt
+++ b/npc/custom/quests/kaho_balmung.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Balmung & Lord Kaho's Horns Quest
//===== By: ==================================================
//= MagicalTux
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Custom quests for Balmung and Lord Kaho's Horns.
//= WARNING: The quests are very easy, so be careful!
diff --git a/npc/custom/quests/kahohorn.txt b/npc/custom/quests/kahohorn.txt
index 697047821..031631b74 100644
--- a/npc/custom/quests/kahohorn.txt
+++ b/npc/custom/quests/kahohorn.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Lord Kaho's Horns Quest
//===== By: ==================================================
//=
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Custom quest for Lord Kaho's Horns.
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/kings_items.txt b/npc/custom/quests/kings_items.txt
index 8140827c1..d935dac08 100644
--- a/npc/custom/quests/kings_items.txt
+++ b/npc/custom/quests/kings_items.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Event King Items
//===== By: ==================================================
//= $ephiroth
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Grand Circlet Quest combined with Excalibur Quest.
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/may_hats.txt b/npc/custom/quests/may_hats.txt
index 10319ae6a..e0f1f87ee 100644
--- a/npc/custom/quests/may_hats.txt
+++ b/npc/custom/quests/may_hats.txt
@@ -1,4 +1,4 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Quests: Bird Nest, Lion Mask, Skeleton Manteau,
//= Fashion Hip Sack & Sales Banner
//===== By: ==================================================
@@ -6,7 +6,7 @@
//===== Current Version: =====================================
//= 1.01
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Custom quest for some RO mobile game bonus items
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt
index 539c29f23..3f69c73ef 100644
--- a/npc/custom/quests/quest_shop.txt
+++ b/npc/custom/quests/quest_shop.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Euphy's Quest Shop
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.6
//===== Compatible With: =====================================
-//= rAthena SVN r16862+
+//= Hercules
//===== Description: =========================================
//= A dynamic quest shop based on Lunar's, with easier config.
//= Includes support for multiple shops & cashpoints.
diff --git a/npc/custom/quests/questboard.txt b/npc/custom/quests/questboard.txt
index cccbea7ee..abfb61a4d 100644
--- a/npc/custom/quests/questboard.txt
+++ b/npc/custom/quests/questboard.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= tr0n's Questboard
//===== By: ==================================================
//= tr0n
//===== Current Version: =====================================
//= 1.4.4
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Easily add collection and hunting quests.
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/sphinx_mask.txt b/npc/custom/quests/sphinx_mask.txt
index 00910428c..b2cf64559 100644
--- a/npc/custom/quests/sphinx_mask.txt
+++ b/npc/custom/quests/sphinx_mask.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Sphinx Mask Quest (custom)
//===== By: ==================================================
//= sabernet09
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= This quest is related to Umbalian Chief.
//= 1.1 Removed it from official Umbala quests [Lupus]
diff --git a/npc/custom/quests/sunglasses.txt b/npc/custom/quests/sunglasses.txt
index fb3353556..6e44ce007 100644
--- a/npc/custom/quests/sunglasses.txt
+++ b/npc/custom/quests/sunglasses.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Slotted Sunglasses Quest
//===== By: ==================================================
//= amichan
//===== Current Version: =====================================
//= 1.8
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Quest to get Slotted Sunglasses.
//= Will reset after quest completion.
diff --git a/npc/custom/quests/tha_statues.txt b/npc/custom/quests/tha_statues.txt
index fb52d7ed4..a9c53a033 100644
--- a/npc/custom/quests/tha_statues.txt
+++ b/npc/custom/quests/tha_statues.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Custom Thanatos Tower Quest
//===== By: ==================================================
//= Bibilol, Moryagorn
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Custom Thanatos Tower Quest
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/thq/THQS_ChatingNPC.txt b/npc/custom/quests/thq/THQS_ChatingNPC.txt
index 55971e51f..752681e39 100644
--- a/npc/custom/quests/thq/THQS_ChatingNPC.txt
+++ b/npc/custom/quests/thq/THQS_ChatingNPC.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Treasure Hunter Quests
//===== By: ==================================================
//= Fredzilla
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Start for Treasure hunter quests
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/thq/THQS_GuildNPC.txt b/npc/custom/quests/thq/THQS_GuildNPC.txt
index b5bbf5d28..01b14687f 100644
--- a/npc/custom/quests/thq/THQS_GuildNPC.txt
+++ b/npc/custom/quests/thq/THQS_GuildNPC.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Treasure Hunter Quests
//===== By: ==================================================
//= Fredzilla
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Start for Treasure hunter quests
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/thq/THQS_QuestNPC.txt b/npc/custom/quests/thq/THQS_QuestNPC.txt
index 6a3b33699..5b4d98a27 100644
--- a/npc/custom/quests/thq/THQS_QuestNPC.txt
+++ b/npc/custom/quests/thq/THQS_QuestNPC.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Treasure Hunter Quests
//===== By: ==================================================
//= Fredzilla
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Start for Treasure hunter quests
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/thq/THQS_Quests.txt b/npc/custom/quests/thq/THQS_Quests.txt
index b1e6c1652..70494ab9b 100644
--- a/npc/custom/quests/thq/THQS_Quests.txt
+++ b/npc/custom/quests/thq/THQS_Quests.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Treasure Hunter Quests
//===== By: ==================================================
//= Fredzilla
//===== Current Version: =====================================
//= 1.6
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Start for Treasure hunter quests
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/thq/THQS_TTShop.txt b/npc/custom/quests/thq/THQS_TTShop.txt
index 7752a0960..0a706869b 100644
--- a/npc/custom/quests/thq/THQS_TTShop.txt
+++ b/npc/custom/quests/thq/THQS_TTShop.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Treasure Hunter Quests
//===== By: ==================================================
//= Fredzilla
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Start for Treasure hunter quests
//===== Additional Comments: =================================
diff --git a/npc/custom/quests/umbalian_language.txt b/npc/custom/quests/umbalian_language.txt
index 674ea6e03..f41b5500e 100644
--- a/npc/custom/quests/umbalian_language.txt
+++ b/npc/custom/quests/umbalian_language.txt
@@ -1,14 +1,14 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Custom Umbalian Language Quest
-//===== By: ==================================================
+//===== By: ==================================================
//= sabernet09
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.1
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= 1.1 Removed it from offical Umbala Quests [Lupus]
-//============================================================
+//============================================================
prontera,145,290,5 script Mason 742,{
mes "[Mason]";
diff --git a/npc/custom/quests/valhallen.txt b/npc/custom/quests/valhallen.txt
index 19480b105..07112c1c8 100644
--- a/npc/custom/quests/valhallen.txt
+++ b/npc/custom/quests/valhallen.txt
@@ -1,17 +1,17 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Valhallen Items Quests NPC
-//===== By: ==================================================
+//===== By: ==================================================
//= Avaji
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.1
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= All-in-one: Mjolnir,Sleipnir,Brisingamen,Gleipnir,Megingjard
//= Custom quest, ingredients based on official RO FAQ
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.1 Optimized. [Euphy]
-//============================================================
+//============================================================
prontera,147,171,5 script Lenneth 811,{
mes "[Lenneth]";
diff --git a/npc/custom/resetnpc.txt b/npc/custom/resetnpc.txt
index c3ad9afb2..cbb633e6a 100644
--- a/npc/custom/resetnpc.txt
+++ b/npc/custom/resetnpc.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Reset NPC
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Current Version: =====================================
//= 1.3
//===== Description: =========================================
diff --git a/npc/custom/stylist.txt b/npc/custom/stylist.txt
index 77bbf7bdb..853553f26 100644
--- a/npc/custom/stylist.txt
+++ b/npc/custom/stylist.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Stylist
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Changes your hair style, hair color, and cloth color.
//===== Additional Comments: =================================
diff --git a/npc/custom/warper.txt b/npc/custom/warper.txt
index b0fb07a66..14dcfebf0 100644
--- a/npc/custom/warper.txt
+++ b/npc/custom/warper.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Warper
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= A complete - but very condensed - warper script.
//= Coordinates written largely by Tekno-Kanix and ToastOfDoom.
diff --git a/npc/custom/woe_controller.txt b/npc/custom/woe_controller.txt
index fe88b0934..c7d3f4e9e 100644
--- a/npc/custom/woe_controller.txt
+++ b/npc/custom/woe_controller.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Euphy's WOE Controller
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
-//= rAthena SVN r16958+
+//= Hercules
//===== Description: =========================================
//= A controller for War of Emperium designed for
//= simplicity and ease of use.
diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt
index 7edbc618f..a6c330e69 100644
--- a/npc/instances/EndlessTower.txt
+++ b/npc/instances/EndlessTower.txt
@@ -202,7 +202,8 @@ alberta,214,77,6 script Captain Janssen 709,{
}
}
-e_tower,81,105,0 script Tower Protection Stone 406,{
+//e_tower,81,105,0 script Tower Protection Stone 406,{
+prontera,150,150,0 script Tower Protection Stone 952,{
set .@party_id,getcharid(1);
set .@ins_mas,getpartyleader(.@party_id,2);
@@ -481,7 +482,7 @@ e_tower,151,185,4 script Purification Stone#et2 844,{
}
else {
delitem 6000,1; //Dark_Ashes
- instance_announce 0, .@move_name$ + ". You will be warped to the 26th Level.",bc_map,"0x00ff99";
+ instance_announce -1, .@move_name$ + ". You will be warped to the 26th Level.",bc_map,"0x00ff99";
warp "2@tower",52,354;
}
break;
@@ -493,7 +494,7 @@ e_tower,151,185,4 script Purification Stone#et2 844,{
}
else {
delitem 6000,2; //Dark_Ashes
- instance_announce 0, .@move_name$ + ". You will be warped to the 51st Level.",bc_map,"0x00ff99";
+ instance_announce -1, .@move_name$ + ". You will be warped to the 51st Level.",bc_map,"0x00ff99";
warp "3@tower",52,354;
}
break;
@@ -505,7 +506,7 @@ e_tower,151,185,4 script Purification Stone#et2 844,{
}
else {
delitem 6000,3; //Dark_Ashes
- instance_announce 0, .@move_name$ + ". You will be warped to the 76th Level.",bc_map,"0x00ff99";
+ instance_announce -1, .@move_name$ + ". You will be warped to the 76th Level.",bc_map,"0x00ff99";
warp "4@tower",52,354;
}
break;
@@ -532,11 +533,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 1
}
else
- instance_announce 0, "Remaining Monsters on the 1st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 1st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 1st Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 1st Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("1FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -567,11 +568,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 2
}
else
- instance_announce 0, "Remaining Monsters on the 2nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 2nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 2nd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 2nd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("2FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -605,11 +606,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 3
}
else
- instance_announce 0, "Remaining Monsters on the 3rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 3rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 3rd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 3rd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("3FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -643,11 +644,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 4
}
else
- instance_announce 0, "Remaining Monsters on the 4th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 4th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 4th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 4th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("4FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -680,11 +681,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 5
}
else
- instance_announce 0, "Remaining Monsters on the 5th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 5th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 5th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 5th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("5FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -716,11 +717,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 6
}
else
- instance_announce 0, "Remaining Monsters on the 6th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 6th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 6th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 6th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("6FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -752,11 +753,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 7
}
else
- instance_announce 0, "Remaining Monsters on the 7th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 7th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 7th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 7th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("7FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -786,11 +787,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 8
}
else
- instance_announce 0, "Remaining Monsters on the 8th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 8th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 8th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 8th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("8FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -821,11 +822,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 9
}
else
- instance_announce 0, "Remaining Monsters on the 9th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 9th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 9th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 9th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("9FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -856,11 +857,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 10
}
else
- instance_announce 0, "Remaining Monsters on the 10th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 10th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 10th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 10th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("10FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -892,11 +893,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 11
}
else
- instance_announce 0, "Remaining Monsters on the 11th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 11th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 11th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 11th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("11FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -926,11 +927,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 12
}
else
- instance_announce 0, "Remaining Monsters on the 12th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 12th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 12th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 12th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("12FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -961,11 +962,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 13
}
else
- instance_announce 0, "Remaining Monsters on the 13th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 13th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 13th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 13th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("13FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -998,11 +999,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 14
}
else
- instance_announce 0, "Remaining Monsters on the 14th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 14th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 14th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 14th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("14FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1037,11 +1038,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 15
}
else
- instance_announce 0, "Remaining Monsters on the 15th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 15th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 15th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 15th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("15FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1073,11 +1074,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 16
}
else
- instance_announce 0, "Remaining Monsters on the 16th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 16th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 16th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 16th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("16FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1109,11 +1110,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 17
}
else
- instance_announce 0, "Remaining Monsters on the 17th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 17th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 17th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 17th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("17FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1143,11 +1144,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 18
}
else
- instance_announce 0, "Remaining Monsters on the 18th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 18th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 18th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 18th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("18FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1179,11 +1180,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 19
}
else
- instance_announce 0, "Remaining Monsters on the 19th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 19th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 19th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 19th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("19FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1213,11 +1214,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 20
}
else
- instance_announce 0, "Remaining Monsters on the 20th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 20th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 20th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 20th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("20FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1250,11 +1251,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 21
}
else
- instance_announce 0, "Remaining Monsters on the 21st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 21st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 21st Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 21st Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("21FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1288,11 +1289,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 22
}
else
- instance_announce 0, "Remaining Monsters on the 22nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 22nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 22nd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 22nd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("22FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1325,11 +1326,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 23
}
else
- instance_announce 0, "Remaining Monsters on the 23rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 23rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 23rd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 23rd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("23FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1360,11 +1361,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 24
}
else
- instance_announce 0, "Remaining Monsters on the 24th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 24th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 24th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 24th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("24FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1395,11 +1396,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 25
}
else
- instance_announce 0, "Remaining Monsters on the 25th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 25th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 25th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 25th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("25FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1487,11 +1488,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 26
}
else
- instance_announce 0, "Remaining Monsters on the 26th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 26th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 26th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 26th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("26FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1525,11 +1526,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 27
}
else
- instance_announce 0, "Remaining Monsters on the 27th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 27th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 27th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 27th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("27FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1561,11 +1562,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 28
}
else
- instance_announce 0, "Remaining Monsters on the 28th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 28th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 28th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 28th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("28FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1599,11 +1600,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 29
}
else
- instance_announce 0, "Remaining Monsters on the 29th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 29th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 29th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 29th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("29FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1633,11 +1634,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 30
}
else
- instance_announce 0, "Remaining Monsters on the 30th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 30th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 30th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 30th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("30FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1669,11 +1670,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 31
}
else
- instance_announce 0, "Remaining Monsters on the 31st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 31st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 31st Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 31st Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("31FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1708,11 +1709,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 32
}
else
- instance_announce 0, "Remaining Monsters on the 32nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 32nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 32nd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 32nd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("32FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1745,11 +1746,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 33
}
else
- instance_announce 0, "Remaining Monsters on the 33rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 33rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 33rd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 33rd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("33FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1780,11 +1781,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 34
}
else
- instance_announce 0, "Remaining Monsters on the 34th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 34th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 34th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 34th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("34FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1817,11 +1818,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 35
}
else
- instance_announce 0, "Remaining Monsters on the 35th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 35th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 35th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 35th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("35FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1852,11 +1853,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 36
}
else
- instance_announce 0, "Remaining Monsters on the 36th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 36th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 36th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 36th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("36FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1887,11 +1888,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 37
}
else
- instance_announce 0, "Remaining Monsters on the 37th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 37th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 37th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 37th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("37FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1921,11 +1922,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 38
}
else
- instance_announce 0, "Remaining Monsters on the 38th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 38th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 38th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 38th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("38FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1958,11 +1959,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 39
}
else
- instance_announce 0, "Remaining Monsters on the 39th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 39th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 39th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 39th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("39FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -1996,11 +1997,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 40
}
else
- instance_announce 0, "Remaining Monsters on the 40th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 40th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 40th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 40th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("40FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2029,11 +2030,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 41
}
else
- instance_announce 0, "Remaining Monsters on the 41st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 41st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 41st Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 41st Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("41FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2066,11 +2067,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 42
}
else
- instance_announce 0, "Remaining Monsters on the 42nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 42nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 42nd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 42nd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("42FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2102,11 +2103,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 43
}
else
- instance_announce 0, "Remaining Monsters on the 43rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 43rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 43rd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 43rd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("43FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2139,11 +2140,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 44
}
else
- instance_announce 0, "Remaining Monsters on the 44th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 44th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 44th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 44th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("44FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2175,11 +2176,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 45
}
else
- instance_announce 0, "Remaining Monsters on the 45th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 45th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 45th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 45th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("45FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2209,11 +2210,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 46
}
else
- instance_announce 0, "Remaining Monsters on the 46th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 46th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 46th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 46th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("46FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2245,11 +2246,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 47
}
else
- instance_announce 0, "Remaining Monsters on the 47 Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 47 Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 47th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 47th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("47FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2280,11 +2281,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 48
}
else
- instance_announce 0, "Remaining Monsters on the 48th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 48th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 48th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 48th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("48FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2317,11 +2318,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 49
}
else
- instance_announce 0, "Remaining Monsters on the 49th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 49th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 49th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 49th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("49FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2354,11 +2355,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 50
}
else
- instance_announce 0, "Remaining Monsters on the 50th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 50th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 50th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 50th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("50FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2444,11 +2445,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 51
}
else
- instance_announce 0, "Remaining Monsters on the 51st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 51st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 51st Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 51st Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("51FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2482,11 +2483,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 52
}
else
- instance_announce 0, "Remaining Monsters on the 52nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 52nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 52nd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 52nd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("52FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2516,11 +2517,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 53
}
else
- instance_announce 0, "Remaining Monsters on the 53rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 53rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 53rd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 53rd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("53FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2551,11 +2552,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 54
}
else
- instance_announce 0, "Remaining Monsters on the 54th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 54th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 54th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 54th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("54FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2587,11 +2588,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 55
}
else
- instance_announce 0, "Remaining Monsters on the 55th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 55th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 55th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 55th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("55FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2624,11 +2625,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 56
}
else
- instance_announce 0, "Remaining Monsters on the 56th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 56th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 56th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 56th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("56FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2665,11 +2666,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 57
}
else
- instance_announce 0, "Remaining Monsters on the 57th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 57th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 57th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 57th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("57FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2702,11 +2703,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 58
}
else
- instance_announce 0, "Remaining Monsters on the 58th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 58th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 58th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 58th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("58FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2737,11 +2738,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 59
}
else
- instance_announce 0, "Remaining Monsters on the 59th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 59th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 59th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 59th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("59FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2777,11 +2778,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 60
}
else
- instance_announce 0, "Remaining Monsters on the 60th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 60th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 60th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 60th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("60FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2815,11 +2816,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 61
}
else
- instance_announce 0, "Remaining Monsters on the 61st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 61st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 61st Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 61st Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("61FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2848,11 +2849,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 62
}
else
- instance_announce 0, "Remaining Monsters on the 62nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 62nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 62nd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 62nd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("62FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2885,11 +2886,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 63
}
else
- instance_announce 0, "Remaining Monsters on the 63rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 63rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 63rd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 63rd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("63FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2923,11 +2924,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 64
}
else
- instance_announce 0, "Remaining Monsters on the 64th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 64th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 64th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 64th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("64FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2957,11 +2958,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 65
}
else
- instance_announce 0, "Remaining Monsters on the 65th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 65th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 65th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 65th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("65FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -2992,11 +2993,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 66
}
else
- instance_announce 0, "Remaining Monsters on the 66th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 66th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 66th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 66th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("66FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3029,11 +3030,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 67
}
else
- instance_announce 0, "Remaining Monsters on the 67th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 67th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 67th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 67th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("67FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3066,11 +3067,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 68
}
else
- instance_announce 0, "Remaining Monsters on the 68th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 68th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 68th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 68th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("68FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3103,11 +3104,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 69
}
else
- instance_announce 0, "Remaining Monsters on the 69th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 69th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 69th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 69th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("69FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3138,11 +3139,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 70
}
else
- instance_announce 0, "Remaining Monsters on the 70th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 70th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 70th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 70th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("70FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3174,11 +3175,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 71
}
else
- instance_announce 0, "Remaining Monsters on the 71st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 71st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 71st Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 71st Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("71FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3210,11 +3211,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 72
}
else
- instance_announce 0, "Remaining Monsters on the 72nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 72nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 72nd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 72nd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("72FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3248,11 +3249,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 73
}
else
- instance_announce 0, "Remaining Monsters on the 73rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 73rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 73rd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 73rd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("73FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3289,11 +3290,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 74
}
else
- instance_announce 0, "Remaining Monsters on the 74th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 74th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 74th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 74th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("74FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3325,11 +3326,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 75
}
else
- instance_announce 0, "Remaining Monsters on the 75th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1, "Remaining Monsters on the 75th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0, "All Monsters on the 75th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1, "All Monsters on the 75th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("75FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3415,11 +3416,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 76
}
else
- instance_announce 0,"Remaining Monsters on the 76th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 76th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 76th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 76th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("76FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3452,11 +3453,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 77
}
else
- instance_announce 0,"Remaining Monsters on the 77th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 77th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 77th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 77th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("77FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3489,11 +3490,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 78
}
else
- instance_announce 0,"Remaining Monsters on the 78th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 78th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the Level 78th have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the Level 78th have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("78FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3526,11 +3527,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 79
}
else
- instance_announce 0,"Remaining Monsters on the 79th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 79th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 79th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 79th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("79FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3560,11 +3561,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 80
}
else
- instance_announce 0,"Remaining Monsters on the 80th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 80th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 80th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 80th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("80FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3595,11 +3596,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 81
}
else
- instance_announce 0,"Remaining Monsters on the 81st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 81st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 81st Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 81st Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("81FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3632,11 +3633,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 82
}
else
- instance_announce 0,"Remaining Monsters on the 82nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 82nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 82nd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 82nd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("82FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3668,11 +3669,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 83
}
else
- instance_announce 0,"Remaining Monsters on the 83rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 83rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 83rd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 83rd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("83FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3705,11 +3706,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 84
}
else
- instance_announce 0,"Remaining Monsters on the 84th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 84th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 84th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 84th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("84FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3738,11 +3739,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 85
}
else
- instance_announce 0,"Remaining Monsters on the 85th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 85th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 85th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 85th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("85FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3774,11 +3775,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 86
}
else
- instance_announce 0,"Remaining Monsters on the 86th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 86th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 86th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 86th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("86FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3810,11 +3811,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 87
}
else
- instance_announce 0,"Remaining Monsters on the 87th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 87th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 87th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 87th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("87FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3847,11 +3848,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 88
}
else
- instance_announce 0,"Remaining Monsters on the 88th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 88th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 88th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 88th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("88FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3883,11 +3884,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 89
}
else
- instance_announce 0,"Remaining Monsters on the 89th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 89th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 89th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 89th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("89FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3919,11 +3920,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 90
}
else
- instance_announce 0,"Remaining Monsters on the 90th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 90th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 90th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 90th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("90FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3954,11 +3955,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 91
}
else
- instance_announce 0,"Remaining Monsters on the 91st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 91st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 91st Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 91st Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("91FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -3991,11 +3992,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 92
}
else
- instance_announce 0,"Remaining Monsters on the 92nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 92nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 92nd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 92nd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("92FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -4027,11 +4028,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 93
}
else
- instance_announce 0,"Remaining Monsters on the 93rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 93rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 93rd Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 93rd Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("93FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -4061,11 +4062,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 94
}
else
- instance_announce 0,"Remaining Monsters on the 94th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 94th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 94th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 94th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("94FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -4098,11 +4099,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 95
}
else
- instance_announce 0,"Remaining Monsters on the 95th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 95th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 95th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 95th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("95FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -4133,11 +4134,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 96
}
else
- instance_announce 0,"Remaining Monsters on the 96th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 96th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 96th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 96th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("96FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -4169,11 +4170,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 97
}
else
- instance_announce 0,"Remaining Monsters on the 97th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 97th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 97th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 97th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("97FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -4207,11 +4208,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 98
}
else
- instance_announce 0,"Remaining Monsters on the 98th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 98th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 98th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 98th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("98FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -4302,11 +4303,11 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 99
}
else
- instance_announce 0,"Remaining Monsters on the 99th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Monsters on the 99th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce 0,"All Monsters on the 99th Level have been defeated.",bc_map,"0xffff00";
+ instance_announce -1,"All Monsters on the 99th Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname("99FGate102tower", instance_id())+"::OnEnable";
stopnpctimer;
end;
@@ -4488,7 +4489,7 @@ OnInstanceInit:
OnMyMobDead:
set .@mob_dead_num,mobcount("5@tower",instance_npcname("#102FShadowDust1", instance_id())+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- instance_announce 0, "Mysterious Voice: Who are you to dare intrude upon my sanctuary?!",bc_map,"0xffff00";
+ instance_announce -1, "Mysterious Voice: Who are you to dare intrude upon my sanctuary?!",bc_map,"0xffff00";
donpcevent instance_npcname("#102FShadowDust", instance_id())+"::OnDisable";
donpcevent instance_npcname("Lucid Crystal#102", instance_id())+"::OnEnable";
//SetItemPartyInMap in_102floor 100
@@ -4633,23 +4634,23 @@ OnEnable:
end;
OnTimer500:
- instance_announce 0,"Guests, huh? I hope you've come here knowing that you'll be buried in this place. If you didn't know, well... it's too late!",bc_map,"0x00ffcc";
+ instance_announce -1,"Guests, huh? I hope you've come here knowing that you'll be buried in this place. If you didn't know, well... it's too late!",bc_map,"0x00ffcc";
end;
OnTimer5500:
- instance_announce 0,"This is why you adventurers always end up dead.",bc_map,"0x00ffcc";
+ instance_announce -1,"This is why you adventurers always end up dead.",bc_map,"0x00ffcc";
end;
OnTimer10500:
- instance_announce 0,"I may applaud you for your courage... Of course, I intend to play with you a little bit first.",bc_map,"0x00ffcc";
+ instance_announce -1,"I may applaud you for your courage... Of course, I intend to play with you a little bit first.",bc_map,"0x00ffcc";
end;
OnTimer15500:
- instance_announce 0,"You know, I like watching humans running around in fear.",bc_map,"0x00ffcc";
+ instance_announce -1,"You know, I like watching humans running around in fear.",bc_map,"0x00ffcc";
end;
OnTimer20500:
- instance_announce 0,"Let's see who runs fastest. Are you ready?",bc_map,"0x00ffcc";
+ instance_announce -1,"Let's see who runs fastest. Are you ready?",bc_map,"0x00ffcc";
stopnpctimer;
areamonster "6@tower",151,66,153,106,"Bone Guardian",1152,50,instance_npcname("#1st Beeper", instance_id())+"::OnMyMobDead";
areamonster "6@tower",158,66,160,106,"Bone Guardian",1152,50,instance_npcname("#1st Beeper", instance_id())+"::OnMyMobDead";
@@ -4662,7 +4663,7 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 101
}
else
- instance_announce 0,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
end;
}
@@ -4674,15 +4675,15 @@ OnEnable:
end;
OnTimer500:
- instance_announce 0,"Well, I guess they aren't too challenging for you.",bc_map,"0x00ffcc";
+ instance_announce -1,"Well, I guess they aren't too challenging for you.",bc_map,"0x00ffcc";
end;
OnTimer5500:
- instance_announce 0,"Let's speed up a little bit, shall we?",bc_map,"0x00ffcc";
+ instance_announce -1,"Let's speed up a little bit, shall we?",bc_map,"0x00ffcc";
end;
OnTimer10500:
- instance_announce 0,"I demand an encore!",bc_map,"0x00ffcc";
+ instance_announce -1,"I demand an encore!",bc_map,"0x00ffcc";
stopnpctimer;
areamonster "6@tower",151,66,153,106,"Wind Guardian",1263,30,instance_npcname("#2nd Beeper", instance_id())+"::OnMyMobDead";
areamonster "6@tower",158,66,160,106,"Wind Guardian",1263,30,instance_npcname("#2nd Beeper", instance_id())+"::OnMyMobDead";
@@ -4695,7 +4696,7 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 102
}
else
- instance_announce 0,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
end;
}
@@ -4707,15 +4708,15 @@ OnEnable:
end;
OnTimer500:
- instance_announce 0,"Yes, this is getting exciting!",bc_map,"0x00ffcc";
+ instance_announce -1,"Yes, this is getting exciting!",bc_map,"0x00ffcc";
end;
OnTimer5500:
- instance_announce 0,"I'll remember you as one of a few that have managed to entertain me.",bc_map,"0x00ffcc";
+ instance_announce -1,"I'll remember you as one of a few that have managed to entertain me.",bc_map,"0x00ffcc";
end;
OnTimer10500:
- instance_announce 0,"How would you like to play one more round?",bc_map,"0x00ffcc";
+ instance_announce -1,"How would you like to play one more round?",bc_map,"0x00ffcc";
stopnpctimer;
areamonster "6@tower",151,66,153,106,"Sword Edge Guardian",1132,20,instance_npcname("#3rd Beeper", instance_id())+"::OnMyMobDead";
areamonster "6@tower",158,66,160,106,"Sword Edge Guardian",1132,20,instance_npcname("#3rd Beeper", instance_id())+"::OnMyMobDead";
@@ -4728,7 +4729,7 @@ OnMyMobDead:
//SetItemPartyInMap in_102floor 103
}
else
- instance_announce 0,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
+ instance_announce -1,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
end;
}
@@ -4740,15 +4741,15 @@ OnEnable:
end;
OnTimer500:
- instance_announce 0,"Okay, the time has come to make my appearance!",bc_map,"0x00ffcc";
+ instance_announce -1,"Okay, the time has come to make my appearance!",bc_map,"0x00ffcc";
end;
OnTimer5500:
- instance_announce 0,"Do you want to know who I am?",bc_map,"0x00ffcc";
+ instance_announce -1,"Do you want to know who I am?",bc_map,"0x00ffcc";
end;
OnTimer10500:
- instance_announce 0,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";
+ instance_announce -1,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";
stopnpctimer;
monster "6@tower",156,147,"Nacht Sieger",1956,1,instance_npcname("#4th Beeper", instance_id())+"::OnMyMobDead";
end;
@@ -4825,15 +4826,15 @@ OnEnable:
end;
OnTimer500:
- instance_announce 0,"This... This can't be happening! I can't be defeated!",bc_map,"0xffff00";
+ instance_announce -1,"This... This can't be happening! I can't be defeated!",bc_map,"0xffff00";
end;
OnTimer5500:
- instance_announce 0,"Nooo! My soul... My shell...! Nooo~!",bc_map,"0xffff00";
+ instance_announce -1,"Nooo! My soul... My shell...! Nooo~!",bc_map,"0xffff00";
end;
OnTimer10500:
- instance_announce 0,"Nacht Sieger's body has turned into dark ashes that scattered in the wind.",bc_map,"0x00ffcc";
+ instance_announce -1,"Nacht Sieger's body has turned into dark ashes that scattered in the wind.",bc_map,"0x00ffcc";
stopnpctimer;
end;
}
diff --git a/npc/instances/NydhoggsNest.txt b/npc/instances/NydhoggsNest.txt
index fffe47227..2d48d0341 100644
--- a/npc/instances/NydhoggsNest.txt
+++ b/npc/instances/NydhoggsNest.txt
@@ -1811,7 +1811,7 @@ OnEnable:
monster "1@nyd",255,255,"Nidhoggur's Guardian#10",2021,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
monster "1@nyd",225,245,"Nidhoggur's Guardian#11",2021,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
monster "1@nyd",230,280,"Nidhoggur's Guardian#12",2021,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- instance_announce 0, "Nidhoggur's Guardian : Protect the Guardian's Sanctuary. Get rid of the intruders.",bc_map,"0x00ff99";
+ instance_announce -1, "Nidhoggur's Guardian : Protect the Guardian's Sanctuary. Get rid of the intruders.",bc_map,"0x00ff99";
end;
OnDisable:
@@ -1822,7 +1822,7 @@ OnDisable:
OnMyMobDead:
set .@mob_dead_num,mobcount("1@nyd", instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- instance_announce 0, "All of Nidhoggur's Guardians have been defeated!",bc_map,"0x00ff99";
+ instance_announce -1, "All of Nidhoggur's Guardians have been defeated!",bc_map,"0x00ff99";
donpcevent instance_npcname("ins_nyd_1f_timer", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_to2f_warp", instance_id())+"::OnEnable";
set 'ins_nyd2,2;
@@ -1848,23 +1848,23 @@ OnDisable:
end;
OnTimer900000:
- instance_announce 0, "World Tree Yggdrasil : There's not much time left. Please hurry.",bc_map,"0xFFFF00";
+ instance_announce -1, "World Tree Yggdrasil : There's not much time left. Please hurry.",bc_map,"0xFFFF00";
end;
OnTimer1200000:
- instance_announce 0, "World Tree Yggdrasil : My powers are slowly disappearing. Please hurry.",bc_map,"0xFFFF00";
+ instance_announce -1, "World Tree Yggdrasil : My powers are slowly disappearing. Please hurry.",bc_map,"0xFFFF00";
end;
OnTimer1500000:
- instance_announce 0, "World Tree Yggdrasil : I'm... almost at my limit... please hurry up." ,bc_map,"0xFFFF00";
+ instance_announce -1, "World Tree Yggdrasil : I'm... almost at my limit... please hurry up." ,bc_map,"0xFFFF00";
end;
OnTimer1800000:
- instance_announce 0, "World Tree Yggdrasil : You've failed... but I will use what power I have left... to send you out of here.",bc_map,"0xFFFF00";
+ instance_announce -1, "World Tree Yggdrasil : You've failed... but I will use what power I have left... to send you out of here.",bc_map,"0xFFFF00";
end;
OnTimer1830000:
- instance_announce 0, "Opening of the Gate has failed.",bc_map,"0xFFFF00";
+ instance_announce -1, "Opening of the Gate has failed.",bc_map,"0xFFFF00";
end;
OnTimer1850000:
@@ -1933,15 +1933,15 @@ OnDisable:
end;
OnTimer12000:
- instance_announce 0, "Nidhoggur's Shadow : No more...I can't stand this anymore...",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : No more...I can't stand this anymore...",bc_map,"0xFFFF00";
end;
OnTimer15000:
- instance_announce 0, "Nidhoggur's Shadow : I need...I need the World Tree Yggdrasil's powers...",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I need...I need the World Tree Yggdrasil's powers...",bc_map,"0xFFFF00";
end;
OnTimer18000:
- instance_announce 0, "Nidhoggur's Shadow : Destroy...everything...",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : Destroy...everything...",bc_map,"0xFFFF00";
end;
/*
stopnpctimer;
@@ -1983,7 +1983,7 @@ OnInstanceInit:
OnEnable:
enablenpc instance_npcname("nyd_2f_boss_enter_call", instance_id());
monster "2@nyd",199,327,"Nidhoggur's Shadow#",2022,1,instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::OnMyMobDead";
- instance_announce 0, "Nidhoggur's Shadow : I will devour all of you...you and the World Tree Yggdrasil.",bc_map,"0x00ff99";
+ instance_announce -1, "Nidhoggur's Shadow : I will devour all of you...you and the World Tree Yggdrasil.",bc_map,"0x00ff99";
//donpcevent instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::Ongo";
initnpctimer;
end;
@@ -1996,7 +1996,7 @@ OnDisable:
OnTimer180000:
set .@rullet,rand(1,4);
if (.@rullet == 1) {
- instance_announce 0, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2005,7 +2005,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 2) {
- instance_announce 0, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2014,7 +2014,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 3) {
- instance_announce 0, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2023,7 +2023,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 4) {
- instance_announce 0, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
@@ -2037,7 +2037,7 @@ OnTimer180000:
OnMyMobDead:
set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- instance_announce 0, "Nidhoggur's Shadow : World Tree Yggdrasil's guardian... his powers are disappearing...",bc_map,"0x00ff99";
+ instance_announce -1, "Nidhoggur's Shadow : World Tree Yggdrasil's guardian... his powers are disappearing...",bc_map,"0x00ff99";
donpcevent instance_npcname("World Tree Yggdrasil#2F", instance_id())+"::OnEnable";
donpcevent instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnDisable";
@@ -2070,7 +2070,7 @@ OnDisable:
OnTimer180000:
set .@rullet,rand(1,4);
if (.@rullet == 1) {
- instance_announce 0, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2079,7 +2079,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 2) {
- instance_announce 0, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2088,7 +2088,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 3) {
- instance_announce 0, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2097,7 +2097,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 4) {
- instance_announce 0, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
@@ -2134,6 +2134,7 @@ OnTimer180000:
switch(select("Please let me out.:I want to look around for a while.")) {
case 1:
set 'ins_nyd2,0;
+ set ins_nyd,203;
//setquest 3135;
warp "nyd_dun02",98,196;
end;
@@ -2149,7 +2150,7 @@ OnInstanceInit:
OnEnable:
enablenpc instance_npcname("World Tree Yggdrasil#2F", instance_id());
- instance_announce 0, "World Tree Yggdrasil : You did good. Have everyone go to the Magic Circle in the middle, and get ready for the destruction of the nest.",bc_map,"0x00ff99";
+ instance_announce -1, "World Tree Yggdrasil : You did good. Have everyone go to the Magic Circle in the middle, and get ready for the destruction of the nest.",bc_map,"0x00ff99";
end;
OnDisable:
@@ -2208,7 +2209,7 @@ OnEnable:
OnMyMobDead:
set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_red_c", instance_id())+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- instance_announce 0, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
+ instance_announce -1, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
donpcevent instance_npcname("nyd_2f_red_c", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnEnable";
end;
@@ -2226,7 +2227,7 @@ OnTimer180000:
stopnpctimer;
set .@rullet,rand(1,4);
if (.@rullet == 1) {
- instance_announce 0, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2235,7 +2236,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 2) {
- instance_announce 0, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2244,7 +2245,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 3) {
- instance_announce 0, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2253,7 +2254,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 4) {
- instance_announce 0, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
@@ -2368,7 +2369,7 @@ OnEnable:
OnMyMobDead:
set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_white_c", instance_id())+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- instance_announce 0, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
+ instance_announce -1, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
donpcevent instance_npcname("nyd_2f_white_c", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnEnable";
end;
@@ -2386,7 +2387,7 @@ OnTimer180000:
stopnpctimer;
set .@rullet,rand(1,4);
if (.@rullet == 1) {
- instance_announce 0, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2395,7 +2396,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 2) {
- instance_announce 0, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2404,7 +2405,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 3) {
- instance_announce 0, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2413,7 +2414,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 4) {
- instance_announce 0, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
@@ -2529,7 +2530,7 @@ OnEnable:
OnMyMobDead:
set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- instance_announce 0, "Nidhoggur's Shadow : You're not bad...but I will be your opponent this time.",bc_map,"0x00ff99";
+ instance_announce -1, "Nidhoggur's Shadow : You're not bad...but I will be your opponent this time.",bc_map,"0x00ff99";
donpcevent instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnEnable";
end;
@@ -2554,7 +2555,7 @@ OnTimer180000:
stopnpctimer;
set .@rullet,rand(1,4);
if (.@rullet == 1) {
- instance_announce 0, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2563,7 +2564,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 2) {
- instance_announce 0, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2572,7 +2573,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 3) {
- instance_announce 0, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2581,7 +2582,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 4) {
- instance_announce 0, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
@@ -2696,7 +2697,7 @@ OnEnable:
OnMyMobDead:
set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_green_c", instance_id())+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- instance_announce 0, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
+ instance_announce -1, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
donpcevent instance_npcname("nyd_2f_green_c", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnEnable";
end;
@@ -2721,7 +2722,7 @@ OnTimer180000:
stopnpctimer;
set .@rullet,rand(1,4);
if (.@rullet == 1) {
- instance_announce 0, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2730,7 +2731,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 2) {
- instance_announce 0, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2739,7 +2740,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 3) {
- instance_announce 0, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
@@ -2748,7 +2749,7 @@ OnTimer180000:
end;
}
else if (.@rullet == 4) {
- instance_announce 0, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
+ instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
diff --git a/npc/instances/OrcsMemory.txt b/npc/instances/OrcsMemory.txt
index a23499d7e..325b1a739 100644
--- a/npc/instances/OrcsMemory.txt
+++ b/npc/instances/OrcsMemory.txt
@@ -309,19 +309,19 @@ OnMyMobDead:
else if ((.@mob_ran > 28) && (.@mob_ran < 30)) {
monster "1@orcs",0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
if (rand(1,10) == 9) {
- instance_announce 0, "High Orc: We need more defenses! Get more people here!",bc_map,"0xff4444";
+ instance_announce -1, "High Orc: We need more defenses! Get more people here!",bc_map,"0xff4444";
}
}
else if ((.@mob_ran > 26) && (.@mob_ran < 29)) {
areamonster "1@orcs",41,91,51,81,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
if (rand(1,10) == 9) {
- instance_announce 0, "Where are the High Orcs!? Get them to stop the enemies!",bc_map,"0xff4444";
+ instance_announce -1, "Where are the High Orcs!? Get them to stop the enemies!",bc_map,"0xff4444";
}
}
else {
areamonster "1@orcs",17,187,27,177,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
if (rand(1,5) == 3) {
- instance_announce 0, "Caution: The army's starting to concentrate at Zone No. 4.",bc_map,"0x77ff77";
+ instance_announce -1, "Caution: The army's starting to concentrate at Zone No. 4.",bc_map,"0x77ff77";
}
if (rand(1,100) == 50) {
initnpctimer;
@@ -331,11 +331,11 @@ OnMyMobDead:
end;
OnTimer10:
- instance_announce 0, "Shouts of the Chief Orc of Safeguards: Looks like this will take longer than expected. Summon the Stalactic Golems!",bc_map,"0xff4444";
+ instance_announce -1, "Shouts of the Chief Orc of Safeguards: Looks like this will take longer than expected. Summon the Stalactic Golems!",bc_map,"0xff4444";
end;
OnTimer4010:
- instance_announce 0, "Stalactic Golems are digging out of the deep underground.",bc_map,"0x77ff77";
+ instance_announce -1, "Stalactic Golems are digging out of the deep underground.",bc_map,"0x77ff77";
areamonster "1@orcs",17,187,27,177,"Stalactic Golem",1278,20,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
stopnpctimer;
end;
@@ -432,7 +432,7 @@ OnMyMobDead:
if (.@mob_dead_num > 0) {
areamonster "1@orcs",43,155,47,159,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
if (rand(1,3) == 3) {
- instance_announce 0, "High Orc: Attack them from behind! Cut off their support!",bc_map,"0xff4444";
+ instance_announce -1, "High Orc: Attack them from behind! Cut off their support!",bc_map,"0xff4444";
}
}
}
@@ -490,39 +490,39 @@ OnEnable:
end;
OnTimer10:
- instance_announce 0, "Kruger: Damn... What took you so long!! I don't have all day!!",bc_map,"0xffff00";
+ instance_announce -1, "Kruger: Damn... What took you so long!! I don't have all day!!",bc_map,"0xffff00";
end;
OnTimer5710:
- instance_announce 0, "Kruger: My plan was to let our comrades open the gate, but it's all ruined since I got busted by the Orc Shaman.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger: My plan was to let our comrades open the gate, but it's all ruined since I got busted by the Orc Shaman.",bc_map,"0xffff00";
end;
OnTimer14610:
- instance_announce 0, "Shouts of the Chief Orc of Safeguards: I smell a rat.. Send some patrols to the entrance!!",bc_map,"0xff4444";
+ instance_announce -1, "Shouts of the Chief Orc of Safeguards: I smell a rat.. Send some patrols to the entrance!!",bc_map,"0xff4444";
end;
OnTimer20210:
- instance_announce 0, "Kruger: Darn it.. They'll be here any minute. Ok. Listen to me now.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger: Darn it.. They'll be here any minute. Ok. Listen to me now.",bc_map,"0xffff00";
end;
OnTimer24910:
- instance_announce 0, "Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the power to unseal the next zone.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the power to unseal the next zone.",bc_map,"0xffff00";
end;
OnTimer34310:
- instance_announce 0, "Kruger: Find those Enchanted Orcs and get rid of them to move to the next zone.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger: Find those Enchanted Orcs and get rid of them to move to the next zone.",bc_map,"0xffff00";
end;
OnTimer39710:
- instance_announce 0, "Kruger: Try to avoid encountering Orcs other then the Enchanted ones. Everytime you kill a normal Orc, High Orcs will gather at the last path to the 2nd floor.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger: Try to avoid encountering Orcs other then the Enchanted ones. Everytime you kill a normal Orc, High Orcs will gather at the last path to the 2nd floor.",bc_map,"0xffff00";
end;
OnTimer49210:
- instance_announce 0, "Kruger: In the worst case, the path to the 2nd floor could be completely blocked. For your own sake, you should be as sneaky as possible.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger: In the worst case, the path to the 2nd floor could be completely blocked. For your own sake, you should be as sneaky as possible.",bc_map,"0xffff00";
end;
OnTimer56310:
- instance_announce 0, "Mission: Sneak in and get rid of the 'Enchanted Orcs'. Avoiding battles with other Orcs is the best way of getting into the 2nd floor.",bc_map,"0x44ffff";
+ instance_announce -1, "Mission: Sneak in and get rid of the 'Enchanted Orcs'. Avoiding battles with other Orcs is the best way of getting into the 2nd floor.",bc_map,"0x44ffff";
donpcevent instance_npcname("#Resurrect Monsters1", instance_id())+"::OnEnable";
donpcevent instance_npcname("#Resurrect Monsters2", instance_id())+"::OnEnable";
donpcevent instance_npcname("#Resurrect Monsters3", instance_id())+"::OnEnable";
@@ -556,11 +556,11 @@ OnContinue:
end;
OnTimer10300:
- instance_announce 0, "Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shaman started to control them with her magic.",bc_map,"0xff4499";
+ instance_announce -1, "Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shaman started to control them with her magic.",bc_map,"0xff4499";
end;
OnTimer18700:
- instance_announce 0, "Kruger's Whisper: There's nothing we can do but to defeat the Orc Shaman if we want to save the remaining tribes.",bc_map,"0xff4499";
+ instance_announce -1, "Kruger's Whisper: There's nothing we can do but to defeat the Orc Shaman if we want to save the remaining tribes.",bc_map,"0xff4499";
stopnpctimer;
end;
}
@@ -585,11 +585,11 @@ OnContinue:
end;
OnTimer30300:
- instance_announce 0, "Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman used those Orcs for her rituals.",bc_map,"0xff4499";
+ instance_announce -1, "Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman used those Orcs for her rituals.",bc_map,"0xff4499";
end;
OnTimer37600:
- instance_announce 0, "Kruger's Whisper: ... It all has to do with me. I am responsible for this evil.",bc_map,"0xff4499";
+ instance_announce -1, "Kruger's Whisper: ... It all has to do with me. I am responsible for this evil.",bc_map,"0xff4499";
stopnpctimer;
end;
}
@@ -614,11 +614,11 @@ OnContinue:
end;
OnTimer30300:
- instance_announce 0, "Please, hang in there!",bc_map,"0xff4499";
+ instance_announce -1, "Please, hang in there!",bc_map,"0xff4499";
end;
OnTimer32700:
- instance_announce 0, "We'll get some rest when we get to the 2nd basement after passing through here.",bc_map,"0xff4499";
+ instance_announce -1, "We'll get some rest when we get to the 2nd basement after passing through here.",bc_map,"0xff4499";
stopnpctimer;
end;
}
@@ -724,13 +724,13 @@ OnMyMobDead:
else if ((.@mob_ran > 26) && (.@mob_ran < 29)) {
areamonster "2@orcs",157,112,167,122,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
if (rand(1,10) == 9) {
- instance_announce 0, "Warning: High Orcs are gathering near area 3.",bc_map,"0xff4444";
+ instance_announce -1, "Warning: High Orcs are gathering near area 3.",bc_map,"0xff4444";
}
}
else {
areamonster "2@orcs",173,13,183,23,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
if (rand(1,5) == 3) {
- instance_announce 0, "Caution: The Forces have started to concentrate at the Shaman's Altar.",bc_map,"0x77ff77";
+ instance_announce -1, "Caution: The Forces have started to concentrate at the Shaman's Altar.",bc_map,"0x77ff77";
}
if (rand(1,70) == 50) {
initnpctimer;
@@ -740,11 +740,11 @@ OnMyMobDead:
end;
OnTimer10:
- instance_announce 0, "Voice from somewhere: Foolish... Do you really think the altar would fall like that?",bc_map,"0xff4444";
+ instance_announce -1, "Voice from somewhere: Foolish... Do you really think the altar would fall like that?",bc_map,"0xff4444";
end;
OnTimer4010:
- instance_announce 0, "[ Wraiths were summoned by an unknown power ]",bc_map,"0x77ff77";
+ instance_announce -1, "[ Wraiths were summoned by an unknown power ]",bc_map,"0x77ff77";
areamonster "2@orcs",167,25,177,35,"Wraith",1475,30,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
stopnpctimer;
end;
@@ -790,7 +790,7 @@ OnMyMobDead:
if (.@mob_dead_num > 0) {
areamonster "2@orcs",168,10,184,26,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
if (rand(1,15) == 3) {
- instance_announce 0, "Warning: Orc Archer teams are gathering near the altar.",bc_map,"0xff4444";
+ instance_announce -1, "Warning: Orc Archer teams are gathering near the altar.",bc_map,"0xff4444";
}
}
}
@@ -848,27 +848,27 @@ OnEnable:
end;
OnTimer10:
- instance_announce 0, "Kruger's Whisper: I'll tell you how to get to the Shaman's altar.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger's Whisper: I'll tell you how to get to the Shaman's altar.",bc_map,"0xffff00";
end;
OnTimer3510:
- instance_announce 0, "Kruger's Whisper: Do you see the braziers that light the path? Unseal the next zone by strengthening their flames.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger's Whisper: Do you see the braziers that light the path? Unseal the next zone by strengthening their flames.",bc_map,"0xffff00";
end;
OnTimer10710:
- instance_announce 0, "Kruger's Whisper: Of course those monsters won't let you touch the braziers that easily.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger's Whisper: Of course those monsters won't let you touch the braziers that easily.",bc_map,"0xffff00";
end;
OnTimer16310:
- instance_announce 0, "Kruger's Whisper: But still, try keep the battles not too noticable so the Shaman won't guard the altar with her army squad.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger's Whisper: But still, try keep the battles not too noticable so the Shaman won't guard the altar with her army squad.",bc_map,"0xffff00";
end;
OnTimer21910:
- instance_announce 0, "Kruger's Whisper: Only the Party Leader can strengthen the flames, so protect your leader.",bc_map,"0xffff00";
+ instance_announce -1, "Kruger's Whisper: Only the Party Leader can strengthen the flames, so protect your leader.",bc_map,"0xffff00";
end;
OnTimer23910:
- instance_announce 0, "Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order, so be careful.",bc_map,"0x4444ff";
+ instance_announce -1, "Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order, so be careful.",bc_map,"0x4444ff";
donpcevent instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnEnable";
donpcevent instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnEnable";
donpcevent instance_npcname("Torch#1-1", instance_id())+"::OnEnable";
@@ -987,7 +987,7 @@ OnInstanceInit:
OnEnable:
monster "2@orcs",109,156,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead1";
- instance_announce 0, "The Chief Orc of Safeguards: Oh!! Looks like I have company. Defeat me if you can!!",bc_map,"0xff8888";
+ instance_announce -1, "The Chief Orc of Safeguards: Oh!! Looks like I have company. Defeat me if you can!!",bc_map,"0xff8888";
end;
OnContinue:
@@ -1108,7 +1108,7 @@ OnInstanceInit:
OnEnable:
monster "2@orcs",67,64,"Orc Sniper",1982,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead2";
- instance_announce 0, "Orc Sniper: Hah! Pretty impressive that you made it this far, but your foolish little trip ends here...",bc_map,"0xff8888";
+ instance_announce -1, "Orc Sniper: Hah! Pretty impressive that you made it this far, but your foolish little trip ends here...",bc_map,"0xff8888";
end;
OnContinue:
@@ -1229,7 +1229,7 @@ OnInstanceInit:
OnEnable:
monster "2@orcs",152,147,"Depraved Orc Spirit",1983,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead3";
- instance_announce 0, "Depraved Orc Spirit: I smell flesh! Hungry! Wanna try some human meat!!",bc_map,"0xff8888";
+ instance_announce -1, "Depraved Orc Spirit: I smell flesh! Hungry! Wanna try some human meat!!",bc_map,"0xff8888";
end;
OnContinue:
@@ -1240,19 +1240,19 @@ OnContinue:
end;
OnTimer10:
- instance_announce 0, "Shaman Cargalache: Hahaha!! So, you finally made it here. The assassin you sent was just terrible. That stupid Orc is getting cold under my feet.",bc_map,"0xffff00";
+ instance_announce -1, "Shaman Cargalache: Hahaha!! So, you finally made it here. The assassin you sent was just terrible. That stupid Orc is getting cold under my feet.",bc_map,"0xffff00";
end;
OnTimer6810:
- instance_announce 0, "Shaman Cargalache: My loyal slave, go get those intruders!",bc_map,"0xffff00";
+ instance_announce -1, "Shaman Cargalache: My loyal slave, go get those intruders!",bc_map,"0xffff00";
end;
OnTimer10310:
- instance_announce 0, "Depraved Orc Hero: Whatever you say, my lord.",bc_map,"0xff7777";
+ instance_announce -1, "Depraved Orc Hero: Whatever you say, my lord.",bc_map,"0xff7777";
end;
OnTimer13110:
- instance_announce 0, "Caution: You have been discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger.",bc_map,"0x8888ff";
+ instance_announce -1, "Caution: You have been discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger.",bc_map,"0x8888ff";
stopnpctimer;
end;
@@ -1278,19 +1278,19 @@ OnMyMobDead:
donpcevent instance_npcname("Kruger#", instance_id())+"::OnEnable";
set .@mob_ran,rand(1,5);
if (.@mob_ran == 1) {
- instance_announce 0, "Shaman Cargalache: How... How could this be... How could someone like you...!!",bc_map,"0xffff00";
+ instance_announce -1, "Shaman Cargalache: How... How could this be... How could someone like you...!!",bc_map,"0xffff00";
}
else if (.@mob_ran == 2) {
- instance_announce 0, "Shaman Cargalache: How is it that I've been overpowered by mere humans!",bc_map,"0xffff00";
+ instance_announce -1, "Shaman Cargalache: How is it that I've been overpowered by mere humans!",bc_map,"0xffff00";
}
else if (.@mob_ran == 3) {
- instance_announce 0, "Shaman Cargalache: This... This can't be the end...",bc_map,"0xffff00";
+ instance_announce -1, "Shaman Cargalache: This... This can't be the end...",bc_map,"0xffff00";
}
else if (.@mob_ran == 4) {
- instance_announce 0, "Shaman Cargalache: I... Can't die... Yet...!",bc_map,"0xffff00";
+ instance_announce -1, "Shaman Cargalache: I... Can't die... Yet...!",bc_map,"0xffff00";
}
else {
- instance_announce 0, "Shaman Cargalache: Defeated by these fools... It can't be happening...!",bc_map,"0xffff00";
+ instance_announce -1, "Shaman Cargalache: Defeated by these fools... It can't be happening...!",bc_map,"0xffff00";
}
donpcevent instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnDisable";
donpcevent instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnDisable";
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index fe376c688..b893a1816 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -263,8 +263,6 @@ monk_test,306,151,3 script Grave of Baphomet#edq 111,{
switch(select("Touch the stone.:Step back.")) {
case 1:
set .@party_id,getcharid(1);
- set .@instance, instance_id(1);
- instance_attach(.@instance);
// 12 hour cooldown
set .@ins_bapho_check,checkquest(3040,PLAYTIME);
@@ -726,7 +724,7 @@ OnDisable:
OnMyMobDead:
if (mobcount("1@cata",instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead") < 1) {
- instance_announce 0, "All apostles of Baphomet are dead!",bc_map,"0x00ff99";
+ instance_announce -1, "All apostles of Baphomet are dead!",bc_map,"0x00ff99";
}
getitem 6002,1; //Token_Of_Apostle
end;
@@ -807,7 +805,7 @@ OnMyMobDead:
mes "[Voice of the Gravestone]";
mes "Now I can substantialize my soul. I'll wait for you in front of the altar of fire located at the center of this grave. Let's meet there.";
next;
- instance_announce 0, "Ancient Hero's Soul : I'll wait for you in front of the altar of fire located at the center",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : I'll wait for you in front of the altar of fire located at the center",bc_map,"0xFFFF00";
mes "I can feel the voice becoming faint.";
close;
}
@@ -1023,7 +1021,7 @@ OnTouch:
mes "[Ancient Hero's Soul]";
mes "Go ahead, warriors.";
cutin "",255;
- instance_announce 0, "Ancient Hero's Soul : Now you can go to the Main Altar's gate. It is located in the Southeast",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : Now you can go to the Main Altar's gate. It is located in the Southeast",bc_map,"0xFFFF00";
close;
}
else if ('ins_baphomet == 4) {
@@ -1178,23 +1176,23 @@ OnDisable:;
end;
OnTimer1800000:
- instance_announce 0, "Ancient Hero's Soul : We don't have enough time! Hurry up!",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : We don't have enough time! Hurry up!",bc_map,"0xFFFF00";
end;
OnTimer2400000:
- instance_announce 0, "Ancient Hero's Soul : My body is disappearing... Hurry up!",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : My body is disappearing... Hurry up!",bc_map,"0xFFFF00";
end;
OnTimer3000000:
- instance_announce 0, "Ancient Hero's Soul : Everything is over... There is no other way but to wait for the next chance...",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : Everything is over... There is no other way but to wait for the next chance...",bc_map,"0xFFFF00";
end;
OnTimer3050000:
- instance_announce 0, "Ancient Hero's Soul : We failed... However... We still have a chance. I hope you will train yourselves until the time comes.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : We failed... However... We still have a chance. I hope you will train yourselves until the time comes.",bc_map,"0xFFFF00";
end;
OnTimer3100000:
- instance_announce 0, "You've failed to open the seal of main altar.",bc_map,"0xFFFF00";
+ instance_announce -1, "You've failed to open the seal of main altar.",bc_map,"0xFFFF00";
end;
OnTimer3500000:
@@ -1221,19 +1219,19 @@ OnDisable:
end;
OnTimer10000:
- instance_announce 0, "Baphomet : Humans... interfering again...",bc_map,"0xdb7093";
+ instance_announce -1, "Baphomet : Humans... interfering again...",bc_map,"0xdb7093";
end;
OnTimer13000:
- instance_announce 0, "Apostle of Baphomet : Humans! Humans have invaded our sanctum!",bc_map,"0xFFFF00";
+ instance_announce -1, "Apostle of Baphomet : Humans! Humans have invaded our sanctum!",bc_map,"0xFFFF00";
end;
OnTimer16000:
- instance_announce 0, "Apostle of Baphomet : Kill the humans! Do not stop the revival of our Master!",bc_map,"0xFFFF00";
+ instance_announce -1, "Apostle of Baphomet : Kill the humans! Do not stop the revival of our Master!",bc_map,"0xFFFF00";
end;
OnTimer18000:
- instance_announce 0, "Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us!",bc_map,"0xFFFF00";
+ instance_announce -1, "Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us!",bc_map,"0xFFFF00";
stopnpctimer;
disablenpc instance_npcname("ins_2f_enter_broad", instance_id());
end;
@@ -1242,7 +1240,7 @@ OnTimer18000:
2@cata,50,67,0 script slave_left -1,5,5,{
OnTouch:
disablenpc instance_npcname("slave_left", instance_id());
- instance_announce 0, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
+ instance_announce -1, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
monster "2@cata",55,67,"Apostle of Baphomet",1869,1;
monster "2@cata",51,67,"Apostle of Baphomet",1291,1;
monster "2@cata",58,67,"Apostle of Baphomet",1292,1;
@@ -1265,7 +1263,7 @@ OnTouch:
2@cata,109,67,0 script slave_right -1,5,5,{
OnTouch:
disablenpc instance_npcname("slave_right", instance_id());
- instance_announce 0, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
+ instance_announce -1, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
monster "2@cata",105,67,"Apostle of Baphomet",1869,1;
monster "2@cata",104,67,"Apostle of Baphomet",1291,1;
monster "2@cata",107,67,"Apostle of Baphomet",1869,1;
@@ -1288,7 +1286,7 @@ OnTouch:
2@cata,79,39,0 script slave_down -1,5,5,{
OnTouch:
disablenpc instance_npcname("slave_down", instance_id());
- instance_announce 0, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
+ instance_announce -1, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
monster "2@cata",78,41,"Apostle of Baphomet",1869,1;
monster "2@cata",79,42,"Apostle of Baphomet",1291,1;
monster "2@cata",78,46,"Apostle of Baphomet",1869,1;
@@ -1330,7 +1328,7 @@ OnTouch:
percentheal -50,0;
sc_start Eff_Stone,20000,0;
setquest 3041;
- instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
+ instance_announce -1, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
mes "I can feel the power of the altar came back by adding magical power.";
next;
mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
@@ -1414,27 +1412,27 @@ OnDisable:
end;
OnTimer3000:
- instance_announce 0, "Ancient Hero's Soul : My God! The seal of the Main Altar is weakening!",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : My God! The seal of the Main Altar is weakening!",bc_map,"0xFFFF00";
end;
OnTimer6000:
- instance_announce 0, "Ancient Hero's Soul : My descendants... Listen carefully to what I'm going to say.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : My descendants... Listen carefully to what I'm going to say.",bc_map,"0xFFFF00";
end;
OnTimer9000:
- instance_announce 0, "Ancient Hero's Soul : The altars that control the Main Altar's power are located in the Northeast, Southeast, Southwest and Northwest corners of this room.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : The altars that control the Main Altar's power are located in the Northeast, Southeast, Southwest and Northwest corners of this room.",bc_map,"0xFFFF00";
end;
OnTimer12000:
- instance_announce 0, "Ancient Hero's Soul : Find these altars and activate their seals before Baphomet revives.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : Find these altars and activate their seals before Baphomet revives.",bc_map,"0xFFFF00";
end;
OnTimer15000:
- instance_announce 0, "Baphomet : It's too late, weaklings... Now, you'll feel the despair of death!",bc_map,"0xdb7093";
+ instance_announce -1, "Baphomet : It's too late, weaklings... Now, you'll feel the despair of death!",bc_map,"0xdb7093";
end;
OnTimer17000:
- instance_announce 0, "Baphomet : No one can harm me here. You will be my first sacrifice.",bc_map,"0xdb7093";
+ instance_announce -1, "Baphomet : No one can harm me here. You will be my first sacrifice.",bc_map,"0xdb7093";
donpcevent instance_npcname("control_baphomet", instance_id())+"::OnEnable";
donpcevent instance_npcname("ins_2f_hero_broad2", instance_id())+"::OnEnable";
stopnpctimer;
@@ -1457,7 +1455,7 @@ OnMyMobDead:
if (mobcount("2@cata",instance_npcname("control_baphomet", instance_id())+"::OnMyMobDead") < 1) {
set 'ins_baphomet,7;
erasequest 3041;
- instance_announce 0, "Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!...",bc_map,"0xdb7093";
+ instance_announce -1, "Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!...",bc_map,"0xdb7093";
enablenpc instance_npcname("Ancient Hero's Soul#2F", instance_id());
disablenpc instance_npcname("slave_down", instance_id());
disablenpc instance_npcname("slave_left", instance_id());
@@ -1486,31 +1484,31 @@ OnDisable:
end;
OnTimer8000:
- instance_announce 0, "Ancient Hero's Soul : Don't be discouraged, Baphomet can still be defeated!",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : Don't be discouraged, Baphomet can still be defeated!",bc_map,"0xFFFF00";
end;
OnTimer11000:
- instance_announce 0, "Ancient Hero's Soul : Go to the altars and activate their seals.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : Go to the altars and activate their seals.",bc_map,"0xFFFF00";
end;
OnTimer13000:
- instance_announce 0, "Ancient Hero's Soul : Once the seals recover their power, Baphomet will be vulnerable.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : Once the seals recover their power, Baphomet will be vulnerable.",bc_map,"0xFFFF00";
end;
OnTimer16000:
- instance_announce 0, "Ancient Hero's Soul : You should lure Baphomet to the unsealed Altars. Otherwise, your efforts will be futile.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : You should lure Baphomet to the unsealed Altars. Otherwise, your efforts will be futile.",bc_map,"0xFFFF00";
end;
OnTimer19000:
- instance_announce 0, "Ancient Hero's Soul : We have only 1 hour to stop Baphomet. If time runs out, the power of the seals will be useless.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : We have only 1 hour to stop Baphomet. If time runs out, the power of the seals will be useless.",bc_map,"0xFFFF00";
end;
OnTimer22000:
- instance_announce 0, "Baphomet : It's useless. Make more seals. I'll crush them all. None of you will survive!",bc_map,"0xdb7093";
+ instance_announce -1, "Baphomet : It's useless. Make more seals. I'll crush them all. None of you will survive!",bc_map,"0xdb7093";
end;
OnTimer26000:
- instance_announce 0, "Ancient Hero's Soul : The magical power of the central seal is running out. Go to the central seal and put the magical power.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : The magical power of the central seal is running out. Go to the central seal and put the magical power.",bc_map,"0xFFFF00";
enablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -1586,11 +1584,11 @@ OnDisable:
end;
OnTimer3600000:
- instance_announce 0, "Baphomet : krrrr... Now you can't stop me with the seals. All you can do is wait for death!",bc_map,"0xdb7093";
+ instance_announce -1, "Baphomet : krrrr... Now you can't stop me with the seals. All you can do is wait for death!",bc_map,"0xdb7093";
end;
OnTimer3605000:
- instance_announce 0, "Ancient Hero's Soul : We can't stop Baphomet with the magical power of the seals anymore. Now everything depends on God...",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : We can't stop Baphomet with the magical power of the seals anymore. Now everything depends on God...",bc_map,"0xFFFF00";
donpcevent instance_npcname("ins_2f_hero_pattern_c", instance_id())+"::OnDisable";
end;
}
@@ -1609,7 +1607,7 @@ OnDisable:
OnTimer70000:
switch(rand(1,5)) {
case 1:
- instance_announce 0, "Ancient Hero's Soul : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!",bc_map,"0xFFFF00";
enablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -1617,7 +1615,7 @@ OnTimer70000:
disablenpc instance_npcname("Magical Seal#10", instance_id());
break;
case 2:
- instance_announce 0, "Ancient Hero's Soul : The magical power of the seal at 2 o'clock is running out. Go to 2 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : The magical power of the seal at 2 o'clock is running out. Go to 2 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
disablenpc instance_npcname("Magical Seal#0", instance_id());
enablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -1625,7 +1623,7 @@ OnTimer70000:
disablenpc instance_npcname("Magical Seal#10", instance_id());
break;
case 3:
- instance_announce 0, "Ancient Hero's Soul : The magical power of the seal at 4 o'clock is running out. Go to 4 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : The magical power of the seal at 4 o'clock is running out. Go to 4 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
disablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
enablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -1633,7 +1631,7 @@ OnTimer70000:
disablenpc instance_npcname("Magical Seal#10", instance_id());
break;
case 4:
- instance_announce 0, "Ancient Hero's Soul : The magical power of the seal at 8 o'clock is running out. Go to 8 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : The magical power of the seal at 8 o'clock is running out. Go to 8 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
disablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -1641,7 +1639,7 @@ OnTimer70000:
disablenpc instance_npcname("Magical Seal#10", instance_id());
break;
case 5:
- instance_announce 0, "Ancient Hero's Soul : The magical power of the seal at 10 o'clock is running out. Go to 10 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ instance_announce -1, "Ancient Hero's Soul : The magical power of the seal at 10 o'clock is running out. Go to 10 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
disablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
diff --git a/npc/jobs/novice/novice.txt b/npc/jobs/novice/novice.txt
deleted file mode 100644
index 4613ebe5d..000000000
--- a/npc/jobs/novice/novice.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-//===== Hercules Script =======================================
-//= New Novice Training Grounds
-//===== By: ==================================================
-//= Streusel
-//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= Hercules
-//===== Description: =========================================
-//= New Novice Training Grounds
-//= [Hand Scripted (No Programs or AEGIS Scripts)]
-//===== Additional Comments: =================================
-//= 1.0 First version. [Streusel]
-//= Credits to whoever made Sprakki.
-//============================================================
-
-// Sprakki (Stard of Novice Training Ground, Outside Castle)
-//============================================================
-- script ::Captain_Carew -1,{
- if(job_novice_q < 1) {
- mes "[Captain Carew]";
- mes "Hello there! Welcome to the World of Ragnarok Online. My name is Captain Carew and I'm in charge of giving you basic gameplay tips.";
- mes "Click on the [Next] button or press [Enter] to continue.";
- next;
- mes "[Captain Carew]";
- mes "First you need to learn the very basics of controlling your character.";
- mes "All the basic ^4A4AFFmoves, selection of items, and attacks^000000 use the ^4A4AFFleft click of the mouse^000000.";
- next;
- cutin "tutorial01",3;
- mes "-! Info !-";
- mes "Click on the ground to move the character.";
- mes "Attacking monsters and conversations with the people of this world can be done by simply clicking on them.";
- next;
- cutin "",255;
- mes "[Captain Carew]";
- mes "First off, try moving around.";
- mes "Do you see that wooden bridge to the right?";
- next;
- setquest 7117;
- set job_novice_q,1;
- mes "[Captain Carew]";
- mes "Walk over that bridge and there's a castle used as the Training Center.";
- mes "I will be waiting for you inside of that Castle. Please come to the castle by yourself.";
- next;
- cutin "tutorial02",3;
- mes "-! Info !-";
- mes "You've received a quest from Sprakki.";
- mes "You can check the contents of the quest in the Quest Info Window.";
- next;
- mes "[Captain Carew]";
- mes "I will wait inside the Training Center across the bridge.";
- next;
- mes "-! Info !-";
- mes "You can open the Quest Info Window by pressing the ^4A4AFFALT + U^000000 keys at the same time.";
- next;
- cutin "",255;
- mes "[Captain Carew]";
- mes "Have you checked the Quest Info Window?";
- mes "I'll be waiting in the castle across the bridge.";
- close;
- }
- mes "[Carew]";
- mes "I'm not sure what's happening, I'm very shy.";
- mes "Meet me in Izlude again.";
- mes "";
- next;
- mes "[Carew]";
- mes "I'm now heading to the local harbor of Izlude.";
- mes "Now, sleep unti we arrive.";
- close;
-}
-
-//Official view id 639
-iz_int01,91,81,4 script ::Rumin 99,{
-close;
-} \ No newline at end of file
diff --git a/npc/merchants/hd_refine.txt b/npc/merchants/hd_refine.txt
new file mode 100644
index 000000000..f944d34ba
--- /dev/null
+++ b/npc/merchants/hd_refine.txt
@@ -0,0 +1,318 @@
+//===== Hercules Script ======================================
+//= HD Refiners
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
+//= [Official Conversion]
+//= Refiners that use HD ores to refine equipment. Upon
+//= failure, the equipment is not destroyed; rather, its
+//= refine level decreases by 1. The success rate is identical
+//= to that for Enriched ores.
+//= - "Blacksmith Mighty Hammer" only refines from +7~9.
+//= - "Basta" only refines from +10 and up.
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy]
+//============================================================
+
+// Blacksmith Mighty Hammer (+7~9)
+//============================================================
+- script ::MightyHammer -1,{
+ disable_items;
+ mes "[Blacksmith Mighty Hammer]";
+ mes "Unlike others, I am a blacksmith who refines a very limited number of items.";
+ mes "I refine only items that are ^CC0000+7 to +9^000000.";
+ next;
+ mes "[Blacksmith Mighty Hammer]";
+ mes "My specialty is that even if my refining fails, the refine level decreases by 1 without losing the gear. Isn't it great?";
+ next;
+ mes "[Blacksmith Mighty Hammer]";
+ mes "So lets kick this into overdrive, what d' ya say? What item do you want to refine?";
+ next;
+ setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
+ set .@menu$,"";
+ for(set .@i,1; .@i<=10; set .@i,.@i+1)
+ set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Not equipped]")+":";
+ set .@part, select(.@menu$);
+ if (!getequipisequiped(.@part)) {
+ mes "[Blacksmith Mighty Hammer]";
+ switch(.@part) {
+ case 1:
+ mes "I'm a blacksmith, not a hairstylist.";
+ break;
+ case 2:
+ mes "With my hammer, I will make you a star of the sky.";
+ break;
+ case 3:
+ case 4:
+ mes "Making artificial hands is not my specialty.";
+ break;
+ case 5:
+ mes "Bring out the item so I can refine it!";
+ break;
+ case 6:
+ mes "Where is this foot order coming from?";
+ break;
+ case 7:
+ case 8:
+ mes "Where is the accessory?";
+ break;
+ case 9:
+ mes "What do you want me to refine?";
+ break;
+ case 10:
+ mes "Huh? What do you want me to do?";
+ break;
+ }
+ close;
+ }
+ if (!getequipisenableref(.@part)) {
+ mes "[Blacksmith Mighty Hammer]";
+ mes "This item can't be refined.";
+ close;
+ }
+ if (!getequipisidentify(.@part)) {
+ mes "[Blacksmith Mighty Hammer]";
+ mes "This item can't be refined because it has not been identified.";
+ close;
+ }
+ if (getequiprefinerycnt(.@part) < 7 || getequiprefinerycnt(.@part) > 9) {
+ mes "[Blacksmith Mighty Hammer]";
+ mes "I only handle items with refine levels from +7 to +9.";
+ close;
+ }
+ switch(getequipweaponlv(.@part)) {
+ default:
+ case 0:
+ set .@price,20000;
+ set .@material,6241; //HD_Elunium
+ break;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ set .@price,20000;
+ set .@material,6240; //HD_Oridecon
+ break;
+ }
+ mes "[Blacksmith Mighty Hammer]";
+ mes "In order to refine the gear you selected you need ^ff9999"+getitemname(.@material)+"^000000 and 20,000 zeny as a fee.";
+ mes "Do you have them ready?";
+ next;
+ if(select("Yes:No") == 2) {
+ mes "[Blacksmith Mighty Hammer]";
+ mes "I will wait until you are ready.";
+ close;
+ }
+ if (getequiprefinerycnt(.@part) < 100) {
+ mes "[Blacksmith Mighty Hammer]";
+ mes "It looks like this item will likely fail to be refined.";
+ mes "Well, even if it fails, it only decreases by 1 refine level.";
+ mes "Would you like to continue refining?";
+ next;
+ if(select("Yes:No") == 2) {
+ mes "[Blacksmith Mighty Hammer]";
+ mes "Only those who overcome fear of failure will obtain a masterpiece.";
+ close;
+ }
+ }
+ if (countitem(.@material) == 0 || Zeny < .@price) {
+ mes "[Blacksmith Mighty Hammer]";
+ mes "Didn't you just say you had everything ready?";
+ close;
+ }
+ delitem .@material,1;
+ set Zeny, Zeny-.@price;
+ mes "[Blacksmith Mighty Hammer]";
+ mes "Tac! Tac! Tac!";
+ if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
+ successrefitem .@part;
+ next;
+ emotion e_no1;
+ mes "[Blacksmith Mighty Hammer]";
+ mes "The sound refreshes my mind everytime I hear it.";
+ mes "Here, have it. Refine succeeded flawlessly!";
+ close;
+ }
+ downrefitem .@part;
+ next;
+ emotion e_omg;
+ mes "[Blacksmith Mighty Hammer]";
+ mes "Oops!!";
+ next;
+ mes "[Blacksmith Mighty Hammer]";
+ mes "I am sure a person like you would never blame me for a decrease in refine level by 1. Hmm.";
+ close;
+}
+prt_in,59,54,3 duplicate(MightyHammer) Mighty Hammer#prt 826
+morocc_in,65,30,3 duplicate(MightyHammer) Mighty Hammer#morocc 826
+payon,148,176,3 duplicate(MightyHammer) Mighty Hammer#pay 826
+alberta_in,16,56,3 duplicate(MightyHammer) Mighty Hammer#alb 826
+yuno_in01,171,18,3 duplicate(MightyHammer) Mighty Hammer#yuno 826
+ein_in01,22,82,3 duplicate(MightyHammer) Mighty Hammer#ein 826
+lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 826
+
+// iRO NPC locations:
+// moc_para01,38,185,4 duplicate(MightyHammer) Mighty Hammer#ed 826
+// payon,174,133,4 duplicate(MightyHammer) Mighty Hammer#im 826
+
+// Basta (+10 and up)
+//============================================================
+- script ::Basta -1,{
+ disable_items;
+ mes "[Basta]";
+ mes "I'm the best Blacksmith in the whole world, Basta.";
+ mes "But I don't provide a normal refine service.";
+ mes "I only refine equipment ^CC0000over +10^000000.";
+ next;
+ mes "[Basta]";
+ mes "Which equipment do you want to refine?";
+ next;
+ setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
+ set .@menu$,"";
+ for(set .@i,1; .@i<=10; set .@i,.@i+1)
+ set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Unequipped]")+":";
+ set .@part, select(.@menu$);
+ if (!getequipisequiped(.@part)) {
+ mes "[Basta]";
+ switch(.@part) {
+ case 1:
+ mes "Is your head an equipment?";
+ break;
+ case 2:
+ mes "What do you want me to do?";
+ break;
+ case 3:
+ case 4:
+ mes "Making artificial hands is not my specialty.";
+ break;
+ case 5:
+ mes "Do you even know what a robe is?";
+ break;
+ case 6:
+ mes "If you want to refine your feet, don't come to me, try running a marathon.";
+ break;
+ case 7:
+ case 8:
+ mes "Where is the accessory?";
+ break;
+ case 9:
+ mes "Well... I don't see any equipment worth refining.";
+ break;
+ case 10:
+ mes "I can't make you smart. Go see a school teacher for that.";
+ break;
+ }
+ close;
+ }
+ if (!getequipisenableref(.@part)) {
+ mes "[Basta]";
+ mes "Even I cannot refine this item. There's no way.";
+ close;
+ }
+ if (!getequipisidentify(.@part)) {
+ mes "[Basta]";
+ mes "I can't do anything about unidentified items.";
+ close;
+ }
+ if (getequiprefinerycnt(.@part) < 10) {
+ mes "[Basta]";
+ mes "Haven't I told you? I only refine equipments that are +10 and above.";
+ close;
+ }
+ if (getequiprefinerycnt(.@part) == 20) {
+ mes "[Basta]";
+ mes "This weapon is perfect, no need to refine it anymore~";
+ close;
+ }
+ switch(getequipweaponlv(.@part)) {
+ default:
+ case 0:
+ set .@price,100000;
+ set .@material,6225; //HD_Carnium
+ set .@type$,"armor";
+ break;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ set .@price,100000;
+ set .@material,6226; //HD_Bradium
+ set .@type$,"weapon";
+ break;
+ }
+ mes "[Basta]";
+ mes "Hmm... is this the one you want to refine?";
+ mes "To refine this equipment, I need 1 ^ff9999"+getitemname(.@material)+"^000000 and 100,000 zeny as a fee.";
+ mes "Do you really want to refine this?";
+ next;
+ if(select("Yes:No") == 2) {
+ mes "[Basta]";
+ mes "Okay. If that's what you want...";
+ close;
+ }
+ if (getequiprefinerycnt(.@part) < 100) {
+ mes "[Basta]";
+ mes "This "+.@type$+" has already been refined pretty high.";
+ mes "If you try to refine it more, the refine level could decrease.";
+ next;
+ mes "[Basta]";
+ mes "I am different from the blacksmiths in others places.";
+ mes "It is impossible that the refine level will drop by, say, 3 or 4... that sounds scary.";
+ mes "Here it can only decrease by 1 level.";
+ next;
+ mes "[Basta]";
+ mes "Compared to other blacksmiths, the risk is smaller.";
+ mes "I've given all precautions. Do you want to try it?";
+ next;
+ if(select("Yes:No") == 2) {
+ mes "[Basta]";
+ mes "Well~";
+ mes "Not challenging at all could also be a kind of wisdom in life.";
+ close;
+ }
+ }
+ if (countitem(.@material) == 0 || Zeny < .@price) {
+ mes "[Basta]";
+ mes "Hmm... You didn't bring all the materials needed.";
+ mes "Come back when you have them all.";
+ close;
+ }
+ delitem .@material,1;
+ set Zeny, Zeny-.@price;
+ mes "Pow! Pow! Pow! Pow!";
+ if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
+ successrefitem .@part;
+ next;
+ emotion e_no1;
+ mes "[Basta]";
+ mes "Great! Nicely done!!";
+ mes "I really am the best blacksmith in the whole wide world!";
+ close;
+ }
+ downrefitem .@part;
+ next;
+ emotion (!rand(5))?e_cash:e_omg;
+ mes "[Basta]";
+ mes "Aaaaaaaaaaak!!!";
+ next;
+ mes "[Basta]";
+ mes "Damn it!";
+ mes "Refining failed and refine level has decreased!";
+ mes "Even the best blacksmith in the world doesn't guarantee 100% success!";
+ mes "Too bad.";
+ next;
+ mes "[Basta]";
+ mes "I'll do better next time! Don't worry!";
+ close;
+}
+prt_in,57,54,3 duplicate(Basta) Basta#prt 826
+morocc_in,68,30,3 duplicate(Basta) Basta#morocc 826
+payon,148,174,3 duplicate(Basta) Basta#payon 826
+alberta_in,18,56,3 duplicate(Basta) Basta#alberta 826
+yuno_in01,173,18,3 duplicate(Basta) Basta#yuno 826
+ein_in01,24,82,3 duplicate(Basta) Basta#einbroch 826
+lhz_in02,280,17,3 duplicate(Basta) Basta#lighthalzen 826 \ No newline at end of file
diff --git a/npc/quests/cooking_quest.txt b/npc/quests/cooking_quest.txt
index df99f2c38..4a5cfcd67 100644
--- a/npc/quests/cooking_quest.txt
+++ b/npc/quests/cooking_quest.txt
@@ -1,15 +1,15 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Cooking Quest
-//===== By: ==================================================
+//===== By: ==================================================
//= Reddozen; L0ne_W0lf
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.8a
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Aegis Conversion]
//= Official Cooking Quest (10.3)
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.1 Fixed wrong item ID, added missing ";, optimized [Lupus]
//= 1.1a minor bugfix, thx 2 Irmin [Lupus]
//= 1.2 Fixed exploit, some typos [Lupus]
@@ -27,7 +27,7 @@
//= 1.7 Replaced effect numerics with constants. [L0ne_W0lf]
//= 1.8 Renamed the variable cooking to cooking_q [ultramage]
//= 1.8a Minor cleaning. [Euphy]
-//============================================================
+//============================================================
prt_castle,43,30,3 script Charles Orleans#cook 878,{
set .@now_weight,MaxWeight-Weight;
diff --git a/npc/quests/doomed_swords.txt b/npc/quests/doomed_swords.txt
index e911abf20..2c443076f 100644
--- a/npc/quests/doomed_swords.txt
+++ b/npc/quests/doomed_swords.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Doomed Swords Quest
//===== By: ==================================================
//= kobra_k88; L0ne_W0lf
//===== Current Version: =====================================
//= 1.6
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Aegis Conversion]
//= Doomed Swords Quest:
diff --git a/npc/quests/doomed_swords_quest.txt b/npc/quests/doomed_swords_quest.txt
index 1fa85fed4..6c723d8aa 100644
--- a/npc/quests/doomed_swords_quest.txt
+++ b/npc/quests/doomed_swords_quest.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Doomed Swords Quest Part 3
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Aegis Conversion]
//= - Creation of Doomed Swords: Grimtooth, Mysteltain, and
diff --git a/npc/quests/first_class/tu_acolyte.txt b/npc/quests/first_class/tu_acolyte.txt
index 017acc7aa..edd9b05c5 100644
--- a/npc/quests/first_class/tu_acolyte.txt
+++ b/npc/quests/first_class/tu_acolyte.txt
@@ -1,13 +1,13 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Acolyte Class Tutorial and Job Specific Quest
//===== By: ==================================================
//= Fix up by Jukka
//===== Current Version: =====================================
//= 1.6a
//===== Compatible With: =====================================
-//= rAthena SVN (Testet in Trunk 88xx)
+//= Hercules
//===== Description: =========================================
-//=
+//= Tutorial for Acolyte Class
//===== Additional Comments: =================================
//= 1.0 Fully working
//= 1.1 optimized [Lupus]
diff --git a/npc/quests/first_class/tu_merchant.txt b/npc/quests/first_class/tu_merchant.txt
index 95810e2c9..c947d0342 100644
--- a/npc/quests/first_class/tu_merchant.txt
+++ b/npc/quests/first_class/tu_merchant.txt
@@ -1,13 +1,13 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Merchant Class Tutorial and Job Specific Quest
//===== By: ==================================================
//= Fix up by Jukka
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN (Testet in Trunk 88xx)
+//= Hercules
//===== Description: =========================================
-//=
+//= Tutorial for Merchant Class
//===== Additional Comments: =================================
//= 1.0 Fully working
//= 1.1 Fixed bugs, optimized [Lupus] 1.2 fixed Weight check
diff --git a/npc/quests/gunslinger_quests.txt b/npc/quests/gunslinger_quests.txt
index d45a09c20..f51dc225c 100644
--- a/npc/quests/gunslinger_quests.txt
+++ b/npc/quests/gunslinger_quests.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Gunslinger quests
//===== By: ==================================================
//= Playtester
//===== Current Version: =====================================
//= 1.6c
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Gunslinger guns and bullet quests
//===== Additional Comments: =================================
diff --git a/npc/quests/juice_maker.txt b/npc/quests/juice_maker.txt
index 1a84a377e..5f92a4829 100644
--- a/npc/quests/juice_maker.txt
+++ b/npc/quests/juice_maker.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Juice Maker Quest
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
//= 2.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Aegis COnversion]
//= Learn where to turn apples, bananas, carrots, and grapes
diff --git a/npc/quests/kiel_hyre_quest.txt b/npc/quests/kiel_hyre_quest.txt
index 4535892c7..3f5a3ddf5 100644
--- a/npc/quests/kiel_hyre_quest.txt
+++ b/npc/quests/kiel_hyre_quest.txt
@@ -1,80 +1,14 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Kiel Hyre Quest
-//===== By: ==================================================
+//===== By: ==================================================
//= L0ne_W0lf (Script), DZeroX (Timer)
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 4.6
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= Quest for opening Robot Factory first and second floors.
//===== Comments: ============================================
-//= See below
-//===== Additional Comments: =================================
-//= 1.0 First version, needs testing [Playtester]
-//= 1.1 Copied over some changes made by -Tsuyuki- [L0ne_W0lf]
-//= Reworked variables slightly so that the permenents ones aside from the
-//= main tracking variable, are deleted when no longer needed. Renamed
-//= several variables that handle strings to @KHInput$. [L0ne_W0lf]
-//= 1.2 Removed duplicate NPCs. [Toms]
-//= 1.3 More Bug fixes, fixed typo. Updated Additional comments. [L0ne_W0lf]
-//= 1.4 Fixed doors not resetting in kh_kiehl01 after 30 second timer is up. [L0ne_W0lf]
-//= 1.5 Another bug fixed (&& instead of ||). [L0ne_W0lf]
-//= 1.6 More squashed bugs with if checking. [L0ne_W0lf]
-//= 1.7 Corrected some spelling mistakes. [Balish]
-// Corrected Exploit with the pub man, giving infinite wine and money.
-// Corrected pool and map not showing text for some states of the quest.
-// Corrected Elly showing cutin but not text for some states of the quest (causing players to log off to continue).
-// Let fisherman talk to you when you have 10 fishes OR MORE.
-// Corrected not letting you enter the tombstone after finishing the quest.
-//= 1.8 Elly now deletes the Iron_Box, and Kiel Hyre deletes the Pin. [L0ne_W0lf]
-//= More security on the 5th Big Door, now makes sure no one outside of who-
-//= acticated it initially can use it. Resets after 10 minutes to make it.
-//= Made it so that you need to be at least step 84 to activate the final door.
-//= Corrected not deleting Allysia's Ring from inventory.
-//= 1.9 Exit will now enable if you are just retrieving the Ring, keeps you from getting stuck. [L0ne_W0lf]
-//= Corrected "KH_Kielh02", was setting off a debug, invalid map index. Should have been "kh_Kiehl02"
-//= Made .KHQuestBusy$ into a temp global variable. $@KHQuestBusy$.
-//= 2.0 Changed the labels on the "Big Doors" to "Identifier Names" to prevent an error with using getvariableofnpc [L0ne_W0lf]
-//= 2.1 Fifth door now checks for a variable HIGHER or EQUAL to 74 not 84, as pointed out by Stollen. [L0ne_W0lf]
-//= 2.2 Another fix for Elly, no longer RESETS to 26 when you talk to her. [L0ne_W0lf]
-//= 2.3 Should NOT have been setting .KHQuestBusy at all. It's not used or accessed anymore. Removed. [L0ne_W0lf]
-//= 2.4 Lots of fixes (4ish) from Valandi. [L0ne_W0lf]
-//= Added a getmapuser check to the mapwarp in KHTimerEnd so it's not trying to warp out 0 users. [L0ne_W0lf]
-//= 2.5 Fixed several small issues (and large one) such as typos in cutins, typos in dialog, etc. [L0ne_W0lf]
-//= Added some of the missing dialogs for several NPCs, and fixed a few NPC locations.
-//= ALL books can now trigger the wall.
-//= Allysia will now summon 4 (was 2) G_CONSTANTS instead of REGULAR constants.
-//= Fixed where Golden_Key and Kiel_Button are deleted.
-//= Removed KHTimerEnd, and instead use OnReset.
-//= Fixed typo in the second NPC that gives Black Keycards.
-//= Added Monster Warps. (Keeps monsters from being in dungeon quest area.) [Non-functional]
-//= 2.6 Stupid mistake, accidentally had 4 copies of the same script in 1... [L0ne_W0lf the bonehead]
-//= 2.7 Fixed the wrong name being displayed for Kiel Hyre in one dialog.
-//= Removed $@KH_DoorInvoker entirely. The quest is now working like it should according to iRO.
-//= Fixed up a few more NPC headers. Facing direction fixes mostly this time.
-//= More progression changes to Kiehl Hyre. He no longer stops dialog after the agents appear.
-//= 2.8 Fixed the weight checking in Vandt, and added official dialog. [L0ne_W0lf]
-//= Added weight checks for all NPCs that give items. Semi-official dialog.
-//= Got the missing portion of dialog for Mills'.
-//= Will add further proper dialogs as I get to them on the second runthrough of the quest.
-//= 2.8a minor optimization with extra goto, else or empty switch [Lupus]
-//= 2.9 Fixed the "enablenpc" problem with the missing spaces. No idea how it happened. [L0ne_W0lf]
-//= 3.0 Fixed a typo in Elly, in her room. (was <= should have been <) [L0ne_W0lf]
-//= Added an 'end;' to the cookie basket. Kiel Hyre's final dialog will now delete all quest-related items.
-//= 3.1 Moved the "delitem" for all related quest items to the proper NPC. [L0ne_W0lf]
-//= 3.2 Fixed error with Allysia teling you to "Go away." maybe. [L0ne_W0lf]
-//= 3.2b Fixed some typos and grammar mistakes. [SinSloth]
-//= 3.3 Fixed the receiver log out bugs. [L0ne_W0lf]
-//= 3.4 Fixed bug when u can't get a Yellow Keycard if u got the Blue one at first [Lupus]
-//= Note: There are many condition checks that should be omitted in the future fixed item names in item_db.txt / txt resources according the quest
-//= for items, should be used bitwise methods in a single variable. So let's fix the rest possible bugs (if they exist) and then optimize ^_-
-//= 3.5 Changed the way the Black Keycard distibuting NPCs work slighty. [L0ne_W0lf]
-//= 3.6 Keil Hyre removes ALL outstanding quest items when he is talked [L0ne_W0lf]
-//= to after finishing the quest.
-//= 3.7 Corrected NPC names to fall within proper restrictions. [L0ne_W0lf]
-//= 3.8 Corrected some delitems. (bugreport:690) [Samuray22]
-//= 3.9 Fixed a cutin not being erased. (bugreport:1539) [L0ne_W0lf]
//= 4.0 A whole bunch-a-updates to various npcs. [L0ne_W0lf]
//= Corrected condition checks throughout the quest.
//= Npcs no longer make use of the goto command.
@@ -7233,3 +7167,68 @@ OnInit:
}
//============================================================================
+//===== Additional Comments: ============================================
+//= 1.0 First version, needs testing [Playtester]
+//= 1.1 Copied over some changes made by -Tsuyuki- [L0ne_W0lf]
+//= Reworked variables slightly so that the permenents ones aside from the
+//= main tracking variable, are deleted when no longer needed. Renamed
+//= several variables that handle strings to @KHInput$. [L0ne_W0lf]
+//= 1.2 Removed duplicate NPCs. [Toms]
+//= 1.3 More Bug fixes, fixed typo. Updated Additional comments. [L0ne_W0lf]
+//= 1.4 Fixed doors not resetting in kh_kiehl01 after 30 second timer is up. [L0ne_W0lf]
+//= 1.5 Another bug fixed (&& instead of ||). [L0ne_W0lf]
+//= 1.6 More squashed bugs with if checking. [L0ne_W0lf]
+//= 1.7 Corrected some spelling mistakes. [Balish]
+// Corrected Exploit with the pub man, giving infinite wine and money.
+// Corrected pool and map not showing text for some states of the quest.
+// Corrected Elly showing cutin but not text for some states of the quest (causing players to log off to continue).
+// Let fisherman talk to you when you have 10 fishes OR MORE.
+// Corrected not letting you enter the tombstone after finishing the quest.
+//= 1.8 Elly now deletes the Iron_Box, and Kiel Hyre deletes the Pin. [L0ne_W0lf]
+//= More security on the 5th Big Door, now makes sure no one outside of who-
+//= acticated it initially can use it. Resets after 10 minutes to make it.
+//= Made it so that you need to be at least step 84 to activate the final door.
+//= Corrected not deleting Allysia's Ring from inventory.
+//= 1.9 Exit will now enable if you are just retrieving the Ring, keeps you from getting stuck. [L0ne_W0lf]
+//= Corrected "KH_Kielh02", was setting off a debug, invalid map index. Should have been "kh_Kiehl02"
+//= Made .KHQuestBusy$ into a temp global variable. $@KHQuestBusy$.
+//= 2.0 Changed the labels on the "Big Doors" to "Identifier Names" to prevent an error with using getvariableofnpc [L0ne_W0lf]
+//= 2.1 Fifth door now checks for a variable HIGHER or EQUAL to 74 not 84, as pointed out by Stollen. [L0ne_W0lf]
+//= 2.2 Another fix for Elly, no longer RESETS to 26 when you talk to her. [L0ne_W0lf]
+//= 2.3 Should NOT have been setting .KHQuestBusy at all. It's not used or accessed anymore. Removed. [L0ne_W0lf]
+//= 2.4 Lots of fixes (4ish) from Valandi. [L0ne_W0lf]
+//= Added a getmapuser check to the mapwarp in KHTimerEnd so it's not trying to warp out 0 users. [L0ne_W0lf]
+//= 2.5 Fixed several small issues (and large one) such as typos in cutins, typos in dialog, etc. [L0ne_W0lf]
+//= Added some of the missing dialogs for several NPCs, and fixed a few NPC locations.
+//= ALL books can now trigger the wall.
+//= Allysia will now summon 4 (was 2) G_CONSTANTS instead of REGULAR constants.
+//= Fixed where Golden_Key and Kiel_Button are deleted.
+//= Removed KHTimerEnd, and instead use OnReset.
+//= Fixed typo in the second NPC that gives Black Keycards.
+//= Added Monster Warps. (Keeps monsters from being in dungeon quest area.) [Non-functional]
+//= 2.6 Stupid mistake, accidentally had 4 copies of the same script in 1... [L0ne_W0lf the bonehead]
+//= 2.7 Fixed the wrong name being displayed for Kiel Hyre in one dialog.
+//= Removed $@KH_DoorInvoker entirely. The quest is now working like it should according to iRO.
+//= Fixed up a few more NPC headers. Facing direction fixes mostly this time.
+//= More progression changes to Kiehl Hyre. He no longer stops dialog after the agents appear.
+//= 2.8 Fixed the weight checking in Vandt, and added official dialog. [L0ne_W0lf]
+//= Added weight checks for all NPCs that give items. Semi-official dialog.
+//= Got the missing portion of dialog for Mills'.
+//= Will add further proper dialogs as I get to them on the second runthrough of the quest.
+//= 2.8a minor optimization with extra goto, else or empty switch [Lupus]
+//= 2.9 Fixed the "enablenpc" problem with the missing spaces. No idea how it happened. [L0ne_W0lf]
+//= 3.0 Fixed a typo in Elly, in her room. (was <= should have been <) [L0ne_W0lf]
+//= Added an 'end;' to the cookie basket. Kiel Hyre's final dialog will now delete all quest-related items.
+//= 3.1 Moved the "delitem" for all related quest items to the proper NPC. [L0ne_W0lf]
+//= 3.2 Fixed error with Allysia teling you to "Go away." maybe. [L0ne_W0lf]
+//= 3.2b Fixed some typos and grammar mistakes. [SinSloth]
+//= 3.3 Fixed the receiver log out bugs. [L0ne_W0lf]
+//= 3.4 Fixed bug when u can't get a Yellow Keycard if u got the Blue one at first [Lupus]
+//= Note: There are many condition checks that should be omitted in the future fixed item names in item_db.txt / txt resources according the quest
+//= for items, should be used bitwise methods in a single variable. So let's fix the rest possible bugs (if they exist) and then optimize ^_-
+//= 3.5 Changed the way the Black Keycard distibuting NPCs work slighty. [L0ne_W0lf]
+//= 3.6 Keil Hyre removes ALL outstanding quest items when he is talked [L0ne_W0lf]
+//= to after finishing the quest.
+//= 3.7 Corrected NPC names to fall within proper restrictions. [L0ne_W0lf]
+//= 3.8 Corrected some delitems. (bugreport:690) [Samuray22]
+//= 3.9 Fixed a cutin not being erased. (bugreport:1539) [L0ne_W0lf] \ No newline at end of file
diff --git a/npc/quests/lvl4_weapon_quest.txt b/npc/quests/lvl4_weapon_quest.txt
index 58945768a..cfb7e50ac 100644
--- a/npc/quests/lvl4_weapon_quest.txt
+++ b/npc/quests/lvl4_weapon_quest.txt
@@ -1,15 +1,15 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Grade A and Grade S weapon quests
-//===== By: ==================================================
+//===== By: ==================================================
//= Vicious_Pucca, Reddozen & MasterOfMuppets
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.6
-//===== Compatible With: =====================================
-//= rAthena SVN 3422+(Requires jA Script System)
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Aegis Conversion]
//= Grade A and Grade S weapon quests
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First Version, Credits goes to Vicious_Pucca for converting [MasterOfMuppets]
//= the quest from aegis format to eA format. Also thanks to
//= reddozen for fixing bugs.
@@ -20,7 +20,7 @@
//= 1.4 Fixed bad NPC header data to comply with rev. 11603. [L0ne_W0lf]
//= 1.5 Rescripted to Aegis 10.3 standards. [L0ne_W0lf]
//= 1.6 Was using the wrong IDs for the ores needed. [L0ne_W0lf]
-//============================================================
+//============================================================
umbala,117,285,3 script Bazo#lv4 85,{
if (checkweight(908,300) == 0) {
diff --git a/npc/quests/quests_13_1.txt b/npc/quests/quests_13_1.txt
index d585fc6ca..78c843ae5 100644
--- a/npc/quests/quests_13_1.txt
+++ b/npc/quests/quests_13_1.txt
@@ -4783,7 +4783,7 @@ mid_camp,240,270,3 script Botanist#ep13 750,{
mid_camp,336,171,1 script Camp Guard#man1 852,{
if (ep13_animal == 0) {
- if (ep13_newbs == 6 || ep13_newbs == 19) goto OnHalt;
+ if (ep13_newbs == 6 || ep13_newbs == 19 || ep13_start == 100) goto OnHalt;
else {
mes "[Camp Guard]";
mes "Stop!";
@@ -4877,7 +4877,7 @@ OnHalt:
mid_camp,13,143,5 script Camp Guard#man2 852,{
if (ep13_animal == 0) {
- if (ep13_newbs == 6 || ep13_newbs == 19) goto OnHalt;
+ if (ep13_newbs == 6 || ep13_newbs == 19 || ep13_start == 100) goto OnHalt;
else {
mes "[Camp Guard]";
mes "Stop!";
@@ -4939,7 +4939,7 @@ OnHalt:
mid_camp,9,215,5 script Camp Guard#man3 852,{
if (ep13_animal == 0) {
- if (ep13_newbs == 6 || ep13_newbs == 19) goto OnHalt;
+ if (ep13_newbs == 6 || ep13_newbs == 19 || ep13_start == 100) goto OnHalt;
else {
mes "[Camp Guard]";
mes "Stop!";
diff --git a/npc/quests/quests_13_2.txt b/npc/quests/quests_13_2.txt
index 1da301ac9..de8f86970 100644
--- a/npc/quests/quests_13_2.txt
+++ b/npc/quests/quests_13_2.txt
@@ -3324,23 +3324,23 @@ mid_camp,192,239,4 script Wanted Sign#ep13_2ect01 857,{
if ((ep13_2_dayegg == 1) && (countitem(6093) < 10)) {
mes "We just got fresh eggs from the dragon nest.";
getitem 6093,1; //Egg_Of_Draco
- disablenpc strnpcinfo(1);
+ disablenpc strnpcinfo(0);
initnpctimer;
close;
}
end;
OnTimer420000:
- enablenpc strnpcinfo(1);
+ enablenpc strnpcinfo(0);
stopnpctimer;
end;
OnEnable:
- enablenpc strnpcinfo(1);
+ enablenpc strnpcinfo(0);
end;
OnDisable:
- disablenpc strnpcinfo(1);
+ disablenpc strnpcinfo(0);
end;
}
@@ -3560,7 +3560,7 @@ OnTimer300000:
// Otherworld language
//============================================================
mid_camp,197,237,3 script Schwartzvalt Mechanic#1 869,{
- if (ep13_1_edq > 2) {
+ if (ep13_1_edq > 2 || ep13_start == 100) {
if (ep13_2_rhea < 1) {
mes "[Mechanic Engineer Dorance]";
mes "Do you know about the Ring of the Ancient Wise King? If you wear that Ring, you can talk to animals.";
diff --git a/npc/quests/seals/god_global.txt b/npc/quests/seals/god_global.txt
index c08ccb6f2..817255060 100644
--- a/npc/quests/seals/god_global.txt
+++ b/npc/quests/seals/god_global.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Variable Management NPC for the god item quest
//===== By: ==================================================
//= MasterOfMuppets
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena
+//= Hercules
//===== Description: =========================================
//= Use this NPC if the seals quest variables get messed up.
//===== Additional Comments: =================================
diff --git a/npc/quests/seals/god_weapon_creation.txt b/npc/quests/seals/god_weapon_creation.txt
index 3f7cb40ea..e0e5845d5 100644
--- a/npc/quests/seals/god_weapon_creation.txt
+++ b/npc/quests/seals/god_weapon_creation.txt
@@ -1,13 +1,13 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= God items creation NPCs
-//===== By: ==================================================
+//===== By: ==================================================
//= SinSloth
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.2
-//===== Compatible With: =====================================
-//= rAthena
-//===== Description: =========================================
-//=
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
+//= NPC that creates God Items
//===== Additional Comments: =================================
//= 1.0 First version. Thanks to SinSloth for scripting it. [MasterOfMuppets]
//= 1.1 Updated several aspects of the script. [L0ne_W0lf]
diff --git a/npc/quests/skills/archer_skills.txt b/npc/quests/skills/archer_skills.txt
index 4b140e7fb..763ffff06 100644
--- a/npc/quests/skills/archer_skills.txt
+++ b/npc/quests/skills/archer_skills.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Archer Skill Quest
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Current Version: =====================================
//= 1.7
//===== Description: =========================================
diff --git a/npc/quests/skills/knight_skills.txt b/npc/quests/skills/knight_skills.txt
index 07bcfb03d..83574900a 100644
--- a/npc/quests/skills/knight_skills.txt
+++ b/npc/quests/skills/knight_skills.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Knight Skills Quests
//===== By: ==================================================
//= Lupus, Reddozen, Samuray22
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Aegis Conversion]
//= Quests for skills: Charge Attack
diff --git a/npc/quests/skills/wizard_skills.txt b/npc/quests/skills/wizard_skills.txt
index 070c024bd..1d7093a03 100644
--- a/npc/quests/skills/wizard_skills.txt
+++ b/npc/quests/skills/wizard_skills.txt
@@ -1,15 +1,15 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Wizard Skills Quests
-//===== By: ==================================================
+//===== By: ==================================================
//= Lupus, Reddozen
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.5
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Aegis Conversion]
//= Quests for skills: Sight Blaster
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.4 Rescripted to Aegis 10.3 stadards. [L0ne_W0lf]
//= 1.5 Replaced effect numerics with constants. [L0ne_W0lf]
//============================================================
diff --git a/npc/re/airports/izlude.txt b/npc/re/airports/izlude.txt
index bf5cabdf3..67b9e988d 100644
--- a/npc/re/airports/izlude.txt
+++ b/npc/re/airports/izlude.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Izlude Airport NPCs
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Description: =========================================
//= Izlude Airport NPCs
//===== Additional Comments: =================================
diff --git a/npc/re/cities/dewata.txt b/npc/re/cities/dewata.txt
index 88b7f6a4e..6bbbfeb4e 100644
--- a/npc/re/cities/dewata.txt
+++ b/npc/re/cities/dewata.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Dewata Town
//===== By: ==================================================
//= Gennosuke Kouga, Muad_Dib
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Dewata Town Script
//===== Additional Comments: =================================
diff --git a/npc/re/cities/dicastes.txt b/npc/re/cities/dicastes.txt
index 6bab75559..5fd555b8f 100644
--- a/npc/re/cities/dicastes.txt
+++ b/npc/re/cities/dicastes.txt
@@ -1,14 +1,14 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= El Dicastes Town
-//===== By: ==================================================
+//===== By: ==================================================
//= Gennosuke Kouga, Muad_Dib
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.2a
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= El Dicastes Town Script
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First version.
//= 1.1 Standardized. [Euphy]
//= 1.2 Updated to match the official script. [Joseph]
diff --git a/npc/re/cities/izlude.txt b/npc/re/cities/izlude.txt
index b328edbf8..d2ac40e80 100644
--- a/npc/re/cities/izlude.txt
+++ b/npc/re/cities/izlude.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Izlude Town Renewal
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Izlude town NPCs.
//===== Additional Comments: =================================
diff --git a/npc/re/cities/malangdo.txt b/npc/re/cities/malangdo.txt
index f6fd3f14d..0ee7ca8be 100644
--- a/npc/re/cities/malangdo.txt
+++ b/npc/re/cities/malangdo.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Malangdo Town
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Malangdo Town Script
//===== Additional Comments: =================================
diff --git a/npc/re/cities/malaya.txt b/npc/re/cities/malaya.txt
new file mode 100644
index 000000000..3daff8526
--- /dev/null
+++ b/npc/re/cities/malaya.txt
@@ -0,0 +1,1520 @@
+//===== Hercules Script =======================================
+//= Port Malaya NPC's
+//===== By: ==================================================
+//= Masao
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
+//= Many Port Malaya NPC's & Quests.
+//===== Additional Comments: =================================
+//= 1.0 First Version.
+//============================================================
+
+malaya,276,55,4 script Optamara Crew#malaya 100,{
+
+ if (malaya_hi < 10) {
+ mes "[Optamara Crew]";
+ mes "I think the village is still busy. Done with your visit? There is always a ship heading for Alberta.";
+ next;
+ }
+ else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ mes "[Optamara Crew]";
+ mes "I think a nameless adventurer helped take a load off the villagers mind. Yahoo! Would you like to go back to Alberta?";
+ next;
+ }
+ else {
+ mes "[Optamara Crew]";
+ mes "Would you like to go back to Alberta with me?";
+ next;
+ }
+ switch (select("Return.:Do not return.")) {
+ case 1:
+ mes "[Optamara Crew]";
+ mes "Great! Lets leave now for Alberta!!";
+ close2;
+ warp "alberta",239,68;
+ end;
+ case 2:
+ mes "[Optamara Crew]";
+ mes "Thats okay. Come here if you ever want to go back to Alberta.";
+ close;
+ }
+}
+
+alberta,237,71,3 script Optamara Crew#alberta 100,{
+
+ mes "[Optamara Crew]";
+ mes "Hey, there!";
+ mes "Its 10,000 Zeny to go to Port Malaya. Interested?";
+ next;
+ switch (select("About Port Malaya:Go to Port Malaya.:Cancel.")) {
+ case 1:
+ mes "[Optamara Crew]";
+ mes "Port Malaya is a small village you could reach by sailing southwest from Alberta.";
+ next;
+ mes "[Optamara Crew]";
+ mes "I couldnt visit the village because they had some issues there but now it seems all is clear!";
+ next;
+ mes "[Optamara Crew]";
+ mes "I dont know for sure but it was a village that's like a comfortable and cozy park.";
+ next;
+ mes "[Optamara Crew]";
+ mes "I was this close to not coming back to cozy Alberta again.";
+ next;
+ mes "[Optamara Crew]";
+ mes "Im sure youll feel the same once you reach Port Malaya.";
+ close;
+ case 2:
+ if (Zeny > 9999) {
+ set Zeny, Zeny - 10000;
+ mes "[Optamara Crew]";
+ mes "Great!";
+ mes "Heading for Port Malaya!!";
+ close2;
+ warp "Malaya",271,55;
+ end;
+ }
+ mes "[Optamara Crew]";
+ mes "Oh God!!";
+ mes "You dont know how far it is from here. Of course its not free. Please come back with 10,000 Zeny. Sorry!";
+ close;
+ case 3:
+ mes "[Optamara Crew]";
+ mes "Adventurers these days act like they are busy. Come back when you have the time and we could go visit Port Malaya together.";
+ close;
+ }
+}
+
+ma_in01,30,94,4 script Inn Keeper#ma 583,{
+
+ if (malaya_hi < 10) {
+ mes "[Inn Keeper]";
+ mes "Oh my! Visiting?";
+ mes "What bad timing. The village is a bit unorganized at the moment so Im actually closed. Sorry.";
+ close;
+ }
+ else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ mes "[Inn Keeper]";
+ mes "So you are the adventurer villagers are talking about? I reopened my inn thanks to you. Thank you.";
+ next;
+ }
+ else {
+ mes "[Inn Keeper]";
+ mes "Welcome.";
+ mes "This is Port Malaya's best inn, 'Cabin in the City'.";
+ next;
+ }
+ mes "[Inn Keeper]";
+ mes "Come for a rest? Lodging will be 5,000 Zeny.";
+ next;
+ switch (select("Store.:Lodge. - 5,000z:Cancel.")) {
+ case 1:
+ mes "[Inn Keeper]";
+ mes "Successfully stored. See you next time.";
+ savepoint "ma_in01",43,98;
+ close;
+ case 2:
+ if (Zeny < 5000) {
+ mes "[Inn Keeper]";
+ mes "Sorry. I think you are a bit short.";
+ close;
+ }
+ mes "[Inn Keeper]";
+ mes "Hope you enjoy your stay.";
+ close2;
+ set Zeny, Zeny - 5000;
+ percentheal 100,100;
+ warp "ma_in01",43,98;
+ end;
+ case 3:
+ close;
+ }
+}
+
+ma_fild01,166,214,6 script Old Man in Dilemma#GA 575,{
+
+ if (MaxWeight - Weight < 600 || checkweight(1201,1) == 0) {
+ mes "Cannot proceed because you have too many items in your possession.";
+ close;
+ }
+ mes "[Old Man in Dilemma]";
+ mes "Oh! Demons are gaining more and more power in this world.";
+ next;
+ switch (select("We need to gather items to fight them off.:Ignore.")) {
+ case 1:
+ if ((countitem(6497) > 2) && (Zeny > 999)) {
+ mes "[Old Man in Dilemma]";
+ mes "You dont seem to be strong enough to fight off demons.";
+ next;
+ mes "[Old Man in Dilemma]";
+ mes "Will you create a Greater Agimat of Ancient Spirit with 3 Lesser Agimats and 1,000 Zeny?";
+ next;
+ switch (select("Create.:No, thank you.")) {
+ case 1:
+ if ((countitem(6497) > 2) && (Zeny > 999)) {
+ specialeffect2 EF_CONE;
+ specialeffect EF_FORESTLIGHT2;
+ set Zeny, Zeny - 1000;
+ getitem 12775,1; //Ancient_Spirit_Amulet
+ mes "[Old Man in Dilemma]";
+ mes "Hope you win the fight with the demon.";
+ close;
+ }
+ mes "[Old Man in Dilemma]";
+ mes "Short on materials.";
+ close;
+ case 2:
+ mes "[Old Man in Dilemma]";
+ mes "Hope you win the fight with the demon.";
+ close;
+ }
+ }
+ mes "[Old Man in Dilemma]";
+ mes "Cant make it now but there is an old way of making it handed down by generations.";
+ next;
+ mes "[Old Man in Dilemma]";
+ mes "You need to call upon the power of Ancient Spirits. But youll need several important materials first.";
+ next;
+ select("What are they?");
+ mes "[Old Man in Dilemma]";
+ mes "3 Lesser Agimats to hold the power of Ancient Spirits here and another special material handed down for generations.";
+ next;
+ mes "[Old Man in Dilemma]";
+ mes "But nobody can get this special item anymore.";
+ next;
+ select("Something money cannot buy?");
+ mes "[Old Man in Dilemma]";
+ mes "No, no... It's this round little thing, you see?";
+ next;
+ select("Are you talking about Zeny?");
+ mes "[Old Man in Dilemma]";
+ mes "Looks similar to the special items handed down from generations.";
+ next;
+ mes "[Old Man in Dilemma]";
+ mes "As long as we have enough of that, we could make the Greater Agimat of Ancient Spirit to fight against the demons.";
+ next;
+ select("Sounds good.");
+ mes "[Old Man in Dilemma]";
+ mes "In case you are too weary to take on the demons";
+ next;
+ mes "[Old Man in Dilemma]";
+ mes "come by with 3 Lesser Agimats and 1,000 of those so called Zeny.";
+ next;
+ mes "[Old Man in Dilemma]";
+ mes "I will make a Greater Agimat of Ancient Spirit that will increase your attacks against demons by 10% for 20 min.";
+ close;
+ case 2:
+ mes "[Old Man in Dilemma]";
+ mes "Hope you win the fight with the demon.";
+ close;
+ }
+}
+
+ma_fild01,238,198,4 script Tikbalang Expert#malaya 582,{
+
+ if (MaxWeight - Weight < 50 || checkweight(1201,1) == 0) {
+ mes "Cannot proceed because you have too many items in your possession.";
+ close;
+ }
+ mes "[Tikbalang Expert]";
+ mes "Ive spent 90% of my life studying Tikbalang.";
+ next;
+ switch (select("But you look young?:What is Tikbalang?:Teach me how to catch a Tikbalang.")) {
+ case 1:
+ mes "[Tikbalang Expert]";
+ mes "What! I might be imagining things.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "I look younger than I am because of my baby face. Ha ha ha";
+ next;
+ select("... ... ...");
+ mes "[Tikbalang Expert]";
+ mes "Trust!! They say faith will bring you luck.";
+ close;
+ case 2:
+ mes "[Tikbalang Expert]";
+ mes "Ha ha... You ask the right question.";
+ mes "Im a specialist in that field. Ask me anything.";
+ next;
+ select("Why wont you answer me?");
+ mes "[Tikbalang Expert]";
+ mes "Have you... ever been fooled by anyone around you? Why cant you believe someones word for it? Really, ask me anything.";
+ next;
+ while (.@loop != 1) {
+ switch (select("I don't have any questions.:Characteristics?:Features?:Rumors?:Habitat?")) {
+ case 1:
+ set .@loop,1;
+ break;
+ case 2:
+ mes "[Tikbalang Expert]";
+ mes "Tikbalangs have a way to confuse travelers when they meet them by making them turn in circles regardless of wherever and how far they travel.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "They are mischievous creatures.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "But of course there is a way to stop their pranks. You know about the Inside-out Shirt? You can either wear your top inside-out.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Or go on your way quietly without disrupting the Tikbalangs.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Ha ha ha ha But everyone knows adventurers are never quiet while they travel, right?";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Never...";
+ set .@loop,2;
+ next;
+ break;
+ case 3:
+ mes "[Tikbalang Expert]";
+ mes "They say Tikbalangs have several distinctions.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "First, they are very tall ^AAAAAA(tsk.. wish I were tall)^000000 and have skinny, imbalanced legs and arms. Looks almost like a human but their knees are higher than their upper body when they sit down,";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Second, is the standard characteristics acknowledged by the association. They have heads and foot like a horse.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "So with all these appearance treats, Tikbalang is sometimes called the creature from hell.";
+ set .@loop,3;
+ next;
+ break;
+ case 4:
+ mes "[Tikbalang Expert]";
+ mes "There are several fun rumors about Tikbalangs.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "One of them is about Tikbalangs being the guardians of some kingdom that worships nature.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "So the Tikbalangs will trick travelers who come with bad intentions to the kingdom by making them travel in circles.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Another rumor is that people around here say that 'if it rains on a clear day, then it must be Tikbalang's wedding day'.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "The association speculates that sayings like 'it rains on Bathorys wedding day' or 'it rains on Moonlight Flowers wedding day' might have derived from the Tikbalangs saying.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Lastly, ancient fairy tales say that Tikbalangs can transform into human form or even make themselves transparent but nobody has verified this yet.";
+ set .@loop,4;
+ next;
+ break;
+ case 5:
+ mes "[Tikbalang Expert]";
+ mes "Tikbalangs usually live in dark, busy places where there arent many people around.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Hmm... For example, they are known to live beneath bridges, in banana and bamboo forests and beneath large trees.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "And this is just my opinion but wouldnt you agree that they are living in dark places because it is easier to play pranks on people?";
+ set .@loop,5;
+ next;
+ break;
+ }
+ }
+ mes "[Tikbalang Expert]";
+ mes "I think this is enough explanation for now. You wouldnt understand other highly sophisticated topics with specific terminology and all anyway.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Oh! Do you have any other questions?";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "What do you think? Impressed at how much I know? Come by anytime when you have any more questions.";
+ close;
+ case 3:
+ mes "[Tikbalang Expert]";
+ mes "Ha ha ha. Do you now know how great I am?";
+ next;
+ if ((countitem(6496) > 2) && (countitem(6497) > 4)) {
+ mes "[Tikbalang Expert]";
+ mes "Oh! Isnt this material to make 'Tikbalang Belt' used to tame Tikbalangs?";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "The '^F80835Tikbalang Belt ^000000' is used to capture Tikbalangs without the hassle. But that doesnt mean its 100% successful. Interested? Do you want me to make one for you?";
+ next;
+ switch (select("Yes, Im interested.:No, I can capture one myself.")) {
+ case 1:
+ delitem 6496,3; //Tikbalang_Thick_Spine
+ getitem 12699,1; //Tikbalang_Belt
+ mes "[Tikbalang Expert]";
+ mes "Yiiiiiiiiiiii! Yap!";
+ next;
+ specialeffect EF_SONICBLOW2;
+ select("Huh?");
+ mes "[Tikbalang Expert]";
+ mes "The '^F80835Tikbalang Belt ^000000' is already created";
+ close;
+ case 2:
+ mes "[Tikbalang Expert]";
+ mes "You? Ha... You can try if you want to.";
+ close;
+ }
+ }
+ mes "[Tikbalang Expert]";
+ mes "There is the easy way and the hard way to capture Tikbalangs. Which one do you prefer?";
+ next;
+ switch (select("Easy way.:Hard way.")) {
+ case 1:
+ mes "[Tikbalang Expert]";
+ mes "Ha ha. Ive come up with the easy way myself.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Bring me 3 Tikbalang's Thick Spines and 5 Lesser Agimats to make";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "a '^F80835Tikbalang Belt^000000' to help you easily capture Tikbalangs.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Ha ha ha ha ha!";
+ mes "I will say it again.";
+ mes "Its 3 Tikbalang's Thick Spines and 5 Lesser Agimats. Understood?";
+ close;
+ case 2:
+ mes "[Tikbalang Expert]";
+ mes "Its easy for me but I dont know about you.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Tikbalangs have a sharp, pointy mane behind their neck.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Of course! There are several of them but you must get the three thickest ones.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "These three manes are the weak point. You can tame a Tikbalang by pulling the manes out.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Now let me explain how to pull these manes out.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "You must fly like a butterfly and land like a bee on the back of a Tikbalang.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Of course! The Tikbalang will get mad and try to shake you off with all its might.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "All you have to do is hold on until the Tikbalang gets exhausted.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Then again, itll take 4 days and 3 nights for Tikbalangs to get tired since they are strong creatures. But lets not focus on too much details.";
+ next;
+ mes "[Tikbalang Expert]";
+ mes "Which means!! The Tikbalang is already tamed.";
+ close;
+ }
+ }
+}
+
+ma_fild01,74,367,6 script Unidentified Creature#01 572,2,2,{
+ end;
+
+OnInit:
+ set .@kafre_who, rand(1,4);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnEnable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else if (.@kafre_who == 3) {
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#03::OnEnable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#04::OnEnable";
+ }
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#01";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#01";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,3);
+ if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnEnable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else if (.@kafre_who == 3) {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#03::OnEnable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#04::OnEnable";
+ }
+ end;
+
+OnTouch:
+ if (getcharid(1) != 0) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#01::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name04$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#01::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#01::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_fild01,109,116,4 script Unidentified Creature#02 572,2,2,{
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#02";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#02";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,3);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else if (.@kafre_who == 3) {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#03::OnEnable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ }
+ else {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#04::OnEnable";
+ }
+ end;
+
+OnTouch:
+ if (getpartyleader(getcharid(1),1) == getcharid(3)) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#02::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name04$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#02::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#02::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_fild01,280,150,6 script Unidentified Creature#03 572,2,2,{
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#03";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#03";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,3);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnEnable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#04::OnEnable";
+ }
+ end;
+
+OnTouch:
+ if ((checkquest(4229,PLAYTIME) > 0) && (checkquest(9223,PLAYTIME) > 0) && (checkquest(12278,PLAYTIME) > 0)) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#03::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name04$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#03::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#03::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_fild01,309,221,6 script Unidentified Creature#04 572,2,2,{
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#04";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#04";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,3);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnEnable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#01::OnDisable";
+ donpcevent "Unidentified Creature#02::OnDisable";
+ donpcevent "Unidentified Creature#03::OnEnable";
+ donpcevent "Unidentified Creature#04::OnDisable";
+ }
+ end;
+
+OnTouch:
+ set .@kafre_tok, rand(1,100);
+ if (.@kafre_tok == 7 || .@kafre_tok == 17 || .@kafre_tok == 27 || .@kafre_tok == 37 || .@kafre_tok == 47 || .@kafre_tok == 57 || .@kafre_tok == 67 || .@kafre_tok == 77 || .@kafre_tok == 87 || .@kafre_tok == 97) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#04::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name04$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#04::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#04::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_fild02,282,41,4 script Unidentified Creature#05 572,2,2,{
+ end;
+
+OnInit:
+ set .@kafre_who, rand(1,4);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ } else if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnEnable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ } else if (.@kafre_who == 3) {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnEnable";
+ } else {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ donpcevent "Unidentified Creature#08::OnEnable";
+ }
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#05";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#05";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,3);
+ if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnEnable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ } else if (.@kafre_who == 3) {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnEnable";
+ } else {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ donpcevent "Unidentified Creature#08::OnEnable";
+ }
+ end;
+
+OnTouch:
+ if (getcharid(1) != 0) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#05::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name05$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#05::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#05::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_fild02,246,324,4 script Unidentified Creature#06 572,2,2,{
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#06";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#06";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,3);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ } else if (.@kafre_who == 3) {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnEnable";
+ } else {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ donpcevent "Unidentified Creature#08::OnEnable";
+ }
+ end;
+
+OnTouch:
+ if (getpartyleader(getcharid(1),1) == getcharid(3)) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#06::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name05$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#06::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#06::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_fild02,71,296,6 script Unidentified Creature#07 572,2,2,{
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#07";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#07";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,3);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ donpcevent "Unidentified Creature#08::OnDisable";
+ } else if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnEnable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ donpcevent "Unidentified Creature#08::OnEnable";
+ }
+ end;
+
+OnTouch:
+ if ((checkquest(4229,PLAYTIME) > 0) && (checkquest(9223,PLAYTIME) > 0) && (checkquest(12278,PLAYTIME) > 0)) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#07::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name05$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#07::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#07::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_fild02,32,263,4 script Unidentified Creature#08 572,2,2,{
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#08";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#08";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,3);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ } else if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnEnable";
+ donpcevent "Unidentified Creature#07::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#05::OnDisable";
+ donpcevent "Unidentified Creature#06::OnDisable";
+ donpcevent "Unidentified Creature#07::OnEnable";
+ }
+ end;
+
+OnTouch:
+ set .@kafre_tok, rand(1,100);
+ if (.@kafre_tok == 7 || .@kafre_tok == 17 || .@kafre_tok == 27 || .@kafre_tok == 37 || .@kafre_tok == 47 || .@kafre_tok == 57 || .@kafre_tok == 67 || .@kafre_tok == 77 || .@kafre_tok == 87 || .@kafre_tok == 97) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#08::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name05$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#08::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#08::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_scene01,195,92,4 script Unidentified Creature#09 572,2,2,{
+ end;
+
+OnInit:
+ set .@kafre_who, rand(1,3);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#09::OnEnable";
+ donpcevent "Unidentified Creature#10::OnDisable";
+ donpcevent "Unidentified Creature#11::OnDisable";
+ } else if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#09::OnDisable";
+ donpcevent "Unidentified Creature#10::OnEnable";
+ donpcevent "Unidentified Creature#11::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#09::OnDisable";
+ donpcevent "Unidentified Creature#10::OnDisable";
+ donpcevent "Unidentified Creature#11::OnEnable";
+ }
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#09";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#09";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,2);
+ if (.@kafre_who == 2) {
+ donpcevent "Unidentified Creature#09::OnDisable";
+ donpcevent "Unidentified Creature#10::OnEnable";
+ donpcevent "Unidentified Creature#11::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#09::OnDisable";
+ donpcevent "Unidentified Creature#10::OnDisable";
+ donpcevent "Unidentified Creature#11::OnEnable";
+ }
+ end;
+
+OnTouch:
+ if (getcharid(1) != 0) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#09::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name06$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#09::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#09::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_scene01,158,139,4 script Unidentified Creature#10 572,2,2,{
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#10";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#10";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,2);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#09::OnEnable";
+ donpcevent "Unidentified Creature#10::OnDisable";
+ donpcevent "Unidentified Creature#11::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#09::OnDisable";
+ donpcevent "Unidentified Creature#10::OnDisable";
+ donpcevent "Unidentified Creature#11::OnEnable";
+ }
+ end;
+
+OnTouch:
+ if (getpartyleader(getcharid(1),1) == getcharid(3)) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#10::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name06$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#10::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#10::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+ma_scene01,167,112,6 script Unidentified Creature#11 572,2,2,{
+ end;
+
+OnEnable:
+ hideoffnpc "Unidentified Creature#11";
+ end;
+
+OnDisable:
+ hideonnpc "Unidentified Creature#11";
+ end;
+
+OnBingx2:
+ set .@kafre_who, rand(1,2);
+ if (.@kafre_who == 1) {
+ donpcevent "Unidentified Creature#09::OnEnable";
+ donpcevent "Unidentified Creature#10::OnDisable";
+ } else {
+ donpcevent "Unidentified Creature#10::OnEnable";
+ }
+ end;
+
+OnTouch:
+ if ((checkquest(4229,PLAYTIME) > 0) && (checkquest(9223,PLAYTIME) > 0) && (checkquest(12278,PLAYTIME) > 0)) {
+ if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
+ donpcevent "Unidentified Creature#11::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
+ close;
+ }
+ set .@slot_name, rand(1,5);
+ if (.@slot_name == 1 || .@slot_name == 3 || .@slot_name == 5) {
+ set $ma_name06$,strcharinfo(0);
+ }
+ donpcevent "Unidentified Creature#11::OnBingx2";
+ mes "The unidentified creature gets a glimpse of you and disappears.";
+ close;
+ }
+ donpcevent "Unidentified Creature#11::OnBingx2";
+ mes "The unidentified creature looks at you and runs away.";
+ close;
+}
+
+malaya,227,311,4 script Grandma#ma01 575,{
+
+ if (malaya_hi < 10) {
+ mes "[Grandma]";
+ mes "Youre not from around here? Take care of yourself.";
+ next;
+ mes "[Grandma]";
+ mes "Im worried because my daughter-in-law is pregnant. I hope nothing goes wrong.";
+ close;
+ } else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ mes "[Grandma]";
+ mes "I heard there is an outsider that is helping the village.";
+ next;
+ mes "[Grandma]";
+ mes "Then my daughter-in-law will be safe.";
+ close;
+ }
+ set .@name_tak01, rand(1,6);
+ if (.@name_tak01 == 1){
+ set .@name$,$ma_name01$;
+ }else if (.@name_tak01 == 2){
+ set .@name$,$ma_name02$;
+ }else if (.@name_tak01 == 3){
+ set .@name$,$ma_name03$;
+ }else if (.@name_tak01 == 4){
+ set .@name$,$ma_name04$;
+ }else if (.@name_tak01 == 5){
+ set .@name$,$ma_name05$;
+ }else{
+ set .@name$,$ma_name06$;
+ }
+ set .@name_tak02, rand(1,3);
+ if (.@name_tak02 == 2) {
+ mes "[Grandma]";
+ mes "Heard there is this" + .@name$ + "that follows Meoneonuncle around.";
+ next;
+ mes "[Grandma]";
+ mes "I will cheer for their forbidden love.";
+ close;
+ }
+ mes "[Grandma]";
+ mes "Im worried about my pregnant daughter-in-law. Hope Meoneonuncle wont bother her.";
+ next;
+ select("Meoneonuncle?");
+ mes "[Grandma]";
+ mes "Not from around here? Let me tell you why even a foreigner like you should be careful.";
+ next;
+ mes "[Grandma]";
+ mes "Meoneonuncle was a woman who lived in Port Malaya long ago. She married a decent man and also had a baby.";
+ next;
+ mes "[Grandma]";
+ mes "But happiness never lasts forever, right? The baby was miscarried from an accident,";
+ next;
+ mes "[Grandma]";
+ mes "She eventually passed away after grieving over her lost baby for days.";
+ next;
+ select("That is a sad story.");
+ mes "[Grandma]";
+ mes "Meoneonuncle then started to appear in spirit and take away babies from pregnant women in the village.";
+ next;
+ mes "[Grandma]";
+ mes "If you ever walk around Port Malaya at night.";
+ next;
+ mes "[Grandma]";
+ mes "and hear either tik-tik or wak-wak, be cautious because that is the sound of Meoneonuncles wings flapping.";
+ close;
+}
+
+malaya,189,263,4 script Drumming Young Man #ma02 578,{
+
+ if (malaya_hi < 10) {
+ emotion e_omg;
+ mes "[Drumming Young Man]";
+ mes "Ugh... its just like that time before";
+ next;
+ emotion e_omg;
+ mes "[Drumming Young Man]";
+ mes "when the moon was swallowed. Argh!";
+ close;
+ } else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ mes "[Drumming Young Man]";
+ mes "I think the village was saved by a nameless adventurer.";
+ next;
+ emotion e_sigh;
+ mes "[Drumming Young Man]";
+ mes "Phew... I thought Bakonawa appeared again.";
+ close;
+ }
+ set .@name_tak01, rand(1,6);
+ if (.@name_tak01 == 1){
+ set .@name$,$ma_name01$;
+ }else if (.@name_tak01 == 2){
+ set .@name$,$ma_name02$;
+ }else if (.@name_tak01 == 3){
+ set .@name$,$ma_name03$;
+ }else if (.@name_tak01 == 4){
+ set .@name$,$ma_name04$;
+ }else if (.@name_tak01 == 5){
+ set .@name$,$ma_name05$;
+ }else{
+ set .@name$,$ma_name06$;
+ }
+ set .@name_tak02, rand(1,3);
+ if (.@name_tak02 == 2) {
+ mes "[Drumming Young Man]";
+ mes "" + .@name$ + "is said to have stopped Bakonawa from swallowing the moon. Isnt it awesome? I'm so relieved.";
+ close;
+ }
+ mes "[Drumming Young Man]";
+ mes "Bakonawa is also known as the 'monster that swallows the moon' in Port Malaya.";
+ next;
+ mes "[Drumming Young Man]";
+ mes "But I know that Bakonawa could also 'swallow people', too.";
+ next;
+ select("Huk! Then isn't it dangerous?");
+ emotion e_gg;
+ mes "[Drumming Young Man]";
+ mes "Ha ha ha. There is a way to stop Bakonawa from swallowing a person.";
+ next;
+ mes "[Drumming Young Man]";
+ mes "Yes, there is a weakness to even the worst monster that swallowed 6 moons already.";
+ next;
+ select("Wow. What is it?");
+ mes "[Drumming Young Man]";
+ mes "He is sensitive to noise so when hes about to swallow the moon!!";
+ next;
+ mes "[Drumming Young Man]";
+ mes "Thats your chance!! It doesnt matter what kind of noise!! Whether its a caldron, symbol, drum, pot or fry pan, just keep on making noise.";
+ next;
+ mes "[Drumming Young Man]";
+ mes "Then Bakonawa will get surprised, spit out the moon and run away!";
+ next;
+ mes "[Drumming Young Man]";
+ mes "Carry a drum around with you. Youll find it handy.";
+ close;
+}
+
+malaya,270,59,4 script Port Guard#ma03 570,{
+
+ if (malaya_hi < 10) {
+ emotion e_swt2;
+ mes "[Port Guard]";
+ mes "The village is chaotic these days. Is it okay for me to be off like this?";
+ close;
+ } else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ emotion e_no;
+ mes "[Port Guard]";
+ mes "The village is somewhat stable now but you should still be careful walking around at night.";
+ close;
+ }
+ set .@name_tak01, rand(1,6);
+ if (.@name_tak01 == 1){
+ set .@name$,$ma_name01$;
+ }else if (.@name_tak01 == 2){
+ set .@name$,$ma_name02$;
+ }else if (.@name_tak01 == 3){
+ set .@name$,$ma_name03$;
+ }else if (.@name_tak01 == 4){
+ set .@name$,$ma_name04$;
+ }else if (.@name_tak01 == 5){
+ set .@name$,$ma_name05$;
+ }else{
+ set .@name$,$ma_name06$;
+ }
+ set .@name_tak02, rand(1,3);
+ if (.@name_tak02 == 2) {
+ mes "[Port Guard]";
+ mes "" + .@name$ + "is said to escape from Bu waya alive after being captured. This person must be powerful.";
+ close;
+ }
+ emotion e_omg;
+ mes "[Port Guard]";
+ mes "What!! Port all clear!!";
+ next;
+ mes "[Port Guard]";
+ mes "Huh? Youre not the captain? You scared me. Shoot! Ah, right! I received an official document for travelers.";
+ next;
+ select("What document?");
+ mes "[Port Guard]";
+ mes "It says that travelers should be careful of monsters when walking in the village at night.";
+ next;
+ mes "[Port Guard]";
+ mes "Buwaya dont come to the village often but there are cases when they snatch people in the boxes they carry at night.";
+ next;
+ mes "[Port Guard]";
+ mes "Huh?! And it says here that a monster named Wokwok especially visits the village often at night and should be avoided.";
+ next;
+ if (select("I see.:Is there any way to prevent them from coming?") == 1) {
+ mes "[Port Guard]";
+ mes "Be careful at night!";
+ close;
+ }
+ mes "[Port Guard]";
+ mes "They say you can attack Buwayas weak point inside the box they carry if you ever get caught in one.";
+ next;
+ mes "[Port Guard]";
+ mes "And you should run into the nearest building when you hear Wokwoks wings fluttering from afar.";
+ next;
+ emotion e_hmm;
+ mes "[Port Guard]";
+ mes "But if the fluttering sound is small or if you dont hear anything, lets just say you should prepare for attack and with for luck.";
+ close;
+}
+
+malaya,88,252,4 script Little Girl #ma04 576,{
+
+ if (malaya_hi < 10) {
+ mes "[Little Girl]";
+ mes "Im scared but I have to visit the fairy in the forest.";
+ close;
+ } else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ mes "[Little Girl]";
+ mes "He he. Father said I can visit the fairy in the forest when the village calms down.";
+ close;
+ }
+ set .@name_tak01, rand(1,6);
+ if (.@name_tak01 == 1){
+ set .@name$,$ma_name01$;
+ }else if (.@name_tak01 == 2){
+ set .@name$,$ma_name02$;
+ }else if (.@name_tak01 == 3){
+ set .@name$,$ma_name03$;
+ }else if (.@name_tak01 == 4){
+ set .@name$,$ma_name04$;
+ }else if (.@name_tak01 == 5){
+ set .@name$,$ma_name05$;
+ }else{
+ set .@name$,$ma_name06$;
+ }
+ set .@name_tak02, rand(1,3);
+ if (.@name_tak02 == 2) {
+ mes "[Little Girl]";
+ mes "A little while ago" + .@name$ + "came and told me a fun story.";
+ next;
+ mes "[Little Girl]";
+ mes "'I planted a pair of pear trees in the yard.'";
+ mes "He he. Isnt it fun?" + .@name$ + "seems like a fun person.";
+ close;
+ }
+ mes "[Little Girl]";
+ mes "Father said I wont catch skin diseases once Im friends with the fairy from the forest.";
+ next;
+ select("What is this fairy?");
+ mes "[Little Girl]";
+ mes "Encanto! Encanto fairies live in big trees or rocks in the forest. There are boy fairies and girl fairies,";
+ next;
+ mes "[Little Girl]";
+ mes "but boy fairies are prettier. Why is that?";
+ close;
+}
+
+malaya,219,92,6 script Little Kid#ma05 577,{
+
+ if (malaya_hi < 10) {
+ mes "[Little Kid]";
+ mes "My mom told me not to play outside because its dangerous. Why?";
+ close;
+ } else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ mes "[Little Kid]";
+ mes "My mom told me I can play but only in Port Malaya.";
+ next;
+ mes "[Little Kid]";
+ mes "He he. But I never thought of going outside of Port Malaya.";
+ close;
+ }
+ set .@name_tak01, rand(1,6);
+ if (.@name_tak01 == 1){
+ set .@name$,$ma_name01$;
+ }else if (.@name_tak01 == 2){
+ set .@name$,$ma_name02$;
+ }else if (.@name_tak01 == 3){
+ set .@name$,$ma_name03$;
+ }else if (.@name_tak01 == 4){
+ set .@name$,$ma_name04$;
+ }else if (.@name_tak01 == 5){
+ set .@name$,$ma_name05$;
+ }else{
+ set .@name$,$ma_name06$;
+ }
+ set .@name_tak02, rand(1,3);
+ if (.@name_tak02 == 2) {
+ mes "[Little Kid]";
+ mes "I heard someone took Jejelings hat in Baryo Mahiwaga.";
+ next;
+ mes "[Little Kid]";
+ mes "Why would someone steal a monsters hat?" + .@name$ + "must be desperate.";
+ next;
+ mes "[Little Kid]";
+ mes "Oh wait! This was suppose to be a secret. Shsh! Please pretend you didnt hear me.";
+ close;
+ }
+ mes "[Little Kid]";
+ mes "I think someone is stealing all the hats in the village.";
+ next;
+ mes "[Little Kid]";
+ mes "The hat my mom washed yesterday disappeared. Our neighbor's hat also disappeared a few days ago.";
+ next;
+ mes "[Little Kid]";
+ mes "Hmm... do you think Jejeling took it?";
+ next;
+ mes "[Little Kid]";
+ mes "I visited a friend in Baryo Mahiwaga and he said he saw Jejeling wearing the missing hat...";
+ close;
+}
+
+malaya,363,283,4 script Local#ma06 582,{
+
+ if (malaya_hi < 10) {
+ mes "[Local]";
+ mes "Hmm... is it time to be careful of the witches' curse?";
+ next;
+ mes "[Local]";
+ mes "Beware of Mongkukurums needle, foreigner.";
+ close;
+ } else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ mes "[Local]";
+ mes "Welcome to Port Malaya, foreigner..";
+ next;
+ mes "[Local]";
+ mes "The village is chaotic these days. If you see someone with red eyes, try not to stare at their eyes.";
+ close;
+ }
+ set .@name_tak01, rand(1,6);
+ if (.@name_tak01 == 1){
+ set .@name$,$ma_name01$;
+ }else if (.@name_tak01 == 2){
+ set .@name$,$ma_name02$;
+ }else if (.@name_tak01 == 3){
+ set .@name$,$ma_name03$;
+ }else if (.@name_tak01 == 4){
+ set .@name$,$ma_name04$;
+ }else if (.@name_tak01 == 5){
+ set .@name$,$ma_name05$;
+ }else{
+ set .@name$,$ma_name06$;
+ }
+ set .@name_tak02, rand(1,6);
+ if (.@name_tak02 == 1) {
+ mes "[Local]";
+ mes "Be careful walking around the village at night." + .@name$ + "was taken down by Wokwok.";
+ close;
+ } else if (.@name_tak02 == 2) {
+ mes "[Local]";
+ mes "" + .@name$ + "is said to successfully tame a Tikbalang. This person must be courageous. Wonder if Ill get to see this tamed Tikbalang? Çѹø º¸°í ½ÍÀºµ¥..";
+ close;
+ } else if (.@name_tak02 == 3) {
+ mes "[Local]";
+ mes "Have you ever seen Bongisungisu? I heard" + .@name$ + "is hunting down Bongisungisus.";
+ close;
+ } else if (.@name_tak02 == 4) {
+ mes "[Local]";
+ mes "If you plan to go out of the village, be careful of Tiucknuc" + .@name$ + "is said to be tricked by Tiucknuc and had to go to the to the hospital.";
+ close;
+ }
+ mes "[Local]";
+ mes "The village is chaotic these days. Looks like Mongkukurum is back in the village.";
+ next;
+ select("Mongkukurum?");
+ mes "[Local]";
+ mes "A monster that is also called witch. Looks like a person and also wears clothes.";
+ next;
+ mes "[Local]";
+ mes "Mongkukurum makes a doll out of the people it sees and curses it with needles.";
+ next;
+ select("Is there a way to recognize this monster?");
+ mes "[Local]";
+ mes "There is one way. All Mongkukurum have red eyes.";
+ next;
+ mes "[Local]";
+ mes "You can recognize them by their eyes but! You must remember one thing.";
+ next;
+ mes "[Local]";
+ mes "You will be captivated by Mongkukurum if you stare at their eyes too long.";
+ next;
+ mes "[Local]";
+ mes "Never ever stare into their eyes for too long.";
+ close;
+}
+
+malaya,41,127,6 script Old Man #ma07 574,{
+
+ if (malaya_hi < 10) {
+ mes "[Old Man]";
+ mes "Foreigners are not welcomed that much when our village is chaotic like these days.";
+ close;
+ } else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ mes "[Old Man]";
+ mes "You are out of luck visiting the village at a time like this and not being welcomed.";
+ close;
+ }
+ set .@name_tak01, rand(1,6);
+ if (.@name_tak01 == 1){
+ set .@name$,$ma_name01$;
+ }else if (.@name_tak01 == 2){
+ set .@name$,$ma_name02$;
+ }else if (.@name_tak01 == 3){
+ set .@name$,$ma_name03$;
+ }else if (.@name_tak01 == 4){
+ set .@name$,$ma_name04$;
+ }else if (.@name_tak01 == 5){
+ set .@name$,$ma_name05$;
+ }else{
+ set .@name$,$ma_name06$;
+ }
+ set .@name_tak02, rand(1,3);
+ if (.@name_tak02 == 2) {
+ mes "[Old Man]";
+ mes "" + .@name$ + "is said to throw out Jellopy in this village.";
+ next;
+ mes "[Old Man]";
+ mes "Tsk, tsk... Must be a person that isnt worthy of a Jellopy.";
+ close;
+ }
+ mes "[Old Man]";
+ mes "You must also look out to see if Bangungot lives in a tree you are about to cut down.";
+ next;
+ mes "[Old Man]";
+ mes "Because strange things happen if logs from trees that Bangungot lived in are used as building pillars.";
+ next;
+ select("What happens?");
+ mes "[Old Man]";
+ mes "Well, for a Bangungot, it means losing its home so they get revengeful.";
+ next;
+ mes "[Old Man]";
+ mes "When you try to sleep near the pillar, it will keep awake by playing pranks at first.";
+ next;
+ mes "[Old Man]";
+ mes "But as time goes by and their vengeance grow, they sit on top of you until you suffocate.";
+ next;
+ select("Oh, gosh...");
+ mes "[Old Man]";
+ mes "Ha ha ha. There are no Bangungots in normal pillars, so don't lose sleep on it.";
+ close;
+}
+
+malaya,63,185,4 script Woman#ma08 583,{
+
+ if (malaya_hi < 10) {
+ mes "[Woman]";
+ mes "I dont have anything to share with you.";
+ close;
+ } else if ((malaya_hi > 9) && (malaya_hi < 20)) {
+ mes "[Woman]";
+ mes "Im worried about the children. I hope they arent terrified from whats going on in the village.";
+ close;
+ }
+ set .@name_tak01, rand(1,6);
+ if (.@name_tak01 == 1){
+ set .@name$,$ma_name01$;
+ }else if (.@name_tak01 == 2){
+ set .@name$,$ma_name02$;
+ }else if (.@name_tak01 == 3){
+ set .@name$,$ma_name03$;
+ }else if (.@name_tak01 == 4){
+ set .@name$,$ma_name04$;
+ }else if (.@name_tak01 == 5){
+ set .@name$,$ma_name05$;
+ }else{
+ set .@name$,$ma_name06$;
+ }
+ set .@name_tak02, rand(1,3);
+ if (.@name_tak02 == 2) {
+ set .@nongdum, rand(1,10);
+ if (.@nongdum == 1) {
+ mes "[Woman]";
+ mes "I like fun stories. Not so long ago," + .@name$ + "came and told me a funny story.";
+ next;
+ mes "[Woman]";
+ mes "'My aunt stepped on an ant.'";
+ next;
+ } else if (.@nongdum == 2) {
+ mes "[Woman]";
+ mes "I like fun stories. Not so long ago" + .@name$ + "came and told me a funny story.";
+ next;
+ mes "[Woman]";
+ mes "'You eat chili on a chilly day.'";
+ next;
+ } else if (.@nongdum == 3) {
+ mes "[Woman]";
+ mes "I like fun stories. Not so long ago" + .@name$ + "came and told me a funny story.";
+ next;
+ mes "[Woman]";
+ mes "'Why are you putting flour on that flower?'";
+ next;
+ } else if (.@nongdum == 4) {
+ mes "[Woman]";
+ mes "I like fun stories. Not so long ago" + .@name$ + "came and told me a funny story.";
+ next;
+ mes "[Woman]";
+ mes "At the Tool Store, 'Ill buy the needle and thread! You buy the hay to lose the needle in.'";
+ next;
+ mes "[Woman]";
+ mes "said that and was kicked out of the Tool Store.";
+ next;
+ } else if (.@nongdum == 5) {
+ mes "[Woman]";
+ mes "A Kafra Employee Im friends with told me a story about a customer.";
+ next;
+ mes "[Woman]";
+ mes "'Kafra, the wise never marry and when they marry, they become otherwise.'";
+ next;
+ mes "[Woman]";
+ mes "He he... I do like funny stories but a bit difficult for my taste.";
+ close;
+ } else {
+ mes "[Woman]";
+ mes "I like fun stories. Oh by the way!" + .@name$ + ", love is photogenic. Dont you agree?";
+ next;
+ mes "[Woman]";
+ mes "It needs darkness to develop.";
+ next;
+ }
+ mes "[Woman]";
+ mes "He he. Isnt it fun?";
+ close;
+ }
+ mes "[Woman]";
+ mes "If you hear a baby crying from the forest outside of the village, never go near it.";
+ next;
+ select("Why?");
+ mes "[Woman]";
+ mes "There is a monster named Tiucknuc that roams around outside of the village and cries after transforming himself into a baby.";
+ next;
+ mes "[Woman]";
+ mes "But when kind travelers pick up the baby, it turns back into its original form and attacks.";
+ next;
+ select("Sounds like a sneaky monster.");
+ mes "[Woman]";
+ mes "Yes, this monster is bad to trick the kindness of travelers but,";
+ next;
+ mes "[Woman]";
+ mes "there is rumor that the monster came from the soul of a baby that never been born. So sad.";
+ close;
+} \ No newline at end of file
diff --git a/npc/re/cities/mora.txt b/npc/re/cities/mora.txt
index 5c2a93aee..80c1af43c 100644
--- a/npc/re/cities/mora.txt
+++ b/npc/re/cities/mora.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Mora Village
//===== By: ==================================================
//= SuperHulk
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Mora Town Script
//===== Additional Comments: =================================
diff --git a/npc/re/guides/guides_alberta.txt b/npc/re/guides/guides_alberta.txt
index 6c773c535..9b1b86a92 100644
--- a/npc/re/guides/guides_alberta.txt
+++ b/npc/re/guides/guides_alberta.txt
@@ -1,17 +1,17 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Alberta Guides
-//===== By: ==================================================
+//===== By: ==================================================
//= L0ne_W0lf
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Alberta
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First version, Renewal guides.
-//============================================================
+//============================================================
alberta,23,238,4 script Guide#01alberta::AlbertaGuide 105,{
cutin "prt_soldier",2;
diff --git a/npc/re/guides/guides_aldebaran.txt b/npc/re/guides/guides_aldebaran.txt
index f74714fd5..9593e0b2e 100644
--- a/npc/re/guides/guides_aldebaran.txt
+++ b/npc/re/guides/guides_aldebaran.txt
@@ -1,17 +1,17 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Al De Baran Guides
-//===== By: ==================================================
+//===== By: ==================================================
//= L0ne_W0lf
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Al De baran
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First version, Renewal guide.
-//============================================================
+//============================================================
aldebaran,139,63,4 script Guide#01aldebaran::GuideAldearan 105,{
cutin "prt_soldier",2;
diff --git a/npc/re/guides/guides_amatsu.txt b/npc/re/guides/guides_amatsu.txt
index 431707526..4ab124e27 100644
--- a/npc/re/guides/guides_amatsu.txt
+++ b/npc/re/guides/guides_amatsu.txt
@@ -1,18 +1,18 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Amatsu Guide
-//===== By: ==================================================
+//===== By: ==================================================
//= L0ne_W0lf
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.1
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Amatsu.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First version, Renewal guide.
//= 1.1 Optimized. [Euphy]
-//============================================================
+//============================================================
amatsu,202,91,3 script Amatsu Guide#amatsu 758,{
mes "[Amachang]";
diff --git a/npc/re/guides/guides_ayothaya.txt b/npc/re/guides/guides_ayothaya.txt
index b6da9cba5..135e34671 100644
--- a/npc/re/guides/guides_ayothaya.txt
+++ b/npc/re/guides/guides_ayothaya.txt
@@ -1,18 +1,18 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Ayothaya Guide
-//===== By: ==================================================
+//===== By: ==================================================
//= L0ne_W0lf
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.1
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Ayothaya
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First version, Renewal guide.
//= 1.1 Added missing case. [Joseph]
-//============================================================
+//============================================================
ayothaya,203,169,4 script Ayothaya Guide Noi#01ay 839,{
mes "[Noi]";
diff --git a/npc/re/guides/guides_brasilis.txt b/npc/re/guides/guides_brasilis.txt
index 6e219b582..b94dc87f0 100644
--- a/npc/re/guides/guides_brasilis.txt
+++ b/npc/re/guides/guides_brasilis.txt
@@ -1,18 +1,18 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Brasilis Guide
-//===== By: ==================================================
+//===== By: ==================================================
//= L0ne_W0lf
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.1
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Brasilis
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First Version, Renewal guide.
//= 1.1 Added a missing close.
-//============================================================
+//============================================================
brasilis,219,97,3 script Brasilis Guide 478,{
mes "[Brasilis Guide]";
diff --git a/npc/re/guides/guides_comodo.txt b/npc/re/guides/guides_comodo.txt
index 2bea02527..59988459e 100644
--- a/npc/re/guides/guides_comodo.txt
+++ b/npc/re/guides/guides_comodo.txt
@@ -1,18 +1,18 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Comodo Guides
-//===== By: ==================================================
+//===== By: ==================================================
//= L0ne_W0lf
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.1
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Comodo.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First version, Renewal guide.
//= 1.1 Fixed and optimized. [Euphy]
-//============================================================
+//============================================================
comodo,322,178,4 script Comodo Guide#01comodo::GuideComodo 700,{
mes "[Comodo Guide]";
diff --git a/npc/re/guides/guides_dewata.txt b/npc/re/guides/guides_dewata.txt
index f554186a4..28b8696c8 100644
--- a/npc/re/guides/guides_dewata.txt
+++ b/npc/re/guides/guides_dewata.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Dewata Guide
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Dewata.
diff --git a/npc/re/guides/guides_dicastes.txt b/npc/re/guides/guides_dicastes.txt
index 99beb318d..d2e079da8 100644
--- a/npc/re/guides/guides_dicastes.txt
+++ b/npc/re/guides/guides_dicastes.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= El Dicastes Guide
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of El Dicastes.
diff --git a/npc/re/guides/guides_einbroch.txt b/npc/re/guides/guides_einbroch.txt
index 13dba9c9b..6d28cffef 100644
--- a/npc/re/guides/guides_einbroch.txt
+++ b/npc/re/guides/guides_einbroch.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Einbroch, and Einbech Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Einbroch, and Einbech
diff --git a/npc/re/guides/guides_geffen.txt b/npc/re/guides/guides_geffen.txt
index 64ed199d0..de32bf185 100644
--- a/npc/re/guides/guides_geffen.txt
+++ b/npc/re/guides/guides_geffen.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Geffen Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Geffen.
diff --git a/npc/re/guides/guides_gonryun.txt b/npc/re/guides/guides_gonryun.txt
index 1dcf03e1b..9aa3e2371 100644
--- a/npc/re/guides/guides_gonryun.txt
+++ b/npc/re/guides/guides_gonryun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Kunlun Guide
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Kunlun.
diff --git a/npc/re/guides/guides_hugel.txt b/npc/re/guides/guides_hugel.txt
index f64e9b456..e80146ff3 100644
--- a/npc/re/guides/guides_hugel.txt
+++ b/npc/re/guides/guides_hugel.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Hugel Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Hugel.
diff --git a/npc/re/guides/guides_izlude.txt b/npc/re/guides/guides_izlude.txt
index 4824ffdc8..6f460ebcc 100644
--- a/npc/re/guides/guides_izlude.txt
+++ b/npc/re/guides/guides_izlude.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Izlude Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Izlude
diff --git a/npc/re/guides/guides_juno.txt b/npc/re/guides/guides_juno.txt
index 5f0a7f471..8af05d5ae 100644
--- a/npc/re/guides/guides_juno.txt
+++ b/npc/re/guides/guides_juno.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Juno Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Juno.
diff --git a/npc/re/guides/guides_lighthalzen.txt b/npc/re/guides/guides_lighthalzen.txt
index 6fa474421..fcfd1cca8 100644
--- a/npc/re/guides/guides_lighthalzen.txt
+++ b/npc/re/guides/guides_lighthalzen.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Lighthalzen Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Lighthalzen.
diff --git a/npc/re/guides/guides_louyang.txt b/npc/re/guides/guides_louyang.txt
index 9246c26c5..e5ff1d4c6 100644
--- a/npc/re/guides/guides_louyang.txt
+++ b/npc/re/guides/guides_louyang.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Louyang Guide
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Louyang
diff --git a/npc/re/guides/guides_lutie.txt b/npc/re/guides/guides_lutie.txt
index a95027688..121744a24 100644
--- a/npc/re/guides/guides_lutie.txt
+++ b/npc/re/guides/guides_lutie.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Lutie Guide
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Lutie.
diff --git a/npc/re/guides/guides_mora.txt b/npc/re/guides/guides_mora.txt
new file mode 100644
index 000000000..0cb0db35d
--- /dev/null
+++ b/npc/re/guides/guides_mora.txt
@@ -0,0 +1,215 @@
+//===== rAthena Script =======================================
+//= Mora Guides
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Guides for the city of Mora.
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy]
+//============================================================
+
+mora,25,158,5 script Raffle Guide#north 516,{
+ mes "[Raffoh]";
+ mes "Laoh~!";
+ mes "Welcome to the Village of Mora.";
+ mes "I can tell you whatever you want to know about the village~!";
+ next;
+ switch(select("[ Inn ]:[ Residences ]:[ Stores ]:[ Warehouse ]:Remove markers from the mini-map:Quit")) {
+ case 1:
+ mes "[Raffoh]";
+ mes "Laoh~!";
+ mes "We have an inn but we can't make travelers sleep like Raffles...";
+ mes "Get some rest!";
+ viewpoint 1,44,134,0,0x0A82FF;
+ close;
+ case 2:
+ mes "[Raffoh]";
+ mes "Laoh~!";
+ mes "This is where Raffles' houses are...";
+ mes "But keep the noise down because people are asleep~!";
+ viewpoint 1,119,170,1,0xAAFF00;
+ close;
+ case 3:
+ mes "[Raffoh]";
+ mes "Laoh~!";
+ mes "If you are looking for souvenirs, you can buy some in this district.";
+ viewpoint 1,112,110,2,0xDA70D6;
+ close;
+ case 4:
+ mes "[Raffoh]";
+ mes "Laoh~!";
+ mes "This is where they keep all kinds of packages and groceries.";
+ mes "There are many things that don't belong to the Raffles, so be careful!";
+ viewpoint 1,182,161,3,0xFF1493;
+ close;
+ case 5:
+ mes "[Raffoh]";
+ mes "Laoh~! I'm removing them all~!";
+ viewpoint 2,1,1,0,0xFFFF00;
+ viewpoint 2,1,1,1,0xFFFF00;
+ viewpoint 2,1,1,2,0xFFFF00;
+ viewpoint 2,1,1,3,0xFFFF00;
+ close;
+ case 6:
+ mes "[Raffoh]";
+ mes "Laoh~!";
+ mes "What kinds of sports are popular in your homeland?";
+ close;
+ }
+}
+
+mora,167,76,3 script Raffle Guide#east 522,{
+ mes "[Raffuh]";
+ mes "Uh...";
+ mes "This, this is the Village of Mora.";
+ mes "Uh... which place do you want to know about?";
+ next;
+ switch(select("[ Inn ]:[ Residences ]:[ Stores ]:[ Warehouse ]:Remove markers from the mini-map:Quit")) {
+ case 1:
+ mes "[Raffuh]";
+ mes "Uh...";
+ mes "Are, are you sleepy?";
+ mes "You can sleep here uh!! Put your stuff down uh! And-- and---";
+ viewpoint 1,44,134,0,0x0A82FF;
+ close;
+ case 2:
+ mes "[Raffuh]";
+ mes "Uh...";
+ mes "Why are you trying to find out where I live--?";
+ mes "Uh, no... I'd like to live with my friends--";
+ viewpoint 1,119,170,1,0xAAFF00;
+ close;
+ case 3:
+ mes "[Raffuh]";
+ mes "Uh...";
+ mes "There are a lot of things in those stores-- oh, there is a hot spring also uh!";
+ viewpoint 1,112,110,2,0xDA70D6;
+ close;
+ case 4:
+ mes "[Raffuh]";
+ mes "Uh...";
+ mes "You can't just march into the warehouse, or you'll be in trouble--";
+ mes "Many of the things there are from outside the village-- Raffuh has been in trouble several times--";
+ viewpoint 1,182,161,3,0xFF1493;
+ close;
+ case 5:
+ mes "[Raffuh]";
+ mes "Are you sure you want them removed?";
+ viewpoint 2,1,1,0,0xFFFF00;
+ viewpoint 2,1,1,1,0xFFFF00;
+ viewpoint 2,1,1,2,0xFFFF00;
+ viewpoint 2,1,1,3,0xFFFF00;
+ close;
+ case 6:
+ mes "[Raffuh]";
+ mes "Uh...";
+ mes "Being a guide doesn't help much with my social phobia--";
+ close;
+ }
+}
+
+mora,115,138,5 script Raffle Guide#center 524,{
+ mes "[Raffla]";
+ mes "Lala!";
+ mes "Welcome to the Village of Mora la!";
+ mes "If you need to know anything about the village, just ask me la!";
+ next;
+ switch(select("[ Inn ]:[ Residences ]:[ Stores ]:[ Warehouse ]:Remove markers from the mini-map:Quit.")) {
+ case 1:
+ mes "[Raffla]";
+ mes "Lala!";
+ mes "This is where travelers can rest la!";
+ mes "The innkeeper is very kind, so try to talk to him a lot la!";
+ viewpoint 1,44,134,0,0x0A82FF;
+ close;
+ case 2:
+ mes "[Raffla]";
+ mes "Lala!";
+ mes "This is where Raffles live la!";
+ mes "Head over there la!";
+ viewpoint 1,119,170,1,0xAAFF00;
+ close;
+ case 3:
+ mes "[Raffla]";
+ mes "Lala!";
+ mes "So you want to buy something la?";
+ mes "There are a lot of stores and cafes, so check them out la!";
+ viewpoint 1,112,110,2,0xDA70D6;
+ close;
+ case 4:
+ mes "[Raffla]";
+ mes "Lala!";
+ mes "The warehouse is where you keep your valuables la!";
+ mes "Be careful so you don't get robbed la!";
+ viewpoint 1,182,161,3,0xFF1493;
+ close;
+ case 5:
+ mes "[Raffla]";
+ mes "Okay, I'll remove all the markers from the map la!";
+ viewpoint 2,1,1,0,0xFFFF00;
+ viewpoint 2,1,1,1,0xFFFF00;
+ viewpoint 2,1,1,2,0xFFFF00;
+ viewpoint 2,1,1,3,0xFFFF00;
+ close;
+ case 6:
+ mes "[Raffla]";
+ mes "Lala!";
+ mes "I really don't know how my family ends up doing these things la!";
+ close;
+ }
+}
+
+mora,72,51,3 script Raffle Guide#south 518,{
+ mes "[Raffli]";
+ mes "Lali?";
+ mes "Welcome to the Village of Mora.";
+ mes "If you need to know anything about the village, just ask me.";
+ next;
+ switch(select("[ Inn ]:[ Residences ]:[ Stores ]:[ Warehouse ]:Remove markers from the mini-map:Quit")) {
+ case 1:
+ mes "[Raffli]";
+ mes "Lali?";
+ mes "This is where travelers can rest.";
+ mes "The innkeeper is very kind, so get to know him.";
+ viewpoint 1,44,134,0,0x0A82FF;
+ close;
+ case 2:
+ mes "[Raffli]";
+ mes "Lali?";
+ mes "This is where Raffles live.";
+ mes "Are you coming to Raffli's house li? I'm so happy.";
+ viewpoint 1,119,170,1,0xAAFF00;
+ close;
+ case 3:
+ mes "[Raffli]";
+ mes "Lali?";
+ mes "There are a lot of things I want to buy.";
+ mes "You can find tons of places to eat and shop, and tons of things to buy.";
+ viewpoint 1,112,110,2,0xDA70D6;
+ close;
+ case 4:
+ mes "[Raffli]";
+ mes "Lali?";
+ mes "The warehouse is where you keep your valuables.";
+ mes "But don't get robbed.";
+ viewpoint 1,182,161,3,0xFF1493;
+ close;
+ case 5:
+ mes "[Raffli]";
+ mes "I'll remove all the markers.";
+ viewpoint 2,1,1,0,0xFFFF00;
+ viewpoint 2,1,1,1,0xFFFF00;
+ viewpoint 2,1,1,2,0xFFFF00;
+ viewpoint 2,1,1,3,0xFFFF00;
+ close;
+ case 6:
+ mes "[Raffli]";
+ mes "Lali?";
+ mes "Brother seems to be upset today li. Did I do anything wrong?";
+ close;
+ }
+}
diff --git a/npc/re/guides/guides_morroc.txt b/npc/re/guides/guides_morroc.txt
index 302fbf7e3..e9e662ecd 100644
--- a/npc/re/guides/guides_morroc.txt
+++ b/npc/re/guides/guides_morroc.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Morroc Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Morroc and Morroc Ruins.
diff --git a/npc/re/guides/guides_moscovia.txt b/npc/re/guides/guides_moscovia.txt
index abee9c46f..6627021f3 100644
--- a/npc/re/guides/guides_moscovia.txt
+++ b/npc/re/guides/guides_moscovia.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Moscovia Guide
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Moscovia.
diff --git a/npc/re/guides/guides_niflheim.txt b/npc/re/guides/guides_niflheim.txt
index 647166c02..32790bd44 100644
--- a/npc/re/guides/guides_niflheim.txt
+++ b/npc/re/guides/guides_niflheim.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Niflheim Guide
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Niflehim.
diff --git a/npc/re/guides/guides_payon.txt b/npc/re/guides/guides_payon.txt
index 1bda6c6dd..e07ff5bfe 100644
--- a/npc/re/guides/guides_payon.txt
+++ b/npc/re/guides/guides_payon.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Payon Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Payon.
diff --git a/npc/re/guides/guides_prontera.txt b/npc/re/guides/guides_prontera.txt
index 717672555..f744a7a8c 100644
--- a/npc/re/guides/guides_prontera.txt
+++ b/npc/re/guides/guides_prontera.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Prontera Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Prontera
diff --git a/npc/re/guides/guides_rachel.txt b/npc/re/guides/guides_rachel.txt
index 9cae73a57..e0aac2b8f 100644
--- a/npc/re/guides/guides_rachel.txt
+++ b/npc/re/guides/guides_rachel.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Rachel Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guide for the city of Rachel
diff --git a/npc/re/guides/guides_umbala.txt b/npc/re/guides/guides_umbala.txt
index ef4d2bc4a..defb6e714 100644
--- a/npc/re/guides/guides_umbala.txt
+++ b/npc/re/guides/guides_umbala.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Umbala Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Umbala
diff --git a/npc/re/guides/guides_veins.txt b/npc/re/guides/guides_veins.txt
index c01c880af..745872235 100644
--- a/npc/re/guides/guides_veins.txt
+++ b/npc/re/guides/guides_veins.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Veins Guides
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Guides for the city of Veins
diff --git a/npc/re/jobs/1-1/mage.txt b/npc/re/jobs/1-1/mage.txt
index b6cc20f2c..1fce4269e 100644
--- a/npc/re/jobs/1-1/mage.txt
+++ b/npc/re/jobs/1-1/mage.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Renewal Mage Job Quest
//===== By: ==================================================
//= Kisuka
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Job Change to Mage Class
//===== Additional Comments: =================================
diff --git a/npc/re/jobs/1-1/merchant.txt b/npc/re/jobs/1-1/merchant.txt
index b08cf1a40..58c13ae17 100644
--- a/npc/re/jobs/1-1/merchant.txt
+++ b/npc/re/jobs/1-1/merchant.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Renewal Merchant Job Quest
//===== By: ==================================================
//= Kisuka
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Job Change to Merchant Class
//===== Additional Comments: =================================
diff --git a/npc/re/jobs/1-1/swordman.txt b/npc/re/jobs/1-1/swordman.txt
index db7b62d41..0d47f0b3a 100644
--- a/npc/re/jobs/1-1/swordman.txt
+++ b/npc/re/jobs/1-1/swordman.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Renewal Swordman Job Quest
//===== By: ==================================================
//= Kisuka
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Job Change to Swordman Class
//===== Additional Comments: =================================
diff --git a/npc/re/jobs/1-1/thief.txt b/npc/re/jobs/1-1/thief.txt
index e0ea4d5a9..23b23bd96 100644
--- a/npc/re/jobs/1-1/thief.txt
+++ b/npc/re/jobs/1-1/thief.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Renewal Thief Job Quest
//===== By: ==================================================
//= Kisuka
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Job Change to Thief Class
//===== Additional Comments: =================================
diff --git a/npc/re/jobs/3-1/guillotine_cross.txt b/npc/re/jobs/3-1/guillotine_cross.txt
index f8ba5b50e..71769be81 100644
--- a/npc/re/jobs/3-1/guillotine_cross.txt
+++ b/npc/re/jobs/3-1/guillotine_cross.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Guillotine Cross Job Quest
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN r16945+
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Assassin / Assassin Cross -> Guillotine Cross.
diff --git a/npc/re/jobs/3-1/mechanic.txt b/npc/re/jobs/3-1/mechanic.txt
index 94792439d..c38d4608f 100644
--- a/npc/re/jobs/3-1/mechanic.txt
+++ b/npc/re/jobs/3-1/mechanic.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Mechanic Job Quest
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Jobchange Quest from Blacksmith / Whitesmith -> Mechanic.
diff --git a/npc/re/jobs/3-1/ranger.txt b/npc/re/jobs/3-1/ranger.txt
index e499b03b2..314f199d2 100644
--- a/npc/re/jobs/3-1/ranger.txt
+++ b/npc/re/jobs/3-1/ranger.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Ranger Job Quest
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Hunter / Sniper -> Ranger.
diff --git a/npc/re/jobs/3-1/warlock.txt b/npc/re/jobs/3-1/warlock.txt
index 8a8e1f0ce..9894eae4b 100644
--- a/npc/re/jobs/3-1/warlock.txt
+++ b/npc/re/jobs/3-1/warlock.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Warlock Job Quest
//===== By: ==================================================
//= Muad_Dib, Gepard & L0ne_W0lf
//===== Current Version: =====================================
//= 1.3a
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Wizard / High Wizard -> Warlock.
diff --git a/npc/re/jobs/3-2/genetic.txt b/npc/re/jobs/3-2/genetic.txt
index 1d0d8cbe9..bfa7d422c 100644
--- a/npc/re/jobs/3-2/genetic.txt
+++ b/npc/re/jobs/3-2/genetic.txt
@@ -1,15 +1,15 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Genetic Job Quest
-//===== By: ==================================================
+//===== By: ==================================================
//= Muad_Dib, Aeomin
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.3a
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Alchemist / Creator -> Genetic.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First Version. [Masao]
//= 1.1 Fixed Scatter Stuff NPCs [JayPee].
//= 1.2 Updated dialogue. Credits to Muad_Dib. [Joseph]
diff --git a/npc/re/jobs/3-2/minstrel.txt b/npc/re/jobs/3-2/minstrel.txt
index 9610e2c57..a9d584526 100644
--- a/npc/re/jobs/3-2/minstrel.txt
+++ b/npc/re/jobs/3-2/minstrel.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Minstrel Job Quest
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Bard / Clown -> Minstrel.
diff --git a/npc/re/jobs/3-2/royal_guard.txt b/npc/re/jobs/3-2/royal_guard.txt
index a7f21d763..614896133 100644
--- a/npc/re/jobs/3-2/royal_guard.txt
+++ b/npc/re/jobs/3-2/royal_guard.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Royal Guard Job Quest
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Crusader / Paladin -> Royal Guard.
diff --git a/npc/re/jobs/3-2/shadow_chaser.txt b/npc/re/jobs/3-2/shadow_chaser.txt
index 4f0fd02b6..f9d27dc84 100644
--- a/npc/re/jobs/3-2/shadow_chaser.txt
+++ b/npc/re/jobs/3-2/shadow_chaser.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Shadow Chaser Job Quest
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Rogue / Stalker -> Shadow Chaser.
diff --git a/npc/re/jobs/3-2/sorcerer.txt b/npc/re/jobs/3-2/sorcerer.txt
index 712e01452..71ec97e4b 100644
--- a/npc/re/jobs/3-2/sorcerer.txt
+++ b/npc/re/jobs/3-2/sorcerer.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Sorcerer Job Quest
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Sage / Professor -> Sorcerer.
diff --git a/npc/re/jobs/3-2/sura.txt b/npc/re/jobs/3-2/sura.txt
index b31719934..311e95ec1 100644
--- a/npc/re/jobs/3-2/sura.txt
+++ b/npc/re/jobs/3-2/sura.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Sura Job Quest
//===== By: ==================================================
//= Muad_Dib, Gepard
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Monk / Champion -> Sura.
diff --git a/npc/re/jobs/3-2/wanderer.txt b/npc/re/jobs/3-2/wanderer.txt
index 552c9d80b..41839b644 100644
--- a/npc/re/jobs/3-2/wanderer.txt
+++ b/npc/re/jobs/3-2/wanderer.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Wanderer Job Quest
//===== By: ==================================================
//= Muad_Dib, Meyraw
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Job change Quest from Dancer / Gypsy -> Wanderer.
diff --git a/npc/re/jobs/novice/novice.txt b/npc/re/jobs/novice/novice.txt
index 8d29ce2cc..ebefaff48 100644
--- a/npc/re/jobs/novice/novice.txt
+++ b/npc/re/jobs/novice/novice.txt
@@ -1,17 +1,2056 @@
-//===== Hercules Script =======================================
+//===== rAthena Script =======================================
//= New Novice Training Grounds
//===== By: ==================================================
-//= Streusel
+//= Kisuka
//===== Current Version: =====================================
-//= 1.0
+//= 1.4a
//===== Compatible With: =====================================
-//= Hercules
+//= rAthena SVN
//===== Description: =========================================
//= New Novice Training Grounds
//= [Hand Scripted (No Programs or AEGIS Scripts)]
//===== Additional Comments: =================================
-//= 1.0 First version. [Streusel]
+//= 1.0 First version. [Kisuka]
+//= 1.1 Updated warps, savepoints, NPC locations. [Kisuka]
+//= 1.2 Cleaning. [Euphy]
+//= 1.3 Fixed Eden Group Officer's level requirement. [Joseph]
+//= 1.4 Fixed checkquest to check quest accordingly. [Joseph]
+//= 1.4a Added 'npcskill' command. [Euphy]
//============================================================
-iz_int01,100,91,4 duplicate(Captain_Carew) Captain Carew#iz_int 873
-iz_int01,91,81,4 duplicate(Rumin) Rumin#iz_int01 99 \ No newline at end of file
+// Sprakki (Stard of Novice Training Ground, Outside Castle)
+//============================================================
+new_1-1,53,114,4 script Sprakki#nv1 90,{
+ if(job_novice_q < 1) {
+ mes "[Sprakki]";
+ mes "Hello there! Welcome to the World of Ragnarok Online. My name is Sprakki and I'm in charge of giving you basic gameplay tips.";
+ mes "Click on the [Next] button or press [Enter] to continue.";
+ next;
+ mes "[Sprakki]";
+ mes "First you need to learn the very basics of controlling your character.";
+ mes "All the basic ^4A4AFFmoves, selection of items, and attacks^000000 use the ^4A4AFFleft click of the mouse^000000.";
+ next;
+ cutin "tutorial01",3;
+ mes "-! Info !-";
+ mes "Click on the ground to move the character.";
+ mes "Attacking monsters and conversations with the people of this world can be done by simply clicking on them.";
+ next;
+ cutin "",255;
+ mes "[Sprakki]";
+ mes "First off, try moving around.";
+ mes "Do you see that wooden bridge to the right?";
+ next;
+ setquest 7117;
+ set job_novice_q,1;
+ mes "[Sprakki]";
+ mes "Walk over that bridge and there's a castle used as the Training Center.";
+ mes "I will be waiting for you inside of that Castle. Please come to the castle by yourself.";
+ next;
+ cutin "tutorial02",3;
+ mes "-! Info !-";
+ mes "You've received a quest from Sprakki.";
+ mes "You can check the contents of the quest in the Quest Info Window.";
+ next;
+ mes "[Sprakki]";
+ mes "I will wait inside the Training Center across the bridge.";
+ next;
+ mes "-! Info !-";
+ mes "You can open the Quest Info Window by pressing the ^4A4AFFALT + U^000000 keys at the same time.";
+ next;
+ cutin "",255;
+ mes "[Sprakki]";
+ mes "Have you checked the Quest Info Window?";
+ mes "I'll be waiting in the castle across the bridge.";
+ close;
+ }
+ mes "[Sprakki]";
+ mes "I will be waiting for you across the Bridge to the east.";
+ close;
+}
+
+// Sprakki (Inside Castle)
+//============================================================
+new_1-2,100,29,4 script Sprakki#nv2 90,{
+ if(job_novice_q < 1) {
+ mes "[Sprakki]";
+ mes "Hello there! Welcome to the World of Ragnarok Online. My name is Sprakki and I'm in charge of giving you basic gameplay tips.";
+ mes "Click on the [Next] button or press [Enter] to continue.";
+ next;
+ mes "[Sprakki]";
+ mes "First you need to learn the very basics of controlling your character.";
+ mes "All the basic ^4A4AFFmoves, selection of items, and attacks^000000 use the ^4A4AFFleft click of the mouse^000000.";
+ next;
+ cutin "tutorial01",3;
+ mes "-! Info !-";
+ mes "Click on the ground to move the character.";
+ mes "Attacking monsters and conversations with the people of this world can be done by simply clicking on them.";
+ next;
+ cutin "",255;
+ setquest 7117;
+ set job_novice_q,1;
+ mes "[Sprakki]";
+ mes "Well then, I will give you a quest to talk to me.";
+ mes "After the conversation is over, talk to me again by left-clicking on me.";
+ next;
+ cutin "tutorial02",3;
+ mes "-! Info !-";
+ mes "You've received a quest from Sprakki.";
+ mes "You can check the contents of the quest in the Quest Info Window by pressing the ^4A4AFFAlt + U^000000 keys at the same time.";
+ next;
+ cutin "",255;
+ mes "[Sprakki]";
+ mes "Have you checked the Quest Info Window?";
+ mes "Well, talk to me again.";
+ close;
+ }
+ if(job_novice_q == 1) {
+ getexp 300,0;
+ getexp 300,5;
+ completequest 7117;
+ set job_novice_q,2;
+ mes "[Sprakki]";
+ mes "Great!";
+ mes "Now you know how to move and talk to others, right?";
+ next;
+ }
+ mes "[Sprakki]";
+ mes "The training Center is prepared for novices just like you.";
+ mes "You are going to be trained to get used to the basics of the Game.";
+ next;
+ select("Begin Training.");
+ mes "[Sprakki]";
+ mes "I will guide you to the Novice Training Center.";
+ mes "Inside, Instructor 'Brade' will be waiting to speak to you.";
+ next;
+ setquest 7118;
+ set job_novice_q,3;
+ mes "[Sprakki]";
+ mes "Instructor 'Brade' will help you afterwards.";
+ mes "Please, Go see him.";
+ next;
+ mes "^4A4AFF- You received a quest 'Novice Training Ground-1' from Sprakki.^000000";
+ mes "^4A4AFFPlease check the Quest Info Window.-^000000";
+ close2;
+ savepoint "new_1-2",100,100;
+ warp "new_1-2",100,100;
+ end;
+}
+
+// Instructor Brade
+//============================================================
+new_1-2,100,105,4 script Brade#nv 733,{
+ if(job_novice_q < 3) {
+ mes "[Instructor Brade]";
+ mes "How did you get here?";
+ close2;
+ warp "new_1-1",53,111;
+ end;
+ }
+ else if(job_novice_q == 3) {
+ getexp 300,0;
+ getexp 300,0;
+ getexp 300,10;
+ completequest 7118;
+ set job_novice_q,4;
+ mes "[Instructor Brade]";
+ mes "Great.";
+ mes "You've completed the given quest successfully, so I will reward you with experience points.";
+ next;
+ mes "[Instructor Brade]";
+ mes "Experience Points you've earned from hunting or finishing quests can be checked by tracking the EXP Bar, located at the upper-left side of the display.";
+ next;
+ mes "[Instructor Brade]";
+ mes "Sigh... I will just talk roughly.";
+ mes "...I just can't get used to";
+ mes "'politeness' you know.";
+ mes "Don't look at me like that!";
+ next;
+ mes "[Instructor Brade]";
+ mes "Ok look alive you maggot.";
+ mes "Next up is items and equipment.";
+ next;
+ mes "[Instructor Brade]";
+ mes "First, take these.";
+ mes "These are very basic equipments and recovery potions.";
+ getitem 2352,1; // Novice_Plate
+ getitem 2510,1; // Novice_Hood
+ getitem 2414,1; // Novice_Boots
+ getitem 5055,1; // Novice_Egg_Cap
+ getitem 1243,1; // Novice_Knife
+ getitem 2112,1; // Novice_Guard
+ getitem 569,300; // Novice_Potion
+ setquest 7119;
+ set job_novice_q,5;
+ next;
+ mes "[Instructor Brade]";
+ mes "In the upper left Basic Info Window, press the 'Item' icon to open the Item Window.";
+ mes "The item window has 3 sections...";
+ next;
+ mes "[Instructor Brade]";
+ mes "Consumable items, equipment, and other items.";
+ mes "If you want to use or equip items, double-click on the item or drag them into the Equipment Window.";
+ next;
+ mes "[Instructor Brade]";
+ mes "You can see detailed info of each item by right-clicking on the item.";
+ mes "Do that and the info will pop-up in a separate window.";
+ next;
+ cutin "tutorial04",3;
+ mes "!- Info -!";
+ mes "Double-click on the item to see the detailed information.";
+ next;
+ mes "!- Info -!";
+ mes "Right-click on other players to show the Community Menu and you can join a party, request trades, etc.";
+ next;
+ cutin "",255;
+ mes "[Instructor Brade]";
+ mes "Why don't you equip the items I gave you earlier?";
+ mes "^4A4AFFDouble-Click^000000 on the item you want to equip. Let us continue after you are done gearing up.";
+ next;
+ cutin "tutorial03",3;
+ mes "!- Info -!";
+ mes "Items can be easily equipped or used by simply clicking on them.";
+ mes "The Hot Key to open the Item Window is Alt + E.";
+ next;
+ mes "!- Info -!";
+ mes "To check on the items that are currently equipped, use the hot key Alt + Q.";
+ mes "Or, drag the item on to the item slot you want the item to be equipped.";
+ next;
+ mes "!- Info -!";
+ mes "Equip all of the equipment given by Instructor Brade.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ else if(job_novice_q == 4) {
+ mes "[Instructor Brade]";
+ mes "Uh... Where were we? Oh right, let's continue.";
+ mes "It's about items and equipments.";
+ next;
+ mes "[Instructor Brade]";
+ mes "Take these.";
+ mes "Basic equipments and recovery potions.";
+ getitem 2352,1; // Novice_Plate
+ getitem 2510,1; // Novice_Hood
+ getitem 2414,1; // Novice_Boots
+ getitem 5055,1; // Novice_Egg_Cap
+ getitem 1243,1; // Novice_Knife
+ getitem 2112,1; // Novice_Guard
+ getitem 569,300; // Novice_Potion
+ setquest 7119;
+ set job_novice_q,5;
+ next;
+ mes "[Instructor Brade]";
+ mes "In the upper left Basic Info Window, press the 'Item' icon to open the Item Window.";
+ mes "The item window is divided into...";
+ next;
+ mes "[Instructor Brade]";
+ mes "3 sections: consumable items, equipment and other items.";
+ mes "If you want to use or equip items, double-click on the item or drag them into the Equipment Window.";
+ next;
+ mes "[Instructor Brade]";
+ mes "You can see detailed info of each item by right-clicking on the item.";
+ mes "Do that and the info will pop-up in a separate window.";
+ next;
+ cutin "tutorial04",3;
+ mes "!- Info -!";
+ mes "Double-click on the item to see the detailed information.";
+ next;
+ mes "!- Info -!";
+ mes "Right-click on other players to show the Community Menu and you can join a party, request trades, etc.";
+ next;
+ cutin "",255;
+ mes "[Instructor Brade]";
+ mes "Why don't you equip the items I gave you earlier?";
+ mes "^4A4AFFDouble-Click^000000 on the item you want to equip. Let us continue after you are done gearing up.";
+ next;
+ cutin "tutorial03",3;
+ mes "!- Info -!";
+ mes "Items can be easily equipped or used by simply clicking on them.";
+ mes "The Hot Key to open the Item Window is Alt + E.";
+ next;
+ mes "!- Info -!";
+ mes "To check on the items that are currently equipped, use the hot key Alt + Q.";
+ mes "Or, drag the item on to the item slot you want the item to be equipped.";
+ next;
+ mes "!- Info -!";
+ mes "Equip all of the equipment given by Instructor Brade.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ else if(job_novice_q == 5 || job_novice_q == 6) {
+ for(set .@i,1; .@i<7; set .@i,.@i+1)
+ if (getequipisequiped(.@i)) set .@EquipCheck, .@EquipCheck+1;
+ if(.@EquipCheck >= 4) {
+ if(job_novice_q == 5) {
+ mes "[Instructor Brade]";
+ mes "You are all set.";
+ mes "You are coming along just fine.";
+ getexp 300,0;
+ getexp 300,0;
+ getexp 300,0;
+ getexp 300,15;
+ getitem 12323,50; // N_Fly_Wing
+ getitem 12324,20; // N_Butterfly_Wing
+ completequest 7119;
+ set job_novice_q,6;
+ next;
+ mes "[Instructor Brade]";
+ mes "Here's some Fly Wings and Butterfly Wings as a reward.";
+ mes "You don't need these in the Training Ground, but they will come in handy later.";
+ next;
+ }
+ mes "[Instructor Brade]";
+ mes "Next, are Hot Keys.";
+ mes "Press the ^4A4AFF12 key^000000 on your keyboard.";
+ mes "A box with 9 slots will pop up.";
+ next;
+ mes "[Instructor Brade]";
+ mes "Drag on the right corner of the Hot Key Window and you will be able to see the other pages of the Hot Key.";
+ next;
+ mes "[Instructor Brade]";
+ mes "The F1 to F9 keys are the designated hotkeys.";
+ mes "Just drag a skill or an item onto the Hot Key Window and press a corresponding key to use them right away.";
+ next;
+ cutin "tutorial05",3;
+ mes "!- Info -!";
+ mes "You can register a skill or an item to the Hot Key Window by just dragging them onto the Hot Key Slot.";
+ next;
+ mes "!- Info -!";
+ mes "Registered Skills or Items can be used/equipped by just pressing the corresponding key.";
+ next;
+ mes "!- Info -!";
+ mes "You can customize the Hot Key to use any keys you please as the Hot Key by changing the Shortcut configuration in the options menu.";
+ next;
+ mes "!- Info -!";
+ mes "Register skills and items that you use often so that you can use them easily";
+ next;
+ cutin "",255;
+ mes "[Instructor Brade]";
+ mes "The last part is how to use Skills.";
+ mes "But before that, you need to learn something first.";
+ next;
+ setquest 7120;
+ set job_novice_q,7;
+ mes "[Instructor Brade]";
+ mes "Somewhere in this room, there's someone named ^4A4AFFJinha^000000.";
+ mes "Find Jinha and learn the ^4A4AFF[First Aid]^000000 skill from him.";
+ next;
+ mes "[Instructor Brade]";
+ mes "Your lesson is after that.";
+ mes "Go find Jinha and learn the [First Aid] Skill. Then come back to me.";
+ close;
+ }
+ mes "[Instructor Brade]";
+ mes "Try to put on at least 4 of the equipment I gave you.";
+ mes "Put those shoes on, wear those clothes, and arm yourself with that weapon you maggot.";
+ close;
+ }
+ else if(job_novice_q == 7) {
+ mes "[Instructor Brade]";
+ mes "Somewhere in this room, there's someone named ^4A4AFFJinha^000000.";
+ mes "Find Jinha and learn the ^4A4AFF[First Aid]^000000 skill from him.";
+ close;
+ }
+ else if(job_novice_q == 8) {
+ mes "[Instructor Brade]";
+ mes "Now you've learned the [First Aid] Skill.";
+ mes "Just as I told you before, by registering the First Aid Skill onto the Hot Key Window, you can use the skill fast and easy.";
+ next;
+ mes "[Instructor Brade]";
+ mes "And that's it, that's all I can teach you.";
+ mes "You see that exit to the west?";
+ mes "Move on to the next room and there will be another instructor waiting for you.";
+ next;
+ mes "[Instructor Brade]";
+ mes "We will be seeing each other soon enough.";
+ mes "But for now, go to the room to the west and get more information.";
+ next;
+ mes "[Instructor Brade]";
+ mes "You've come along fine this far.";
+ mes "This is not much, but that this as a reward.";
+ getitem 2393,1; // N_Adventurer's_Suit
+ completequest 7120;
+ set job_novice_q,9;
+ close;
+ }
+ else if(job_novice_q > 8) {
+ mes "[Instructor Brade]";
+ mes "Next step of the Training is done in the room west of here.";
+ mes "If you are lost, I can send you there.";
+ next;
+ if(select("I can get there by myself.:Please, send me to the next room.") == 2) {
+ mes "[Instructor Brade]";
+ mes "Oh well.";
+ mes "I think it's better than seeing you lost and wandering about.";
+ mes "Hahahaha...";
+ close2;
+ warp "new_1-2",41,172;
+ end;
+ }
+ mes "[Instructor Brade]";
+ mes "Good. That's the attitude you must have.";
+ mes "You can't just lean on others to help you.";
+ mes "Now, go ahead.";
+ close;
+ }
+ mes "[Instructor Brade]";
+ mes "Why are you still here?";
+ close2;
+ warp "prontera",156,90;
+ end;
+}
+
+// Instructor Jinha
+//============================================================
+new_1-2,115,120,4 script Jinha#nv 59,{
+ if(job_novice_q < 7) {
+ mes "[Jinha]";
+ mes "What can I help you with?";
+ mes "Hmm? You haven't followed the curriculum correctly.";
+ next;
+ mes "[Jinha]";
+ mes "You have to see Instructor Brade first before me. I will send you to Instructor Brade.";
+ close2;
+ warp "new_1-2",100,100;
+ end;
+ }
+ else if(job_novice_q == 7) {
+ mes "[Jinha]";
+ mes "Hello!";
+ mes "How can I help you?";
+ next;
+ select("I want to learn the use the [First Aid] Skill.");
+ mes "[Jinha]";
+ mes "That's right.";
+ mes "First Aid is the skill used to convert SP into HP when you are in danger.";
+ next;
+ specialeffect2 58;
+ specialeffect2 234;
+ mes "[Jinha]";
+ mes "It's recovery amount is small.";
+ mes "Still, it will help you not to faint from a critical hit.";
+ next;
+ skill "NV_FIRSTAID",1,0; // NV_FIRSTAID
+ set job_novice_q,8;
+ mes "[Jinha]";
+ mes "You can open the Skill Window by pressing the ^4A4AFFskill^000000 button in the Basic Window.";
+ mes "Hot Key is ^4A4AFFALT + S^000000.";
+ mes "Why don't you try the skill?";
+ next;
+ mes "[Jinha]";
+ mes "Good, now you know how to use the First Aid Skill, you have to move on to the next step.";
+ mes "Go back to Instructor Brade and show him what you've learned here.";
+ close;
+ }
+ else if(job_novice_q == 8) {
+ mes "[Jinha]";
+ mes "Didn't you learn the First Aid Skill already?";
+ mes "Have it checked by Instructor Brade.";
+ mes "If you don't know how to get to him, I will send you to him.";
+ next;
+ if(select("I'm good by myself.:Please, send me to him.") == 2) {
+ mes "[Jinha]";
+ mes "I will send you to Instructor Brade.";
+ close2;
+ warp "new_1-2",100,100;
+ end;
+ }
+ mes "[Jinha]";
+ mes "Very Good!";
+ mes "That's the right attitude!";
+ mes "You will be a great adventurer in the future.";
+ close;
+ }
+ else if(job_novice_q > 8) {
+ mes "[Jinha]";
+ mes "What can I do for you?";
+ mes "Next course will be continued in the West Room.";
+ mes "Go on to the west room.";
+ close;
+ }
+ mes "[Jinha]";
+ mes "Why are you still here?";
+ close2;
+ warp "prontera",156,90;
+ end;
+}
+
+// People/Services in Ragnarok
+//============================================================
+// ---------- Chocolat ----------
+new_1-2,32,172,4 script Chocolat#nv 96,{
+ if(job_novice_q < 9) {
+ mes "[Chocolat]";
+ mes "Hmm? Strange.";
+ mes "Let me see that Trainee ID for a sec.";
+ next;
+ mes "[Chocolat]";
+ mes "You were still on the basic course.";
+ mes "You should go back to Instructor Brade or Jinha.";
+ next;
+ mes "[Chocolat]";
+ mes "If you don't know how to find them, I can send you to Instructor Brade, How about it?";
+ next;
+ if(select("I will go myself.:Will you do that for me?") == 2) {
+ mes "[Chocolat]";
+ mes "Sure.";
+ mes "I will see you later.";
+ close2;
+ warp "new_1-2",100,100;
+ end;
+ }
+ mes "[Chocolat]";
+ mes "Sure. Go out to the door to the right.";
+ close;
+ }
+ else if(job_novice_q == 9) {
+ mes "[Chocolat]";
+ mes "I will tell you about the people you will be seeing in Town.";
+ mes "There are many kinds of people in town and some of them will be helpful to know.";
+ next;
+ mes "[Chocolat]";
+ mes "There are a lot of people in town, but among them, these people are the most important to know.";
+ next;
+ mes "[Chocolat]";
+ mes "They are [Kafra] Agents standing right behind me and their rival company the [Cool Event].";
+ mes "When you visit a town for the first time, you should talk to Information [Soldier].";
+ next;
+ mes "[Chocolat]";
+ mes "Well then, let's hear from each of them.";
+ mes "Start by talking to the [Kafra] agent.";
+ setquest 7121;
+ set job_novice_q,10;
+ close;
+ }
+ else if(job_novice_q == 10) {
+ mes "[Chocolat]";
+ mes "Here, talk to these guys standing behind me.";
+ mes "Start with the [Kafra] gal behind me.";
+ close;
+ }
+ else if(job_novice_q == 11) {
+ mes "[Chocolat]";
+ mes "You've learned a lot about Kafra service huh?";
+ mes "From now on, you can use the Kafra Server.";
+ next;
+ mes "[Chocolat]";
+ mes "Next is Kafra's rival, [Cool Event] Staff!";
+ mes "[Cool Event] Staff specialize in events.";
+ mes "Well, why don't you talk to him yourself?";
+ close;
+ }
+ else if(job_novice_q == 12) {
+ mes "[Chocolat]";
+ mes "After [Kafra] and [Cool Event], are the Information [Soldier]s.";
+ mes "They can seem insignificant but they can help you greatly when the time comes.";
+ next;
+ mes "[Chocolat]";
+ mes "I've brought the Information Soldier from the City of Prontera.";
+ mes "Ask him what he actually does in town.";
+ close;
+ }
+ else if(job_novice_q == 13) {
+ mes "[Chocolat]";
+ mes "How was the guide of the Information [Soldier]?";
+ mes "Last is about using [Inn]s.";
+ mes "There's an Inn located in each town.";
+ next;
+ mes "[Chocolat]";
+ mes "You can rest at Inns or Hotels for a small fee.";
+ mes "Your HP and SP will be recovered completely by resting there.";
+ mes "Can't hurt to use one, eh?";
+ next;
+ mes "[Chocolat]";
+ mes "Besides these guys, there's many merchants selling various kind of items, so go check them out.";
+ completequest 7121;
+ getexp 300,0;
+ getexp 300,0;
+ getexp 300,0;
+ getexp 300,0;
+ getexp 300,0;
+ getexp 300,20;
+ getitem 7059,20; // Cargo_Free_Ticket
+ getitem 7060,30; // Warp_Free_Ticket
+ set job_novice_q,14;
+ next;
+ mes "[Chocolat]";
+ mes "You've completed all the quests I gave you.";
+ mes "As the reward, I will give you Free Tickets for Kafra Storage and Teleport Service.";
+ mes "They will come in handy.";
+ next;
+ mes "[Chocolat]";
+ mes "That's all for me.";
+ mes "Now, it's time for real combat!";
+ next;
+ mes "[Chocolat]";
+ mes "Real Combat Training will be given by Instructor Brade. You met him earlier.";
+ mes "I will send you to the Real Combat Training Field.";
+ close2;
+ savepoint "new_1-3",96,21;
+ warp "new_1-3",96,21;
+ end;
+ }
+ else if(job_novice_q > 13) {
+ mes "[Chocolat]";
+ mes "What can I do for you?";
+ next;
+ select("");
+ mes "[Chocolat]";
+ mes "I will send you to the Real Combat Training Field right away.";
+ close2;
+ savepoint "new_1-3",96,21;
+ warp "new_1-3",96,21;
+ end;
+ }
+ mes "[Chocolat]";
+ mes "Why are you still here?";
+ close2;
+ warp "prontera",156,90;
+ end;
+}
+
+// ---------- Kafra ----------
+new_1-2,29,176,4 script Kafra#nv 117,{
+ if(job_novice_q < 10) {
+ mes "[Kafra Agent]";
+ mes "Hello.";
+ mes "I don't think it's my turn yet.";
+ mes "Please talk to 'Chocolat' first.";
+ close;
+ }
+ else if(job_novice_q == 10) {
+ mes "[Kafra Agent]";
+ mes "Hello.";
+ mes "I've been dispatched by the Kafra Head Office to help Trainees.";
+ mes "The Kafra Corporation is the world's largest company with a long and distinguished history on the Rune Midgard continent.";
+ mes "It's important for you adventurers to be close with us.";
+ next;
+ mes "[Kafra Agent]";
+ mes "I will inform you about the Kafra Services which you will be using most frequently, [Save], [Storage], and [Teleport] Services.";
+ next;
+ mes "[Kafra Agent]";
+ mes "When you talk to a Kafra Agent and ask for the Save Service, the location of where you will revive, after being defeated in battle, will be changed.";
+ next;
+ mes "[Kafra Agent]";
+ mes "Your Respawn Point is always the last place where you have saved.";
+ mes "Using a Butterfly Wing will return you to the place where you last saved.";
+ mes "This service is free to use, so feel free to use the Save Service anytime you like.";
+ next;
+ mes "[Kafra Agent]";
+ mes "Next is the Storage Service.";
+ mes "You can store and retrieve your items in any town at your convenience.";
+ next;
+ mes "[Kafra Agent]";
+ mes "It's unreasonable to carry all of your items with you when you don't need them right away.";
+ mes "Please use our Storage and keep your items safe and secure.";
+ next;
+ mes "[Kafra Agent]";
+ mes "Our convenient Storage Service is provided to our customers for a small fee which is different from town to town.";
+ mes "However, you must be at least ^4A4AFFBasic Skill Level 6^000000 to use the Storage.";
+ next;
+ mes "[Kafra Agent]";
+ mes "There are 7 different item sections of the Storage into which items are organized: Consumable, Kafra (Item Mall), Armor, Weapons, Ammo, Cards, and Etc items.";
+ next;
+ mes "[Kafra Agent]";
+ mes "There are a maximum of 600 Inventory Slots in Kafra Storage, meaning you can have up to 600 different kinds of total items in Storage.";
+ next;
+ mes "[Kafra Agent]";
+ mes "If you have a Premium Subscription, the maximum Inventory Slots in Kafra Storage is 600!";
+ mes "Remember though, that in the case of Equipment, each item takes up one Inventory Slot.";
+ mes "The maximum number of items that can be placed in Kafra Storage is 30,000.";
+ next;
+ mes "[Kafra Agent]";
+ mes "Storage is shared by everyone character on one account.";
+ mes "Storage Fees can vary for each Town.";
+ mes "So please keep that in mind when you are using our storage service.";
+ next;
+ mes "[Kafra Agent]";
+ mes "We also provide you with a Teleport Service to make your trips easier when you are trying to move a long distance.";
+ next;
+ mes "[Kafra Agent]";
+ mes "With our veteran teleporter's skill, your trip will be safer and more comfortable.";
+ mes "Oh and remember that the places you can teleport to vary from town to town.";
+ next;
+ mes "[Kafra Agent]";
+ mes "This is all for your never ending support. We are working hard to repay our debt to our customers.";
+ next;
+ mes "[Kafra Agent]";
+ mes "Do you want to hear another explanation?";
+ set job_novice_q,11;
+ next;
+ }
+ else {
+ mes "[Kafra Agent]";
+ mes "Kafra Service at your service";
+ mes "What can I do for you?";
+ next;
+ select("About Kafra Service");
+ mes "[Kafra Agent]";
+ mes "I will explain about the Kafra Service.";
+ mes "Which service do you want to be informed about?";
+ next;
+ }
+
+ while(1) {
+ switch(select("About Save:About Storage:About Teleport:About Cart:No More.")) {
+ case 1:
+ mes "[Kafra Agent]";
+ mes "When you are killed in battle, you can revive in the location you saved with this service.";
+ mes "If you save at a Kafra in a village, you can revive in the village you saved.";
+ next;
+ mes "[Kafra Agent]";
+ mes "Saved location is always where you saved last, and by using a Butterfly Wing, you can teleport directly to your saved point.";
+ mes "So feel free to use this service.";
+ next;
+ break;
+ case 2:
+ mes "[Kafra Agent]";
+ mes "Next is the Storage Service.";
+ mes "You can store and retrieve your items in any town at your convenience.";
+ next;
+ mes "[Kafra Agent]";
+ mes "It's unreasonable to carry all of your items with you when you don't need them right away.";
+ mes "Please use our Storage and keep your items safe and secure.";
+ next;
+ mes "[Kafra Agent]";
+ mes "Our convenient Storage Service is provided to our customers for a small fee which is different from town to town.";
+ mes "However, you must be at least ^4A4AFFBasic Skill Level 6^000000 to use the Storage.";
+ next;
+ mes "[Kafra Agent]";
+ mes "There are 7 different item sections of the Storage into which items are organized: Consumable, Kafra (Item Mall), Armor, Weapons, Ammo, Cards, and Etc items.";
+ next;
+ mes "[Kafra Agent]";
+ mes "There are a maximum of 600 Inventory Slots in Kafra Storage, meaning you can have up to 600 different kinds of total items in Storage.";
+ next;
+ mes "[Kafra Agent]";
+ mes "If you have a Premium Subscription, the maximum Inventory Slots in Kafra Storage is 600!";
+ mes "Remember though, that in the case of Equipment, each item takes up one Inventory Slot.";
+ mes "The maximum number of items that can be placed in Kafra Storage is 30,000.";
+ next;
+ mes "[Kafra Agent]";
+ mes "Storage is shared by everyone character on one account.";
+ mes "Storage Fees can vary for each Town.";
+ mes "So please keep that in mind when you are using our storage service.";
+ next;
+ break;
+ case 3:
+ mes "[Kafra Agent]";
+ mes "We also provide you with a Teleport Service to make your trips easier when you are trying to move a long distance.";
+ next;
+ mes "[Kafra Agent]";
+ mes "With our veteran teleporter's skill, your trip will be safer and more comfortable.";
+ mes "Oh and remember that the places you can teleport to vary from town to town.";
+ next;
+ mes "[Kafra Agent]";
+ mes "This is all for your never ending support. We are working hard to repay our debt to our customers.";
+ next;
+ break;
+ case 4:
+ mes "[Kafra Agent]";
+ mes "The Kafra corporation provides Cart rental services to customers engaged in commercial business.";
+ mes "Originally this cart rental service had been only provided by the merchant guild in Alberta.";
+ next;
+ mes "[Kafra Agent]";
+ mes "However, since we took over this service, our merchant customers have been able to rent carts from almost anywhere.";
+ mes "The cart rental service is available only for job classes engaged in commercial business such as ^4A4AFFMerchants, Blacksmiths, Alchemists, and Super Novices^000000.";
+ next;
+ mes "[Kafra Agent]";
+ mes "Of course you should learn the 'Pushcart' skill beforehand, otherwise you will not be able to rent a cart from us.";
+ mes "The rental fee varies by town, please keep that in mind.";
+ next;
+ break;
+ case 5:
+ mes "[Kafra Agent]";
+ mes "I hope you are satisfied with my explanation about the Kafra Service.";
+ close;
+ }
+ }
+}
+
+// ---------- Cool Event Staff ----------
+new_1-2,32,176,4 script Cool Event Staff#nv 874,{
+ if(job_novice_q < 11) {
+ mes "[Cool Event Staff]";
+ mes "This is not my turn.";
+ mes "You finished talking to Kafra yet?";
+ close;
+ }
+ else if(job_novice_q == 11) {
+ mes "[Cool Event Staff]";
+ mes "Hello.";
+ mes "We are working hard to provide events on Rune Midgard similar to the Kafra service.";
+ next;
+ mes "[Cool Event Staff]";
+ mes "Our staff is here to support you with [storage], [save], and [teleport] services.";
+ next;
+ mes "[Cool Event Staff]";
+ mes "If there's no Kafra around you, we're around to help you.";
+ next;
+ mes "[Cool Event Staff]";
+ mes "We are working hard on a network of Events to make your life better.";
+ mes "I hope that you can meet our staff in Alberta.";
+ next;
+ mes "[Cool Event Staff]";
+ mes "Who knows, we might meet outside of this academy.";
+ next;
+ mes "[Cool Event Staff]";
+ mes "Mostly all of us wear red coats in the places that the Kafra Staff don't work for.";
+ set job_novice_q,12;
+ close;
+ }
+ mes "[Cool Event Staff]";
+ mes "Most of our services are similar to those of Kafra.";
+ close;
+}
+
+// ---------- Soldier ----------
+new_1-2,35,176,4 script Soldier#nv 105,{
+ if(job_novice_q < 12) {
+ mes "[Soldier]";
+ mes "It isn't my turn yet.";
+ mes "Listen to Chocolat.";
+ close;
+ }
+ else if(job_novice_q == 12) {
+ mes "[Soldier]";
+ mes "Soldiers are in each town to guide you to useful places.";
+ mes "Ask us where you want to go and we'll mark your mini maps with a ^4A4AFF+^000000.";
+ mes "Don't hesitate to ask us questions.";
+ next;
+ mes "[Soldier]";
+ mes "We all don't look the same in every town but our roles are the same.";
+ mes "Take note of this whenever you go to a new town.";
+ next;
+ mes "[Soldier]";
+ mes "If you want to go to your first town, you can do so once you have reached Base Level 11 in the training grounds.";
+ set job_novice_q,13;
+ close;
+ }
+ mes "[Soldier]";
+ mes "What can I help you with?";
+ mes "Need me to explain what I do again?";
+ next;
+ if(select("Yes, I need an explanation.:Nope") == 2) {
+ mes "[Soldier]";
+ mes "Ok well talk to Chocolat if you're done talking with us.";
+ close;
+ }
+ mes "[Soldier]";
+ mes "Soldiers are in each town to guide you to useful places.";
+ mes "Ask us where you want to go and we'll mark your mini maps with a ^4A4AFF+^000000.";
+ mes "Don't hesitate to ask us questions.";
+ next;
+ mes "[Soldier]";
+ mes "We all don't look the same in every town but our roles are the same.";
+ mes "Take note of this whenever you go to a new town.";
+ next;
+ mes "[Soldier]";
+ mes "If you want to go to your first town, you can do so once you have reached Base Level 11 in the training grounds.";
+ close;
+}
+
+// Instructor Brade (Real Combat Training)
+//============================================================
+- script Brade#nv::NvBrade 733,{
+ if(job_novice_q < 14) {
+ mes "[Brade]";
+ mes "How did you get here?";
+ close2;
+ warp "new_1-2",100,100;
+ end;
+ }
+ else if(job_novice_q == 14) {
+ mes "[Brade]";
+ mes "Welcome.";
+ mes "Now this is real practice.";
+ mes "We can practice real battle here.";
+ next;
+ mes "[Brade]";
+ mes "As I explained the first time, we can click on the monsters.";
+ mes "One attack per click.";
+ next;
+ mes "[Brade]";
+ mes "For convenience,";
+ mes "^4A4AFFIf you hold down the Ctrl key,^000000";
+ mes "while attacking, you will automatically attack.";
+ next;
+ mes "[Brade]";
+ mes "You can also set this mode before battle by typing ^4A4AFF[ /nc ]^000000.";
+ next;
+ mes "[Brade]";
+ mes "Then, let's go Poring hunting.";
+ mes "Please hunt Poring's on Level 1 of the training grounds.";
+ setquest 7122;
+ set job_novice_q,15;
+ getitem 569,100; // Novice_Potion
+ next;
+ mes "^4A4AFF- You've received a quest from Instructor Brade.^000000";
+ mes "^4A4AFFPlease check the quest information window. -^000000";
+ close;
+ }
+ else if(job_novice_q == 15) {
+ if(checkquest(7122,HUNTING) == 2) {
+ mes "[Brade]";
+ mes "You can see it is not so hard, right?";
+ mes "Nice job.";
+ getitem 13040,1; // N_Cutter
+ getexp 1000,0;
+ getexp 1000,0;
+ getexp 1000,30;
+ completequest 7122;
+ set job_novice_q,16;
+ next;
+ mes "[Brade]";
+ mes "Now all of the courses are almost done.";
+ mes "You are a Novice, and you can't get any jobs yet.";
+ next;
+ mes "[Brade]";
+ mes "If you acquire all of basic skills with Job Level 10, you can change your job.";
+ next;
+ mes "[Brade]";
+ mes "The first job classes are defined into 6 classes.";
+ next;
+ mes "[Brade]";
+ mes "The 6 basic jobs are";
+ mes "Swordman, Thief,";
+ mes "Acolyte, Mage,";
+ mes "Archer and Merchant.";
+ next;
+ mes "[Brade]";
+ mes "Let's experience the basic 6 jobs, Swordman, Thief, Acolyte, Mage, Archer and Merchant and see what those jobs can do.";
+ next;
+ mes "[Brade]";
+ mes "Behind me, there are people dispatched from each of the basic Job Guilds.";
+ mes "These people will give you instruction manuals that allow you to experience some limited skills of each job.";
+ next;
+ mes "[Brade]";
+ mes "Equip a manual of the job which you want to experience, and you will be able to use some basic skills of that corresponding job.";
+ mes "Try those skills and decide which job to choose.";
+ close;
+ }
+ mes "[Brade]";
+ mes "Kill enough Porings.";
+ mes "Porings are easy to deal with, so cheer up.";
+ mes "Try again.";
+ npcskill "AL_HEAL",10,99,60;
+ close;
+ }
+ mes "[Brade]";
+ mes "Have you tried the skills in the Manuals?";
+ mes "If you want to hear information about each job, talk to the people dispatched by the Job Guilds.";
+ next;
+ mes "[Brade]";
+ mes "I think you've learned enough, if you want to learn more, then speak to the Eden Group girl next to the Trainers.";
+ next;
+ mes "[Brade]";
+ mes "Try using the job manuals to find out the characteristics of each job's skills.";
+ mes "I will restore your HP and SP... Keep it up.";
+ npcskill "AL_HEAL",10,99,60;
+ close;
+}
+
+new_1-3,96,30,4 duplicate(NvBrade) Brade#nv1 733
+new_2-3,96,30,4 duplicate(NvBrade) Brade#nv2 733
+new_3-3,96,30,4 duplicate(NvBrade) Brade#nv3 733
+new_4-3,96,30,4 duplicate(NvBrade) Brade#nv4 733
+new_5-3,96,30,4 duplicate(NvBrade) Brade#nv5 733
+
+// Job Guides (Real Combat Training)
+//============================================================
+// --------------------------- Deletion Function ------------------------------
+function script F_NvErase {
+ if (getarg(0,0)) {
+ if (checkquest(7123) == 0 || checkquest(7123) == 1) erasequest 7123;
+ if (checkquest(7124) == 0 || checkquest(7124) == 1) erasequest 7124;
+ if (checkquest(7126) == 0 || checkquest(7126) == 1) erasequest 7126;
+ if (checkquest(7127) == 0 || checkquest(7127) == 1) erasequest 7127;
+ }
+ nude;
+ if (countitem(2819)) delitem 2819,1; // Swordsman_Manual
+ if (countitem(2820)) delitem 2820,1; // Thief_Manual
+ if (countitem(2821)) delitem 2821,1; // Acolyte_Manual
+ if (countitem(2822)) delitem 2822,1; // Archer_Manual
+ if (countitem(2823)) delitem 2823,1; // Merchant_Manual
+ if (countitem(2824)) delitem 2824,1; // Mage_Manual
+ return;
+}
+
+// ---------------------------- Swordman Guide -------------------------------
+- script Swordman Guide#nv::NvSwd 728,{
+ if(job_novice_q < 16) {
+ mes "[Swordman Guildsman]";
+ mes "I won't help you until you finish Brade's instructions.";
+ close;
+ }
+ mes "[Swordman Guildsman]";
+ mes "Can I help you?";
+ next;
+ switch(select("About Swordman Class.:Job change to Swordman.:Got any quests?:Cancel.")) {
+ case 1:
+ mes "[Swordman Guildsman]";
+ mes "Literally, Swordman means one, who is specialized in wielding swords.";
+ mes "But they can also choose to use spears if they so choose.";
+ next;
+ mes "[Swordman Guildsman]";
+ mes "We possess strong physical strength.";
+ mes "So naturally we can equip heavy armors and weapons.";
+ mes "Most weapon classes, except for bows and rods, are equippable by our class.";
+ next;
+ mes "[Swordman Guildsman]";
+ mes "The only weakness of the Swordman class is that they cannot use magic spells.";
+ mes "But we've compensated for that by using elemental weapons.";
+ next;
+ mes "[Swordman Guildsman]";
+ mes "The merits of being a Swordman is the enormous amount of HP we have.";
+ mes "Most of us can bear the grunt of our enemies' attacks with relative ease.";
+ next;
+ mes "[Swordman Guildsman]";
+ mes "And we are unrivaled when it comes to one-on-one melee combat.";
+ next;
+ mes "[Swordman Guildsman]";
+ mes "Anyone who chooses to be a Swordman will likely play the role of the tank. It is our duty to protect the weak.";
+ next;
+ mes "[Swordman Guildsman]";
+ mes "As a Swordman you can advance to a ^8C2121Knight^000000 or ^8C2121Crusader^000000 class as your 2nd class profession.";
+ mes "And just recently third professions have been discovered.";
+ if(countitem(2819) == 0 && (getequipid(EQI_ACC_L) != 2819 || getequipid(EQI_ACC_R) != 2819)) {
+ next;
+ mes "[Swordman Guildsman]";
+ mes "If you're interested in being a Swordman, I'll offer you this manual.";
+ mes "Do you want to try the skills of a Swordman?";
+ next;
+ if(select("I'll try the Swordman skills.:No Thanks.") == 2) {
+ mes "[Swordman Guildsman]";
+ mes "Hum. Do you think so?";
+ mes "Ok, I agree with you. Choosing a job is very important in our lives.";
+ mes "Just talk to me whenever you want to experience Swordman skills.";
+ close;
+ }
+ mes "[Swordman Guildsman]";
+ mes "Here is the Swordman manual.";
+ mes "I'll just take any manuals from any other classes you have.";
+ callfunc "F_NvErase";
+ getitem 2819,1; // Swordsman_Manual
+ next;
+ mes "[Swordman Guildsman]";
+ mes "After equipping the Manual, open your Skill menu by pressing ALT+S.";
+ mes "Make sure to minimize your Skill tree by clicking the '-' button on the top right corner of the Skill Tree Window.";
+ }
+ close;
+ case 2:
+ mes "[Swordman Guildsman]";
+ mes "Do you really want to change your job to Swordman?";
+ mes "If you want to be a Swordman, I'll send you to the Swordman Guild immediately.";
+ next;
+ mes "[Swordman Guildsman]";
+ mes "I think you have enough job levels, of course, right?";
+ mes "Do you want to stop your training now and go to the Swordman Guild?";
+ next;
+ if(select("I'll consider it again.:I'll go to the Swordman Guild.") == 2) {
+ mes "[Swordman Guildsman]";
+ mes "I see.";
+ mes "Then I'll end your training process and send you to the Swordman Guild.";
+ close2;
+ callfunc "F_NvErase",1;
+ savepoint "izlude",94,103;
+ warp "izlude_in",74,167;
+ end;
+ }
+ mes "[Swordman Guildsman]";
+ mes "Please try enough instruction manuals from each job class and consider it carefully.";
+ mes "Of course, you're always welcomed.";
+ close;
+ case 3:
+ set .@quest, checkquest(7123);
+ if (.@quest == -1) {
+ mes "[Swordman Guildsman]";
+ mes "You want me to give you a quest?";
+ mes "Umm. Let me see.";
+ mes "Ok! Hunt a couple of Picky monsters around here.";
+ next;
+ mes "^4d4dffYou received a hunting request from a staff of the Swordman Guild.";
+ mes "You can check the contents of the quest from the quest information window.^000000";
+ setquest 7123;
+ next;
+ mes "[Swordman Guildsman]";
+ mes "Use the 'Bash' skill in the Swordman manual.";
+ mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimize the window by pressing the '-' button on the top right corner of the window to see the available Swordman skills.";
+ next;
+ mes "[Swordman Guildsman]";
+ mes "Talk to Trainer Brutus if you want to fight stronger monsters.";
+ mes "I'll wait for you here.";
+ mes "Wish you a good luck.";
+ close;
+ }
+ else if (.@quest == 1) {
+ if (checkquest(7123,HUNTING) == 2) {
+ mes "[Swordman Guildsman]";
+ mes "Great.";
+ mes "I think that you're good enough to be a Swordman.";
+ mes "I'll give you some potions as a reward.";
+ completequest 7123;
+ getitem 569,200; // Novice_Potion
+ getexp 5000,100;
+ close;
+ }
+ mes "[Swordman Guildsman]";
+ mes "Hunt two Picky monsters.";
+ mes "You can find them in the more difficult training grounds by talking to Trainer Brutus.";
+ close;
+ }
+ else if (.@quest == 2) {
+ mes "[Swordman Guildsman]";
+ mes "I think you finished that quest already, right?";
+ mes "You'll experience more of these quests as you grow as an adventurer in the world.";
+ next;
+ mes "[Swordman Guildsman]";
+ mes "Your training is now complete.";
+ mes "If you choose to become a Swordman I wish you goodluck.";
+ close;
+ }
+ mes "[Swordman Guildsman]";
+ mes "I'm sorry but I don't have any quests to give you right now.";
+ close;
+ case 4:
+ mes "[Swordman Guildsman]";
+ mes "If you have any questions about the Swordman class, please ask me.";
+ mes "The Swordman Guild is waiting for novices like you.";
+ close;
+ }
+}
+
+new_1-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv1 728
+new_2-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv2 728
+new_3-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv3 728
+new_4-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv4 728
+new_5-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv5 728
+
+// ---------------------------- Mage Guide ----------------------------------
+- script Mage Guide#nv::NvMag 123,{
+ if(job_novice_q < 16) {
+ mes "[Mage Guild Member]";
+ mes "You are still in the process of training with Instructor Brade.";
+ close;
+ }
+ mes "[Mage Guild Member]";
+ mes "What can I help you with?";
+ next;
+ switch(select("Tell me about Mages:I want to be a Mage:Give me a Quest:Cancel")) {
+ case 1:
+ mes "[Mage Guild Member]";
+ mes "Mages are those who can use magic when they need to protect their friends.";
+ mes "Mages can curse enemies using the elements of fire, water, earth and thunder magic.";
+ next;
+ mes "[Mage Guild Member]";
+ mes "However they cannot equip other weapons but staffs and books.";
+ mes "Because they are too delicate to carry heavy weapons.";
+ next;
+ mes "[Mage Guild Member]";
+ mes "But they can cover this weakness by their remarkable magic skills.";
+ mes "That is why many people want to become a Mage!";
+ next;
+ mes "[Mage Guild Member]";
+ mes "Mages have to be in their guild for guild's power and honor.";
+ mes "This is one of the reasons why Mages are popular in any parties and guilds.";
+ mes "Why don't you become a Mage?";
+ next;
+ mes "[Mage Guild Member]";
+ mes "^8C2121Mages can transform to Wizards or Sages as their second job.^000000";
+ if(countitem(2824) == 0 && (getequipid(EQI_ACC_L) != 2824 || getequipid(EQI_ACC_R) != 2824)) {
+ next;
+ mes "[Mage Guild Member]";
+ mes "Do you want to register to experience how it is to be a Mage?";
+ mes "Would you like to test Mage skills?";
+ next;
+ if(select("I want to test Mage skills.:I don't want to test it.") == 2) {
+ mes "[Mage Guild Member]";
+ mes "Hum. Do you think so.";
+ mes "Ok, I agree with you. Choosing a job is very important in our life.";
+ mes "Just talk to me whenever you want to experience Mage skills.";
+ close;
+ }
+ mes "[Mage Guild Member]";
+ mes "Here is the Mage Manual.";
+ mes "I will take the other job registration forms and manuals from you.";
+ next;
+ mes "[Mage Guild Member]";
+ mes "Here is the Mage Manual.";
+ mes "I will take the other job registration forms and manuals from you.";
+ callfunc "F_NvErase";
+ getitem 2824,1; // Mage_Manual
+ next;
+ mes "[Mage Guild Member]";
+ mes "After equipping the Manual, open your Skill menu by pressing ALT+S.";
+ mes "Make sure to minimize your Skill tree by clicking the '-' button on the top right corner of the Skill Tree Window.";
+ }
+ close;
+ case 2:
+ mes "[Mage Guild Member]";
+ mes "You want to be a Mage?";
+ mes "Ok, then, I will send you to the Mage Guild union in Geffen right away.";
+ next;
+ mes "[Mage Guild Member]";
+ mes "Wait, have you checked your Job level?";
+ mes "Do you want to complete your Novice training and go straight to the Mage Guild's union?";
+ next;
+ if(select("I will think about it again.:Yes, complete my training.") == 2) {
+ mes "[Mage Guild Member]";
+ mes "Welcome!!";
+ mes "I will send you to the Mage Guilds union after you complete your Novice training.";
+ close2;
+ callfunc "F_NvErase",1;
+ savepoint "geffen",119,38;
+ warp "geffen_in",163,98;
+ end;
+ }
+ mes "[Mage Guild Member]";
+ mes "Please test what Mage skills are all about before you decide.";
+ mes "We are always welcome to have you!";
+ close;
+ case 3:
+ set .@quest, checkquest(7124);
+ if (.@quest == -1) {
+ mes "[Mage Guild Member]";
+ mes "Huh? Quest?";
+ mes "Hmm... What would be suited for you...?";
+ mes "Would you like to hunt Lunatics by using Bolt skills?";
+ next;
+ mes "^4d4dffYou have received a Hunting quest from the Mage Guide.";
+ mes "You can get more information about the quest from the quest window.^000000";
+ setquest 7124;
+ next;
+ mes "[Mage Guild Member]";
+ mes "You are able to use 'Fire Bolt' skill that is shown on the Mage manual.";
+ mes "I will wait for you here.";
+ mes "Good luck!";
+ close;
+ }
+ else if (.@quest == 1) {
+ if (checkquest(7124,HUNTING) == 2) {
+ mes "[Mage Guild Member]";
+ mes "You have done excellent job.";
+ mes "So, did you find any interests about Mages?";
+ mes "Alright. I will give something...";
+ mes "Here are Novice Butterfly Wings, please take them.";
+ completequest 7124;
+ getitem 12324, 30; // N_Butterfly_Wing
+ getexp 5000,100;
+ close;
+ }
+ mes "[Mage Guild Member]";
+ mes "The quest is that you have to";
+ mes "hunt Lunatics and bring 5 clovers.";
+ close;
+ }
+ else if (.@quest == 2) {
+ mes "[Mage Guild Member]";
+ mes "You have already completed the quest.";
+ mes "Once you enter the main world, you can get various exciting quests there!";
+ next;
+ mes "[Mage Guild Member]";
+ mes "This should be enough for your training.";
+ close;
+ }
+ mes "[Mage Guild Member]";
+ mes "I'm sorry but I don't have any quests to give you right now.";
+ close;
+ case 4:
+ mes "[Mage Guild Member]";
+ mes "If you have any questions about Mages, feel free to ask me.";
+ mes "I think you could be a intelligent Mage...";
+ close;
+ }
+}
+
+new_1-3,101,41,4 duplicate(NvMag) Mage Guide#nv1 123
+new_2-3,101,41,4 duplicate(NvMag) Mage Guide#nv2 123
+new_3-3,101,41,4 duplicate(NvMag) Mage Guide#nv3 123
+new_4-3,101,41,4 duplicate(NvMag) Mage Guide#nv4 123
+new_5-3,101,41,4 duplicate(NvMag) Mage Guide#nv5 123
+
+// ---------------------------- Thief Guide ---------------------------------
+- script Thief Guide#nv::NvThf 118,{
+ if(job_novice_q < 16) {
+ mes "[Thief Guild Member]";
+ mes "You look like you are not done with Instructor Brade's lessons.";
+ close;
+ }
+ mes "[Thief Guild Member]";
+ mes "How can I help you?";
+ next;
+ switch(select("About the Thief Class.:I want to be a Thief.:Got any Quests?:Cancel.")) {
+ case 1:
+ mes "[Thief Guild Member]";
+ mes "Thieves are experts at using Dagger class weapons.";
+ mes "They strike quickly and easily evade attacks from their enemies.";
+ next;
+ mes "[Thief Guild Member]";
+ mes "Thieves can learn skills that allow them to hide from their enemies or steal items from monsters.";
+ mes "They are also feared for their use of poison, which slowly weakens their enemies.";
+ next;
+ mes "[Thief Guild Member]";
+ mes "In jeopardy, or in the case that thieves do not want to reveal themselves, they can use their skill to hide themselves easily.";
+ next;
+ mes "[Thief Guild Member]";
+ mes "Thieves can change their jobs to ^8C2121Assassins^000000 or ^8C2121Rogues.^000000";
+ if(countitem(2820) == 0 && (getequipid(EQI_ACC_L) != 2820 || getequipid(EQI_ACC_R) != 2820)) {
+ next;
+ mes "[Thief Guild Member]";
+ mes "If you want, I'll give you a Thief skill manual.";
+ mes "Would you like to experience the skills of a Thief?";
+ next;
+ if(select("Yes, I would.:No, I don't.") == 2) {
+ mes "[Thief Guild Member]";
+ mes "Oh, are you sure?";
+ mes "Class selection is very important so please consider it carefully.";
+ mes "If you want to ask about Thieves, please talk to me any time.";
+ close;
+ }
+ mes "[Thief Guild Member]";
+ mes "Here, please take the Thief manual.";
+ mes "I'll just take the other class manuals while I'm at it.";
+ next;
+ mes "[Thief Guild Member]";
+ mes "Here, please take the Thief manual.";
+ mes "I'll just take the other class manuals while I'm at it.";
+ callfunc "F_NvErase";
+ getitem 2820,1; // Thief_Manual
+ next;
+ mes "[Thief Guild Member]";
+ mes "Make sure to equip the Skill Manual by double-clicking it in the Inventory Window.";
+ mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimize the window by pressing the '-' button on the top right corner of the window to see the available skills.";
+ }
+ close;
+
+ case 2:
+ mes "[Thief Guild Member]";
+ mes "Do you really want to be a Thief?";
+ mes "If so, I will send you to the Thief Guild immediately.";
+ next;
+ mes "[Thief Guild Member]";
+ mes "You already reached the required job level, didn't you?";
+ mes "Do you want to finish the Novice training and go to the Thief Guild?";
+ next;
+ if(select("Let me consider it again.:Yes, I do.") == 2) {
+ mes "[Thief Guild Member]";
+ mes "Ok, I see.";
+ mes "Welcome. Then your Novice training is totally complete and you will be sent to the Thief Guild immediately.";
+ close2;
+ callfunc "F_NvErase",1;
+ savepoint "morocc",150,100;
+ warp "moc_prydb1",99,185;
+ end;
+ }
+ mes "[Thief Guild Member]";
+ mes "Have you tried all of the class manuals yet?";
+ mes "If you're undecided what job to take on I suggest you try talking to all the Guides first.";
+ close;
+ case 3:
+ set .@quest, checkquest(7127);
+ if (.@quest == -1) {
+ mes "[Thief Guild Member]";
+ mes "Quests?";
+ mes "Hmm, what will be good for you?";
+ mes "How about hunting some Willows.";
+ next;
+ mes "[Thief Guild Member]";
+ mes "You can't cheat this so make sure to kill 5 Willows. When you're done come and talk to me again.";
+ mes "If you talk to Trainer Brutus, he can send you to a more difficult training ground where there are Willows to hunt.";
+ setquest 7127;
+ next;
+ mes "[Thief Guild Member]";
+ mes "If you equip the Thief manual, you can have the effect of the skill, Double Attack.";
+ mes "Double Attack and Hide are the main skills of the Thief.";
+ close;
+ }
+ else if (.@quest == 1) {
+ if (checkquest(7127,HUNTING) == 2) {
+ mes "[Thief Guild Member]";
+ mes "You are very strong.";
+ mes "These are not many but let me give you a reward for your effort.";
+ completequest 7127;
+ getitem 12323, 50; // N_Fly_Wing
+ getexp 5000,100;
+ close;
+ }
+ mes "[Thief Guild Member]";
+ mes "Hunt 5 Willows and then come talk to me to finish your quest.";
+ close;
+ }
+ else if (.@quest == 2) {
+ mes "[Thief Guild Member]";
+ mes "I think you finished that quest already, right?";
+ mes "You'll experience more of these quests as you grow as an adventurer in the world.";
+ next;
+ mes "[Thief Guild Member]";
+ mes "Your training is now complete.";
+ mes "If you choose to become a Thief I wish you goodluck.";
+ close;
+ }
+ mes "[Thief Guild Member]";
+ mes "I'm sorry but I don't have any quests to give you right now.";
+ close;
+ case 4:
+ mes "[Thief Guild Member]";
+ mes "If you have something to ask about the Thief job, feel free to ask me.";
+ close;
+ }
+}
+
+new_1-3,105,41,4 duplicate(NvThf) Thief Guide#nv1 118
+new_2-3,105,41,4 duplicate(NvThf) Thief Guide#nv2 118
+new_3-3,105,41,4 duplicate(NvThf) Thief Guide#nv3 118
+new_4-3,105,41,4 duplicate(NvThf) Thief Guide#nv4 118
+new_5-3,105,41,4 duplicate(NvThf) Thief Guide#nv5 118
+
+// ---------------------------- Merchant Guide ------------------------------
+- script Merchant Guide#nv::NvMer 97,{
+ if(job_novice_q < 16) {
+ mes "[Merchant Guildsman]";
+ mes "You are still in the process of training with sir Brade.";
+ close;
+ }
+ mes "[Merchant Guildsman]";
+ mes "What can I help you with?";
+ next;
+ switch(select("Tell me about Merchants:I want to be a Merchant.:Give me a Quest.:Cancel")) {
+ case 1:
+ mes "[Merchant Guildsman]";
+ mes "Merchant? Simply put, they sell goods and make money.";
+ mes "That's the main focus for any Merchant.";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "We have special skills for making money.";
+ mes "We can buy goods at a lower price and sell them at a higher price.";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "Also Merchants can have Carts that we can store lots of items in.";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "^8C2121Merchants can transform to a Blacksmith or an Alchemist^000000 as their second job.";
+ if(countitem(2823) == 0 && (getequipid(EQI_ACC_L) != 2823 || getequipid(EQI_ACC_R) != 2823)) {
+ next;
+ mes "[Merchant Guildsman]";
+ mes "Do you wan to see what it's like to be a Merchant?";
+ next;
+ if(select("I want to test Merchant skills.:I don't want to test it.") == 2) {
+ mes "[Merchant Guildsman]";
+ mes "Hum. Do you think so?";
+ mes "Ok, I agree with you. Choosing a job is very important in our life.";
+ mes "Just talk to me whenever you want to experience Merchant skills.";
+ close;
+ }
+ mes "[Merchant Guildsman]";
+ mes "Here is the Merchant skill manual.";
+ mes "I will take other job manuals from you while I'm at it.";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "Here is the Merchant skill manual.";
+ mes "I will take other job manuals from you while I'm at it.";
+ callfunc "F_NvErase";
+ getitem 2823,1; // Merchant_Manual
+ next;
+ mes "[Merchant Guildsman]";
+ mes "Make sure to equip the Skill Manual by double-clicking it in the Inventory Window.";
+ mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimize the window by pressing the '-' button on the top right corner of the window to see the available skills.";
+ }
+ close;
+
+ case 2:
+ mes "[Merchant Guildsman]";
+ mes "You want to be a Merchant?";
+ mes "Ok, then, I will send you to the Merchant Guild's union right away.";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "Wait, have you checked your Job level?";
+ mes "Do you want to complete your Novice training and go straight to the Merchant Guild's union?";
+ next;
+ if(select("I will think about it again.:Yes, I want to go to the Merchant Guild's union.") == 2) {
+ mes "[Merchant Guildsman]";
+ mes "Welcome!!";
+ mes "I will send you to the Merchant Guild's union after you complete your Novice training.";
+ close2;
+ callfunc "F_NvErase",1;
+ savepoint "alberta",29,231;
+ warp "alberta_in",62,44;
+ end;
+ }
+ mes "[Merchant Guildsman]";
+ mes "Ok, I hope you consider being a Merchant.";
+ mes "We are always welcome to have you!";
+ close;
+ case 3:
+ set .@quest, checkquest(7126);
+ if (.@quest == -1) {
+ mes "[Merchant Guildsman]";
+ mes "Huh? Quest??";
+ mes "Humm... What would be suited for you...?";
+ mes "Ok, then bring me ^5d5dff300 zeny^000000 by selling some of your items to the Potato Merchant.";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "If you equipped the Merchant manual you have the ability to use the 'Overcharge' and 'Discount' skills.";
+ setquest 7126;
+ next;
+ mes "I will wait for you here.";
+ mes "Good luck!";
+ close;
+ }
+ else if (.@quest == 1) {
+ if (Zeny > 299) {
+ mes "[Merchant Guildsman]";
+ mes "Excellent!";
+ mes "Zeny is the currency of Rune-Midgard.";
+ mes "You can make zeny by selling loot as well as through making smart business decisions.";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "We can use extremely powerful skills with zeny!";
+ mes "Mammonite! That is our ultimate attack skill!!";
+ mes "We basically paste money on the weapon and then strike the enemy. Death by Zeny! Nyahahahaha!";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "By the way, you have done an excellent job. So, I should give you something... What would be good?";
+ mes "Alright! What about Phracon?";
+ mes "Phracon is a metallic element which you can use for refining weapons.";
+ completequest 7126;
+ getitem 1010,7; // Phracon
+ getexp 5000,100;
+ close;
+ }
+ mes "[Merchant Guildsman]";
+ mes "Zeny is the currency of Rune-Midgard.";
+ mes "You can make zeny by selling loot as well as through making smart business decisions.";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "You can get loot by killing monsters. After hunting monsters, you can sell those loot to make a profit!";
+ mes "What a valuable job it is! Isn't it?";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "Why don't you try to be a Merchant? Making money is not easy but it will be a great experience!";
+ close;
+ }
+ else if (.@quest == 2) {
+ mes "[Merchant Guildsman]";
+ mes "You have already completed the quest.";
+ mes "Once you enter the main world, you can get various exciting quests there!";
+ next;
+ mes "[Merchant Guildsman]";
+ mes "I think you're strong enough now to change your job right? Hahahaha don't waste too much time here Novice.";
+ close;
+ }
+ mes "[Merchant Guildsman]";
+ mes "I'm sorry but I don't have any quests to give you right now.";
+ close;
+ case 4:
+ mes "[Merchant Guildsman]";
+ mes "If you have any questions about Merchants, feel free to ask me.";
+ mes "I think you could be a rich Merchant. AhHahaha.";
+ close;
+ }
+}
+
+new_1-3,109,41,4 duplicate(NvMer) Merchant Guide#nv1 97
+new_2-3,109,41,4 duplicate(NvMer) Merchant Guide#nv2 97
+new_3-3,109,41,4 duplicate(NvMer) Merchant Guide#nv3 97
+new_4-3,109,41,4 duplicate(NvMer) Merchant Guide#nv4 97
+new_5-3,109,41,4 duplicate(NvMer) Merchant Guide#nv5 97
+
+// ---------------------------- Archer Guide --------------------------------
+- script Archer Guide#nv::NvArc 727,{
+ if(job_novice_q < 16) {
+ mes "[Archer Guide]";
+ mes "You are still in the process of training with sir Brade.";
+ close;
+ }
+ mes "[Archer Guide]";
+ mes "What can I help you with?";
+ next;
+ switch(select("Tell me about Archers:I want to be an Archer:Cancel")) {
+ case 1:
+ mes "[Archer Guide]";
+ mes "Archers have specialized skills by using a Bow and have a variety of powerful skills.";
+ mes "Archers are good at staying back and picking off their targets.";
+ next;
+ mes "[Archer Guide]";
+ mes "Archers don't have great vitality so they have to keep their distance from enemies.";
+ next;
+ mes "[Archer Guide]";
+ mes "On the other hand, Archers are attentive and have incredibly accurate eyes.";
+ mes "So once they are ready to attack, they can kill enemies before they're even aware of their presence.";
+ next;
+ mes "[Archer Guide]";
+ mes "^8C2121Archers can transform to many second jobs like a Hunter.^000000";
+ mes "^8C2121Besides Hunters, Archers can transform to a Bard, if they are male.^000000";
+ mes "^8C2121They can transform to a Dancer, if they are female.^000000";
+ if(countitem(2822) == 0 && (getequipid(EQI_ACC_L) != 2822 || getequipid(EQI_ACC_R) != 2822)) {
+ next;
+ mes "[Archer Guide]";
+ mes "Do you want to register to test skill experience?";
+ mes "Would you like to test Archer skills?";
+ next;
+ if(select("I want to test Archer skills.:I don't want to test it.") == 2) {
+ mes "[Archer Guide]";
+ mes "Hum. Do you think so.";
+ mes "Ok, I agree with you. Choosing a job is very important in our life.";
+ mes "Just talk to me whenever you want to experience Archer skills.";
+ close;
+ }
+ mes "[Archer Guide]";
+ mes "Here is the Archer manual.";
+ mes "I will take the other job manuals from you while you test the Archer manual out.";
+ next;
+ mes "[Archer Guide]";
+ mes "I will take the other job manuals from you while you test the Archer manual out.";
+ callfunc "F_NvErase";
+ getitem 2822,1; // Archer_Manual
+ next;
+ mes "[Archer Guide]";
+ mes "Make sure to equip the Skill Manual by double-clicking it in the Inventory Window.";
+ mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimize the window by pressing the '-' button on the top right corner of the window to see the available skills.";
+ }
+ close;
+ case 2:
+ mes "[Archer Guide]";
+ mes "You want to be an Archer?";
+ mes "Ok, then, I will send you to the Archer Guild right away.";
+ next;
+ mes "[Archer Guide]";
+ mes "Wait, have you checked your Job level?";
+ mes "Do you want to complete the Novice training arena and go to the Archer Guild right now?";
+ next;
+ if(select("I will think about it again.:Yes, I want to go to the Archer Guild's union.") == 2) {
+ mes "[Archer Guide]";
+ mes "Welcome!!";
+ mes "I will send you to the Archer Guild after you complete your Novice training.";
+ close2;
+ callfunc "F_NvErase",1;
+ savepoint "payon",256,242;
+ warp "payon_in02",64,65;
+ end;
+ }
+ mes "[Archer Guide]";
+ mes "Test out all the jobs if you have to but choose Archer because we're the best.";
+ mes "We are always welcome to have you!";
+ close;
+ case 3:
+ mes "[Archer Guide]";
+ mes "If you have any questions about Archers, feel free to ask me.";
+ mes "I think you could be a strong Archer young Novice.";
+ close;
+ }
+}
+
+new_1-3,113,41,4 duplicate(NvArc) Archer Guide#nv1 727
+new_2-3,113,41,4 duplicate(NvArc) Archer Guide#nv2 727
+new_3-3,113,41,4 duplicate(NvArc) Archer Guide#nv3 727
+new_4-3,113,41,4 duplicate(NvArc) Archer Guide#nv4 727
+new_5-3,113,41,4 duplicate(NvArc) Archer Guide#nv5 727
+
+// ---------------------------- Acolyte Guide -------------------------------
+- script Acolyte Guide#nv::NvAco 95,{
+ if(job_novice_q < 16) {
+ mes "[Prontera Acolyte]";
+ mes "You look like you are not done with Instructor Brade's lessons.";
+ close;
+ }
+ mes "[Prontera Acolyte]";
+ mes "What can I do for you?";
+ next;
+ switch(select("What is an Acolyte?:Job change to Acolyte:Cancel")) {
+ case 1:
+ mes "[Prontera Acolyte]";
+ mes "An Acolyte is someone who worships the goddess Freya sacrificing themselves to help others.";
+ next;
+ mes "[Prontera Acolyte]";
+ mes "Acolytes use supportive skills to make combat easier.";
+ mes "It is essential to have an Acolyte in any successful party.";
+ next;
+ mes "[Prontera Acolyte]";
+ mes "^8C2121As an Acolyte, you can upgrade your future job to Priest or Monk.^000000";
+ next;
+ mes "[Prontera Acolyte]";
+ if(countitem(2821) == 0 && (getequipid(EQI_ACC_L) != 2821 || getequipid(EQI_ACC_R) != 2821)) {
+ next;
+ mes "[Prontera Acolyte]";
+ mes "If you want, I can give you a skill manual to experience what it is like to be an Acolyte.";
+ mes "Would you like to experience the skills of an Acolyte?";
+ next;
+ if(select("Yes, please.:No I'm not interested.") == 2) {
+ mes "[Prontera Acolyte]";
+ mes "Hum. Do you think so.";
+ mes "Ok, I agree with you. Choosing a job is very important in our life.";
+ mes "Just talk to me whenever you want to know about Acolytes.";
+ close;
+ }
+ mes "[Prontera Acolyte]";
+ mes "Here you go, the instruction manual of an Acolyte.";
+ mes "I will take away those other job's manuals while you study this one.";
+ next;
+ mes "[Prontera Acolyte]";
+ mes "Here you go, the instruction manual of an Acolyte.";
+ mes "I will take away those other job's manuals while you study this one.";
+ callfunc "F_NvErase";
+ getitem 2821,1; // Acolyte_Manual
+ next;
+ mes "[Prontera Acolyte]";
+ mes "Make sure to equip the Skill Manual by double-clicking it in the Inventory Window.";
+ mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimizing the window by pressing the '-' button on the top right corner of the window to see the available skills.";
+ }
+ close;
+ case 2:
+ mes "[Prontera Acolyte]";
+ mes "Of course, I assume you have enough job levels to become an Acolyte right?";
+ mes "Would you like to quit the Training Process and go to the Cathedral of Prontera?";
+ next;
+ if(select("Let me reconsider.:I will go to the Cathedral.") == 2) {
+ mes "[Prontera Acolyte]";
+ mes "That's great.";
+ mes "Then I will completely end the Training Process and send you to the Cathedral of Prontera.";
+ close2;
+ callfunc "F_NvErase",1;
+ savepoint "prontera",117,72;
+ warp "prt_church",172,19;
+ end;
+ }
+ mes "[Prontera Acolyte]";
+ mes "You should try out each job's manuals.";
+ mes "Go through them throughly and decide carefully.";
+ mes "Of course, I will welcome you anytime.";
+ close;
+ case 3:
+ mes "[Prontera Acolyte]";
+ mes "If you have any questions about Acolytes, please ask me anytime.";
+ mes "Our God, Odin awaits adventurers like you";
+ close;
+ }
+}
+
+new_1-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv1 95
+new_2-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv2 95
+new_3-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv3 95
+new_4-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv4 95
+new_5-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv5 95
+
+// ---------------------------- Bruce (Extended Jobs) -----------------------
+- script Bruce#nv::NvBruce 57,{
+ mes "[Bruce]";
+ mes "Hello?";
+ mes "I'm here to guide you about extra jobs and special classes.";
+ next;
+ mes "[Bruce]";
+ mes "For special classes, there are Taekwon, Ninja, Super Novice, and Gunslinger.";
+ mes "Which job description do you want to hear?";
+ next;
+ while(1) {
+ switch(select("Taekwon:Ninja:Super Novice:Gunslinger:End the conversation.")) {
+ case 1:
+ mes "[Bruce]";
+ mes "It's a job that usually uses a lot of kicking skills.";
+ mes "It belongs to special class and later you can change your job into Taekwon Master which has much stronger attack skills.";
+ next;
+ mes "[Bruce]";
+ mes "There is a secondary class to choose from called Soul Linker which also has strong attacks.";
+ mes "You can decide that later when you get stronger.";
+ next;
+ break;
+ case 2:
+ mes "[Bruce]";
+ mes "Ninja's specialty is rapid movement.";
+ mes "They specialize in using throwing weapons.";
+ next;
+ mes "[Bruce]";
+ mes "Ninjas are kind of a hybrid class that can use various dodge skills with the capability of both physical and magical attacks depending on their preference.";
+ next;
+ break;
+ case 3:
+ mes "[Bruce]";
+ mes "The biggest attraction of the stronger Novice, called Super Novice, is their pull to mediocrity.";
+ mes "They are the proverbial Jack-of-all-Trades but Master of none.";
+ next;
+ mes "[Bruce]";
+ mes "Super Novices can learn most of the 1st job class skills.";
+ mes "If you become a Super Novice, you cannot change your job, which is too bad, but you can grow as a very individual character.";
+ next;
+ break;
+ case 4:
+ mes "[Bruce]";
+ mes "You can job change directly from Novice to a special class which is optimized for a long-distance attack with guns.";
+ next;
+ mes "[Bruce]";
+ mes "Gunslingers use all kinds of guns made in 'Einbroch', the city of steel.";
+ mes "I recommend this for those who want to become powerful sharpshooters.";
+ next;
+ break;
+ case 5:
+ mes "[Bruce]";
+ mes "If you need more information, you can always go to";
+ mes "'iro.ragnarokonline.com'";
+ close;
+ }
+ }
+}
+
+new_1-3,121,41,4 duplicate(NvBruce) Bruce#nv1 57
+new_2-3,121,41,4 duplicate(NvBruce) Bruce#nv2 57
+new_3-3,121,41,4 duplicate(NvBruce) Bruce#nv3 57
+new_4-3,121,41,4 duplicate(NvBruce) Bruce#nv4 57
+new_5-3,121,41,4 duplicate(NvBruce) Bruce#nv5 57
+
+//============================================================================
+// Eden Group Officer (Real Combat Training)
+//============================================================================
+- script Eden Group Officer#nv::NvEdn -1,{
+ if(BaseLevel < 10) {
+ mes "[Eden Group Officer]";
+ mes "Hello, I am a representative of the Eden Group.";
+ mes "We are here to assist adventurers in Rune Midgard.";
+ next;
+ mes "[Eden Group Officer]";
+ mes "We have agents all over the world waiting to send you to our secret headquarters where you can get some useful quests.";
+ next;
+ mes "[Eden Group Officer]";
+ mes "If you take our quests we even give you weapons and equipment so be sure to visit us once you are done with your training.";
+ next;
+ mes "[Eden Group Officer]";
+ mes "Speak to me again once you have reached Base Level 10 and I will send you out of the training grounds.";
+ mes "Have you taken the quests from all of the Guides yet?";
+ close;
+ }else{
+ mes "[Eden Group Officer]";
+ mes "Great! You are ready to take on the challenges of the world.";
+ mes "What would you like to do?";
+ next;
+ switch(select("I want to leave the training grounds:Tell me about the towns.:Cancel")) {
+ case 1:
+ mes "[Eden Group Officer]";
+ mes "Looks like you are ready.";
+ mes "I guess you have made up your mind, huh?";
+ next;
+ mes "[Eden Group Officer]";
+ mes "If you know what job you want to change to, you should ask the ^4A4AFFJob Guides^000000 to send you out of the training grounds.";
+ mes "What town would you like to go to?";
+ next;
+ switch(select("Prontera:Morocc:Payon:Alberta:Geffen:Cancel")) {
+ case 1:
+ mes "[Eden Group Officer]";
+ mes "Prontera, the Capital city of the Rune-Midgarts Kingdom.";
+ mes "Take care and may Freya bless you on your journey.";
+ callsub S_Warp,"prontera",121,77,121,76;
+ case 2:
+ mes "[Eden Group Officer]";
+ mes "The desert city of Morocc was recently destroyed.";
+ mes "I will send you to the camp where the survivors are.";
+ callsub S_Warp,"moc_ruins",71,157,70,158;
+ case 3:
+ mes "[Eden Group Officer]";
+ mes "Just north of Payon you'll find the Archer Village.";
+ mes "Good luck on your journeys.";
+ callsub S_Warp,"payon",167,68,172,111;
+ case 4:
+ mes "[Eden Group Officer]";
+ mes "Alberta, the Port City.";
+ mes "It's the main hub of all trades.";
+ mes "If you want to travel to other civilizations, Alberta is the only outlet.";
+ callsub S_Warp,"alberta",115,57,116,58;
+ case 5:
+ mes "[Eden Group Officer]";
+ mes "Geffen, is known as the Magical City of Rune Midgard.";
+ mes "I will send you near the Fountains.";
+ mes "Goddess Freya bless you.";
+ callsub S_Warp,"geffen",118,36,128,66;
+ case 6:
+ mes "[Eden Group Officer]";
+ mes "If you're still not sure what job you want, talk to the Job Guides for more help.";
+ close;
+ }
+ case 2:
+ mes "[Eden Group Officer]";
+ mes "Prontera is the main capital of the Rune-Midgard Kingdom. Here you will find Merchants selling their items and is a favorite gathering point of adventurers.";
+ next;
+ mes "[Eden Group Officer]";
+ mes "The Acolyte Guild is here at the Prontera Church located to the northwest. The Swordman Guild can be found at Izlude, a town just southeast of Prontera.";
+ next;
+ mes "[Eden Group Officer]";
+ mes "Morocc is a city located in the desert that was recently destroyed due to an evil monster named Satan Morroc. The Thief Guild has been working to restore it to it's former glory.";
+ next;
+ mes "[Eden Group Officer]";
+ mes "Payon is where the Archer Guild has made it's home. You can also find the Kafra Shop Employees selling their Item Mall items near the center of this city.";
+ next;
+ mes "[Eden Group Officer]";
+ mes "Alberta is the trading hub of Rune Midgard. The Merchant Guild is located here and the docks have ships that will take you to different island cities.";
+ next;
+ mes "[Eden Group Officer]";
+ mes "Geffen is known as the magical city of Rune Midgard. The Mage Guild is located here and research for new magic is always being conducted at their headquarters.";
+ next;
+ mes "[Eden Group Officer]";
+ mes "If you wish to be sent directly to the Job Guilds, then speak to the Job Guides and tell them that you want to change your job.";
+ close;
+ case 3:
+ close;
+ }
+ }
+
+S_Warp:
+ close2;
+ callfunc "F_NvErase",1;
+ savepoint getarg(0),getarg(1),getarg(2);
+ warp getarg(0),getarg(3),getarg(4);
+ end;
+
+OnTouch:
+ emotion e_gasp;
+ end;
+}
+
+new_1-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv1 729,5,5
+new_2-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv2 729,5,5
+new_3-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv3 729,5,5
+new_4-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv4 729,5,5
+new_5-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv5 729,5,5
+
+// Merchant (Real Combat Training)
+//============================================================
+- shop Merchant#nv::NvPotato 93,516:15
+
+new_1-3,100,50,4 duplicate(NvPotato) Merchant#nv1 93
+new_2-3,100,50,4 duplicate(NvPotato) Merchant#nv2 93
+new_3-3,100,50,4 duplicate(NvPotato) Merchant#nv3 93
+new_4-3,100,50,4 duplicate(NvPotato) Merchant#nv4 93
+new_5-3,100,50,4 duplicate(NvPotato) Merchant#nv5 93
+
+// Trainer (Real Combat Training)
+//============================================================
+- script Level 1 Trainer#nv::NvBrutus 84,{
+ mes "[Trainer Brutus]";
+ mes "These monsters are all weak and easy to kill. But be careful, a lot of them are aggressive and out for blood!";
+ next;
+ mes "[Trainer Brutus]";
+ mes "If you think monsters here are too weak for you, I can send you to another training ground where the monsters are stronger than the ones over here.";
+ next;
+ mes "[Trainer Brutus]";
+ mes "So would you like to try?";
+ next;
+ switch(select("Send me to another Level:What monsters are there?:Cancel")) {
+ case 1:
+ mes "[Trainer Brutus]";
+ mes "I see, then let me guide you to another level. Which level do you want to go to?";
+ next;
+ for(set .@i,1; .@i<6; set .@i,.@i+1) {
+ if (!compare(strnpcinfo(2),"nv"+.@i))
+ set .@menu$, .@menu$+"Send me to Level "+.@i;
+ set .@menu$, .@menu$+":";
+ }
+ set .@i, select(.@menu$+"Cancel");
+ if (.@i < 7) warp "new_"+.@i+"-3",96,21;
+ close;
+ case 2:
+ mes "[Trainer Brutus]";
+ mes "You seem eager to fight.";
+ mes "The monster levels increase with each level of the training grounds.";
+ next;
+ mes "[Trainer Brutus]";
+ mes "Level 1 has the weakest monsters.";
+ mes "There you'll find Poring, Drops, Lunatics, Fabres, and Chonchons.";
+ next;
+ mes "[Trainer Brutus]";
+ mes "Level 2 is more challenging.";
+ mes "There you'll find Condors, Pickys, Willows, Fabres, and Roda Frogs.";
+ next;
+ mes "[Trainer Brutus]";
+ mes "Level 3 is pretty much the same as Level 2.";
+ mes "There you'll find Condors, Pickys, Willows, Fabres, and Roda Frogs.";
+ next;
+ mes "[Trainer Brutus]";
+ mes "Level 4 has stronger monsters.";
+ mes "There you'll find Rockers, Spores, and Fabres.";
+ next;
+ mes "[Trainer Brutus]";
+ mes "Level 5 is the same as Level 4.";
+ mes "There you'll find Rockers, Spores, and Fabres.";
+ close;
+ case 3:
+ mes "[Trainer Brutus]";
+ mes "Hmm...?";
+ mes "Are you worried about going to more challenging places? That's understandable, since you're still a new adventurer. Good luck~";
+ close;
+ }
+}
+
+new_1-3,103,50,4 duplicate(NvBrutus) Level 1 Trainer#nv1 84
+new_2-3,103,50,4 duplicate(NvBrutus) Level 2 Trainer#nv2 84
+new_3-3,103,50,4 duplicate(NvBrutus) Level 3 Trainer#nv3 84
+new_4-3,103,50,4 duplicate(NvBrutus) Level 4 Trainer#nv4 84
+new_5-3,103,50,4 duplicate(NvBrutus) Level 5 Trainer#nv5 84
+
+// Random Stuff (Guards & Bulletin Board)
+//============================================================
+new_1-1,66,114,4 script Bulletin Board#nv 111,{
+ mes "^FF0000=================================^000000";
+ mes "^FF0000 ^000000 ^E40CAA[Welcome]^CC0000 to ^FF9000Novice^7FFF00 Training ^00FF00Grounds ^E40CAA[Welcome]^FF0000^000000";
+ mes "^FF0000=================================^000000";
+ close;
+}
+
+new_1-1,144,116,2 script Guard#nv1 105,{
+ mes "[Training Grounds Guard]";
+ mes "Welcome to the Training Grounds.";
+ mes "You are now in the outer court yard. Please go inside the castle to begin your training.";
+ close;
+}
+
+new_1-1,144,107,2 script Guard#nv2 105,{
+ mes "[Training Grounds Guard]";
+ if(rand(2)) {
+ mes "Come in!";
+ mes "I would like to welcome you to the Training Grounds!";
+ next;
+ mes "[Training Grounds Guard]";
+ mes "In here, you can prepare yourself for your future adventures throughout the Ragnarok world!";
+ }
+ else {
+ mes "Go, Novice, go!";
+ mes "Fight, and grow stronger! Look towards a brighter tomorrow!";
+ }
+ close;
+}
+
+new_1-2,161,182,5 script Instructor#nv 92,{
+ mes "[Edwin]";
+ mes "Eh? Why are you still here?";
+ mes "There are no more courses that you need to take.";
+ next;
+ mes "[Edwin]";
+ mes "Well, I will let you out of here.";
+ mes "Go find the instructor, Brade.";
+ close2;
+ warp "new_1-2",100,100;
+ end;
+}
+
+// Real Combat Training Mobs
+//============================================================
+new_1-3,0,0,0,0 monster ChonChon 1011,10,0,0,0
+new_1-3,0,0,0,0 monster Drops 1113,10,0,0,0
+new_1-3,0,0,0,0 monster Fabre 1184,5,0,0,0
+new_1-3,0,0,0,0 monster Lunatic 1063,10,0,0,0
+new_1-3,0,0,0,0 monster Poring 1002,10,0,0,0
+new_2-3,0,0,0,0 monster Condor 1009,10,0,0,0
+new_2-3,0,0,0,0 monster Fabre 1184,5,0,0,0
+new_2-3,0,0,0,0 monster Picky 1050,10,0,0,0
+new_2-3,0,0,0,0 monster Roda Frog 1012,10,0,0,0
+new_2-3,0,0,0,0 monster Willow 1010,10,0,0,0
+new_3-3,0,0,0,0 monster Condor 1009,10,0,0,0
+new_3-3,0,0,0,0 monster Fabre 1184,5,0,0,0
+new_3-3,0,0,0,0 monster Picky 1050,10,0,0,0
+new_3-3,0,0,0,0 monster Roda Frog 1012,10,0,0,0
+new_3-3,0,0,0,0 monster Willow 1010,10,0,0,0
+new_4-3,0,0,0,0 monster Fabre 1184,5,0,0,0
+new_4-3,0,0,0,0 monster Rocker 1052,10,0,0,0
+new_4-3,0,0,0,0 monster Spore 1014,10,0,0,0
+new_4-3,0,0,0,0 monster Thief Bug 1051,10,0,0,0
+new_4-3,0,0,0,0 monster Thief Bug 1053,10,0,0,0
+new_5-3,0,0,0,0 monster Fabre 1184,5,0,0,0
+new_5-3,0,0,0,0 monster Rocker 1052,10,0,0,0
+new_5-3,0,0,0,0 monster Spore 1014,1,0,0,0
+new_5-3,0,0,0,0 monster Thief Bug 1051,1,0,0,0
+new_5-3,0,0,0,0 monster Thief Bug 1053,1,0,0,0 \ No newline at end of file
diff --git a/npc/re/jobs/novice/supernovice_ex.txt b/npc/re/jobs/novice/supernovice_ex.txt
index 5687c0768..4a8436dfe 100644
--- a/npc/re/jobs/novice/supernovice_ex.txt
+++ b/npc/re/jobs/novice/supernovice_ex.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Expanded Super Novice Job Quest
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.1a
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Job Change quest for Expanded Super Novice class.
//===== Additional Comments: =================================
diff --git a/npc/re/kafras/kafras.txt b/npc/re/kafras/kafras.txt
index eb4cd30d3..2cab9e388 100644
--- a/npc/re/kafras/kafras.txt
+++ b/npc/re/kafras/kafras.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Kafras (Cities/Dungeons/Fields)
//===== By: ==================================================
//= Joseph
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Argument settings for callfunc "F_Kafra":
//= arg(0): 0 - Default Kafra message
diff --git a/npc/re/merchants/card_separation.txt b/npc/re/merchants/card_separation.txt
index a81aeb746..386474000 100644
--- a/npc/re/merchants/card_separation.txt
+++ b/npc/re/merchants/card_separation.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Card Separation System
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Official Conversion]
//= Separates cards from equipment.
diff --git a/npc/re/merchants/coin_exchange.txt b/npc/re/merchants/coin_exchange.txt
index 92afddca0..7ee6a53af 100644
--- a/npc/re/merchants/coin_exchange.txt
+++ b/npc/re/merchants/coin_exchange.txt
@@ -1,7 +1,7 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Coin Merchants
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
diff --git a/npc/re/merchants/diamond.txt b/npc/re/merchants/diamond.txt
index 118a3d111..fa19f372d 100644
--- a/npc/re/merchants/diamond.txt
+++ b/npc/re/merchants/diamond.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Rare Diamond Merchant
//===== By: ==================================================
//= Z3R0
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Aegis Conversion]
//= Exchanges 17 Carat Diamond
diff --git a/npc/re/merchants/enchan_mal.txt b/npc/re/merchants/enchan_mal.txt
index 5caa70217..c7e182005 100644
--- a/npc/re/merchants/enchan_mal.txt
+++ b/npc/re/merchants/enchan_mal.txt
@@ -1,19 +1,19 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Malangdo Enchants
-//===== By: ==================================================
+//===== By: ==================================================
//= Muad_Dib
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0a
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Official Conversion]
//= Adds enchantments to many high level weapons in exchange
//= for Malangdo coins.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First Version. [Euphy]
//= 1.0a Added 'delequip' command. [Euphy]
-//============================================================
+//============================================================
malangdo,213,167,4 script Mayomayo#mal 555,{
disable_items;
diff --git a/npc/re/merchants/flute.txt b/npc/re/merchants/flute.txt
index a9b9c2367..8eb987e08 100644
--- a/npc/re/merchants/flute.txt
+++ b/npc/re/merchants/flute.txt
@@ -1,18 +1,18 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Falcon & Wolf Flute Trader
-//===== By: ==================================================
+//===== By: ==================================================
//= Masao, Muad_Dib, Ziu
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.2
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= Sells Falcon Flute and Wolf Flute.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First Version. [Masao]
//= 1.1 Added Baby Hunter and Baby Ranger check. bugreport:5728 [Masao]
//= 1.2 Added Wolf Flute trader, optimized. [Euphy]
-//============================================================
+//============================================================
- script Falcon Flute Trader::fflute -1,{
mes "[Falcon Flute Trader]";
diff --git a/npc/re/merchants/inn.txt b/npc/re/merchants/inn.txt
index e8eb922a5..14e1a2eff 100644
--- a/npc/re/merchants/inn.txt
+++ b/npc/re/merchants/inn.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Inn Npcs
//===== By: ==================================================
//= c, L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Inn Npcs, Save and Heal
//===== Additional Comments: =================================
diff --git a/npc/re/merchants/quivers.txt b/npc/re/merchants/quivers.txt
new file mode 100644
index 000000000..45e44401a
--- /dev/null
+++ b/npc/re/merchants/quivers.txt
@@ -0,0 +1,121 @@
+//===== rAthena Script =======================================
+//= Arrow Quivers
+//===== By: ==================================================
+//= Muad_Dib (Prometheus Project); L0ne_W0lf
+//===== Current Version: =====================================
+//= 1.1
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Turns arrows into Arrow Quivers.
+// Breakdown of Subroutine "S_BuyQuiver"
+// arg(0): Type of Arrow to be packaged (item ID).
+// arg(1): How many of each 'getarg(0)' arrow per quiver.
+// arg(2): The cost of making a 'getarg(0)' quiver.
+// arg(3): The quiver given by the NPC (item ID).
+//===== Additional Comments: =================================
+//= 1.0 Added Mora NPC. [Euphy]
+//= 1.1 Updated to match the official scripts. [Euphy]
+//============================================================
+
+mora,106,117,3 script Quiver Maker#mora 516,{
+ if (checkweight(1201,1) == 0) {
+ mes "[Quiver Maker]";
+ mes "You have too many things with you.";
+ mes "Make some space in your inventory and come back. I'll tell you something interesting.";
+ close;
+ }
+ if (MaxWeight - Weight < 2000) {
+ mes "[Quiver Maker]";
+ mes "You seem worn out with all that stuff.";
+ mes "Make some space in your inventory and come back. I'll tell you something interesting.";
+ close;
+ }
+ mes "[Quiver Maker]";
+ mes "Mora villagers ask what good quivers are. They just don't know how the world works.";
+ mes "No wonder they don't know a thing about quivers - spreading jam over leaves all day long.";
+ next;
+ switch(select("Please make me a quiver.:What's a quiver?")) {
+ case 1:
+ mes "[Quiver Maker]";
+ mes "At last someone appreciates a quiver!";
+ mes "I can make Elven Quivers and Hunting Quivers.";
+ mes "Which do you need?";
+ next;
+ switch(select("An Elven Quiver:A Hunting Quiver:I don't need a quiver.")) {
+ case 1: callsub S_BuyQuiver,1773,500,500,12575; //Arrow_Of_Elf_Cntr
+ case 2: callsub S_BuyQuiver,1774,500,500,12576; //Hunting_Arrow_Cntr
+ case 3:
+ mes "[Quiver Maker]";
+ mes "You can buy arrows off the tool merchant next to me.";
+ close;
+ }
+ case 2:
+ mes "[Quiver Maker]";
+ mes "An arrow may be thin and light, but carrying hundreds and thousands of arrows is like carrying a whole log.";
+ next;
+ mes "[Quiver Maker]";
+ mes "But when you have quivers, you can put arrows in them and save weight and space.";
+ mes "If you're interested in one, I'll stitch one up for you.";
+ close;
+ }
+ end;
+
+S_BuyQuiver:
+ if (countitem(getarg(0)) < getarg(1)) {
+ mes "[Quiver Maker]";
+ mes "Bring more than "+getarg(1)+" "+getitemname(getarg(0))+" and I'll make you a quiver.";
+ close;
+ }
+ mes "[Quiver Maker]";
+ mes "Oh, I see you have "+getitemname(getarg(0))+" in your hand!";
+ mes "Are you interested in using a quiver? It's really convenient!";
+ mes "If you're interested, I can trade "+getarg(1)+" of those arrows for one of these quivers for ^FF3131"+getarg(2)+" zeny^000000.";
+ next;
+ switch(select("Trade all the arrows you have:Get only one quiver:Don't trade")) {
+ case 1:
+ set .@arrows, countitem(getarg(0));
+ set .@quiver, .@arrows / getarg(1);
+ set .@arrows_used, .@quiver * getarg(1);
+ set .@arrow_zeny01, .@quiver * getarg(2);
+ mes "The number of arrows you have : ^3131FF"+.@arrows+"^000000";
+ mes "The number of quivers available : ^3131FF"+.@quiver+"^000000";
+ mes "Zeny needed for trade : ^3131FF"+.@arrow_zeny01+" zeny^000000";
+ next;
+ mes "Trade?";
+ next;
+ if(select("Trade:Don't trade") == 2) {
+ mes "[Quiver Maker]";
+ mes "Hey, you don't doubt my skills, do you?";
+ close;
+ }
+ break;
+ case 2:
+ set .@quiver, 1;
+ set .@arrows_used, getarg(1);
+ set .@arrow_zeny01, getarg(2);
+ set .@zeny_mes,1;
+ break;
+ case 3:
+ mes "[Quiver Maker]";
+ mes "Hey, you don't doubt my skills, do you?";
+ close;
+ }
+ if (Zeny < .@arrow_zeny01) {
+ mes "[Quiver Maker]";
+ if (.@zeny_mes == 1)
+ mes "I said I'd accept human coins just for you, and you still don't want to spend the money?";
+ else
+ mes "You really don't expect to get your hands on a masterpiece for nothing, do you?";
+ close;
+ }
+ mes "[Quiver Maker]";
+ mes "Hey, here you are.";
+ mes "There is ^3131FFsomething you need to know^000000 - try to remember it.";
+ mes "^FF0000You can't use quivers when your encumbrance is over 70%.^000000";
+ mes "You'd better keep that in mind, or you might be in trouble later.";
+ set Zeny, Zeny-.@arrow_zeny01;
+ delitem getarg(0),.@arrows_used;
+ getitem getarg(3),.@quiver;
+ close;
+}
diff --git a/npc/re/merchants/refine.txt b/npc/re/merchants/refine.txt
index 4b02e0d22..27a09fce7 100644
--- a/npc/re/merchants/refine.txt
+++ b/npc/re/merchants/refine.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Renewal Refining NPCs
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Current Version: =====================================
//= 1.0a
//===== Compatible With: =====================================
diff --git a/npc/re/merchants/renters.txt b/npc/re/merchants/renters.txt
index 0e4864bb2..e4f1a02c7 100644
--- a/npc/re/merchants/renters.txt
+++ b/npc/re/merchants/renters.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Renters
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Current Version: =====================================
//= 2.1
//===== Description: =========================================
diff --git a/npc/re/merchants/shops.txt b/npc/re/merchants/shops.txt
index 35b1baf95..b27e5cc1d 100644
--- a/npc/re/merchants/shops.txt
+++ b/npc/re/merchants/shops.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Shops
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
diff --git a/npc/re/mobs/dungeons/dew_dun.txt b/npc/re/mobs/dungeons/dew_dun.txt
index 809295e0c..1080a1cf1 100644
--- a/npc/re/mobs/dungeons/dew_dun.txt
+++ b/npc/re/mobs/dungeons/dew_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script ========================================
+//===== Hercules Script ======================================
//= Dewata Dungeon Monster Spawn Script
//===== By: ==================================================
//= Chilly
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Official kRO monster spawns
//===== Additional Comments: =================================
diff --git a/npc/re/mobs/dungeons/dic_dun.txt b/npc/re/mobs/dungeons/dic_dun.txt
index e259f0465..f173fec0e 100644
--- a/npc/re/mobs/dungeons/dic_dun.txt
+++ b/npc/re/mobs/dungeons/dic_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script ========================================
+//===== Hercules Script ======================================
//= El Dicastes Dungeon Monster Spawn Script
//===== By: ==================================================
//= Kisuka
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Official monster spawns in El Dicastes Dungeon.
//===== Additional Comments: =================================
diff --git a/npc/re/mobs/dungeons/ein_dun.txt b/npc/re/mobs/dungeons/ein_dun.txt
index 587e3df60..3efcd52f6 100644
--- a/npc/re/mobs/dungeons/ein_dun.txt
+++ b/npc/re/mobs/dungeons/ein_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Einbech Mine Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 spawn N and spawn delays aren't yet correct, so I set
//= respawn delays quite big for now [Lupus]
diff --git a/npc/re/mobs/dungeons/gef_dun.txt b/npc/re/mobs/dungeons/gef_dun.txt
index babb96d55..d6da72c1c 100644
--- a/npc/re/mobs/dungeons/gef_dun.txt
+++ b/npc/re/mobs/dungeons/gef_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Geffen Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.2 Official kRO 10.1 spawns [Playtester]
//= 1.3 More accurate spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/gefenia.txt b/npc/re/mobs/dungeons/gefenia.txt
index b10f90e34..89e943312 100644
--- a/npc/re/mobs/dungeons/gefenia.txt
+++ b/npc/re/mobs/dungeons/gefenia.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Geffenia Dungeon Monster Spawn Script
//===== By: ==================================================
-//= Muad_Dib, rAthena Dev Team
+//= Muad_Dib, Hercules Dev Team
//===== Current Version: =====================================
//= 1.1
//===== Additional Comments: =================================
diff --git a/npc/re/mobs/dungeons/glastheim.txt b/npc/re/mobs/dungeons/glastheim.txt
index cbe5a31b7..d23154de2 100644
--- a/npc/re/mobs/dungeons/glastheim.txt
+++ b/npc/re/mobs/dungeons/glastheim.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Glast Heim Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 [Lupus]
//= 1.2 Updated to ep 8.5 aegis spawns [MasterOfMuppets]
diff --git a/npc/re/mobs/dungeons/gld_dun.txt b/npc/re/mobs/dungeons/gld_dun.txt
index cb06564e2..7ac2d9f9f 100644
--- a/npc/re/mobs/dungeons/gld_dun.txt
+++ b/npc/re/mobs/dungeons/gld_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Guild Dungeons Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.2 Official kRO 10.1 spawns [Playtester]
//= 1.3 Corrected MVP spawn variance. [Gepard]
diff --git a/npc/re/mobs/dungeons/gld_dunSE.txt b/npc/re/mobs/dungeons/gld_dunSE.txt
index 488875380..52d5bd0e5 100644
--- a/npc/re/mobs/dungeons/gld_dunSE.txt
+++ b/npc/re/mobs/dungeons/gld_dunSE.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Guild Dungeons Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 First version
//= 1.1 Updated spawns to official. [L0ne_W0lf]
diff --git a/npc/re/mobs/dungeons/gon_dun.txt b/npc/re/mobs/dungeons/gon_dun.txt
index 98958a4dc..19e7ee3db 100644
--- a/npc/re/mobs/dungeons/gon_dun.txt
+++ b/npc/re/mobs/dungeons/gon_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Gonryun Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 Official kRO 10.1 spawns [Playtester]
//= 1.2 Corrected MVP spawn variance. [L0ne_W0lf]
diff --git a/npc/re/mobs/dungeons/ice_dun.txt b/npc/re/mobs/dungeons/ice_dun.txt
index 418006267..11513ecd5 100644
--- a/npc/re/mobs/dungeons/ice_dun.txt
+++ b/npc/re/mobs/dungeons/ice_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Ice Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 First version from jAthena [Playtester]
//= 1.1 More accurate spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/in_sphinx.txt b/npc/re/mobs/dungeons/in_sphinx.txt
index 7263f38d9..c93a13cdc 100644
--- a/npc/re/mobs/dungeons/in_sphinx.txt
+++ b/npc/re/mobs/dungeons/in_sphinx.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Morocc Sphinx Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 Official kRO 10.1 spawns [Playtester]
//= 1.2 Replaced Marduk with Anubis on F4 and F5 [Playtester]
diff --git a/npc/re/mobs/dungeons/iz_dun.txt b/npc/re/mobs/dungeons/iz_dun.txt
index 8518d020d..8d4fad684 100644
--- a/npc/re/mobs/dungeons/iz_dun.txt
+++ b/npc/re/mobs/dungeons/iz_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Byalan Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 Official kRO 10.1 spawns for 1-4 [Playtester]
//= 1.2 More accurate spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/juperos.txt b/npc/re/mobs/dungeons/juperos.txt
index efa7bece7..28c53f174 100644
--- a/npc/re/mobs/dungeons/juperos.txt
+++ b/npc/re/mobs/dungeons/juperos.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Juperos Dungeon Monster Spawn Script
//===== By: ==================================================
-// The Prometheus Project, rAthena Dev Team
+// The Prometheus Project, Hercules Dev Team
//===== Current Version: =====================================
//= 1.4
//===== Additional Comments: =================================
diff --git a/npc/re/mobs/dungeons/kh_dun.txt b/npc/re/mobs/dungeons/kh_dun.txt
index 9965585dd..a882550c8 100644
--- a/npc/re/mobs/dungeons/kh_dun.txt
+++ b/npc/re/mobs/dungeons/kh_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Kiel Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 First version [MasterOfMuppets]
//= 1.1 Added official mob types [Playtester]
diff --git a/npc/re/mobs/dungeons/lhz_dun.txt b/npc/re/mobs/dungeons/lhz_dun.txt
index be3e34989..d723a8d67 100644
--- a/npc/re/mobs/dungeons/lhz_dun.txt
+++ b/npc/re/mobs/dungeons/lhz_dun.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Lighthalzen Dungeon(Biolabs) Monster Spawn Script
//===== By: ==================================================
-// The Prometheus Project, rAthena Dev Team
+// The Prometheus Project, Hercules Dev Team
//===== Current Version: =====================================
//= 1.9
//===== Additional Comments: =================================
diff --git a/npc/re/mobs/dungeons/lou_dun.txt b/npc/re/mobs/dungeons/lou_dun.txt
index 46c40fa30..f5e276757 100644
--- a/npc/re/mobs/dungeons/lou_dun.txt
+++ b/npc/re/mobs/dungeons/lou_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Louyang Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 Updated by MasterOfMuppets
//= 1.2 Added Bacsojin and Chung E [MasterOfMuppets]
diff --git a/npc/re/mobs/dungeons/ma_dun.txt b/npc/re/mobs/dungeons/ma_dun.txt
index 0794e0d59..f7028e579 100644
--- a/npc/re/mobs/dungeons/ma_dun.txt
+++ b/npc/re/mobs/dungeons/ma_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script ========================================
+//===== Hercules Script ======================================
//= Malaya Port Dungeon Monster Spawn Script
//===== By: ==================================================
//= Chilly
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Official kRO monster spawns
//===== Additional Comments: =================================
diff --git a/npc/re/mobs/dungeons/mag_dun.txt b/npc/re/mobs/dungeons/mag_dun.txt
index 7fce2de53..562633a5d 100644
--- a/npc/re/mobs/dungeons/mag_dun.txt
+++ b/npc/re/mobs/dungeons/mag_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Magma Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 fixed 2,3,4 tabs instead of 1... and wrong mob names [Lupus]
//= 1.2 Official jRO 10.3 spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/mal_dun.txt b/npc/re/mobs/dungeons/mal_dun.txt
index 79efeecbf..9bcfc8132 100644
--- a/npc/re/mobs/dungeons/mal_dun.txt
+++ b/npc/re/mobs/dungeons/mal_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script ========================================
+//===== Hercules Script ======================================
//= Malangdo Dungeon Monster Spawn Script
//===== By: ==================================================
//= Chilly
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Official kRO monster spawns
//===== Additional Comments: =================================
diff --git a/npc/re/mobs/dungeons/mjo_dun.txt b/npc/re/mobs/dungeons/mjo_dun.txt
index 435678446..4e100d161 100644
--- a/npc/re/mobs/dungeons/mjo_dun.txt
+++ b/npc/re/mobs/dungeons/mjo_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Coal Mine(Dead pit) Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 Official kRO 10.1 spawns [Playtester]
//============================================================
diff --git a/npc/re/mobs/dungeons/moc_pryd.txt b/npc/re/mobs/dungeons/moc_pryd.txt
index e082fec52..dcd5197f1 100644
--- a/npc/re/mobs/dungeons/moc_pryd.txt
+++ b/npc/re/mobs/dungeons/moc_pryd.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Morocc Pryamid Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 Official kRO 10.1 spawns [Playtester]
//= 1.2 More accurate spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/mosk_dun.txt b/npc/re/mobs/dungeons/mosk_dun.txt
index b340ccb12..64dbc9245 100644
--- a/npc/re/mobs/dungeons/mosk_dun.txt
+++ b/npc/re/mobs/dungeons/mosk_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Moscovia Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 Added spawns [Playtester]
//= 1.1 Swapped named according to mob db. [L0ne_W0lf]
diff --git a/npc/re/mobs/dungeons/nyd_dun.txt b/npc/re/mobs/dungeons/nyd_dun.txt
index 8d10e2631..7b8dbd156 100644
--- a/npc/re/mobs/dungeons/nyd_dun.txt
+++ b/npc/re/mobs/dungeons/nyd_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Yggdrasil Root Dungeon
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 First version
//============================================================
diff --git a/npc/re/mobs/dungeons/odin.txt b/npc/re/mobs/dungeons/odin.txt
index b7a9038ca..cf9f046bb 100644
--- a/npc/re/mobs/dungeons/odin.txt
+++ b/npc/re/mobs/dungeons/odin.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Odin Temple Monster Spawn Script
//===== By: ==================================================
//= Poki#3 (0.1)
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 Updated by using Tharis' Homun AI, by Tharis [Vicious]
//= 1.1 More accurate spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/orcsdun.txt b/npc/re/mobs/dungeons/orcsdun.txt
index 3a011ec5d..6c0ecee54 100644
--- a/npc/re/mobs/dungeons/orcsdun.txt
+++ b/npc/re/mobs/dungeons/orcsdun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Orc Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.2 Official kRO 10.1 spawns [Playtester]
//============================================================
diff --git a/npc/re/mobs/dungeons/pay_dun.txt b/npc/re/mobs/dungeons/pay_dun.txt
index eade9ece2..83639ca2c 100644
--- a/npc/re/mobs/dungeons/pay_dun.txt
+++ b/npc/re/mobs/dungeons/pay_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Payon Cave Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 Official kRO 10.1 spawns [Playtester]
//= 1.2 Small spawn update [Playtester]
diff --git a/npc/re/mobs/dungeons/prt_maze.txt b/npc/re/mobs/dungeons/prt_maze.txt
index 169127050..6feea8a0a 100644
--- a/npc/re/mobs/dungeons/prt_maze.txt
+++ b/npc/re/mobs/dungeons/prt_maze.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Prontera Maze(Hidden Temple) Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.2 Official kRO 10.1 spawns [Playtester]
//= 1.3 Some small fixes [Playtester]
diff --git a/npc/re/mobs/dungeons/prt_sew.txt b/npc/re/mobs/dungeons/prt_sew.txt
index 23a10de97..6fd21922d 100644
--- a/npc/re/mobs/dungeons/prt_sew.txt
+++ b/npc/re/mobs/dungeons/prt_sew.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Prontera Sewers(Culvert) Dungeon Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 Official kRO 10.1 spawns [Playtester]
//= 1.2 Corrected MVP spawn variance. [L0ne_W0lf]
diff --git a/npc/re/mobs/dungeons/ra_san.txt b/npc/re/mobs/dungeons/ra_san.txt
index 46b4f255b..b5f764b70 100644
--- a/npc/re/mobs/dungeons/ra_san.txt
+++ b/npc/re/mobs/dungeons/ra_san.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Rachel Sanctuary Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 First version with guessed amounts [Playtester]
//= 1.1 More accurate spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/tha_t.txt b/npc/re/mobs/dungeons/tha_t.txt
index 681f086d8..789a71cdd 100644
--- a/npc/re/mobs/dungeons/tha_t.txt
+++ b/npc/re/mobs/dungeons/tha_t.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Thanatos Tower Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 Real spawns by Poki#3 [Nexon]
//= 1.1 More official spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/thor_v.txt b/npc/re/mobs/dungeons/thor_v.txt
index 077ada870..2d3867f5b 100644
--- a/npc/re/mobs/dungeons/thor_v.txt
+++ b/npc/re/mobs/dungeons/thor_v.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script ========================================
+//===== Hercules Script ======================================
//= Thor Volcano Monster Spawn Script
//===== By: ==================================================
//= Playtester
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= Official monster spawn in Thor Volcano Dungeon.
//===== Additional Comments: =================================
diff --git a/npc/re/mobs/dungeons/treasure.txt b/npc/re/mobs/dungeons/treasure.txt
index e4073cfba..25d8caf60 100644
--- a/npc/re/mobs/dungeons/treasure.txt
+++ b/npc/re/mobs/dungeons/treasure.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Sunken Ship Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 Official kRO 10.1 spawns [Playtester]
//= 1.2 More accurate spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/tur_dun.txt b/npc/re/mobs/dungeons/tur_dun.txt
index 467bee819..a73fc3d1b 100644
--- a/npc/re/mobs/dungeons/tur_dun.txt
+++ b/npc/re/mobs/dungeons/tur_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Turtle Island Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.2 Official kRO 10.1 spawns [Playtester]
//============================================================
diff --git a/npc/re/mobs/dungeons/xmas_dun.txt b/npc/re/mobs/dungeons/xmas_dun.txt
index eeca02eef..f3c6d8859 100644
--- a/npc/re/mobs/dungeons/xmas_dun.txt
+++ b/npc/re/mobs/dungeons/xmas_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Toy Factory Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.1 added Garm Baby according to May 10 patch
//= 1.2 Official kRO 10.1 spawns [Playtester]
diff --git a/npc/re/mobs/dungeons/yggdrasil.txt b/npc/re/mobs/dungeons/yggdrasil.txt
index b3d401ac5..9fb13a6b6 100644
--- a/npc/re/mobs/dungeons/yggdrasil.txt
+++ b/npc/re/mobs/dungeons/yggdrasil.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Yggdrasil Tree Monster Spawn Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Additional Comments: =================================
//= 1.0 Splitted from Nifflheim fields [DracoRPG]
//= 1.1 Official kRO 10.1 spawns [Playtester]
diff --git a/npc/re/mobs/fields/bifrost.txt b/npc/re/mobs/fields/bifrost.txt
index b8c28bf49..04667acb0 100644
--- a/npc/re/mobs/fields/bifrost.txt
+++ b/npc/re/mobs/fields/bifrost.txt
@@ -9,27 +9,28 @@
//===== Additional Comments: =================================
//= 1.0 First Release
//= 1.1 Added more accurate 1@mist monsters
+//= 1.2 Renewal spawn update. [Euphy]
//============================================================
//==================================================
// bif_fild01 - Bifrost South
//==================================================
-bif_fild01,0,0,0,0 monster Luciola Vespa 1994,25,0,0,0
-bif_fild01,0,0,0,0 monster Cornus 1992,15,0,0,0
-bif_fild01,0,0,0,0 monster Pom Spider 2132,5,0,0,0
-bif_fild01,0,0,0,0 monster Angra Mantis 2133,5,0,0,0
-bif_fild01,0,0,0,0 monster Little Fatum 2136,30,0,0,0
-bif_fild01,0,0,0,0 monster Miming 2137,50,0,0,0
+bif_fild01,0,0,0,0 monster Luciola Vespa 1994,29,5000,0,0
+bif_fild01,0,0,0,0 monster Cornus 1992,17,5000,0,0
+bif_fild01,0,0,0,0 monster Miming 2137,58,5000,0,0
+bif_fild01,0,0,0,0 monster Little Fatum 2136,34,5000,0,0
+bif_fild01,0,0,0,0 monster Angra Mantis 2133,5,5000,0,0
+bif_fild01,0,0,0,0 monster Pom Spider 2132,5,5000,0,0
//==================================================
// bif_fild02 - Bifrost North
//==================================================
-bif_fild02,0,0,0,0 monster Luciola Vespa 1994,25,0,0,0
-bif_fild02,0,0,0,0 monster Cornus 1992,15,0,0,0
-bif_fild02,0,0,0,0 monster Pom Spider 2132,5,0,0,0
-bif_fild02,0,0,0,0 monster Angra Mantis 2133,5,0,0,0
-bif_fild02,0,0,0,0 monster Little Fatum 2136,50,0,0,0
-bif_fild02,0,0,0,0 monster Miming 2137,30,0,0,0
+bif_fild02,0,0,0,0 monster Luciola Vespa 1994,27,5000,0,0
+bif_fild02,0,0,0,0 monster Cornus 1992,16,5000,0,0
+bif_fild02,0,0,0,0 monster Miming 2137,33,5000,0,0
+bif_fild02,0,0,0,0 monster Little Fatum 2136,55,5000,0,0
+bif_fild02,0,0,0,0 monster Angra Mantis 2133,5,5000,0,0
+bif_fild02,0,0,0,0 monster Pom Spider 2132,5,5000,0,0
//==================================================
// 1@mist - Forest Maze of Mists
diff --git a/npc/re/mobs/fields/lighthalzen.txt b/npc/re/mobs/fields/lighthalzen.txt
index 8a9dbead3..92cbad659 100644
--- a/npc/re/mobs/fields/lighthalzen.txt
+++ b/npc/re/mobs/fields/lighthalzen.txt
@@ -1,7 +1,7 @@
//===== Hercules Script ======================================
//= Lighthalzen Fields Monster Spawn Script
//===== By: ==================================================
-//= Muad_Dib, rAthena Dev Team
+//= Muad_Dib, Hercules Dev Team
//===== Current Version: =====================================
//= 1.6
//===== Additional Comments: =================================
diff --git a/npc/re/other/mercenary_rent.txt b/npc/re/other/mercenary_rent.txt
index 0b065208d..0e92f8fc2 100644
--- a/npc/re/other/mercenary_rent.txt
+++ b/npc/re/other/mercenary_rent.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Mercenary related NPCs
//===== By: ==================================================
//= Daegaladh
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Sells Lancer, Sword, and Archer mercenaries,
//= along with related mercenary items.
diff --git a/npc/re/quests/cupet.txt b/npc/re/quests/cupet.txt
index ac19d237d..c2ba9fec7 100644
--- a/npc/re/quests/cupet.txt
+++ b/npc/re/quests/cupet.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Cute Pet Manager
//===== By: ==================================================
//= Z3R0
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Aegis Conversion]
//= Exchanges Hunted Items for Tames
diff --git a/npc/re/quests/eden/eden_common.txt b/npc/re/quests/eden/eden_common.txt
index 1b05030c8..8570fd39e 100644
--- a/npc/re/quests/eden/eden_common.txt
+++ b/npc/re/quests/eden/eden_common.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Eden Group Quests - Common NPCs
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.6
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Eden Group Headquarter NPC's.
//===== Additional Comments: =================================
diff --git a/npc/re/quests/eden/eden_quests.txt b/npc/re/quests/eden/eden_quests.txt
index 3c9d421a7..4a85bdc79 100644
--- a/npc/re/quests/eden/eden_quests.txt
+++ b/npc/re/quests/eden/eden_quests.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Eden Group Quest - Quests NPCs
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.4b
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Eden Group Headquarter NPC's.
//===== Additional Comments: =================================
diff --git a/npc/re/quests/eden/eden_service.txt b/npc/re/quests/eden/eden_service.txt
index 041395861..fd6e9a47f 100644
--- a/npc/re/quests/eden/eden_service.txt
+++ b/npc/re/quests/eden/eden_service.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Eden Group Quests - Service NPCs
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= Any rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Paradise Group storage access.
//===== Additional Comments: =================================
diff --git a/npc/re/quests/homu_s.txt b/npc/re/quests/homu_s.txt
index 1881a97ca..66e2b5c3d 100644
--- a/npc/re/quests/homu_s.txt
+++ b/npc/re/quests/homu_s.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Homunculus S Quest
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Evolves an Homunculus which is at least Level 99 to the
//= new Homunculus S Class.
diff --git a/npc/re/quests/magic_books.txt b/npc/re/quests/magic_books.txt
index 943d0c8dd..9f9ccec1f 100644
--- a/npc/re/quests/magic_books.txt
+++ b/npc/re/quests/magic_books.txt
@@ -1,4 +1,4 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Magic Book Seller
//===== By: ==================================================
//= Masao
@@ -6,7 +6,7 @@
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena
+//= Hercules
//===== Description: =========================================
//= An NPC which sells you different kinds of Magic Books.
//===== Additional Comments: =================================
diff --git a/npc/re/quests/mrsmile.txt b/npc/re/quests/mrsmile.txt
index c36ecf91a..029633437 100644
--- a/npc/re/quests/mrsmile.txt
+++ b/npc/re/quests/mrsmile.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Mr. Smile Quest
//===== By: ==================================================
//= Daegaladh, Masao
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= [Aegis Conversion]
//= Trade Clover, Fluff and Jellopy for a Mr. Smile mask.
diff --git a/npc/re/quests/pile_bunker.txt b/npc/re/quests/pile_bunker.txt
index 31b36c82b..c2c979430 100644
--- a/npc/re/quests/pile_bunker.txt
+++ b/npc/re/quests/pile_bunker.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Pile Bunker Quest
//===== By: ==================================================
//= JayPee Mateo
//===== Current Version: =====================================
//= 2.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= 1.0 A Pile Bunker quest based on iRO WiKi. [JayPee Mateo]
//= 2.0 Rewrited the Script a little so it looks a bit better. [Masao]
diff --git a/npc/re/quests/quests_brasilis.txt b/npc/re/quests/quests_brasilis.txt
index 88b021a0f..2e1cbe75a 100644
--- a/npc/re/quests/quests_brasilis.txt
+++ b/npc/re/quests/quests_brasilis.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Brasilis Qiests
//===== By ===================================================
//= L0ne_W0lf
//===== Version ==============================================
//= 1.2
//===== Compatible With ======================================
-//= rAthena SVN
+//= Hercules
//===== Description ==========================================
//= [Translated from the Official]
//= Lost Puppies (Repeatable, 24 hours.)
diff --git a/npc/re/quests/quests_dewata.txt b/npc/re/quests/quests_dewata.txt
index ad986da6c..f0f6fef1e 100644
--- a/npc/re/quests/quests_dewata.txt
+++ b/npc/re/quests/quests_dewata.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Dewata Quest NPCs
//===== By: ==================================================
//= Gennosuke Kouga, Muad_Dib
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Quest NPCs related to Dewata:
//== "Dewata Legend"
diff --git a/npc/re/quests/quests_dicastes.txt b/npc/re/quests/quests_dicastes.txt
index e55ed80a6..20320b078 100644
--- a/npc/re/quests/quests_dicastes.txt
+++ b/npc/re/quests/quests_dicastes.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= El Dicastes Quest NPCs
//===== By: ==================================================
//= Gennosuke Kouga, Muad_Dib
//===== Current Version: =====================================
-//= 1.8a
+//= 1.9a
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Quest NPCs related to Dewata:
//== Sapha's Visit, Doha's Secrect Order, Frede's Request,
@@ -25,6 +25,9 @@
//= 1.7 Updated to match the official script. [Joseph]
//= 1.8 Optimized and fixed invalid checkquest. [Joseph]
//= 1.8a Disabled "Fish Tails" until Izlude RE coordinates are found. [Euphy]
+//= 1.8b Updated "Calyon" NPC and fixed a check. [Euphy]
+//= 1.9 Updated "Fish Tails" with RE coordinates.
+//= 1.9a Minor fix. [Joseph]
//============================================================
// Entrance
@@ -436,7 +439,7 @@ function script que_dic {
delitem getarg(3), getarg(4);
}
else if (getarg(0) == 2) {
- for(.@i = 1; .@i < getargcount(); .@i++) {
+ for(set .@i,1; .@i<getargcount(); set .@i,.@i+1) {
if (checkquest(getarg(.@i)) >= 0)
erasequest getarg(.@i);
}
@@ -1027,7 +1030,7 @@ dic_in01,40,193,1 script Papyrus#0001 453,{
else if (.@doc == 11) eldicastes_dp(12169,"Stem","There is nothing like Midgard plants in Manuk.","These plants are used for food and medicine and some are even poisonous.");
else if (.@doc == 12) eldicastes_dp(12170,"Pointed Scale","Stem from a bumpy life form. Research required as the usage is unknown.","");
else if (.@doc == 13) eldicastes_dp(12171,"Resin","Sap from an old tree collected and solidified. Very valuable in the human world.","");
- //else if (.@doc == 14) eldicastes_dp(12174,"Fish Tail","Humans eat meat called fish.","Can be used as important food supply for foreign adventurers visiting in the city.");
+ else if (.@doc == 14) eldicastes_dp(12174,"Fish Tail","Humans eat meat called fish.","Can be used as important food supply for foreign adventurers visiting in the city.");
else if (.@doc == 15) eldicastes_dp(12175,"Worm Peeling","They say some Worm Peelings are valuable.","But this is based on the human's standard of value. Research required.");
else if (.@doc == 16) eldicastes_dp(12176,"Gill","There are Midgard creatures that live in the sea and breathe through gills.","Further research on their ecology will be useful.");
else if (.@doc == 17) eldicastes_dp(12177,"Tooth of Bat","Traces of a nocturnal creature unknown to Manuk. Not a strong creature from the size of its teeth.","");
@@ -1090,7 +1093,7 @@ dic_in01,25,187,0 duplicate(Document Package#main) Document Package#0004 844
function script unknown_d {
if (checkquest(getarg(0)) == -1) {
- mes "You see some traces of digging";
+ mes "You see some traces of digging.";
close;
}
specialeffect2 EF_SPRINKLESAND;
@@ -1115,7 +1118,7 @@ pay_fild02,105,113,0 script Pointed Scales 844,{ unknown_d(12170,906); }
pay_fild01,152,171,0 script Resin 844,{ unknown_d(12171,907); }
gef_fild01,104,111,0 script Spawn 844,{ unknown_d(12172,908); }
prt_fild08,299,332,0 script Jellopy 844,{ unknown_d(12173,909); }
-//izlude,132,136,0 script Fish Tails 844,{ unknown_d(12174,1023); }
+izlude,136,160,0 script Fish Tails 844,{ unknown_d(12174,1023); } // Pre-RE: izlude (132,136)
prt_fild05,303,169,0 script Worm Peelings 844,{ unknown_d(12175,955); }
iz_dun03,155,165,0 script Gills 844,{ unknown_d(12176,956); }
mjo_dun01,222,226,0 script Tooth of Bat 844,{ unknown_d(12177,913); }
@@ -2279,159 +2282,175 @@ dic_in01,158,188,3 script Jarute HesLanta#ep133_2 451,{
}
dicastes01,223,190,1 script Calyon#pa8029 453,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of items. Let's try again after you reduce the number of items.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "Cannot proceed because the weight of your items is too heavy. Let's try again after you get rid of some weight.";
+ close;
+ }
+ if (!isequipped(2782)) {
+ mes "¡õ¢£¡ô";
+ mes "¡ö¡ø¡ó ¢£ ¡ö¡ñ¡ï ¡ù ¡ð¢²¢£";
+ next;
+ mes "I don't feel confident in talking since you wouldn't understand anything.";
+ close;
+ }
+ if (ep13_3_invite < 6) {
+ mes "Sapha keeps a distance from you even when you try to talk. Looks like he called on Guard Galten. Time to go.";
+ close;
+ }
mes "[Calyon]";
- if (isequipped(2782)) {
- if (ep13_3_invite == 5) {
- if (BaseLevel < 80) {
- mes "Sorry, a minimum base level of 80 or higher is required to obtain my request.";
- close; }
- if (checkquest(12163,PLAYTIME) == 2) {
- mes "Calculate your request activities with the ^800080Transport Dept. 1 Manager^000000 at Operations and then come back.";
- close;
- } else if (checkquest(12163,PLAYTIME) != -1) {
- mes "We're done for the day. You can report back to the ^800080Transport Dept. 1 Manager^000000 at Operations. Good luck.";
- close; }
- mes "Welcome.";
- mes "What brings you here?";
- next;
- if(select("Please explain the request to me.", "Please give me a request.")==1) {
- mes "[Calyon]";
- mes "The Transport Dept. 1 and 2 brings in rare items that are not available here.";
- next;
- mes "[Calyon]";
- mes "It is one of the key departments that obtains the rich supplies mostly from the Midgard Continent.";
- next;
- mes "[Calyon]";
- mes "Please see me any time once you are ready.";
- close;
- }
- set .@calyonrequest,rand(1,11);
- mes "[Calyon]";
- mes "Finally, I have a request for you. It is an important one so I need you to be focused.";
- next;
- mes "[Calyon]";
- if (.@calyonrequest == 1) {
- setquest 12139;
- setquest 12163;
- mes "The high minister is looking for the Midgard product, Witherless Roses these days.";
- mes "Not sure if it's a good gift but some have seen him with it on his head and showing it off.";
- next;
- mes "[Calyon]";
- mes "So... I know this is difficult to ask for but please bring me 1 Witherless Rose. This is just between you and me.";
- next;
- mes "You have received a request named ^800080Respect for Taste^000000.";
- } else if (.@calyonrequest == 2) {
- setquest 12137;
- setquest 12163;
- mes "The industrial research center researches ways of refining Bradium efficiently but they are always short on test materials.";
- next;
- mes "[Calyon]";
- mes "I heard there is a merchant in the adventurer's city who sells Glass Tubes. I will need 4 of them.";
- next;
- mes "You have received a request named ^800080Tools for Experiment^000000.";
- } else if (.@calyonrequest == 3) {
- setquest 12138;
- setquest 12163;
- mes "The pub owner said he wants to give a gift to all his regular Sapha customers.";
- next;
- mes "[Calyon]";
- mes "But doesn't know what to give. If you see any interesting gifts in Midgard, can bring back 5 of them?";
- next;
- mes "You have received a request named ^800080Fine Gift Samples^000000.";
- } else if (.@calyonrequest == 4) {
- setquest 12140;
- setquest 12163;
- mes "A request from the pub owner. He says he can't use disposable leaf plates for regular customers.";
- next;
- mes "[Calyon]";
- mes "He is asking for 15 solid, white chinas from Midgard.";
- next;
- mes "You have received a request named ^800080Courtesy for Regular^000000.";
- } else if (.@calyonrequest == 5) {
- setquest 12141;
- setquest 12163;
- mes "I have a personal request. I heard there is a round transparent handicraft in Midgard.";
- mes "I think they are called Glass Beads.";
- next;
- mes "[Calyon]";
- mes "We have similar manufactured items here but nothing compared to the elaborate sphere there.";
- mes "Please get me 10 of them.";
- next;
- mes "You have received a request named ^800080Special Package^000000.";
- } else if (.@calyonrequest == 6) {
- setquest 12142;
- setquest 12163;
- mes "Hmm... I don't know how to start. The high minister is requesting for puppets from Midgard.";
- mes "I don't know what it is but since the high minister is asking for it, it must be used for a very important purpose.";
- next;
- mes "[Calyon]";
- mes "Please bring 15 of them.";
- next;
- mes "You have received a request named ^800080Dangerous Request^000000.";
- } else if (.@calyonrequest == 7) {
- setquest 12143;
- setquest 12163;
- mes "I heard there is a trend among many of my colleagues here about a musical accessory made from a Bill of Birds from Midgard.";
- next;
- mes "[Calyon]";
- mes "I'm thinking of distributing them within the Operations building.";
- mes "Can you buy and bring back 50 of them?";
- next;
- mes "You have received a request named ^800080Strange Trend^000000.";
- } else if (.@calyonrequest == 8) {
- setquest 12144;
- setquest 12163;
- mes "The pub owner said he wanted to decorate the pub with something called Clam Shells.";
- mes "Please bring back about 50 of them.";
- next;
- mes "[Calyon]";
- mes "I have no idea how he will use them but I think he has a very unique taste after being acquainted with many adventurers.";
- next;
- mes "You have received a request named ^800080Unknown Usage^000000.";
- } else if (.@calyonrequest == 9) {
- setquest 12145;
- setquest 12163;
- mes "We don't have cuisine for ourselves but many adventurers seem to enjoy the art of eating.";
- mes "So the pub owner needs a plate for his new cuisine.";
- next;
- mes "[Calyon]";
- mes "He asked for 20 Crab Shells.";
- mes "I have no idea where you can get them but... good luck.";
- next;
- mes "You have received a request named ^800080Other World Cuisine^000000.";
- } else if (.@calyonrequest == 10) {
- setquest 12146;
- setquest 12163;
- mes "I think the most useful Midgard item is Scells.";
- next;
- mes "[Calyon]";
- mes "Use Scells to fill any crack or holes in a building and then mix and plaster grinded Garlet to it and the building is maintained quick and simple.";
- mes "Can you bring back 30 of them?";
- next;
- mes "You have received a request named ^800080Filling in Cracks^000000.";
- } else if (.@calyonrequest == 11) {
- setquest 12147;
- setquest 12163;
- mes "Garlets are an element in building maintenance.";
- mes "It is one of the most important materials in buildings.";
- next;
- mes "[Calyon]";
- mes "Before Garlets were available, we crushed and used Zargons but they have become difficult to come by.";
- mes "Please bring back 40 of them.";
- next;
- mes "You have received a request named ^800080Adhesive Material^000000."; }
- mes "You can check details of the request and who to report back to by opening the ^800080Quest Window^000000.";
- mes "You have 23 hours to complete this mission.";
- close;
- }
- mes "- The Sapha keeps a distance from you even when you try to talk.";
- mes "It looks like he is calling for a Galten. Time to go. -";
- close;
+ if (BaseLevel < 80) {
+ mes "Ha ha, come back again after you are trained more. I have no request that fits you.";
+ close;
+ }
+ if (checkquest(12163,PLAYTIME) == 2) {
+ mes "Calculate your request activities with the ^800080Transport Dept. 1 Manager^000000 at Operations and then come back.";
+ close;
+ } else if (checkquest(12163,PLAYTIME) != -1) {
+ mes "We're done for the day. You can report back to the ^800080Transport Dept. 1 Manager^000000 at Operations. Good luck.";
+ close;
}
- mes "¡õ¢£¡ô";
- mes "¡ö¡ø¡ó ¢£ ¡ö¡ñ¡ï ¡ù ¡ð¢²¢£";
+ mes "Welcome.";
+ mes "What brings you here?";
next;
- mes "- I can't understand him... -";
+ if(select("Please explain the request to me.", "Please give me a request.") == 1) {
+ mes "[Calyon]";
+ mes "The Transport Dept. 1 and 2";
+ mes "brings in rare items";
+ mes "that are not available";
+ mes "here.";
+ next;
+ mes "[Calyon]";
+ mes "It is one of the";
+ mes "key departments that";
+ mes "obtains the rich supplies";
+ mes "mostly from the Midgard Continent.";
+ next;
+ mes "[Calyon]";
+ mes "Please see me any time";
+ mes "once you are ready.";
+ close;
+ }
+ mes "[Calyon]";
+ mes "Finally, I have a request for you. It is an important one so I need you to be focused.";
+ next;
+ set .@calyonrequest,rand(1,11);
+ mes "[Calyon]";
+ if (.@calyonrequest == 1) {
+ setquest 12139;
+ setquest 12163;
+ mes "The high minister is looking for the Midgard product, Witherless Roses these days.";
+ mes "Not sure if it's a good gift but some have seen him with it on his head and showing it off.";
+ next;
+ mes "[Calyon]";
+ mes "So... I know this is difficult to ask for but please bring me 1 Witherless Rose. This is just between you and me.";
+ next;
+ mes "You have received a request named ^800080Respect for Taste^000000.";
+ } else if (.@calyonrequest == 2) {
+ setquest 12137;
+ setquest 12163;
+ mes "The industrial research center researches ways of refining Bradium efficiently but they are always short on test materials.";
+ next;
+ mes "[Calyon]";
+ mes "I heard there is a merchant in the adventurer's city who sells Glass Tubes. I will need 4 of them.";
+ next;
+ mes "You have received a request named ^800080Tools for Experiment^000000.";
+ } else if (.@calyonrequest == 3) {
+ setquest 12138;
+ setquest 12163;
+ mes "The pub owner said he wants to give a gift to all his regular Sapha customers.";
+ next;
+ mes "[Calyon]";
+ mes "But doesn't know what to give. If you see any interesting gifts in Midgard, can bring back 5 of them?";
+ next;
+ mes "You have received a request named ^800080Fine Gift Samples^000000.";
+ } else if (.@calyonrequest == 4) {
+ setquest 12140;
+ setquest 12163;
+ mes "A request from the pub owner. He says he can't use disposable leaf plates for regular customers.";
+ next;
+ mes "[Calyon]";
+ mes "He is asking for 15 solid, white chinas from Midgard.";
+ next;
+ mes "You have received a request named ^800080Courtesy for Regular^000000.";
+ } else if (.@calyonrequest == 5) {
+ setquest 12141;
+ setquest 12163;
+ mes "I have a personal request. I heard there is a round transparent handicraft in Midgard.";
+ mes "I think they are called Glass Beads.";
+ next;
+ mes "[Calyon]";
+ mes "We have similar manufactured items here but nothing compared to the elaborate sphere there.";
+ mes "Please get me 10 of them.";
+ next;
+ mes "You have received a request named ^800080Special Package^000000.";
+ } else if (.@calyonrequest == 6) {
+ setquest 12142;
+ setquest 12163;
+ mes "Hmm... I don't know how to start. The high minister is requesting for puppets from Midgard.";
+ mes "I don't know what it is but since the high minister is asking for it, it must be used for a very important purpose.";
+ next;
+ mes "[Calyon]";
+ mes "Please bring 15 of them.";
+ next;
+ mes "You have received a request named ^800080Dangerous Request^000000.";
+ } else if (.@calyonrequest == 7) {
+ setquest 12143;
+ setquest 12163;
+ mes "I heard there is a trend among many of my colleagues here about a musical accessory made from a Bill of Birds from Midgard.";
+ next;
+ mes "[Calyon]";
+ mes "I'm thinking of distributing them within the Operations building.";
+ mes "Can you buy and bring back 50 of them?";
+ next;
+ mes "You have received a request named ^800080Strange Trend^000000.";
+ } else if (.@calyonrequest == 8) {
+ setquest 12144;
+ setquest 12163;
+ mes "The pub owner said he wanted to decorate the pub with something called Clam Shells.";
+ mes "Please bring back about 50 of them.";
+ next;
+ mes "[Calyon]";
+ mes "I have no idea how he will use them but I think he has a very unique taste after being acquainted with many adventurers.";
+ next;
+ mes "You have received a request named ^800080Unknown Usage^000000.";
+ } else if (.@calyonrequest == 9) {
+ setquest 12145;
+ setquest 12163;
+ mes "We don't have cuisine for ourselves but many adventurers seem to enjoy the art of eating.";
+ mes "So the pub owner needs a plate for his new cuisine.";
+ next;
+ mes "[Calyon]";
+ mes "He asked for 20 Crab Shells.";
+ mes "I have no idea where you can get them but... good luck.";
+ next;
+ mes "You have received a request named ^800080Other World Cuisine^000000.";
+ } else if (.@calyonrequest == 10) {
+ setquest 12146;
+ setquest 12163;
+ mes "I think the most useful Midgard item is Scells.";
+ next;
+ mes "[Calyon]";
+ mes "Use Scells to fill any crack or holes in a building and then mix and plaster grinded Garlet to it and the building is maintained quick and simple.";
+ mes "Can you bring back 30 of them?";
+ next;
+ mes "You have received a request named ^800080Filling in Cracks^000000.";
+ } else if (.@calyonrequest == 11) {
+ setquest 12147;
+ setquest 12163;
+ mes "Garlets are an element in building maintenance.";
+ mes "It is one of the most important materials in buildings.";
+ next;
+ mes "[Calyon]";
+ mes "Before Garlets were available, we crushed and used Zargons but they have become difficult to come by.";
+ mes "Please bring back 40 of them.";
+ next;
+ mes "You have received a request named ^800080Adhesive Material^000000.";
+ }
+ mes "You can check details of the request and who to report back to by opening the ^800080Quest Window^000000.";
close;
}
@@ -6669,7 +6688,7 @@ man_in01,315,52,3 script Guard Captain Avalanche 450,{
}
else if (ep13_3_invite == 6) {
mes "[Avalanche]";
- mes "Oh.. You have the Light of El Dicastes.";
+ mes "Oh... You have the Light of El Dicastes.";
mes "it would be helpful for your travel.";
next;
mes "[Avalanche]";
@@ -6687,7 +6706,8 @@ man_in01,315,52,3 script Guard Captain Avalanche 450,{
next;
mes "[Avalanche]";
mes "Always take care of yourself at all times.";
- mes "Haha.. but then you humans are very strong.";
+ mes "Haha... but then you humans are very strong.";
+ close;
}
dic_in01,42,264,3 script Adventurer Clerk#ep133 453,{
@@ -6941,7 +6961,7 @@ dic_in01,42,264,3 script Adventurer Clerk#ep133 453,{
mes "But of course, since this is adding spells on top of its original magic, I cannot guarantee that you will get what you want on one try.";
close;
}
- if (countitem(2844) < 1) { //Light of El Dicastes
+ if (countitem(2844) < 1) {
mes "[Kareka]";
mes "Either you are not wearing or don't have the equipment to upgrade on you.";
close;
@@ -7318,8 +7338,9 @@ dic_fild01,228,159,4 script Jahbong#pa0829 496,{
mes "Why are you here?";
mes "Jahbong will exchange ^8000801 Sapha Certification^000000 for ^8000801 item^000000!";
next;
- switch(select("Just came to see what you have.:I want the Feral Boots!:Give me the Feral Tail!:Give me the Golden Bell!:How much to buy you?")) {
- case 1:
+ set .@i, select("Just came to see what you have.:I want the Feral Boots!:Give me the Feral Tail!:Give me the Golden Bell!:How much to buy you?")-1;
+ switch (.@i) {
+ case 0:
mes "[Jahbong]";
mes "Meow!";
next;
@@ -7335,47 +7356,8 @@ dic_fild01,228,159,4 script Jahbong#pa0829 496,{
mes "[Jahbong]";
mes "There are some crazy adventurers asking if they can purchase me! Jahbong is not for sale! I'll just bite you if you ask!!";
close;
- case 2:
- mes "[Jahbong]";
- mes "Are you really buying something?!";
- next;
- if(select("Nope:Give me!!!")==1) {
- mes "[Jahbong]";
- mes "Okay!";
- close; }
- mes "[Jahbong]";
- mes "Here you go!";
- delitem 6304,1;
- getitem 2463,1;
- close;
- case 3:
- mes "[Jahbong]";
- mes "Are you really buying something?!";
- next;
- if(select("Nope:Give me!!!")==1) {
- mes "[Jahbong]";
- mes "Okay!";
- close; }
- mes "[Jahbong]";
- mes "Here you go!";
- delitem 6304,1;
- getitem 2564,1;
- close;
case 4:
mes "[Jahbong]";
- mes "Are you really buying something?!";
- next;
- if(select("Nope:Give me!!!")==1) {
- mes "[Jahbong]";
- mes "Okay!";
- close; }
- mes "[Jahbong]";
- mes "Here you go!";
- delitem 6304,1;
- getitem 2843,1;
- close;
- case 5:
- mes "[Jahbong]";
mes "Meooooooooooow!!!!!!!!~~ Meooooooooow!!!!!";
next;
mes "- ^800080Jahbong goes wild^000000. -";
@@ -7385,7 +7367,23 @@ dic_fild01,228,159,4 script Jahbong#pa0829 496,{
next;
mes "- He may react extremely, but Jahbong doesn't seem to be really angry. -";
close;
- }
+ default:
+ break;
+ }
+ mes "[Jahbong]";
+ mes "Are you really buying something?!";
+ next;
+ if (select("Nope:Give me!!!") == 1) {
+ mes "[Jahbong]";
+ mes "Okay!";
+ close;
+ }
+ setarray .@items[1],2463,2564,2843;
+ mes "[Jahbong]";
+ mes "Here you go!";
+ delitem 6304,1;
+ getitem .@items[.@i],1;
+ close;
}
// Cat Hand Agent
@@ -7411,7 +7409,7 @@ moc_para01,44,19,3 script Cat Hand Agent#gekk 496,{
mes "It breaks my heart to think my colleagues will be shivering in the blizzard. I hope I don't get into trouble since I can't do anything about it, right?";
next;
if (select ("Why don't you collect it yourself?:I'm sorry to hear that.") == 1) {
- emotion ET_HUK;
+ emotion e_omg;
mes "[Cat Hand Agent]";
mes "Human!! You're a genius!!";
mes "How did you come up with that?";
@@ -7453,7 +7451,7 @@ moc_para01,44,19,3 script Cat Hand Agent#gekk 496,{
next;
input .@inputstr$;
mes "[Agent Geck]";
- mes "" + name + "? Human names are strange to me.";
+ mes "" + strcharinfo(0) + "? Human names are strange to me.";
next;
mes "[Agent Geck]";
mes "Now you are Geck's personal slav... sponsor.";
@@ -7538,7 +7536,7 @@ moc_fild20,368,197,3 script Cat#to22 876,{
mes "The small body isn't as tall as your ankle and its small but thick paws look like little cushions. The ears that bent backwards when it looked at how big you were stirred up your protective instinct.";
next;
mes "You don't seem to have the nerve to step on the Cat Hand Agent.";
- emotion ET_CRY;
+ emotion e_sob;
close;
}
mes "You look at the Cat Hand Agent's small back and climb over the wall as quick as possible so that it wouldn't notice your weight.";
diff --git a/npc/re/quests/quests_izlude.txt b/npc/re/quests/quests_izlude.txt
index 8855ef2d1..0286baca0 100644
--- a/npc/re/quests/quests_izlude.txt
+++ b/npc/re/quests/quests_izlude.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Quest NPCs related to Izlude
//===== By: ==================================================
//= Daegaladh, Masao
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Edgar's Offer
//===== Additional Comments: =================================
diff --git a/npc/re/quests/quests_mora.txt b/npc/re/quests/quests_mora.txt
new file mode 100644
index 000000000..f1d8e5784
--- /dev/null
+++ b/npc/re/quests/quests_mora.txt
@@ -0,0 +1,5315 @@
+//===== rAthena Script =======================================
+//= Mora Quest NPCs
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Quest NPCs related to Mora:
+//== Theore's Request, Chesire's New Day,
+//== Helping Lope and Euridi, Mora Daily Quests,
+//== Find the Research Tools, Knights of the Neighborhood
+//===== Additional Comments: =================================
+//= 0.1 NPCs are currently placeholders. [Euphy]
+//= 1.0 Implemented all official quests. [Euphy]
+//============================================================
+
+// Theore's Request :: bs
+//============================================================
+mid_camp,148,222,4 script Theore#ep14_1_bs 982,3,3,{
+ if (BaseLevel < 100) {
+ mes "- A person with a white gown -";
+ mes "- is pulling at his hair. -";
+ close;
+ }
+ if (ep14_1_bs == 0) {
+ mes "[Theore]";
+ mes "Aaaarrrggghh!!!";
+ mes "Darn it!!!!";
+ mes "I'm finished!!!";
+ next;
+ mes "[Theore]";
+ mes "How am I supposed to submit a report that's so bad!!! A 5-year-old could do better!!!";
+ mes "Noooo!!!";
+ set ep14_1_bs,1;
+ close;
+ } else if (ep14_1_bs == 1) {
+ mes "- A person with a white gown -";
+ mes "- is pulling at his hair. -";
+ next;
+ if(select("Try talking to him.:How noisy.") == 2) {
+ mes "[Theore]";
+ mes "Oh, of course, I'm sorry.";
+ mes "I'll keep it down.";
+ close;
+ }
+ mes "["+strcharinfo(0)+"]";
+ mes "Sir... Are you okay?";
+ mes "You will lose all your hair like that.";
+ mes "Calm down.";
+ next;
+ mes "[Theore]";
+ mes "Sob.......";
+ next;
+ mes "[Theore]";
+ mes ".......";
+ next;
+ mes "[Theore]";
+ mes "Odin!!!";
+ mes "Freyja!!!!";
+ mes "Sazarim!!!";
+ mes "Thank you!!";
+ mes "It's not all over!!";
+ next;
+ mes "[Theore]";
+ mes "There's always hope! I, Theore, will persevere and go on!!";
+ next;
+ mes "[Theore]";
+ mes "Dear Adventurer!!!";
+ mes "No, no, dear Warrior!!!!";
+ mes "Are you busy at the moment?";
+ mes "If you spare me a little time, I will see to it that you're rewarded handsomely!";
+ next;
+ switch(select("I'm busy.:Listen to him more.")) {
+ case 1:
+ mes "[Theore]";
+ mes ".......";
+ mes "I see, I suppose it can't be helped.";
+ mes "I'll probably lose all my hair and be on the ad for hair growth solutions. But I won't hold it against you, Warrior.";
+ next;
+ mes "[Theore]";
+ mes "Dear God! My luck ends here. *sob*";
+ mes "Even though the world is turning its back on me, I won't blame anyone!!!";
+ close;
+ case 2:
+ mes "[Theore]";
+ mes "Ahhh!";
+ mes "I feel like I was saved.";
+ mes "So the thing is.......";
+ next;
+ mes "[Theore]";
+ mes "Oh! Oh dear!";
+ mes "How rude of me, I haven't even introduced myself.";
+ mes "My name is Theore, and I work for 'Bazett Teablack's Institute of Culture of the Other World.' ";
+ next;
+ mes "[Theore]";
+ mes "I'm currently working on researching Laphines in the Splendide Basecamp.";
+ mes "Might be because I've been working soooo hard, but these days the Laphines all run away as soon as they see me.";
+ next;
+ mes "[Theore]";
+ mes "The deadline is approaching, and I still haven't figured out the most critical part. ";
+ mes "My professor will be very disappointed .......";
+ next;
+ mes "[Theore]";
+ mes "So won't you give me a hand?!";
+ mes "Your help will be acknowledged fully - I will tell the professor myself!";
+ next;
+ switch(select("Help.:Don't help.")) {
+ case 1:
+ mes "[Theore]";
+ mes "Sob sob Warrior, you're the best!";
+ mes "I will not forget this!!!";
+ mes "I'm going to write about it in my diary!!";
+ mes "And in the report!!!";
+ mes "And in a letter I'm sending home!!";
+ next;
+ mes "[Theore]";
+ mes "I'll tell my buddies at the lab!!!";
+ mes "I'll tell Lugen!!!";
+ mes "I'll write it in the bulletin board!!!";
+ mes "Let's see!!! Where else?";
+ next;
+ mes "- The man seems to be in a manic state. -";
+ mes "- Wait until he calms down -";
+ mes "- and try speaking to him again. -";
+ set ep14_1_bs,2;
+ setquest 11182;
+ close;
+ case 2:
+ mes "[Theore]";
+ mes ".......";
+ mes "You bad person, making me all worked up.";
+ mes "*sob*";
+ close;
+ }
+ }
+ } else if (ep14_1_bs == 2) {
+ if (checkquest(11182,PLAYTIME) < 2) {
+ mes "[Theore]";
+ mes "......";
+ switch(rand(1,4)) {
+ case 1:
+ mes "I must tell my next-door neighbor Pico!!!";
+ mes "And Kachua!!!";
+ break;
+ case 2:
+ mes "Tell the merchant across the street!!!";
+ mes "And also tell the administrator!!!";
+ break;
+ case 3:
+ mes "Tell Mr. Holgren!!!";
+ mes "Write up a report for the King!!!";
+ break;
+ case 4:
+ mes "Tell the people around here!!!";
+ mes "Shout it out loud from the observatory so the whole world hears!!!";
+ break;
+ }
+ next;
+ mes "- He is still manic. -";
+ mes "- Wait until he calms down -";
+ mes "- and try speaking to him again. -";
+ close;
+ }
+ mes "[Theore]";
+ mes "My apologies.";
+ mes "I got a little excited.";
+ mes "I do apologize.";
+ next;
+ mes "[Theore]";
+ mes "I'm usually a calm and rational person, but it feels like I've been everywhere - heaven AND hell - today!";
+ next;
+ mes "[Theore]";
+ mes "To the point: what I would like to ask you is not a hard task.";
+ next;
+ mes "[Theore]";
+ mes "As you probably know, the Laphines are at war with the Saphas.";
+ mes "Until recently, they attacked the Saphas mercilessly.";
+ next;
+ mes "[Theore]";
+ mes "But lately, the frequency of attacks has decreased significantly.";
+ mes "I can't figure out why, they are single-minded creatures and it's not likely that they just took pity on the Saphas' situation.";
+ next;
+ mes "[Theore]";
+ mes "Also, there are rumors of unarmed Laphines flying through the fields.";
+ next;
+ mes "[Theore]";
+ mes "I have seen it once, but he ran away as soon as he spotted me and I didn't get a chance to ask him.";
+ mes "I'm sure that he went back to the village. But as desperately as I want to ask, I was banned from entering the Splendide Basecamp.";
+ next;
+ select("Banned?");
+ mes "[Theore]";
+ mes "Well...";
+ mes "I got so excited after the professor assigned me to this research project.......";
+ mes "that I combed through Splendide night and day, and they finally kicked me out.";
+ mes "Ha ha ha!";
+ next;
+ mes "[Theore]";
+ mes "The Laphines may look cute, but they are combat specialists.......";
+ mes "So here I am, without the courage to sneak in, but with the report half-finished.......";
+ next;
+ mes "[Theore]";
+ mes "Tell me, is there a life more unfortunate than mine?";
+ mes "*chuckle*";
+ next;
+ mes "[Theore]";
+ mes "So Warrior, would you please find the Laphines who are coming to the Splendide field, and find out what they're up to?";
+ next;
+ mes "[Theore]";
+ mes "They may run away if you try to speak to them, so pay close attention when you find one.";
+ next;
+ mes "[Theore]";
+ mes "The Laphines are such a rowdy crew, and it's very unsettling to see how quiet they've been - almost like a period of calm before a giant thunderstorm.";
+ set ep14_1_bs,3;
+ changequest 11182,11183;
+ close;
+ } else if (ep14_1_bs == 3) {
+ mes "[Theore]";
+ mes "So Warrior, would you please find the Laphines who are coming to the Splendide field, and ask them what they're up to?";
+ next;
+ mes "[Theore]";
+ mes "They may run away if you try to speak to them, so pay close attention when you find one.";
+ next;
+ mes "[Theore]";
+ mes "The Laphines are such a rowdy crew, and it's very unsettling to see how quiet they've been - almost like a period of calm before a giant thunderstorm.";
+ close;
+ } else if (ep14_1_bs < 10) {
+ if (ep14_1_bs2 == 0) {
+ mes "- He is in no state for conversations. You should take the pouch to Splendide and look for its owner. -";
+ close;
+ } else if (ep14_1_bs2 < 4) {
+ mes "[Theore]";
+ mes "Hmm...... They were rummaging through the bushes?";
+ mes "Hmm... Hmm...";
+ next;
+ mes "[Theore]";
+ mes "They may have left a clue, can you please look around the area?";
+ mes "If they were looking through the bushes, they may have been looking for something they've lost.";
+ mes "Or they may have left something behind.";
+ close;
+ } else if (ep14_1_bs2 < 7) {
+ if (countitem(6390) == 0) {
+ mes "[Theore]";
+ mes "They may have left a clue, can you please look around the area?";
+ mes "If they were looking through the bushes, they may have been looking for something they've lost.";
+ mes "Or they may have left something behind.";
+ close;
+ }
+ mes "[Theore]";
+ mes "A pouch that a Laphine dropped as it fled?";
+ mes "Hmm... Hmm... A soft leather pouch with a string made by soaking dried vines in oil.... too small for humans or Saphas to use...";
+ next;
+ mes "[Theore]";
+ mes "Could... Could it be??!!";
+ mes "that object?!";
+ mes "that I've only heard about, but never came across!!!";
+ next;
+ mes "[Theore]";
+ mes "In the ancient times, Laphines used to carry fairy dust - such as the flying dust, minimizing dust - in a small pouch like this.";
+ next;
+ mes "[Theore]";
+ mes "They usually enjoy extravagant designs, but this 'fairy dust pouch' is something that they always carry around, and it is made simply without extravagant ornaments, keeping in line with tradition.";
+ next;
+ mes "[Theore]";
+ mes "I'm not sure what it'll be like nowadays, but if this is the 'fairy dust pouch,' the owner should be anxious to find it.";
+ next;
+ mes "[Theore]";
+ mes "We can't give it back for free though. In exchange for some information - that's a fair deal!";
+ next;
+ mes "[Theore]";
+ mes "And perhaps they won't be too upset if we look inside the pouch!";
+ mes "Wooow!!";
+ mes "I always believed when I was little that a fairy would come and sprinkle me with flying dust to make me fly!!!";
+ next;
+ mes "- Before I can stop him, -";
+ mes "- he opened the small pouch. -";
+ next;
+ mes "[Theore]";
+ mes ".......";
+ next;
+ mes "[Theore]";
+ mes "Oh...";
+ mes "Berries......and leaves?";
+ mes ".......";
+ next;
+ mes "[Theore]";
+ mes "......What about the flying dust?";
+ mes "Noooo!";
+ mes "My poor innocent imagination!!!!";
+ next;
+ mes "- He is in no state for conversations. You should take the pouch to Splendide and look for its owner. -";
+ set ep14_1_bs2, ep14_1_bs2+3; //4,5,6 -> 7,8,9
+ changequest 11185,11186;
+ close;
+ } else {
+ mes "- He is in no state for conversations. You should take the pouch to Splendide and look for its owner. -";
+ close;
+ }
+ } else if (ep14_1_bs < 18) {
+ mes "- He appears to be busy. You should finish the task at hand and come back. -";
+ close;
+ } else if (ep14_1_bs == 18) {
+ mes "[Theore]";
+ mes "At last, you're back!!!!";
+ mes "How did the investigation go?!";
+ next;
+ mes "[Theore]";
+ mes "Wow!!!";
+ mes "Incredible!!!!!!";
+ mes "Unbelievable!!!";
+ next;
+ mes "[Theore]";
+ mes "The best!!!!";
+ mes "This is surely enough to write an excellent report on!!";
+ mes "All thanks to you, Warrior!!";
+ next;
+ mes "[Theore]";
+ mes "I'll never, EVER forget what you've done for me!";
+ mes "No!!";
+ mes "My grandchildren's grandchildren will remember!!!!";
+ mes "*Sob*";
+ next;
+ mes "[Theore]";
+ mes "Then I'm off to put the finishing touches on the report!!!!!!!";
+ mes "Oh yeah!!!!";
+ set ep14_1_bs,19;
+ getexp 0,200000;
+ getitem 6380,5; //Mora_Coin
+ close;
+ } else if (ep14_1_bs > 18) {
+ mes "[Theore]";
+ mes "I'll write the report with lightning speed!!!!!!!";
+ mes "Oh yeah!!!!";
+ close;
+ }
+ end;
+OnTouch:
+ if (BaseLevel > 99) {
+ if (ep14_1_bs == 0) {
+ mes "[Theore]";
+ mes "Aaaarrrggghh!!!";
+ mes "Darn it!!!!";
+ mes "I'm finished!!!";
+ next;
+ mes "[Theore]";
+ mes "How am I supposed to submit a report that's so bad!!! A 5-year-old could do better!!!";
+ mes "Noooo!!!";
+ set ep14_1_bs,1;
+ close;
+ }
+ }
+ end;
+}
+
+- script #mora_bush -1,{
+ if (ep14_1_bs != 3 || rand(5)) {
+ mes "- It's just an ordinary bush. -";
+ close;
+ }
+ set .@i, atoi(charat(strnpcinfo(2),9));
+ set .@rand, rand(1,3);
+ mes "[Unarmed Laphine]";
+ mes "Aaaarrrrrggggghhhhh!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
+ donpcevent "Fairy#cmd"+.@i+.@rand+"::OnEnable";
+ set ep14_1_bs, .@i+3;
+ set ep14_1_bs2, .@rand;
+ changequest 11183,11184;
+ next;
+ mes "- You try to talk to the Laphine, -";
+ mes "- who is looking around the bushes, -";
+ mes "- but it flew away -";
+ mes "- while yelling fearfully. -";
+ next;
+ mes "- What was the fairy doing? -";
+ mes "- You decide to look around. -";
+ donpcevent "Bush"+.@i+"Timer::OnEnable";
+ close;
+OnEnable:
+ enablenpc strnpcinfo(0);
+ donpcevent "Bush"+charat(strnpcinfo(2),9)+"Timer::OnDisable";
+ end;
+OnDisable:
+ disablenpc strnpcinfo(0);
+ end;
+}
+
+- script #mora_pouch -1,{
+ end;
+OnTouch:
+ set .@i, atoi(charat(strnpcinfo(2),9));
+ if (ep14_1_bs == .@i+3) {
+ if (countitem(6390) == 0) {
+ if (checkweight(1201,1) == 0) {
+ mes " - Hang on there !! -";
+ mes " - You are carrying too many kinds of items - ";
+ mes " - to receive any more items. - ";
+ mes " - Please lighten your load - ";
+ mes " - and try again. - ";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes " - Hang on there !! -";
+ mes " - You are carrying too much weight - ";
+ mes " - Please lighten your load - ";
+ mes " - and try again. - ";
+ close;
+ }
+ mes "- Jumble Fumble -";
+ mes "- Rustle Bustle -";
+ next;
+ if (rand(1,5) == 4) {
+ mes "- You've found a Small pouch. -";
+ if (ep14_1_bs2 > 0 && ep14_1_bs2 < 4)
+ set ep14_1_bs2, ep14_1_bs2+3;
+ changequest 11184,11185;
+ getitem 6390,1; //Small_Pocket
+ close;
+ } else {
+ mes "- You didn't find anything. -";
+ close;
+ }
+ }
+ }
+ end;
+}
+
+- script #mora_fairy -1,{
+ end;
+OnInit:
+ disablenpc strnpcinfo(0);
+ end;
+OnEnable:
+ enablenpc strnpcinfo(0);
+ initnpctimer;
+ end;
+OnDisable:
+ disablenpc strnpcinfo(0);
+ stopnpctimer;
+ end;
+OnTimer5000:
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ stopnpctimer;
+ end;
+}
+
+spl_fild02,79,104,0 duplicate(#mora_bush) Bush#ep14_1_bs1 111
+spl_fild02,79,104,0 duplicate(#mora_pouch) #ep14_1_bs1 139,2,2
+spl_fild02,79,104,6 duplicate(#mora_fairy) Fairy#cmd11 440
+spl_fild02,79,104,6 duplicate(#mora_fairy) Fairy#cmd12 445
+spl_fild02,79,104,6 duplicate(#mora_fairy) Fairy#cmd13 439
+
+spl_fild02,103,344,0 duplicate(#mora_bush) Bush#ep14_1_bs2 111
+spl_fild02,103,344,0 duplicate(#mora_pouch) #ep14_1_bs2 139,2,2
+spl_fild02,103,344,6 duplicate(#mora_fairy) Fairy#cmd21 440
+spl_fild02,103,344,6 duplicate(#mora_fairy) Fairy#cmd22 445
+spl_fild02,103,344,6 duplicate(#mora_fairy) Fairy#cmd23 439
+
+spl_fild02,261,323,0 duplicate(#mora_bush) Bush#ep14_1_bs3 111
+spl_fild02,261,323,0 duplicate(#mora_pouch) #ep14_1_bs3 139,2,2
+spl_fild02,261,323,6 duplicate(#mora_fairy) Fairy#cmd31 440
+spl_fild02,261,323,6 duplicate(#mora_fairy) Fairy#cmd32 445
+spl_fild02,261,323,6 duplicate(#mora_fairy) Fairy#cmd33 439
+
+spl_fild02,137,305,0 duplicate(#mora_bush) Bush#ep14_1_bs4 111
+spl_fild02,137,305,0 duplicate(#mora_pouch) #ep14_1_bs4 139,2,2
+spl_fild02,137,305,6 duplicate(#mora_fairy) Fairy#cmd41 440
+spl_fild02,137,305,6 duplicate(#mora_fairy) Fairy#cmd42 445
+spl_fild02,137,305,6 duplicate(#mora_fairy) Fairy#cmd43 439
+
+spl_fild02,23,196,0 duplicate(#mora_bush) Bush#ep14_1_bs5 111
+spl_fild02,23,196,0 duplicate(#mora_pouch) #ep14_1_bs5 139,2,2
+spl_fild02,23,196,6 duplicate(#mora_fairy) Fairy#cmd51 440
+spl_fild02,23,196,6 duplicate(#mora_fairy) Fairy#cmd52 445
+spl_fild02,23,196,6 duplicate(#mora_fairy) Fairy#cmd53 439
+
+spl_fild02,186,260,0 duplicate(#mora_bush) Bush#ep14_1_bs6 111
+spl_fild02,186,260,0 duplicate(#mora_pouch) #ep14_1_bs6 139,2,2
+spl_fild02,186,260,6 duplicate(#mora_fairy) Fairy#cmd61 440
+spl_fild02,186,260,6 duplicate(#mora_fairy) Fairy#cmd62 445
+spl_fild02,186,260,6 duplicate(#mora_fairy) Fairy#cmd63 439
+
+- script #mora_bush_timer -1,{
+ end;
+OnInit:
+ disablenpc strnpcinfo(0);
+ end;
+OnEnable:
+ enablenpc strnpcinfo(0);
+ initnpctimer;
+ end;
+OnDisable:
+ stopnpctimer;
+ disablenpc strnpcinfo(0);
+ end;
+OnTimer1000:
+ donpcevent "Bush#ep14_1_bs"+charat(strnpcinfo(0),4)+"::OnDisable";
+ end;
+OnTimer600000:
+ donpcevent "Bush#ep14_1_bs"+charat(strnpcinfo(0),4)+"::OnEnable";
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ end;
+}
+spl_fild02,180,1,0 duplicate(#mora_bush_timer) Bush1Timer 440
+spl_fild02,181,1,0 duplicate(#mora_bush_timer) Bush2Timer 440
+spl_fild02,182,1,0 duplicate(#mora_bush_timer) Bush3Timer 440
+spl_fild02,183,1,0 duplicate(#mora_bush_timer) Bush4Timer 440
+spl_fild02,184,1,0 duplicate(#mora_bush_timer) Bush5Timer 440
+spl_fild02,186,1,0 duplicate(#mora_bush_timer) Bush6Timer 440
+
+/*
+spl_fild02,187,1,0 script Field Bush Switch 440,{
+ donpcevent "Bush#ep14_1_bs1::OnEnable";
+ end;
+}
+*/
+
+splendide,183,117,4 script Tired-looking Fairy 438,{
+ if (!isequipped(2782)) {
+ mes "[Tired-looking Fairy]";
+ mes "VeOsaRiveh No ModAsh";
+ next;
+ mes "- You can't understand the fairy's words. -";
+ mes "- You need something to help you interpret them. -";
+ close;
+ }
+ if (ep14_1_bs < 4) {
+ mes "[Tired-looking Fairy]";
+ mes "I'm tired, don't talk to me.";
+ close;
+ } else if (ep14_1_bs < 10) {
+ if (checkquest(11187) == -1) {
+ mes "[Tired-looking Fairy]";
+ mes "I'm tired, don't talk to me.";
+ next;
+ select("Show the pouch.");
+ mes "[Tired-looking Fairy]";
+ mes "Huh?!";
+ mes "Where did you get this from?!";
+ next;
+ select("I found it in the bushes.");
+ mes "[Tired-looking Fairy]";
+ mes "It may not look like much, but it is an important object for us. I suppose I should say thanks.";
+ next;
+ mes "[Tired-looking Fairy]";
+ mes "But it won't be easy to find its owner with just the pouch...";
+ changequest 11186,11187;
+ next;
+ if(select("I think I saw a fairy that might be the owner.:I'll think about it.") == 2) {
+ mes "[Tired-looking Fairy]";
+ mes "Then tell me if you remember anything.";
+ close;
+ }
+ } else if (checkquest(11187) == 2) {
+ mes "[Tired-looking Fairy]";
+ mes "I hope you can find the owner.";
+ close;
+ }
+ mes "[Tired-looking Fairy]";
+ mes "Do you remember how the fairy looked?";
+ next;
+
+ setarray .@Hair$[0],"blonde","grassy-green","woody-brown","sea-blue";
+ setarray .@Skin$[0],"dark","light";
+ setarray .@Clothing$[0],"snow-white","grape","sky-blue","grassy-green";
+ setarray .@Wings$[0],"round","two pairs of","characteristic";
+
+ setarray .@i[1],
+ select("Blonde hair:Grassy-green hair:Woody-brown hair:Sea-blue hair"),
+ select("Dark-skinned:Light-skinned"),
+ select("Snow-white clothing:Grape clothing:Sky-blue clothing:Grassy-green clothing"),
+ select("Round wings:Two pairs of wings:Characteristic Wings");
+
+ set .@i[0], (1 << .@i[1]) | (1 << (.@i[2]+4)) | (1 << (.@i[3]+6)) | (1 << (.@i[4]+10));
+
+ mes "[Tired-looking Fairy]";
+ mes "A "+.@Skin$[.@i[2]-1]+"-skinned fairy with "+.@Hair$[.@i[1]-1]+" hair and "+.@Wings$[.@i[4]-1]+" wings, dressed in "+.@Clothing$[.@i[3]-1]+" clothing.......";
+ switch(.@i[0]) {
+ case 4418: // Kusmi: blonde hair, light skin, grape clothing, two pairs of wings
+ mes "Hmm...... That must be Kusmi.";
+ next;
+ mes "[Tired-looking Fairy]";
+ mes "Kusmi must be roaming the area southeast of the village.";
+ mes "Go see if she has lost her pouch.";
+ if (ep14_1_bs2 == 7)
+ set ep14_1_bs2,10;
+ close;
+ case 2212: // Theodore: grassy-green hair, dark skin, snow-white clothing, round wings
+ mes "Hmm......That must be Theodore.";
+ next;
+ mes "[Tired-looking Fairy]";
+ mes "Theodore must be roaming the area northeast of the village.";
+ mes "Go see if he has lost his pouch.";
+ if (ep14_1_bs2 == 8)
+ set ep14_1_bs2,11;
+ close;
+ case 9264: // Pauchon: sea-blue hair, dark skin, grassy-green clothing, characteristic wings
+ mes "Hmm......That must be Pauchon.";
+ next;
+ mes "[Tired-looking Fairy]";
+ mes "Pauchon must be roaming the area north of the village.";
+ mes "Go see if she has lost her pouch.";
+ if (ep14_1_bs2 == 9)
+ set ep14_1_bs2,12;
+ close;
+ default:
+ next;
+ mes "[Tired-looking Fairy]";
+ mes "Hmm...";
+ mes "I don't remember seeing such a fairy.";
+ mes "Are you sure you're not mistaken?";
+ mes "Try to remember it again.";
+ close;
+ }
+ }
+ mes "[Tired-looking Fairy]";
+ mes "What's up?";
+ mes "Did you find the owner of the pouch?";
+ close;
+}
+
+splendide,119,138,4 script Kusmi#ep14_1_bs 440,{
+ if (!isequipped(2782)) {
+ mes "[Kusmi]";
+ mes "DimFusTal Mu Lars";
+ mes "ModAnduLo";
+ mes "Mod";
+ mes "DorDuMe U NohLarsFulo Mu Fus";
+ next;
+ mes "- You can't understand the fairy's words. -";
+ mes "- You need something to help you interpret them. -";
+ close;
+ }
+ if (ep14_1_bs > 3 && ep14_1_bs < 10) {
+ mes "[Kusmi]";
+ mes "And who mayy you be?";
+ next;
+ select("Show the pouch.");
+ if (countitem(6390) == 0) {
+ mes "[Kusmi]";
+ mes "What is it that you want to show mee?";
+ close;
+ }
+ if (ep14_1_bs2 == 10) {
+ mes "[Kusmi]";
+ mes "Ahh!!";
+ mes "My pouch!!!!!";
+ mes "Thank you sirr!!!!!";
+ mes "I've been looking for it all overr!";
+ next;
+ select("Ask about the rumor.");
+ mes "[Kusmi]";
+ mes "That's a difficult questionn!";
+ mes "But you've returned my pouch, so I'll have to answerr......";
+ next;
+ mes "[Kusmi]";
+ mes "Promise me you won't tell anyonee!";
+ mes "If you can promise, please talk to me againn.";
+ delitem 6390,1; //Small_Pocket
+ set ep14_1_bs,10;
+ changequest 11187,11188;
+ close;
+ } else {
+ mes "[Kusmi]";
+ mes "Hmm I don't know who, but must be a slobb to be dropping his pouch like soo.";
+ mes "Huh? Mine??";
+ mes "No, mine is right here safelyy?";
+ next;
+ mes "[Kusmi]";
+ mes "It's a precious object so I hope you'll find the owner itt.";
+ close;
+ }
+ }
+ if (ep14_1_bs2 == 10) {
+ if (ep14_1_bs == 10) {
+ mes "[Kusmi]";
+ mes "You can't say this to anybody okayy~?";
+ mes "Recently,";
+ mes "the supplies from our the mainland have been cutt!";
+ mes "Or rather, the supply route is being blocked and we can't get our suppliess?";
+ next;
+ mes "[Kusmi]";
+ mes "We need to find enough food before we run out of stored goods, that's why we've been rummaging the bushess.";
+ next;
+ mes "[Kusmi]";
+ mes "But this cursed frozen land has no good foods.";
+ mes "We're barely keeping it green using magic, but it takes too much power to make fruit.";
+ next;
+ mes "[Kusmi]";
+ mes "The energy spent in making food is probably twice as much as the energy gained from eatingg.";
+ mes "Those higher up don't want to admit it, but it's going to become a serious problem soonn.";
+ next;
+ mes "[Kusmi]";
+ mes "We can't leave the battleground because we're in war, so we can't go checkk.";
+ mes "I am curiousss.......";
+ next;
+ mes "[Kusmi]";
+ mes "Not just me, but many Laphines are worriedd.";
+ mes "Well that's the situation, so if you meet a Laphine in the bushes please don't talk to himm.";
+ mes "It's embarrassingg!!!";
+ next;
+ mes "[Kusmi]";
+ mes "Oh, and you must never ever tell anyone about what happened todayy!";
+ mes "Unless that person wanted to help uss... spreading the word won't do Splendide any goood.";
+ set ep14_1_bs,11;
+ completequest 11188;
+ setquest 11189;
+ close;
+ } else if (ep14_1_bs == 11) {
+ mes "[Kusmi]";
+ mes "Eh?";
+ mes "You stilll want to talk?";
+ next;
+ select("Supply route from the mainland?");
+ mes "[Kusmi]";
+ mes "Well if you hear that you'll have to helpp!";
+ mes "Still want to knoww?!";
+ next;
+ switch(select("Yes.:No.")) {
+ case 1:
+ mes "[Kusmi]";
+ mes "It's not a special road or anythingg.";
+ mes "Just an old roadd.";
+ mes "Some say it connects different continents. It also connects the Splendide Basecamp and Alfheim through the backk.";
+ next;
+ mes "[Kusmi]";
+ mes "If you're headed that way, please go see that all's okayy.";
+ set ep14_1_bs,12;
+ changequest 11189,11190;
+ close;
+ case 2:
+ mes "[Kusmi]";
+ mes "Thank you for finding my pouchh.";
+ mes "I would give you some fairy dust, but there is none leftt.";
+ close;
+ }
+ } else if (ep14_1_bs == 12) {
+ mes "[Kusmi]";
+ mes "It's not a special road or anythingg.";
+ mes "Just an old roadd.";
+ mes "Some say it connects different continents. It also connects the Splendide Basecamp and Alfheim through the backk.";
+ next;
+ mes "[Kusmi]";
+ mes "If you're headed that way, please go see that all's okayy.";
+ close;
+ } else if (ep14_1_bs == 13) {
+ mes "[Kusmi]";
+ mes "A crevicee?";
+ mes "That's why we couldn't contact the mainland.";
+ mes "Urggg.......";
+ mes "It would be good to know what's going on up theree.";
+ next;
+ mes "[Kusmi]";
+ mes "If you happen to go through Bifrost, please figure out what's going onn.";
+ mes "In the middle of Bifrost is a small village called 'Mora.' All the supplies from the mainland come through that villagee.";
+ next;
+ mes "[Kusmi]";
+ mes "If you go to the warehouse in Mora Village, the manager will tell you moree.";
+ mes "Also, on the way back, will you check to see that my friend Rondo is in Mora Villagee?";
+ next;
+ mes "[Kusmi]";
+ mes "He always used to visit Splendide around this time, but the situation is no good now. I'll have to tell him to come another time.";
+ set ep14_1_bs,14;
+ changequest 11191,11192;
+ close;
+ } else if (ep14_1_bs == 14) {
+ mes "[Kusmi]";
+ mes "If you happen to go through Bifrost, please figure out what's going onn.";
+ mes "In the middle of Bifrost is a small village called 'Mora.' All the supplies from the mainland come through that villagee.";
+ next;
+ mes "[Kusmi]";
+ mes "If you go to the warehouse in Mora Village, the manager will tell you moree.";
+ if (checkquest(11193) > -1 && checkquest(11193) < 2)
+ close;
+ mes "Also, on the way back, will you check to see that my friend Rondo is in Mora Villagee?";
+ next;
+ mes "[Kusmi]";
+ mes "He always used to visit Splendide around this time, but the situation is no good now. I'll have to tell him to come another time.";
+ close;
+ } else if (ep14_1_bs > 14) {
+ if (checkquest(11193) == -1) {
+ mes "[Kusmi]";
+ mes "Will you check to see that my friend Rondo is in Mora Villagee?";
+ next;
+ mes "[Kusmi]";
+ mes "He always used to visit Splendide around this time, but the situation is no good now. I'll have to tell him to come another time.";
+ close;
+ }
+ mes "[Kusmi]";
+ mes "Heee!";
+ mes "You really went through the fog of the Maze of the Hazy Forest?";
+ mes "Wow!!!";
+ mes "That's very impressivee.";
+ next;
+ mes "[Kusmi]";
+ mes "Thank you soooo much.";
+ mes "I hope we'll be able to go through Bifrost againn.";
+ mes "I want to meet Rondo and talk to him againn.";
+ if (ep14_1_bs == 17) {
+ next;
+ mes "[Kusmi]";
+ mes "Oh, And Daphrer is in northwest Splendide.";
+ }
+ if (checkquest(11193) < 2) {
+ completequest 11192;
+ completequest 11193;
+ }
+ close;
+ }
+ }
+ mes "[Kusmi]";
+ mes "This place is always coldd.";
+ mes "So different from my heavenly hometownn.";
+ close;
+}
+
+splendide,304,295,4 script Theodore#ep14_1_bs 445,{
+ if (!isequipped(2782)) {
+ mes "[Theodore]";
+ mes "DimFusTal Mu Lars";
+ mes "ModAnduLo";
+ mes "Mod";
+ mes "DorDuMe U NohLarsFulo Mu Fus";
+ next;
+ mes "- You can't understand the fairy's words. -";
+ mes "- You need something to help you interpret them. -";
+ close;
+ }
+ if (ep14_1_bs > 3 && ep14_1_bs < 10) {
+ mes "[Theodore]";
+ mes "Who are you!";
+ next;
+ select("Show the pouch.");
+ if (countitem(6390) == 0) {
+ mes "[Theodore]";
+ mes "Hmm? What do you mean?";
+ close;
+ }
+ if (ep14_1_bs2 == 11) {
+ mes "[Theodore]";
+ mes "Ahh!!";
+ mes "My pouch!!!!!";
+ mes "I've been looking for it all over the place.";
+ mes "Thanks!";
+ next;
+ select("Ask about the rumor.");
+ mes "[Theodore]";
+ mes "Hrm!!";
+ mes "What a penetrating question!";
+ next;
+ mes "[Theodore]";
+ mes "If you really want to hear the answer, talk to me again.";
+ mes "I need time to think.";
+ delitem 6390,1; //Small_Pocket
+ set ep14_1_bs,10;
+ changequest 11187,11194;
+ close;
+ } else {
+ mes "[Theodore]";
+ mes "What is that dirty pouch!";
+ mes "It is definitely not mine.";
+ next;
+ mes "[Theodore]";
+ mes "But I hope you find its rightful owner.";
+ close;
+ }
+ }
+ if (ep14_1_bs2 == 11) {
+ if (ep14_1_bs == 10) {
+ mes "[Theodore]";
+ mes "You are not to tell anyone what I'm about to tell you.";
+ next;
+ mes "[Theodore]";
+ mes "Recently, there's a big problem in Splendide.";
+ mes "There is no communication with the mainland.";
+ mes "Not just communication, but supplies have been cut off also. People act indifferent but actually there is deep panic.";
+ next;
+ mes "[Theodore]";
+ mes "This frozen land is no use for collecting food, but to farm it would be too much work.";
+ next;
+ mes "[Theodore]";
+ mes "In fact, just maintaining the green is costing an incredible amount of magic power.";
+ mes "No word has come from higher up, but from the rumors it's not an easily fixable problem.";
+ next;
+ mes "[Theodore]";
+ mes "And because there is no easy fix, everybody is worried sick.";
+ mes "By military law, our soldiers cannot leave the battlefield during war, so it's impossible to get more information.";
+ next;
+ mes "[Theodore]";
+ mes "Therefore, if you happen to run into a Laphine, please don't mention any of this.";
+ mes "Everybody is trying as hard as they can, but we are still a proud race.";
+ next;
+ mes "[Theodore]";
+ mes "And as I said before, what I told you is a secret and you must not tell anyone.";
+ mes "We do need help, but we are cornered and we don't want others to know.";
+ set ep14_1_bs,11;
+ completequest 11194;
+ setquest 11195;
+ close;
+ } else if (ep14_1_bs == 11) {
+ mes "[Theodore]";
+ mes "You have further business with me?";
+ next;
+ select("Supply route from the mainland?");
+ mes "[Theodore]";
+ mes "Hmm... if you hear that, you might just have to help us out?";
+ mes "Do you still want to know?";
+ next;
+ switch(select("Yes.:No.")) {
+ case 1:
+ mes "[Theodore]";
+ mes "The supply route comes through Bifrost, and you can get to it from the back of the Splendide Basecamp.";
+ mes "That is why we set up the basecamp here.";
+ mes "The origin of the route is unclear, but it has been known for a long time to be a bridge that connects continents.";
+ next;
+ mes "[Theodore]";
+ mes "If you happen to venture there, please ask a guard what things are like there.";
+ set ep14_1_bs,12;
+ changequest 11195,11196;
+ close;
+ case 2:
+ mes "[Theodore]";
+ mes "Thank you for getting the pouch back to me.";
+ mes "Fairy dust? I don't carry around such a thing.";
+ close;
+ }
+ } else if (ep14_1_bs == 12) {
+ mes "[Theodore]";
+ mes "The supply route comes through Bifrost, and you can get to it from the back of the Splendide Basecamp.";
+ mes "That is why we set up the basecamp here.";
+ mes "The origin of the route is unclear, but it has been known for a long time to be a bridge that connects continents.";
+ next;
+ mes "[Theodore]";
+ mes "If you happen to venture there, please ask a guard what things are like there.";
+ close;
+ } else if (ep14_1_bs == 13) {
+ mes "[Theodore]";
+ mes "A crevice?";
+ mes "So that was why we couldn't reach the mainland.";
+ mes "It would be good to know what's going on up there.";
+ next;
+ mes "[Theodore]";
+ mes "Hmm...";
+ mes "I can't leave here, but you would be able to, no?";
+ mes "The supplies from the mainland come through 'Mora' Village, which is located in the middle of Bifrost.";
+ next;
+ mes "[Theodore]";
+ mes "If you speak to the Warehouse Manager of Mora Village, you'd be able to get more information.";
+ mes "If you're willing, will you go to Bifrost's 'Mora' Village and meet the Warehouse Manager?";
+ next;
+ mes "[Theodore]";
+ mes "And if it's not too much trouble, you could drop by my friend Lilitia's also...";
+ set ep14_1_bs,14;
+ changequest 11197,11198;
+ close;
+ } else if (ep14_1_bs == 14) {
+ mes "[Theodore]";
+ mes "If you speak to the Warehouse Manager of Mora Village, you'd be able to get more information.";
+ mes "If you're willing, will you go to Bifrost's 'Mora' Village and meet the Warehouse Manager?";
+ if (checkquest(11199) > -1 && checkquest(11199) < 2)
+ close;
+ next;
+ mes "[Theodore]";
+ mes "And if it's not too much trouble, you could drop by my friend Lilitia's also...";
+ close;
+ } else if (ep14_1_bs > 14) {
+ if (checkquest(11199) == -1) {
+ mes "[Theodore]";
+ mes "And if it's not too much trouble, you could drop by my friend Lilitia's also...";
+ close;
+ }
+ mes "[Theodore]";
+ mes "Wow!!!";
+ mes "So you went through the Maze of the Hazy Forest and returned from Mora Village.";
+ mes "I made the right decision by asking you!";
+ next;
+ mes "[Theodore]";
+ mes "Thank you.";
+ mes "I hope this gets resolved soon...";
+ mes "I don't want to further upset Lilitia...";
+ if (ep14_1_bs == 17) {
+ next;
+ mes "[Theodore]";
+ mes "Oh, And Daphrer is in northwest Splendide.";
+ }
+ if (checkquest(11199) < 2) {
+ completequest 11198;
+ completequest 11199;
+ }
+ close;
+ }
+ }
+ mes "[Theodore]";
+ mes "Sometimes, I sense a painful beauty in this frozen earth, quite different from the beauty of my hometown.";
+ mes "But this is a difficult environment for us to live in, certainly.";
+ close;
+}
+
+splendide,168,301,4 script Pauchon#ep14_1_bs 439,{
+ if (!isequipped(2782)) {
+ mes "[Pauchon]";
+ mes "DimFusTal Mu Lars";
+ mes "ModAnduLo";
+ mes "Mod";
+ mes "DorDuMe U NohLarsFulo Mu Fus";
+ next;
+ mes "- You can't understand the fairy's words. -";
+ mes "- You need something to help you interpret them. -";
+ close;
+ }
+ if (ep14_1_bs > 3 && ep14_1_bs < 10) {
+ mes "[Pauchon]";
+ mes "What can I do for you, sir?";
+ next;
+ select("Show the pouch.");
+ if (countitem(6390) == 0) {
+ mes "[Pauchon]";
+ mes "Huh? Do you see something?";
+ mes "I don't see anything...";
+ close;
+ }
+ if (ep14_1_bs2 == 12) {
+ mes "[Pauchon]";
+ mes "Good heavens...!";
+ mes "I think this is mine!";
+ mes "Thank you.";
+ mes "I've been worried since I lost it, you lifted a burden off of my mind.";
+ next;
+ select("Ask about the rumor.");
+ mes "[Pauchon]";
+ mes "That's not easy for me to answer...";
+ mes "I do appreciate you finding my pouch.... Hmm...";
+ mes "Please give me some time to think..";
+ delitem 6390,1; //Small_Pocket
+ set ep14_1_bs,10;
+ changequest 11187,11200;
+ close;
+ } else {
+ mes "[Pauchon]";
+ mes "Oh dear. It's not mine.";
+ mes "But to carelessly drop such an important object!";
+ mes "I don't know who it is, but that Laphine needs a lesson!";
+ close;
+ }
+ }
+ if (ep14_1_bs2 == 12) {
+ if (ep14_1_bs == 10) {
+ mes "[Pauchon]";
+ mes "What I'm about to tell you is top secret!";
+ mes "We don't even talk about it amongst ourselves!";
+ mes "How would we say that the supply from the mainland's been cut off like that!";
+ next;
+ mes "[Pauchon]";
+ mes "Ugh?!";
+ mes "Oh boy... I've done it....";
+ mes "It's really a top secret!!";
+ mes "Don't tell anybody!";
+ next;
+ mes "[Pauchon]";
+ mes "Well since I spilled the beans already... oh well, too late.";
+ mes "So it's been a while since we received supplies from the mainland.";
+ next;
+ mes "[Pauchon]";
+ mes "We're not starving, but we're receiving less and less food.";
+ mes "I was hungry so I went to go pick fruit, but in this cold climate there are no fruit trees.";
+ next;
+ mes "[Pauchon]";
+ mes "And the people higher up only tell us to wait... I'm so tired of waiting!";
+ mes "But the instant I leave this place, I'll end up going to prison....";
+ next;
+ mes "[Pauchon]";
+ mes "So I'm stuck here, and I'll be stuck here, suffering from hunger.... *sob*";
+ next;
+ mes "[Pauchon]";
+ mes "I'd eat the bark off of that tree if I could.";
+ mes "If only somebody could help. *sob*";
+ set ep14_1_bs,11;
+ completequest 11200;
+ setquest 11201;
+ close;
+ } else if (ep14_1_bs == 11) {
+ mes "[Pauchon]";
+ mes "What?";
+ mes "What do you want... I'm hungry, don't have energy to talk...";
+ next;
+ select("Supply route from the mainland?");
+ mes "[Pauchon]";
+ mes "Are you going to help me if I tell you?";
+ mes "If not, I won't tell.";
+ next;
+ switch(select("Yes.:No.")) {
+ case 1:
+ mes "[Pauchon]";
+ mes "A giant road leads away from the back of Splendide.";
+ mes "I don't know if it's related to legends and what not, but I've heard that the road's been there forever.";
+ next;
+ mes "[Pauchon]";
+ mes "Oh! The guard there might know something.";
+ mes "If you're headed that way, please go find out what's up.";
+ set ep14_1_bs,12;
+ changequest 11201,11202;
+ close;
+ case 2:
+ mes "[Pauchon]";
+ mes "Thank you for finding the pouch.";
+ mes "Ugh... I'm starving... I suppose I'll have to eat these bitter berries...";
+ close;
+ }
+ } else if (ep14_1_bs == 12) {
+ mes "[Pauchon]";
+ mes "A giant road leads away from the back of Splendide.";
+ mes "I don't know if it's related to legends and what not, but I've heard that the road's been there forever.";
+ next;
+ mes "[Pauchon]";
+ mes "Oh! The guard there might know something.";
+ mes "If you're headed that way, please go find out what's up.";
+ close;
+ } else if (ep14_1_bs == 13) {
+ mes "[Pauchon]";
+ mes "Crevice?!?";
+ mes "Hmm I have heard that crevices are creeping up here and there, but it even infiltrated Bifrost....";
+ mes "It appears to be more serious than I had imagined.";
+ next;
+ mes "[Pauchon]";
+ mes "If you can, would you go to 'Mora' Village in Bifrost and figure out what's going on?";
+ next;
+ mes "[Pauchon]";
+ mes "The supplies from the mainland come through the Village. If you go speak to the Warehouse Manager, he'll be able to tell you something.";
+ mes "Also, please pay a visit to my friend Humming.";
+ next;
+ mes "[Pauchon]";
+ mes "He's such a flighty guy, might have already left, but we were supposed to meet up in Mora Village.";
+ set ep14_1_bs,14;
+ changequest 11203,11204;
+ close;
+ } else if (ep14_1_bs == 14) {
+ mes "[Pauchon]";
+ mes "If you can, would you go to 'Mora' Village in Bifrost and figure out what's going on?";
+ next;
+ mes "[Pauchon]";
+ mes "The supplies from the mainland come through the Village. If you go speak to the Warehouse Manager, he'll be able to tell you something.";
+ if (checkquest(11205) > -1 && checkquest(11205) < 2)
+ close;
+ mes "Also, please pay a visit to my friend Humming.";
+ next;
+ mes "[Pauchon]";
+ mes "He's such a flighty guy, might have already left, but we were supposed to meet up in Mora Village.";
+ close;
+ } else if (ep14_1_bs > 14) {
+ if (checkquest(11205) == -1) {
+ mes "[Pauchon]";
+ mes "Please pay a visit to my friend Humming.";
+ mes "He's such a flighty guy, might have already left, but we were supposed to meet up in Mora Village.";
+ close;
+ }
+ mes "[Pauchon]";
+ mes "I had my doubts...But you really did cross the legendary Maze of the Hazy Forest...";
+ mes "I'm very impressed.";
+ next;
+ mes "[Pauchon]";
+ mes "I really appreciate your help.";
+ mes "I hope this gets resolved soon.";
+ mes "What I'm really afraid of... is hunger. More than war.";
+ if (ep14_1_bs == 17) {
+ next;
+ mes "[Pauchon]";
+ mes "Oh, And Daphrer is in northwest Splendide.";
+ }
+ if (checkquest(11205) < 2) {
+ completequest 11204;
+ completequest 11205;
+ }
+ close;
+ }
+ }
+ mes "[Pauchon]";
+ mes "Ah... I'm hungry.";
+ mes "When I get back to the mainland I'm going to stuff my belly until it bursts.";
+ close;
+}
+
+splendide,262,376,4 script Laphine Soldier#ep14_1 447,{
+ if (!isequipped(2782)) {
+ mes "[Laphine Soldier]";
+ mes "DielFarmar Di RiniIyazser Ha mahAgolAsh U U ";
+ mes "TurNohnar Di DurNeiFar Ra AnuVerNoth Ha AshRivehDor Ha BurWehLars Ur RinimanMod";
+ next;
+ mes "- You can't understand the fairy's words. -";
+ mes "- You need something to help you interpret them. -";
+ close;
+ }
+ mes "[Laphine Soldier]";
+ mes "This is Bifrost, which leads to Alfheim.";
+ mes "Please note that entry is forbidden due to a crevice caused by an unidentified source.";
+ if (ep14_1_bs != 12)
+ close;
+ next;
+ mes "[Laphine Soldier]";
+ mes "The other way leads to the Maze of the Hazy Forest.";
+ next;
+ mes "[Laphine Soldier]";
+ mes "You can get to Alfheim by making it through the Maze of the Hazy Forest. However, nobody has ever come back from the Maze of the Hazy Forest.";
+ if (checkquest(11190) > -1 && checkquest(11190) < 2) {
+ set ep14_1_bs,13;
+ changequest 11190,11191;
+ } else if (checkquest(11196) > -1 && checkquest(11196) < 2) {
+ set ep14_1_bs,13;
+ changequest 11196,11197;
+ } else if (checkquest(11202) > -1 && checkquest(11202) < 2) {
+ set ep14_1_bs,13;
+ changequest 11202,11203;
+ }
+ close;
+}
+
+mora,185,163,2 script Warehouse Manager#ep14_1 516,{
+ if (ep14_1_bs < 15) {
+ mes "[Warehouse Manager]";
+ mes "No, sir!";
+ mes "You cannot enter at will.";
+ mes "This is a warehouse. If you need something, please ask the staff outside.";
+ if (ep14_1_bs < 14)
+ close;
+ next;
+ select("Supplies for Laphine?");
+ mes "[Warehouse Manager]";
+ mes "Ah!";
+ mes "You're from Splendide?";
+ mes "Let's see...";
+ mes "All the supplies from over there to there are destined for Splendide.";
+ next;
+ mes "[Warehouse Manager]";
+ mes "We are quite worried too because the crevice in Bifrost has made it impossible to deliver these goods.";
+ next;
+ mes "[Warehouse Manager]";
+ mes "And the travelers who were heading down are also stuck here. The increasing number of customers is both a blessing and a curse..";
+ next;
+ mes "[Warehouse Manager]";
+ mes "If you plan to go back to Splendide, pay a visit to Jones at the Inn.";
+ mes "He has something that needs to be urgently delivered to the army of Splendide.";
+ set ep14_1_bs,15;
+ setquest 11206;
+ close;
+ } else if (ep14_1_bs == 15) {
+ mes "[Warehouse Manager]";
+ mes "If you plan to go back to Splendide, pay a visit to Jones at the Inn.";
+ mes "He has something that needs to be urgently delivered to the army of Splendide.";
+ close;
+ } else {
+ mes "[Warehouse Manager]";
+ mes "We are quite worried too because the crevice in Bifrost has made it impossible to deliver these goods.";
+ next;
+ mes "[Warehouse Manager]";
+ mes "And the travelers who were heading down are also stuck here. The increasing number of customers is both a blessing and a curse...";
+ close;
+ }
+ end;
+}
+
+mora,35,119,4 script Rondo#ep14_1_bs 513,{
+ mes "[Rondo]";
+ mes "Mora is such a mysterious place.";
+ mes "You can understand any language.";
+ next;
+ mes "[Rondo]";
+ mes "Of course, when we leave this area I won't be able to understand what you say, but I'll be able to remember the conversations we had. And I'll look forward to the day we meet again, here.";
+ if (ep14_1_bs > 13 && ep14_1_bs2 == 10) {
+ next;
+ mes "[Rondo]";
+ mes "Please tell Kusmi";
+ mes "that if he wants to meet, we can meet any time. There is nothing to worry about.";
+ if (checkquest(11193) == -1)
+ setquest 11193;
+ }
+ close;
+}
+
+mora,98,66,4 script Lilitia#ep14_1_bs 518,{
+ if (ep14_1_bs > 13 && ep14_1_bs2 == 11) {
+ mes "[Lilitia]";
+ mes "Boo!!!";
+ mes "He broke his promise again!!!";
+ next;
+ mes "[Lilitia]";
+ mes "He said he'd be here this time for sure!!!";
+ mes "That place is too cold for me to visit!!!!!";
+ mes "My precious leaves will wither there.";
+ next;
+ mes "[Lilitia]";
+ mes "What? Theodore sent you?";
+ mes "Please tell him that I'm so mad!!";
+ if (checkquest(11199) == -1)
+ setquest 11199;
+ close;
+ }
+ mes "[Lilitia]";
+ mes "I really hate the cold.";
+ mes "That's why Mora is a lovely place to live.";
+ next;
+ mes "[Lilitia]";
+ mes "The leaves are always fresh here. And, the stress about languages just disappears.";
+ close;
+}
+
+mora,139,102,2 script Humming#ep14_1_bs 515,{
+ if (ep14_1_bs > 13 && ep14_1_bs2 == 12) {
+ mes "[Humming]";
+ mes "Oh!";
+ mes "You're here because Pauchon sent you?";
+ next;
+ mes "[Humming]";
+ mes "It must've been hard for you to get here. I'm impressed.";
+ mes "The Maze of the Hazy Forest~ It fuels my adventurous spirit!";
+ next;
+ mes "[Humming]";
+ mes "If you reach Splendide before me, please tell Pauchon";
+ mes "that I'm going through the Maze of the Hazy Forest.";
+ if (checkquest(11205) == -1)
+ setquest 11205;
+ close;
+ }
+ mes "[Humming]";
+ mes "I heard that a crevice crept in between Jotunheim and Midgard, so I wanted to check it out. But I got stuck here.";
+ mes "I was looking forward to seeing a new place.";
+ next;
+ mes "[Humming]";
+ mes "Are you from Midgard?";
+ mes "What is it like there?";
+ mes "I've always wanted to see a creature called Poring.";
+ close;
+}
+
+mora,55,124,2 script Jones#ep14_1_bs 495,{
+ if (ep14_1_bs < 15) {
+ mes "[Jones]";
+ mes "Oh.... Darn.......";
+ mes "I can't go down, and I can't go back. My credibility that I've worked so hard on is just crumbling into dust.";
+ close;
+ } else if (ep14_1_bs == 15) {
+ mes "[Jones]";
+ mes "Ah, are you the traveler who came through the Maze of the Hazy Forest from Splendide?";
+ mes "If you plan to go back, can you please deliver this to the Splendide army?";
+ next;
+ mes "[Jones]";
+ mes "A person high up requested it, but I can't cross Bifrost.";
+ next;
+ mes "[Jones]";
+ mes "Deliveries to other places have all stopped also. Ah, my credibility is suffering....";
+ next;
+ switch(select("Yes.:No.")) {
+ case 1:
+ mes "[Jones]";
+ mes "Thank you.";
+ set ep14_1_bs,16;
+ changequest 11206,11207;
+ close;
+ case 2:
+ mes "[Jones]";
+ mes "I'm a bit embarrassed to ask this of a stranger...... Ha ha!";
+ close;
+ }
+ } else if (ep14_1_bs == 16) {
+ if (checkweight(1201,1) == 0) {
+ mes "[Jones]";
+ mes "You have too many kinds of items. Please lighten your load and come back.";
+ close;
+ }
+ if (MaxWeight - Weight < 3500) {
+ mes "[Jones]";
+ mes "You are carrying too much weight. Please lighten your load and come back.";
+ close;
+ }
+ mes "[Jones]";
+ mes "Please take good care of it.";
+ mes "It's for Daphrer in Splendide.";
+ set ep14_1_bs,17;
+ getitem 6391,1; //Splendid_Supply_Kit
+ changequest 11207,11208;
+ close;
+ } else if (ep14_1_bs == 17) {
+ mes "[Jones]";
+ mes "Please take good care of it.";
+ mes "It's for Daphrer in Splendide.";
+ close;
+ } else if (ep14_1_bs > 17) {
+ mes "[Jones]";
+ mes "Thanks to you, the job is well done.";
+ mes "Hehe, I see potential in you as a delivery man.";
+ mes "Interested in the career of delivery?";
+ close;
+ } else {
+ mes "[Jones]";
+ mes "Hehe, I see potential in you as a delivery man.";
+ mes "Interested in the career of delivery?";
+ close;
+ }
+ end;
+}
+
+splendide,121,260,4 script Daphrer#ep14_1_bs 435,{
+ if (!isequipped(2782)) {
+ mes "[Daphrer]";
+ mes "DRHSfhsdfGSDH FGkkmvoifk DFG DFHshfeksmn fgg FDbbd fjnnvk n skncki dfgd F FHdfkdfjkmv";
+ close;
+ }
+ if (countitem(6391)) {
+ mes "[Daphrer]";
+ mes "Oh....";
+ mes "I've been waiting for you.";
+ next;
+ mes "[Daphrer]";
+ mes "This was urgently needed so thank you for bringing it here, I hope I haven't caused you too much trouble..";
+ next;
+ mes "[Daphrer]";
+ mes "This is probably too small to be a reward, but please accept this as a sign of my gratitude.";
+ delitem 6391,1; //Splendid_Supply_Kit
+ if (ep14_1_bs == 17) {
+ set ep14_1_bs,18;
+ completequest 11208;
+ getexp 0,500000;
+ getitem 6380,5; //Mora_Coin
+ } else
+ getitem 6380,2; //Mora_Coin
+ close;
+ }
+ if (ep14_1_bs == 17) {
+ mes "[Daphrer]";
+ mes "Oh....";
+ mes "So you lost the item on the way.";
+ next;
+ mes "[Daphrer]";
+ mes "I knew that it was probably a stretch......";
+ mes "Perhaps I've been unrealistic.";
+ mes "But I thank you for your trouble anyway. Please accept this as a sign of my gratitude.";
+ set ep14_1_bs,18;
+ completequest 11208;
+ getexp 0,200000;
+ getitem 6380,2; //Mora_Coin
+ close;
+ }
+ mes "[Daphrer]";
+ mes "For me, a drop of water to make a flower blossom is more important than a sword for war.";
+ close;
+}
+
+// Chesire's New Day :: cheshir2
+//============================================================
+dic_in01,262,191,0 script #ep14_1_xq02 139,0,3,{
+ end;
+OnTouch:
+ if (ep13_3_secret > 22 && checkquest(7206) == -1) {
+ enablenpc "Cheshire#ep14_1_xq01";
+ cutin "ep13_cheshire_h",1;
+ mes "[Cheshire]";
+ mes "Oh, wait!";
+ mes "There's another thing I'd like you to do.";
+ mes "There's not enough time to go into details...";
+ next;
+ mes "- Cheshire glanced at the guard standing close to you, and leaned close and whispered into your ear.-";
+ next;
+ mes "[Cheshire]";
+ mes "You'll find cat caravans in the middle of ^4d4dffKamidal Tunnel^000000.";
+ mes "There is ^4d4dffa marked box among the caravans' goods to the west of the entrance to the Scaraba Hole^000000.";
+ next;
+ mes "[Cheshire]";
+ mes "I'd like you to bring it to me.";
+ mes "You'll see where you should bring it by looking at the box.";
+ mes "This is an important matter.";
+ next;
+ mes "[Cheshire]";
+ mes "I have something to get done in advance...";
+ mes "Good luck!";
+ setquest 7206;
+ close2;
+ disablenpc "Cheshire#ep14_1_xq01";
+ cutin "",255;
+ }
+ end;
+}
+
+dic_in01,260,194,4 script Cheshire#ep14_1_xq01 498,{
+ end;
+OnInit:
+ disablenpc "Cheshire#ep14_1_xq01";
+ end;
+}
+
+dic_dun01,274,114,0 script Stacked Boxes of Goods 844,{
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 1000) {
+ mes "- You have too many items to do this quest. -";
+ close;
+ }
+ set .@playtime, checkquest(7208,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "Boxes with all kinds of goods in them are stacked to the ceiling.";
+ mes "The marked box Cheshire was talking about doesn't seem to be here yet.";
+ close;
+ } else if (.@playtime == 2) {
+ mes "Boxes with all kinds of goods in them are stacked to the ceiling.";
+ mes "Looking closely, you find a box with a small piece of paper stuck to it.";
+ mes "You've found the box of goods Cheshire was talking about.";
+ next;
+ switch(select("Move the box.:Give up.")) {
+ case 1:
+ mes "You promised to take the box of Bradium to Cheshire, who will be waiting for you near the Crevice of Bifrost.";
+ erasequest 7208;
+ setquest 7210;
+ getitem 6392,1; //Bradium_Box
+ close;
+ case 2:
+ mes "You decided to give up delivering the box.";
+ mes "You left the box as it is.";
+ erasequest 7208;
+ close;
+ }
+ } else {
+ if (checkquest(7207) == -1) {
+ if (checkquest(7206) > -1) {
+ mes "Boxes with all kinds of goods in them are stacked to the ceiling.";
+ mes "Looking closely, you find a box with a small piece of paper stuck to it.";
+ next;
+ mes "The piece of paper is marked with some mysterious symbol, and below it is written ^4d4dffTo: The Crevice of Bifrost^000000 in small letters.";
+ next;
+ mes "This must the box Cheshire was talking about.";
+ mes "You decide to take it to the location shown on the piece of paper.";
+ completequest 7206;
+ setquest 7207;
+ getitem 6392,1; //Bradium_Box
+ close;
+ }
+ } else if (checkquest(7207) < 2) {
+ mes "You've already obtained the box Cheshire was talking about.";
+ mes "Now you only have to take it to the Crevice of Bifrost.";
+ close;
+ }
+ mes "Boxes with all kinds of goods in them are stacked to the ceiling.";
+ close;
+ }
+ end;
+}
+
+bif_fild01,335,168,3 script Cheshire#ep14_1_xq04 497,{
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 1000) {
+ mes "- You have too many items to do this quest. -";
+ close;
+ }
+ cutin "ep13_cheshire",1;
+ if (checkquest(7209) > -1) {
+ if (countitem(6090) < 20) {
+ mes "[Cheshire]";
+ mes "Bring me 20 pieces of refined Bradium.";
+ mes "In exchange for the box, which you carelessly and irresponsibly sold to somebody.";
+ mes "Have I made myself clear?!";
+ close2;
+ cutin "",255;
+ end;
+ }
+ mes "[Cheshire]";
+ mes "So you've brought it?";
+ mes "The amount is less than it was, but I guess I can't help it.";
+ mes "Next time, you must bring the box to me intact.";
+ next;
+ mes "- Cheshire threw the Bradium into the Crevice. -";
+ next;
+ mes "[Cheshire]";
+ mes "You made a mistake of losing the box, you have to be content with this.";
+ mes "And starting tomorrow, get the box here intact.";
+ mes "Every day.";
+ delitem 6090,20; //Purified_Bradium
+ erasequest 7209;
+ setquest 7208;
+ getitem 6304,1; //Sapa_Feat_Cert
+ close2;
+ cutin "",255;
+ end;
+ }
+ callsub L_CheckPlaytime;
+ if (checkquest(7210) > -1) {
+ if (countitem(6392) == 0)
+ callsub L_LostQuest,7210;
+ else {
+ mes "[Cheshire]";
+ mes "You've come at just the right time.";
+ mes "And I see the box is intact!";
+ mes "Well done.";
+ next;
+ mes "[Cheshire]";
+ mes "Well, I'll be counting on you, tomorrow as well.";
+ mes "Get it?";
+ mes "Now, leave this place before the Laphines grow suspicious.";
+ erasequest 7210;
+ setquest 7208;
+ delitem 6392,1; //Bradium_Box
+ getitem 6304,1; //Sapa_Feat_Cert
+ getexp 50000,40000;
+ close2;
+ cutin "",255;
+ end;
+ }
+ }
+ if (ep13_3_secret > 22) {
+ if (checkquest(7207) == -1) {
+ if (checkquest(7206) == -1) {
+ mes "[Cheshire]";
+ mes "...Hmm? Huh?";
+ mes "It's "+strcharinfo(0)+"!";
+ mes "What are you doing here?";
+ next;
+ select("Huh? Cheshire?");
+ mes "[Cheshire]";
+ mes "What makes you so surprised?";
+ mes "Does it surprise you to see me here?";
+ next;
+ select("Nothing, it's just the hood...");
+ mes "[Cheshire]";
+ mes "Oh... This. Because it's bothersome.";
+ mes "And here, I don't have to mind others.";
+ mes "Oh, and well met!";
+ mes "I was going to put you to work when you came to Diel.";
+ next;
+ mes "[Cheshire]";
+ mes ".......What? Why are you staring at me like that?";
+ mes "his is all for Ahat's good.";
+ next;
+ switch(select("I guess I have no choice.:I have a lot of things to do!")) {
+ case 1:
+ mes "["+strcharinfo(0)+"]";
+ mes "(He will be suspicious if I refuse to do it... I guess I should play along for now.)";
+ mes "Okay.";
+ mes "I'll do anything for Ahat's pleasure.";
+ mes "So, what do you need me for?";
+ next;
+ break;
+ case 2:
+ mes "[Cheshire]";
+ mes "Things to do?";
+ mes "What things?";
+ mes "This is one of the things you must do.";
+ mes "Don't forget you're are loyal to Ahat.";
+ next;
+ break;
+ }
+ mes "[Cheshire]";
+ mes "Great! Now I will tell you what to do.";
+ mes "You know there is an entrance to Scaraba Hole in the middle of Kamidal Tunnel?";
+ mes "You will find cat caravans around there who sell supplies and some simple tools.";
+ next;
+ mes "[Cheshire]";
+ mes "There is a marked box among the goods stacked there.";
+ mes "I'd like you to bring the box to me.";
+ next;
+ mes "[Cheshire]";
+ mes "It's a simple job of picking up and delivering a box.";
+ mes "Do it ^4d4dff quickly and quietly, without being noticed^000000.";
+ setquest 7206;
+ next;
+ mes "[Cheshire]";
+ mes "Now, move!";
+ close2;
+ cutin "",255;
+ end;
+ } else {
+ mes "[Cheshire]";
+ mes "Bring the box from Kamidal Tunnel.";
+ mes "Quickly and quietly!";
+ mes "No, get a move on!";
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else if (checkquest(7207) < 2) {
+ if (countitem(6392) == 0)
+ callsub L_LostQuest,7207;
+ else {
+ mes "[Cheshire]";
+ mes "........That box!";
+ mes "Oh, yes. It's the right one!";
+ mes "You've done a good job.";
+ mes "This is very important.";
+ mes "Ahat will be pleased.";
+ next;
+ mes "[Cheshire]";
+ mes "The boxes will be at the same place every day.";
+ mes "I'll leave the job to you.";
+ next;
+ select("Why don't you do it yourself?");
+ mes "[Cheshire]";
+ mes "........ Hmm...";
+ mes "It's only you humans that have free access to any place.";
+ mes "Plus, this place is Laphine territory.";
+ next;
+ mes "[Cheshire]";
+ mes "I don't attract their attention much, looking like this,";
+ mes "but what would Saphas think?";
+ mes "To see Ahat's man in a Laphine territory?";
+ next;
+ mes "[Cheshire]";
+ mes "They will grow suspicious.";
+ mes "But you humans are free from such troubles, so that's why you're the right one for the job.";
+ next;
+ mes "["+strcharinfo(0)+"]";
+ mes "(... I don't buy his story, but he believes I'm on his side, so I guess I should play along.)";
+ mes "What happens to this Bradium, then?";
+ next;
+ mes "[Cheshire]";
+ mes "That thing?";
+ mes "Hand it to me.";
+ next;
+ mes "- Cheshire opened the box, checked the Bradium in it, threw them into the Crevice,";
+ mes "and looked back, dusting his hands off, and with a triumphant look on his face. -";
+ next;
+ mes "[Cheshire]";
+ mes "This is what happens.";
+ mes "*laugh* Beyond the Crevice lies a path unknown to you.";
+ next;
+ mes "[Cheshire]";
+ mes "Well, I'll leave the matter to you.";
+ mes "Try to bring the box to me every day.";
+ mes "Okay?";
+ delitem 6392,1; //Bradium_Box
+ completequest 7207;
+ setquest 7208;
+ getitem 6304,1; //Sapa_Feat_Cert
+ getexp 50000,40000;
+ next;
+ mes "[Cheshire]";
+ mes "In compensation for your efforts, I'll give you an Exploit Certification of Sapha and a little cash.";
+ mes "Now, leave this place before the Laphines grow suspicious.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else {
+ callsub L_CheckPlaytime;
+ mes "[Cheshire]";
+ mes "Huh? What's up?";
+ mes "You haven't brought the box today?";
+ next;
+ mes "[Cheshire]";
+ mes "Hmm, this is unexpected...";
+ mes "Well, I have no choice then.";
+ mes "I'll have another guy do it today.";
+ mes "But you must do it starting tomorrow, okay?";
+ setquest 7208;
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else if (ep13_3_secret > 15) {
+ mes "[Cheshire]";
+ mes "... Huh? I think I've seen you somewhere...";
+ mes "..........Oh!";
+ mes strcharinfo(0)+"...?!";
+ mes "What brings you here?";
+ next;
+ mes "[Cheshire]";
+ mes "You say you've forgotten what to do?";
+ mes "You're not supposed to be here.";
+ mes "You're supposed to be at the crevice to the south of Dicastes.";
+ next;
+ mes "[Cheshire]";
+ mes "Whoa.";
+ mes "What was Ahat thinking when he sent such an idiot to me?";
+ mes "Now, get a move on and do your job.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ mes "[Cheshire]";
+ mes "...Why isn't this fellow showing up?";
+ mes "Should be here by now...";
+ mes "Lost the way back perhaps...?";
+ mes "....? Eh? Who, who are you? How long have you been standing here?";
+ next;
+ select("A cat?!");
+ mes "[Cheshire]";
+ mes "Who... who's a cat?!";
+ mes "Get lost!";
+ close2;
+ cutin "",255;
+ end;
+L_LostQuest:
+ mes "[Cheshire]";
+ mes "Oh, have you been there?";
+ mes "What happened to the box?";
+ mes "Why are you empty-handed?";
+ next;
+ switch(select("I'll look for it again!:I lost it...")) {
+ case 1:
+ mes "[Cheshire]";
+ mes "Make sure you do a good job!";
+ mes "And keep looking for it.";
+ mes "You must not lose it.";
+ break;
+ case 2:
+ mes "[Cheshire]";
+ mes "Where?";
+ mes "Which merchant did you sell it to?";
+ mes "Can't you distinguish between what to sell and what not to sell?";
+ mes "Were you asleep when you made the deal?";
+ next;
+ mes "[Cheshire]";
+ mes "This is utterly ridiculous.";
+ mes "Make up for what you lost!";
+ mes "^4d4dff20 pieces of refined Bradium^000000!!!";
+ erasequest getarg(0);
+ setquest 7209;
+ break;
+ }
+ close2;
+ cutin "",255;
+ end;
+L_CheckPlaytime:
+ set .@playtime, checkquest(7208,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "[Cheshire]";
+ mes "Each day, one of these boxes is sent to Kamidal Tunnel.";
+ mes "It's smuggled in among other items.";
+ next;
+ mes "[Cheshire]";
+ mes "Sneak into the place on time, and bring the box to me. The boxes will be at the same place every day.";
+ mes "You'll be doing it every day.";
+ close2;
+ cutin "",255;
+ end;
+ } else if (.@playtime == 2) {
+ mes "[Cheshire]";
+ mes "It's about time.";
+ mes "Now go get the box.";
+ mes "It should be lying near the entrance to Scaraba Hole in the Kamidal Tunnel.";
+ mes "You've done this before, so you must be familiar with it?";
+ close2;
+ cutin "",255;
+ end;
+ } else
+ return;
+}
+
+dicastes02,125,192,0 script #call_cheshir_ep14 139,0,3,{
+ end;
+OnTouch:
+ if (ep13_3_secret > 22) {
+ if (rand(2)) {
+ emotion e_ho,1;
+ mes "..........?";
+ mes "You sense someone moving around.";
+ mes "There must be someone down there.";
+ if ($@cheshire_on == 0) {
+ donpcevent "Cheshire#ep14_extra::OnEnable";
+ set $@cheshire_on,1;
+ }
+ close;
+ }
+ }
+ end;
+}
+
+dicastes02,103,190,3 script Cheshire#ep14_extra 497,{
+ if (ep13_3_secret > 22) {
+ cutin "ep13_cheshire",1;
+ mes "[Cheshire]";
+ mes "...Eh?";
+ mes "What a surprise. What are you doing here?";
+ next;
+ switch(select("And what are YOU doing here?:Those ears...?")) {
+ case 1:
+ mes "[Cheshire]";
+ mes "Out for a walk?";
+ mes "I came out with Ahat, but he went back in to take care of an urgent matter.";
+ next;
+ mes "[Cheshire]";
+ mes ".. ..............";
+ next;
+ select("....:Wha... What a pretty tree.");
+ mes "[Cheshire]";
+ mes "This tree... it's white, transparent, and shiny.";
+ mes "It's a Sapha's body.";
+ next;
+ mes "[Cheshire]";
+ mes "You know Saphas slowly turn to stone throughout their lives.";
+ mes "So when they die, they turn to stony trees.";
+ mes "This forest is... their cemetery, so to speak.";
+ next;
+ mes "[Cheshire]";
+ mes "....... Look closely, and you can make out his arms and legs.";
+ mes "Interesting, isn't it?";
+ next;
+ mes "[Cheshire]";
+ mes "... .. ...";
+ next;
+ mes "[Cheshire]";
+ mes "Oh, this is so annoying.";
+ mes "I'm off!";
+ next;
+ mes "- Cheshire stormed off... -";
+ break;
+ case 2:
+ mes "[Cheshire]";
+ mes "What? The ears?";
+ mes "Well, it's no wonder because I'm a beastman.";
+ mes "... Why... Why are you staring me like that?";
+ next;
+ select("Are you responsible for the report?!");
+ mes "[Cheshire]";
+ mes "What are you talking about?";
+ mes "I don't know such a thing!";
+ next;
+ mes "- Cheshire ran away... -";
+ break;
+ }
+ disablenpc "Cheshire#ep14_extra";
+ stopnpctimer;
+ close2;
+ cutin "",255;
+ end;
+ }
+ mes "A boy dressed in unusual clothing is standing, with a fierce look in his eyes.";
+ mes "You guess you'd better leave him alone.";
+ close;
+OnInit:
+ disablenpc "Cheshire#ep14_extra";
+ end;
+OnEnable:
+ enablenpc "Cheshire#ep14_extra";
+ initnpctimer;
+ end;
+OnDisable:
+ disablenpc "Cheshire#ep14_extra";
+ stopnpctimer;
+ end;
+OnTimer600000:
+ disablenpc "Cheshire#ep14_extra";
+ set $@cheshire_on,0;
+ stopnpctimer;
+ end;
+}
+
+// Helping Lope and Euridi :: rofe
+//============================================================
+mora,117,66,3 script Euridi#pa 521,{
+ if (BaseLevel < 100) {
+ mes "[Euridi]";
+ mes "You are very delicate.";
+ mes "It's true that I need help,";
+ mes "but I don't think you can help.";
+ close;
+ }
+ if (ep14_1_rope == 0) {
+ mes "[Euridi]";
+ mes "I hear you passed through the Hazy Forest.";
+ mes "Did you...";
+ mes "Did you happen to see";
+ mes "Lope, my fiance, there?";
+ next;
+ switch(select("Yes, I did.:No, I didn't.")) {
+ case 1:
+ mes "[Euridi]";
+ mes "Are you sure? Where did you see him?";
+ mes "Take me there, quick!";
+ mes "...";
+ next;
+ mes "[Euridi]";
+ mes "What?";
+ mes "You're kidding...?";
+ mes "How could you?";
+ close;
+ case 2:
+ mes "[Euridi]";
+ mes "Please find my Lope.";
+ mes "I came here to the Village of Mora";
+ mes "after asking all around,";
+ mes "but there is nothing more I can do.";
+ next;
+ mes "[Euridi]";
+ mes "My heart aches at the thought of Lope...";
+ mes "He will be desperately looking for me...";
+ next;
+ switch(select("Sorry, I'm busy!:I'll help you!")) {
+ case 1:
+ mes "[Euridi]";
+ mes "How heartless!";
+ close;
+ case 2:
+ mes "[Euridi]";
+ mes "I heard that he had gone into the Hazy Forest,";
+ mes "while guiding tourists around the village.";
+ mes "One of the tourists who went with Lope";
+ mes "must still be at the inn.";
+ next;
+ mes "[Euridi]";
+ mes "He wouldn't see me and locked himself in the room.";
+ mes "But he might be willing to see you, because you've been to the Hazy Forest.";
+ setquest 1109;
+ set ep14_1_rope,1;
+ close;
+ }
+ }
+ } else if (ep14_1_rope == 1) {
+ mes "[Euridi]";
+ mes "The tourist is at the inn,";
+ mes "not in front of me!";
+ close;
+ } else if (ep14_1_rope == 2) {
+ mes "[Euridi]";
+ mes "So you've seen Pitt!";
+ mes "I knew he would be willing to see you.";
+ mes "What did he say?";
+ next;
+ mes "[Euridi]";
+ mes "...No way....!";
+ mes "That is utter nonsense.";
+ mes "To blame Lope for it!";
+ mes "I found this piece of paper";
+ mes "near the Hazy Forest.";
+ mes "I'm sure it's Lope's.";
+ next;
+ mes "[Euridi]";
+ mes "If you find the rest of ^0000FFLope's Clues^000000,";
+ mes "you'll be able to find out";
+ mes "where he is.";
+ mes "I'm counting on you, "+strcharinfo(0)+".";
+ changequest 1110,1111;
+ set ep14_1_rope,3;
+ close;
+ } else if (ep14_1_rope == 3) {
+ mes "[Euridi]";
+ mes "If you come across a ^0000FFLope's Clue^000000, please show it to Pitt.";
+ mes "I hope he will tell the truth soon.";
+ close;
+ } else if (ep14_1_rope == 4) {
+ mes "[Euridi]";
+ mes "I don't understand it.";
+ mes "I'm now suspicious of his motives.";
+ mes "Why is he trying so hard to accuse Lope?";
+ mes "Wait... those clues...";
+ next;
+ mes "[Euridi]";
+ mes "Those seem to be more than simple notes.";
+ mes "Can I have a look at them?";
+ mes "...";
+ mes "These fit together like a puzzle.";
+ mes "... Oh!... This is...";
+ next;
+ mes "[Lope's Letter]";
+ mes "...We've been wandering around the Forest for days.";
+ mes "...So we're not protecting the tourists,";
+ mes "I got sick from deadly poison, and became a burden to everyone.";
+ mes "How pathetic...";
+ next;
+ mes "[Lope's Letter]";
+ mes "No wonder I was kicked out of";
+ mes "the Splendide Expedition.";
+ mes "...But I managed to protect at least one tourist.";
+ mes "He will deliver this letter and the ring to you.";
+ next;
+ mes "[Lope's Letter]";
+ mes "...I wanted to propose to you";
+ mes "as a proud member of the Expedition.";
+ mes "I'm sorry, Euridi.";
+ mes "See you soon.";
+ next;
+ mes "Having read the letter,";
+ mes "Euridi is standing staring blankly like someone who wasn't all there.";
+ mes "Let's go show the letter to Pitt.";
+ changequest 1112,1113;
+ delitem 6383,30; //Clue_Of_Lope
+ set ep14_1_rope,5;
+ close;
+ } else if (ep14_1_rope == 5) {
+ mes "[Euridi]";
+ mes "No, Lope must be safe.";
+ mes "He will come back no matter what...";
+ close;
+ } else if (ep14_1_rope == 6) {
+ mes "[Euridi]";
+ mes "......";
+ next;
+ mes "You hear a song coming from the girl who is hanging her head low.";
+ mes "Her friend seems to have something to say.";
+ close;
+ } else if (ep14_1_rope == 7 || ep14_1_rope == 8) {
+ mes "You hear a quiet singing voice.";
+ mes "You can't make the words out.";
+ close;
+ } else if (ep14_1_rope == 9) {
+ mes "[Euridi]";
+ mes "Have you found Lope?";
+ mes "Is he safe?";
+ next;
+ switch(select("Tell her you can't possibly find him.:Tell her he is dead.")) {
+ case 1:
+ mes "[Euridi]";
+ mes "I'll go look for him myself.";
+ mes "Hopefully... it's not too late, yet.";
+ mes "Let me go, there's no time to lose!";
+ close;
+ case 2:
+ mes "[Euridi]";
+ mes "I don't believe it.";
+ mes "He told me he would come back soon...";
+ mes "He told me to hang on.";
+ mes "It can't be... It just can't be...";
+ next;
+ mes "You hand her Lope's Ring, which Pitt gave you.";
+ mes "With the ring in her hand, Euridi bursts into tears.";
+ mes "She starts to sing in a strained voice, still crying.";
+ changequest 1116,1117;
+ set ep14_1_rope,10;
+ delitem 6384,1; //Ring_Of_Lope
+ close;
+ }
+ } else if (ep14_1_rope > 9) {
+ mes "You stand frozen.";
+ mes "You hear a quiet singing voice.";
+ close;
+ }
+}
+
+mora,115,68,3 script Euridi's Friend#pa 520,{
+ if (ep14_1_rope < 2) {
+ mes "[Euridi's Friend]";
+ mes "Please stop Euridi.";
+ mes "She is desperate to find her missing fiance.";
+ close;
+ } else if (ep14_1_rope == 2) {
+ mes "[Euridi's Friend]";
+ mes "Pitt is definitely suspicious.";
+ mes "I think he is avoiding Euridi...";
+ mes "He must be hiding something.";
+ close;
+ } else if (ep14_1_rope == 3) {
+ mes "[Euridi's Friend]";
+ mes "To tell the truth, I don't think";
+ mes "that Lope is alive.";
+ mes "I'm just worried about Euridi.";
+ next;
+ mes "[Euridi]";
+ mes "Aaarrrggghhh!!!!!!!!";
+ next;
+ mes "[Euridi's Friend]";
+ mes "...";
+ mes "To tell the truth, I really believe";
+ mes "that Lope is alive.";
+ mes "...";
+ mes "*sigh*";
+ close;
+ } else if (ep14_1_rope == 4) {
+ mes "[Euridi's Friend]";
+ mes "How's Pitt doing?";
+ mes "I think I should go visit him";
+ mes "and make him feel worse!";
+ mes "He's so disgusting!";
+ close;
+ } else if (ep14_1_rope == 5) {
+ mes "[Euridi's Friend]";
+ mes "Go to Pitt, quick.";
+ close;
+ } else if (ep14_1_rope == 6) {
+ mes "[Euridi's Friend]";
+ mes "Euridi is singing a song of healing";
+ mes "to protect her weakened body and mind.";
+ mes "At this rate, something's going to happen to her too.";
+ next;
+ mes "[Euridi's Friend]";
+ mes "Oh, I remember a traveler telling me";
+ mes "that he had seen a suspicious man";
+ mes "near the entrance to the Hazy Forest.";
+ next;
+ mes "[Euridi's Friend]";
+ mes "The traveler says he looked creepy standing there staring blankly,";
+ mes "but he couldn't see clearly";
+ mes "because of the thick fog.";
+ mes "I think it's worth investigating.";
+ changequest 1114,1115;
+ set ep14_1_rope,7;
+ close;
+ } else if (ep14_1_rope == 7) {
+ mes "[Euridi's Friend]";
+ mes "I hear that a suspicious man was seen";
+ mes "near the entrance to the Hazy Forest.";
+ mes "The traveler says he looked creepy standing there staring blankly,";
+ mes "but he couldn't see clearly";
+ mes "because of the thick fog.";
+ mes "I think it's worth investigating.";
+ close;
+ } else if (ep14_1_rope == 8 || ep14_1_rope == 9) {
+ mes "[Euridi's Friend]";
+ mes "Your face is dark.";
+ mes "Bad news?";
+ close;
+ } else if (ep14_1_rope == 10) {
+ mes "[Euridi's Friend]";
+ mes "There is a Laphine saying that";
+ mes "desperation invites disaster.";
+ mes "Maybe we're responsible";
+ mes "for what happened.";
+ next;
+ if (checkweight(6380,1) == 0) {
+ mes "[Euridi's Friend]";
+ mes "You have too many things with you.";
+ mes "Can you throw out some of them?";
+ close;
+ }
+ mes "[Euridi's Friend]";
+ mes "Lope will be able to rest in peace now.";
+ mes "Thank you. I won't forget what you've done for me.";
+ completequest 1117;
+ set ep14_1_rope,11;
+ getexp 1000000,2000000;
+ getitem 6380,10; //Mora_Coin
+ close;
+ } else if (ep14_1_rope > 10) {
+ mes "[Euridi's Friend]";
+ mes "Thank you. I won't forget your help.";
+ close;
+ }
+}
+
+mora,65,145,3 script Pitt#pa 519,{
+ if (ep14_1_rope == 0) {
+ mes "[Pitt]";
+ mes "So you're quite good,";
+ mes "since you passed through the Hazy Forest alive.";
+ mes "I'm completely messed up, you see,";
+ mes "so I can't afford to listen to the tales of your exploits.";
+ mes "Now leave.";
+ close;
+ } else if (ep14_1_rope == 1) {
+ mes "[Pitt]";
+ mes "You have a knack for pestering people, don't you?";
+ mes "Euridi sent you, eh?";
+ mes "The Laphine couple is";
+ mes "anxious to kill me.";
+ next;
+ mes "[Pitt]";
+ mes "Go and tell her!";
+ mes "That the stupid guide";
+ mes "pushed us reluctant tourists into the forest,";
+ mes "and ran off to save his own skin!";
+ next;
+ mes "[Pitt]";
+ mes "So you're sorry that it's me, not him, that's here?";
+ mes "He will be alive somewhere,";
+ mes "so go and try to find him! Just stop bothering me!";
+ changequest 1109,1110;
+ set ep14_1_rope,2;
+ close;
+ } else if (ep14_1_rope == 2) {
+ mes "[Pitt]";
+ mes "This is all because of";
+ mes "the stupid guide!";
+ mes "I hate Laphines!";
+ close;
+ } else if (ep14_1_rope == 3) {
+ if (countitem(6383) < 30) {
+ mes "[Pitt]";
+ mes "This is all because of";
+ mes "the stupid guide!";
+ mes "I hate Laphines!";
+ close;
+ }
+ mes "[Pitt]";
+ mes "That thing you have in your hand...";
+ mes "It looks very strange.";
+ mes "I've never seen such a thing before.";
+ mes "You'd better not keep that.";
+ mes "Can I have it?";
+ next;
+ switch(select("Give it to him.:Don't give it to him.")) {
+ case 1:
+ mes "[Pitt]";
+ mes "So I swallow it like this,";
+ mes "and voila! Evidence gone!";
+ mes "Now I can sleep soundly, thank you!";
+ delitem 6383,5; //Clue_Of_Lope
+ close;
+ case 2:
+ mes "[Pitt]";
+ mes "Why are you showing me such a thing?";
+ mes "I don't know anything! I'm the victim here!";
+ mes "I'm a victim of the schemes of the Laphine couple.";
+ mes "It's unfair...";
+ next;
+ mes "It's no use trying to talk to him any more.";
+ mes "Try talking to Euridi.";
+ changequest 1111,1112;
+ set ep14_1_rope,4;
+ close;
+ }
+ } else if (ep14_1_rope == 4) {
+ mes "[Pitt]";
+ mes "This is unfair!";
+ mes "This is so totally unfair!";
+ close;
+ } else if (ep14_1_rope == 5) {
+ if (checkweight(6384,1) == 0) {
+ mes "[Pitt]";
+ mes "What are you, a professional mover?";
+ mes "Stomping about with a ton of stuff on your back!";
+ mes "I can't rest because of the noise!";
+ mes "Throw away all that stuff!";
+ close;
+ }
+ mes "[Pitt]";
+ mes "I never imagined you'd find them all";
+ mes "and piece them together.";
+ mes "Is this a divine punishment...?";
+ mes "Or Laphines' curse?";
+ mes "Whew...";
+ next;
+ mes "[Pitt]";
+ mes "That guide fellow,";
+ mes "he opened the gate out";
+ mes "when he was hit hard";
+ mes "by the poison.";
+ next;
+ mes "[Pitt]";
+ mes "When I was hesitating whether to take him with me,";
+ mes "he handed me that letter and the ring.";
+ mes "Laphines' jewelry...";
+ mes "It's rumored that nobody could ever have it except Laphines,";
+ mes "including the Gods themselves.";
+ next;
+ mes "[Pitt]";
+ mes "So I had in my hands";
+ mes "a treasure among treasures!";
+ mes "How...! Just how on earth";
+ mes "could I have let it pass through!";
+ next;
+ mes "[Pitt]";
+ mes "I was going to leave this place";
+ mes "as soon as I pulled myself together.";
+ mes "But now I'm stuck here,";
+ mes "affected by the poison myself.";
+ next;
+ mes "[Pitt]";
+ mes "I'll give you the ring back,";
+ mes "so please leave me alone!";
+ next;
+ mes "["+strcharinfo(0)+"]";
+ mes "Then where could Lope...?";
+ next;
+ mes "[Pitt]";
+ mes "If he died near the exit of the forest,";
+ mes "he must be somewhere around there,";
+ mes "in whatever form he might be in.";
+ changequest 1113,1114;
+ set ep14_1_rope,6;
+ getitem 6384,1; //Ring_Of_Lope
+ close;
+ } else if (ep14_1_rope == 6 || ep14_1_rope == 7) {
+ mes "[Pitt]";
+ mes "I'm a victim, too!";
+ mes "So leave me alone! I beg you!";
+ close;
+ } else if (ep14_1_rope == 8) {
+ mes "[Pitt]";
+ mes "...";
+ close;
+ } else if (ep14_1_rope > 8) {
+ mes "He's sleeping.";
+ mes "He seems to be in a very deep sleep.";
+ close;
+ }
+}
+
+bif_fild01,132,338,3 script Lope#pa 461,2,2,{
+ if (ep14_1_rope < 8) {
+ mes "[Suspicious Man]";
+ mes "......";
+ close;
+ } else if (ep14_1_rope == 8) {
+ donpcevent "Lope#pa::OnEnable";
+ mes "[Suspicious Man]";
+ mes "Aaaarrrrrggggghhhh!!!!!!";
+ mes "I can't see anything.";
+ mes "Who's there?";
+ mes "Answer, or I'll take you as an enemy and kill you.";
+ next;
+ mes "["+strcharinfo(0)+"]";
+ mes "Euridi is looking for you.";
+ next;
+ mes "[Suspicious Man]";
+ mes "......";
+ next;
+ mes "[Lope]";
+ mes "Wraith, how can you be so harsh to me?";
+ mes "I asked you to wipe the name off my mind";
+ mes "in return for bearing the curse!";
+ next;
+ mes "["+strcharinfo(0)+"]";
+ mes "Will you please calm down and listen to...";
+ next;
+ mes "[Lope]";
+ mes "My desire to help";
+ mes "led me to my death,";
+ mes "And my desire to survive and take revenge";
+ mes "led me to my rebirth.";
+ mes "I will not side with life any more.";
+ next;
+ mes "[Lope]";
+ mes "As soon as my transformation is over,";
+ mes "I will punish you all with the bloody confusion of the Hazy Forest,";
+ mes "which saved my life!";
+ next;
+ mes "You put the letter Euridi pieced together in Lope's hands.";
+ next;
+ mes "[Lope]";
+ mes "...This is!";
+ mes "I feel Euridi's touch.";
+ mes "So the letter... was delivered to Euridi?";
+ mes "This is unbelievable...";
+ next;
+ mes "[Lope]";
+ mes "Deformed as I am now,";
+ mes "I'm not her love any more.";
+ mes "Go back, and tell her that Lope turned to dust";
+ mes "on the ground of the Hazy Forest long ago.";
+ next;
+ mes "[Lope]";
+ mes "Now go!";
+ mes "This is my last request as a Laphine called Lope...";
+ set ep14_1_rope,9;
+ changequest 1115,1116;
+ close;
+ } else {
+ mes "[Lope]";
+ mes "Deformed as I am now,";
+ mes "I'm not her love any more.";
+ mes "Go back, and tell her that Lope turned to dust";
+ mes "on the ground of the Hazy Forest long ago.";
+ next;
+ mes "[Lope]";
+ mes "Now go!";
+ mes "This is my last request as a Laphine called Lope...";
+ next;
+ mes "You see a ring glowing faintly on his left hand.";
+ close;
+ }
+ end;
+OnEnable:
+ setnpcdisplay "Lope#pa",999;
+ end;
+OnDisable:
+ disablenpc "Lope#pa";
+ initnpctimer;
+ end;
+OnReset:
+ setnpcdisplay "Lope#pa",461;
+ enablenpc "Lope#pa";
+ end;
+OnTimer2000:
+ donpcevent "Lope#pa::OnReset";
+ stopnpctimer;
+ end;
+OnTouch:
+ mes "I see a suspicious man. Should I try talking to him?";
+ next;
+ switch(select("Leave him alone.:Talk to him.")) {
+ case 1:
+ donpcevent "Lope#pa::OnDisable";
+ mes "[Suspicious Man]";
+ mes "......";
+ close;
+ case 2:
+ donpcevent "Lope#pa::OnDisable";
+ if (ep14_1_rope == 7) {
+ mes "[Suspicious Man]";
+ mes ".";
+ mes "...";
+ mes "........!!!";
+ next;
+ mes "[Suspicious Man]";
+ mes "Aaaaarrrrrggghh!!!!!";
+ set ep14_1_rope,8;
+ close;
+ } else {
+ mes "[Suspicious Man]";
+ mes "......";
+ close;
+ }
+ }
+}
+
+// Find the Research Tools :: muk
+//============================================================
+mora,31,138,6 script Raffle Researcher#ep14 522,{
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 500) {
+ mes "^FF0000- Warning message -";
+ mes "- Hang on there!! -";
+ mes "- You have too many items -";
+ mes "- to receive any more items. -";
+ mes "- Please lighten your load -";
+ mes "- and try again. -^000000";
+ close;
+ }
+ // NPC disabled from 12am ~ 5am.
+ if (gettime(3) >= 0 && gettime(3) < 5) {
+ if (ep14_1_muk > 0) {
+ mes "[Raffle Researcher]";
+ mes "Don't humans sleep?";
+ mes "People should be sleeping at this hour.";
+ mes "Why on earth are you bothering me?";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I can't get any sleep because of you.";
+ mes "I have to sleep for my research tomorrow.";
+ mes "You should go sleep too.";
+ close;
+ } else {
+ mes "Z z Z z";
+ next;
+ mes "^FF0000He appears to be asleep.^000000";
+ close;
+ }
+ }
+ if (ep14_1_muk == 0) {
+ mes "[Raffle Researcher]";
+ mes "Oh no~ My research tools...";
+ mes "What...... What was it?";
+ emotion e_sob;
+ next;
+ select("What is your business here?");
+ mes "[Raffle Researcher]";
+ mes "Hmm?";
+ emotion e_what;
+ next;
+ mes "[Raffle Researcher]";
+ mes "You're human...? Are you human...?";
+ mes "You... came from the underworld?";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Human beings are incredible...";
+ mes "You survived the crevice and made it here.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "... ... ...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "You, come here for a minute.";
+ mes "It's a simple experiment, so there's no need to be afraid.";
+ emotion e_gg;
+ next;
+ if(select("What a crazy Raffle. I must run away.:... ...") == 1) {
+ mes "[Raffle Researcher]";
+ mes "You said you had made it up from the Crevice,";
+ mes "so I was wondering what race you were,";
+ mes "but a mere human? How did you get up here?";
+ emotion e_lv;
+ close;
+ }
+ if (BaseLevel < 100) {
+ mes "[Raffle Researcher]";
+ mes "What... I thought a human who made it up from the Crevice";
+ mes "would be extraordinary,";
+ mes "but you're no more than a kid.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Go hunt more ^000000Porings^000000";
+ mes "and come back when your level is in the triple digits kid!";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "... ... ...";
+ emotion e_dots;
+ next;
+ mes "[Raffle Researcher]";
+ mes "You... You're not like the other humans.";
+ mes "You're not running away...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "You've got some serious guts...";
+ mes "Now I really want to do some experiments on you...";
+ next;
+ select("Well... that's... um...");
+ mes "[Raffle Researcher]";
+ mes "Ha ha... Just kidding...";
+ mes "I'm a Raffle researcher,";
+ mes "but I don't research humans.";
+ mes "Actually, I have no idea";
+ mes "what to research";
+ mes "about humans...";
+ next;
+ select("Glad to hear that...");
+ mes "[Raffle Researcher]";
+ mes "That's that. You're not busy, are you?";
+ mes "I'd like you to give me a hand...";
+ next;
+ select("Help him.:Help willingly.:Although you feel a little embarrassed, help anyhow.:Help with conviction.:Help adorably.:You're suspicious, but help anyhow.:You have no choice. Help him.");
+ mes "[Raffle Researcher]";
+ mes "I haven't met many humans";
+ mes "but you clearly care about";
+ mes "another person's hardship.";
+ mes "You must be an ^FF0000extremely^000000 nice human.";
+ emotion e_no1;
+ next;
+ mes "[Raffle Researcher]";
+ mes "I'll save my thanks for time's sake.";
+ mes "It's important, so please take care of it quickly.";
+ mes "I can't proceed with the research because of it.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Here at the Mora Inn,";
+ mes "there's a very famous bath.";
+ mes "If anybody, not just us Raffles,";
+ mes "goes into the bath water";
+ mes "their wounds will be healed instantly...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "So being a great researcher, I went into the bath";
+ mes "to check it out further";
+ mes "and... unfortunately...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I was attacked by a mysterious creature,";
+ mes "and I lost consciousness.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "When I woke up, I realized that";
+ mes "my important research tools were missing...";
+ mes "So I was at a loss for what to do.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "And here you are, a human,";
+ mes "a brave, heroic human that arrived at Mora Village from the Crevice.";
+ mes "Your willingness to help has really taken this load off of my mind.";
+ next;
+ select("... ... ...");
+ mes "[Raffle Researcher]";
+ mes "Please go to the bath house and retrieve my research tools.";
+ mes "The sooner you get them back,";
+ mes "the sooner I can get back to my research.";
+ setquest 5016;
+ set ep14_1_muk,1;
+ next;
+ mes "[Raffle Researcher]";
+ mes "Have a safe trip.";
+ emotion e_paper;
+ close;
+ } else if (ep14_1_muk == 1) {
+ if (checkquest(5016) > -1 && countitem(6385) == 0) {
+ mes "[Raffle Researcher]";
+ mes "You're back? Where are my research tools?";
+ emotion e_what;
+ next;
+ mes "[Raffle Researcher]";
+ mes "You still haven't found the research tools?";
+ mes "I'm disappointed. Get yourself to the bath";
+ mes "and quickly retrieve my research tools";
+ mes "taken away from me.";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "Wow!! You found the research tools...?";
+ mes "You're quite capable.";
+ mes "I really like how you handle your work.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I like you.";
+ mes "Do you want to work on my research with me?";
+ mes "I could use your help here and there,";
+ mes "until I'm done with this research.";
+ next;
+ select("As you wish.");
+ mes "[Raffle Researcher]";
+ mes "Great. Thanks, and when we're done,";
+ mes "I'll pay you handsomely.";
+ mes "Also, for every research project that's completed,";
+ mes "I'll also give you some pocket money.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Young Raffles these days... they are just plain stupid.";
+ mes "I've always wanted a capable research assistant,";
+ mes "but it hasn't been easy to find one.";
+ next;
+ if (checkweight(6380,1) == 0) {
+ mes "[Raffle Researcher]";
+ mes "By the way... Was it that difficult to";
+ mes "reclaim the research tools?";
+ mes "You're carrying some very heavy looking equipment.";
+ mes "Go lighten your load, and I'll pay you for your work.";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "It must've been hard work to retrieve the tools.";
+ mes "Why don't you take this and go to the inn";
+ mes "and rest up? There's nothing for you to do right now.";
+ delitem 6385,1; //Research_Tool_Bag
+ set ep14_1_muk,2;
+ getitem 6380,1; //Mora_Coin
+ erasequest 5016;
+ close;
+ } else if (ep14_1_muk == 2) {
+ // Unofficial check, but it's needed here.
+ if (checkquest(5029,PLAYTIME) == 0 || checkquest(5029,PLAYTIME) == 1) {
+ mes "[Raffle Researcher]";
+ mes "It must've been hard work to retrieve the tools.";
+ mes "Why don't you take this and go to the inn";
+ mes "and rest up? There's nothing for you to do right now.";
+ close;
+ }
+ switch(rand(1,5)) {
+ case 1:
+ mes "[Raffle Researcher]";
+ mes "I'm still preparing for the research.";
+ mes "Unfortunately a few research tools";
+ mes "were damaged.";
+ emotion e_an;
+ close;
+ case 2:
+ mes "[Raffle Researcher]";
+ mes "Come to think of it, I don't think";
+ mes "I told you my name.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "My name is Inffle. If anybody";
+ mes "asks you who you are working with,";
+ mes "you can say ^0000FFI'm working with Researcher Inffle.^000000";
+ mes "That's why I'm telling you my name.";
+ emotion e_ok;
+ close;
+ case 3:
+ mes "[Raffle Researcher]";
+ mes "Why? The inn is closed?";
+ mes "That's strange, it shouldn't be.";
+ mes "Why don't you go try again?";
+ emotion e_what;
+ close;
+ case 4:
+ break;
+ case 5:
+ mes "[Raffle Researcher]";
+ mes "Darn, I get more worked up the more I think about it.";
+ mes "It's not like I went with bad intentions...";
+ mes "I just wanted to do some research...";
+ mes "Can't believe I got attacked...";
+ mes "I just can't believe it...";
+ mes "What do you think?";
+ emotion e_an;
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "Good thing you're here.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I've been thinking about";
+ mes "the unidentified creature in the bath.";
+ mes "He's quite the little devil, to take research tools,";
+ mes "which are as important to a researcher as his life...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "A research assistant's job";
+ mes "is to make sure that the researcher can focus on his research";
+ mes "And not have to worry about anything else... VERY! Important.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I'd like you to take my revenge";
+ mes "on the unidentified creature for me...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I don't even want anything that drastic.";
+ mes "3 times! Go bully him for just 3 times.";
+ mes "You can draw on his face,";
+ mes "pinch him, tickle him,";
+ mes "whatever you want. Just bully him 3 times.";
+ set ep14_1_muk,3;
+ setquest 5017;
+ close;
+ } else if (ep14_1_muk < 6) {
+ mes "[Raffle Researcher]";
+ mes "How's the work going?";
+ mes "An assistant has to work swiftly and effectively.";
+ mes "Could it be that you have forgotten";
+ mes "what your task is?";
+ next;
+ select("Exactly. What should I do?");
+ mes "[Raffle Researcher]";
+ mes "Go bully the unidentified creature";
+ mes "just 3 times.";
+ mes "You can draw on his face,";
+ mes "pinch him, tickle him, or whatever.";
+ mes "Bully him 3 times.";
+ emotion e_gg;
+ close;
+ } else if (ep14_1_muk == 6) {
+ mes "[Raffle Researcher]";
+ mes "So you taught him a lesson? Great. I feel avenged!";
+ emotion e_heh;
+ next;
+ mes "[Raffle Researcher]";
+ mes "For a while, I couldn't sleep";
+ mes "because I couldn't stop thinking about the lost research tools.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "That's that! We need to begin the bath research now.";
+ mes "I need to finish the research quickly,";
+ mes "so that I can start on a new topic.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Go to the bath water";
+ mes "with the sample tube that I give you,";
+ mes "and gather some samples.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Look around the bath water,";
+ mes "and you will find an area emitting a distinct aura.";
+ mes "You can collect the samples";
+ mes "from that area.";
+ next;
+ if (MaxWeight - Weight < 100 || checkweight(1092,10) == 0) {
+ mes "[Raffle Researcher]";
+ mes "You are carrying too much weight.";
+ mes "I can't give you the sample tube.";
+ mes "Why don't you lighten your load and come back?";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "Here is the sample tube for collecting.";
+ mes "Go and collect 10 samples!";
+ set ep14_1_muk,7;
+ getitem 1092,10; //Empty_Cylinder
+ erasequest 5018;
+ setquest 5019;
+ close;
+ } else if (ep14_1_muk == 7) {
+ if (checkquest(5019) > -1 && countitem(6386) < 10) {
+ mes "[Raffle Researcher]";
+ mes "Have you collected the samples yet?";
+ mes "Please hurry up.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Look around the bath water,";
+ mes "and you will find an area emitting a distinct aura.";
+ mes "You can collect the samples";
+ mes "from that area.";
+ close;
+ }
+ if (checkweight(6380,1) == 0) {
+ mes "[Raffle Researcher]";
+ mes "I know that you've done a lot...";
+ mes "but you are carrying too many things.";
+ mes "Even though I want to give you pocket money, I can't.";
+ mes "Could you lighten your load and come back?";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "You got the bath water sample. Great job.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I'll have to run a few tests";
+ mes "with the bath water samples.";
+ mes "It usually takes about 24 hours.";
+ mes "Why don't you come back then?";
+ delitem 6386,10; //Bathtub_R_Sample
+ getitem 6380,1; //Mora_Coin
+ set ep14_1_muk,8;
+ erasequest 5019;
+ setquest 5020;
+ close;
+ } else if (ep14_1_muk == 8) {
+ if (checkquest(5020,PLAYTIME) == 0 || checkquest(5020,PLAYTIME) == 1) {
+ mes "[Raffle Researcher]";
+ mes "The basic tests have not been completed yet.";
+ mes "There's nothing for you to do now.";
+ mes "Go for a walk.";
+ mes "Spend some money that I gave you.";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "The basic tests are done.";
+ mes "As I thought...";
+ mes "There were many interesting substances in the bath water.";
+ emotion e_ho;
+ next;
+ mes "[Raffle Researcher]";
+ mes "The most notable is this unidentifiable DNA.";
+ mes "I didn't have a chance to compare it to a lot of DNA samples,";
+ mes "but I'm pretty sure that this DNA";
+ mes "has been transformed by the mysterious substances of the bath.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "After much thought,";
+ mes "I concluded that this DNA probably belongs to";
+ mes "the unidentified creature that attacked me.";
+ next;
+ if (rand(2)) {
+ set .@str$,"teeth";
+ set .@quest,5021;
+ } else {
+ set .@str$,"scales";
+ set .@quest,5022;
+ }
+ mes "[Raffle Researcher]";
+ mes "I'd better compare the two.";
+ mes "Please return to the bath";
+ mes "and look for the creature's "+.@str$+".";
+ mes "If you can, please bring me 10 of them.";
+ set ep14_1_muk,9;
+ erasequest 5020;
+ setquest .@quest;
+ close;
+ } else if (ep14_1_muk == 9) {
+ if (checkquest(5021) > -1 || checkquest(5022) > -1) {
+ if (checkquest(5021) > -1) {
+ set .@quest,5021;
+ set .@item,6387; //Teeth_Sample
+ setarray .@str$[0],"tooth","teeth";
+ } else {
+ set .@quest,5022;
+ set .@item,6388; //Scale_Sample
+ setarray .@str$[0],"scale","scales";
+ }
+ if (countitem(.@item) < 10) {
+ mes "[Raffle Researcher]";
+ mes "Haven't you found the unidentified creature's "+.@str$[1]+" yet?";
+ mes "Look carefully!";
+ mes "I'm certain that the creature";
+ mes "dropped his "+.@str$[1]+" somewhere.";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "You've collected all the "+.@str$[0]+" samples, finally.";
+ mes "As humans say,";
+ mes "I've been waiting forever for them.";
+ next;
+ if (checkweight(6380,1) == 0) {
+ mes "[Raffle Researcher]";
+ mes "I know that you've done a lot...";
+ mes "but you are carrying too many things.";
+ mes "Even though I want to give you pocket money, I can't.";
+ mes "Could you lighten your load and come back?";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "OK, I'll get to work right away.";
+ mes "If you have any business to attend to, do so.";
+ mes "The DNA analysis takes about 6 hours.";
+ mes "Why don't you go for a walk";
+ mes "and come back then?";
+ delitem .@item,10;
+ getitem 6380,1; //Mora_Coin
+ erasequest .@quest;
+ setquest 5023;
+ close;
+ } else if (checkquest(5023,PLAYTIME) == 0 || checkquest(5023,PLAYTIME) == 1) {
+ mes "[Raffle Researcher]";
+ mes "I'm still analyzing the DNA.";
+ mes "The DNA analysis takes about 6 hours.";
+ mes "Why don't you go for a walk and come back then?";
+ close;
+ } else {
+ switch(rand(1,6)) {
+ case 1:
+ case 3:
+ set .@quest,5021;
+ set .@item,6387; //Teeth_Sample
+ setarray .@str$[0],"tooth","teeth";
+ break;
+ case 2:
+ case 4:
+ set .@quest,5022;
+ set .@item,6388; //Scale_Sample
+ setarray .@str$[0],"scale","scales";
+ break;
+ case 5:
+ case 6:
+ break;
+ }
+ if (.@quest) {
+ mes "[Raffle Researcher]";
+ mes "This is not it.";
+ mes "The samples that you collected belonged to a normal species.";
+ emotion e_swt2;
+ next;
+ mes "[Raffle Researcher]";
+ mes "Must be because so many species of creatures";
+ mes "have been in the bath.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I'm sorry, but please re-collect the samples.";
+ mes "This time, the "+.@str$[1]+"... Yes.";
+ mes "Please bring the "+.@str$[0]+" samples.";
+ erasequest 5023;
+ setquest .@quest;
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "Great! These samples are surely";
+ mes "from the mysterious creature.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "According to the analysis,";
+ mes "The DNA is a mutant form of fish DNA.";
+ mes "I'm not sure how long this creature";
+ mes "has lived in the bath,";
+ mes "but this DNA is 70% evolved";
+ mes "from the original fish DNA.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Where did this fish come from?";
+ mes "How can it survive in the warm bath water?";
+ mes "After the DNA analysis,";
+ mes "my head is filled with even more questions.";
+ next;
+ mes "... ... ... ... ...";
+ emotion e_dots;
+ emotion e_dots,1;
+ next;
+ mes "[Raffle Researcher]";
+ mes "The village elders say";
+ mes "that the bath water comes from";
+ mes "the puddles around the village.";
+ next;
+ callsub L_CheckWeight;
+ mes "[Raffle Researcher]";
+ mes "If you get me a sample from the puddle";
+ mes "to the east, at 2 o'clock from here,";
+ mes "I'll tell you what to do next.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "You probably don't need to run around";
+ mes "like you did collecting";
+ mes "the bath water samples.";
+ set ep14_1_muk,10;
+ getitem 1092,1; //Empty_Cylinder
+ erasequest 5023;
+ setquest 5024;
+ next;
+ mes "[Raffle Researcher]";
+ mes "If you get all 4 puddle samples at once";
+ mes "it may be more convenient. However,";
+ mes "there's the risk of samples being damaged or mixed up.";
+ mes "Therefore, I'm going to send you one place at a time. Good luck.";
+ close;
+ }
+ } else if (ep14_1_muk == 10) {
+ if (countitem(6389) == 0) {
+ mes "[Raffle Researcher]";
+ mes "You still haven't gone to collect the puddle sample?";
+ mes "Go to the puddle to the east of the village,";
+ mes "and collect a sample.";
+ mes "It's going to be at 2 o'clock from here.";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "You have the sample from the puddle to the east?";
+ mes "Great job, but it's no time to rest -";
+ mes "the research is almost done.";
+ next;
+ callsub L_CheckWeight;
+ mes "[Raffle Researcher]";
+ mes "Get me a sample from the puddle from the west.";
+ mes "It's not completely to the west...";
+ mes "The puddle should be at 7 o'clock";
+ mes "from the village.";
+ delitem 6389,1; //Puddle_R_Sample
+ set ep14_1_muk,11;
+ getitem 1092,1; //Empty_Cylinder
+ changequest 5024,5025;
+ next;
+ mes "[Raffle Researcher]";
+ mes "Take care not to damage the sample.";
+ mes "Good luck!";
+ close;
+ } else if (ep14_1_muk == 11) {
+ if (countitem(6389) == 0) {
+ mes "[Raffle Researcher]";
+ mes "You still haven't gone to collect the puddle sample?";
+ mes "Go to the puddle to the west of the village,";
+ mes "and collect a sample.";
+ mes "It's going to be at 7 o'clock from here.";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "You have the sample from the puddle to the west?";
+ mes "Great job, but it's no time to rest -";
+ mes "the research is almost done.";
+ next;
+ callsub L_CheckWeight;
+ mes "[Raffle Researcher]";
+ mes "Get me a sample from the puddle from the south.";
+ mes "The puddle to the south";
+ mes "should be... at 6 o'clock from here.";
+ delitem 6389,1; //Puddle_R_Sample
+ set ep14_1_muk,12;
+ getitem 1092,1; //Empty_Cylinder
+ changequest 5025,5026;
+ next;
+ mes "[Raffle Researcher]";
+ mes "I can't emphasize this enough, even if I did it 1000000000000000000000 times.";
+ mes "Please take care that";
+ mes "the sample is not damaged.";
+ close;
+ } else if (ep14_1_muk == 12) {
+ if (countitem(6389) == 0) {
+ mes "You still haven't gone to collect the puddle sample?";
+ mes "Get me a sample from the puddle from the south.";
+ mes "The puddle to the south is located";
+ mes "at 6 o'clock from here.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "You know what I'm going to say?";
+ mes "Be careful.";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "You have the sample from the puddle to the south?";
+ mes "Now only the puddle to the north";
+ mes "remains to be sampled.";
+ next;
+ callsub L_CheckWeight;
+ mes "[Raffle Researcher]";
+ mes "Please get me the sample from the puddle to the north.";
+ mes "It's not completely to the north.";
+ mes "it's at 11 o'clock from the village.";
+ delitem 6389,1; //Puddle_R_Sample
+ set ep14_1_muk,13;
+ getitem 1092,1; //Empty_Cylinder
+ changequest 5026,5027;
+ next;
+ mes "[Raffle Researcher]";
+ mes "You know what I'm going to say?";
+ mes "Be careful.";
+ close;
+ } else if (ep14_1_muk == 13) {
+ if (countitem(6389) == 0) {
+ mes "[Raffle Researcher]";
+ mes "You still haven't gone to collect the puddle sample?";
+ mes "Please get me a sample from the puddle to the north.";
+ mes "It's not exactly north of the village.";
+ mes "The puddle should be located at 11 o'clock";
+ mes "from the village.";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "You brought the last sample from the puddle from the north.";
+ mes "Great work. You've done really well.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Now, I'm going to do some research";
+ mes "with these samples,";
+ mes "looking at the relationship between";
+ mes "these puddles and the bath.";
+ next;
+ if (checkweight(6380,4) == 0) {
+ mes "[Raffle Researcher]";
+ mes "I know that you've done a lot...";
+ mes "but you are carrying too many things.";
+ mes "Even though I want to give you pocket money, I can't.";
+ mes "Could you lighten your load and come back?";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "If I finish this experiment...";
+ mes "There's probably nothing else to do. While I run the experiment,";
+ mes "why don't you go and entertain yourself?";
+ delitem 6389,1; //Puddle_R_Sample
+ set ep14_1_muk,14;
+ getitem 6380,4; //Mora_Coin
+ erasequest 5027;
+ setquest 5028;
+ next;
+ mes "[Raffle Researcher]";
+ mes "Comparison of the samples and the bath water";
+ mes "will take about 12 hours.";
+ close;
+ } else if (ep14_1_muk == 14) {
+ if (checkquest(5028,PLAYTIME) == 0 || checkquest(5028,PLAYTIME) == 1) {
+ mes "[Raffle Researcher]";
+ mes "What? You're here? Well...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "But the sample studies have not been finished.";
+ mes "This is an experiment for the final result,";
+ mes "so don't be too hasty.";
+ mes "I think the research will take about 12 hours.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Come back then.";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "You're here? Finally,";
+ mes "the experiment results are all in.";
+ mes "Do you want to look at the results?";
+ next;
+ switch(select("Actually, I don't want to.:Look at the results.")) {
+ case 1:
+ mes "[Raffle Researcher]";
+ mes "Good thinking. Actually, it may hurt";
+ mes "regular people's brains to look at it.";
+ mes "I suppose it's time for your reward";
+ mes "for helping me out so much.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Did I talk to you about the reward before the experiment?";
+ mes "That you won't be sorry that you helped out...";
+ next;
+ break;
+ case 2:
+ mes "[Raffle Researcher]";
+ mes "You're curious about the results? Really???";
+ mes "OK, here it is.";
+ next;
+ callsub L_ShowReport;
+ mes "[Raffle Researcher]";
+ mes "There are no volcanoes around the area";
+ mes "and no record of volcanoes in the past,";
+ mes "but the water temperature is that high...";
+ mes "Isn't it surprising?";
+ next;
+ mes "[Raffle Researcher]";
+ mes "The ingredients are... yes.";
+ mes "There are certainly substances that are beneficial for you humans.";
+ mes "But, there are also substances";
+ mes "that are fatal to us Raffles,";
+ mes "or other races.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "And if you look at the electric conductivity,";
+ mes "it is quite higher than that of the average water.";
+ mes "My theory is that";
+ mes "this must be the cause of the mysterious power.";
+ mes "That's what I'm thinking about.";
+ mes "Anyhow.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "There is something at work that science cannot explain";
+ mes "in the bath water...";
+ mes "Take the unidentified creature, for instance.";
+ mes "How strange is it that a fish can live";
+ mes "in such warm water?";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I'm not satisfied with the research results and conclusions.";
+ mes "I guess in the end,";
+ mes "it will remain a mystery...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I suppose it's time for your reward";
+ mes "for helping me out so much.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Did I talk to you about the reward before the experiment?";
+ mes "That you won't be sorry that you helped out...";
+ next;
+ break;
+ }
+ mes "[Raffle Researcher]";
+ mes "I was thinking about what you would want";
+ mes "for your reward... and I felt";
+ mes "a little... sad.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "... ... ... ...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "During our short time here together working on these projects,";
+ mes "I sent you all over the place.";
+ mes "It must've been hard, but you didn't complain at all.";
+ mes "And unlike some of the other guys I've had,";
+ mes "you never skipped work.";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I suppose I've grown fond of you,";
+ mes "so that it saddens me to say goodbye...";
+ next;
+ mes "[Raffle Researcher]";
+ mes "But thank you anyhow. I've been researching for a while,";
+ mes "but I've never met such an excellent research assistant as you.";
+ next;
+ if (MaxWeight - Weight < 100 || checkweight(1092,1) == 0) {
+ mes "[Raffle Researcher]";
+ mes "Hmm? By the way...";
+ mes "You are carrying too much weight.";
+ mes "Could it be because you are also sad";
+ mes "about parting ways?";
+ next;
+ mes "[Raffle Researcher]";
+ mes "With this weight, I can't give you a reward!";
+ close;
+ }
+ mes "[Raffle Researcher]";
+ mes "The best research assistant in my life...";
+ mes "is you, "+strcharinfo(0)+"!!!";
+ set ep14_1_muk,15;
+ completequest 5028;
+ getexp 1000000,4000000;
+ getitem 6380,30; //Mora_Coin
+ next;
+ mes "[Raffle Researcher]";
+ mes "If we happen to run into each other again,";
+ mes "let's work on a research project once more.";
+ close;
+ } else if (ep14_1_muk == 15) {
+ mes "[Raffle Researcher]";
+ mes "Hmm? No?... What are you doing here?";
+ next;
+ mes "[Raffle Researcher]";
+ mes "Could it be that you suddenly want to look at";
+ mes "the research report???";
+ next;
+ switch(select("Look at the report.:I came to say hello.")) {
+ case 1:
+ mes "[Raffle Researcher]";
+ mes "Haven't I shown it to you before?";
+ next;
+ mes "[Raffle Researcher]";
+ mes "... ... ... ...";
+ emotion e_dots;
+ next;
+ mes "[Raffle Researcher]";
+ mes "Maybe I haven't shown you.";
+ mes "Sorry about that. So you wanted to see it so badly";
+ mes "that you came back to see me?";
+ mes "Great! Here it is.";
+ next;
+ while(1) {
+ callsub L_ShowReport;
+ mes "[Raffle Researcher]";
+ mes "This concludes the report of";
+ mes "Mora Village's mysterious bath.";
+ mes "You want to look again?";
+ emotion e_what;
+ next;
+ switch(select("Look again.:Don't look again.")) {
+ case 1:
+ mes "[Raffle Researcher]";
+ mes "Sure... As you wish!!";
+ next;
+ break;
+ case 2:
+ mes "[Raffle Researcher]";
+ mes "Goodbye. Come by any time,";
+ mes "if you want to look at the results again.";
+ mes "You're always welcome here.";
+ close;
+ }
+ }
+ case 2:
+ mes "[Raffle Researcher]";
+ mes "Oh, You came to say hi. I see.";
+ mes "Long time no see, "+strcharinfo(0)+".";
+ next;
+ mes "[Raffle Researcher]";
+ mes "I've been telling you that I lucked out in picking you as my research assistant.";
+ mes "Come by any time,";
+ mes "if you want to look at the results again.";
+ mes "You're always welcome here.";
+ close;
+ }
+ } else {
+ mes "[Raffle Researcher]";
+ mes "Hmm? I'm Researcher Inffle.";
+ mes "Who are you?";
+ close;
+ }
+ end;
+L_ShowReport:
+ mes "[Experimental Results]";
+ mes "*** Researcher - Inffle";
+ mes "*** Research Assistant - "+strcharinfo(0);
+ mes "¡¡";
+ mes "<Research topic>";
+ mes "*** Bath of Mora Village";
+ mes "¡¡";
+ mes "<Aim>";
+ mes "To investigate the mysterious power of the bath water";
+ mes "and to find out ways to better utilize";
+ mes "the water.";
+ mes "¡¡";
+ mes "<Methods>";
+ mes "1. Obtained an unidentified DNA sample.";
+ mes "Obtained a sample of an unidentified DNA,";
+ mes "and collected more samples to look further into it.";
+ mes "¡¡";
+ mes "2. A comparison analysis on the unidentified DNA";
+ mes "Concluded that the DNA belongs to";
+ mes "an unidentified creature living in the bath water.";
+ mes "combine and result in";
+ mes "from the swordfish DNA.";
+ mes "¡¡";
+ mes "3. Research on the puddles around the village";
+ mes "From the four puddles around the village,";
+ mes "confirmed that the testing substances were";
+ mes "distributed evenly across the puddles.";
+ mes "It is thought that the four puddles";
+ mes "combine and result in";
+ mes "the mysterious power.";
+ mes "¡¡";
+ mes "<Material analysis>";
+ mes "*** Temperature ***** 33.5° ";
+ mes "*** PH ************ 9.8";
+ mes "*** Solid residues *** 176";
+ mes "*** K+ ************ 0,23";
+ mes "*** Ca++ ********** 1.83";
+ mes "*** Cl- *********** 26.2";
+ mes "*** HCO3- ********* 31.0";
+ mes "*** H2S *********** 1.7";
+ mes "*** Na++ ********** 51.9";
+ mes "*** Mg+ *********** 0.03";
+ mes "*** SO4- ********** 5.0";
+ mes "*** F ************* 12.8";
+ mes "*** SiO2 ********** 23.9";
+ mes "*** Li ************ 0.06";
+ mes "*** CO3+ ********** 22.8";
+ mes "*** Sr ************ 0.04";
+ mes "*** Ge ************ 0.004";
+ mes "*** T-solids ****** 165";
+ mes "*** Electric conductivity **** 500";
+ mes "*** Longitude ********** 4.6";
+ next;
+ return;
+L_CheckWeight:
+ if (MaxWeight - Weight < 100 || checkweight(1092,1) == 0) {
+ mes "[Raffle Researcher]";
+ mes "You are carrying too much weight.";
+ mes "I can't give you the sample tube.";
+ mes "Why don't you lighten your load and come back?";
+ close;
+ }
+ return;
+}
+
+mora,114,79,0 script Black Shadow#ep14_muk 844,{
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 500) {
+ mes "^FF0000- Warning message -";
+ mes "- Hang on there!! -";
+ mes "- You have too many items -";
+ mes "- to receive any more items. -";
+ mes "- Please lighten your load -";
+ mes "- and try again. -^000000";
+ close;
+ }
+ if (BaseLevel < 100) {
+ mes "Something looks at you from head to toe, and disappears, mocking you.";
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ }
+ set .@playtime, checkquest(5029,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "You see a dark hole. As you show interest, something disappears quickly into the dark hole.";
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ } else if (.@playtime == 2)
+ erasequest 5029;
+ if (ep14_1_goki == 30) {
+ if (checkquest(5030) == -1 && checkquest(5031) == -1 && checkquest(5032) == -1 && checkquest(5033) == -1 && checkquest(5034) == -1) {
+ mes "[Unidentified creature]";
+ mes "Arrgghh!!!";
+ mes "Why you bother me.";
+ mes "You stop bullying me.";
+ next;
+ if(select("Bully anyway.:I'll stop.") == 1) {
+ emotion e_sob;
+ set ep14_1_goki,0;
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ }
+ mes "[Unidentified creature]";
+ mes "You... Good.";
+ mes "Everybody calls me monster.";
+ mes "Hit me. Bully. Me tired.";
+ next;
+ mes "[Fishee]";
+ mes "My name Fishee.";
+ mes "Dad name me.";
+ next;
+ mes "... ... ... ... ...";
+ next;
+ mes "He appears to be rambling.";
+ next;
+ mes "[Fishee]";
+ mes "Bully. Fun. Every day.";
+ mes "I talk. Still bully.";
+ next;
+ mes "[Fishee]";
+ mes "You... Good. Help Fishee?";
+ next;
+ if(select("Don't help.:Help.") == 1) {
+ emotion e_sob;
+ set ep14_1_goki,0;
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ }
+ mes "[Fishee]";
+ mes "You good. Good!";
+ next;
+ mes "[Fishee]";
+ mes "Me didn't live here.";
+ mes "Me lived puddle.";
+ mes "Puddle. Live there.";
+ next;
+ mes "[Fishee]";
+ mes "Me sleep weird.";
+ mes "Wake up one day.";
+ mes "Here, bath.";
+ next;
+ mes "[Fishee]";
+ mes "Don't know how go home.";
+ mes "Me just live here.";
+ mes "Grow big. Hole small.";
+ mes "Can't get in.";
+ next;
+ mes "[Fishee]";
+ mes "Me miss family. Me want to see family.";
+ mes "You good. How my family do.";
+ mes "Bring me. Good.";
+ next;
+ select("How would I know who is your family?");
+ mes "[Fishee]";
+ mes "Us fish stupid.";
+ mes "Stupid. But know family name.";
+ next;
+ mes "[Fishee]";
+ mes "Family know name Fishee. Family come.";
+ next;
+ mes "[Fishee]";
+ mes "Please. In puddle.";
+ mes "You tell me my family do okay.";
+ setquest 5030+rand(4); //5030,5031,5032,5033
+ close;
+ } else if (checkquest(5030) > -1 || checkquest(5031) > -1 || checkquest(5032) > -1 || checkquest(5033) > -1) {
+ mes "[Fishee]";
+ mes "Please. In puddle.";
+ mes "You tell me my family do okay.";
+ next;
+ mes "[Fishee]";
+ mes "You forgot me name?";
+ next;
+ if(select("Please tell me your name again!:I know your name.") == 1) {
+ mes "[Fishee]";
+ mes "Your memory, like fish.";
+ mes "Stupid. I talk.";
+ mes "My name Fishee, Fishee!!";
+ next;
+ }
+ mes "[Fishee]";
+ mes "Please. In puddle.";
+ mes "You tell me my family do okay.";
+ close;
+ } else if (checkquest(5034) > -1 && checkquest(5034) < 2) {
+ if (MaxWeight - Weight < 100 || checkweight(5792,1) == 0) {
+ mes "[Fishee]";
+ mes "You have lots.";
+ mes "I give. To you.";
+ mes "Empty bag. Come back.";
+ close;
+ }
+ mes "[Fishee]";
+ mes "You told me my family ok. Thank you.";
+ mes "I know thank you. Fish.";
+ mes "Re... Don't know word.";
+ next;
+ select("Perhaps... Reward??");
+ mes "[Fishee]";
+ mes "Yes. That. You good.";
+ mes "Smart. Give you reward.";
+ mes "I know thank you. Fish.";
+ next;
+ mes "[Fishee]";
+ mes "This, I got from bath.";
+ mes "No. Someone left it.";
+ mes "... ... Good guy. I give you.";
+ completequest 5034;
+ getitem 5792,1; //Fish_Pin
+ close;
+ } else if (checkquest(5034) == 2) {
+ mes "[Fishee]";
+ mes "You... I saw. Feeling. I saw. Feeling.";
+ mes "You... Name?";
+ next;
+ input .@inputstr$;
+ mes "[Fishee]";
+ mes .@inputstr$+" do.";
+ mes "No know. No remember..";
+ mes "Who.. you... are?";
+ close;
+ }
+ }
+ set .@weapon$, ((getequipisequiped(EQI_HAND_R))?getequipname(EQI_HAND_R):"Bare handed");
+ set .@pc_hp, 200;
+ set .@npc_hp, 200;
+ setarray .@skills$[0],"Midsection punch","Headbutt","Wiggle wiggle","Screw punch","Mumble muble";
+ mes "The unidentified creature is attacking. What will you do?";
+ next;
+ while(1) {
+ switch(select("Attack with a weapon.:Attack using a skill.:Attack using teeth.:Run away in fear.")) {
+ case 1: // Weapon
+ set .@p_damage,10;
+ set .@pc_attack, rand(1,10);
+ mes "["+strcharinfo(0)+"'s Attack]";
+ switch(.@pc_attack) {
+ // Miss.
+ case 3:
+ mes "You attempt to attack with your recent expensive purchase ^FF0000["+.@weapon$+"]^000000, but the unidentified creature rapidly dodged.";
+ break;
+ case 6:
+ mes "By mistake, you use ^FF0000["+.@weapon$+"]^000000 that Holgren has thrown your way to attack the unidentified creature, but the creature foresaw the attack and dodged.";
+ break;
+ case 9:
+ mes "You use your precious ^FF0000[+"+.@weapon$+"+]^000000 to attack the unidentified creature, but the creature pulled back and dodged your attack.";
+ break;
+ // Hit.
+ default:
+ specialeffect EF_HIT1;
+ set .@npc_hp, .@npc_hp - .@p_damage;
+ switch(.@pc_attack) {
+ case 1: set .@str$,"With your precious ^FF0000["+.@weapon$+"]^000000, you attacked the unidentified creature. The weapon pierced the creature's body."; break;
+ case 2: set .@str$,"By mistake, you use ^FF0000["+.@weapon$+"]^000000 that Holgren has thrown your way to attack the unidentified creature. With a thud, the unidentified creature's body is swaying."; break;
+ case 4: set .@str$,"You attempt to attack with your recent expensive purchase ^FF0000["+.@weapon$+"]^000000. You hit the unidentified creature's body with a thud."; break;
+ case 5: set .@str$,"You use a borrowed ^FF0000["+.@weapon$+"]^000000 to attack the unidentified creature, but the weapon slipped. But the weapon flies off and pierces the creature's body."; break;
+ case 7: set .@str$,"With your precious ^FF0000["+.@weapon$+"]^000000, you attacked the unidentified creature. It was as if the weapon was part of your body."; break;
+ case 8: set .@str$,"You use your lucky ^FF0000["+.@weapon$+"]^000000 to attack the unidentified creature."; break;
+ case 10: set .@str$,"You use a friend's ^FF0000["+.@weapon$+"]^000000 to attack the unidentified creature."; break;
+ }
+ mes .@str$+" ^FF0000["+.@p_damage+"]^000000 damage inflicted.";
+ break;
+ }
+ next;
+ break;
+ case 2: // Skill
+ set .@p_damage,20;
+ set .@pc_attack, rand(1,6);
+ set .@skillname$, .@skills$[rand(5)];
+ mes "["+strcharinfo(0)+"'s Attack]";
+ switch(.@pc_attack) {
+ // Miss.
+ case 2:
+ mes "You use skill ^0000FF["+.@skillname$+"]^000000 but you couldn't concentrate, and failed to use the skill properly.";
+ break;
+ case 4:
+ mes "You use skill ^0000FF["+.@skillname$+"]^000000 with all your might, but the unidentified creature dodged lightly and mocked you.";
+ break;
+ case 6:
+ mes "You use skill ^0000FF["+.@skillname$+"]^000000 to attack the creature, but he got out of sight and you failed to use the skill.";
+ break;
+ // Hit.
+ default:
+ specialeffect EF_BASH;
+ set .@npc_hp, .@npc_hp - .@p_damage;
+ switch(.@pc_attack) {
+ case 1: set .@str$, "With an attack so fast and furious, the creature is too stunned to move."; break;
+ case 3: set .@str$, "The creature dodged, but you foresaw his movements and targeted accurately."; break;
+ case 5: set .@str$, "Your skill flew in a perfect parabola and hit the creature exactly."; break;
+ }
+ mes "You use skill ^0000FF["+.@skillname$+"]^000000 to attack the unidentified creature. "+.@str$+" ^FF0000["+.@p_damage+"]^000000 damage inflicted.";
+ break;
+ }
+ next;
+ break;
+ case 3: // Tooth
+ set .@p_damage,50;
+ set .@pc_attack, rand(1,10);
+ mes "["+strcharinfo(0)+"'s Attack]";
+ if (.@pc_attack == 4 || .@pc_attack == 7) {
+ specialeffect EF_HIT1;
+ set .@npc_hp, .@npc_hp - .@p_damage;
+ mes "You use your well-groomed teeth to bite the unidentified creature hard until your teeth sink into its flesh. ^FF0000["+.@p_damage+"]^000000 damage inflicted.";
+ } else
+ mes "You use your steel-like teeth to bite the unidentified creature, but the frightened creature dodged. He stares at you with strange eyes.";
+ next;
+ break;
+ case 4: // Run
+ mes "You get scared of the unidentified creature, and attempt to run.";
+ next;
+ mes "["+strcharinfo(0)+"'s Escape]";
+ if (rand(1,2) == 1) {
+ mes "Fortunately, the unidentified creature did not come after you.";
+ close;
+ } else {
+ mes "When you attempt to run away, the unidentified creature sees you and attacks. You fail to escape.";
+ next;
+ specialeffect2 EF_HIT1;
+ mes "The creature slams you with its tail. It's so painful that a tear rolls out of your eyes. ^FF000010^000000 damaged received.";
+ set .@pc_hp, .@pc_hp - 10;
+ next;
+ // Unofficial check, but it's needed here.
+ callsub L_CheckPCAlive, .@pc_hp;
+ }
+ break;
+ }
+ if (.@npc_hp <= 0) {
+ mes "You won. The unidentified creature is unconscious.";
+ next;
+ if (checkquest(5016) > -1 && countitem(6385) == 0) {
+ mes "What will you do?";
+ next;
+ select("Look for the research tools.");
+ if (checkweight(6385,1) == 0) {
+ mes "You attempted to look for the research tools,";
+ mes "but you are carrying too many things.";
+ mes "You'd better lighten your load";
+ mes "and come back.";
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ }
+ mes "Found Researcher Raffle's ^0000FF Research tool ^000000.";
+ set ep14_1_goki, ep14_1_goki+1;
+ getitem 6385,1; //Research_Tool_Bag
+ setquest 5029;
+ next;
+ mes "The creature wakes up and disappears into the dark hole.";
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ } else if (checkquest(5017) > -1) {
+ mes "How will you bully the creature?";
+ next;
+ input .@inputstr$;
+ mes "You do ^0000FF"+.@inputstr$+"^000000 to bully the unidentified creature.";
+ next;
+ setquest 5029;
+ switch(ep14_1_muk) {
+ case 3:
+ mes "You bully the unidentified creature. This is kind of fun.";
+ break;
+ case 4:
+ mes "You bully the unidentified creature for the second time. It's definitely entertaining.";
+ break;
+ case 5:
+ mes "You bully the unidentified creature for the third time. It's fun, but now it is time to stop.";
+ changequest 5017,5018;
+ break;
+ }
+ set ep14_1_muk, ep14_1_muk+1;
+ set ep14_1_goki, ep14_1_goki+1;
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ } else {
+ mes "What will you do?";
+ next;
+ if(select("Check the body of the unidentified creature.:Leave.") == 2) {
+ setquest 5029;
+ set ep14_1_goki, ep14_1_goki+1;
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ }
+ if (rand(1,30) == 7) {
+ if (checkweight(6380,1) == 0) {
+ mes "While you were checking the body of the unidentified creature, your fingers touch something. You got lucky, but due to your heavy load you failed to obtain a ^0000FF Mora Coin^000000.";
+ set ep14_1_goki, ep14_1_goki+1;
+ setquest 5029;
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ }
+ mes "While you were checking the body of the unidentified creature, your fingers touch something. Lucky. Obtained a ^0000FF Mora Coin^000000.";
+ set ep14_1_goki, ep14_1_goki+1;
+ getitem 6380,1; //Mora_Coin
+ setquest 5029;
+ next;
+ mes "The creature wakes up and disappears into the dark hole.";
+ } else {
+ mes "As soon as you touch the creature's body, it wakes up and disappears into the dark hole.";
+ set ep14_1_goki, ep14_1_goki+1;
+ setquest 5029;
+ }
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ end;
+ }
+ }
+ mes "[ Current Progress ]";
+ mes strcharinfo(0)+" HP = "+.@pc_hp;
+ mes "Unidentified Creature HP = "+.@npc_hp;
+ next;
+ mes "[Attack of the unidentified creature]";
+ set .@npc_attack, rand(1,3);
+ switch(.@npc_attack) {
+ case 1:
+ set .@n_damage,10;
+ mes "The unidentified creature shoots a stream of bath water.";
+ break;
+ case 2:
+ set .@n_damage,20;
+ mes "The unidentified creature dashes at you with great speed. It appears to be attempting a headbutt.";
+ break;
+ case 3:
+ set .@n_damage,50;
+ mes "The unidentified creature runs at you with its teeth bared. It appears to be attempting to bite.";
+ break;
+ }
+ next;
+ mes "What will you do?";
+ next;
+ switch(select("... ... ...:Dodge.:Block.:It's too much. Run away.")) {
+ case 1:
+ switch(.@npc_attack) {
+ case 1:
+ specialeffect2 EF_ICEARROW;
+ mes "You stand still. The stream of water hits your face squarely. Your mind is clear in an instant. ^FF0000["+.@n_damage+"]^000000 damage received.";
+ break;
+ case 2:
+ specialeffect2 EF_BASH;
+ mes "You stand still. The creature headbutts you squarely. Your mind is clear in an instant. ^FF0000["+.@n_damage+"]^000000 damage received.";
+ break;
+ case 3:
+ specialeffect2 EF_HIT1;
+ mes "You stand still. While you were standing stupidly, the creature comes near and bites you mercilessly. Your mind is clear in an instant. ^FF0000["+.@n_damage+"]^000000 damage received.";
+ break;
+ }
+ set .@pc_hp, .@pc_hp - .@n_damage;
+ next;
+ break;
+ case 2:
+ switch(.@npc_attack) {
+ case 1:
+ set .@miss, rand(1,5);
+ mes "[Attack of the unidentified creature]";
+ switch(.@miss) {
+ // Miss.
+ case 1:
+ mes "The unidentified creature shoots a stream of water at you, but you dodge it easily by tilting your body.";
+ break;
+ case 3:
+ mes "The unidentified creature shoots a stream of water at you, but you dodge it while picking your nose.";
+ break;
+ // Hit.
+ default:
+ specialeffect2 EF_ICEARROW;
+ set .@pc_hp, .@pc_hp - .@n_damage;
+ switch(.@miss) {
+ case 2: set .@str$,"face"; break;
+ case 4: set .@str$,"stomach"; break;
+ case 5: set .@str$,"arm"; break;
+ }
+ mes "The stream of water hits your "+.@str$+" squarely. ^FF0000["+.@n_damage+"]^000000 damage received.";
+ break;
+ }
+ next;
+ break;
+ case 2:
+ set .@miss, rand(1,10);
+ mes "[Attack of the unidentified creature]";
+ switch(.@miss) {
+ // Miss.
+ case 1:
+ mes "The unidentified creature dashes at you attempting a headbutt, but you are not the one to succumb to such an attack.";
+ break;
+ case 3:
+ mes "The unidentified creature dashes at you attempting a headbutt, but you move slightly to dodge the attack.";
+ break;
+ case 5:
+ mes "The unidentified creature dashes at you attempting a headbutt, but you dodge the attack while picking your nose.";
+ break;
+ case 7:
+ mes "The unidentified creature dashes at you attempting a headbutt, but you dodge the attack easily.";
+ break;
+ // Hit.
+ default:
+ specialeffect2 EF_BASH;
+ set .@pc_hp, .@pc_hp - .@n_damage;
+ switch(.@miss) {
+ case 2: set .@str$,"With a thud, you can feel intense pain."; break;
+ case 4: set .@str$,"*thud* Your back seems to give way."; break;
+ case 6: set .@str$,"The creature's attack hits you in the shoulder."; break;
+ case 8: set .@str$,"The attack is like an arrow."; break;
+ case 9: set .@str$,"The attack was fast and accurate."; break;
+ case 10: set .@str$,"It hits your hand with a thud."; break;
+ }
+ mes "The unidentified creature dashes at you and headbutts. "+.@str$+" ^FF0000["+.@n_damage+"]^000000 damage received.";
+ break;
+ }
+ next;
+ break;
+ case 3:
+ set .@miss, rand(1,10);
+ mes "[Attack of the unidentified creature]";
+ switch(.@miss) {
+ // Miss.
+ case 1:
+ mes "The unidentified creature runs at you with its teeth bared, but you dodge the attack sneering.";
+ break;
+ case 3:
+ mes "The unidentified creature runs at you with its teeth bared, but you dodge the attack by moving slightly.";
+ break;
+ case 5:
+ mes "The unidentified creature runs at you with its teeth bared, but you dodge the attack while stretching.";
+ break;
+ case 7:
+ mes "The unidentified creature runs at you with its teeth bared, but you dodge the attack while counting Zenies.";
+ break;
+ case 8:
+ mes "The unidentified creature runs at you with its teeth bared, but you dodge the attack lightly.";
+ break;
+ case 9:
+ mes "The unidentified creature runs at you with its teeth bared, but you dodge the attack sneering.";
+ break;
+ // Hit.
+ default:
+ specialeffect2 EF_HIT1;
+ set .@pc_hp, .@pc_hp - .@n_damage;
+ switch(.@miss) {
+ case 2: set .@str$,"leg. Its sharp teeth penetrate your legs."; break;
+ case 4: set .@str$,"arm. Its sharp teeth penetrate your arm."; break;
+ case 6: set .@str$,"toe. You feel like your toe is being cut off."; break;
+ case 10: set .@str$,"finger. You feel like your finger is being cut off."; break;
+ }
+ mes "The unidentified creature runs at you with its teeth bared, and bites your "+.@str$+" ^FF0000["+.@n_damage+"]^000000 damage received.";
+ break;
+ }
+ next;
+ break;
+ }
+ break;
+ case 3:
+ set .@defend, rand(1,10);
+ switch(.@npc_attack) {
+ case 1:
+ if (.@defend == 3 || .@defend == 6) {
+ set .@n_damage, .@n_damage / 2;
+ specialeffect2 EF_GUARD;
+ } else
+ specialeffect2 EF_ICEARROW;
+ set .@pc_hp, .@pc_hp - .@n_damage;
+ mes "[Defense of "+strcharinfo(0)+"]";
+ switch(.@defend) {
+ // Blocked.
+ case 3: set .@str$,"You block the stream of water with your strong butt. Feels refreshing. HP reduced only by half."; break;
+ case 6: set .@str$,"You block the stream of water with your strong hands. Your hands sting a little. HP reduced only by half."; break;
+ // Not blocked.
+ case 1: set .@str$,"You try to block the stream of water with your strong butt, but it's too late."; break;
+ case 2: set .@str$,"You try to block the stream of water with your big gut, but to no avail."; break;
+ case 4: set .@str$,"You try to block the stream of water with your gathered hands, but the creature targets a different place."; break;
+ case 5: set .@str$,"You try to block the stream of water with your strong hands, but you fail."; break;
+ case 7: set .@str$,"You try to block the stream of water with arms crossed, but you fold them wrong."; break;
+ case 8: set .@str$,"You try to block the stream of water with your rock-like head, but it was not possible."; break;
+ case 9: set .@str$,"You try to block the stream of water with your solid muscles, but it was not possible."; break;
+ case 10: set .@str$,"You try to block the stream of water with your strong feet, but your effort was wasted."; break;
+ }
+ mes .@str$+" ^FF0000["+.@n_damage+"]^000000 damage received.";
+ next;
+ break;
+ case 2:
+ if (.@defend == 1 || .@defend == 3 || .@defend == 5 || .@defend == 7) {
+ set .@n_damage, .@n_damage / 2;
+ specialeffect2 EF_GUARD;
+ } else
+ specialeffect2 EF_BASH;
+ set .@pc_hp, .@pc_hp - .@n_damage;
+ mes "[Defense of "+strcharinfo(0)+"]";
+ switch(.@defend) {
+ // Blocked.
+ case 1: set .@str$,"You block the dash attack with your fat butt. Your butt is world class. HP reduced only by half."; break;
+ case 3: set .@str$,"You block the dash attack with your big gut. Your gut is world class. HP reduced only by half."; break;
+ case 5: set .@str$,"You block the dash attack with your strong hands. Your hands are world class. HP reduced only by half."; break;
+ case 7: set .@str$,"The unidentified creature dashed with lightning speed, but you easily block the attack with your big gut. Your gut is world class. HP reduced only by half."; break;
+ // Not blocked.
+ case 2: set .@str$,"You try to block the dash attack with your fat butt, but miss and get hit in an unmentionable place."; break;
+ case 4: set .@str$,"You try to block the dash attack with your big gut, but your gut isn't big enough to absorb the impact."; break;
+ case 6: set .@str$,"You try to block the dash attack with arms crossed, but you feel an incredible force."; break;
+ case 8: set .@str$,"You try to block the dash attack, to no avail."; break;
+ case 9: set .@str$,"You try to block the dash attack with your strong hands, to no avail."; break;
+ case 10: set .@str$,"You try to block the dash attack with your durable feet, but the pain woke you up."; break;
+ }
+ mes .@str$+" ^FF0000["+.@n_damage+"]^000000 damage received.";
+ next;
+ break;
+ case 3:
+ if (.@defend == 2 || .@defend == 4 || .@defend == 6 || .@defend == 8) {
+ set .@n_damage, .@n_damage / 2;
+ specialeffect2 EF_GUARD;
+ }
+ set .@pc_hp, .@pc_hp - .@n_damage;
+ mes "[Defense of "+strcharinfo(0)+"]";
+ switch(.@defend) {
+ // Blocked.
+ case 2: set .@str$,"but you block its attack with a branch nearby. HP reduced only by half."; break;
+ case 4: set .@str$,"but you block its attack with a weapon. HP reduced only by half."; break;
+ case 6: set .@str$,"but you block its attack using skill ^0000FFFriend Shield^000000. HP reduced only by half."; break;
+ case 8: set .@str$,"but you block its attack using a book you always carry around. HP reduced only by half."; break;
+ // Not blocked.
+ case 1: set .@str$,"and bites your arm."; break;
+ case 3: set .@str$,"and bites your leg."; break;
+ case 5: set .@str$,"and bites your shoulder."; break;
+ case 7: set .@str$,"and bites your finger."; break;
+ case 9: set .@str$,"and bites your finger."; break;
+ case 10: set .@str$,"and bites your toe."; break;
+ }
+ mes "The unidentified creature runs at you with its teeth bared, "+.@str$+" ^FF0000["+.@n_damage+"]^000000 damage received.";
+ next;
+ break;
+ }
+ break;
+ case 4:
+ mes "You get scared of the unidentified creature, and attempt to run.";
+ next;
+ mes "["+strcharinfo(0)+"'s Escape]";
+ if (rand(1,2) == 1) {
+ mes "Fortunately ^BF2C15Unidentified creature^000000";
+ mes "did not come after you.";
+ close;
+ } else {
+ mes "When you attempt to run away, the unidentified creature sees you and attacks.";
+ mes "You fail to escape.";
+ next;
+ mes "The creature slams you with its tail. It's so painful that a tear rolls out of your eyes. ^FF000010^000000 damaged received.";
+ set .@pc_hp, .@pc_hp - 10;
+ next;
+ }
+ break;
+ }
+ callsub L_CheckPCAlive, .@pc_hp;
+ mes "[ Current Progress ]";
+ mes strcharinfo(0)+" HP = "+.@pc_hp;
+ mes "Unidentified Creature HP = "+.@npc_hp;
+ next;
+ }
+ end;
+L_CheckPCAlive:
+ if (getarg(0) <= 0) {
+ mes "You lost to the unidentified creature. Your mind goes blank and you faint.";
+ next;
+ mes "You leave the bath with somebody's help.";
+ percentheal -99,0;
+ donpcevent "Black Shadow#ep14_muk::OnDisable";
+ warp "mora",31,132;
+ end;
+ }
+ return;
+OnInit:
+ disablenpc "Black Shadow#ep14_muk";
+ end;
+OnEnable:
+ enablenpc "Black Shadow#ep14_muk";
+ disablenpc "???#ep14_muk01";
+ disablenpc "???#ep14_muk02";
+ disablenpc "???#ep14_muk03";
+ disablenpc "???#ep14_muk04";
+ disablenpc "???#ep14_muk05";
+ end;
+OnDisable:
+ disablenpc "Black Shadow#ep14_muk";
+ donpcevent "Black Shadow#ep14_muk::OnFullon";
+ mapannounce "mora","You can now use the mysterious power of bath water.",bc_map,"0xFFFF00"; //FW_NORMAL 12 0 0
+ end;
+OnFullon:
+ donpcevent "???#ep14_muk01::OnReset";
+ donpcevent "???#ep14_muk02::OnReset";
+ donpcevent "???#ep14_muk03::OnReset";
+ donpcevent "???#ep14_muk04::OnReset";
+ donpcevent "???#ep14_muk05::OnReset";
+ end;
+}
+
+- script ???#mora -1,{
+ if (checkquest(5019) > -1) {
+ mes "You find an area emitting a distinct aura.";
+ mes "You may be able to collect bath water samples.";
+ mes "What will you do?";
+ next;
+ if(select("Collect samples.:Leave.") == 2) {
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ end;
+ }
+ if (countitem(6386) >= 10) {
+ mes "You will not need additional samples.";
+ close2;
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ end;
+ }
+ if (countitem(1092) == 0) {
+ mes "To obtain a sample, you need a sample tube.";
+ close2;
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ end;
+ }
+ mes "Collecting samples.";
+ next;
+ progressbar "ffff00",3;
+ if (!rand(3)) {
+ if (checkweight(6386,1) == 0) {
+ mes "You have so many items";
+ mes "that it is difficult to collect samples.";
+ mes "You will have to lighten your load and come back.";
+ close2;
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ end;
+ }
+ mes "Bath water sample collection complete.";
+ delitem 1092,1; //Empty_Cylinder
+ getitem 6386,1; //Bathtub_R_Sample
+ } else {
+ mes "Bath water sample collection failed.";
+ percentheal 5,5;
+ }
+ close2;
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ end;
+ } else if (checkquest(5021) > -1 || checkquest(5022) > -1) {
+ if (checkquest(5021) > -1) {
+ set .@str$,"tooth";
+ set .@item,6387; //Teeth_Sample
+ } else {
+ set .@str$,"scale";
+ set .@item,6388; //Scale_Sample
+ }
+ mes "Something is shining in the water.";
+ mes "You may be able to collect the unidentified creature's "+.@str$+" samples.";
+ mes "What do you want to do?";
+ next;
+ if(select("Look further.:Leave.") == 2) {
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ end;
+ }
+ if (countitem(.@item) >= 10) {
+ mes "You will not need additional samples.";
+ close2;
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ end;
+ }
+ progressbar "ffff00",3;
+ if (!rand(3)) {
+ if (checkweight(.@item,1) == 0) {
+ mes "You have so many items";
+ mes "that it is difficult to collect samples.";
+ mes "You will have to lighten your load and come back.";
+ close;
+ }
+ mes "Obtained a "+.@str$+" sample";
+ mes "of the unidentified creature.";
+ getitem .@item,1;
+ } else
+ mes "You thought you saw it on the ground, but it was an illusion.";
+ close2;
+ donpcevent strnpcinfo(0)+"::OnDisable";
+ end;
+ } else {
+ mes "???";
+ next;
+ select("???");
+ mes "???";
+ close;
+ }
+ end;
+OnEnable:
+ enablenpc strnpcinfo(0);
+ stopnpctimer;
+ end;
+OnDisable:
+ disablenpc strnpcinfo(0);
+ initnpctimer;
+ end;
+OnReset:
+ if (rand(2))
+ donpcevent strnpcinfo(0)+"::OnEnable";
+ else
+ initnpctimer;
+ end;
+OnTimer10000:
+OnTimer20000:
+OnTimer30000:
+OnTimer40000:
+OnTimer50000:
+ if (rand(2))
+ donpcevent strnpcinfo(0)+"::OnEnable";
+ end;
+OnTimer60000:
+ donpcevent strnpcinfo(0)+"::OnEnable";
+ end;
+OnTouch:
+ if (checkquest(5034) == 2 || ep14_1_muk == 0 || rand(5)) {
+ percentheal 5,5;
+ end;
+ }
+ set .@playtime, checkquest(5029,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ percentheal 5,5;
+ end;
+ } else if (.@playtime == 2) {
+ erasequest 5029;
+ end;
+ } else {
+ mapannounce "mora","You can no longer use the mysterious power of the bath water.",bc_map,"0xFFFF00"; //FW_NORMAL 12 0 0
+ mes "^FF0000Something appeared.^000000";
+ mes "^FFFF00You cannot use the mysterious power of the bath water.^000000";
+ close2;
+ donpcevent "Black Shadow#ep14_muk::OnEnable";
+ end;
+ }
+}
+mora,108,86,0 duplicate(???#mora) ???#ep14_muk01 844,2,2
+mora,107,82,0 duplicate(???#mora) ???#ep14_muk02 844,2,2
+mora,113,84,0 duplicate(???#mora) ???#ep14_muk03 844,2,2
+mora,116,81,0 duplicate(???#mora) ???#ep14_muk04 844,2,2
+mora,118,86,0 duplicate(???#mora) ???#ep14_muk05 844,2,2
+
+- script #mora_puddle -1,{
+ set .@i, atoi(charat(strnpcinfo(2),9));
+
+ // This script has a lot of checks,
+ // so arrays are only set when used.
+ setarray .@quest1[1],5024,5025,5026,5027;
+ setarray .@dir$[1],"east","west","south","north";
+
+ if (checkquest(.@quest1[.@i]) > -1) {
+ if (countitem(6389) == 0) {
+ mes "This appears to be the puddle to the "+.@dir$[.@i];
+ mes "that the researcher talked about.";
+ mes "Will you collect a sample?";
+ next;
+ if(select("Collect a sample.:Don't collect a sample.") == 2)
+ close;
+ if (countitem(1092) == 0) {
+ mes "You have no empty sample tubes.";
+ close;
+ }
+ progressbar "ffff00",5;
+ if (checkweight(6389,1) == 0) {
+ mes "You have so many items";
+ mes "that it is difficult to collect samples.";
+ mes "You will have to lighten your load and come back.";
+ close;
+ }
+ mes "You have collected a sample from the puddle to the "+.@dir$[.@i]+".";
+ delitem 1092,1; //Empty_Cylinder
+ getitem 6389,1; //Puddle_R_Sample
+ close;
+ } else {
+ mes "You already have a sample.";
+ close;
+ }
+ }
+
+ set .@quest1[0], .@quest1[.@i];
+ set .@dir$[0], .@dir$[.@i];
+ deletearray .@quest1[.@i],1;
+ deletearray .@dir$[.@i],1;
+
+ if (checkquest(.@quest1[1]) > -1 || checkquest(.@quest1[2]) > -1 || checkquest(.@quest1[3]) > -1) {
+ for(set .@j,1; .@j<=3; set .@j,.@j+1) {
+ if (checkquest(.@quest1[.@j]) > -1)
+ break;
+ }
+ mes "This is not the puddle to the "+.@dir$[.@j]+".";
+ close;
+ }
+
+ setarray .@quest2[1],5030,5031,5032,5033;
+ set .@quest2[0], .@quest2[.@i];
+ deletearray .@quest2[.@i],1;
+
+ if (ep14_1_goki == 30 && checkquest(.@quest2[0]) > -1) {
+ mes "You arrived at the puddle to the "+.@dir$[0]+".";
+ mes "You should look for the unidentified creature's family.";
+ next;
+ mes "["+strcharinfo(0)+"]";
+ mes "Fish~ Fish~";
+ next;
+ mes "When you called out, an answer came";
+ mes "from the puddle.";
+ next;
+ mes "[???]";
+ mes "Who? Fisher? Go!";
+ next;
+ select("I'm looking for a particular fish's family.");
+ mes "[???]";
+ mes "Family? What be that fish name?";
+ next;
+ mes "What was the name of the unidentified creature?";
+ next;
+ input .@inputstr$;
+ if (.@inputstr$ != "Fishee") {
+ mes "[???]";
+ mes "No Family. "+.@inputstr$+" No.";
+ mes "You go.";
+ next;
+ mes "It appears that the unidentified creature's family is not here.";
+ close;
+ }
+ mes "[???]";
+ mes .@inputstr$+"? Oh... How...";
+ mes "Husband here come. Your son.";
+ mes "News here.";
+ next;
+ mes "Another creature from the puddle spoke to you.";
+ next;
+ mes "[????]";
+ mes "What? Missing son news?";
+ next;
+ mes "The two fish were very excited,";
+ mes "and their conversation was hard to follow.";
+ mes "You waited for them to calm down";
+ mes "and told them the full story.";
+ next;
+ mes "[Fishee's Dad]";
+ mes "Yes... At night, son";
+ mes "gone... Night fishers.";
+ mes "Son stupid. Caught. Dead. OK.";
+ next;
+ mes "[Fishee's Mom]";
+ mes "Fishee alive. Great. Great.";
+ next;
+ mes "[Fishee's Dad]";
+ mes "Yes... Human give son news.";
+ mes "Thanks. Son,";
+ mes "We okay. Happy. Here. You tell son.";
+ changequest .@quest2[0],5034;
+ close;
+ } else if (checkquest(5034) > -1 && checkquest(5034) < 2) {
+ mes "[Fishee's Dad]";
+ mes "Yes... Human give son news.";
+ mes "Thanks. Son,";
+ mes "We okay. Happy. Here. You tell son.";
+ close;
+ } else if (checkquest(.@quest2[1]) > -1 || checkquest(.@quest2[2]) > -1 || checkquest(.@quest2[3]) > -1) {
+ mes "You arrived at the puddle to the "+.@dir$[0]+".";
+ mes "You should look for the unidentified creature's family.";
+ next;
+ mes "["+strcharinfo(0)+"]";
+ mes "Fish~ Fish~";
+ next;
+ mes "You yelled out loud for fish,";
+ mes "but there is no response.";
+ mes "I don't think anybody lives";
+ mes "in this puddle.";
+ close;
+ }
+ mes "You see a puddle with a calm surface.";
+ close;
+}
+bif_fild02,315,285,0 duplicate(#mora_puddle) Puddle#ep14_muk01 844
+bif_fild02,65,109,0 duplicate(#mora_puddle) Puddle#ep14_muk02 844
+bif_fild02,223,71,0 duplicate(#mora_puddle) Puddle#ep14_muk03 844
+bif_fild02,113,340,0 duplicate(#mora_puddle) Puddle#ep14_muk04 844
+
+// Mora Daily Quests :: dealer
+//============================================================
+mora,133,80,6 script Elephantine#pa0829 509,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of things with you to do that. Throw out some of them and try again.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "You are carrying too much weight to do that. Reduce the weight and try again.";
+ close;
+ }
+ if (ep14_1_mistwoods < 10) {
+ mes "[Elephantine]";
+ mes "Hmm, you don't look reliable enough to perform tasks for me.";
+ close;
+ }
+ if (BaseLevel < 135) {
+ mes "[Elephantine]";
+ mes "Why don't you come back when you've grown stronger? I can't give you tasks when you're in your current state.";
+ close;
+ }
+ set .@playtime, checkquest(12230,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "[Elephantine]";
+ mes "I have no additional tasks available now. If I get some, I'll let you know when you come back.";
+ close;
+ } else if (.@playtime == 2) {
+ mes "[Elephantine]";
+ mes "Will you please check with ^990099Hotcha^000000";
+ mes "on the details of the previous task?";
+ close;
+ }
+ mes "[Elephantine]";
+ mes "Welcome.";
+ mes "I have some tasks for you - will you take a look at them?";
+ next;
+ if(select("What kind of tasks do you have for me?:Tell me about today's task.") == 1) {
+ mes "[Elephantine]";
+ mes "I'm the Head of the Volunteer Patrol of the Village of Mora. It didn't used to be like this, he he.";
+ next;
+ mes "[Elephantine]";
+ mes "Each day, I'll be giving you a quest to kill off monsters in the surrounding area.";
+ next;
+ mes "[Elephantine]";
+ mes "You might get a task that's far too difficult for you to take care of alone - in that case, try to get help from your fellow adventurers.";
+ close;
+ }
+ mes "[Elephantine]";
+ mes "Let me see what tasks we've got today... Hmm...";
+ next;
+ mes "[Elephantine]";
+ mes "How about this one?";
+ next;
+ switch(rand(1,5)) {
+ case 1:
+ setquest 12225;
+ setquest 12230;
+ mes "[Elephantine]";
+ mes "Strange insects that carry fruit on their backs roam this area - you must've seen them.";
+ next;
+ mes "[Elephantine]";
+ mes "I'd like you to take them out as you see them, before they try to sell anything to the adventurers lost in the forest.";
+ set .@n$,"Fruit-Carrying Insects";
+ break;
+ case 2:
+ setquest 12226;
+ setquest 12230;
+ mes "[Elephantine]";
+ mes "There have been a lot of reports lately about mantises disguised as flowers attacking creatures passing by.";
+ next;
+ mes "[Elephantine]";
+ mes "No casualties have been reported yet, but it wouldn't hurt to take precautions. Please deal with them appropriately.";
+ set .@n$,"Flowery Hunters";
+ break;
+ case 3:
+ setquest 12227;
+ setquest 12230;
+ mes "[Elephantine]";
+ mes "An adventurer was reported to have been attacked by little birds while gathering resources in the vicinity of Bifrost.";
+ next;
+ mes "[Elephantine]";
+ mes "They didn't look so ferocious... but the adventurer has asked me to get rid of them, so you'll have to do it.";
+ set .@n$,"Small but Ferocious...";
+ break;
+ case 4:
+ setquest 12228;
+ setquest 12230;
+ mes "[Elephantine]";
+ mes "I have qualms about this one, but somebody anonymously asked me to hunt down the naughty fairies.";
+ next;
+ mes "[Elephantine]";
+ mes "I don't know what grudge he has against the fairies, but a request is a request.";
+ set .@n$,"An Unknown Grudge";
+ break;
+ case 5:
+ setquest 12229;
+ setquest 12230;
+ mes "[Elephantine]";
+ mes "Would you believe it if I said there are balls of blonde hair rolling around? You wouldn't, would you?";
+ next;
+ mes "[Elephantine]";
+ mes "They don't seem so dangerous, but they are reported to steal books and sweets from adventurers. Please deal with them appropriately.";
+ set .@n$,"Blondie Ann";
+ break;
+ }
+ next;
+ mes "You have received the task ^005500"+.@n$+"^000000. Open and see the quest window for the details.";
+ close;
+}
+
+mora,115,98,8 script Hotcha#pa0829 509,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of things with you to do that. Throw out some of them and try again.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "You are carrying too much weight to do that. Reduce the weight and try again.";
+ close;
+ }
+ if (ep14_1_mistwoods < 10) {
+ mes "[Hotcha]";
+ mes "Hmm, you don't look reliable enough for Elephantine's tasks.";
+ close;
+ }
+ if (BaseLevel < 97) {
+ mes "[Hotcha]";
+ mes "This place is like a paradise for adventurers. Not for weak ones like you, though.";
+ close;
+ }
+ set .@playtime, checkquest(12230,PLAYTIME);
+ if (.@playtime == -1) {
+ mes "[Hotcha]";
+ mes "I see you haven't received";
+ mes "any tasks yet.";
+ mes "Go talk to Elephantine,";
+ mes "and Elephantine will give you";
+ mes "one of the countless tasks.";
+ close;
+ } else if (.@playtime == 2) {
+ mes "[Hotcha]";
+ mes "The time is up to complete the existing tasks.";
+ next;
+ mes "[Hotcha]";
+ mes "If you have any unfinished tasks in your quest log, they are considered 'failed' and removed from the log.";
+ next;
+ mes "[Hotcha]";
+ mes "Once they are removed, go talk to Elephantine and you can receive new tasks.";
+ for(set .@i,12225; .@i<=12229; set .@i,.@i+1) {
+ if (checkquest(.@i) > -1)
+ erasequest .@i;
+ }
+ erasequest 12230;
+ close;
+ }
+ mes "[Hotcha]";
+ mes "Welcome.";
+ mes "How may I help you?";
+ next;
+ select("I have completed a task.");
+ mes "Oh.";
+ mes "Have you?";
+ mes "Please wait a minute while I check the documents.";
+ next;
+
+ for(set .@i,12225; .@i<=12229; set .@i,.@i+1) {
+ if (checkquest(.@i,HUNTING) == 2) {
+ mes "[Hotcha]";
+ mes "Yes, I see you've completed the task. It has been confirmed as completed.";
+ erasequest .@i;
+ specialeffect2 EF_STEAL;
+ if (BaseLevel > 99)
+ getexp 0, ((JobLevel < 50)?JobLevel * JobLevel * (110/100) * 50:0);
+ else
+ getexp 0, ((JobLevel < 70)?JobLevel * JobLevel * (110/100) * 10:0);
+ getitem 6380,3; //Mora_Coin
+ close;
+ }
+ }
+
+ mes "[Hotcha]";
+ mes "Hmm... "+strcharinfo(0)+".";
+ mes "It may be a documentation error, but according to the documents, you have nothing to do with the tasks.";
+ close;
+}
+
+mora,119,103,4 script Bow-wow#pa0829 513,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of things with you to do that. Throw out some of them and try again.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "You are carrying too much weight to do that. Reduce the weight and try again.";
+ close;
+ }
+ if (ep14_1_mistwoods < 10) {
+ mes "[Bow-wow]";
+ mes "I try to give tasks only to reliable people. You are......... no, never mind.";
+ close;
+ }
+ if (BaseLevel < 97) {
+ mes "[Bow-wow]";
+ mes "You really have no clue. What could you do with such a weak body?";
+ close;
+ }
+ set .@playtime, checkquest(12241,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "[Bow-wow]";
+ mes "I have no additional tasks available now. If I get some, I'll let you know when you come back.";
+ close;
+ } else if (.@playtime == 2) {
+ mes "[Bow-wow]";
+ mes "Will you please check with the ^990099General Goods Dealer^000000";
+ mes "on the details of the previous task?";
+ close;
+ }
+ mes "[Bow-wow]";
+ mes "Welcome.";
+ mes "I have some tasks for you - will you take a look at them?";
+ next;
+ if(select("What kind of tasks do you have for me?:Tell me about today's task.") == 1) {
+ mes "[Bow-wow]";
+ mes "Here, we make all kinds of supplies for adventurers.";
+ next;
+ mes "[Bow-wow]";
+ mes "We accept raw materials for the supplies once a day.";
+ next;
+ mes "[Bow-wow]";
+ mes "Sometimes, we might ask for materials that are very difficult to obtain. In that case, try to get help from your fellow adventurers.";
+ close;
+ }
+ mes "[Bow-wow]";
+ mes "Let me see... what supplies are we making today...?";
+ next;
+ mes "[Bow-wow]";
+ mes "How about this one?";
+ next;
+ switch(rand(1,5)) {
+ case 1:
+ setquest 12231;
+ setquest 12241;
+ mes "[Bow-wow]";
+ mes "The adventurers here make sure to bring with them, on their exploration to dungeons, a preservative to keep their food fresh. Do you know what the preservative is made from?";
+ next;
+ mes "[Bow-wow]";
+ mes "*grin* None other than... Insect Feelers! The General Goods Dealer there asked me to get four of them. I personally would not eat it for all the world...";
+ set .@n$,"Material for the Preservative";
+ break;
+ case 2:
+ setquest 12232;
+ setquest 12241;
+ mes "[Bow-wow]";
+ mes "These days, it's common for adventurers here to make talismans to protect themselves on their dangerous adventures. Like a kind of insurance.";
+ next;
+ mes "[Bow-wow]";
+ mes "Immortal Hearts seem to be all the rage lately. The General Goods Merchant asked me to get five of them.";
+ set .@n$,"A Symbol of Resistance";
+ break;
+ case 3:
+ setquest 12233;
+ setquest 12241;
+ mes "[Bow-wow]";
+ mes "They need tons of Rotten Bandages for making first aid bandages. They must have run out of new materials.";
+ next;
+ mes "[Bow-wow]";
+ mes "The client is the General Goods Merchant over there. Three bunches of them will be enough.";
+ set .@n$,"Material for First Aid Kits";
+ break;
+ case 4:
+ setquest 12234;
+ setquest 12241;
+ mes "[Bow-wow]";
+ mes "Symbols of strong warriors give adventurers great support on their journeys. That's why Orcish Vouchers sell like hotcakes.";
+ next;
+ mes "[Bow-wow]";
+ mes "The General Goods Dealer asked me to get three Orcish Vouchers, which are to be used to make symbols of courage.";
+ set .@n$,"Symbols of Courage";
+ break;
+ case 5:
+ setquest 12235;
+ setquest 12241;
+ mes "[Bow-wow]";
+ mes "It seems to be rumored among adventurers that drinking powdered bones mixed with water helps boost their stamina.";
+ next;
+ mes "[Bow-wow]";
+ mes "The General Goods Dealer asked me to get three Skel-Bones, which are to be used to make tonic.";
+ set .@n$,"Good for Stamina...";
+ break;
+ }
+ next;
+ mes "You have received the task ^880088"+.@n$+"^000000. Open and see the quest window for the details.";
+ close;
+}
+
+mora,119,118,4 script General Good Dealer#pa0 516,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of things with you to do that. Throw out some of them and try again.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "You are carrying too much weight to do that. Reduce the weight and try again.";
+ close;
+ }
+ if (ep14_1_mistwoods < 10) {
+ mes "[General Good Dealer]";
+ mes "Hmm, you don't look reliable enough for Bow-wow's tasks.";
+ close;
+ }
+ if (BaseLevel < 97) {
+ mes "[General Good Dealer]";
+ mes "What could you do with that fragile body? Go get some exercise.";
+ close;
+ }
+ set .@playtime, checkquest(12241,PLAYTIME);
+ if (.@playtime == -1) {
+ mes "[General Good Dealer]";
+ mes "I see you haven't received";
+ mes "any tasks yet.";
+ mes "Go talk to Bow-wow,";
+ mes "and Bow-wow will give you";
+ mes "one of the countless tasks.";
+ close;
+ } else if (.@playtime == 2) {
+ mes "[General Good Dealer]";
+ mes "The time is up to complete the existing tasks.";
+ next;
+ mes "[General Good Dealer]";
+ mes "If you have any unfinished tasks in your quest log, they are considered 'failed' and removed from the log.";
+ next;
+ mes "[General Good Dealer]";
+ mes "Once they are removed, go talk to Bow-wow and you can receive new tasks.";
+ for(set .@i,12231; .@i<=12235; set .@i,.@i+1) {
+ if (checkquest(.@i) > -1)
+ erasequest .@i;
+ }
+ erasequest 12241;
+ close;
+ }
+ mes "[General Good Dealer]";
+ mes "Welcome.";
+ mes "How may I help you?";
+ next;
+ select("I have completed a task.");
+ mes "[General Good Dealer]";
+ mes "Oh.";
+ mes "Have you?";
+ mes "Please wait a minute while I check the documents.";
+ next;
+
+ callsub L_CheckQuest,12231,928,4; //Insect_Feeler
+ callsub L_CheckQuest,12232,929,5; //Immortal_Heart
+ callsub L_CheckQuest,12233,930,1; //Rotten_Bandage
+ callsub L_CheckQuest,12234,931,3; //Orcish_Voucher
+ callsub L_CheckQuest,12235,932,3; //Skel_Bone
+
+ mes "[General Good Dealer]";
+ mes "Hmm... "+strcharinfo(0)+".";
+ mes "It may be a documentation error, but according to the documents, you have nothing to do with the tasks.";
+ close;
+
+L_CheckQuest:
+ if (checkquest(getarg(0)) > -1) {
+ if (countitem(getarg(1)) < getarg(2)) {
+ mes "[General Good Dealer]";
+ mes "The amount is not enough...";
+ close;
+ }
+ mes "[General Good Dealer]";
+ mes "I've received the items all right. It will be some time before I have another task for you, so why don't you visit the hot spring and relax?";
+ delitem getarg(1),getarg(2);
+ erasequest getarg(0);
+ specialeffect2 EF_STEAL;
+ if (BaseLevel > 99)
+ getexp 0, ((JobLevel < 50)?JobLevel * JobLevel * (110/100) * 50:0);
+ else
+ getexp 0, ((JobLevel < 70)?JobLevel * JobLevel * (110/100) * 10:0);
+ getitem 6380,1; //Mora_Coin
+ close;
+ }
+ return;
+}
+
+mora,124,108,7 script Woof-grrr#pa0829 514,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of things with you to do that. Throw out some of them and try again.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "You are carrying too much weight to do that. Reduce the weight and try again.";
+ close;
+ }
+ if (ep14_1_mistwoods < 10) {
+ mes "[Woof-grrr]";
+ mes "Can you please keep away from me? You're getting in the way.";
+ close;
+ }
+ if (BaseLevel < 97) {
+ mes "[Woof-grrr]";
+ mes "This place is not a nursery. Grow up and come back, and I'll gladly give you tasks.";
+ close;
+ }
+ set .@playtime, checkquest(12242,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "[Woof-grrr]";
+ mes "I have no additional tasks available now. If I get some, I'll let you know when you come back.";
+ close;
+ } else if (.@playtime == 2) {
+ mes "[Woof-grrr]";
+ mes "Will you please check with the ^990099Commodities Dealer^000000, standing across from me,";
+ mes "on the details of the previous task?";
+ close;
+ }
+ mes "[Woof-grrr]";
+ mes "Nice to see you.";
+ mes "I have some tasks for you - will you take a look at them?";
+ next;
+ if(select("What kind of tasks do you have for me?:Tell me about today's task.") == 1) {
+ mes "[Woof-grrr]";
+ mes "Bow-wow and I are in the same industry.";
+ next;
+ mes "[Woof-grrr]";
+ mes "We are a manufacturer of adventurers' supplies.";
+ next;
+ mes "[Woof-grrr]";
+ mes "My tasks won't be easy - you'd better prepare yourself.";
+ close;
+ }
+ mes "[Woof-grrr]";
+ mes "Hmm... What tasks are at hand today?";
+ next;
+ mes "[Woof-grrr]";
+ mes "Oh. This one looks good.";
+ next;
+ switch(rand(1,5)) {
+ case 1:
+ setquest 12236;
+ setquest 12242;
+ mes "[Woof-grrr]";
+ mes "Some people just hang their talismans around their necks, but more people choose to seal them in special cases and carry them on their bodies.";
+ next;
+ mes "[Woof-grrr]";
+ mes "Mementos serve as inspirations for designers of those cases. The Commodities Dealer across from me asked me to get two of them.";
+ set .@n$,"The Latest Trend in Talismans";
+ break;
+ case 2:
+ setquest 12237;
+ setquest 12242;
+ mes "[Woof-grrr]";
+ mes "Adventurers make sure to keep their talismans safe, because they could save their lives.";
+ next;
+ mes "[Woof-grrr]";
+ mes "The Commodities Dealer across from me seems to make protective cases out of Shells. I was asked to get three of them.";
+ set .@n$,"Keep Your Valuables Safe";
+ break;
+ case 3:
+ setquest 12238;
+ setquest 12242;
+ mes "[Woof-grrr]";
+ mes "Adventurers that go into the bushes of the Maze of the Hazy Forest always wear knee protectors.";
+ next;
+ mes "[Woof-grrr]";
+ mes "The Commodities Dealer across from me asked me to get three Scale Shells, which are to be used to make knee protectors.";
+ set .@n$,"Material for Knee Protectors";
+ break;
+ case 4:
+ setquest 12239;
+ setquest 12242;
+ mes "[Woof-grrr]";
+ mes "I have a task for you at hand, making a vaccine for possible poisonous insects.";
+ next;
+ mes "[Woof-grrr]";
+ mes "The Commodities Dealer across from me asked me to get two Venom Canines, which are to be used in the research of the substance.";
+ set .@n$,"Poison for Poison...";
+ break;
+ case 5:
+ setquest 12240;
+ setquest 12242;
+ mes "[Woof-grrr]";
+ mes "It seems they have run out of the material for adding non-slip soles to shoes.";
+ next;
+ mes "[Woof-grrr]";
+ mes "The Commodities Dealer across from me commissioned me to get five globs of Sticky Mucus.";
+ set .@n$,"Don't Slip and Fall";
+ break;
+ }
+ next;
+ mes "You have received the task ^880088"+.@n$+"^000000. Open and see the quest window for the details.";
+ close;
+}
+
+mora,127,112,4 script Commodities Dealer#pa08 518,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of things with you to do that. Throw out some of them and try again.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "You are carrying too much weight to do that. Reduce the weight and try again.";
+ close;
+ }
+ if (ep14_1_mistwoods < 10) {
+ mes "[Commodities Dealer]";
+ mes "Well, Woof-grrr can't have given a weakling like you tasks.";
+ close;
+ }
+ if (BaseLevel < 97) {
+ mes "[Commodities Dealer]";
+ mes "Go away! I can't concentrate on cataloging with you hanging around like that...";
+ close;
+ }
+ set .@playtime, checkquest(12242,PLAYTIME);
+ if (.@playtime == -1) {
+ mes "[Commodities Dealer]";
+ mes "I see you haven't received";
+ mes "any tasks yet.";
+ mes "Go talk to Woof-grrr,";
+ mes "and Woof-grrr will give you";
+ mes "one of the countless tasks.";
+ close;
+ } else if (.@playtime == 2) {
+ mes "[Commodities Dealer]";
+ mes "The time is up to complete the existing tasks.";
+ next;
+ mes "[Commodities Dealer]";
+ mes "If you have any unfinished tasks in your quest log, they are considered 'failed' and removed from the log.";
+ next;
+ mes "[Commodities Dealer]";
+ mes "Once they are removed, go talk to Woof-grrr and you can receive new tasks.";
+ for(set .@i,12236; .@i<=12240; set .@i,.@i+1) {
+ if (checkquest(.@i) > -1)
+ erasequest .@i;
+ }
+ erasequest 12242;
+ close;
+ }
+ mes "[Commodities Dealer]";
+ mes "Welcome.";
+ mes "How may I help you?";
+ next;
+ select("I have completed a task.");
+ mes "[Commodities Dealer]";
+ mes "Oh.";
+ mes "Have you?";
+ mes "Please wait a minute while I check the documents.";
+ next;
+
+ callsub L_CheckQuest,12236,934,2; //Mementos
+ callsub L_CheckQuest,12237,935,3; //Shell
+ callsub L_CheckQuest,12238,936,3; //Scales_Shell
+ callsub L_CheckQuest,12239,937,2; //Posionous_Canine
+ callsub L_CheckQuest,12240,938,5; //Sticky_Mucus
+
+ mes "[Commodities Dealer]";
+ mes "Hmm... "+strcharinfo(0)+".";
+ mes "It may be a documentation error, but according to the documents, you have nothing to do with the tasks.";
+ close;
+
+L_CheckQuest:
+ if (checkquest(getarg(0)) > -1) {
+ if (countitem(getarg(1)) < getarg(2)) {
+ mes "[Commodities Dealer]";
+ mes "The amount is not enough...";
+ close;
+ }
+ mes "[Commodities Dealer]";
+ mes "I've received the items all right. I look forward to working with you again.";
+ delitem getarg(1),getarg(2);
+ erasequest getarg(0);
+ specialeffect2 EF_STEAL;
+ if (BaseLevel > 99)
+ getexp 0, ((JobLevel < 50)?JobLevel * JobLevel * (110/100) * 50:0);
+ else
+ getexp 0, ((JobLevel < 70)?JobLevel * JobLevel * (110/100) * 10:0);
+ getitem 6380,1; //Mora_Coin
+ close;
+ }
+ return;
+}
+
+mora,170,101,4 script Soul Guide#pa0829 515,{
+ if (checkweight(1201,1) == 0) {
+ mes "You have too many kinds of things with you to do that. Throw out some of them and try again.";
+ close;
+ }
+ if (MaxWeight - Weight < 1000) {
+ mes "You are carrying too much weight to do that. Reduce the weight and try again.";
+ close;
+ }
+ if (ep14_1_mistwoods < 10) {
+ mes "[Soul Guide]";
+ mes "Reliability is the primary quality needed in looking for lost souls. You don't look so reliable to me.";
+ close;
+ }
+ if (BaseLevel < 97) {
+ mes "[Soul Guide]";
+ mes "You need to have a strong spirit to do this task. I think you need a lot more discipline.";
+ close;
+ }
+ set .@playtime, checkquest(12253,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "You still have marks of the haunting souls on your body.";
+ next;
+ mes "You'll have to come back when the marks have disappeared.";
+ close;
+ } else if (.@playtime == 2) {
+ mes "You feel your mind has calmed down once again. You now have enough energy to go look for other souls, so talk to the Guide again.";
+ for(set .@i,12243; .@i<=12252; set .@i,.@i+1) {
+ if (checkquest(.@i) > -1)
+ erasequest .@i;
+ }
+ erasequest 12253;
+ close;
+ }
+ mes "[Soul Guide]";
+ mes "Welcome.";
+ mes "Are you ready?";
+ next;
+ if(select("What kind of tasks do you have for me?:Tell me about today's task.") == 1) {
+ mes "[Soul Guide]";
+ mes "My job is to gather the remains of the souls haunting the forest and put them to rest.";
+ next;
+ mes "[Soul Guide]";
+ mes "There are countless souls trapped in the Maze.";
+ next;
+ mes "[Soul Guide]";
+ mes "Help them get their long-deserved rest.";
+ close;
+ }
+ mes "[Soul Guide]";
+ mes "I'll show you the details of one of the lost souls.";
+ next;
+ switch(rand(1,10)) {
+ case 1:
+ setquest 12243;
+ setquest 12253;
+ mes "^660066Age 32. Comes from Midgard. Has been missing for 3 months since he went to the Maze of the Hazy Forest in order to collect the native plants. Low chance of survival.^000000";
+ set .@n$,"Tazar";
+ break;
+ case 2:
+ setquest 12244;
+ setquest 12253;
+ mes "^660066Age 19. Adventurer who came from a far, unknown place by ship. Been missing for 2 months since he went to explore the Maze dressed in thin tights, despite dissuasion of all Mora residents.";
+ mes "Even if he's alive, he would cause trouble to the rescue team.^000000";
+ set .@n$,"Niger";
+ break;
+ case 3:
+ setquest 12245;
+ setquest 12253;
+ mes "^660066Age unknown. Has some mental illness. Went alone in order to purify the Maze of the Hazy forest. He insists that he has good ancestry but no one trusts him.";
+ mes "Disappearance period : 12 years. Not much chance of survival.^000000";
+ set .@n$,"Messil";
+ break;
+ case 4:
+ setquest 12246;
+ setquest 12253;
+ mes "^660066Age 51. Used to be a big thief who stole famous swords from all around the world.";
+ mes "Went missing in the Maze after being pursued for running an illegal casino house which caused massive casualties in his final years. Low chance of survival.^000000";
+ set .@n$,"Noirit";
+ break;
+ case 5:
+ setquest 12247;
+ setquest 12253;
+ mes "^660066Age 22. An apprentice of an airship pilot. He has gone missing while drinking in Mora town, where he went for a break.";
+ mes "Rumor has it that he fled after signing somewhere. Disappearance period : 4 months. Low chance of survival.^000000";
+ set .@n$,"Pajama Sin";
+ break;
+ case 6:
+ setquest 12248;
+ setquest 12253;
+ mes "^660066Age Unknown. A female with long hair, dressed in black. Went on an expedition to the forest of the Maze in search of eternal life. Disappearance period : 3 months. Low chance of survival.^000000";
+ set .@n$,"Mendel";
+ break;
+ case 7:
+ setquest 12249;
+ setquest 12253;
+ mes "^660066Age around 50. The current Mayor of the Mora village. He ran away to the Forest of Maze after being caught pocketing profits by cheating the residents. Survival uncertain.^000000";
+ set .@n$,"Milebit";
+ break;
+ case 8:
+ setquest 12250;
+ setquest 12253;
+ mes "^660066Age 29. A young man with an unknown background.";
+ mes "Fled to the forest of maze after scamming 1200 Mora coins from Mora residents while pretending to start a lot of business and adapting himself in Mora. Survival uncertain.^000000";
+ set .@n$,"Kunmoon";
+ break;
+ case 9:
+ setquest 12251;
+ setquest 12253;
+ mes "^660066Age 34. Flirted with several women in Mora. Fled from Mora villagers to the forest of maze. Survival uncertain.^000000";
+ set .@n$,"Chaihokin";
+ break;
+ case 10:
+ setquest 12252;
+ setquest 12253;
+ mes "^660066Age Unknown. Disappered with coins which were joint controlled by the villagers. Low chance of survival.^000000";
+ set .@n$,"Tual";
+ break;
+ }
+ next;
+ mes "^990099Information on missing person "+.@n$+"^000000 has been found. Check your Quest Window for further information.";
+ specialeffect2 EF_STEAL;
+ close;
+}
+
+mora,131,165,7 script Wandering Customer#pa082 520,{
+ mes "[Wandering Customer]";
+ mes "I don't know whether to believe this art dealer... He made me stand here like this for days.... Ah... I feel dizzy.";
+ close;
+}
+
+mora,125,174,2 script A Random Customer#pa0829 520,{
+ mes "[Naive Customer]";
+ mes "I don't know when carving my pendant will be completed. Since he is a reliable art dealer, I suppose he won't break my pendant.";
+ close;
+}
+
+mora,104,172,7 script Victim#pa0829 520,{
+ mes "[Victim]";
+ mes "You Bastard! I want my rugged outwear! That was passed on to me by my father *SOB*";
+ next;
+ mes "^990099 It seems that he has gotten a great deal of damage from the art dealer.^000000";
+ close;
+}
+
+// Mora Daily Quests - Souls :: md_cadaver_in
+//============================================================
+// callfunc "mora_remains",<quest ID>,<NPC name>,<Mora Coin amount>,<reward ID>,<max reward amount>;
+function script mora_remains {
+ if (MaxWeight - Weight < 1000) {
+ mes "You have to make space in your inventory.";
+ close;
+ }
+ if (checkquest(getarg(0)) > -1) {
+ specialeffect2 EF_BLIND;
+ specialeffect2 EF_BEGINSPELL;
+ progressbar "ffff00",4;
+ erasequest getarg(0);
+ mes "These must be ["+getarg(1)+"]'s Remains. So carefully gather his remains.";
+ specialeffect2 EF_STEAL;
+ getitem getarg(3), rand(1,getarg(4));
+ if (rand(10)) {
+ next;
+ mes "You picked up "+getarg(2)+" Mora Coins next to the remains.";
+ specialeffect2 EF_STEAL;
+ getitem 6380,getarg(2); //Mora_Coin
+ }
+ close;
+ }
+ mes "You see traces of recent digging.";
+ close;
+}
+1@mist,132,100,0 script Tazaar's Remains#33 844,{ callfunc "mora_remains",12243,"Tazaar",6,526,3; } //Royal_Jelly
+1@mist,102,242,0 script Naizar's Remains#33 844,{ callfunc "mora_remains",12244,"Naizar",5,942,17; } //Yoyo_Tail
+1@mist,145,245,0 script Meshir's Remains#33 844,{ callfunc "mora_remains",12245,"Meshir",5,943,4; } //Solid_Shell
+1@mist,196,276,0 script Noirit's Remains#33 844,{ callfunc "mora_remains",12246,"Noirit",6,549,3; } //Nice_Sweet_Potato
+1@mist,304,327,0 script Pajama God's Remains#33 844,{ callfunc "mora_remains",12247,"Pajama God",5,945,18; } //Raccoon_Leaf
+1@mist,334,287,0 script Mendel's Remains#33 844,{ callfunc "mora_remains",12248,"Mendel",7,946,31; } //Snail's_Shell
+1@mist,330,177,0 script Milebit's Remains#33 844,{ callfunc "mora_remains",12249,"Milebit",5,7008,17; } //Stiff_Horn
+1@mist,284,84,0 script Kunmun's Remains#33 844,{ callfunc "mora_remains",12250,"Kunmun",4,6380,20; } //Mora_Coin
+1@mist,170,54,0 script Tsaihokin's Remains#33 844,{ callfunc "mora_remains",12251,"Tsaihokin",2,929,5; } //Immortal_Heart
+1@mist,118,43,0 script Tuar's Remains#33 844,{ callfunc "mora_remains",12252,"Tuar",3,6380,20; } //Mora_Coin
+
+// Knights of the Neighborhood :: mora_knight
+//============================================================
+mora,118,166,6 script Knights Chief#mo 525,{
+ mes "[Order of the Knights Chief]";
+ mes "We are the legendary order of the Neighborhood Knights, founded just five minutes ago!";
+ next;
+ mes "[Order of the Knights Chief]";
+ mes "We have four chiefs but no foot soldiers...";
+ mes "It's so frustrating!";
+ next;
+ mes "[Other Leaders]";
+ mes "Those other guys are all soldiers, but I'm the Boss!";
+ mes "I, the Head, will tell you what to do!";
+ mes "The Leader is the highest in the rank!";
+ mes "You talked me into joining the order, and now look at this!";
+ close;
+}
+
+mora,116,165,5 script Knights Boss#mo 524,{
+ set .@playtime, checkquest(1119,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "[Order of the Knights Boss]";
+ mes "We've run out of Mora Coins.";
+ mes "Come back tomorrow!";
+ close;
+ } else if (.@playtime == 2)
+ erasequest 1119;
+ if (checkweight(6380,1) == 0) {
+ mes "[Order of the Knights Boss]";
+ mes "You have a lot of things with you!";
+ mes "Why not dump some of them in my pocket?";
+ close;
+ }
+ if (countitem(12561) >= 200) {
+ mes "[Order of the Knights Boss]";
+ mes "So you've brought back";
+ mes "200 ^FF0000Mysterious Seeds^000000.";
+ mes "Are you working under my command?";
+ mes "I'm so confused";
+ mes "because I've been sending random people on errands.";
+ next;
+ mes "[Order of the Knights Boss]";
+ mes "I'll reward you as I promised.";
+ mes "You made sure everyone knows";
+ mes "it's the Order of the Neighborhood Knights's work, right?";
+ setquest 1119;
+ delitem 12561,200; //Mysterious_Seed
+ getitem 6380,1; //Mora_Coin
+ close;
+ }
+ mes "[Order of the Knights Boss]";
+ mes "You have courage to";
+ mes "show up out of nowhere";
+ mes "and demand Mora Coins... how impressive!";
+ mes "You're more than qualified to be a soldier of the Order of the Neighborhood Knights.";
+ next;
+ mes "[Order of the Knights Boss]";
+ mes "Soldier, I need you to do something for me.";
+ mes "Go to the Hazy Forest and gather 200 ^FF0000Mysterious Seeds^000000!";
+ next;
+ switch(select("Yes, sir!:I challenge you to a duel!")) {
+ case 1:
+ mes "[Order of the Knights Boss]";
+ mes "Good attitude, "+strcharinfo(0)+" Soldier!";
+ mes "I'll reward you handsomely when you get back.";
+ next;
+ mes "[Other Bosses]";
+ mes "This is from me, the Chief!";
+ mes "Don't look down on the Head!";
+ mes "It's from me, the Leader!";
+ close;
+ case 2:
+ mes "[Order of the Knights Boss]";
+ mes "See the Chief if you want to have a duel!";
+ mes "I'm in charge of recruiting here.";
+ mes "Ahem...";
+ close;
+ }
+}
+
+mora,114,163,5 script Knights Head#mo 522,{
+ if (checkweight(6380,1) == 0) {
+ mes "[Order of the Knights Head]";
+ mes "You have a lot of things with you!";
+ mes "Why not dump some of them in my pocket?";
+ close;
+ }
+ if (ep14_1_rope < 11) {
+ mes "[Order of the Knights Head]";
+ mes "I hear that a Laphine called 'Lope'";
+ mes "went missing in the Hazy Forest.";
+ mes "I wish the Order of the Neighborhood Knights";
+ next;
+ mes "[Order of the Knights Head]";
+ mes "could help solve the case,";
+ mes "but we can't now";
+ mes "because we're not done cleaning the yard yet.";
+ mes "So, what I'm trying to say is";
+ next;
+ mes "[Order of the Knights Head]";
+ mes "why don't you go";
+ mes "and deal with the problem";
+ mes "on behalf of the Order of the Neighborhood Knights!";
+ next;
+ mes "[Order of the Knights Head]";
+ mes "I promise, as the Head of the Order,";
+ mes "that I'll give you more work";
+ mes "when you get back!";
+ next;
+ mes "[Other Heads]";
+ mes "I approve it, as the Chief.";
+ mes "You can thank me, the Boss.";
+ mes "You know the Leader is the boss here, right?";
+ close;
+ } else if (ep14_1_rope == 11) {
+ mes "[Order of the Knights Head]";
+ mes "So the missing Laphine";
+ mes "is dead?";
+ mes "I'm sorry to hear that.";
+ mes "I could have saved him.";
+ next;
+ mes "[Order of the Knights Head]";
+ mes "I hear that there are more ^0000FFLope's Clues^000000";
+ mes "in the Hazy Forest.";
+ mes "Go look for the rest of them";
+ mes "and bring back about 30 of them.";
+ mes "They will make great souvenirs.";
+ next;
+ switch(select("Am I doing all the work here or what?:Yes, sir!")) {
+ case 1:
+ mes "[Order of the Knights Head]";
+ mes "So you've noticed it?";
+ mes "Darn! I should have given you work earlier!";
+ close;
+ case 2:
+ mes "[Order of the Knights Head]";
+ mes "It was worthwhile to have trained you after all.";
+ mes "I'm proud of you,"+strcharinfo(0)+" Soldier!";
+ next;
+ mes "[Other Heads]";
+ mes "I think you'll make a great right-hand man, the Chief.";
+ mes "I feel rewarded, as the Boss.";
+ mes "As the Leader, I'm so pleased to see you all improve.";
+ set ep14_1_rope,12;
+ setquest 1118;
+ close;
+ }
+ } else if (ep14_1_rope == 12) {
+ if (countitem(6383) < 30) {
+ mes "[Order of the Knights Head]";
+ mes "You still haven't gathered";
+ mes "^0000FFLope's Clues^000000?";
+ mes "I feel somewhat good,";
+ mes "because that's about what I expected out of you.";
+ close;
+ }
+ mes "[Order of the Knights Head]";
+ mes "So you've brought back ^0000FFLope's Clues^000000.";
+ mes "Let's see ...";
+ mes "Assemble, assemble";
+ mes "Attach, attach";
+ next;
+ mes "[Lope's Letter]";
+ mes "...a traveler... attacked...";
+ mes "...under disguise... deadly poison...";
+ mes "...the Village... in danger...";
+ next;
+ mes "[Order of the Knights Head]";
+ mes "What on earth does this mean?";
+ mes "Well done, anyway.";
+ mes "Cheer up, you will be a great head of the Knights like myself, someday.";
+ next;
+ mes "[Other Heads]";
+ mes "I'm not so sure!";
+ mes "It's too much for us.";
+ mes "It's no use trying to do it.";
+ completequest 1118;
+ delitem 6383,30; //Clue_Of_Lope
+ set ep14_1_rope,13;
+ getitem 6380,2; //Mora_Coin
+ getexp 1000000,1000000;
+ close;
+ } else if (ep14_1_rope > 12) {
+ mes "[Order of the Knights Head]";
+ mes "We're in trouble.";
+ mes "We're sick of being knights.";
+ mes "We're thinking of forming";
+ mes "a circus troupe instead.";
+ mes "Are you interested in trying tightrope walking?";
+ next;
+ switch(select("Well, I could do a fire show.:This is so absurd.")) {
+ case 1:
+ mes "[Order of the Knights Head]";
+ mes "No, it's impossible.";
+ mes "I burned down a few houses";
+ mes "playing with fire.";
+ close;
+ case 2:
+ mes "[Order of the Knights Head]";
+ mes "That's the answer I expected.";
+ mes "I'm proud of myself.";
+ close;
+ }
+ close;
+ }
+ end;
+}
+
+mora,112,161,5 script Knights Leader#mo 523,{
+ mes "[Order of the Knights Leader]";
+ mes "I'm the Leader of the Order -";
+ mes "you can tell me.";
+ mes "What brings you here? Do you have some work for us?";
+ next;
+ mes "[Other Leaders]";
+ mes "Huh! I said the Boss is the boss!";
+ mes "No, the Chief is the best!";
+ mes "How rude you all are! I'm the Head here!";
+ emotion e_swt2,1;
+ close;
+}
diff --git a/npc/re/quests/quests_veins.txt b/npc/re/quests/quests_veins.txt
index b4be40067..3478fe16b 100644
--- a/npc/re/quests/quests_veins.txt
+++ b/npc/re/quests/quests_veins.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Quest NPCs located in Veins
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Quests related to Veins.
//===== Additional Comments: =================================
diff --git a/npc/re/scripts.conf b/npc/re/scripts.conf
index 47b2cb7e0..e4dcd94ac 100644
--- a/npc/re/scripts.conf
+++ b/npc/re/scripts.conf
@@ -13,6 +13,7 @@ npc: npc/re/cities/dicastes.txt
npc: npc/re/cities/izlude.txt
npc: npc/re/cities/jawaii.txt
npc: npc/re/cities/malangdo.txt
+npc: npc/re/cities/malaya.txt
npc: npc/re/cities/mora.txt
// --------------------------- Guides ---------------------------
@@ -33,6 +34,7 @@ npc: npc/re/guides/guides_juno.txt
npc: npc/re/guides/guides_lighthalzen.txt
npc: npc/re/guides/guides_louyang.txt
npc: npc/re/guides/guides_lutie.txt
+npc: npc/re/guides/guides_mora.txt
npc: npc/re/guides/guides_morroc.txt
npc: npc/re/guides/guides_moscovia.txt
npc: npc/re/guides/guides_niflheim.txt
@@ -50,6 +52,7 @@ npc: npc/re/merchants/3rd_trader.txt
npc: npc/re/merchants/diamond.txt
npc: npc/re/merchants/flute.txt
npc: npc/re/merchants/inn.txt
+npc: npc/re/merchants/quivers.txt
npc: npc/re/merchants/refine.txt
npc: npc/re/merchants/renters.txt
npc: npc/re/merchants/shops.txt
@@ -84,5 +87,6 @@ npc: npc/re/quests/quests_izlude.txt
npc: npc/re/quests/quests_lighthalzen.txt
npc: npc/re/quests/quests_malangdo.txt
npc: npc/re/quests/quests_veins.txt
+npc: npc/re/quests/quests_mora.txt
npc: npc/re/quests/monstertamers.txt
-npc: npc/re/quests/quests_13_1.txt
+npc: npc/re/quests/quests_13_1.txt \ No newline at end of file
diff --git a/npc/re/scripts_main.conf b/npc/re/scripts_main.conf
index d9dfcf267..fd393e5b7 100644
--- a/npc/re/scripts_main.conf
+++ b/npc/re/scripts_main.conf
@@ -1,15 +1,15 @@
// --------------------------------------------------------------
-// - rAthena Renewal Primary Scripts File -
+// - Hercules Renewal Primary Scripts File -
// --------------------------------------------------------------
-// The idea of this new system is to make scripts more organized
+// The idea of this new system is to make scripts more organized
// since the old system was rather messy with all the NPCs in one
// file. Now scripts are organized in to files arraged by type.
-// Custom scripts are now in scripts_custom.conf, all other
+// Custom scripts are now in scripts_custom.conf, all other
// scripts are deemed as 'official'. You should place your NPCs
// in to scripts_custom.conf to follow the trend.
//
// Thanks,
-// Ancyker and the rest of the rAthena Team
+// Ancyker and the rest of the Hercules Team
//
// Note: "Comments" are all text on the right side of a double slash "//"
// Whatever text is commented will not be parsed by the servers, and serves
diff --git a/npc/re/warps/cities/dewata.txt b/npc/re/warps/cities/dewata.txt
index 9ca29688c..4e7476ec8 100644
--- a/npc/re/warps/cities/dewata.txt
+++ b/npc/re/warps/cities/dewata.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Dewata Warp Script
//===== By: ==================================================
//= Chilly
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Warp Points for Dewata
//===== Additional Comments: =================================
diff --git a/npc/re/warps/cities/dicastes.txt b/npc/re/warps/cities/dicastes.txt
index d80e178a9..d2c84ad0a 100644
--- a/npc/re/warps/cities/dicastes.txt
+++ b/npc/re/warps/cities/dicastes.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= El Dicastes Warp Script
//===== By: ==================================================
//= Chilly, Muad_Dib
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Warp Points for El Dicastes
//===== Additional Comments: =================================
diff --git a/npc/re/warps/cities/eclage.txt b/npc/re/warps/cities/eclage.txt
index c67bf202f..0400489f5 100644
--- a/npc/re/warps/cities/eclage.txt
+++ b/npc/re/warps/cities/eclage.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Eclage Warp Script
//===== By: ==================================================
//= Chilly
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Warp Points for Eclage
//===== Additional Comments: =================================
diff --git a/npc/re/warps/cities/malaya.txt b/npc/re/warps/cities/malaya.txt
index 3a8b1002e..a792c4690 100644
--- a/npc/re/warps/cities/malaya.txt
+++ b/npc/re/warps/cities/malaya.txt
@@ -1,38 +1,94 @@
-//===== rAthena Script =======================================
-//= Malaya Port Warp Script
-//===== By: ==================================================
+//===== Hercules Script ======================================
+//= Mayala Port Town Warps
+//===== By: ==================================================
//= Chilly
-//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
-//= Warp Points for Malaya Port
-//===== Additional Comments: =================================
-//= 1.0 First Version.
-//============================================================
+//===== Current Version: =====================================
+//= 1.0a
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
+//= Warps for Mayala Port Town.
+//===== Additional Comments: =================================
+//= 1.0 First Version [Chilly].
+//= 1.0a Updated the file with new / missing warps [Masao].
+//============================================================
+
+malaya,178,211,0 script malaya_inn 45,1,1,{
+ end;
+
+OnTouch:
+ if (malaya_hi < 10) {
+ mes "Door is closed. It seems keeping its eyes on you.";
+ close;
+ }
+ warp "ma_in01",24,80;
+ end;
+}
+
+malaya,112,212,0 script malaya_ws 45,1,1,{
+ end;
+
+OnTouch:
+ if (malaya_hi < 20) {
+ mes "Door is closed. It seems keeping its eyes on you.";
+ close;
+ }
+ warp "ma_in01",83,16;
+ end;
+}
+
+malaya,299,167,0 script malaya_ts 45,1,1,{
+ end;
+
+OnTouch:
+ if (malaya_hi < 20) {
+ mes "Door is closed. It seems keeping its eyes on you.";
+ close;
+ }
+ warp "ma_in01",12,24;
+ end;
+}
+
+malaya,261,240,0 script malaya_shop 45,1,1,{
+ end;
+
+OnTouch:
+ if (malaya_hi < 20) {
+ mes "Door is closed. It seems keeping its eyes on you.";
+ close;
+ }
+ warp "ma_in01",126,20;
+ end;
+}
+
+malaya,300,211,0 script malaya_house01 45,1,1,{
+ end;
+
+OnTouch:
+ if (malaya_hi < 10) {
+ mes "Door is closed. It seems keeping its eyes on you.";
+ close;
+ }
+ warp "ma_in01",36,152;
+ end;
+}
// Town Warps
-malaya,309,70,0 warp malaya_field0001 1,1,ma_in01,108,92
-ma_in01,105,92,0 warp malaya_field0002 1,1,malaya,310,67
-malaya,300,211,0 warp malaya_field0003 1,1,ma_in01,36,152
-ma_in01,33,152,0 warp malaya_field0004 1,1,malaya,297,211
-malaya,178,211,0 warp malaya_field0005 1,1,ma_in01,24,80
-ma_in01,24,77,0 warp malaya_field0006 1,1,malaya,178,208
-malaya,112,212,0 warp malaya_field0007 1,1,ma_in01,83,16
-ma_in01,86,16,0 warp malaya_field0008 1,1,malaya,115,212
-malaya,299,167,0 warp malaya_field0009 1,1,ma_in01,12,24
-ma_in01,9,24,0 warp malaya_field0010 1,1,malaya,296,167
-malaya,261,240,0 warp malaya_field0011 1,1,ma_in01,126,20
-ma_in01,126,17,0 warp malaya_field0012 1,1,malaya,261,237
-malaya,370,277,0 warp malaya_field0013 1,1,ma_fild01,40,272
-ma_fild01,37,272,0 warp malaya_field0014 1,1,malaya,367,277
-ma_fild01,266,359,0 warp malaya_field0015 1,1,ma_fild02,248,36
-ma_fild02,248,33,0 warp malaya_field0016 1,1,ma_fild01,266,356
-ma_fild01,251,190,0 warp malaya_field0017 1,1,ma_in01,108,160
-ma_in01,105,160,0 warp malaya_field0018 1,1,ma_fild01,249,192
-ma_fild01,288,52,0 warp malaya_field0019 1,1,ma_scene01,142,78
-ma_scene01,140,80,0 warp malaya_field0020 1,1,ma_fild01,288,55
+ma_in01,86,16,0 warp mal_in_ws 1,1,malaya,115,212
+ma_in01,24,77,0 warp mal_in_inn 1,1,malaya,178,208
+malaya,370,277,0 warp malaya_mal_fild01 1,1,ma_fild01,40,272
+ma_fild01,37,272,0 warp mal_fild01_malaya 1,1,malaya,367,277
+ma_in01,33,152,0 warp mal_in_house01 1,1,malaya,52,75
+malaya,309,70,0 warp malaya_ship_mal_in_ship 1,1,ma_in01,108,92
+ma_in01,105,92,0 warp mal_in_ship_malaya_ship 1,1,malaya,310,67
+ma_fild01,266,359,0 warp mafild01_to02 1,1,ma_fild02,248,36
+ma_fild02,248,33,0 warp mafild02_to01 1,1,ma_fild01,266,356
+ma_fild01,288,52,0 warp mafild01_tobknw 1,1,ma_scene01,142,78
+ma_scene01,140,80,0 warp bknw_tofild01 1,1,ma_fild01,288,55
+ma_in01,9,24,0 warp mal_in_ts 1,1,malaya,296,167
+ma_in01,126,17,0 warp mal_in_shop_malaya_shop 1,1,malaya,261,237
+ma_fild01,251,190,0 warp mf_minga_mf_in_minga 1,1,ma_in01,108,160
+ma_in01,105,160,0 warp mf_in_minga_mf_minga 1,1,ma_fild01,248,190
// Car Warps
ma_zif01,30,22,0 warp malaya_car0001 1,1,malaya,241,238
@@ -43,4 +99,4 @@ ma_zif05,30,22,0 warp malaya_car0005 1,1,malaya,341,150
ma_zif06,30,22,0 warp malaya_car0006 1,1,malaya,294,293
ma_zif07,30,22,0 warp malaya_car0007 1,1,malaya,239,221
ma_zif08,30,22,0 warp malaya_car0008 1,1,malaya,59,246
-ma_zif09,30,22,0 warp malaya_car0009 1,1,malaya,254,68
+ma_zif09,30,22,0 warp malaya_car0009 1,1,malaya,254,68 \ No newline at end of file
diff --git a/npc/re/warps/cities/rachel.txt b/npc/re/warps/cities/rachel.txt
index 8610fa3bf..eb2b0722f 100644
--- a/npc/re/warps/cities/rachel.txt
+++ b/npc/re/warps/cities/rachel.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Rachel Warp Script
//===== By: ==================================================
//= erKURITA & RockmanEXE
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= Warp Points for Rachel City, shops & other locations
//===== Additional Comments: =================================
diff --git a/npc/re/warps/cities/yggdrasil.txt b/npc/re/warps/cities/yggdrasil.txt
index 92f084372..3076d22b1 100644
--- a/npc/re/warps/cities/yggdrasil.txt
+++ b/npc/re/warps/cities/yggdrasil.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Yggdrasil Tree Warp Script
//===== By: ==================================================
//= PKGINGO (1.0)
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= Any Athena Version; RO Episode 6+
+//= Hercules; RO Episode 6+
//===== Description: =========================================
//= Warp Points for Yggdrasil Tree
//===== Additional Comments: =================================
diff --git a/npc/re/warps/dungeons/dic_dun.txt b/npc/re/warps/dungeons/dic_dun.txt
index 2af6d4445..9016c3e0c 100644
--- a/npc/re/warps/dungeons/dic_dun.txt
+++ b/npc/re/warps/dungeons/dic_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Scaraba Hole Warp Script
//===== By: ==================================================
//= Chilly, Muad_Dib
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Warp Points for Scaraba Hole
//===== Additional Comments: =================================
diff --git a/npc/re/warps/dungeons/ecl_dun.txt b/npc/re/warps/dungeons/ecl_dun.txt
index 6d6bb321a..5209c4f25 100644
--- a/npc/re/warps/dungeons/ecl_dun.txt
+++ b/npc/re/warps/dungeons/ecl_dun.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Eclage Dungeon Warp Script
//===== By: ==================================================
//= Chilly
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Warp Points for Eclage Dungeon
//===== Additional Comments: =================================
diff --git a/npc/re/warps/dungeons/iz_dun.txt b/npc/re/warps/dungeons/iz_dun.txt
index 3ef9ab86e..bbe68f8b8 100644
--- a/npc/re/warps/dungeons/iz_dun.txt
+++ b/npc/re/warps/dungeons/iz_dun.txt
@@ -1,4 +1,4 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Izlude Dungeon Renewal Warp Script
//===== By: ==================================================
//= Athena (1.0)
@@ -6,7 +6,7 @@
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= Warp Points for Bibilyn Island & Undersea Cave
//===== Additional Comments: =================================
diff --git a/npc/re/warps/fields/bif_fild.txt b/npc/re/warps/fields/bif_fild.txt
index 3a32c3e75..ec9de1cf9 100644
--- a/npc/re/warps/fields/bif_fild.txt
+++ b/npc/re/warps/fields/bif_fild.txt
@@ -1,20 +1,44 @@
-//===== Hercules Script ======================================
+//===== rAthena Script =======================================
//= Bifrost Field Warp Script
//===== By: ==================================================
//= Chilly
//===== Current Version: =====================================
-//= 1.0
+//= 1.2
+//===== Compatible With: =====================================
+//= rAthena SVN
//===== Description: =========================================
//= Warp Points for Bifrost Field
//===== Additional Comments: =================================
//= 1.0 First Version.
+//= 1.1 Added official warp scripts. [Euphy]
+//= 1.2 Updated to match the official script. [Euphy]
//============================================================
splendide,275,390,0 warp bifrost_field0001 1,1,bif_fild01,316,50
-bif_fild01,318,48,0 warp bifrost_field0002 1,1,splendide,275,387
-bif_fild02,285,333,0 warp bifrost_field0003 1,1,mora,179,74
-mora,182,74,0 warp bifrost_field0004 1,1,bif_fild02,285,330
-bif_fild02,95,310,0 warp bifrost_field0005 1,1,mora,22,157
-mora,20,159,0 warp bifrost_field0006 1,1,bif_fild02,98,309
-bif_fild02,174,162,0 warp bifrost_field0007 1,1,mora,58,27
-mora,56,25,0 warp bifrost_field0008 1,1,bif_fild02,177,162
+bif_fild01,318,48,0 warp bifrost_field0002 1,1,splendide,271,382
+mora,182,74,0 warp bifrost_field0003 1,1,bif_fild02,286,327
+mora,20,159,0 warp bifrost_field0004 1,1,bif_fild02,99,308
+mora,56,25,0 warp bifrost_field0005 1,1,bif_fild02,176,162
+
+- script bifrost_field0000 -1,{
+ mes "At the end of the small path through the bright flower garden";
+ mes "is an entrance to something that looks like a small hill.";
+ next;
+ if(select("Knock-knock:Is this a wormhole?") == 1) {
+ mes "When you knock on the door-like thing just for fun,";
+ mes "the door clicks open and you feel some mysterious force pulling you inside.";
+ close2;
+ switch(atoi(charat(strnpcinfo(2),9))) {
+ case 1: warp "mora",179,74; end;
+ case 2: warp "mora",22,157; end;
+ case 3: warp "mora",58,27; end;
+ }
+ }
+ close;
+OnTouch:
+ specialeffect EF_LEVEL99_4;
+ end;
+}
+bif_fild02,285,332,0 duplicate(bifrost_field0000) Small Hole#ep14_mora1 844
+bif_fild02,95,310,0 duplicate(bifrost_field0000) Small Hole#ep14_mora2 844
+bif_fild02,174,162,0 duplicate(bifrost_field0000) Small Hole#ep14_mora3 844
diff --git a/npc/re/warps/fields/com_fild.txt b/npc/re/warps/fields/com_fild.txt
index 765874af1..c90257eb3 100644
--- a/npc/re/warps/fields/com_fild.txt
+++ b/npc/re/warps/fields/com_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Comodo Field Warp Script
//===== By: ==================================================
//= Nana
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= [Aegis Conversion]
//= Warp Points for Comodo Fields
diff --git a/npc/re/warps/fields/dic_fild.txt b/npc/re/warps/fields/dic_fild.txt
index d49b5f5c7..41ac07aaf 100644
--- a/npc/re/warps/fields/dic_fild.txt
+++ b/npc/re/warps/fields/dic_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= El Dicastes Field Warp Script
//===== By: ==================================================
//= Chilly, Muad_Dib
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Warp Points for El Dicastes Field
//===== Additional Comments: =================================
diff --git a/npc/re/warps/fields/geffen_fild.txt b/npc/re/warps/fields/geffen_fild.txt
index 08b0e46e2..289ad3a6c 100644
--- a/npc/re/warps/fields/geffen_fild.txt
+++ b/npc/re/warps/fields/geffen_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Geffen Warp Script
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= Warp Points for Geffen Field's
//===== Additional Comments: =================================
diff --git a/npc/re/warps/fields/hugel_fild.txt b/npc/re/warps/fields/hugel_fild.txt
index 8b5de97b2..309ba8cc1 100644
--- a/npc/re/warps/fields/hugel_fild.txt
+++ b/npc/re/warps/fields/hugel_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Hugel Field Warp Script
//===== By: ==================================================
//= Sara-chan (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version; RO Episode 10+
+//= Hercules; RO Episode 10+
//===== Description: =========================================
//= Warp Points for Hugel Field
//===== Additional Comments: =================================
diff --git a/npc/re/warps/fields/morroc_fild.txt b/npc/re/warps/fields/morroc_fild.txt
index 6cd6c64b5..b256e9413 100644
--- a/npc/re/warps/fields/morroc_fild.txt
+++ b/npc/re/warps/fields/morroc_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Morroc Field Warp Script
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
//= 1.4b
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= Warp Points for Morroc Fields
//===== Additional Comments: =================================
diff --git a/npc/re/warps/fields/payon_fild.txt b/npc/re/warps/fields/payon_fild.txt
index d991f2280..5bec271e8 100644
--- a/npc/re/warps/fields/payon_fild.txt
+++ b/npc/re/warps/fields/payon_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Payon Field Warps
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any rAthena Mod
+//= Hercules
//===== Description: =========================================
//= Payon Field Warps
//===== Additional Comments: =================================
diff --git a/npc/re/warps/fields/prontera_fild.txt b/npc/re/warps/fields/prontera_fild.txt
index 16d3c8238..2267c298d 100644
--- a/npc/re/warps/fields/prontera_fild.txt
+++ b/npc/re/warps/fields/prontera_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Prontera Field Warp Script
//===== By: ==================================================
//= Nana (1.0)
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= Warp Points for Prontera Field
//===== Additional Comments: =================================
diff --git a/npc/re/warps/fields/rachel_fild.txt b/npc/re/warps/fields/rachel_fild.txt
index 475557200..87d4f16d7 100644
--- a/npc/re/warps/fields/rachel_fild.txt
+++ b/npc/re/warps/fields/rachel_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Rachel Field Warp Script
//===== By: ==================================================
//= Playtester
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= Warp Points for Rachel Field
//===== Additional Comments: =================================
diff --git a/npc/re/warps/fields/veins_fild.txt b/npc/re/warps/fields/veins_fild.txt
index ac05163ff..c1a5cce5a 100644
--- a/npc/re/warps/fields/veins_fild.txt
+++ b/npc/re/warps/fields/veins_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Veins Field Warp Script
//===== By: ==================================================
//= $ephiroth
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= Warp Points for Veins Field
//===== Additional Comments: =================================
diff --git a/npc/re/warps/fields/yuno_fild.txt b/npc/re/warps/fields/yuno_fild.txt
index 32d1924f5..b570fca9e 100644
--- a/npc/re/warps/fields/yuno_fild.txt
+++ b/npc/re/warps/fields/yuno_fild.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Yuno Field Warp Script
//===== By: ==================================================
//= Nana (1.0), Sara
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
-//= Any Athena Version; RO Episode 5+
+//= Hercules; RO Episode 5+
//===== Description: =========================================
//= Warp Points for Yuno Field
//===== Additional Comments: =================================
diff --git a/npc/re/warps/other/jobquests.txt b/npc/re/warps/other/jobquests.txt
index 5dec2077c..5b62a74a4 100644
--- a/npc/re/warps/other/jobquests.txt
+++ b/npc/re/warps/other/jobquests.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Job Quest Renewal Warp Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 2.2
//===== Compatible With: =====================================
-//= Any Athena Version; RO Version Ep4+
+//= Hercules; RO Version Ep4+
//===== Description: =========================================
//= Warp Points for Job Quest Maps
//===== Additional Comments: =================================
diff --git a/npc/re/warps/other/paradise.txt b/npc/re/warps/other/paradise.txt
index fec766ec4..4d4b241a9 100644
--- a/npc/re/warps/other/paradise.txt
+++ b/npc/re/warps/other/paradise.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Paradise Group Warp Script
//===== By: ==================================================
//= Chilly
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
-//= rAthena SVN;
+//= Hercules
//===== Description: =========================================
//= Warp Points for Paradise Group
//===== Additional Comments: =================================
diff --git a/npc/re/warps/other/s_workshop.txt b/npc/re/warps/other/s_workshop.txt
index 884d77202..bc04509b3 100644
--- a/npc/re/warps/other/s_workshop.txt
+++ b/npc/re/warps/other/s_workshop.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Shadow Workshop Warp Script
//===== By: ==================================================
//= Chilly
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Warp Points for Shadow Workshop
//===== Additional Comments: =================================
diff --git a/npc/re/warps/other/sign.txt b/npc/re/warps/other/sign.txt
index fb24620f8..84895c26b 100644
--- a/npc/re/warps/other/sign.txt
+++ b/npc/re/warps/other/sign.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Sign Quest Warps
//===== By: ==================================================
//= MasterOfMuppets
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= Any Athena Version; RO Episode 8+
+//= Hercules; RO Episode 8+
//===== Description: =========================================
//= Warp Points related to the Sign Quest will be put here
//===== Additional Comments: =================================
diff --git a/npc/scripts.conf b/npc/scripts.conf
index c405aff88..65cfe53f5 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -1,4 +1,9 @@
+// --------------------------------------------------------------
+// - Message of the Day -
+// --------------------------------------------------------------
npc: npc/MOTD.txt
+
+
// --------------------------------------------------------------
// - Core Scripts -
// --------------------------------------------------------------
@@ -134,6 +139,7 @@ npc: npc/merchants/enchan_arm.txt
npc: npc/merchants/gemstone.txt
npc: npc/merchants/hair_dyer.txt
npc: npc/merchants/hair_style.txt
+//npc: npc/merchants/hd_refine.txt
//npc: npc/merchants/icecream.txt
npc: npc/merchants/inn.txt
npc: npc/merchants/kunai_maker.txt
diff --git a/npc/scripts_jobs.conf b/npc/scripts_jobs.conf
index 966f9fbfa..61191700e 100644
--- a/npc/scripts_jobs.conf
+++ b/npc/scripts_jobs.conf
@@ -43,7 +43,6 @@ npc: npc/jobs/2-2a/Stalker.txt
npc: npc/jobs/2-2e/SoulLinker.txt
// - Novice
npc: npc/jobs/novice/supernovice.txt
-npc: npc/jobs/novice/novice.txt
// - Transcended Quest (2-x -> High Novice)
npc: npc/jobs/valkyrie.txt
diff --git a/npc/warps/guildcastles.txt b/npc/warps/guildcastles.txt
index 923d9b2bc..f41fc2a5d 100644
--- a/npc/warps/guildcastles.txt
+++ b/npc/warps/guildcastles.txt
@@ -1,11 +1,11 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Guild Castles Warp Script
//===== By: ==================================================
//= Athena (1.0)
//===== Current Version: =====================================
//= 2.7
//===== Compatible With: =====================================
-//= Any Athena Version
+//= Hercules
//===== Description: =========================================
//= Warp Points for Al de Baran, Payon, Prontera, Geffen,
//= and Juno Guild Castles
diff --git a/npc/warps/pvp.txt b/npc/warps/pvp.txt
index c0e6b09a3..2d28a94d8 100644
--- a/npc/warps/pvp.txt
+++ b/npc/warps/pvp.txt
@@ -5,7 +5,7 @@
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
-//= Hercules GIT
+//= Hercules
//===== Description: =========================================
//= Warp Points for Prontera Arena and PvP Maps
//===== Additional Comments: =================================
diff --git a/src/char/char.c b/src/char/char.c
index f4212a076..97ad493b1 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -81,7 +81,8 @@ struct mmo_map_server {
uint32 ip;
uint16 port;
int users;
- unsigned short map[MAX_MAP_PER_SERVER];
+ unsigned short *map;
+ unsigned short maps;
} server[MAX_MAP_SERVERS];
int char_fd=-1;
@@ -2628,7 +2629,7 @@ int search_mapserver(unsigned short map, uint32 ip, uint16 port);
/// Initializes a server structure.
void mapif_server_init(int id)
{
- memset(&server[id], 0, sizeof(server[id]));
+ //memset(&server[id], 0, sizeof(server[id]));
server[id].fd = -1;
}
@@ -2655,7 +2656,7 @@ void mapif_server_reset(int id)
WBUFL(buf,4) = htonl(server[id].ip);
WBUFW(buf,8) = htons(server[id].port);
j = 0;
- for(i = 0; i < MAX_MAP_PER_SERVER; i++)
+ for(i = 0; i < server[id].maps; i++)
if (server[id].map[i])
WBUFW(buf,10+(j++)*4) = server[id].map[i];
if (j > 0) {
@@ -2725,8 +2726,11 @@ int parse_frommap(int fd)
case 0x2afa: // Receiving map names list from the map-server
if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
return 0;
-
- memset(server[id].map, 0, sizeof(server[id].map));
+ if( server[id].map != NULL ) { aFree(server[id].map); server[id].map = NULL; }
+
+ server[id].maps = ( RFIFOW(fd, 2) - 4 ) / 4;
+ CREATE(server[id].map, unsigned short, server[id].maps);
+
j = 0;
for(i = 4; i < RFIFOW(fd,2); i += 4) {
server[id].map[j] = RFIFOW(fd,i);
@@ -3392,10 +3396,14 @@ int parse_frommap(int fd)
if( RFIFOREST(fd) < RFIFOW(fd,4) )
return 0;/* packet wasn't fully received yet (still fragmented) */
else {
- int sfd;/* stat server fd */
+ int sfd;/* stat server fd */
+ struct hSockOpt opt;
RFIFOSKIP(fd, 2);/* we skip first 2 bytes which are the 0x3008, so we end up with a buffer equal to the one we send */
- if( (sfd = make_connection(host2ip("stats.hercules.ws"),(uint16)25427,true) ) == -1 ) {
+ opt.silent = 1;
+ opt.setTimeo = 1;
+
+ if( (sfd = make_connection(host2ip("stats.hercules.ws"),(uint16)25427,&opt) ) == -1 ) {
RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */
RFIFOFLUSH(fd);
break;/* connection not possible, we drop the report */
@@ -4275,7 +4283,6 @@ int parse_char(int fd)
server[i].ip = ntohl(RFIFOL(fd,54));
server[i].port = ntohs(RFIFOW(fd,58));
server[i].users = 0;
- memset(server[i].map, 0, sizeof(server[i].map));
session[fd]->func_parse = parse_frommap;
session[fd]->flag.server = 1;
realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
@@ -4486,12 +4493,12 @@ int check_connect_login_server(int tid, unsigned int tick, int id, intptr_t data
return 0;
ShowInfo("Attempt to connect to login-server...\n");
- login_fd = make_connection(login_ip, login_port, false);
- if (login_fd == -1)
- { //Try again later. [Skotlex]
+
+ if ( (login_fd = make_connection(login_ip, login_port, NULL)) == -1) { //Try again later. [Skotlex]
login_fd = 0;
return 0;
}
+
session[login_fd]->func_parse = parse_fromlogin;
session[login_fd]->flag.server = 1;
realloc_fifo(login_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
@@ -4858,8 +4865,8 @@ int char_config_read(const char* cfgName)
return 0;
}
-void do_final(void)
-{
+void do_final(void) {
+ int i;
ShowStatus("Terminating...\n");
set_all_offline(-1);
@@ -4879,8 +4886,7 @@ void do_final(void)
online_char_db->destroy(online_char_db, NULL);
auth_db->destroy(auth_db, NULL);
- if( char_fd != -1 )
- {
+ if( char_fd != -1 ) {
do_close(char_fd);
char_fd = -1;
}
@@ -4888,6 +4894,10 @@ void do_final(void)
SQL->Free(sql_handle);
mapindex_final();
+ for(i = 0; i < MAX_MAP_SERVERS; i++ )
+ if( server[i].map )
+ aFree(server[i].map);
+
ShowStatus("Finished.\n");
}
@@ -4923,11 +4933,17 @@ void do_shutdown(void)
int do_init(int argc, char **argv) {
+ int i;
memset(&skillid2idx, 0, sizeof(skillid2idx));
+
+ for(i = 0; i < MAX_MAP_SERVERS; i++ )
+ server[i].map = NULL;
+
//Read map indexes
mapindex_init();
start_point.map = mapindex_name2id("new_zone01");
+
pincode_defaults();
char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
diff --git a/src/char/char.h b/src/char/char.h
index b48ea359c..996a0e845 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -45,7 +45,7 @@ struct online_char_data {
DBMap* online_char_db; // int account_id -> struct online_char_data*
-#define MAX_MAP_SERVERS 30
+#define MAX_MAP_SERVERS 2
#define DEFAULT_AUTOSAVE_INTERVAL 300*1000
diff --git a/src/common/console.c b/src/common/console.c
index ba93b8e09..33d485497 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -85,6 +85,9 @@ CPCMD(exit) {
CPCMD(ers_report) {
ers_report();
}
+CPCMD(mem_report) {
+ memmgr_report(line?atoi(line):0);
+}
CPCMD(help) {
unsigned int i = 0;
for ( i = 0; i < console->cmd_list_count; i++ ) {
@@ -115,6 +118,7 @@ void console_load_defaults(void) {
CP_DEF(help),
CP_DEF_C(server),
CP_DEF_S(ers_report,server),
+ CP_DEF_S(mem_report,server),
CP_DEF_S(malloc_usage,server),
CP_DEF_S(exit,server),
};
@@ -227,8 +231,10 @@ void console_parse_sub(char *line) {
char *tok;
char sublist[CP_CMD_LENGTH * 5];
unsigned int i, len = 0;
+
memcpy(bline, line, 200);
tok = strtok(line, " ");
+
for ( i = 0; i < console->cmd_list_count; i++ ) {
if( strcmpi(tok,console->cmd_list[i]->cmd) == 0 )
break;
diff --git a/src/common/malloc.c b/src/common/malloc.c
index 592027f56..372991fbe 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -200,6 +200,8 @@ static struct unit_head_large *unit_head_large_first = NULL;
static struct block* block_malloc(unsigned short hash);
static void block_free(struct block* p);
static size_t memmgr_usage_bytes;
+static size_t memmgr_usage_bytes_t;
+
#define block2unit(p, n) ((struct unit_head*)(&(p)->data[ p->unit_size * (n) ]))
#define memmgr_assert(v) do { if(!(v)) { ShowError("Memory manager: assertion '" #v "' failed!\n"); } } while(0)
@@ -245,6 +247,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func )
/* At that time, the distinction by assigning NULL to unit_head.block */
if(hash2size(size_hash) > BLOCK_DATA_SIZE - sizeof(struct unit_head)) {
struct unit_head_large* p = (struct unit_head_large*)MALLOC(sizeof(struct unit_head_large)+size,file,line,func);
+ memmgr_usage_bytes_t += size+sizeof(struct unit_head_large);
if(p != NULL) {
p->size = size;
p->unit_head.block = NULL;
@@ -401,6 +404,7 @@ void _mfree(void *ptr, const char *file, int line, const char *func )
head_large->next->prev = head_large->prev;
}
memmgr_usage_bytes -= head_large->size;
+ memmgr_usage_bytes_t -= head_large->size + sizeof(struct unit_head_large);
#ifdef DEBUG_MEMMGR
// set freed memory to 0xfd
memset(ptr, 0xfd, head_large->size);
@@ -457,6 +461,7 @@ static struct block* block_malloc(unsigned short hash)
} else {
/* Newly allocated space for the block */
p = (struct block*)MALLOC(sizeof(struct block) * (BLOCK_ALLOC), __FILE__, __LINE__, __func__ );
+ memmgr_usage_bytes_t += sizeof(struct block) * (BLOCK_ALLOC);
if(p == NULL) {
ShowFatalError("Memory manager::block_alloc failed.\n");
exit(EXIT_FAILURE);
@@ -650,6 +655,86 @@ static void memmgr_final (void)
}
#endif /* LOG_MEMMGR */
}
+/* [Ind/Hercules] */
+void memmgr_report (int extra) {
+ struct block *block = block_first;
+ struct unit_head_large *large = unit_head_large_first;
+ unsigned int count = 0, size = 0;
+ int j;
+ unsigned short msize = 1024;
+ struct {
+ const char *file;
+ unsigned short line;
+ unsigned int size;
+ unsigned int count;
+ } data[100];
+ memset(&data, 0, sizeof(data));
+
+ if( extra != 0 )
+ msize = extra;
+
+ while (block) {
+ if (block->unit_used) {
+ int i;
+ for (i = 0; i < block->unit_maxused; i++) {
+ struct unit_head *head = block2unit(block, i);
+ if( head->block != NULL && head->size > msize ) {
+ for( j = 0; j < 100; j++ ) {
+ if( data[j].file == head->file && data[j].line == head->line ) {
+ data[j].size += head->size;
+ data[j].count += 1;
+ break;
+ } else if( data[j].size == 0 ) {
+ data[j].file = head->file;
+ data[j].line = head->line;
+ data[j].size = head->size;
+ data[j].count += 1;
+ break;
+ }
+ }
+ size += (unsigned int)head->size;
+ count++;
+ }
+ }
+ }
+ block = block->block_next;
+ }
+
+ while(large) {
+ if( large->size > msize ) {
+ for( j = 0; j < 100; j++ ) {
+ if( data[j].file == large->unit_head.file && data[j].line == large->unit_head.line ) {
+ data[j].size += large->size;
+ data[j].count += 1;
+ break;
+ } else if( data[j].size == 0 ) {
+ data[j].file = large->unit_head.file;
+ data[j].line = large->unit_head.line;
+ data[j].size = large->size;
+ data[j].count += 1;
+ break;
+ }
+ }
+ size += (unsigned int)large->size;
+ count++;
+ }
+ large = large->next;
+ }
+ for( j = 0; j < 100; j++ ) {
+ if( data[j].size != 0 ) {
+ ShowMessage("[malloc] : "CL_WHITE"%s"CL_RESET":"CL_WHITE"%d"CL_RESET" %d instances => %.2f MB\n",data[j].file,data[j].line,data[j].count,(double)((data[j].size)/1024)/1024);
+ }
+ }
+ ShowMessage("[malloc] : reporting %u instances | %.2f MB\n",count,(double)((size)/1024)/1024);
+ ShowMessage("[malloc] : internal usage %.2f MB | %.2f MB\n",(double)((memmgr_usage_bytes_t-memmgr_usage_bytes)/1024)/1024,(double)((memmgr_usage_bytes_t)/1024)/1024);
+
+ if( extra ) {
+ ShowMessage("[malloc] : unit_head_large: %d bytes\n",sizeof(struct unit_head_large));
+ ShowMessage("[malloc] : unit_head: %d bytes\n",sizeof(struct unit_head));
+ ShowMessage("[malloc] : block: %d bytes\n",sizeof(struct block));
+ }
+
+}
static void memmgr_init (void)
{
@@ -677,8 +762,7 @@ void malloc_memory_check(void)
/// Returns true if a pointer is valid.
/// The check is best-effort, false positives are possible.
-bool malloc_verify_ptr(void* ptr)
-{
+bool malloc_verify_ptr(void* ptr) {
#ifdef USE_MEMMGR
return memmgr_verify(ptr) && MEMORY_VERIFY(ptr);
#else
@@ -687,8 +771,7 @@ bool malloc_verify_ptr(void* ptr)
}
-size_t malloc_usage (void)
-{
+size_t malloc_usage (void) {
#ifdef USE_MEMMGR
return memmgr_usage ();
#else
@@ -696,16 +779,16 @@ size_t malloc_usage (void)
#endif
}
-void malloc_final (void)
-{
+void malloc_final (void) {
#ifdef USE_MEMMGR
memmgr_final ();
#endif
MEMORY_CHECK();
}
-void malloc_init (void)
-{
+void malloc_init (void) {
+ memmgr_usage_bytes_t = 0;
+ memmgr_usage_bytes = 0;
#if defined(DMALLOC) && defined(CYGWIN)
// http://dmalloc.com/docs/latest/online/dmalloc_19.html
dmalloc_debug_setup(getenv("DMALLOC_OPTIONS"));
@@ -720,8 +803,7 @@ void malloc_init (void)
#endif
}
-void malloc_defaults()
-{
+void malloc_defaults(void) {
malloclib = &malloclib_s;
malloclib->init = malloc_init;
malloclib->final = malloc_final;
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 34a26b56e..1b8e82bd9 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -80,5 +80,7 @@ struct malloc_interface {
void (*final) (void);
} malloclib_s;
+void memmgr_report (int extra);
+
struct malloc_interface *malloclib;
#endif /* _MALLOC_H_ */
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 172b27b15..c2fdfe43a 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -72,7 +72,6 @@
#define MAX_HOTKEYS 38
#endif
-#define MAX_MAP_PER_SERVER 1500 // Increased to allow creation of Instance Maps
#define MAX_INVENTORY 100
//Max number of characters per account. Note that changing this setting alone is not enough if the client is not hexed to support more characters as well.
#define MAX_CHARS 9
@@ -104,7 +103,7 @@
#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
#define MAX_GUILDLEVEL 50
#define MAX_GUARDIANS 8 // Local max per castle. [Skotlex]
-#define MAX_QUEST_DB 2400 // Max quests that the server will load
+#define MAX_QUEST_DB 2410 // Max quests that the server will load
#define MAX_QUEST_OBJECTIVES 3 // Max quest objectives for a quest
#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
@@ -527,6 +526,10 @@ struct guild {
/* TODO: still used for something?|: */
unsigned short save_flag; // for TXT saving
+
+ unsigned short *instance;
+ unsigned short instances;
+
void *channel;
};
diff --git a/src/common/socket.c b/src/common/socket.c
index 5126d231b..0459004cc 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -280,9 +280,10 @@ void set_nonblocking(int fd, unsigned long yes)
ShowError("set_nonblocking: Failed to set socket #%d to non-blocking mode (%s) - Please report this!!!\n", fd, error_msg());
}
-void setsocketopts(int fd)
-{
+void setsocketopts(int fd, struct hSockOpt *opt) {
int yes = 1; // reuse fix
+ struct linger lopt;
+
#if !defined(WIN32)
// set SO_REAUSEADDR to true, unix only. on windows this option causes
// the previous owner of the socket to give up, which is not desirable
@@ -297,15 +298,22 @@ void setsocketopts(int fd)
// The RO protocol is mainly single-packet request/response, plus the FIFO model already does packet grouping anyway.
sSetsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&yes, sizeof(yes));
+ if( opt && opt->setTimeo ) {
+ struct timeval timeout;
+
+ timeout.tv_sec = 5;
+ timeout.tv_usec = 0;
+
+ sSetsockopt(fd,SOL_SOCKET,SO_RCVTIMEO,(char *)&timeout,sizeof(timeout));
+ sSetsockopt(fd,SOL_SOCKET,SO_SNDTIMEO,(char *)&timeout,sizeof(timeout));
+ }
+
// force the socket into no-wait, graceful-close mode (should be the default, but better make sure)
//(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/closesocket_2.asp)
- {
- struct linger opt;
- opt.l_onoff = 0; // SO_DONTLINGER
- opt.l_linger = 0; // Do not care
- if( sSetsockopt(fd, SOL_SOCKET, SO_LINGER, (char*)&opt, sizeof(opt)) )
+ lopt.l_onoff = 0; // SO_DONTLINGER
+ lopt.l_linger = 0; // Do not care
+ if( sSetsockopt(fd, SOL_SOCKET, SO_LINGER, (char*)&lopt, sizeof(lopt)) )
ShowWarning("setsocketopts: Unable to set SO_LINGER mode for connection #%d!\n", fd);
- }
}
/*======================================
@@ -404,8 +412,7 @@ void flush_fifos(void)
/*======================================
* CORE : Connection functions
*--------------------------------------*/
-int connect_client(int listen_fd)
-{
+int connect_client(int listen_fd) {
int fd;
struct sockaddr_in client_address;
socklen_t len;
@@ -417,20 +424,18 @@ int connect_client(int listen_fd)
ShowError("connect_client: accept failed (%s)!\n", error_msg());
return -1;
}
- if( fd == 0 )
- {// reserved
+ if( fd == 0 ) { // reserved
ShowError("connect_client: Socket #0 is reserved - Please report this!!!\n");
sClose(fd);
return -1;
}
- if( fd >= FD_SETSIZE )
- {// socket number too big
+ if( fd >= FD_SETSIZE ) { // socket number too big
ShowError("connect_client: New socket #%d is greater than can we handle! Increase the value of FD_SETSIZE (currently %d) for your OS to fix this!\n", fd, FD_SETSIZE);
sClose(fd);
return -1;
}
- setsocketopts(fd);
+ setsocketopts(fd,NULL);
set_nonblocking(fd, 1);
#ifndef MINICORE
@@ -457,25 +462,22 @@ int make_listen_bind(uint32 ip, uint16 port)
fd = sSocket(AF_INET, SOCK_STREAM, 0);
- if( fd == -1 )
- {
+ if( fd == -1 ) {
ShowError("make_listen_bind: socket creation failed (%s)!\n", error_msg());
exit(EXIT_FAILURE);
}
- if( fd == 0 )
- {// reserved
+ if( fd == 0 ) { // reserved
ShowError("make_listen_bind: Socket #0 is reserved - Please report this!!!\n");
sClose(fd);
return -1;
}
- if( fd >= FD_SETSIZE )
- {// socket number too big
+ if( fd >= FD_SETSIZE ) { // socket number too big
ShowError("make_listen_bind: New socket #%d is greater than can we handle! Increase the value of FD_SETSIZE (currently %d) for your OS to fix this!\n", fd, FD_SETSIZE);
sClose(fd);
return -1;
}
- setsocketopts(fd);
+ setsocketopts(fd,NULL);
set_nonblocking(fd, 1);
server_address.sin_family = AF_INET;
@@ -503,7 +505,7 @@ int make_listen_bind(uint32 ip, uint16 port)
return fd;
}
-int make_connection(uint32 ip, uint16 port, bool silent) {
+int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) {
struct sockaddr_in remote_address;
int fd;
int result;
@@ -514,31 +516,29 @@ int make_connection(uint32 ip, uint16 port, bool silent) {
ShowError("make_connection: socket creation failed (%s)!\n", error_msg());
return -1;
}
- if( fd == 0 )
- {// reserved
+ if( fd == 0 ) {// reserved
ShowError("make_connection: Socket #0 is reserved - Please report this!!!\n");
sClose(fd);
return -1;
}
- if( fd >= FD_SETSIZE )
- {// socket number too big
+ if( fd >= FD_SETSIZE ) {// socket number too big
ShowError("make_connection: New socket #%d is greater than can we handle! Increase the value of FD_SETSIZE (currently %d) for your OS to fix this!\n", fd, FD_SETSIZE);
sClose(fd);
return -1;
}
- setsocketopts(fd);
+ setsocketopts(fd,opt);
remote_address.sin_family = AF_INET;
remote_address.sin_addr.s_addr = htonl(ip);
remote_address.sin_port = htons(port);
- if( !silent )
+ if( !( opt && opt->silent ) )
ShowStatus("Connecting to %d.%d.%d.%d:%i\n", CONVIP(ip), port);
result = sConnect(fd, (struct sockaddr *)(&remote_address), sizeof(struct sockaddr_in));
if( result == SOCKET_ERROR ) {
- if( !silent )
+ if( !( opt && opt->silent ) )
ShowError("make_connection: connect failed (socket #%d, %s)!\n", fd, error_msg());
do_close(fd);
return -1;
diff --git a/src/common/socket.h b/src/common/socket.h
index 4879cb109..b58cbdccf 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _SOCKET_H_
#define _SOCKET_H_
@@ -48,6 +49,9 @@
} \
} while(0)
+/* [Ind/Hercules] */
+#define RFIFO2PTR(fd,len) (void*)(session[fd]->rdata + len)
+
// buffer I/O macros
#define RBUFP(p,pos) (((uint8*)(p)) + (pos))
#define RBUFB(p,pos) (*(uint8*)RBUFP((p),(pos)))
@@ -94,6 +98,10 @@ struct socket_data
void* session_data; // stores application-specific data related to the session
};
+struct hSockOpt {
+ unsigned int silent : 1;
+ unsigned int setTimeo : 1;
+};
// Data prototype declaration
@@ -113,7 +121,7 @@ extern bool session_isActive(int fd);
// Function prototype declaration
int make_listen_bind(uint32 ip, uint16 port);
-int make_connection(uint32 ip, uint16 port, bool silent);
+int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt);
int realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size);
int realloc_writefifo(int fd, size_t addition);
int WFIFOSET(int fd, size_t len);
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 65da7aa24..796447633 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3940,7 +3940,7 @@ ACMD(mapinfo) {
for (i = 0; i < map[m_id].npc_num;)
{
nd = map[m_id].npc[i];
- switch(nd->ud.dir) {
+ switch(nd->dir) {
case 0: strcpy(direction, msg_txt(1101)); break; // North
case 1: strcpy(direction, msg_txt(1102)); break; // North West
case 2: strcpy(direction, msg_txt(1103)); break; // West
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 618679406..bfcd56d8e 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -9,6 +9,7 @@
#include "../common/showmsg.h"
#include "../common/socket.h"
#include "../common/strlib.h"
+#include "../common/conf.h"
#include "battleground.h"
#include "battle.h"
@@ -16,6 +17,7 @@
#include "map.h"
#include "npc.h"
#include "pc.h"
+#include "party.h"
#include "pet.h"
#include "homunculus.h"
#include "mercenary.h"
@@ -26,14 +28,12 @@
static DBMap* bg_team_db; // int bg_id -> struct battleground_data*
static unsigned int bg_team_counter = 0; // Next bg_id
-struct battleground_data* bg_team_search(int bg_id)
-{ // Search a BG Team using bg_id
+struct battleground_data* bg_team_search(int bg_id) { // Search a BG Team using bg_id
if( !bg_id ) return NULL;
return (struct battleground_data *)idb_get(bg_team_db, bg_id);
}
-struct map_session_data* bg_getavailablesd(struct battleground_data *bg)
-{
+struct map_session_data* bg_getavailablesd(struct battleground_data *bg) {
int i;
nullpo_retr(NULL, bg);
ARR_FIND(0, MAX_BG_MEMBERS, i, bg->members[i].sd != NULL);
@@ -95,8 +95,7 @@ int bg_team_join(int bg_id, struct map_session_data *sd)
guild->send_dot_remove(sd);
- for( i = 0; i < MAX_BG_MEMBERS; i++ )
- {
+ for( i = 0; i < MAX_BG_MEMBERS; i++ ) {
if( (pl_sd = bg->members[i].sd) != NULL && pl_sd != sd )
clif->hpmeter_single(sd->fd, pl_sd->bl.id, pl_sd->battle_status.hp, pl_sd->battle_status.max_hp);
}
@@ -152,8 +151,7 @@ int bg_member_respawn(struct map_session_data *sd)
return 1; // Warped
}
-int bg_create(unsigned short mapindex, short rx, short ry, const char *ev, const char *dev)
-{
+int bg_create(unsigned short mapindex, short rx, short ry, const char *ev, const char *dev) {
struct battleground_data *bg;
bg_team_counter++;
@@ -226,12 +224,10 @@ int bg_send_xy_timer_sub(DBKey key, DBData *data, va_list ap)
struct map_session_data *sd;
int i;
nullpo_ret(bg);
- for( i = 0; i < MAX_BG_MEMBERS; i++ )
- {
+ for( i = 0; i < MAX_BG_MEMBERS; i++ ) {
if( (sd = bg->members[i].sd) == NULL )
continue;
- if( sd->bl.x != bg->members[i].x || sd->bl.y != bg->members[i].y )
- { // xy update
+ if( sd->bl.x != bg->members[i].x || sd->bl.y != bg->members[i].y ) { // xy update
bg->members[i].x = sd->bl.x;
bg->members[i].y = sd->bl.y;
clif->bg_xy(sd);
@@ -240,20 +236,496 @@ int bg_send_xy_timer_sub(DBKey key, DBData *data, va_list ap)
return 0;
}
-int bg_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
+int bg_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
bg_team_db->foreach(bg_team_db, bg_send_xy_timer_sub, tick);
return 0;
}
+void bg_config_read(void) {
+ config_t bg_conf;
+ config_setting_t *data = NULL;
+ const char *config_filename = "conf/battlegrounds.conf"; // FIXME hardcoded name
+
+ if (conf_read_file(&bg_conf, config_filename))
+ return;
+
+ data = config_lookup(&bg_conf, "battlegrounds");
+
+ if (data != NULL) {
+ config_setting_t *settings = config_setting_get_elem(data, 0);
+ config_setting_t *arenas;
+ const char *delay_var;
+ int i, arena_count = 0, total = 0, offline = 0;
+
+ if( !config_setting_lookup_string(settings, "global_delay_var", &delay_var) )
+ delay_var = "BG_Delay_Tick";
+
+ safestrncpy(bg->gdelay_var, delay_var, BG_DELAY_VAR_LENGTH);
+
+ config_setting_lookup_int(settings, "maximum_afk_seconds", &bg->mafksec);
+
+ config_setting_lookup_bool(settings, "feature_off", &offline);
+
+ if( offline == 0 )
+ bg->queue_on = true;
+
+ if( (arenas = config_setting_get_member(settings, "arenas")) != NULL ) {
+ arena_count = config_setting_length(arenas);
+ CREATE( bg->arena, struct bg_arena *, arena_count );
+ for(i = 0; i < arena_count; i++) {
+ config_setting_t *arena = config_setting_get_elem(arenas, i);
+ config_setting_t *reward;
+ const char *aName, *aEvent, *aDelayVar;
+ int minLevel = 0, maxLevel = 0;
+ int prizeWin, prizeLoss, prizeDraw;
+ int minPlayers, maxPlayers, minTeamPlayers;
+ int maxDuration;
+ int fillup_duration, pregame_duration;
+
+ bg->arena[i] = NULL;
+
+ if( !config_setting_lookup_string(arena, "name", &aName) ) {
+ ShowError("bg_config_read: failed to find 'name' for arena #%d\n",i);
+ continue;
+ }
+
+ if( !config_setting_lookup_string(arena, "event", &aEvent) ) {
+ ShowError("bg_config_read: failed to find 'event' for arena #%d\n",i);
+ continue;
+ }
+
+ config_setting_lookup_int(arena, "minLevel", &minLevel);
+ config_setting_lookup_int(arena, "maxLevel", &maxLevel);
+
+ if( minLevel < 0 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' minLevel\n",minLevel,aName);
+ minLevel = 0;
+ }
+ if( maxLevel > MAX_LEVEL ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' maxLevel\n",maxLevel,aName);
+ maxLevel = MAX_LEVEL;
+ }
+
+ if( !(reward = config_setting_get_member(settings, "reward")) ) {
+ ShowError("bg_config_read: failed to find 'reward' for arena '%s'/#%d\n",aName,i);
+ continue;
+ }
+
+ config_setting_lookup_int(reward, "win", &prizeWin);
+ config_setting_lookup_int(reward, "loss", &prizeLoss);
+ config_setting_lookup_int(reward, "draw", &prizeDraw);
+
+ if( prizeWin < 0 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' reward:win\n",prizeWin,aName);
+ prizeWin = 0;
+ }
+ if( prizeLoss < 0 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' reward:loss\n",prizeLoss,aName);
+ prizeLoss = 0;
+ }
+ if( prizeDraw < 0 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' reward:draw\n",prizeDraw,aName);
+ prizeDraw = 0;
+ }
+
+ config_setting_lookup_int(arena, "minPlayers", &minPlayers);
+ config_setting_lookup_int(arena, "maxPlayers", &maxPlayers);
+ config_setting_lookup_int(arena, "minTeamPlayers", &minTeamPlayers);
+
+ if( minPlayers < 0 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' minPlayers\n",minPlayers,aName);
+ minPlayers = 0;
+ }
+ if( maxPlayers > MAX_BG_MEMBERS * 2 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' maxPlayers, change #define MAX_BG_MEMBERS\n",maxPlayers,aName);
+ maxPlayers = 0;
+ }
+ if( minTeamPlayers < 0 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' minTeamPlayers\n",minTeamPlayers,aName);
+ minTeamPlayers = 0;
+ }
+
+ if( !config_setting_lookup_string(arena, "delay_var", &aDelayVar) ) {
+ ShowError("bg_config_read: failed to find 'delay_var' for arena '%s'/#%d\n",aName,i);
+ continue;
+ }
+
+ config_setting_lookup_int(arena, "maxDuration", &maxDuration);
+
+ if( maxDuration < 0 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' maxDuration\n",maxDuration,aName);
+ maxDuration = 30;
+ }
+
+ config_setting_lookup_int(arena, "fillDuration", &fillup_duration);
+ config_setting_lookup_int(arena, "pGameDuration", &pregame_duration);
+
+ if( fillup_duration < 20 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' fillDuration, minimum has to be 20, defaulting to 20.\n",fillup_duration,aName);
+ fillup_duration = 20;
+ }
+
+ if( pregame_duration < 20 ) {
+ ShowWarning("bg_config_read: invalid %d value for arena '%s' pGameDuration, minimum has to be 20, defaulting to 20.\n",pregame_duration,aName);
+ pregame_duration = 20;
+ }
+
+
+ CREATE( bg->arena[i], struct bg_arena, 1 );
+
+ bg->arena[i]->id = i;
+ safestrncpy(bg->arena[i]->name, aName, NAME_LENGTH);
+ safestrncpy(bg->arena[i]->npc_event, aEvent, EVENT_NAME_LENGTH);
+ bg->arena[i]->min_level = minLevel;
+ bg->arena[i]->max_level = maxLevel;
+ bg->arena[i]->prize_win = prizeWin;
+ bg->arena[i]->prize_loss = prizeLoss;
+ bg->arena[i]->prize_draw = prizeDraw;
+ bg->arena[i]->min_players = minPlayers;
+ bg->arena[i]->max_players = maxPlayers;
+ bg->arena[i]->min_team_players = minTeamPlayers;
+ safestrncpy(bg->arena[i]->delay_var, aDelayVar, NAME_LENGTH);
+ bg->arena[i]->maxDuration = maxDuration;
+ bg->arena[i]->queue_id = -1;
+ bg->arena[i]->begin_timer = INVALID_TIMER;
+ bg->arena[i]->fillup_timer = INVALID_TIMER;
+ bg->arena[i]->pregame_duration = pregame_duration;
+ bg->arena[i]->fillup_duration = fillup_duration;
+
+ total++;
+ }
+ bg->arenas = arena_count;
+ }
+
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' arenas in '"CL_WHITE"%s"CL_RESET"'.\n", total, config_filename);
+ config_destroy(&bg_conf);
+ }
+}
+struct bg_arena *bg_name2arena (char *name) {
+ int i;
+ for(i = 0; i < bg->arenas; i++) {
+ if( strcmpi(bg->arena[i]->name,name) == 0 )
+ return bg->arena[i];
+ }
+ return NULL;
+}
+int bg_id2pos ( int queue_id, int account_id ) {
+ struct hQueue *queue = script->queue(queue_id);
+ if( queue ) {
+ int i;
+ for(i = 0; i < queue->items; i++ ) {
+ if( queue->item[i] == account_id ) {
+ return i;
+ }
+ }
+ }
+ return 0;
+}
+void bg_queue_player_cleanup(struct map_session_data *sd) {
+ if ( sd->bg_queue.client_has_bg_data ) {
+ clif->bgqueue_notice_delete(sd,BGQND_CLOSEWINDOW, sd->bg_queue.arena->id);
+ }
+ script->queue_remove(sd->bg_queue.arena->queue_id,sd->status.account_id);
+ sd->bg_queue.arena = NULL;
+ sd->bg_queue.ready = 0;
+ sd->bg_queue.client_has_bg_data = 0;
+ sd->bg_queue.type = 0;
+}
+void bg_match_over(struct bg_arena *arena, bool canceled) {
+ struct hQueue *queue = &script->hq[arena->queue_id];
+ int i;//, count = 0;
+
+ /* if( !canceled ) <check time/score> */
+
+ for( i = 0; i < queue->items; i++ ) {
+ struct map_session_data * sd = NULL;
+
+ if( ( sd = map_id2sd(queue->item[i]) ) ) {
+ bg->queue_pc_cleanup(sd);
+ clif->colormes(sd->fd,COLOR_RED,"BG Match Cancelled: not enough players");
+ }
+ }
-void do_init_battleground(void)
-{
+ bg->arena[i]->begin_timer = INVALID_TIMER;
+ bg->arena[i]->fillup_timer = INVALID_TIMER;
+ /* reset queue */
+}
+void bg_begin(struct bg_arena *arena) {
+ struct hQueue *queue = &script->hq[arena->queue_id];
+ int i, count = 0;
+
+ for( i = 0; i < queue->items; i++ ) {
+ struct map_session_data * sd = NULL;
+
+ if( ( sd = map_id2sd(queue->item[i]) ) ) {
+ if( sd->bg_queue.ready == 1 )
+ count++;
+ else
+ bg->queue_pc_cleanup(sd);
+ }
+ }
+
+ if( count < arena->min_players ) {
+ bg_match_over(arena,true);
+ } else {
+ ;
+ /* we split evenly? */
+ /* but if a party of say 10 joins, it cant be split evenly unless by luck there are 10 soloers in the queue besides them */
+ /* not sure how to split T_T needs more info */
+ }
+}
+int bg_begin_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ bg->begin(bg->arena[id]);
+ return 0;
+}
+
+void bg_queue_pregame(struct bg_arena *arena) {
+ struct hQueue *queue = &script->hq[arena->queue_id];
+ int i;
+
+ for( i = 0; i < queue->items; i++ ) {
+ struct map_session_data * sd = NULL;
+
+ if( ( sd = map_id2sd(queue->item[i]) ) ) {
+ clif->bgqueue_battlebegins(sd,arena->id,SELF);
+ }
+ }
+ arena->begin_timer = add_timer( gettick() + (arena->pregame_duration*1000), bg->begin_timer, arena->id, 0 );
+}
+int bg_fillup_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ bg->queue_pregame(bg->arena[id]);
+ return 0;
+}
+
+void bg_queue_check(struct bg_arena *arena) {
+ int count = script->hq[arena->queue_id].items;
+
+ if( count == arena->max_players ) {
+ if( arena->fillup_timer != INVALID_TIMER ) {
+ delete_timer(arena->fillup_timer,bg_fillup_timer);
+ arena->fillup_timer = INVALID_TIMER;
+ }
+ bg->queue_pregame(arena);
+ } else if( count >= arena->min_players && arena->fillup_timer == INVALID_TIMER ) {
+ arena->fillup_timer = add_timer( gettick() + (arena->fillup_duration*1000), bg->fillup_timer, arena->id, 0 );
+ }
+}
+void bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type) {
+ enum BATTLEGROUNDS_QUEUE_ACK result = bg->can_queue(sd,arena,type);
+ struct hQueue *queue;
+ int i, count = 0;
+
+ if( arena->begin_timer != INVALID_TIMER ) {
+ clif->bgqueue_ack(sd,BGQA_FAIL_QUEUING_FINISHED,arena->id);
+ return;
+ }
+
+ if( result != BGQA_SUCCESS ) {
+ clif->bgqueue_ack(sd,result,arena->id);
+ return;
+ }
+
+ switch( type ) { /* guild/party already validated in can_queue */
+ case BGQT_PARTY: {
+ struct party_data *p = party_search(sd->status.party_id);
+ for( i = 0; i < MAX_PARTY; i++ ) {
+ if( !p->data[i].sd || p->data[i].sd->bg_queue.arena != NULL ) continue;
+ count++;
+ }
+ }
+ break;
+ case BGQT_GUILD:
+ for ( i=0; i<sd->guild->max_member; i++ ) {
+ if ( !sd->guild->member[i].sd || sd->guild->member[i].sd->bg_queue.arena != NULL )
+ continue;
+ count++;
+ }
+ break;
+ case BGQT_INDIVIDUAL:
+ count = 1;
+ break;
+ }
+
+ if( !(queue = script->queue(arena->queue_id)) || (queue->items+count) >= arena->max_players ) {
+ clif->bgqueue_ack(sd,BGQA_FAIL_PPL_OVERAMOUNT,arena->id);
+ return;
+ }
+
+ switch( type ) {
+ case BGQT_INDIVIDUAL:
+ sd->bg_queue.type = type;
+ sd->bg_queue.arena = arena;
+ sd->bg_queue.ready = 0;
+ script->queue_add(arena->queue_id,sd->status.account_id);
+ clif->bgqueue_joined(sd,script->hq[arena->queue_id].items);
+ clif->bgqueue_update_info(sd,arena->id,script->hq[arena->queue_id].items);
+ break;
+ case BGQT_PARTY: {
+ struct party_data *p = party_search(sd->status.party_id);
+ for( i = 0; i < MAX_PARTY; i++ ) {
+ if( !p->data[i].sd || p->data[i].sd->bg_queue.arena != NULL ) continue;
+ p->data[i].sd->bg_queue.type = type;
+ p->data[i].sd->bg_queue.arena = arena;
+ p->data[i].sd->bg_queue.ready = 0;
+ script->queue_add(arena->queue_id,p->data[i].sd->status.account_id);
+ clif->bgqueue_joined(p->data[i].sd,script->hq[arena->queue_id].items);
+ clif->bgqueue_update_info(p->data[i].sd,arena->id,script->hq[arena->queue_id].items);
+ }
+ }
+ break;
+ case BGQT_GUILD:
+ for ( i=0; i<sd->guild->max_member; i++ ) {
+ if ( !sd->guild->member[i].sd || sd->guild->member[i].sd->bg_queue.arena != NULL )
+ continue;
+ sd->guild->member[i].sd->bg_queue.type = type;
+ sd->guild->member[i].sd->bg_queue.arena = arena;
+ sd->guild->member[i].sd->bg_queue.ready = 0;
+ script->queue_add(arena->queue_id,sd->guild->member[i].sd->status.account_id);
+ clif->bgqueue_joined(sd->guild->member[i].sd,script->hq[arena->queue_id].items);
+ clif->bgqueue_update_info(sd->guild->member[i].sd,arena->id,script->hq[arena->queue_id].items);
+ }
+ break;
+ }
+
+ clif->bgqueue_ack(sd,BGQA_SUCCESS,arena->id);
+
+}
+enum BATTLEGROUNDS_QUEUE_ACK bg_canqueue(struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type) {
+ int tick;
+ unsigned int tsec;
+ if ( sd->status.base_level > arena->max_level || sd->status.base_level < arena->max_level )
+ return BGQA_FAIL_LEVEL_INCORRECT;
+
+ if ( !(sd->class_&JOBL_2) ) /* TODO: maybe make this a per-arena setting, so users may make custom arenas like baby-only,whatever. */
+ return BGQA_FAIL_CLASS_INVALID;
+
+ tsec = (unsigned int)time(NULL);
+
+ if ( ( tick = pc_readglobalreg(sd, bg->gdelay_var) ) && tsec < tick ) {
+ char response[100];
+ if( (tick-tsec) > 60 )
+ sprintf(response, "You are a deserter! Wait %d minute(s) before you can apply again",(tick-tsec)/60);
+ else
+ sprintf(response, "You are a deserter! Wait %d seconds before you can apply again",(tick-tsec));
+ clif->colormes(sd->fd,COLOR_RED,response);
+ return BGQA_FAIL_DESERTER;
+ }
+
+ if ( ( tick = pc_readglobalreg(sd, arena->cooldown_variable) ) && tsec < tick ) {
+ char response[100];
+ if( (tick-tsec) > 60 )
+ sprintf(response, "You can't reapply to this arena so fast. Apply to the different arena or wait %d minute(s)",(tick-tsec)/60);
+ else
+ sprintf(response, "You can't reapply to this arena so fast. Apply to the different arena or wait %d seconds",(tick-tsec));
+ clif->colormes(sd->fd,COLOR_RED,response);
+ return BGQA_FAIL_COOLDOWN;
+ }
+
+ if( sd->bg_queue.arena != NULL )
+ return BGQA_DUPLICATE_REQUEST;
+
+ switch(type) {
+ case BGQT_GUILD:
+ if( !sd->guild || !sd->state.gmaster_flag )
+ return BGQA_NOT_PARTY_GUILD_LEADER;
+ else {
+ int i, count = 0;
+ for ( i=0; i<sd->guild->max_member; i++ ) {
+ if ( !sd->guild->member[i].sd || sd->guild->member[i].sd->bg_queue.arena != NULL )
+ continue;
+ count++;
+ }
+ if ( count < arena->min_team_players ) {
+ char response[100];
+ if( count != sd->guild->connect_member && sd->guild->connect_member >= arena->min_team_players )
+ sprintf(response, "Can't apply: not enough members in your team/guild that have not entered the queue in individual mode, minimum is %d",arena->min_team_players);
+ else
+ sprintf(response, "Can't apply: not enough members in your team/guild, minimum is %d",arena->min_team_players);
+ clif->colormes(sd->fd,COLOR_RED,response);
+ return BGQA_FAIL_TEAM_COUNT;
+ }
+ }
+ break;
+ case BGQT_PARTY:
+ if( !sd->status.party_id )
+ return BGQA_NOT_PARTY_GUILD_LEADER;
+ else {
+ struct party_data *p;
+ if( (p = party_search(sd->status.party_id) ) ) {
+ int i, count = 0;
+ bool is_leader = false;
+
+ for(i = 0; i < MAX_PARTY; i++) {
+ if( !p->data[i].sd )
+ continue;
+ if( p->party.member[i].leader && sd == p->data[i].sd )
+ is_leader = true;
+ if( p->data[i].sd->bg_queue.arena == NULL )
+ count++;
+ }
+
+ if( !is_leader )
+ return BGQA_NOT_PARTY_GUILD_LEADER;
+
+ if( count < arena->min_team_players ) {
+ char response[100];
+ if( count != p->party.count && p->party.count >= arena->min_team_players )
+ sprintf(response, "Can't apply: not enough members in your team/party that have not entered the queue in individual mode, minimum is %d",arena->min_team_players);
+ else
+ sprintf(response, "Can't apply: not enough members in your team/party, minimum is %d",arena->min_team_players);
+ clif->colormes(sd->fd,COLOR_RED,response);
+ return BGQA_FAIL_TEAM_COUNT;
+ }
+
+ } else
+ return BGQA_NOT_PARTY_GUILD_LEADER;
+ }
+ break;
+ case BGQT_INDIVIDUAL:/* already did */
+ break;
+ default:
+ ShowDebug("bg_canqueue: unknown/unsupported type %d\n",type);
+ return BGQA_DUPLICATE_REQUEST;
+ }
+
+ return BGQA_SUCCESS;
+}
+void do_init_battleground(void) {
bg_team_db = idb_alloc(DB_OPT_RELEASE_DATA);
add_timer_func_list(bg_send_xy_timer, "bg_send_xy_timer");
add_timer_interval(gettick() + battle_config.bg_update_interval, bg_send_xy_timer, 0, 0, battle_config.bg_update_interval);
}
-void do_final_battleground(void)
-{
+void do_final_battleground(void) {
+ int i;
+
bg_team_db->destroy(bg_team_db, NULL);
+
+ for( i = 0; i < bg->arenas; i++ ) {
+ if( bg->arena[i] )
+ aFree(bg->arena[i]);
+ }
+
+ if( bg->arena )
+ aFree(bg->arena);
+}
+void battleground_defaults(void) {
+ bg = &bg_s;
+
+ bg->queue_on = false;
+
+ bg->mafksec = 0;
+ bg->arena = NULL;
+ bg->arenas = 0;
+ /* */
+ bg->name2arena = bg_name2arena;
+ bg->queue_add = bg_queue_add;
+ bg->can_queue = bg_canqueue;
+ bg->id2pos = bg_id2pos;
+ bg->queue_pc_cleanup = bg_queue_player_cleanup;
+ bg->begin = bg_begin;
+ bg->begin_timer = bg_begin_timer;
+ bg->queue_pregame = bg_queue_pregame;
+ bg->fillup_timer = bg_fillup_timer;
+ /* */
+ bg->config_read = bg_config_read;
}
diff --git a/src/map/battleground.h b/src/map/battleground.h
index c2b74a534..8fe9f3b77 100644
--- a/src/map/battleground.h
+++ b/src/map/battleground.h
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _BATTLEGROUND_H_
#define _BATTLEGROUND_H_
@@ -7,7 +8,21 @@
#include "../common/mmo.h" // struct party
#include "guild.h"
+/**
+ * Defines
+ **/
#define MAX_BG_MEMBERS 30
+#define BG_DELAY_VAR_LENGTH 30
+
+/**
+ * Enumerations
+ **/
+enum bg_queue_types {
+ BGQT_INVALID,
+ BGQT_INDIVIDUAL,
+ BGQT_PARTY,
+ BGQT_GUILD
+};
struct battleground_member_data {
unsigned short x, y;
@@ -42,4 +57,51 @@ int bg_team_warp(int bg_id, unsigned short mapindex, short x, short y);
int bg_member_respawn(struct map_session_data *sd);
int bg_send_message(struct map_session_data *sd, const char *mes, int len);
+struct bg_arena {
+ char name[NAME_LENGTH];
+ unsigned char id;
+ char npc_event[EVENT_NAME_LENGTH];
+ short min_level, max_level;
+ short prize_win, prize_loss, prize_draw;
+ short min_players;
+ short max_players;
+ short min_team_players;
+ char cooldown_variable[NAME_LENGTH];
+ char delay_var[NAME_LENGTH];
+ unsigned short maxDuration;
+ int queue_id;
+ int begin_timer;
+ int fillup_timer;
+ int game_timer;
+ unsigned short fillup_duration;
+ unsigned short pregame_duration;
+};
+
+/* battleground.c interface (incomplete) */
+struct battleground_interface {
+ bool queue_on;
+ /* */
+ int mafksec;
+ char gdelay_var[BG_DELAY_VAR_LENGTH];
+ /* */
+ struct bg_arena **arena;
+ unsigned char arenas;
+ /* */
+ struct bg_arena *(*name2arena) (char *name);
+ void (*queue_add) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type);
+ enum BATTLEGROUNDS_QUEUE_ACK (*can_queue) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type);
+ int (*id2pos) (int queue_id, int account_id);
+ void (*queue_pc_cleanup) (struct map_session_data *sd);
+ void (*begin) (struct bg_arena *arena);
+ int (*begin_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ void (*queue_pregame) (struct bg_arena *arena);
+ int (*fillup_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ /* */
+ void (*config_read) (void);
+} bg_s;
+
+struct battleground_interface *bg;
+
+void battleground_defaults(void);
+
#endif /* _BATTLEGROUND_H_ */
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 06956e731..ee2e252c1 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -344,9 +344,9 @@ int chrif_sendmap(int fd) {
ShowStatus("Sending maps to char server...\n");
// Sending normal maps, not instances
- WFIFOHEAD(fd, 4 + instance_start * 4);
+ WFIFOHEAD(fd, 4 + instance->start_id * 4);
WFIFOW(fd,0) = 0x2afa;
- for(i = 0; i < instance_start; i++)
+ for(i = 0; i < instance->start_id; i++)
WFIFOW(fd,4+i*4) = map[i].index;
WFIFOW(fd,2) = 4 + i * 4;
WFIFOSET(fd,WFIFOW(fd,2));
@@ -1537,9 +1537,8 @@ static int check_connect_char_server(int tid, unsigned int tick, int id, intptr_
}
chrif_state = 0;
- char_fd = make_connection(char_ip, char_port,false);
- if (char_fd == -1)//Attempt to connect later. [Skotlex]
+ if ( ( char_fd = make_connection(char_ip, char_port,NULL) ) == -1) //Attempt to connect later. [Skotlex]
return 0;
session[char_fd]->func_parse = chrif_parse;
diff --git a/src/map/clif.c b/src/map/clif.c
index 2f69ce2fd..eb13a9515 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1333,7 +1333,7 @@ int clif_spawn(struct block_list *bl)
/**
* Hide NPC from maya purple card.
**/
- if(bl->type == BL_NPC && !((TBL_NPC*)bl)->chat_id && (((TBL_NPC*)bl)->sc.option&OPTION_INVISIBLE))
+ if(bl->type == BL_NPC && !((TBL_NPC*)bl)->chat_id && (((TBL_NPC*)bl)->option&OPTION_INVISIBLE))
return 0;
clif->spawn_unit(bl,AREA_WOS);
@@ -1612,7 +1612,7 @@ void clif_move(struct unit_data *ud)
/**
* Hide NPC from maya purple card.
**/
- if(bl->type == BL_NPC && !((TBL_NPC*)bl)->chat_id && (((TBL_NPC*)bl)->sc.option&OPTION_INVISIBLE))
+ if(bl->type == BL_NPC && !((TBL_NPC*)bl)->chat_id && (((TBL_NPC*)bl)->option&OPTION_INVISIBLE))
return;
if (ud->state.speed_changed) {
@@ -1666,15 +1666,14 @@ void clif_quitsave(int fd,struct map_session_data *sd) {
/// Notifies the client of a position change to coordinates on given map (ZC_NPCACK_MAPMOVE).
/// 0091 <map name>.16B <x>.W <y>.W
-void clif_changemap(struct map_session_data *sd, short map, int x, int y)
-{
+void clif_changemap(struct map_session_data *sd, short m, int x, int y) {
int fd;
nullpo_retv(sd);
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0x91));
WFIFOW(fd,0) = 0x91;
- mapindex_getmapname_ext(mapindex_id2name(map), (char*)WFIFOP(fd,2));
+ mapindex_getmapname_ext(map[m].cName ? map[m].cName : map[m].name, (char*)WFIFOP(fd,2));
WFIFOW(fd,18) = x;
WFIFOW(fd,20) = y;
WFIFOSET(fd,packet_len(0x91));
@@ -1683,8 +1682,7 @@ void clif_changemap(struct map_session_data *sd, short map, int x, int y)
/// Notifies the client of a position change to coordinates on given map, which is on another map-server (ZC_NPCACK_SERVERMOVE).
/// 0092 <map name>.16B <x>.W <y>.W <ip>.L <port>.W
-void clif_changemapserver(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port)
-{
+void clif_changemapserver(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) {
int fd;
nullpo_retv(sd);
fd = sd->fd;
@@ -2748,6 +2746,9 @@ void read_channels_config(void) {
} else {
unsigned char d = 0, dlen = strlen(irc_server);
char server[40];
+
+ memset(server, '\0', sizeof(server));
+
for(d = 0; d < dlen; d++) {
if(irc_server[d] == ':') {
memcpy(server, irc_server, d);
@@ -4344,7 +4345,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) {
/**
* Hide NPC from maya purple card.
**/
- if(bl->type == BL_NPC && !((TBL_NPC*)bl)->chat_id && (((TBL_NPC*)bl)->sc.option&OPTION_INVISIBLE))
+ if(bl->type == BL_NPC && !((TBL_NPC*)bl)->chat_id && (((TBL_NPC*)bl)->option&OPTION_INVISIBLE))
return;
if ( ( ud = unit_bl2ud(bl) ) && ud->walktimer != INVALID_TIMER )
@@ -4601,16 +4602,13 @@ void clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_targe
WBUFW(buf,2) = x;
WBUFW(buf,4) = y;
WBUFW(buf,6) = type;
- mapindex_getmapname_ext(map[m].name,(char*)WBUFP(buf,8));
+ mapindex_getmapname_ext(map[m].cName ? map[m].cName : map[m].name,(char*)WBUFP(buf,8));
- if( fd )
- {
+ if( fd ) {
WFIFOHEAD(fd,packet_len(0x192));
memcpy(WFIFOP(fd,0), buf, packet_len(0x192));
WFIFOSET(fd,packet_len(0x192));
- }
- else
- {
+ } else {
struct block_list dummy_bl;
dummy_bl.type = BL_NUL;
dummy_bl.x = x;
@@ -4799,7 +4797,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
clif->clearchar_skillunit((struct skill_unit *)bl,tsd->fd);
break;
case BL_NPC:
- if( !(((TBL_NPC*)bl)->sc.option&OPTION_INVISIBLE) )
+ if( !(((TBL_NPC*)bl)->option&OPTION_INVISIBLE) )
clif->clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd);
break;
default:
@@ -4810,7 +4808,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
}
if (sd && sd->fd) { //sd is watching tbl go out of view.
if (((vd=status_get_viewdata(tbl)) && vd->class_ != INVISIBLE_CLASS) &&
- !(tbl->type == BL_NPC && (((TBL_NPC*)tbl)->sc.option&OPTION_INVISIBLE)))
+ !(tbl->type == BL_NPC && (((TBL_NPC*)tbl)->option&OPTION_INVISIBLE)))
clif->clearunit_single(tbl->id,CLR_OUTSIGHT,sd->fd);
}
return 0;
@@ -6529,7 +6527,7 @@ void clif_party_member_info(struct party_data *p, struct map_session_data *sd)
WBUFB(buf,14) = (p->party.member[i].online)?0:1;
memcpy(WBUFP(buf,15), p->party.name, NAME_LENGTH);
memcpy(WBUFP(buf,39), sd->status.name, NAME_LENGTH);
- mapindex_getmapname_ext(map[sd->bl.m].name, (char*)WBUFP(buf,63));
+ mapindex_getmapname_ext(map[sd->bl.m].cName ? map[sd->bl.m].cName : map[sd->bl.m].name, (char*)WBUFP(buf,63));
WBUFB(buf,79) = (p->party.item&1)?1:0;
WBUFB(buf,80) = (p->party.item&2)?1:0;
clif->send(buf,packet_len(0x1e9),&sd->bl,PARTY);
@@ -8485,7 +8483,7 @@ void clif_refresh(struct map_session_data *sd)
int i;
nullpo_retv(sd);
- clif->changemap(sd,sd->mapindex,sd->bl.x,sd->bl.y);
+ clif->changemap(sd,sd->bl.m,sd->bl.x,sd->bl.y);
clif->inventorylist(sd);
if(pc_iscarton(sd)) {
clif->cartlist(sd);
@@ -9328,7 +9326,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if (sd->state.rewarp) { //Rewarp player.
sd->state.rewarp = 0;
- clif->changemap(sd, sd->mapindex, sd->bl.x, sd->bl.y);
+ clif->changemap(sd, sd->bl.m, sd->bl.x, sd->bl.y);
return;
}
@@ -9372,9 +9370,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if( !(sd->sc.option&OPTION_INVISIBLE) ) { // increment the number of pvp players on the map
map[sd->bl.m].users_pvp++;
}
- if( map[sd->bl.m].instance_id ) {
- instance[map[sd->bl.m].instance_id].users++;
- instance_check_idle(map[sd->bl.m].instance_id);
+ if( map[sd->bl.m].instance_id >= 0 ) {
+ instances[map[sd->bl.m].instance_id].users++;
+ instance->check_idle(map[sd->bl.m].instance_id);
}
sd->state.debug_remove_map = 0; // temporary state to track double remove_map's [FlavioJS]
@@ -15573,48 +15571,61 @@ void clif_font(struct map_session_data *sd)
/*==========================================
* Instancing Window
*------------------------------------------*/
-int clif_instance(int instance_id, int type, int flag)
-{
- struct map_session_data *sd;
- struct party_data *p;
+int clif_instance(int instance_id, int type, int flag) {
+ struct map_session_data *sd = NULL;
unsigned char buf[255];
+ enum send_target target = PARTY;
+
+ switch( instances[instance_id].owner_type ) {
+ case IOT_NONE:
+ return 0;
+ case IOT_GUILD:
+ target = GUILD;
+ sd = guild->getavailablesd(guild->search(instances[instance_id].owner_id));
+ break;
+ case IOT_PARTY:
+ /* default is already PARTY */
+ sd = party_getavailablesd(party_search(instances[instance_id].owner_id));
+ break;
+ case IOT_CHAR:
+ target = SELF;
+ sd = map_id2sd(instances[instance_id].owner_id);
+ break;
+ }
- if( (p = party_search(instance[instance_id].party_id)) == NULL || (sd = party_getavailablesd(p)) == NULL )
+ if( !sd )
return 0;
-
+
switch( type ) {
case 1:
// S 0x2cb <Instance name>.61B <Standby Position>.W
// Required to start the instancing information window on Client
// This window re-appear each "refresh" of client automatically until type 4 is send to client.
WBUFW(buf,0) = 0x02CB;
- memcpy(WBUFP(buf,2),instance[instance_id].name,INSTANCE_NAME_LENGTH);
+ memcpy(WBUFP(buf,2),instances[instance_id].name,INSTANCE_NAME_LENGTH);
WBUFW(buf,63) = flag;
- clif->send(buf,packet_len(0x02CB),&sd->bl,PARTY);
+ clif->send(buf,packet_len(0x02CB),&sd->bl,target);
break;
case 2:
// S 0x2cc <Standby Position>.W
// To announce Instancing queue creation if no maps available
WBUFW(buf,0) = 0x02CC;
WBUFW(buf,2) = flag;
- clif->send(buf,packet_len(0x02CC),&sd->bl,PARTY);
+ clif->send(buf,packet_len(0x02CC),&sd->bl,target);
break;
case 3:
case 4:
// S 0x2cd <Instance Name>.61B <Instance Remaining Time>.L <Instance Noplayers close time>.L
WBUFW(buf,0) = 0x02CD;
- memcpy(WBUFP(buf,2),instance[instance_id].name,61);
- if( type == 3 )
- {
- WBUFL(buf,63) = (uint32)instance[instance_id].progress_timeout;
+ memcpy(WBUFP(buf,2),instances[instance_id].name,61);
+ if( type == 3 ) {
+ WBUFL(buf,63) = instances[instance_id].progress_timeout;
WBUFL(buf,67) = 0;
- }
- else
- {
+ } else {
WBUFL(buf,63) = 0;
- WBUFL(buf,67) = (uint32)instance[instance_id].idle_timeout;
+ WBUFL(buf,67) = instances[instance_id].idle_timeout;
}
- clif->send(buf,packet_len(0x02CD),&sd->bl,PARTY);
+ clif->send(buf,packet_len(0x02CD),&sd->bl,target);
break;
case 5:
// S 0x2ce <Message ID>.L
@@ -15626,7 +15637,7 @@ int clif_instance(int instance_id, int type, int flag)
WBUFW(buf,0) = 0x02CE;
WBUFL(buf,2) = flag;
//WBUFL(buf,6) = EnterLimitDate;
- clif->send(buf,packet_len(0x02CE),&sd->bl,PARTY);
+ clif->send(buf,packet_len(0x02CE),&sd->bl,target);
break;
}
return 0;
@@ -15634,24 +15645,24 @@ int clif_instance(int instance_id, int type, int flag)
void clif_instance_join(int fd, int instance_id)
{
- if( instance[instance_id].idle_timer != INVALID_TIMER ) {
+ if( instances[instance_id].idle_timer != INVALID_TIMER ) {
WFIFOHEAD(fd,packet_len(0x02CD));
WFIFOW(fd,0) = 0x02CD;
- memcpy(WFIFOP(fd,2),instance[instance_id].name,61);
+ memcpy(WFIFOP(fd,2),instances[instance_id].name,61);
WFIFOL(fd,63) = 0;
- WFIFOL(fd,67) = (uint32)instance[instance_id].idle_timeout;
+ WFIFOL(fd,67) = instances[instance_id].idle_timeout;
WFIFOSET(fd,packet_len(0x02CD));
- } else if( instance[instance_id].progress_timer != INVALID_TIMER ) {
+ } else if( instances[instance_id].progress_timer != INVALID_TIMER ) {
WFIFOHEAD(fd,packet_len(0x02CD));
WFIFOW(fd,0) = 0x02CD;
- memcpy(WFIFOP(fd,2),instance[instance_id].name,61);
- WFIFOL(fd,63) = (uint32)instance[instance_id].progress_timeout;;
+ memcpy(WFIFOP(fd,2),instances[instance_id].name,61);
+ WFIFOL(fd,63) = instances[instance_id].progress_timeout;
WFIFOL(fd,67) = 0;
WFIFOSET(fd,packet_len(0x02CD));
} else {
WFIFOHEAD(fd,packet_len(0x02CB));
WFIFOW(fd,0) = 0x02CB;
- memcpy(WFIFOP(fd,2),instance[instance_id].name,61);
+ memcpy(WFIFOP(fd,2),instances[instance_id].name,61);
WFIFOW(fd,63) = 0;
WFIFOSET(fd,packet_len(0x02CB));
}
@@ -16949,6 +16960,124 @@ void clif_status_change_end(struct block_list *bl, int tid, enum send_target tar
clif->send(&p,sizeof(p), bl, target);
}
+void clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK response, unsigned char arena_id) {
+
+ switch (response) {
+ case BGQA_FAIL_COOLDOWN:
+ case BGQA_FAIL_DESERTER:
+ case BGQA_FAIL_TEAM_COUNT:
+ break;
+ default: {
+ struct packet_bgqueue_ack p;
+
+ p.PacketType = bgqueue_ackType;
+ p.type = response;
+ safestrncpy(p.bg_name, bg->arena[arena_id]->name, sizeof(p.bg_name));
+
+ clif->send(&p,sizeof(p), &sd->bl, SELF);
+ }
+ break;
+ }
+}
+
+
+void clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, unsigned char arena_id) {
+ struct packet_bgqueue_notice_delete p;
+
+ p.PacketType = bgqueue_notice_deleteType;
+ p.type = response;
+ safestrncpy(p.bg_name, bg->arena[arena_id]->name, sizeof(p.bg_name));
+
+ clif->send(&p,sizeof(p), &sd->bl, SELF);
+}
+
+void clif_parse_bgqueue_register(int fd, struct map_session_data *sd) {
+ struct packet_bgqueue_register *p = P2PTR(fd, bgqueue_registerType);
+ struct bg_arena *arena = NULL;
+
+ if( !bg->queue_on ) return; /* temp, until feature is complete */
+
+ if( !(arena = bg->name2arena(p->bg_name)) ) {
+ clif->bgqueue_ack(sd,BGQA_FAIL_BGNAME_INVALID,0);
+ return;
+ }
+
+ switch( (enum bg_queue_types)p->type ) {
+ case BGQT_INDIVIDUAL:
+ case BGQT_PARTY:
+ case BGQT_GUILD:
+ break;
+ default:
+ clif->bgqueue_ack(sd,BGQA_FAIL_TYPE_INVALID, arena->id);
+ return;
+ }
+
+ bg->queue_add(sd, arena, (enum bg_queue_types)p->type);
+}
+
+void clif_bgqueue_update_info(struct map_session_data *sd, unsigned char arena_id, int position) {
+ struct packet_bgqueue_update_info p;
+
+ p.PacketType = bgqueue_updateinfoType;
+ safestrncpy(p.bg_name, bg->arena[arena_id]->name, sizeof(p.bg_name));
+ p.position = position;
+
+ sd->bg_queue.client_has_bg_data = true; // Client creates bg data when this packet arrives
+
+ clif->send(&p,sizeof(p), &sd->bl, SELF);
+}
+
+void clif_parse_bgqueue_checkstate(int fd, struct map_session_data *sd) {
+ //struct packet_bgqueue_checkstate *p = P2PTR(fd, bgqueue_checkstateType); /* TODO: bgqueue_notice_delete should use this p->bg_name */
+ if( !bg->queue_on ) return; /* temp, until feature is complete */
+ if ( sd->bg_queue.arena && sd->bg_queue.type ) {
+ sd->bg_queue.client_has_bg_data = true;
+ clif->bgqueue_update_info(sd,sd->bg_queue.arena->id,bg->id2pos(sd->bg_queue.arena->queue_id,sd->status.account_id));
+ } else
+ clif->bgqueue_notice_delete(sd, BGQND_FAIL_NOT_QUEUING,0);/* TODO: wrong response, should respond with p->bg_name not id 0 */
+}
+
+void clif_parse_bgqueue_revoke_req(int fd, struct map_session_data *sd) {
+ //struct packet_bgqueue_revoke_req *p = P2PTR(fd, bgqueue_revokereqType);
+ return;
+ //bg->queue_leave(sd, p->bg_name);
+}
+
+void clif_parse_bgqueue_battlebegin_ack(int fd, struct map_session_data *sd) {
+ //struct packet_bgqueue_battlebegin_ack *p = P2PTR(fd, bgqueue_checkstateType);
+ return;
+ //if ( p->result == 1 )
+ // bg->queue_pc_ready(sd);
+ //else
+ // bg->queue_leave(sd, p->bg_name);
+}
+
+void clif_bgqueue_joined(struct map_session_data *sd, int pos) {
+ struct packet_bgqueue_notify_entry p;
+
+ p.PacketType = bgqueue_notify_entryType;
+ safestrncpy(p.name,sd->status.name,sizeof(p.name));
+ p.position = pos;
+
+ clif->send(&p,sizeof(p), &sd->bl, BG_QUEUE);
+}
+
+void clif_bgqueue_pcleft(struct map_session_data *sd) {
+ /* no idea */
+ return;
+}
+
+// Sends BG ready req to all with same bg arena/type as sd
+void clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char arena_id, enum send_target target) {
+ struct packet_bgqueue_battlebegins p;
+
+ p.PacketType = bgqueue_battlebegins;
+ safestrncpy(p.bg_name, bg->arena[arena_id]->name, sizeof(p.bg_name));
+ safestrncpy(p.game_name, bg->arena[arena_id]->name, sizeof(p.game_name));
+
+ clif->send(&p,sizeof(p), &sd->bl, target);
+}
+
/*==========================================
* Main client packet processing function
*------------------------------------------*/
@@ -17124,6 +17253,7 @@ void clif_bc_ready(void) {
int do_init_clif(void) {
const char* colors[COLOR_MAX] = { "0xFF0000", "0x00ff00", "0xffffff" };
int i;
+
/**
* Setup Color Table (saves unnecessary load of strtoul on every call)
**/
@@ -17613,13 +17743,7 @@ void clif_defaults(void) {
/* elemental-related */
clif->elemental_info = clif_elemental_info;
clif->elemental_updatestatus = clif_elemental_updatestatus;
- /* misc-handling */
- clif->adopt_reply = clif_Adopt_reply;
- clif->adopt_request = clif_Adopt_request;
- clif->readbook = clif_readbook;
- clif->notify_time = clif_notify_time;
- clif->user_count = clif_user_count;
- clif->noask_sub = clif_noask_sub;
+ /* Hercules Channel System */
clif->chsys_create = clif_hercules_chsys_create;
clif->chsys_msg = clif_hercules_chsys_msg;
clif->chsys_msg2 = clif_hercules_chsys_msg2;
@@ -17632,6 +17756,20 @@ void clif_defaults(void) {
clif->chsys_quitg = clif_hercules_chsys_quitg;
clif->chsys_gjoin = clif_hercules_chsys_gjoin;
clif->chsys_gleave = clif_hercules_chsys_gleave;
+ /* bgqueue */
+ clif->bgqueue_ack = clif_bgqueue_ack;
+ clif->bgqueue_notice_delete = clif_bgqueue_notice_delete;
+ clif->bgqueue_update_info = clif_bgqueue_update_info;
+ clif->bgqueue_joined = clif_bgqueue_joined;
+ clif->bgqueue_pcleft = clif_bgqueue_pcleft;
+ clif->bgqueue_battlebegins = clif_bgqueue_battlebegins;
+ /* misc-handling */
+ clif->adopt_reply = clif_Adopt_reply;
+ clif->adopt_request = clif_Adopt_request;
+ clif->readbook = clif_readbook;
+ clif->notify_time = clif_notify_time;
+ clif->user_count = clif_user_count;
+ clif->noask_sub = clif_noask_sub;
clif->cashshop_load = clif_cashshop_db;
clif->bc_ready = clif_bc_ready;
clif->undisguise_timer = clif_undisguise_timer;
@@ -17837,6 +17975,11 @@ void clif_defaults(void) {
clif->pCashShopReqTab = clif_parse_CashShopReqTab;
clif->pCashShopSchedule = clif_parse_CashShopSchedule;
clif->pCashShopBuy = clif_parse_CashShopBuy;
+ /* BGQueue */
+ clif->pBGQueueRegister = clif_parse_bgqueue_register;
+ clif->pBGQueueCheckState = clif_parse_bgqueue_checkstate;
+ clif->pBGQueueRevokeReq = clif_parse_bgqueue_revoke_req;
+ clif->pBGQueueBattleBeginAck = clif_parse_bgqueue_battlebegin_ack;
/* */
clif->pPartyTick = clif_parse_PartyTick;
clif->pGuildInvite2 = clif_parse_GuildInvite2;
diff --git a/src/map/clif.h b/src/map/clif.h
index 3e3db98c1..4347ad743 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -8,6 +8,7 @@
#include "../common/cbasetypes.h"
#include "../common/db.h"
#include "../common/mmo.h"
+#include "../common/socket.h"
#include <stdarg.h>
/**
@@ -42,6 +43,7 @@ struct eri;
* Defines
**/
#define packet_len(cmd) packet_db[cmd].len
+#define P2PTR(fd,cmd) RFIFO2PTR(fd,packet_db[cmd].len)
#define clif_menuskill_clear(sd) (sd)->menuskill_id = (sd)->menuskill_val = (sd)->menuskill_val2 = 0;
#define HCHSYS_NAME_LENGTH 20
@@ -86,6 +88,8 @@ typedef enum send_target {
BG_SAMEMAP_WOS,
BG_AREA,
BG_AREA_WOS,
+
+ BG_QUEUE,
} send_target;
typedef enum emotion_type {
@@ -365,6 +369,29 @@ enum CASH_SHOP_BUY_RESULT {
CSBR_UNKNOWN = 0xb,
};
+enum BATTLEGROUNDS_QUEUE_ACK {
+ BGQA_SUCCESS = 1,
+ BGQA_FAIL_QUEUING_FINISHED,
+ BGQA_FAIL_BGNAME_INVALID,
+ BGQA_FAIL_TYPE_INVALID,
+ BGQA_FAIL_PPL_OVERAMOUNT,
+ BGQA_FAIL_LEVEL_INCORRECT,
+ BGQA_DUPLICATE_REQUEST,
+ BGQA_PLEASE_RELOGIN,
+ BGQA_NOT_PARTY_GUILD_LEADER,
+ BGQA_FAIL_CLASS_INVALID,
+ /* not official way to respond (gotta find packet?) */
+ BGQA_FAIL_DESERTER,
+ BGQA_FAIL_COOLDOWN,
+ BGQA_FAIL_TEAM_COUNT,
+};
+
+enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED {
+ BGQND_CLOSEWINDOW = 1,
+ BGQND_FAIL_BGNAME_WRONG = 3,
+ BGQND_FAIL_NOT_QUEUING = 11,
+};
+
/**
* Structures
**/
@@ -499,7 +526,7 @@ struct clif_interface {
/* main unit spawn */
int (*spawn) (struct block_list *bl);
/* map-related */
- void (*changemap) (struct map_session_data *sd, short map, int x, int y);
+ void (*changemap) (struct map_session_data *sd, short m, int x, int y);
void (*changemapcell) (int fd, int16 m, int x, int y, int type, enum send_target target);
void (*map_property) (struct map_session_data* sd, enum map_property property);
void (*pvpset) (struct map_session_data *sd, int pvprank, int pvpnum,int type);
@@ -860,6 +887,13 @@ struct clif_interface {
/* elemental-related */
void (*elemental_info) (struct map_session_data *sd);
void (*elemental_updatestatus) (struct map_session_data *sd, int type);
+ /* bgqueue */
+ void (*bgqueue_ack) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK response, unsigned char arena_id);
+ void (*bgqueue_notice_delete) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, unsigned char arena_id);
+ void (*bgqueue_update_info) (struct map_session_data *sd, unsigned char arena_id, int position);
+ void (*bgqueue_joined) (struct map_session_data *sd, int pos);
+ void (*bgqueue_pcleft) (struct map_session_data *sd);
+ void (*bgqueue_battlebegins) (struct map_session_data *sd, unsigned char arena_id, enum send_target target);
/* misc-handling */
void (*adopt_reply) (struct map_session_data *sd, int type);
void (*adopt_request) (struct map_session_data *sd, struct map_session_data *src, int p_id);
@@ -1078,6 +1112,11 @@ struct clif_interface {
void (*pSkillSelectMenu) (int fd, struct map_session_data *sd);
void (*pMoveItem) (int fd, struct map_session_data *sd);
void (*pDull) (int fd, struct map_session_data *sd);
+ /* BGQueue */
+ void (*pBGQueueRegister) (int fd, struct map_session_data *sd);
+ void (*pBGQueueCheckState) (int fd, struct map_session_data *sd);
+ void (*pBGQueueRevokeReq) (int fd, struct map_session_data *sd);
+ void (*pBGQueueBattleBeginAck) (int fd, struct map_session_data *sd);
/* RagExe Cash Shop [Ind/Hercules] */
void (*pCashShopOpen) (int fd, struct map_session_data *sd);
void (*pCashShopClose) (int fd, struct map_session_data *sd);
diff --git a/src/map/guild.c b/src/map/guild.c
index b83f05f00..a6c873861 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -24,6 +24,7 @@
#include "clif.h"
#include "skill.h"
#include "log.h"
+#include "instance.h"
#include <stdio.h>
#include <stdlib.h>
@@ -503,6 +504,8 @@ int guild_recv_info(struct guild *sg) {
if((g = (struct guild*)idb_get(guild_db,sg->guild_id))==NULL) {
guild_new = true;
g=(struct guild *)aCalloc(1,sizeof(struct guild));
+ g->instance = NULL;
+ g->instances = 0;
idb_put(guild_db,sg->guild_id,g);
if( hChSys.ally ) {
struct hChSysCh *channel;
@@ -926,7 +929,8 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c
sd->status.guild_id = 0;
sd->guild = NULL;
sd->guild_emblem_id = 0;
-
+ if( g->instances )
+ instance->check_kick(sd);
clif->charnameupdate(sd); //Update display name [Skotlex]
//TODO: send emblem update to self and people around
}
@@ -2211,6 +2215,10 @@ void do_final_guild(void) {
for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) ) {
if( g->channel != NULL )
clif->chsys_delete((struct hChSysCh *)g->channel);
+ if( g->instance != NULL ) {
+ aFree(g->instance);
+ g->instance = NULL;
+ }
}
dbi_destroy(iter);
diff --git a/src/map/instance.c b/src/map/instance.c
index 8ddde8b3e..637e768c9 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#include "../common/cbasetypes.h"
#include "../common/socket.h"
@@ -24,20 +25,13 @@
#include <stdarg.h>
#include <time.h>
-int instance_start = 0; // To keep the last index + 1 of normal map inserted in the map[ARRAY]
-struct s_instance instance[MAX_INSTANCE];
-
-
/// Checks whether given instance id is valid or not.
-static bool instance_is_valid(int instance_id)
-{
- if( instance_id < 1 || instance_id >= ARRAYLENGTH(instance) )
- {// out of range
+bool instance_is_valid(int instance_id) {
+ if( instance_id < 0 || instance_id >= instance->instances ) {// out of range
return false;
}
- if( instance[instance_id].state == INSTANCE_FREE )
- {// uninitialized/freed instance slot
+ if( instances[instance_id].state == INSTANCE_FREE ) {// uninitialized/freed instance slot
return false;
}
@@ -48,56 +42,104 @@ static bool instance_is_valid(int instance_id)
/*--------------------------------------
* name : instance name
* Return value could be
- * -4 = already exists | -3 = no free instances | -2 = party not found | -1 = invalid type
+ * -4 = already exists | -3 = no free instances | -2 = owner not found | -1 = invalid type
* On success return instance_id
*--------------------------------------*/
-int instance_create(int party_id, const char *name)
-{
- int i;
- struct party_data* p;
-
- if( ( p = party_search(party_id) ) == NULL )
- {
- ShowError("instance_create: party %d not found for instance '%s'.\n", party_id, name);
- return -2;
+int instance_create(int owner_id, const char *name, enum instance_owner_type type) {
+ unsigned short *iptr = NULL, *icptr = NULL;
+ struct map_session_data *sd = NULL;
+ struct party_data *p = NULL;
+ struct guild *g = NULL;
+ int i, j;
+
+ switch ( type ) {
+ case IOT_NONE:
+ break;
+ case IOT_CHAR:
+ if( ( sd = map_id2sd(owner_id) ) == NULL ) {
+ ShowError("instance_create: character %d not found for instance '%s'.\n", owner_id, name);
+ return -2;
+ }
+ iptr = sd->instance;
+ icptr = &sd->instances;
+ break;
+ case IOT_PARTY:
+ if( ( p = party_search(owner_id) ) == NULL ) {
+ ShowError("instance_create: party %d not found for instance '%s'.\n", owner_id, name);
+ return -2;
+ }
+ iptr = p->instance;
+ icptr = &p->instances;
+ break;
+ case IOT_GUILD:
+ if( ( g = guild->search(owner_id) ) == NULL ) {
+ ShowError("instance_create: guild %d not found for instance '%s'.\n", owner_id, name);
+ return -2;
+ }
+ iptr = g->instance;
+ icptr = &g->instances;
+ break;
+ default:
+ ShowError("instance_create: unknown type %d for owner_id %d and name %s.\n", type,owner_id,name);
+ return -1;
}
-
- if( p->instance_id )
- return -4; // Party already instancing
-
- // Searching a Free Instance
- // 0 is ignored as this mean "no instance" on maps
- ARR_FIND(1, MAX_INSTANCE, i, instance[i].state == INSTANCE_FREE);
- if( i == MAX_INSTANCE )
- {
- ShowError("instance_create: no free instances, consider increasing MAX_INSTANCE.\n");
- return -3;
+
+ if( type != IOT_NONE && *icptr ) {
+ ARR_FIND(0, *icptr, i, strcmp(instances[iptr[i]].name,name) == 0 );
+ if( i != *icptr )
+ return -4;/* already got this instance */
}
-
- instance[i].state = INSTANCE_IDLE;
- instance[i].instance_id = i;
- instance[i].idle_timer = INVALID_TIMER;
- instance[i].idle_timeout = instance[i].idle_timeoutval = 0;
- instance[i].progress_timer = INVALID_TIMER;
- instance[i].progress_timeout = 0;
- instance[i].users = 0;
- instance[i].party_id = party_id;
- instance[i].vars = idb_alloc(DB_OPT_RELEASE_DATA);
-
- safestrncpy( instance[i].name, name, sizeof(instance[i].name) );
- memset( instance[i].map, 0x00, sizeof(instance[i].map) );
- p->instance_id = i;
-
+
+ ARR_FIND(0, instance->instances, i, instances[i].state == INSTANCE_FREE);
+
+ if( i == instance->instances )
+ RECREATE(instances, struct instance_data, ++instance->instances);
+
+ instances[i].state = INSTANCE_IDLE;
+ instances[i].id = i;
+ instances[i].idle_timer = INVALID_TIMER;
+ instances[i].idle_timeout = instances[i].idle_timeoutval = 0;
+ instances[i].progress_timer = INVALID_TIMER;
+ instances[i].progress_timeout = 0;
+ instances[i].users = 0;
+ instances[i].map = NULL;
+ instances[i].num_map = 0;
+ instances[i].owner_id = owner_id;
+ instances[i].owner_type = type;
+ instances[i].vars = idb_alloc(DB_OPT_RELEASE_DATA);
+
+ safestrncpy( instances[i].name, name, sizeof(instances[i].name) );
+ instances[i].map = NULL;
+
+ if( type != IOT_NONE ) {
+ ARR_FIND(0, *icptr, j, iptr[j] == 0);
+ if( j == *icptr ) {
+ switch( type ) {
+ case IOT_CHAR:
+ RECREATE(sd->instance, unsigned short, ++*icptr);
+ sd->instance[sd->instances-1] = i;
+ break;
+ case IOT_PARTY:
+ RECREATE(p->instance, unsigned short, ++*icptr);
+ p->instance[p->instances-1] = i;
+ break;
+ case IOT_GUILD:
+ RECREATE(g->instance, unsigned short, ++*icptr);
+ g->instance[g->instances-1] = i;
+ break;
+ }
+ } else
+ iptr[j] = i;
+ }
+
clif->instance(i, 1, 0); // Start instancing window
- ShowInfo("[Instance] Created: %s.\n", name);
return i;
}
/*--------------------------------------
* Add a map to the instance using src map "name"
*--------------------------------------*/
-int instance_add_map(const char *name, int instance_id, bool usebasename)
-{
+int instance_add_map(const char *name, int instance_id, bool usebasename, const char *map_name) {
int16 m = map_mapname2mapid(name);
int i, im = -1;
size_t num_cell, size;
@@ -105,42 +147,49 @@ int instance_add_map(const char *name, int instance_id, bool usebasename)
if( m < 0 )
return -1; // source map not found
- if( !instance_is_valid(instance_id) )
- {
+ if( !instance->valid(instance_id) ) {
ShowError("instance_add_map: trying to attach '%s' map to non-existing instance %d.\n", name, instance_id);
return -1;
}
- if( instance[instance_id].num_map >= MAX_MAP_PER_INSTANCE )
- {
- ShowError("instance_add_map: trying to add '%s' map to instance %d (%s) failed. Please increase MAX_MAP_PER_INSTANCE.\n", name, instance_id, instance[instance_id].name);
+
+ if( map_name != NULL && strdb_iget(mapindex_db, map_name) ) {
+ ShowError("instance_add_map: trying to create instanced map with existent name '%s'\n", map_name);
return -2;
}
- if( map[m].instance_id != 0 )
- { // Source map already belong to a Instance.
+
+ if( map[m].instance_id >= 0 ) { // Source map already belong to a Instance.
ShowError("instance_add_map: trying to instance already instanced map %s.\n", name);
return -4;
}
-
- ARR_FIND( instance_start, map_num, i, !map[i].name[0] ); // Searching for a Free Map
- if( i < map_num ) im = i; // Unused map found (old instance)
- else if( map_num - 1 >= MAX_MAP_PER_SERVER )
- { // No more free maps
- ShowError("instance_add_map: no more free space to create maps on this server.\n");
- return -5;
+
+ ARR_FIND( instance->start_id, map_num, i, !map[i].name[0] ); // Searching for a Free Map
+
+ if( i < map_num )
+ im = i; // Unused map found (old instance)
+ else {
+ im = map_num; // Using next map index
+ RECREATE(map,struct map_data,++map_num);
}
- else im = map_num++; // Using next map index
+
+ if( map[m].cell == (struct mapcell *)0xdeadbeaf )
+ map_cellfromcache(&map[m]);
memcpy( &map[im], &map[m], sizeof(struct map_data) ); // Copy source map
- snprintf(map[im].name, MAP_NAME_LENGTH, (usebasename ? "%.3d#%s" : "%.3d%s"), instance_id, name); // Generate Name for Instance Map
+ if( map_name != NULL ) {
+ snprintf(map[im].name, MAP_NAME_LENGTH, "%s", map_name);
+ map[im].cName = map[m].name;
+ } else
+ snprintf(map[im].name, MAP_NAME_LENGTH, (usebasename ? "%.3d#%s" : "%.3d%s"), instance_id, name); // Generate Name for Instance Map
map[im].index = mapindex_addmap(-1, map[im].name); // Add map index
- if( !map[im].index )
- {
+ map[im].channel = NULL;
+
+ if( !map[im].index ) {
map[im].name[0] = '\0';
ShowError("instance_add_map: no more free map indexes.\n");
return -3; // No free map index
}
-
+
// Reallocate cells
num_cell = map[im].xs * map[im].ys;
CREATE( map[im].cell, struct mapcell, num_cell );
@@ -161,9 +210,11 @@ int instance_add_map(const char *name, int instance_id, bool usebasename)
map[im].instance_src_map = m;
map[m].flag.src4instance = 1; // Flag this map as a src map for instances
- instance[instance_id].map[instance[instance_id].num_map++] = im; // Attach to actual instance
- map_addmap2db(&map[im]);
+ RECREATE(instances[instance_id].map, unsigned short, ++instances[instance_id].num_map);
+ instances[instance_id].map[instances[instance_id].num_map - 1] = im; // Attach to actual instance
+ map_addmap2db(&map[im]);
+
return im;
}
@@ -172,19 +223,16 @@ int instance_add_map(const char *name, int instance_id, bool usebasename)
* party_id : source party of this instance
* type : result (0 = map id | 1 = instance id)
*--------------------------------------*/
-int instance_map2imap(int16 m, int instance_id)
-{
+int instance_map2imap(int16 m, int instance_id) {
int i;
- if( !instance_is_valid(instance_id) )
- {
+ if( !instance->valid(instance_id) ) {
return -1;
}
- for( i = 0; i < instance[instance_id].num_map; i++ )
- {
- if( instance[instance_id].map[i] && map[instance[instance_id].map[i]].instance_src_map == m )
- return instance[instance_id].map[i];
+ for( i = 0; i < instances[instance_id].num_map; i++ ) {
+ if( instances[instance_id].map[i] && map[instances[instance_id].map[i]].instance_src_map == m )
+ return instances[instance_id].map[i];
}
return -1;
}
@@ -194,59 +242,56 @@ int instance_map2imap(int16 m, int instance_id)
* instance_id : where to search
* result : mapid of map "m" in this instance
*--------------------------------------*/
-int instance_mapid2imapid(int16 m, int instance_id)
-{
+int instance_mapid2imapid(int16 m, int instance_id) {
if( map[m].flag.src4instance == 0 )
return m; // not instances found for this map
- else if( map[m].instance_id )
- { // This map is a instance, not a src map instance
+ else if( map[m].instance_id >= 0 ) { // This map is a instance, not a src map instance
ShowError("map_instance_mapid2imapid: already instanced (%d / %d)\n", m, instance_id);
return -1;
}
- if( !instance_is_valid(instance_id) )
+ if( !instance->valid(instance_id) )
return -1;
- return instance_map2imap(m, instance_id);
+ return instance->map2imap(m, instance_id);
}
/*--------------------------------------
* map_instance_map_npcsub
* Used on Init instance. Duplicates each script on source map
*--------------------------------------*/
-int instance_map_npcsub(struct block_list* bl, va_list args)
-{
+int instance_map_npcsub(struct block_list* bl, va_list args) {
struct npc_data* nd = (struct npc_data*)bl;
int16 m = va_arg(args, int); // Destination Map
- npc_duplicate4instance(nd, m);
+ if ( npc_duplicate4instance(nd, m) )
+ ShowDebug("instance_map_npcsub:npc_duplicate4instance failed (%s/%d)\n",nd->name,m);
+
return 1;
}
/*--------------------------------------
* Init all map on the instance. Npcs are created here
*--------------------------------------*/
-void instance_init(int instance_id)
-{
+void instance_init(int instance_id) {
int i;
- if( !instance_is_valid(instance_id) )
+ if( !instance->valid(instance_id) )
return; // nothing to do
- for( i = 0; i < instance[instance_id].num_map; i++ )
- map_foreachinmap(instance_map_npcsub, map[instance[instance_id].map[i]].instance_src_map, BL_NPC, instance[instance_id].map[i]);
+ for( i = 0; i < instances[instance_id].num_map; i++ )
+ map_foreachinmap(instance_map_npcsub, map[instances[instance_id].map[i]].instance_src_map, BL_NPC, instances[instance_id].map[i]);
- instance[instance_id].state = INSTANCE_BUSY;
- ShowInfo("[Instance] Initialized %s.\n", instance[instance_id].name);
+ instances[instance_id].state = INSTANCE_BUSY;
}
/*--------------------------------------
* Used on instance deleting process.
* Warps all players on each instance map to its save points.
*--------------------------------------*/
-int instance_del_load(struct map_session_data* sd, va_list args)
-{
+int instance_del_load(struct map_session_data* sd, va_list args) {
int16 m = va_arg(args,int);
+
if( !sd || sd->bl.m != m )
return 0;
@@ -285,12 +330,11 @@ int instance_cleanup_sub(struct block_list *bl, va_list ap) {
/*--------------------------------------
* Removes a simple instance map
*--------------------------------------*/
-void instance_del_map(int16 m)
-{
+void instance_del_map(int16 m) {
int i;
- if( m <= 0 || !map[m].instance_id )
- {
- ShowError("Tried to remove non-existing instance map (%d)\n", m);
+
+ if( m <= 0 || map[m].instance_id == -1 ) {
+ ShowError("instance_del_map: tried to remove non-existing instance map (%d)\n", m);
return;
}
@@ -299,116 +343,145 @@ void instance_del_map(int16 m)
if( map[m].mob_delete_timer != INVALID_TIMER )
delete_timer(map[m].mob_delete_timer, map_removemobs_timer);
-
+
mapindex_removemap( map[m].index );
// Free memory
aFree(map[m].cell);
aFree(map[m].block);
aFree(map[m].block_mob);
-
+
// Remove from instance
- for( i = 0; i < instance[map[m].instance_id].num_map; i++ )
- {
- if( instance[map[m].instance_id].map[i] == m )
- {
- instance[map[m].instance_id].num_map--;
- for( ; i < instance[map[m].instance_id].num_map; i++ )
- instance[map[m].instance_id].map[i] = instance[map[m].instance_id].map[i+1];
+ for( i = 0; i < instances[map[m].instance_id].num_map; i++ ) {
+ if( instances[map[m].instance_id].map[i] == m ) {
+ instances[map[m].instance_id].num_map--;
+ for( ; i < instances[map[m].instance_id].num_map; i++ )
+ instances[map[m].instance_id].map[i] = instances[map[m].instance_id].map[i+1];
i = -1;
break;
}
}
- if( i == instance[map[m].instance_id].num_map )
- ShowError("map_instance_del: failed to remove %s from instance list (%s): %d\n", map[m].name, instance[map[m].instance_id].name, m);
+
+ if( i == instances[map[m].instance_id].num_map )
+ ShowError("map_instance_del: failed to remove %s from instance list (%s): %d\n", map[m].name, instances[map[m].instance_id].name, m);
+
+ if( map[m].channel )
+ clif->chsys_delete(map[m].channel);
map_removemapdb(&map[m]);
memset(&map[m], 0x00, sizeof(map[0]));
-
- /* for it is default and makes it not try to delete a non-existent timer since we did not delete this entry. */
+ map[m].instance_id = -1;
map[m].mob_delete_timer = INVALID_TIMER;
}
/*--------------------------------------
* Timer to destroy instance by process or idle
*--------------------------------------*/
-int instance_destroy_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
- instance_destroy(id);
+int instance_destroy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ instance->destroy(id);
return 0;
}
/*--------------------------------------
* Removes a instance, all its maps and npcs.
*--------------------------------------*/
-void instance_destroy(int instance_id)
-{
- int last = 0, type;
- struct party_data *p;
- time_t now = time(NULL);
-
- if( !instance_is_valid(instance_id) )
+void instance_destroy(int instance_id) {
+ unsigned short *iptr = NULL, *icptr = NULL;
+ struct map_session_data *sd = NULL;
+ struct party_data *p = NULL;
+ struct guild *g = NULL;
+ int last = 0, type, j;
+ unsigned int now = (unsigned int)time(NULL);
+
+ if( !instance->valid(instance_id) )
return; // nothing to do
- if( instance[instance_id].progress_timeout && instance[instance_id].progress_timeout <= now )
+ if( instances[instance_id].progress_timeout && instances[instance_id].progress_timeout <= now )
type = 1;
- else if( instance[instance_id].idle_timeout && instance[instance_id].idle_timeout <= now )
+ else if( instances[instance_id].idle_timeout && instances[instance_id].idle_timeout <= now )
type = 2;
else
type = 3;
clif->instance(instance_id, 5, type); // Report users this instance has been destroyed
- while( instance[instance_id].num_map && last != instance[instance_id].map[0] )
- { // Remove all maps from instance
- last = instance[instance_id].map[0];
- instance_del_map( instance[instance_id].map[0] );
+ switch ( instances[instance_id].owner_type ) {
+ case IOT_NONE:
+ break;
+ case IOT_CHAR:
+ if( ( sd = map_id2sd(instances[instance_id].owner_id) ) == NULL ) {
+ break;
+ }
+ iptr = sd->instance;
+ icptr = &sd->instances;
+ break;
+ case IOT_PARTY:
+ if( ( p = party_search(instances[instance_id].owner_id) ) == NULL ) {
+ break;
+ }
+ iptr = p->instance;
+ icptr = &p->instances;
+ break;
+ case IOT_GUILD:
+ if( ( g = guild->search(instances[instance_id].owner_id) ) == NULL ) {
+ break;
+ }
+ iptr = g->instance;
+ icptr = &g->instances;
+ break;
+ default:
+ ShowError("instance_destroy: unknown type %d for owner_id %d and name %s.\n", instances[instance_id].owner_type,instances[instance_id].owner_id,instances[instance_id].name);
+ break;
+ }
+
+ if( iptr != NULL ) {
+ ARR_FIND(0, *icptr, j, iptr[j] == instance_id);
+ if( j != *icptr )
+ iptr[j] = 0;
+ }
+
+ while( instances[instance_id].num_map && last != instances[instance_id].map[0] ) { // Remove all maps from instance
+ last = instances[instance_id].map[0];
+ instance->del_map( instances[instance_id].map[0] );
}
- if( instance[instance_id].vars )
- db_destroy(instance[instance_id].vars);
-
- if( instance[instance_id].progress_timer != INVALID_TIMER )
- delete_timer( instance[instance_id].progress_timer, instance_destroy_timer);
- if( instance[instance_id].idle_timer != INVALID_TIMER )
- delete_timer( instance[instance_id].idle_timer, instance_destroy_timer);
+ if( instances[instance_id].vars )
+ db_destroy(instances[instance_id].vars);
- instance[instance_id].vars = NULL;
+ if( instances[instance_id].progress_timer != INVALID_TIMER )
+ delete_timer( instances[instance_id].progress_timer, instance_destroy_timer);
+ if( instances[instance_id].idle_timer != INVALID_TIMER )
+ delete_timer( instances[instance_id].idle_timer, instance_destroy_timer);
- if( instance[instance_id].party_id && (p = party_search(instance[instance_id].party_id)) != NULL )
- p->instance_id = 0; // Update Party information
+ instances[instance_id].vars = NULL;
- ShowInfo("[Instance] Destroyed %s.\n", instance[instance_id].name);
- memset( &instance[instance_id], 0x00, sizeof(instance[0]) );
+ aFree(instances[instance_id].map);
+
+ memset( &instances[instance_id], 0x00, sizeof(struct instance_data) );
- instance[instance_id].state = INSTANCE_FREE;
}
/*--------------------------------------
* Checks if there are users in the instance or not to start idle timer
*--------------------------------------*/
-void instance_check_idle(int instance_id)
-{
+void instance_check_idle(int instance_id) {
bool idle = true;
- time_t now = time(NULL);
+ unsigned int now = (unsigned int)time(NULL);
- if( !instance_is_valid(instance_id) || instance[instance_id].idle_timeoutval == 0 )
+ if( !instance->valid(instance_id) || instances[instance_id].idle_timeoutval == 0 )
return;
- if( instance[instance_id].users )
+ if( instances[instance_id].users )
idle = false;
- if( instance[instance_id].idle_timer != INVALID_TIMER && !idle )
- {
- delete_timer(instance[instance_id].idle_timer, instance_destroy_timer);
- instance[instance_id].idle_timer = INVALID_TIMER;
- instance[instance_id].idle_timeout = 0;
+ if( instances[instance_id].idle_timer != INVALID_TIMER && !idle ) {
+ delete_timer(instances[instance_id].idle_timer, instance_destroy_timer);
+ instances[instance_id].idle_timer = INVALID_TIMER;
+ instances[instance_id].idle_timeout = 0;
clif->instance(instance_id, 3, 0); // Notify instance users normal instance expiration
- }
- else if( instance[instance_id].idle_timer == INVALID_TIMER && idle )
- {
- instance[instance_id].idle_timeout = now + instance[instance_id].idle_timeoutval;
- instance[instance_id].idle_timer = add_timer( gettick() + (unsigned int)instance[instance_id].idle_timeoutval * 1000, instance_destroy_timer, instance_id, 0);
+ } else if( instances[instance_id].idle_timer == INVALID_TIMER && idle ) {
+ instances[instance_id].idle_timeout = now + instances[instance_id].idle_timeoutval;
+ instances[instance_id].idle_timer = add_timer( gettick() + instances[instance_id].idle_timeoutval * 1000, instance_destroy_timer, instance_id, 0);
clif->instance(instance_id, 4, 0); // Notify instance users it will be destroyed of no user join it again in "X" time
}
}
@@ -418,54 +491,46 @@ void instance_check_idle(int instance_id)
*--------------------------------------*/
void instance_set_timeout(int instance_id, unsigned int progress_timeout, unsigned int idle_timeout)
{
- time_t now = time(0);
+ unsigned int now = (unsigned int)time(0);
- if( !instance_is_valid(instance_id) )
+ if( !instance->valid(instance_id) )
return;
- if( instance[instance_id].progress_timer != INVALID_TIMER )
- delete_timer( instance[instance_id].progress_timer, instance_destroy_timer);
- if( instance[instance_id].idle_timer != INVALID_TIMER )
- delete_timer( instance[instance_id].idle_timer, instance_destroy_timer);
-
- if( progress_timeout )
- {
- instance[instance_id].progress_timeout = now + progress_timeout;
- instance[instance_id].progress_timer = add_timer( gettick() + progress_timeout * 1000, instance_destroy_timer, instance_id, 0);
- }
- else
- {
- instance[instance_id].progress_timeout = 0;
- instance[instance_id].progress_timer = INVALID_TIMER;
+ if( instances[instance_id].progress_timer != INVALID_TIMER )
+ delete_timer( instances[instance_id].progress_timer, instance_destroy_timer);
+ if( instances[instance_id].idle_timer != INVALID_TIMER )
+ delete_timer( instances[instance_id].idle_timer, instance_destroy_timer);
+
+ if( progress_timeout ) {
+ instances[instance_id].progress_timeout = now + progress_timeout;
+ instances[instance_id].progress_timer = add_timer( gettick() + progress_timeout * 1000, instance_destroy_timer, instance_id, 0);
+ } else {
+ instances[instance_id].progress_timeout = 0;
+ instances[instance_id].progress_timer = INVALID_TIMER;
}
- if( idle_timeout )
- {
- instance[instance_id].idle_timeoutval = idle_timeout;
- instance[instance_id].idle_timer = INVALID_TIMER;
+ if( idle_timeout ) {
+ instances[instance_id].idle_timeoutval = idle_timeout;
+ instances[instance_id].idle_timer = INVALID_TIMER;
instance_check_idle(instance_id);
- }
- else
- {
- instance[instance_id].idle_timeoutval = 0;
- instance[instance_id].idle_timeout = 0;
- instance[instance_id].idle_timer = INVALID_TIMER;
+ } else {
+ instances[instance_id].idle_timeoutval = 0;
+ instances[instance_id].idle_timeout = 0;
+ instances[instance_id].idle_timer = INVALID_TIMER;
}
- if( instance[instance_id].idle_timer == INVALID_TIMER && instance[instance_id].progress_timer != INVALID_TIMER )
+ if( instances[instance_id].idle_timer == INVALID_TIMER && instances[instance_id].progress_timer != INVALID_TIMER )
clif->instance(instance_id, 3, 0);
}
/*--------------------------------------
* Checks if sd in on a instance and should be kicked from it
*--------------------------------------*/
-void instance_check_kick(struct map_session_data *sd)
-{
+void instance_check_kick(struct map_session_data *sd) {
int16 m = sd->bl.m;
clif->instance_leave(sd->fd);
- if( map[m].instance_id )
- { // User was on the instance map
+ if( map[m].instance_id >= 0 ) { // User was on the instance map
if( map[m].save.map )
pc_setpos(sd, map[m].save.map, map[m].save.x, map[m].save.y, CLR_TELEPORT);
else
@@ -473,16 +538,41 @@ void instance_check_kick(struct map_session_data *sd)
}
}
-void do_final_instance(void)
-{
+void do_final_instance(void) {
int i;
- for( i = 1; i < MAX_INSTANCE; i++ )
+ for(i = 0; i < instance->instances; i++) {
instance_destroy(i);
+ }
+
+ aFree(instances);
}
-void do_init_instance(void)
-{
- memset(instance, 0x00, sizeof(instance));
+void do_init_instance(void) {
add_timer_func_list(instance_destroy_timer, "instance_destroy_timer");
}
+
+void instance_defaults(void) {
+ instance = &instance_s;
+
+ instance->init = do_init_instance;
+ instance->final = do_final_instance;
+
+ /* start point */
+ instance->start_id = 0;
+ /* count */
+ instance->instances = 0;
+
+ /* */
+ instance->create = instance_create;
+ instance->add_map = instance_add_map;
+ instance->del_map = instance_del_map;
+ instance->map2imap = instance_map2imap;
+ instance->mapid2imapid = instance_mapid2imapid;
+ instance->destroy = instance_destroy;
+ instance->start = instance_init;
+ instance->check_idle = instance_check_idle;
+ instance->check_kick = instance_check_kick;
+ instance->set_timeout = instance_set_timeout;
+ instance->valid = instance_is_valid;
+}
diff --git a/src/map/instance.h b/src/map/instance.h
index 03b0d0898..e86586e44 100644
--- a/src/map/instance.h
+++ b/src/map/instance.h
@@ -1,51 +1,71 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _INSTANCE_H_
#define _INSTANCE_H_
-#define MAX_MAP_PER_INSTANCE 10
-#define MAX_INSTANCE 500
-
#define INSTANCE_NAME_LENGTH (60+1)
-typedef enum instance_state { INSTANCE_FREE, INSTANCE_IDLE, INSTANCE_BUSY } instance_state;
+typedef enum instance_state {
+ INSTANCE_FREE,
+ INSTANCE_IDLE,
+ INSTANCE_BUSY
+} instance_state;
+
+enum instance_owner_type {
+ IOT_NONE,
+ IOT_CHAR,
+ IOT_PARTY,
+ IOT_GUILD,
+ /* ... */
+ IOT_MAX,
+};
-struct s_instance {
+struct instance_data {
+ unsigned short id;
char name[INSTANCE_NAME_LENGTH]; // Instance Name - required for clif functions.
instance_state state;
- short instance_id;
- int party_id;
+ enum instance_owner_type owner_type;
+ int owner_id;
- int map[MAX_MAP_PER_INSTANCE];
- int num_map;
- int users;
+ unsigned short *map;
+ unsigned short num_map;
+ unsigned short users;
struct DBMap* vars; // Instance Variable for scripts
int progress_timer;
- time_t progress_timeout;
+ unsigned int progress_timeout;
int idle_timer;
- time_t idle_timeout, idle_timeoutval;
+ unsigned int idle_timeout, idle_timeoutval;
};
-extern int instance_start;
-extern struct s_instance instance[MAX_INSTANCE];
+struct instance_data *instances;
-int instance_create(int party_id, const char *name);
-int instance_add_map(const char *name, int instance_id, bool usebasename);
-void instance_del_map(int16 m);
-int instance_map2imap(int16 m, int instance_id);
-int instance_mapid2imapid(int16 m, int instance_id);
-void instance_destroy(int instance_id);
-void instance_init(int instance_id);
+struct instance_interface {
+ void (*init) (void);
+ void (*final) (void);
+ /* start point */
+ unsigned short start_id;
+ unsigned short instances;
+ /* */
+ int (*create) (int party_id, const char *name, enum instance_owner_type type);
+ int (*add_map) (const char *name, int instance_id, bool usebasename, const char *map_name);
+ void (*del_map) (int16 m);
+ int (*map2imap) (int16 m, int instance_id);
+ int (*mapid2imapid) (int16 m, int instance_id);
+ void (*destroy) (int instance_id);
+ void (*start) (int instance_id);
+ void (*check_idle) (int instance_id);
+ void (*check_kick) (struct map_session_data *sd);
+ void (*set_timeout) (int instance_id, unsigned int progress_timeout, unsigned int idle_timeout);
+ bool (*valid) (int instance_id);
+} instance_s;
-void instance_check_idle(int instance_id);
-void instance_check_kick(struct map_session_data *sd);
-void instance_set_timeout(int instance_id, unsigned int progress_timeout, unsigned int idle_timeout);
+struct instance_interface *instance;
-void do_final_instance(void);
-void do_init_instance(void);
+void instance_defaults(void);
#endif
diff --git a/src/map/intif.c b/src/map/intif.c
index 93bb8add7..9e6403f10 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -467,7 +467,7 @@ int intif_party_changemap(struct map_session_data *sd,int online)
if(!sd)
return 0;
- if( (m=map_mapindex2mapid(sd->mapindex)) >= 0 && map[m].instance_id )
+ if( (m=map_mapindex2mapid(sd->mapindex)) >= 0 && map[m].instance_id >= 0 )
mapindex = map[map[m].instance_src_map].index;
else
mapindex = sd->mapindex;
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c
index 0e155011e..bfaf18af0 100644
--- a/src/map/irc-bot.c
+++ b/src/map/irc-bot.c
@@ -22,12 +22,16 @@
char send_string[200];
int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ struct hSockOpt opt;
if( ircbot->isOn || ++ircbot->fails >= 3 )
return 0;
+ opt.silent = 1;
+ opt.setTimeo = 0;
+
ircbot->last_try = gettick();
- if( ( ircbot->fd = make_connection(ircbot->ip,hChSys.irc_server_port,true) ) > 0 ){
+ if( ( ircbot->fd = make_connection(ircbot->ip,hChSys.irc_server_port,&opt) ) > 0 ){
session[ircbot->fd]->func_parse = ircbot->parse;
session[ircbot->fd]->flag.server = 1;
add_timer(gettick() + 3000, ircbot->identify_timer, 0, 0);
diff --git a/src/map/map.c b/src/map/map.c
index d4c15cd6e..54646d1c3 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -101,7 +101,7 @@ static DBMap* id_db=NULL; // int id -> struct block_list*
static DBMap* pc_db=NULL; // int id -> struct map_session_data*
static DBMap* mobid_db=NULL; // int id -> struct mob_data*
static DBMap* bossid_db=NULL; // int id -> struct mob_data* (MVP db)
-static DBMap* map_db=NULL; // unsigned int mapindex -> struct map_data*
+static DBMap* map_db=NULL; // unsigned int mapindex -> struct map_data_other_server*
static DBMap* nick_db=NULL; // int char_id -> struct charid2nick* (requested names of offline characters)
static DBMap* charid_db=NULL; // int char_id -> struct map_session_data*
static DBMap* regen_db=NULL; // int id -> struct block_list* (status_natural_heal processing)
@@ -150,6 +150,8 @@ struct map_cache_map_info {
int32 len;
};
+uint16 index2mapid[MAX_MAPINDEX];
+
char db_path[256] = "db";
char help_txt[256] = "conf/help.txt";
char help2_txt[256] = "conf/help2.txt";
@@ -162,6 +164,7 @@ int enable_grf = 0; //To enable/disable reading maps from GRF files, bypassing m
/* [Ind/Hercules] */
struct eri *map_iterator_ers;
+char *map_cache_buffer = NULL; // Has the uncompressed gat data of all maps, so just one allocation has to be made
/*==========================================
* server player count (of all mapservers)
@@ -397,8 +400,7 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
if (sc->data[SC_PROPERTYWALK] &&
sc->data[SC_PROPERTYWALK]->val3 >= skill->get_maxcount(sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2) )
status_change_end(bl,SC_PROPERTYWALK,INVALID_TIMER);
- } else
- if (bl->type == BL_NPC)
+ } else if (bl->type == BL_NPC)
npc_unsetcells((TBL_NPC*)bl);
if (moveblock) map_delblock(bl);
@@ -469,8 +471,7 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
skill->unit_move_unit_group(skill->id2group(sc->data[SC_HAWKEYES]->val4), bl->m, x1-x0, y1-y0);
}
}
- } else
- if (bl->type == BL_NPC)
+ } else if (bl->type == BL_NPC)
npc_setcells((TBL_NPC*)bl);
return 0;
@@ -1194,8 +1195,7 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int16 m,int16 x0,i
}
// Copy of map_foreachincell, but applied to the whole map. [Skotlex]
-int map_foreachinmap(int (*func)(struct block_list*,va_list), int16 m, int type,...)
-{
+int map_foreachinmap(int (*func)(struct block_list*,va_list), int16 m, int type,...) {
int b, bsize;
int returnCount = 0; //total sum of returned values of func() [Skotlex]
struct block_list *bl;
@@ -1233,6 +1233,52 @@ int map_foreachinmap(int (*func)(struct block_list*,va_list), int16 m, int type,
bl_list_count = blockcount;
return returnCount;
}
+// Copy of map_foreachinmap, but applied to all maps in a instance id. [Ind/Hercules]
+int map_foreachininstance(int (*func)(struct block_list*,va_list), int16 instance_id, int type,...) {
+ int b, bsize;
+ int returnCount = 0; //total sum of returned values of func() [Skotlex]
+ struct block_list *bl;
+ int blockcount = bl_list_count, i, j;
+ int16 m;
+ va_list ap;
+
+ for( j = 0; j < instances[instance_id].num_map; j++ ) {
+
+ m = instances[instance_id].map[j];
+
+ bsize = map[ m ].bxs * map[ m ].bys;
+
+ if( type&~BL_MOB )
+ for( b = 0; b < bsize; b++ )
+ for( bl = map[ m ].block[ b ]; bl != NULL; bl = bl->next )
+ if( bl->type&type && bl_list_count < BL_LIST_MAX )
+ bl_list[ bl_list_count++ ] = bl;
+
+ if( type&BL_MOB )
+ for( b = 0; b < bsize; b++ )
+ for( bl = map[ m ].block_mob[ b ]; bl != NULL; bl = bl->next )
+ if( bl_list_count < BL_LIST_MAX )
+ bl_list[ bl_list_count++ ] = bl;
+
+ if( bl_list_count >= BL_LIST_MAX )
+ ShowWarning("map_foreachininstance: block count too many!\n");
+
+ map_freeblock_lock();
+
+ for( i = blockcount; i < bl_list_count ; i++ )
+ if( bl_list[ i ]->prev ) { //func() may delete this bl_list[] slot, checking for prev ensures it wasnt queued for deletion.
+ va_start(ap, type);
+ returnCount += func(bl_list[ i ], ap);
+ va_end(ap);
+ }
+
+ map_freeblock_unlock();
+
+ }
+
+ bl_list_count = blockcount;
+ return returnCount;
+}
/// Generates a new flooritem object id from the interval [MIN_FLOORITEM, MAX_FLOORITEM).
@@ -1637,8 +1683,19 @@ int map_quit(struct map_session_data *sd) {
pc_itemcd_do(sd,false);
+ for( i = 0; i < sd->queues_count; i++ ) {
+ struct hQueue *queue;
+ if( (queue = script->queue(sd->queues[i])) && queue->onLogOut[0] != '\0' ) {
+ npc_event(sd, queue->onLogOut, 0);
+ }
+ }
+ /* two times, the npc event above may assign a new one or delete others */
+ for( i = 0; i < sd->queues_count; i++ ) {
+ script->queue_remove(sd->queues[i],sd->status.account_id);
+ }
+
npc_script_event(sd, NPCE_LOGOUT);
-
+
//Unit_free handles clearing the player related data,
//map_quit handles extra specific data which is related to quitting normally
//(changing map-servers invokes unit_free but bypasses map_quit)
@@ -1712,7 +1769,7 @@ int map_quit(struct map_session_data *sd) {
unit_remove_map_pc(sd,CLR_TELEPORT);
- if( map[sd->bl.m].instance_id ) { // Avoid map conflicts and warnings on next login
+ if( map[sd->bl.m].instance_id >= 0 ) { // Avoid map conflicts and warnings on next login
int16 m;
struct point *pt;
if( map[sd->bl.m].save.map )
@@ -1720,8 +1777,7 @@ int map_quit(struct map_session_data *sd) {
else
pt = &sd->status.save_point;
- if( (m=map_mapindex2mapid(pt->map)) >= 0 )
- {
+ if( (m=map_mapindex2mapid(pt->map)) >= 0 ) {
sd->bl.m = m;
sd->bl.x = pt->x;
sd->bl.y = pt->y;
@@ -2160,8 +2216,7 @@ bool mapit_exists(struct s_mapiterator* mapit)
/*==========================================
* Add npc-bl to id_db, basically register npc to map
*------------------------------------------*/
-bool map_addnpc(int16 m,struct npc_data *nd)
-{
+bool map_addnpc(int16 m,struct npc_data *nd) {
nullpo_ret(nd);
if( m < 0 || m >= map_num )
@@ -2188,8 +2243,7 @@ int map_addmobtolist(unsigned short m, struct spawn_data *spawn)
{
size_t i;
ARR_FIND( 0, MAX_MOB_LIST_PER_MAP, i, map[m].moblist[i] == NULL );
- if( i < MAX_MOB_LIST_PER_MAP )
- {
+ if( i < MAX_MOB_LIST_PER_MAP ) {
map[m].moblist[i] = spawn;
return i;
}
@@ -2250,13 +2304,11 @@ int map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data)
int count;
const int16 m = id;
- if (m < 0 || m >= MAX_MAP_PER_SERVER)
- { //Incorrect map id!
+ if (m < 0 || m >= map_num) { //Incorrect map id!
ShowError("map_removemobs_timer error: timer %d points to invalid map %d\n",tid, m);
return 0;
}
- if (map[m].mob_delete_timer != tid)
- { //Incorrect timer call!
+ if (map[m].mob_delete_timer != tid) { //Incorrect timer call!
ShowError("map_removemobs_timer mismatch: %d != %d (map %s)\n",map[m].mob_delete_timer, tid, map[m].name);
return 0;
}
@@ -2283,8 +2335,7 @@ void map_removemobs(int16 m)
/*==========================================
* Hookup, get map_id from map_name
*------------------------------------------*/
-int16 map_mapname2mapid(const char* name)
-{
+int16 map_mapname2mapid(const char* name) {
unsigned short map_index;
map_index = mapindex_name2id(name);
if (!map_index)
@@ -2295,24 +2346,18 @@ int16 map_mapname2mapid(const char* name)
/*==========================================
* Returns the map of the given mapindex. [Skotlex]
*------------------------------------------*/
-int16 map_mapindex2mapid(unsigned short mapindex)
-{
- struct map_data *md=NULL;
+int16 map_mapindex2mapid(unsigned short mapindex) {
- if (!mapindex)
+ if (!mapindex || mapindex > MAX_MAPINDEX)
return -1;
- md = (struct map_data*)uidb_get(map_db,(unsigned int)mapindex);
- if(md==NULL || md->cell==NULL)
- return -1;
- return md->m;
+ return index2mapid[mapindex] == 0 ? -1 : index2mapid[mapindex];
}
/*==========================================
* Switching Ip, port ? (like changing map_server) get ip/port from map_name
*------------------------------------------*/
-int map_mapname2ipport(unsigned short name, uint32* ip, uint16* port)
-{
+int map_mapname2ipport(unsigned short name, uint32* ip, uint16* port) {
struct map_data_other_server *mdos;
mdos = (struct map_data_other_server*)uidb_get(map_db,(unsigned int)name);
@@ -2443,8 +2488,7 @@ inline static struct mapcell map_gat2cell(int gat) {
return cell;
}
-static int map_cell2gat(struct mapcell cell)
-{
+static int map_cell2gat(struct mapcell cell) {
if( cell.walkable == 1 && cell.shootable == 1 && cell.water == 0 ) return 0;
if( cell.walkable == 0 && cell.shootable == 0 && cell.water == 0 ) return 1;
if( cell.walkable == 1 && cell.shootable == 1 && cell.water == 1 ) return 3;
@@ -2453,17 +2497,42 @@ static int map_cell2gat(struct mapcell cell)
ShowWarning("map_cell2gat: cell has no matching gat type\n");
return 1; // default to 'wall'
}
+int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk);
+void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag);
+void map_cellfromcache(struct map_data *m) {
+ char decode_buffer[MAX_MAP_SIZE];
+ struct map_cache_map_info *info = NULL;
+
+ if( (info = (struct map_cache_map_info *)m->cellPos) ) {
+ unsigned long size, xy;
+ int i;
+
+ size = (unsigned long)info->xs*(unsigned long)info->ys;
+
+ // TO-DO: Maybe handle the scenario, if the decoded buffer isn't the same size as expected? [Shinryo]
+ decode_zip(decode_buffer, &size, m->cellPos+sizeof(struct map_cache_map_info), info->len);
+ CREATE(m->cell, struct mapcell, size);
+
+ for( xy = 0; xy < size; ++xy )
+ m->cell[xy] = map_gat2cell(decode_buffer[xy]);
+
+ m->getcellp = map_getcellp;
+ m->setcell = map_setcell;
+
+ for(i = 0; i < m->npc_num; i++) {
+ npc_setcells(m->npc[i]);
+ }
+ }
+}
/*==========================================
* Confirm if celltype in (m,x,y) match the one given in cellchk
*------------------------------------------*/
-int map_getcell(int16 m,int16 x,int16 y,cell_chk cellchk)
-{
- return (m < 0 || m >= MAX_MAP_PER_SERVER) ? 0 : map_getcellp(&map[m],x,y,cellchk);
+int map_getcell(int16 m,int16 x,int16 y,cell_chk cellchk) {
+ return (m < 0 || m >= map_num) ? 0 : map[m].getcellp(&map[m],x,y,cellchk);
}
-int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk)
-{
+int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) {
struct mapcell cell;
nullpo_ret(m);
@@ -2474,8 +2543,7 @@ int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk)
cell = m->cell[x + y*m->xs];
- switch(cellchk)
- {
+ switch(cellchk) {
// gat type retrieval
case CELL_GETTYPE:
return map_cell2gat(cell);
@@ -2534,13 +2602,19 @@ int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk)
}
}
+/* [Ind/Hercules] */
+int map_sub_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) {
+ map_cellfromcache(m);
+ m->getcellp = map_getcellp;
+ m->setcell = map_setcell;
+ return m->getcellp(m,x,y,cellchk);
+}
/*==========================================
* Change the type/flags of a map cell
* 'cell' - which flag to modify
* 'flag' - true = on, false = off
*------------------------------------------*/
-void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag)
-{
+void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) {
int j;
if( m < 0 || m >= map_num || x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys )
@@ -2565,7 +2639,16 @@ void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag)
break;
}
}
-
+void map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) {
+
+ if( m < 0 || m >= map_num || x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys )
+ return;
+
+ map_cellfromcache(&map[m]);
+ map[m].setcell = map_setcell;
+ map[m].getcellp = map_getcellp;
+ map[m].setcell(m,x,y,cell,flag);
+}
void map_setgatcell(int16 m, int16 x, int16 y, int gat)
{
int j;
@@ -2635,8 +2718,8 @@ bool map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable
if( map_getcell(m, x1, y1, CELL_CHKNOREACH) )
break; // Collision
- map_setcell(m, x1, y1, CELL_WALKABLE, false);
- map_setcell(m, x1, y1, CELL_SHOOTABLE, shootable);
+ map[m].setcell(m, x1, y1, CELL_WALKABLE, false);
+ map[m].setcell(m, x1, y1, CELL_SHOOTABLE, shootable);
clif->changemapcell(0, m, x1, y1, map_getcell(m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP);
}
@@ -2682,8 +2765,8 @@ void map_iwall_remove(const char *wall_name)
for( i = 0; i < iwall->size; i++ ) {
map_iwall_nextxy(iwall->x, iwall->y, iwall->dir, i, &x1, &y1);
- map_setcell(iwall->m, x1, y1, CELL_SHOOTABLE, true);
- map_setcell(iwall->m, x1, y1, CELL_WALKABLE, true);
+ map[iwall->m].setcell(iwall->m, x1, y1, CELL_SHOOTABLE, true);
+ map[iwall->m].setcell(iwall->m, x1, y1, CELL_WALKABLE, true);
clif->changemapcell(0, iwall->m, x1, y1, map_getcell(iwall->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP);
}
@@ -2740,8 +2823,7 @@ int map_eraseallipport_sub(DBKey key, DBData *data, va_list va)
return 0;
}
-int map_eraseallipport(void)
-{
+int map_eraseallipport(void) {
map_db->foreach(map_db,map_eraseallipport_sub);
return 1;
}
@@ -2749,8 +2831,7 @@ int map_eraseallipport(void)
/*==========================================
* Delete mapindex from db of another map server
*------------------------------------------*/
-int map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port)
-{
+int map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) {
struct map_data_other_server *mdos;
mdos = (struct map_data_other_server*)uidb_get(map_db,(unsigned int)mapindex);
@@ -2800,13 +2881,12 @@ static char *map_init_mapcache(FILE *fp)
* Map cache reading
* [Shinryo]: Optimized some behaviour to speed this up
*==========================================*/
-int map_readfromcache(struct map_data *m, char *buffer, char *decode_buffer)
-{
+int map_readfromcache(struct map_data *m, char *buffer) {
int i;
struct map_cache_main_header *header = (struct map_cache_main_header *)buffer;
struct map_cache_map_info *info = NULL;
char *p = buffer + sizeof(struct map_cache_main_header);
-
+
for(i = 0; i < header->map_count; i++) {
info = (struct map_cache_map_info *)p;
@@ -2818,8 +2898,8 @@ int map_readfromcache(struct map_data *m, char *buffer, char *decode_buffer)
}
if( info && i < header->map_count ) {
- unsigned long size, xy;
-
+ unsigned long size;
+
if( info->xs <= 0 || info->ys <= 0 )
return 0;// Invalid
@@ -2831,51 +2911,30 @@ int map_readfromcache(struct map_data *m, char *buffer, char *decode_buffer)
ShowWarning("map_readfromcache: %s exceeded MAX_MAP_SIZE of %d\n", info->name, MAX_MAP_SIZE);
return 0; // Say not found to remove it from list.. [Shinryo]
}
-
- // TO-DO: Maybe handle the scenario, if the decoded buffer isn't the same size as expected? [Shinryo]
- decode_zip(decode_buffer, &size, p+sizeof(struct map_cache_map_info), info->len);
-
- CREATE(m->cell, struct mapcell, size);
-
-
- for( xy = 0; xy < size; ++xy )
- m->cell[xy] = map_gat2cell(decode_buffer[xy]);
-
+
+ m->cellPos = p;
+ m->cell = (struct mapcell *)0xdeadbeaf;
+
return 1;
}
return 0; // Not found
}
-int map_addmap(char* mapname)
-{
- if( strcmpi(mapname,"clear")==0 )
- {
- map_num = 0;
- instance_start = 0;
- return 0;
- }
-
- if( map_num >= MAX_MAP_PER_SERVER - 1 )
- {
- ShowError("Could not add map '"CL_WHITE"%s"CL_RESET"', the limit of maps has been reached.\n",mapname);
- return 1;
- }
- mapindex_getmapname(mapname, map[map_num].name);
- map_num++;
+int map_addmap(char* mapname) {
+ map[map_num].instance_id = -1;
+ mapindex_getmapname(mapname, map[map_num++].name);
return 0;
}
-static void map_delmapid(int id)
-{
+static void map_delmapid(int id) {
ShowNotice("Removing map [ %s ] from maplist"CL_CLL"\n",map[id].name);
memmove(map+id, map+id+1, sizeof(map[0])*(map_num-id-1));
map_num--;
}
-int map_delmap(char* mapname)
-{
+int map_delmap(char* mapname) {
int i;
char map_name[MAP_NAME_LENGTH];
@@ -2958,13 +3017,62 @@ void map_zone_db_clear(void) {
}
aFree(map_zone_all.capped_skills);
}
-
+void map_clean(int i) {
+ int v;
+ if(map[i].cell && map[i].cell != (struct mapcell *)0xdeadbeaf) aFree(map[i].cell);
+ if(map[i].block) aFree(map[i].block);
+ if(map[i].block_mob) aFree(map[i].block_mob);
+
+ if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random]
+ int j;
+ if(map[i].mob_delete_timer != INVALID_TIMER)
+ delete_timer(map[i].mob_delete_timer, map_removemobs_timer);
+ for (j=0; j<MAX_MOB_LIST_PER_MAP; j++)
+ if (map[i].moblist[j]) aFree(map[i].moblist[j]);
+ }
+
+ if( map[i].unit_count ) {
+ for(v = 0; v < map[i].unit_count; v++) {
+ aFree(map[i].units[v]);
+ }
+ if( map[i].units ) {
+ aFree(map[i].units);
+ map[i].units = NULL;
+ }
+ map[i].unit_count = 0;
+ }
+
+ if( map[i].skill_count ) {
+ for(v = 0; v < map[i].skill_count; v++) {
+ aFree(map[i].skills[v]);
+ }
+ if( map[i].skills ) {
+ aFree(map[i].skills);
+ map[i].skills = NULL;
+ }
+ map[i].skill_count = 0;
+ }
+
+ if( map[i].zone_mf_count ) {
+ for(v = 0; v < map[i].zone_mf_count; v++) {
+ aFree(map[i].zone_mf[v]);
+ }
+ if( map[i].zone_mf ) {
+ aFree(map[i].zone_mf);
+ map[i].zone_mf = NULL;
+ }
+ map[i].zone_mf_count = 0;
+ }
+
+ if( map[i].channel )
+ clif->chsys_delete(map[i].channel);
+}
void do_final_maps(void) {
int i, v = 0;
for( i = 0; i < map_num; i++ ) {
- if(map[i].cell) aFree(map[i].cell);
+ if(map[i].cell && map[i].cell != (struct mapcell *)0xdeadbeaf ) aFree(map[i].cell);
if(map[i].block) aFree(map[i].block);
if(map[i].block_mob) aFree(map[i].block_mob);
@@ -3009,6 +3117,12 @@ void do_final_maps(void) {
map[i].zone_mf_count = 0;
}
+ if( map[i].drop_list_count ) {
+ map[i].drop_list_count = 0;
+ }
+ if( map[i].drop_list != NULL )
+ aFree(map[i].drop_list);
+
if( map[i].channel )
clif->chsys_delete(map[i].channel);
}
@@ -3028,7 +3142,10 @@ void map_flags_init(void) {
map[i].nocommand = 0; // nocommand mapflag level
map[i].bexp = 100; // per map base exp multiplicator
map[i].jexp = 100; // per map job exp multiplicator
- memset(map[i].drop_list, 0, sizeof(map[i].drop_list)); // pvp nightmare drop list
+ if( map[i].drop_list != NULL )
+ aFree(map[i].drop_list);
+ map[i].drop_list = NULL;
+ map[i].drop_list_count = 0;
if( map[i].unit_count ) {
for(v = 0; v < map[i].unit_count; v++) {
@@ -3153,14 +3270,12 @@ int map_readgat (struct map_data* m)
/*======================================
* Add/Remove map to the map_db
*--------------------------------------*/
-void map_addmap2db(struct map_data *m)
-{
- uidb_put(map_db, (unsigned int)m->index, m);
+void map_addmap2db(struct map_data *m) {
+ index2mapid[m->index] = m->m;
}
-void map_removemapdb(struct map_data *m)
-{
- uidb_remove(map_db, (unsigned int)m->index);
+void map_removemapdb(struct map_data *m) {
+ index2mapid[m->index] = 0;
}
/*======================================
@@ -3170,8 +3285,6 @@ int map_readallmaps (void) {
int i;
FILE* fp=NULL;
int maps_removed = 0;
- char *map_cache_buffer = NULL; // Has the uncompressed gat data of all maps, so just one allocation has to be made
- char map_cache_decode_buffer[MAX_MAP_SIZE];
if( enable_grf )
ShowStatus("Loading maps (using GRF files)...\n");
@@ -3203,7 +3316,7 @@ int map_readallmaps (void) {
if( !
(enable_grf?
map_readgat(&map[i])
- :map_readfromcache(&map[i], map_cache_buffer, map_cache_decode_buffer))
+ :map_readfromcache(&map[i], map_cache_buffer))
) {
map_delmapid(i);
maps_removed++;
@@ -3213,10 +3326,9 @@ int map_readallmaps (void) {
map[i].index = mapindex_name2id(map[i].name);
- if (uidb_get(map_db,(unsigned int)map[i].index) != NULL)
- {
+ if ( index2mapid[map[i].index] != 0 ) {
ShowWarning("Map %s already loaded!"CL_CLL"\n", map[i].name);
- if (map[i].cell) {
+ if (map[i].cell && map[i].cell != (struct mapcell *)0xdeadbeaf) {
aFree(map[i].cell);
map[i].cell = NULL;
}
@@ -3225,10 +3337,10 @@ int map_readallmaps (void) {
i--;
continue;
}
-
+
+ map[i].m = i;
map_addmap2db(&map[i]);
- map[i].m = i;
memset(map[i].moblist, 0, sizeof(map[i].moblist)); //Initialize moblist [Skotlex]
map[i].mob_delete_timer = INVALID_TIMER; //Initialize timer [Skotlex]
@@ -3238,6 +3350,9 @@ int map_readallmaps (void) {
size = map[i].bxs * map[i].bys * sizeof(struct block_list*);
map[i].block = (struct block_list**)aCalloc(size, 1);
map[i].block_mob = (struct block_list**)aCalloc(size, 1);
+
+ map[i].getcellp = map_sub_getcellp;
+ map[i].setcell = map_sub_setcell;
}
// intialization and configuration-dependent adjustments of mapflags
@@ -3245,14 +3360,11 @@ int map_readallmaps (void) {
if( !enable_grf ) {
fclose(fp);
-
- // The cache isn't needed anymore, so free it.. [Shinryo]
- aFree(map_cache_buffer);
}
// finished map loading
ShowInfo("Successfully loaded '"CL_WHITE"%d"CL_RESET"' maps."CL_CLL"\n",map_num);
- instance_start = map_num; // Next Map Index will be instances
+ instance->start_id = map_num; // Next Map Index will be instances
if (maps_removed)
ShowNotice("Maps removed: '"CL_WHITE"%d"CL_RESET"'\n",maps_removed);
@@ -3267,20 +3379,17 @@ static int char_ip_set = 0;
/*==========================================
* Read map server configuration files (conf/map_server.conf...)
*------------------------------------------*/
-int map_config_read(char *cfgName)
-{
+int map_config_read(char *cfgName) {
char line[1024], w1[1024], w2[1024];
FILE *fp;
fp = fopen(cfgName,"r");
- if( fp == NULL )
- {
+ if( fp == NULL ) {
ShowError("Map configuration file not found at: %s\n", cfgName);
return 1;
}
- while( fgets(line, sizeof(line), fp) )
- {
+ while( fgets(line, sizeof(line), fp) ) {
char* ptr;
if( line[0] == '/' && line[1] == '/' )
@@ -3320,9 +3429,9 @@ int map_config_read(char *cfgName)
clif->setport(atoi(w2));
map_port = (atoi(w2));
} else if (strcmpi(w1, "map") == 0)
- map_addmap(w2);
+ map_num++;
else if (strcmpi(w1, "delmap") == 0)
- map_delmap(w2);
+ map_num--;
else if (strcmpi(w1, "npc") == 0)
npc_addsrcfile(w2);
else if (strcmpi(w1, "delnpc") == 0)
@@ -3362,7 +3471,43 @@ int map_config_read(char *cfgName)
fclose(fp);
return 0;
}
-
+int map_config_read_sub(char *cfgName) {
+ char line[1024], w1[1024], w2[1024];
+ FILE *fp;
+
+ fp = fopen(cfgName,"r");
+ if( fp == NULL ) {
+ ShowError("Map configuration file not found at: %s\n", cfgName);
+ return 1;
+ }
+
+ while( fgets(line, sizeof(line), fp) ) {
+ char* ptr;
+
+ if( line[0] == '/' && line[1] == '/' )
+ continue;
+ if( (ptr = strstr(line, "//")) != NULL )
+ *ptr = '\n'; //Strip comments
+ if( sscanf(line, "%[^:]: %[^\t\r\n]", w1, w2) < 2 )
+ continue;
+
+ //Strip trailing spaces
+ ptr = w2 + strlen(w2);
+ while (--ptr >= w2 && *ptr == ' ');
+ ptr++;
+ *ptr = '\0';
+
+ if (strcmpi(w1, "map") == 0)
+ map_addmap(w2);
+ else if (strcmpi(w1, "delmap") == 0)
+ map_delmap(w2);
+ else if (strcmpi(w1, "import") == 0)
+ map_config_read_sub(w2);
+ }
+
+ fclose(fp);
+ return 0;
+}
void map_reloadnpc_sub(char *cfgName)
{
char line[1024], w1[1024], w2[1024];
@@ -4849,11 +4994,12 @@ void read_map_zone_db(void) {
/**
* @see DBApply
*/
-int map_db_final(DBKey key, DBData *data, va_list ap)
-{
+int map_db_final(DBKey key, DBData *data, va_list ap) {
struct map_data_other_server *mdos = DB->data2ptr(data);
- if(mdos && mdos->cell == NULL)
+
+ if(mdos && malloclib->verify_ptr(mdos) && mdos->cell == NULL)
aFree(mdos);
+
return 0;
}
@@ -4877,8 +5023,7 @@ int nick_db_final(DBKey key, DBData *data, va_list args)
return 0;
}
-int cleanup_sub(struct block_list *bl, va_list ap)
-{
+int cleanup_sub(struct block_list *bl, va_list ap) {
nullpo_ret(bl);
switch(bl->type) {
@@ -4932,6 +5077,8 @@ void do_final(void)
map_quit(sd);
mapit->free(iter);
+ instance->final();
+
/* prepares npcs for a faster shutdown process */
do_clear_npc();
@@ -4954,7 +5101,6 @@ void do_final(void)
clif->final();
do_final_npc();
script->final();
- do_final_instance();
do_final_itemdb();
do_final_storage();
guild->final();
@@ -4993,6 +5139,9 @@ void do_final(void)
aFree(map);
+ if( !enable_grf )
+ aFree(map_cache_buffer);
+
ShowStatus("Finished.\n");
}
@@ -5196,10 +5345,12 @@ void map_defaults(void) {
void load_defaults(void) {
atcommand_defaults();
battle_defaults();
+ battleground_defaults();
buyingstore_defaults();
clif_defaults();
guild_defaults();
homunculus_defaults();
+ instance_defaults();
ircbot_defaults();
log_defaults();
map_defaults();
@@ -5228,79 +5379,50 @@ int do_init(int argc, char *argv[])
rnd_init();
- for( i = 1; i < argc ; i++ )
- {
+ for( i = 1; i < argc ; i++ ) {
const char* arg = argv[i];
- if( arg[0] != '-' && ( arg[0] != '/' || arg[1] == '-' ) )
- {// -, -- and /
+ if( arg[0] != '-' && ( arg[0] != '/' || arg[1] == '-' ) ) {// -, -- and /
ShowError("Unknown option '%s'.\n", argv[i]);
exit(EXIT_FAILURE);
- }
- else if( (++arg)[0] == '-' )
- {// long option
+ } else if( (++arg)[0] == '-' ) {// long option
arg++;
- if( strcmp(arg, "help") == 0 )
- {
+ if( strcmp(arg, "help") == 0 ) {
map_helpscreen(true);
- }
- else if( strcmp(arg, "version") == 0 )
- {
+ } else if( strcmp(arg, "version") == 0 ) {
map_versionscreen(true);
- }
- else if( strcmp(arg, "map-config") == 0 )
- {
+ } else if( strcmp(arg, "map-config") == 0 ) {
if( map_arg_next_value(arg, i, argc) )
MAP_CONF_NAME = argv[++i];
- }
- else if( strcmp(arg, "battle-config") == 0 )
- {
+ } else if( strcmp(arg, "battle-config") == 0 ) {
if( map_arg_next_value(arg, i, argc) )
BATTLE_CONF_FILENAME = argv[++i];
- }
- else if( strcmp(arg, "atcommand-config") == 0 )
- {
+ } else if( strcmp(arg, "atcommand-config") == 0 ) {
if( map_arg_next_value(arg, i, argc) )
ATCOMMAND_CONF_FILENAME = argv[++i];
- }
- else if( strcmp(arg, "script-config") == 0 )
- {
+ } else if( strcmp(arg, "script-config") == 0 ) {
if( map_arg_next_value(arg, i, argc) )
SCRIPT_CONF_NAME = argv[++i];
- }
- else if( strcmp(arg, "msg-config") == 0 )
- {
+ } else if( strcmp(arg, "msg-config") == 0 ) {
if( map_arg_next_value(arg, i, argc) )
MSG_CONF_NAME = argv[++i];
- }
- else if( strcmp(arg, "grf-path-file") == 0 )
- {
+ } else if( strcmp(arg, "grf-path-file") == 0 ) {
if( map_arg_next_value(arg, i, argc) )
GRF_PATH_FILENAME = argv[++i];
- }
- else if( strcmp(arg, "inter-config") == 0 )
- {
+ } else if( strcmp(arg, "inter-config") == 0 ) {
if( map_arg_next_value(arg, i, argc) )
INTER_CONF_NAME = argv[++i];
- }
- else if( strcmp(arg, "log-config") == 0 )
- {
+ } else if( strcmp(arg, "log-config") == 0 ) {
if( map_arg_next_value(arg, i, argc) )
LOG_CONF_NAME = argv[++i];
- }
- else if( strcmp(arg, "run-once") == 0 ) // close the map-server as soon as its done.. for testing [Celest]
- {
+ } else if( strcmp(arg, "run-once") == 0 ) { // close the map-server as soon as its done.. for testing [Celest]
runflag = CORE_ST_STOP;
- }
- else
- {
+ } else {
ShowError("Unknown option '%s'.\n", argv[i]);
exit(EXIT_FAILURE);
}
- }
- else switch( arg[0] )
- {// short option
+ } else switch( arg[0] ) {// short option
case '?':
case 'h':
map_helpscreen(true);
@@ -5313,12 +5435,13 @@ int do_init(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
-
- CREATE(map,struct map_data,MAX_MAP_PER_SERVER);
-
+ memset(&index2mapid, 0, sizeof(index2mapid));
+
load_defaults();
-
map_config_read(MAP_CONF_NAME);
+ CREATE(map,struct map_data,map_num);
+ map_num = 0;
+ map_config_read_sub(MAP_CONF_NAME);
// loads npcs
map_reloadnpc(false);
@@ -5384,7 +5507,7 @@ int do_init(int argc, char *argv[])
atcommand->init();
battle->init();
- do_init_instance();
+ instance->init();
do_init_chrif();
clif->init();
ircbot->init();
diff --git a/src/map/map.h b/src/map/map.h
index 751cf62f6..c8c1aae12 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -27,20 +27,18 @@ enum E_MAPSERVER_ST {
MAPSERVER_ST_LAST
};
-
#define MAX_NPC_PER_MAP 512
#define AREA_SIZE battle_config.area_size
#define DAMAGELOG_SIZE 30
#define LOOTITEM_SIZE 10
-#define MAX_MOBSKILL 50 // Max 128 - See mob skill_idx type if you need this higher.
-#define MAX_MOB_LIST_PER_MAP 128
+#define MAX_MOBSKILL 50
+#define MAX_MOB_LIST_PER_MAP 100
#define MAX_EVENTQUEUE 2
#define MAX_EVENTTIMER 32
#define NATURAL_HEAL_INTERVAL 500
#define MIN_FLOORITEM 2
#define MAX_FLOORITEM START_ACCOUNT_NUM
#define MAX_LEVEL 150
-#define MAX_DROP_PER_MAP 48
#define MAX_IGNORE_LIST 20 // official is 14
#define MAX_VENDING 12
#define MAX_MAP_SIZE 512*512 // Wasn't there something like this already? Can't find it.. [Shinryo]
@@ -232,8 +230,8 @@ enum {
// No Kill Steal Protection
#define map_flag_ks(m) (map[m].flag.town || map[m].flag.pvp || map[m].flag.gvg || map[m].flag.battleground)
-//This stackable implementation does not mean a BL can be more than one type at a time, but it's
-// meant to make it easier to check for multiple types at a time on invocations such as map_foreach* calls. [Skotlex]
+//This stackable implementation does not means a BL can be more than one type at a time, but it's
+// meant to make it easier to check for multiple types at a time on invocations such as map_foreach* calls [Skotlex]
enum bl_type {
BL_NUL = 0x000,
BL_PC = 0x001,
@@ -558,6 +556,12 @@ void map_zone_change2(int m, struct map_zone_data *zone);
struct map_zone_data map_zone_all;/* used as a base on all maps */
struct map_zone_data map_zone_pk;/* used for (pk_mode) */
+struct map_drop_list {
+ int drop_id;
+ int drop_type;
+ int drop_per;
+};
+
struct map_data {
char name[MAP_NAME_LENGTH];
@@ -625,11 +629,8 @@ struct map_data {
} flag;
struct point save;
struct npc_data *npc[MAX_NPC_PER_MAP];
- struct {
- int drop_id;
- int drop_type;
- int drop_per;
- } drop_list[MAX_DROP_PER_MAP];
+ struct map_drop_list *drop_list;
+ unsigned short drop_list_count;
struct spawn_data *moblist[MAX_MOB_LIST_PER_MAP]; // [Wizputer]
int mob_delete_timer; // [Skotlex]
@@ -676,6 +677,14 @@ struct map_data {
unsigned short short_damage_rate;
/* long_damage_rate mapflag */
unsigned short long_damage_rate;
+
+ /* instance unique name */
+ char *cName;
+
+ /* */
+ int (*getcellp)(struct map_data* m,int16 x,int16 y,cell_chk cellchk);
+ void (*setcell) (int16 m, int16 x, int16 y, cell_t cell, bool flag);
+ char *cellPos;
};
/// Stores information about a remote map (for multi-mapserver setups).
@@ -689,8 +698,6 @@ struct map_data_other_server {
};
int map_getcell(int16 m,int16 x,int16 y,cell_chk cellchk);
-int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk);
-void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag);
void map_setgatcell(int16 m, int16 x, int16 y, int gat);
struct map_data *map;
@@ -711,6 +718,8 @@ extern char charhelp_txt[];
extern char wisp_server_name[];
+void map_cellfromcache(struct map_data *m);
+
// users
void map_setusers(int);
int map_getusers(void);
@@ -733,6 +742,7 @@ int map_foreachinmovearea(int (*func)(struct block_list*,va_list), struct block_
int map_foreachincell(int (*func)(struct block_list*,va_list), int16 m, int16 x, int16 y, int type, ...);
int map_foreachinpath(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, ...);
int map_foreachinmap(int (*func)(struct block_list*,va_list), int16 m, int type, ...);
+int map_foreachininstance(int (*func)(struct block_list*,va_list), int16 instance_id, int type,...);
//blocklist nb in one cell
int map_count_oncell(int16 m,int16 x,int16 y,int type);
struct skill_unit *map_find_skill_unit_oncell(struct block_list *,int16 x,int16 y,uint16 skill_id,struct skill_unit *, int flag);
@@ -831,6 +841,7 @@ void map_removemobs(int16 m); // [Wizputer]
void do_reconnect_map(void); //Invoked on map-char reconnection [Skotlex]
void map_addmap2db(struct map_data *m);
void map_removemapdb(struct map_data *m);
+void map_clean(int i);
extern char *INTER_CONF_NAME;
extern char *LOG_CONF_NAME;
diff --git a/src/map/mob.c b/src/map/mob.c
index 57325ba1c..433e979f3 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -137,7 +137,7 @@ void mvptomb_create(struct mob_data *md, char *killer, time_t time)
nd->bl.id = md->tomb_nid = npc_get_new_npc_id();
- nd->ud.dir = md->ud.dir;
+ nd->dir = md->ud.dir;
nd->bl.m = md->bl.m;
nd->bl.x = md->bl.x;
nd->bl.y = md->bl.y;
@@ -262,8 +262,7 @@ int mob_parse_dataset(struct spawn_data *data)
/*==========================================
* Generates the basic mob data using the spawn_data provided.
*------------------------------------------*/
-struct mob_data* mob_spawn_dataset(struct spawn_data *data)
-{
+struct mob_data* mob_spawn_dataset(struct spawn_data *data) {
struct mob_data *md = (struct mob_data*)aCalloc(1, sizeof(struct mob_data));
md->bl.id= npc_get_new_npc_id();
md->bl.type = BL_MOB;
@@ -290,7 +289,7 @@ struct mob_data* mob_spawn_dataset(struct spawn_data *data)
status_set_viewdata(&md->bl, md->class_);
status_change_init(&md->bl);
unit_dataset(&md->bl);
-
+
map_addiddb(&md->bl);
return md;
}
diff --git a/src/map/npc.c b/src/map/npc.c
index 7d0d5c6e1..bff6be30c 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -122,7 +122,7 @@ struct view_data* npc_get_viewdata(int class_)
static int npc_isnear_sub(struct block_list* bl, va_list args) {
struct npc_data *nd = (struct npc_data*)bl;
- if( nd->sc.option & (OPTION_HIDE|OPTION_INVISIBLE) )
+ if( nd->option & (OPTION_HIDE|OPTION_INVISIBLE) )
return 0;
return 1;
@@ -175,7 +175,7 @@ int npc_enable_sub(struct block_list *bl, va_list ap)
{
TBL_PC *sd = (TBL_PC*)bl;
- if (nd->sc.option&OPTION_INVISIBLE)
+ if (nd->option&OPTION_INVISIBLE)
return 1;
if( npc_ontouch_event(sd,nd) > 0 && npc_ontouch2_event(sd,nd) > 0 )
@@ -204,20 +204,20 @@ int npc_enable(const char* name, int flag)
}
if (flag&1) {
- nd->sc.option&=~OPTION_INVISIBLE;
+ nd->option&=~OPTION_INVISIBLE;
clif->spawn(&nd->bl);
} else if (flag&2)
- nd->sc.option&=~OPTION_HIDE;
+ nd->option&=~OPTION_HIDE;
else if (flag&4)
- nd->sc.option|= OPTION_HIDE;
+ nd->option|= OPTION_HIDE;
else { //Can't change the view_data to invisible class because the view_data for all npcs is shared! [Skotlex]
- nd->sc.option|= OPTION_INVISIBLE;
+ nd->option|= OPTION_INVISIBLE;
clif->clearunit_area(&nd->bl,CLR_OUTSIGHT); // Hack to trick maya purple card [Xazax]
}
if (nd->class_ == WARP_CLASS || nd->class_ == FLAG_CLASS)
{ //Client won't display option changes for these classes [Toms]
- if (nd->sc.option&(OPTION_HIDE|OPTION_INVISIBLE))
+ if (nd->option&(OPTION_HIDE|OPTION_INVISIBLE))
clif->clearunit_area(&nd->bl, CLR_OUTSIGHT);
else
clif->spawn(&nd->bl);
@@ -385,8 +385,7 @@ static int npc_event_do_sub(DBKey key, DBData *data, va_list ap)
nullpo_ret(c = va_arg(ap, int *));
nullpo_ret(name = va_arg(ap, const char *));
- if( p && strcmpi(name, p) == 0 )
- {
+ if( p && strcmpi(name, p) == 0 ) {
run_script(ev->nd->u.scr.script,ev->pos,0,ev->nd->bl.id);
(*c)++;
}
@@ -815,7 +814,7 @@ int npc_event_sub(struct map_session_data* sd, struct event_data* ev, const char
ShowWarning("npc_event: player's event queue is full, can't add event '%s' !\n", eventname);
return 1;
}
- if( ev->nd->sc.option&OPTION_INVISIBLE )
+ if( ev->nd->option&OPTION_INVISIBLE )
{
//Disabled npc, shouldn't trigger event.
npc_event_dequeue(sd);
@@ -835,22 +834,20 @@ int npc_event(struct map_session_data* sd, const char* eventname, int ontouch)
nullpo_ret(sd);
- if( ev == NULL || (nd = ev->nd) == NULL )
- {
+ if( ev == NULL || (nd = ev->nd) == NULL ) {
if( !ontouch )
ShowError("npc_event: event not found [%s]\n", eventname);
return ontouch;
}
- switch(ontouch)
- {
- case 1:
- nd->touching_id = sd->bl.id;
- sd->touching_id = nd->bl.id;
- break;
- case 2:
- sd->areanpc_id = nd->bl.id;
- break;
+ switch(ontouch) {
+ case 1:
+ nd->touching_id = sd->bl.id;
+ sd->touching_id = nd->bl.id;
+ break;
+ case 2:
+ sd->areanpc_id = nd->bl.id;
+ break;
}
return npc_event_sub(sd,ev,eventname);
@@ -928,9 +925,8 @@ int npc_touch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y)
//if(sd->npc_id)
// return 1;
- for(i=0;i<map[m].npc_num;i++)
- {
- if (map[m].npc[i]->sc.option&OPTION_INVISIBLE) {
+ for(i=0;i<map[m].npc_num;i++) {
+ if (map[m].npc[i]->option&OPTION_INVISIBLE) {
f=0; // a npc was found, but it is disabled; don't print warning
continue;
}
@@ -1008,13 +1004,11 @@ int npc_touch_areanpc2(struct mob_data *md)
struct event_data* ev;
int xs, ys;
- for( i = 0; i < map[m].npc_num; i++ )
- {
- if( map[m].npc[i]->sc.option&OPTION_INVISIBLE )
+ for( i = 0; i < map[m].npc_num; i++ ) {
+ if( map[m].npc[i]->option&OPTION_INVISIBLE )
continue;
- switch( map[m].npc[i]->subtype )
- {
+ switch( map[m].npc[i]->subtype ) {
case WARP:
if( !( battle_config.mob_warp&1 ) )
continue;
@@ -1087,27 +1081,25 @@ int npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range)
if (!i) return 0; //No NPC_CELLs.
//Now check for the actual NPC on said range.
- for(i=0;i<map[m].npc_num;i++)
- {
- if (map[m].npc[i]->sc.option&OPTION_INVISIBLE)
+ for(i=0;i<map[m].npc_num;i++) {
+ if (map[m].npc[i]->option&OPTION_INVISIBLE)
continue;
- switch(map[m].npc[i]->subtype)
- {
- case WARP:
- if (!(flag&1))
- continue;
- xs=map[m].npc[i]->u.warp.xs;
- ys=map[m].npc[i]->u.warp.ys;
- break;
- case SCRIPT:
- if (!(flag&2))
+ switch(map[m].npc[i]->subtype) {
+ case WARP:
+ if (!(flag&1))
+ continue;
+ xs=map[m].npc[i]->u.warp.xs;
+ ys=map[m].npc[i]->u.warp.ys;
+ break;
+ case SCRIPT:
+ if (!(flag&2))
+ continue;
+ xs=map[m].npc[i]->u.scr.xs;
+ ys=map[m].npc[i]->u.scr.ys;
+ break;
+ default:
continue;
- xs=map[m].npc[i]->u.scr.xs;
- ys=map[m].npc[i]->u.scr.ys;
- break;
- default:
- continue;
}
if( x1 >= map[m].npc[i]->bl.x-xs && x0 <= map[m].npc[i]->bl.x+xs
@@ -1206,7 +1198,7 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd)
if ((nd = npc_checknear(sd,&nd->bl)) == NULL)
return 1;
//Hidden/Disabled npc.
- if (nd->class_ < 0 || nd->sc.option&(OPTION_INVISIBLE|OPTION_HIDE))
+ if (nd->class_ < 0 || nd->option&(OPTION_INVISIBLE|OPTION_HIDE))
return 1;
switch(nd->subtype) {
@@ -1291,7 +1283,7 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type)
sd->npc_id=0;
return 1;
}
- if (nd->sc.option & OPTION_INVISIBLE) // can't buy if npc is not visible (hack?)
+ if (nd->option & OPTION_INVISIBLE) // can't buy if npc is not visible (hack?)
return 1;
if( nd->class_ < 0 && !sd->state.callshop )
{// not called through a script and is not a visible NPC so an invalid call
@@ -1759,8 +1751,7 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list)
//Atempt to remove an npc from a map
//This doesn't remove it from map_db
-int npc_remove_map(struct npc_data* nd)
-{
+int npc_remove_map(struct npc_data* nd) {
int16 m,i;
nullpo_retr(1, nd);
@@ -1892,6 +1883,11 @@ int npc_unload(struct npc_data* nd, bool single) {
guild->flag_remove(nd);
}
+ if( nd->ud != &npc_base_ud ) {
+ aFree(nd->ud);
+ nd->ud = NULL;
+ }
+
script_stop_sleeptimers(nd->bl.id);
aFree(nd);
@@ -2060,8 +2056,7 @@ static void npc_parsename(struct npc_data* nd, const char* name, const char* sta
}
//Add then display an npc warp on map
-struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y)
-{
+struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y) {
int i, flag = 0;
struct npc_data *nd;
@@ -2100,8 +2095,7 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short
npc_setcells(nd);
map_addblock(&nd->bl);
status_set_viewdata(&nd->bl, nd->class_);
- status_change_init(&nd->bl);
- unit_dataset(&nd->bl);
+ nd->ud = &npc_base_ud;
if( map[nd->bl.m].users )
clif->spawn(&nd->bl);
strdb_put(npcname_db, nd->exname, nd);
@@ -2166,8 +2160,7 @@ static const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const
npc_setcells(nd);
map_addblock(&nd->bl);
status_set_viewdata(&nd->bl, nd->class_);
- status_change_init(&nd->bl);
- unit_dataset(&nd->bl);
+ nd->ud = &npc_base_ud;
if( map[nd->bl.m].users )
clif->spawn(&nd->bl);
strdb_put(npcname_db, nd->exname, nd);
@@ -2275,18 +2268,15 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const
++npc_shop;
nd->bl.type = BL_NPC;
nd->subtype = type;
- if( m >= 0 )
- {// normal shop npc
+ if( m >= 0 ) {// normal shop npc
map_addnpc(m,nd);
map_addblock(&nd->bl);
status_set_viewdata(&nd->bl, nd->class_);
- status_change_init(&nd->bl);
- unit_dataset(&nd->bl);
- nd->ud.dir = dir;
+ nd->ud = &npc_base_ud;
+ nd->dir = dir;
if( map[nd->bl.m].users )
clif->spawn(&nd->bl);
- } else
- {// 'floating' shop?
+ } else {// 'floating' shop?
map_addiddb(&nd->bl);
}
strdb_put(npcname_db, nd->exname, nd);
@@ -2485,23 +2475,18 @@ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, cons
nd->bl.type = BL_NPC;
nd->subtype = SCRIPT;
- if( m >= 0 )
- {
+ if( m >= 0 ) {
map_addnpc(m, nd);
- status_change_init(&nd->bl);
- unit_dataset(&nd->bl);
- nd->ud.dir = dir;
+ nd->ud = &npc_base_ud;
+ nd->dir = dir;
npc_setcells(nd);
map_addblock(&nd->bl);
- if( class_ >= 0 )
- {
+ if( class_ >= 0 ) {
status_set_viewdata(&nd->bl, nd->class_);
if( map[nd->bl.m].users )
clif->spawn(&nd->bl);
}
- }
- else
- {
+ } else {
// we skip map_addnpc, but still add it to the list of ID's
map_addiddb(&nd->bl);
}
@@ -2576,13 +2561,10 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
type = dnd->subtype;
// get placement
- if( (type==SHOP || type==CASHSHOP || type==SCRIPT) && strcmp(w1, "-") == 0 )
- {// floating shop/chashshop/script
+ if( (type==SHOP || type==CASHSHOP || type==SCRIPT) && strcmp(w1, "-") == 0 ) {// floating shop/chashshop/script
x = y = dir = 0;
m = -1;
- }
- else
- {
+ } else {
if( sscanf(w1, "%31[^,],%d,%d,%d", mapname, &x, &y, &dir) != 4 )// <map name>,<x>,<y>,<facing>
{
ShowError("npc_parse_duplicate: Invalid placement format for duplicate in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
@@ -2599,8 +2581,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
if( type == WARP && sscanf(w4, "%d,%d", &xs, &ys) == 2 );// <spanx>,<spany>
else if( type == SCRIPT && sscanf(w4, "%d,%d,%d", &class_, &xs, &ys) == 3);// <sprite id>,<triggerX>,<triggerY>
else if( type != WARP ) class_ = atoi(w4);// <sprite id>
- else
- {
+ else {
ShowError("npc_parse_duplicate: Invalid span format for duplicate warp in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
return end;// next line, try to continue
}
@@ -2618,56 +2599,50 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
nd->src_id = src_id;
nd->bl.type = BL_NPC;
nd->subtype = (enum npc_subtype)type;
- switch( type )
- {
- case SCRIPT:
- ++npc_script;
- nd->u.scr.xs = xs;
- nd->u.scr.ys = ys;
- nd->u.scr.script = dnd->u.scr.script;
- nd->u.scr.label_list = dnd->u.scr.label_list;
- nd->u.scr.label_list_num = dnd->u.scr.label_list_num;
- break;
-
- case SHOP:
- case CASHSHOP:
- ++npc_shop;
- nd->u.shop.shop_item = dnd->u.shop.shop_item;
- nd->u.shop.count = dnd->u.shop.count;
- break;
-
- case WARP:
- ++npc_warp;
- if( !battle_config.warp_point_debug )
- nd->class_ = WARP_CLASS;
- else
- nd->class_ = WARP_DEBUG_CLASS;
- nd->u.warp.xs = xs;
- nd->u.warp.ys = ys;
- nd->u.warp.mapindex = dnd->u.warp.mapindex;
- nd->u.warp.x = dnd->u.warp.x;
- nd->u.warp.y = dnd->u.warp.y;
- break;
+ switch( type ) {
+ case SCRIPT:
+ ++npc_script;
+ nd->u.scr.xs = xs;
+ nd->u.scr.ys = ys;
+ nd->u.scr.script = dnd->u.scr.script;
+ nd->u.scr.label_list = dnd->u.scr.label_list;
+ nd->u.scr.label_list_num = dnd->u.scr.label_list_num;
+ break;
+
+ case SHOP:
+ case CASHSHOP:
+ ++npc_shop;
+ nd->u.shop.shop_item = dnd->u.shop.shop_item;
+ nd->u.shop.count = dnd->u.shop.count;
+ break;
+
+ case WARP:
+ ++npc_warp;
+ if( !battle_config.warp_point_debug )
+ nd->class_ = WARP_CLASS;
+ else
+ nd->class_ = WARP_DEBUG_CLASS;
+ nd->u.warp.xs = xs;
+ nd->u.warp.ys = ys;
+ nd->u.warp.mapindex = dnd->u.warp.mapindex;
+ nd->u.warp.x = dnd->u.warp.x;
+ nd->u.warp.y = dnd->u.warp.y;
+ break;
}
//Add the npc to its location
- if( m >= 0 )
- {
+ if( m >= 0 ) {
map_addnpc(m, nd);
- status_change_init(&nd->bl);
- unit_dataset(&nd->bl);
- nd->ud.dir = dir;
+ nd->ud = &npc_base_ud;
+ nd->dir = dir;
npc_setcells(nd);
map_addblock(&nd->bl);
- if( class_ >= 0 )
- {
+ if( class_ >= 0 ) {
status_set_viewdata(&nd->bl, nd->class_);
if( map[nd->bl.m].users )
clif->spawn(&nd->bl);
}
- }
- else
- {
+ } else {
// we skip map_addnpc, but still add it to the list of ID's
map_addiddb(&nd->bl);
}
@@ -2694,25 +2669,21 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
int npc_duplicate4instance(struct npc_data *snd, int16 m) {
char newname[NAME_LENGTH];
- if( map[m].instance_id == 0 )
+ if( map[m].instance_id == -1 )
return 1;
snprintf(newname, ARRAYLENGTH(newname), "dup_%d_%d", map[m].instance_id, snd->bl.id);
- if( npc_name2id(newname) != NULL )
- { // Name already in use
+ if( npc_name2id(newname) != NULL ) { // Name already in use
ShowError("npc_duplicate4instance: the npcname (%s) is already in use while trying to duplicate npc %s in instance %d.\n", newname, snd->exname, map[m].instance_id);
return 1;
}
- if( snd->subtype == WARP )
- { // Adjust destination, if instanced
+ if( snd->subtype == WARP ) { // Adjust destination, if instanced
struct npc_data *wnd = NULL; // New NPC
int dm = map_mapindex2mapid(snd->u.warp.mapindex), im;
if( dm < 0 ) return 1;
- im = instance_mapid2imapid(dm, map[m].instance_id);
- if( im == -1 )
- {
+ if( ( im = instance->mapid2imapid(dm, map[m].instance_id) ) == -1 ) {
ShowError("npc_duplicate4instance: warp (%s) leading to instanced map (%s), but instance map is not attached to current instance.\n", map[dm].name, snd->exname);
return 1;
}
@@ -2738,18 +2709,15 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) {
npc_setcells(wnd);
map_addblock(&wnd->bl);
status_set_viewdata(&wnd->bl, wnd->class_);
- status_change_init(&wnd->bl);
- unit_dataset(&wnd->bl);
+ wnd->ud = &npc_base_ud;
if( map[wnd->bl.m].users )
clif->spawn(&wnd->bl);
strdb_put(npcname_db, wnd->exname, wnd);
- }
- else
- {
+ } else {
static char w1[50], w2[50], w3[50], w4[50];
const char* stat_buf = "- call from instancing subsystem -\n";
- snprintf(w1, sizeof(w1), "%s,%d,%d,%d", map[m].name, snd->bl.x, snd->bl.y, snd->ud.dir);
+ snprintf(w1, sizeof(w1), "%s,%d,%d,%d", map[m].name, snd->bl.x, snd->bl.y, snd->dir);
snprintf(w2, sizeof(w2), "duplicate(%s)", snd->exname);
snprintf(w3, sizeof(w3), "%s::%s", snd->name, newname);
@@ -2765,39 +2733,36 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) {
}
//Set mapcell CELL_NPC to trigger event later
-void npc_setcells(struct npc_data* nd)
-{
+void npc_setcells(struct npc_data* nd) {
int16 m = nd->bl.m, x = nd->bl.x, y = nd->bl.y, xs, ys;
int i,j;
- switch(nd->subtype)
- {
- case WARP:
- xs = nd->u.warp.xs;
- ys = nd->u.warp.ys;
- break;
- case SCRIPT:
- xs = nd->u.scr.xs;
- ys = nd->u.scr.ys;
- break;
- default:
- return; // Other types doesn't have touch area
+ switch(nd->subtype) {
+ case WARP:
+ xs = nd->u.warp.xs;
+ ys = nd->u.warp.ys;
+ break;
+ case SCRIPT:
+ xs = nd->u.scr.xs;
+ ys = nd->u.scr.ys;
+ break;
+ default:
+ return; // Other types doesn't have touch area
}
- if (m < 0 || xs < 0 || ys < 0) //invalid range or map
+ if (m < 0 || xs < 0 || ys < 0 || map[m].cell == (struct mapcell *)0xdeadbeaf) //invalid range or map
return;
for (i = y-ys; i <= y+ys; i++) {
for (j = x-xs; j <= x+xs; j++) {
if (map_getcell(m, j, i, CELL_CHKNOPASS))
continue;
- map_setcell(m, j, i, CELL_NPC, true);
+ map[m].setcell(m, j, i, CELL_NPC, true);
}
}
}
-int npc_unsetcells_sub(struct block_list* bl, va_list ap)
-{
+int npc_unsetcells_sub(struct block_list* bl, va_list ap) {
struct npc_data *nd = (struct npc_data*)bl;
int id = va_arg(ap,int);
if (nd->bl.id == id) return 0;
@@ -2805,8 +2770,7 @@ int npc_unsetcells_sub(struct block_list* bl, va_list ap)
return 1;
}
-void npc_unsetcells(struct npc_data* nd)
-{
+void npc_unsetcells(struct npc_data* nd) {
int16 m = nd->bl.m, x = nd->bl.x, y = nd->bl.y, xs, ys;
int i,j, x0, x1, y0, y1;
@@ -2818,7 +2782,7 @@ void npc_unsetcells(struct npc_data* nd)
ys = nd->u.scr.ys;
}
- if (m < 0 || xs < 0 || ys < 0)
+ if (m < 0 || xs < 0 || ys < 0 || map[m].cell == (struct mapcell *)0xdeadbeaf)
return;
//Locate max range on which we can locate npc cells
@@ -2831,7 +2795,7 @@ void npc_unsetcells(struct npc_data* nd)
//Erase this npc's cells
for (i = y-ys; i <= y+ys; i++)
for (j = x-xs; j <= x+xs; j++)
- map_setcell(m, j, i, CELL_NPC, false);
+ map[m].setcell(m, j, i, CELL_NPC, false);
//Re-deploy NPC cells for other nearby npcs.
map_foreachinarea( npc_unsetcells_sub, m, x0, y0, x1, y1, BL_NPC, nd->bl.id );
@@ -2910,7 +2874,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
return 1;
}
- if( ev->nd->sc.option&OPTION_INVISIBLE ) { // Disabled npc, shouldn't trigger event.
+ if( ev->nd->option&OPTION_INVISIBLE ) { // Disabled npc, shouldn't trigger event.
npc_event_dequeue(sd);
return 2;
}
@@ -2994,8 +2958,7 @@ void npc_parse_mob2(struct spawn_data* mob)
{
int i;
- for( i = mob->active; i < mob->num; ++i )
- {
+ for( i = mob->active; i < mob->num; ++i ) {
struct mob_data* md = mob_spawn_dataset(mob);
md->spawn = mob;
md->spawn->active++;
@@ -3150,19 +3113,17 @@ static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const c
memcpy(data, &mob, sizeof(struct spawn_data));
// spawn / cache the new mobs
- if( battle_config.dynamic_mobs && map_addmobtolist(data->m, data) >= 0 )
- {
+ if( battle_config.dynamic_mobs && map_addmobtolist(data->m, data) >= 0 ) {
data->state.dynamic = true;
npc_cache_mob += data->num;
// check if target map has players
// (usually shouldn't occur when map server is just starting,
// but not the case when we do @reloadscript
- if( map[data->m].users > 0 )
+ if( map[data->m].users > 0 ) {
npc_parse_mob2(data);
- }
- else
- {
+ }
+ } else {
data->state.dynamic = false;
npc_parse_mob2(data);
npc_delay_mob += data->num;
@@ -3282,16 +3243,11 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
else if (!strcmpi(drop_arg2,"all"))
drop_type = 3;
- if (drop_id != 0){
- int i;
- for (i = 0; i < MAX_DROP_PER_MAP; i++) {
- if (map[m].drop_list[i].drop_id == 0){
- map[m].drop_list[i].drop_id = drop_id;
- map[m].drop_list[i].drop_type = drop_type;
- map[m].drop_list[i].drop_per = drop_per;
- break;
- }
- }
+ if (drop_id != 0) {
+ RECREATE(map[m].drop_list, struct map_drop_list, ++map[m].drop_list_count);
+ map[m].drop_list[map[m].drop_list_count-1].drop_id = drop_id;
+ map[m].drop_list[map[m].drop_list_count-1].drop_type = drop_type;
+ map[m].drop_list[map[m].drop_list_count-1].drop_per = drop_per;
map[m].flag.pvp_nightmaredrop = 1;
}
} else if (!state) //Disable
@@ -3892,10 +3848,7 @@ int npc_reload(void) {
"\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n",
npc_id - npc_new_min, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
- do_final_instance();
-
- for( i = 0; i < ARRAYLENGTH(instance); ++i )
- instance_init(instance[i].instance_id);
+ instance->final();
map_zone_init();
@@ -4002,8 +3955,18 @@ int do_init_npc(void)
struct npc_src_list *file;
int i;
+ memset(&npc_base_ud, 0, sizeof( struct unit_data) );
+ npc_base_ud.bl = NULL;
+ npc_base_ud.walktimer = INVALID_TIMER;
+ npc_base_ud.skilltimer = INVALID_TIMER;
+ npc_base_ud.attacktimer = INVALID_TIMER;
+ npc_base_ud.attackabletime =
+ npc_base_ud.canact_tick =
+ npc_base_ud.canmove_tick = gettick();
+
//Stock view data for normal npcs.
memset(&npc_viewdb, 0, sizeof(npc_viewdb));
+
npc_viewdb[0].class_ = INVISIBLE_CLASS; //Invisible class is stored here.
for( i = 1; i < MAX_NPC_CLASS; i++ )
npc_viewdb[i].class_ = i;
@@ -4030,7 +3993,7 @@ int do_init_npc(void)
"\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n"
"\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n",
npc_id - START_NPC_NUM, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
-
+
map_zone_init();
npc->motd = npc_name2id("HerculesMOTD"); /* [Ind/Hercules] */
@@ -4068,6 +4031,6 @@ int do_init_npc(void)
}
void npc_defaults(void) {
npc = &npc_s;
-
+
npc->motd = NULL;
}
diff --git a/src/map/npc.h b/src/map/npc.h
index 8a8b14d6e..16e6fe74c 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -12,6 +12,7 @@ struct block_list;
struct npc_data;
struct view_data;
+struct unit_data npc_base_ud;
struct npc_timerevent_list {
int timer,pos;
@@ -26,9 +27,9 @@ struct npc_item_list {
struct npc_data {
struct block_list bl;
- struct unit_data ud; //Because they need to be able to move....
+ struct unit_data *ud;
struct view_data *vd;
- struct status_change sc; //They can't have status changes, but.. they want the visual opt values.
+ unsigned int option;
struct npc_data *master_nd;
short class_;
short speed;
@@ -37,12 +38,13 @@ struct npc_data {
int chat_id;
int touching_id;
unsigned int next_walktime;
-
+ uint8 dir;
+
unsigned size : 2;
struct status_data status;
- unsigned int level;
- unsigned int stat_point;
+ unsigned short level;
+ unsigned short stat_point;
void* chatdb; // pointer to a npc_parse struct (see npc_chat.c)
char* path;/* path dir */
diff --git a/src/map/packets.h b/src/map/packets.h
index 555f45c19..5d07f7f9e 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1869,6 +1869,10 @@ packet(0x020d,-1);
packet(0x0838,6,clif->pSolveCharName,2);
packet(0x0439,8,clif->pUseItem,2,4);
packet(0x08d2,10);
+ packet(0x08d7,28,clif->pBGQueueRegister,2);
+ packet(0x090a,26,clif->pBGQueueCheckState,2);
+ packet(0x08da,26,clif->pBGQueueRevokeReq,2);
+ packet(0x08e0,51,clif->pBGQueueBattleBeginAck,2);
#endif
//2011-11-02aRagexe
@@ -1985,7 +1989,6 @@ packet(0x020d,-1);
packet(0x08FB,6,clif->pDull,2); //bookingcanceljoinparty
packet(0x0907,5,clif->pMoveItem,2,4);
packet(0x0908,5);
- packet(0x08D7,28,clif->pDull,2,4); //battlegroundreg
packet(0x08CF,10);//Amulet spirits
packet(0x0977,14);//Monster HP Bar
#endif
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index c873d3ad3..9d1f9b280 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -87,6 +87,15 @@ enum packet_headers {
#else
unit_walkingType = 0x914,
#endif
+ bgqueue_ackType = 0x8d8,
+ bgqueue_notice_deleteType = 0x8db,
+ bgqueue_registerType = 0x8d7,
+ bgqueue_updateinfoType = 0x8d9,
+ bgqueue_checkstateType = 0x90a,
+ bgqueue_revokereqType = 0x8da,
+ bgqueue_battlebeginackType = 0x8e0,
+ bgqueue_notify_entryType = 0x8d9,
+ bgqueue_battlebegins = 0x8df,
#if PACKETVER > 20130000 /* not sure date */
dropflooritemType = 0x84b,
#else
@@ -391,6 +400,59 @@ struct packet_maptypeproperty2 {
} flag;
} __attribute__((packed));
+struct packet_bgqueue_ack {
+ short PacketType;
+ short type;
+ char bg_name[NAME_LENGTH];
+} __attribute__((packed));
+
+struct packet_bgqueue_notice_delete {
+ short PacketType;
+ short type;
+ char bg_name[NAME_LENGTH];
+} __attribute__((packed));
+
+struct packet_bgqueue_register {
+ short PacketType;
+ short type;
+ char bg_name[NAME_LENGTH];
+} __attribute__((packed));
+
+struct packet_bgqueue_update_info {
+ short PacketType;
+ char bg_name[NAME_LENGTH];
+ int position;
+} __attribute__((packed));
+
+struct packet_bgqueue_checkstate {
+ short PacketType;
+ char bg_name[NAME_LENGTH];
+} __attribute__((packed));
+
+struct packet_bgqueue_revoke_req {
+ short PacketType;
+ char bg_name[NAME_LENGTH];
+} __attribute__((packed));
+
+struct packet_bgqueue_battlebegin_ack {
+ short PacketType;
+ short result;
+ char bg_name[NAME_LENGTH];
+ char game_name[NAME_LENGTH];
+} __attribute__((packed));
+
+struct packet_bgqueue_notify_entry {
+ short PacketType;
+ char name[NAME_LENGTH];
+ int position;
+} __attribute__((packed));
+
+struct packet_bgqueue_battlebegins {
+ short PacketType;
+ char bg_name[NAME_LENGTH];
+ char game_name[NAME_LENGTH];
+} __attribute__((packed));
+
#pragma pack(pop)
#endif /* _PACKETS_STRUCT_H_ */
diff --git a/src/map/party.c b/src/map/party.c
index 8a632a8ef..4462d4f07 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -50,8 +50,6 @@ static void party_fill_member(struct party_member* member, struct map_session_da
member->online = 1;
member->leader = leader;
}
-
-
/// Get the member_id of a party member.
/// Return -1 if not in party.
int party_getmemberid(struct party_data* p, struct map_session_data* sd)
@@ -101,14 +99,21 @@ static TBL_PC* party_sd_check(int party_id, int account_id, int char_id)
return sd;
}
-
+int party_db_final(DBKey key, DBData *data, va_list ap) {
+ struct party_data *p;
+
+ if( ( p = DB->data2ptr(data) ) && p->instance )
+ aFree(p->instance);
+
+ return 0;
+}
/*==========================================
* Destructor
* Called in map shutdown, cleanup var
*------------------------------------------*/
void do_final_party(void)
{
- party_db->destroy(party_db,NULL);
+ party_db->destroy(party_db,party_db_final);
party_booking_db->destroy(party_booking_db,NULL); // Party Booking [Spiria]
}
// Constructor, init vars
@@ -251,16 +256,14 @@ int party_recv_info(struct party* sp, int char_id)
int removed_count = 0;
int added[MAX_PARTY];// member_id in new data
int added_count = 0;
- int i;
+ int i,j;
int member_id;
nullpo_ret(sp);
p = (struct party_data*)idb_get(party_db, sp->party_id);
- if( p != NULL )// diff members
- {
- for( member_id = 0; member_id < MAX_PARTY; ++member_id )
- {
+ if( p != NULL ) {// diff members
+ for( member_id = 0; member_id < MAX_PARTY; ++member_id ) {
member = &p->party.member[member_id];
if( member->char_id == 0 )
continue;// empty
@@ -270,8 +273,7 @@ int party_recv_info(struct party* sp, int char_id)
if( i == MAX_PARTY )
removed[removed_count++] = member_id;
}
- for( member_id = 0; member_id < MAX_PARTY; ++member_id )
- {
+ for( member_id = 0; member_id < MAX_PARTY; ++member_id ) {
member = &sp->member[member_id];
if( member->char_id == 0 )
continue;// empty
@@ -281,17 +283,16 @@ int party_recv_info(struct party* sp, int char_id)
if( i == MAX_PARTY )
added[added_count++] = member_id;
}
- }
- else
- {
+ } else {
for( member_id = 0; member_id < MAX_PARTY; ++member_id )
if( sp->member[member_id].char_id != 0 )
added[added_count++] = member_id;
CREATE(p, struct party_data, 1);
+ p->instance = NULL;
+ p->instances = 0;
idb_put(party_db, sp->party_id, p);
}
- while( removed_count > 0 )// no longer in party
- {
+ while( removed_count > 0 ) {// no longer in party
member_id = removed[--removed_count];
sd = p->data[member_id].sd;
if( sd == NULL )
@@ -301,16 +302,14 @@ int party_recv_info(struct party* sp, int char_id)
memcpy(&p->party, sp, sizeof(struct party));
memset(&p->state, 0, sizeof(p->state));
memset(&p->data, 0, sizeof(p->data));
- for( member_id = 0; member_id < MAX_PARTY; member_id++ )
- {
+ for( member_id = 0; member_id < MAX_PARTY; member_id++ ) {
member = &p->party.member[member_id];
if ( member->char_id == 0 )
continue;// empty
p->data[member_id].sd = party_sd_check(sp->party_id, member->account_id, member->char_id);
}
party_check_state(p);
- while( added_count > 0 )// new in party
- {
+ while( added_count > 0 ) { // new in party
member_id = added[--added_count];
sd = p->data[member_id].sd;
if( sd == NULL )
@@ -319,8 +318,12 @@ int party_recv_info(struct party* sp, int char_id)
clif->party_member_info(p,sd);
clif->party_option(p,sd,0x100);
clif->party_info(p,NULL);
- if( p->instance_id != 0 )
- clif->instance_join(sd->fd, p->instance_id);
+ for( j = 0; j < p->instances; j++ ) {
+ if( instances[p->instance[j]].idle_timer == INVALID_TIMER && instances[p->instance[j]].progress_timer == INVALID_TIMER )
+ continue;
+ clif->instance_join(sd->fd, p->instance[j]);
+ break;
+ }
}
if( char_id != 0 )// requester
{
@@ -429,19 +432,21 @@ void party_member_joined(struct map_session_data *sd)
{
struct party_data* p = party_search(sd->status.party_id);
int i;
- if (!p)
- {
+ if (!p) {
party_request_info(sd->status.party_id, sd->status.char_id);
return;
}
ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == sd->status.account_id && p->party.member[i].char_id == sd->status.char_id );
- if (i < MAX_PARTY)
- {
+ if (i < MAX_PARTY) {
+ int j;
p->data[i].sd = sd;
- if( p->instance_id )
- clif->instance_join(sd->fd,p->instance_id);
- }
- else
+ for( j = 0; j < p->instances; j++ ) {
+ if( instances[p->instance[j]].idle_timer == INVALID_TIMER && instances[p->instance[j]].progress_timer == INVALID_TIMER )
+ continue;
+ clif->instance_join(sd->fd, p->instance[j]);
+ break;
+ }
+ } else
sd->status.party_id = 0; //He does not belongs to the party really?
}
@@ -451,7 +456,7 @@ int party_member_added(int party_id,int account_id,int char_id, int flag)
{
struct map_session_data *sd = map_id2sd(account_id),*sd2;
struct party_data *p = party_search(party_id);
- int i;
+ int i, j;
if(sd == NULL || sd->status.char_id != char_id || !sd->party_joining ) {
if (!flag) //Char logged off before being accepted into party.
@@ -496,9 +501,13 @@ int party_member_added(int party_id,int account_id,int char_id, int flag)
clif->party_xy(sd);
clif->charnameupdate(sd); //Update char name's display [Skotlex]
- if( p->instance_id )
- clif->instance_join(sd->fd, p->instance_id);
-
+ for( j = 0; j < p->instances; j++ ) {
+ if( instances[p->instance[j]].idle_timer == INVALID_TIMER && instances[p->instance[j]].progress_timer == INVALID_TIMER )
+ continue;
+ clif->instance_join(sd->fd, p->instance[j]);
+ break;
+ }
+
return 0;
}
@@ -551,12 +560,10 @@ int party_member_withdraw(int party_id, int account_id, int char_id)
struct map_session_data* sd = map_id2sd(account_id);
struct party_data* p = party_search(party_id);
- if( p )
- {
+ if( p ) {
int i;
ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == account_id && p->party.member[i].char_id == char_id );
- if( i < MAX_PARTY )
- {
+ if( i < MAX_PARTY ) {
clif->party_withdraw(p,sd,account_id,p->party.member[i].name,0x0);
memset(&p->party.member[i], 0, sizeof(p->party.member[0]));
memset(&p->data[i], 0, sizeof(p->data[0]));
@@ -565,13 +572,12 @@ int party_member_withdraw(int party_id, int account_id, int char_id)
}
}
- if( sd && sd->status.party_id == party_id && sd->status.char_id == char_id )
- {
+ if( sd && sd->status.party_id == party_id && sd->status.char_id == char_id ) {
sd->status.party_id = 0;
clif->charnameupdate(sd); //Update name display [Skotlex]
//TODO: hp bars should be cleared too
- if( p->instance_id )
- instance_check_kick(sd);
+ if( p->instances )
+ instance->check_kick(sd);
}
return 0;
@@ -581,22 +587,19 @@ int party_member_withdraw(int party_id, int account_id, int char_id)
int party_broken(int party_id)
{
struct party_data* p;
- int i;
+ int i, j;
p = party_search(party_id);
if( p == NULL )
return 0;
- if( p->instance_id )
- {
- instance[p->instance_id].party_id = 0;
- instance_destroy( p->instance_id );
+ for( j = 0; j < p->instances; j++ ) {
+ instance->destroy( p->instance[j] );
+ instances[p->instance[j]].owner_id = 0;
}
-
- for( i = 0; i < MAX_PARTY; i++ )
- {
- if( p->data[i].sd!=NULL )
- {
+
+ for( i = 0; i < MAX_PARTY; i++ ) {
+ if( p->data[i].sd!=NULL ) {
clif->party_withdraw(p,p->data[i].sd,p->party.member[i].account_id,p->party.member[i].name,0x10);
p->data[i].sd->status.party_id=0;
}
diff --git a/src/map/party.h b/src/map/party.h
index 12fe7a2bc..3978324e4 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -25,7 +25,8 @@ struct party_data {
struct party party;
struct party_member_data data[MAX_PARTY];
uint8 itemc; //For item distribution, position of last picker in party
- unsigned int instance_id;
+ unsigned short *instance;
+ unsigned short instances;
struct {
unsigned monk : 1; //There's at least one monk in party?
unsigned sg : 1; //There's at least one Star Gladiator in party?
diff --git a/src/map/path.c b/src/map/path.c
index 3bbd8d20b..8ab63d390 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -167,12 +167,10 @@ int path_blownpos(int16 m,int16 x0,int16 y0,int16 dx,int16 dy,int count)
dy=(dy>0)?1:((dy<0)?-1:0);
}
- while( count > 0 && (dx != 0 || dy != 0) )
- {
- if( !map_getcellp(md,x0+dx,y0+dy,CELL_CHKPASS) )
- {// attempt partial movement
- int fx = ( dx != 0 && map_getcellp(md,x0+dx,y0,CELL_CHKPASS) );
- int fy = ( dy != 0 && map_getcellp(md,x0,y0+dy,CELL_CHKPASS) );
+ while( count > 0 && (dx != 0 || dy != 0) ) {
+ if( !md->getcellp(md,x0+dx,y0+dy,CELL_CHKPASS) ) {// attempt partial movement
+ int fx = ( dx != 0 && md->getcellp(md,x0+dx,y0,CELL_CHKPASS) );
+ int fy = ( dy != 0 && md->getcellp(md,x0,y0+dy,CELL_CHKPASS) );
if( fx && fy )
{
if(rnd()&1)
@@ -225,7 +223,7 @@ bool path_search_long(struct shootpath_data *spd,int16 m,int16 x0,int16 y0,int16
spd->x[0] = x0;
spd->y[0] = y0;
- if (map_getcellp(md,x1,y1,cell))
+ if (md->getcellp(md,x1,y1,cell))
return false;
if (dx > abs(dy)) {
@@ -238,7 +236,7 @@ bool path_search_long(struct shootpath_data *spd,int16 m,int16 x0,int16 y0,int16
while (x0 != x1 || y0 != y1)
{
- if (map_getcellp(md,x0,y0,cell))
+ if (md->getcellp(md,x0,y0,cell))
return false;
wx += dx;
wy += dy;
@@ -290,10 +288,10 @@ bool path_search(struct walkpath_data *wpd,int16 m,int16 x0,int16 y0,int16 x1,in
//Do not check starting cell as that would get you stuck.
if( x0 < 0 || x0 >= md->xs || y0 < 0 || y0 >= md->ys )
#else
- if( x0 < 0 || x0 >= md->xs || y0 < 0 || y0 >= md->ys /*|| map_getcellp(md,x0,y0,cell)*/ )
+ if( x0 < 0 || x0 >= md->xs || y0 < 0 || y0 >= md->ys /*|| md->getcellp(md,x0,y0,cell)*/ )
#endif
return false;
- if( x1 < 0 || x1 >= md->xs || y1 < 0 || y1 >= md->ys || map_getcellp(md,x1,y1,cell) )
+ if( x1 < 0 || x1 >= md->xs || y1 < 0 || y1 >= md->ys || md->getcellp(md,x1,y1,cell) )
return false;
// calculate (sgn(x1-x0), sgn(y1-y0))
@@ -317,7 +315,7 @@ bool path_search(struct walkpath_data *wpd,int16 m,int16 x0,int16 y0,int16 x1,in
if( dx == 0 && dy == 0 )
break; // success
- if( map_getcellp(md,x,y,cell) )
+ if( md->getcellp(md,x,y,cell) )
break; // obstacle = failure
}
@@ -365,29 +363,29 @@ bool path_search(struct walkpath_data *wpd,int16 m,int16 x0,int16 y0,int16 x1,in
// dc[2] : y--
// dc[3] : x++
- if(y < ys && !map_getcellp(md,x ,y+1,cell)) {
+ if(y < ys && !md->getcellp(md,x ,y+1,cell)) {
f |= 1; dc[0] = (y >= y1 ? 20 : 0);
e+=add_path(heap,tp,x ,y+1,dist,rp,cost+dc[0]); // (x, y+1)
}
- if(x > 0 && !map_getcellp(md,x-1,y ,cell)) {
+ if(x > 0 && !md->getcellp(md,x-1,y ,cell)) {
f |= 2; dc[1] = (x <= x1 ? 20 : 0);
e+=add_path(heap,tp,x-1,y ,dist,rp,cost+dc[1]); // (x-1, y )
}
- if(y > 0 && !map_getcellp(md,x ,y-1,cell)) {
+ if(y > 0 && !md->getcellp(md,x ,y-1,cell)) {
f |= 4; dc[2] = (y <= y1 ? 20 : 0);
e+=add_path(heap,tp,x ,y-1,dist,rp,cost+dc[2]); // (x , y-1)
}
- if(x < xs && !map_getcellp(md,x+1,y ,cell)) {
+ if(x < xs && !md->getcellp(md,x+1,y ,cell)) {
f |= 8; dc[3] = (x >= x1 ? 20 : 0);
e+=add_path(heap,tp,x+1,y ,dist,rp,cost+dc[3]); // (x+1, y )
}
- if( (f & (2+1)) == (2+1) && !map_getcellp(md,x-1,y+1,cell))
+ if( (f & (2+1)) == (2+1) && !md->getcellp(md,x-1,y+1,cell))
e+=add_path(heap,tp,x-1,y+1,dist+4,rp,cost+dc[1]+dc[0]-6); // (x-1, y+1)
- if( (f & (2+4)) == (2+4) && !map_getcellp(md,x-1,y-1,cell))
+ if( (f & (2+4)) == (2+4) && !md->getcellp(md,x-1,y-1,cell))
e+=add_path(heap,tp,x-1,y-1,dist+4,rp,cost+dc[1]+dc[2]-6); // (x-1, y-1)
- if( (f & (8+4)) == (8+4) && !map_getcellp(md,x+1,y-1,cell))
+ if( (f & (8+4)) == (8+4) && !md->getcellp(md,x+1,y-1,cell))
e+=add_path(heap,tp,x+1,y-1,dist+4,rp,cost+dc[3]+dc[2]-6); // (x+1, y-1)
- if( (f & (8+1)) == (8+1) && !map_getcellp(md,x+1,y+1,cell))
+ if( (f & (8+1)) == (8+1) && !md->getcellp(md,x+1,y+1,cell))
e+=add_path(heap,tp,x+1,y+1,dist+4,rp,cost+dc[3]+dc[0]-6); // (x+1, y+1)
tp[rp].flag=1;
if(e || heap[0]>=MAX_HEAP-5)
diff --git a/src/map/pc.c b/src/map/pc.c
index 55ce993b4..241e0fbb3 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -518,8 +518,7 @@ int pc_makesavestatus(struct map_session_data *sd)
#else
sd->status.option = sd->sc.option&(OPTION_INVISIBLE|OPTION_CART|OPTION_FALCON|OPTION_RIDING|OPTION_DRAGON|OPTION_WUG|OPTION_WUGRIDER|OPTION_MADOGEAR);
#endif
- if (sd->sc.data[SC_JAILED])
- { //When Jailed, do not move last point.
+ if (sd->sc.data[SC_JAILED]) { //When Jailed, do not move last point.
if(pc_isdead(sd)){
pc_setrestartvalue(sd,0);
} else {
@@ -543,13 +542,25 @@ int pc_makesavestatus(struct map_session_data *sd)
sd->status.last_point.y = sd->bl.y;
}
- if(map[sd->bl.m].flag.nosave){
+ if(map[sd->bl.m].flag.nosave || map[sd->bl.m].instance_id >= 0){
struct map_data *m=&map[sd->bl.m];
if(m->save.map)
memcpy(&sd->status.last_point,&m->save,sizeof(sd->status.last_point));
else
memcpy(&sd->status.last_point,&sd->status.save_point,sizeof(sd->status.last_point));
}
+ if( sd->status.last_point.map == 0 ) {
+ sd->status.last_point.map = 1;
+ sd->status.last_point.x = 0;
+ sd->status.last_point.y = 0;
+ }
+
+ if( sd->status.save_point.map == 0 ) {
+ sd->status.save_point.map = 1;
+ sd->status.save_point.x = 0;
+ sd->status.save_point.y = 0;
+ }
+
return 0;
}
@@ -905,8 +916,7 @@ int pc_isequip(struct map_session_data *sd,int n)
* No problem with the session id
* set the status that has been sent from char server
*------------------------------------------*/
-bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers)
-{
+bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) {
int i;
unsigned long tick = gettick();
uint32 ip = session[sd->fd]->client_addr;
@@ -1014,6 +1024,17 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
sd->disguise = -1;
+ sd->instance = NULL;
+ sd->instances = 0;
+
+ sd->bg_queue.arena = NULL;
+ sd->bg_queue.ready = 0;
+ sd->bg_queue.client_has_bg_data = 0;
+ sd->bg_queue.type = 0;
+
+ sd->queues = NULL;
+ sd->queues_count = 0;
+
// Event Timers
for( i = 0; i < MAX_EVENTTIMER; i++ )
sd->eventtimer[i] = INVALID_TIMER;
@@ -1075,7 +1096,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
/**
* Fixes login-without-aura glitch (the screen won't blink at this point, don't worry :P)
**/
- clif->changemap(sd,sd->mapindex,sd->bl.x,sd->bl.y);
+ clif->changemap(sd,sd->bl.m,sd->bl.x,sd->bl.y);
}
/**
@@ -4680,36 +4701,62 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
* 1 - Invalid map index.
* 2 - Map not in this map-server, and failed to locate alternate map-server.
*------------------------------------------*/
-int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, clr_type clrtype)
-{
- struct party_data *p;
+int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, clr_type clrtype) {
int16 m;
nullpo_ret(sd);
- if( !mapindex || !mapindex_id2name(mapindex) )
- {
+ if( !mapindex || !mapindex_id2name(mapindex) ) {
ShowDebug("pc_setpos: Passed mapindex(%d) is invalid!\n", mapindex);
return 1;
}
- if( pc_isdead(sd) )
- { //Revive dead people before warping them
+ if( pc_isdead(sd) ) { //Revive dead people before warping them
pc_setstand(sd);
pc_setrestartvalue(sd,1);
}
-
m = map_mapindex2mapid(mapindex);
- if( map[m].flag.src4instance && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL && p->instance_id )
- {
- // Request the mapid of this src map into the instance of the party
- int im = instance_map2imap(m, p->instance_id);
- if( im < 0 )
- ; // Player will enter the src map for instances
- else
- { // Changes destiny to the instance map, not the source map
- m = im;
- mapindex = map_id2index(m);
+
+ if( map[m].flag.src4instance ) {
+ struct party_data *p;
+ bool stop = false;
+ int i = 0, j = 0;
+
+ if( sd->instances ) {
+ for( i = 0; i < sd->instances; i++ ) {
+ ARR_FIND(0, instances[sd->instance[i]].num_map, j, map[instances[sd->instance[i]].map[j]].instance_src_map == m && !map[instances[sd->instance[i]].map[j]].cName);
+ if( j != instances[sd->instance[i]].num_map )
+ break;
+ }
+ if( i != sd->instances ) {
+ m = instances[sd->instance[i]].map[j];
+ mapindex = map[m].index;
+ stop = true;
+ }
+ }
+ if ( !stop && sd->status.party_id && (p = party_search(sd->status.party_id)) && p->instances ) {
+ for( i = 0; i < p->instances; i++ ) {
+ ARR_FIND(0, instances[p->instance[i]].num_map, j, map[instances[p->instance[i]].map[j]].instance_src_map == m && !map[instances[p->instance[i]].map[j]].cName);
+ if( j != instances[p->instance[i]].num_map )
+ break;
+ }
+ if( i != p->instances ) {
+ m = instances[p->instance[i]].map[j];
+ mapindex = map[m].index;
+ stop = true;
+ }
+ }
+ if ( !stop && sd->status.guild_id && sd->guild && sd->guild->instances ) {
+ for( i = 0; i < sd->guild->instances; i++ ) {
+ ARR_FIND(0, instances[sd->guild->instance[i]].num_map, j, map[instances[sd->guild->instance[i]].map[j]].instance_src_map == m && !map[instances[sd->guild->instance[i]].map[j]].cName);
+ if( j != instances[sd->guild->instance[i]].num_map )
+ break;
+ }
+ if( i != sd->guild->instances ) {
+ m = instances[sd->guild->instance[i]].map[j];
+ mapindex = map[m].index;
+ stop = true;
+ }
}
}
@@ -4718,6 +4765,17 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if( sd->state.changemap ) { // Misc map-changing settings
int i;
sd->state.pmap = sd->bl.m;
+
+ for( i = 0; i < sd->queues_count; i++ ) {
+ struct hQueue *queue;
+ if( (queue = script->queue(sd->queues[i])) && queue->onMapChange[0] != '\0' ) {
+ pc_setregstr(sd, add_str("QMapChangeTo"), map[m].name);
+ npc_event(sd, queue->onMapChange, 0);
+ }
+ }
+
+ if( map[m].cell == (struct mapcell *)0xdeadbeaf )
+ map_cellfromcache(&map[m]);
if (sd->sc.count) { // Cancel some map related stuff.
if (sd->sc.data[SC_JAILED])
return 1; //You may not get out!
@@ -4761,8 +4819,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
- if( m < 0 )
- {
+ if( m < 0 ) {
uint32 ip;
uint16 port;
//if can't find any map-servers, just abort setting position.
@@ -4787,14 +4844,12 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
return 0;
}
- if( x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys )
- {
+ if( x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys ) {
ShowError("pc_setpos: attempt to place player %s (%d:%d) on invalid coordinates (%s-%d,%d)\n", sd->status.name, sd->status.account_id, sd->status.char_id, mapindex_id2name(mapindex),x,y);
x = y = 0; // make it random
}
- if( x == 0 && y == 0 )
- {// pick a random walkable cell
+ if( x == 0 && y == 0 ) {// pick a random walkable cell
do {
x=rnd()%(map[m].xs-2)+1;
y=rnd()%(map[m].ys-2)+1;
@@ -4808,7 +4863,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if(sd->bl.prev != NULL){
unit_remove_map_pc(sd,clrtype);
- clif->changemap(sd,map[m].index,x,y); // [MouseJstr]
+ clif->changemap(sd,m,x,y); // [MouseJstr]
} else if(sd->state.active)
//Tag player for rewarping after map-loading is done. [Skotlex]
sd->state.rewarp = 1;
@@ -4818,31 +4873,27 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
sd->bl.x = sd->ud.to_x = x;
sd->bl.y = sd->ud.to_y = y;
- if( sd->status.guild_id > 0 && map[m].flag.gvg_castle )
- { // Increased guild castle regen [Valaris]
+ if( sd->status.guild_id > 0 && map[m].flag.gvg_castle ) { // Increased guild castle regen [Valaris]
struct guild_castle *gc = guild->mapindex2gc(sd->mapindex);
if(gc && gc->guild_id == sd->status.guild_id)
sd->regen.state.gc = 1;
}
- if( sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 0 )
- {
+ if( sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 0 ) {
sd->pd->bl.m = m;
sd->pd->bl.x = sd->pd->ud.to_x = x;
sd->pd->bl.y = sd->pd->ud.to_y = y;
sd->pd->ud.dir = sd->ud.dir;
}
- if( homun_alive(sd->hd) )
- {
+ if( homun_alive(sd->hd) ) {
sd->hd->bl.m = m;
sd->hd->bl.x = sd->hd->ud.to_x = x;
sd->hd->bl.y = sd->hd->ud.to_y = y;
sd->hd->ud.dir = sd->ud.dir;
}
- if( sd->md )
- {
+ if( sd->md ) {
sd->md->bl.m = m;
sd->md->bl.x = sd->md->ud.to_x = x;
sd->md->bl.y = sd->md->ud.to_y = y;
@@ -6588,15 +6639,22 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1);
pc_setparam(sd, SP_KILLERRID, src?src->id:0);
- if( sd->bg_id ) {
+ if( sd->bg_id ) {/* TODO: purge when bgqueue is deemed ok */
struct battleground_data *bg;
if( (bg = bg_team_search(sd->bg_id)) != NULL && bg->die_event[0] )
npc_event(sd, bg->die_event, 0);
}
-
+
+ for( i = 0; i < sd->queues_count; i++ ) {
+ struct hQueue *queue;
+ if( (queue = script->queue(sd->queues[i])) && queue->onDeath[0] != '\0' )
+ npc_event(sd, queue->onDeath, 0);
+ }
+
+ npc_script_event(sd,NPCE_DIE);
+
// Clear anything NPC-related when you die and was interacting with one.
- if (sd->npc_id)
- {
+ if (sd->npc_id) {
if (sd->state.using_fake_npc) {
clif->clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
sd->state.using_fake_npc = 0;
@@ -6611,8 +6669,6 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
sd->st->state = END;
}
- npc_script_event(sd,NPCE_DIE);
-
/* e.g. not killed thru pc_damage */
if( pc_issit(sd) ) {
clif->sc_end(&sd->bl,sd->bl.id,SELF,SI_SIT);
@@ -6788,7 +6844,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
if(map[sd->bl.m].flag.pvp_nightmaredrop)
{ // Moved this outside so it works when PVP isn't enabled and during pk mode [Ancyker]
- for(j=0;j<MAX_DROP_PER_MAP;j++){
+ for(j=0;j<map[sd->bl.m].drop_list_count;j++){
int id = map[sd->bl.m].drop_list[j].drop_id;
int type = map[sd->bl.m].drop_list[j].drop_type;
int per = map[sd->bl.m].drop_list[j].drop_per;
diff --git a/src/map/pc.h b/src/map/pc.h
index b1fa3e741..5207c4c34 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -10,6 +10,7 @@
#include "../common/timer.h" // INVALID_TIMER
#include "atcommand.h" // AtCommandType
#include "battle.h" // battle_config
+#include "battleground.h"
#include "buyingstore.h" // struct s_buyingstore
#include "itemdb.h" // MAX_ITEMGROUP
#include "map.h" // RC_MAX
@@ -519,6 +520,20 @@ struct map_session_data {
struct sc_display_entry **sc_display;
unsigned char sc_display_count;
+ unsigned short *instance;
+ unsigned short instances;
+
+ /* Possible Thanks to Yommy~! */
+ struct {
+ unsigned int ready : 1;/* did he accept the 'match is about to start, enter' dialog? */
+ unsigned int client_has_bg_data : 1; /* flags whether the client has the "in queue" window (aka the client knows it is in a queue) */
+ struct bg_arena *arena;
+ enum bg_queue_types type;
+ } bg_queue;
+
+ int *queues;
+ unsigned int queues_count;
+
// temporary debugging of bug #3504
const char* delunit_prevfile;
int delunit_prevline;
diff --git a/src/map/script.c b/src/map/script.c
index c1b3cbf70..d08827a34 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -816,10 +816,12 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
func = add_word(p);
if( str_data[func].type == C_FUNC ){
+ char argT = 0;
// buildin function
add_scriptl(func);
add_scriptc(C_ARG);
arg = script->buildin[str_data[func].val];
+ if( !arg ) arg = &argT;
} else if( str_data[func].type == C_USERFUNC || str_data[func].type == C_USERFUNC_POS ){
// script defined function
add_scriptl(buildin_callsub_ref);
@@ -2358,8 +2360,8 @@ void get_val(struct script_state* st, struct script_data* data)
}
break;
case '\'':
- if (st->instance_id) {
- data->u.str = (char*)idb_get(instance[st->instance_id].vars,reference_getuid(data));
+ if ( st->instance_id >= 0 ) {
+ data->u.str = (char*)idb_get(instances[st->instance_id].vars,reference_getuid(data));
} else {
ShowWarning("script:get_val: cannot access instance variable '%s', defaulting to \"\"\n", name);
data->u.str = NULL;
@@ -2423,8 +2425,8 @@ void get_val(struct script_state* st, struct script_data* data)
}
break;
case '\'':
- if( st->instance_id )
- data->u.num = (int)idb_iget(instance[st->instance_id].vars,reference_getuid(data));
+ if( st->instance_id >= 0 )
+ data->u.num = (int)idb_iget(instances[st->instance_id].vars,reference_getuid(data));
else {
ShowWarning("script:get_val: cannot access instance variable '%s', defaulting to 0\n", name);
data->u.num = 0;
@@ -2484,9 +2486,9 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam
}
return 1;
case '\'':
- if( st->instance_id ) {
- idb_remove(instance[st->instance_id].vars, num);
- if( str[0] ) idb_put(instance[st->instance_id].vars, num, aStrdup(str));
+ if( st->instance_id >= 0 ) {
+ idb_remove(instances[st->instance_id].vars, num);
+ if( str[0] ) idb_put(instances[st->instance_id].vars, num, aStrdup(str));
}
return 1;
default:
@@ -2532,10 +2534,10 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam
}
return 1;
case '\'':
- if( st->instance_id ) {
- idb_remove(instance[st->instance_id].vars, num);
+ if( st->instance_id >= 0 ) {
+ idb_remove(instances[st->instance_id].vars, num);
if( val != 0 )
- idb_iput(instance[st->instance_id].vars, num, val);
+ idb_iput(instances[st->instance_id].vars, num, val);
}
return 1;
default:
@@ -3462,8 +3464,10 @@ void run_script_main(struct script_state *st)
script_attach_state(st);
nd = map_id2nd(st->oid);
- if( nd && map[nd->bl.m].instance_id > 0 )
+ if( nd && nd->bl.m >= 0 )
st->instance_id = map[nd->bl.m].instance_id;
+ else
+ st->instance_id = -1;
if(st->state == RERUNLINE) {
run_func(st);
@@ -3845,9 +3849,25 @@ void do_final_script(void) {
script->buildin[i] = NULL;
}
}
-
- aFree(script->buildin);
+ aFree(script->buildin);
+
+ if( script->hqs ) {
+ for( i = 0; i < script->hqs; i++ ) {
+ if( script->hq[i].item != NULL )
+ aFree(script->hq[i].item);
+ }
+ }
+ if( script->hqis ) {
+ for( i = 0; i < script->hqis; i++ ) {
+ if( script->hqi[i].item != NULL )
+ aFree(script->hqi[i].item);
+ }
+ }
+ if( script->hq != NULL )
+ aFree(script->hq);
+ if( script->hqi != NULL )
+ aFree(script->hqi);
}
/*==========================================
* Initialization
@@ -8458,13 +8478,10 @@ BUILDIN(monster)
if (sd && strcmp(mapn, "this") == 0)
m = sd->bl.m;
- else
- {
+ else {
m = map_mapname2mapid(mapn);
- if (map[m].flag.src4instance && st->instance_id)
- { // Try to redirect to the instance map, not the src map
- if ((m = instance_mapid2imapid(m, st->instance_id)) < 0)
- {
+ if (map[m].flag.src4instance && st->instance_id >= 0) { // Try to redirect to the instance map, not the src map
+ if ((m = instance->mapid2imapid(m, st->instance_id)) < 0) {
ShowError("buildin_monster: Trying to spawn monster (%d) on instance map (%s) without instance attached.\n", class_, mapn);
return false;
}
@@ -8531,27 +8548,22 @@ BUILDIN(areamonster)
struct map_session_data* sd;
int16 m;
- if (script_hasdata(st,10))
- {
+ if (script_hasdata(st,10)) {
event = script_getstr(st, 10);
check_event(st, event);
}
- if (script_hasdata(st, 11))
- {
+ if (script_hasdata(st, 11)) {
size = script_getnum(st, 11);
- if (size > 3)
- {
+ if (size > 3) {
ShowWarning("buildin_monster: Attempted to spawn non-existing size %d for monster class %d\n", size, class_);
return false;
}
}
- if (script_hasdata(st, 12))
- {
+ if (script_hasdata(st, 12)) {
ai = script_getnum(st, 12);
- if (ai > 4)
- {
+ if (ai > 4) {
ShowWarning("buildin_monster: Attempted to spawn non-existing ai %d for monster class %d\n", ai, class_);
return false;
}
@@ -8561,13 +8573,10 @@ BUILDIN(areamonster)
if (sd && strcmp(mapn, "this") == 0)
m = sd->bl.m;
- else
- {
+ else {
m = map_mapname2mapid(mapn);
- if (map[m].flag.src4instance && st->instance_id)
- { // Try to redirect to the instance map, not the src map
- if ((m = instance_mapid2imapid(m, st->instance_id)) < 0)
- {
+ if (map[m].flag.src4instance && st->instance_id >= 0) { // Try to redirect to the instance map, not the src map
+ if ((m = instance->mapid2imapid(m, st->instance_id)) < 0) {
ShowError("buildin_areamonster: Trying to spawn monster (%d) on instance map (%s) without instance attached.\n", class_, mapn);
return false;
}
@@ -8629,7 +8638,7 @@ BUILDIN(killmonster)
if( (m=map_mapname2mapid(mapname))<0 )
return true;
- if( map[m].flag.src4instance && st->instance_id && (m = instance_mapid2imapid(m, st->instance_id)) < 0 )
+ if( map[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
return true;
if( script_hasdata(st,4) ) {
@@ -8670,7 +8679,7 @@ BUILDIN(killmonsterall)
if( (m = map_mapname2mapid(mapname))<0 )
return true;
- if( map[m].flag.src4instance && st->instance_id && (m = instance_mapid2imapid(m, st->instance_id)) < 0 )
+ if( map[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
return true;
if( script_hasdata(st,3) ) {
@@ -11173,8 +11182,7 @@ BUILDIN(mobcount) // Added by RoVeRT
return true;
}
- if( map[m].flag.src4instance && map[m].instance_id == 0 && st->instance_id && (m = instance_mapid2imapid(m, st->instance_id)) < 0 )
- {
+ if( map[m].flag.src4instance && map[m].instance_id >= 0 && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 ) {
script_pushint(st,-1);
return true;
}
@@ -12496,8 +12504,7 @@ BUILDIN(jump_zero)
/*==========================================
* movenpc [MouseJstr]
*------------------------------------------*/
-BUILDIN(movenpc)
-{
+BUILDIN(movenpc) {
TBL_NPC *nd = NULL;
const char *npc;
int x,y;
@@ -12510,7 +12517,7 @@ BUILDIN(movenpc)
return -1;
if (script_hasdata(st,5))
- nd->ud.dir = script_getnum(st,5) % 8;
+ nd->dir = script_getnum(st,5) % 8;
npc_movenpc(nd, x, y);
return true;
}
@@ -12564,17 +12571,20 @@ BUILDIN(npcspeed)
speed = script_getnum(st,2);
nd =(struct npc_data *)map_id2bl(st->oid);
- if( nd )
- {
+ if( nd ) {
+ if( nd->ud == &npc_base_ud ) {
+ nd->ud = NULL;
+ CREATE(nd->ud, struct unit_data, 1);
+ unit_dataset(&nd->bl);
+ }
nd->speed = speed;
- nd->ud.state.speed_changed = 1;
+ nd->ud->state.speed_changed = 1;
}
return true;
}
// make an npc walk to a position [Valaris]
-BUILDIN(npcwalkto)
-{
+BUILDIN(npcwalkto) {
struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
int x=0,y=0;
@@ -12582,6 +12592,12 @@ BUILDIN(npcwalkto)
y=script_getnum(st,3);
if(nd) {
+ if( nd->ud == &npc_base_ud ) {
+ nd->ud = NULL;
+ CREATE(nd->ud, struct unit_data, 1);
+ unit_dataset(&nd->bl);
+ }
+
if (!nd->status.hp) {
status_calc_npc(nd, true);
} else {
@@ -15346,7 +15362,7 @@ BUILDIN(setcell)
for( y = y1; y <= y2; ++y )
for( x = x1; x <= x2; ++x )
- map_setcell(m, x, y, type, flag);
+ map[m].setcell(m, x, y, type, flag);
return true;
}
@@ -15870,25 +15886,28 @@ BUILDIN(bg_get_data)
* Instancing Script Commands
*------------------------------------------*/
-BUILDIN(instance_create)
-{
+BUILDIN(instance_create) {
const char *name;
- int party_id, res;
+ int owner_id, res;
+ int type = IOT_PARTY;
name = script_getstr(st, 2);
- party_id = script_getnum(st, 3);
+ owner_id = script_getnum(st, 3);
+ if( script_hasdata(st,4) ) {
+ type = script_getnum(st, 4);
+ if( type < IOT_NONE || type >= IOT_MAX ) {
+ ShowError("buildin_instance_create: unknown instance type %d for '%s'\n",type,name);
+ return true;
+ }
+ }
- res = instance_create(party_id, name);
- if( res == -4 ) // Already exists
- {
+ res = instance->create(owner_id, name, (enum instance_owner_type) type);
+ if( res == -4 ) { // Already exists
script_pushint(st, -1);
return true;
- }
- else if( res < 0 )
- {
+ } else if( res < 0 ) {
const char *err;
- switch(res)
- {
+ switch(res) {
case -3: err = "No free instances"; break;
case -2: err = "Invalid party ID"; break;
case -1: err = "Invalid type"; break;
@@ -15903,44 +15922,39 @@ BUILDIN(instance_create)
return true;
}
-BUILDIN(instance_destroy)
-{
- int instance_id;
- struct map_session_data *sd;
- struct party_data *p;
+BUILDIN(instance_destroy) {
+ int instance_id = -1;
if( script_hasdata(st, 2) )
instance_id = script_getnum(st, 2);
- else if( st->instance_id )
+ else if( st->instance_id >= 0 )
instance_id = st->instance_id;
- else if( (sd = script_rid2sd(st)) != NULL && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL && p->instance_id )
- instance_id = p->instance_id;
else return true;
- if( instance_id <= 0 || instance_id >= MAX_INSTANCE )
- {
+ if( !instance->valid(instance_id) ) {
ShowError("buildin_instance_destroy: Trying to destroy invalid instance %d.\n", instance_id);
return true;
}
- instance_destroy(instance_id);
+ instance->destroy(instance_id);
return true;
}
-BUILDIN(instance_attachmap)
-{
- const char *name;
+BUILDIN(instance_attachmap) {
+ const char *name, *map_name = NULL;
int16 m;
- int instance_id;
+ int instance_id = -1;
bool usebasename = false;
name = script_getstr(st,2);
instance_id = script_getnum(st,3);
- if( script_hasdata(st,4) && script_getnum(st,4) > 0)
+ if( script_hasdata(st,4) && script_getnum(st,4) > 0 )
usebasename = true;
- if( (m = instance_add_map(name, instance_id, usebasename)) < 0 ) // [Saithis]
- {
+ if( script_hasdata(st, 5) )
+ map_name = script_getstr(st, 5);
+
+ if( (m = instance->add_map(name, instance_id, usebasename, map_name)) < 0 ) { // [Saithis]
ShowError("buildin_instance_attachmap: instance creation failed (%s): %d\n", name, m);
script_pushconststr(st, "");
return true;
@@ -15950,109 +15964,81 @@ BUILDIN(instance_attachmap)
return true;
}
-BUILDIN(instance_detachmap)
-{
- struct map_session_data *sd;
- struct party_data *p;
+BUILDIN(instance_detachmap) {
const char *str;
int16 m;
- int instance_id;
+ int instance_id = -1;
str = script_getstr(st, 2);
if( script_hasdata(st, 3) )
instance_id = script_getnum(st, 3);
- else if( st->instance_id )
+ else if( st->instance_id >= 0 )
instance_id = st->instance_id;
- else if( (sd = script_rid2sd(st)) != NULL && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL && p->instance_id )
- instance_id = p->instance_id;
else return true;
- if( (m = map_mapname2mapid(str)) < 0 || (m = instance_map2imap(m,instance_id)) < 0 )
- {
+ if( (m = map_mapname2mapid(str)) < 0 || (m = instance->map2imap(m,instance_id)) < 0 ) {
ShowError("buildin_instance_detachmap: Trying to detach invalid map %s\n", str);
return true;
}
- instance_del_map(m);
+ instance->del_map(m);
return true;
}
-BUILDIN(instance_attach)
-{
- int instance_id;
+BUILDIN(instance_attach) {
+ int instance_id = -1;
instance_id = script_getnum(st, 2);
- if( instance_id <= 0 || instance_id >= MAX_INSTANCE )
+ if( !instance->valid(instance_id) )
return true;
st->instance_id = instance_id;
return true;
}
-BUILDIN(instance_id)
-{
- int instance_id;
-
- if( script_hasdata(st, 2) )
- {
- struct party_data *p;
- struct map_session_data *sd;
- int type;
- type = script_getnum(st, 2);
- if( type == 0 )
- instance_id = st->instance_id;
- else if( type == 1 && (sd = script_rid2sd(st)) != NULL && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL )
- instance_id = p->instance_id;
- else
- instance_id = 0;
- }
- else
- instance_id = st->instance_id;
-
- script_pushint(st, instance_id);
+BUILDIN(instance_id) {
+ script_pushint(st, st->instance_id);
return true;
}
BUILDIN(instance_set_timeout)
{
int progress_timeout, idle_timeout;
- int instance_id;
- struct map_session_data *sd;
- struct party_data *p;
+ int instance_id = -1;
progress_timeout = script_getnum(st, 2);
idle_timeout = script_getnum(st, 3);
if( script_hasdata(st, 4) )
instance_id = script_getnum(st, 4);
- else if( st->instance_id )
+ else if( st->instance_id >= 0 )
instance_id = st->instance_id;
- else if( (sd = script_rid2sd(st)) != NULL && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL && p->instance_id )
- instance_id = p->instance_id;
else return true;
- if( instance_id > 0 )
- instance_set_timeout(instance_id, progress_timeout, idle_timeout);
+ if( instance_id >= 0 )
+ instance->set_timeout(instance_id, progress_timeout, idle_timeout);
return true;
}
-BUILDIN(instance_init)
-{
+BUILDIN(instance_init) {
int instance_id = script_getnum(st, 2);
- if( instance[instance_id].state != INSTANCE_IDLE )
- {
+ if( !instance->valid(instance_id) ) {
+ ShowError("instance_init: invalid instance id %d.\n",instance_id);
+ return true;
+ }
+
+ if( instances[instance_id].state != INSTANCE_IDLE ) {
ShowError("instance_init: instance already initialized.\n");
return true;
}
- instance_init(instance_id);
+ instance->start(instance_id);
return true;
}
-BUILDIN(instance_announce)
-{
+BUILDIN(instance_announce) {
int instance_id = script_getnum(st,2);
const char *mes = script_getstr(st,3);
int flag = script_getnum(st,4);
@@ -16063,53 +16049,40 @@ BUILDIN(instance_announce)
int fontY = script_hasdata(st,9) ? script_getnum(st,9) : 0; // default fontY
int i;
- struct map_session_data *sd;
- struct party_data *p;
- if( instance_id == 0 )
- {
- if( st->instance_id )
+ if( instance_id == -1 ) {
+ if( st->instance_id >= 0 )
instance_id = st->instance_id;
- else if( (sd = script_rid2sd(st)) != NULL && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL && p->instance_id )
- instance_id = p->instance_id;
- else return true;
+ else
+ return true;
}
- if( instance_id <= 0 || instance_id >= MAX_INSTANCE )
+ if( !instance->valid(instance_id) )
return true;
- for( i = 0; i < instance[instance_id].num_map; i++ )
- map_foreachinmap(buildin_announce_sub, instance[instance_id].map[i], BL_PC,
+ for( i = 0; i < instances[instance_id].num_map; i++ )
+ map_foreachinmap(buildin_announce_sub, instances[instance_id].map[i], BL_PC,
mes, strlen(mes)+1, flag&0xf0, fontColor, fontType, fontSize, fontAlign, fontY);
return true;
}
-BUILDIN(instance_npcname)
-{
+BUILDIN(instance_npcname) {
const char *str;
- int instance_id = 0;
-
- struct map_session_data *sd;
- struct party_data *p;
+ int instance_id = -1;
struct npc_data *nd;
str = script_getstr(st, 2);
if( script_hasdata(st, 3) )
instance_id = script_getnum(st, 3);
- else if( st->instance_id )
+ else if( st->instance_id >= 0 )
instance_id = st->instance_id;
- else if( (sd = script_rid2sd(st)) != NULL && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL && p->instance_id )
- instance_id = p->instance_id;
- if( instance_id && (nd = npc_name2id(str)) != NULL )
- {
+ if( instance_id >= 0 && (nd = npc_name2id(str)) != NULL ) {
static char npcname[NAME_LENGTH];
snprintf(npcname, sizeof(npcname), "dup_%d_%d", instance_id, nd->bl.id);
script_pushconststr(st,npcname);
- }
- else
- {
+ } else {
ShowError("script:instance_npcname: invalid instance NPC (instance_id: %d, NPC name: \"%s\".)\n", instance_id, str);
st->state = END;
return false;
@@ -16118,24 +16091,56 @@ BUILDIN(instance_npcname)
return true;
}
-BUILDIN(has_instance)
-{
+BUILDIN(has_instance) {
struct map_session_data *sd;
- struct party_data *p;
const char *str;
int16 m;
- int instance_id = 0;
+ int instance_id = -1;
str = script_getstr(st, 2);
+
+ if( (m = map_mapname2mapid(str)) < 0 ) {
+ script_pushconststr(st, "");
+ return true;
+ }
+
if( script_hasdata(st, 3) )
instance_id = script_getnum(st, 3);
- else if( st->instance_id )
+ else if( st->instance_id >= 0 )
instance_id = st->instance_id;
- else if( (sd = script_rid2sd(st)) != NULL && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL && p->instance_id )
- instance_id = p->instance_id;
+ else if( (sd = script_rid2sd(st)) != NULL ) {
+ struct party_data *p;
+ int i = 0, j = 0;
+ if( sd->instances ) {
+ for( i = 0; i < sd->instances; i++ ) {
+ ARR_FIND(0, instances[sd->instance[i]].num_map, j, map[instances[sd->instance[i]].map[j]].instance_src_map == m);
+ if( j != instances[sd->instance[i]].num_map )
+ break;
+ }
+ if( i != sd->instances )
+ instance_id = sd->instance[i];
+ }
+ if( instance_id == -1 && sd->status.party_id && (p = party_search(sd->status.party_id)) && p->instances ) {
+ for( i = 0; i < p->instances; i++ ) {
+ ARR_FIND(0, instances[p->instance[i]].num_map, j, map[instances[p->instance[i]].map[j]].instance_src_map == m);
+ if( j != instances[p->instance[i]].num_map )
+ break;
+ }
+ if( i != p->instances )
+ instance_id = p->instance[i];
+ }
+ if( instance_id == -1 && sd->guild && sd->guild->instances ) {
+ for( i = 0; i < sd->guild->instances; i++ ) {
+ ARR_FIND(0, instances[sd->guild->instance[i]].num_map, j, map[instances[sd->guild->instance[i]].map[j]].instance_src_map == m);
+ if( j != instances[sd->guild->instance[i]].num_map )
+ break;
+ }
+ if( i != sd->guild->instances )
+ instance_id = sd->guild->instance[i];
+ }
+ }
- if( !instance_id || (m = map_mapname2mapid(str)) < 0 || (m = instance_map2imap(m, instance_id)) < 0 )
- {
+ if( !instance->valid(instance_id) || (m = instance->map2imap(m, instance_id)) < 0 ) {
script_pushconststr(st, "");
return true;
}
@@ -16143,38 +16148,41 @@ BUILDIN(has_instance)
script_pushconststr(st, map[m].name);
return true;
}
-
-BUILDIN(instance_warpall)
-{
- struct map_session_data *pl_sd;
- int16 m, i;
- int instance_id;
+static int buildin_instance_warpall_sub(struct block_list *bl,va_list ap) {
+ struct map_session_data *sd = ((TBL_PC*)bl);
+ int mapindex = va_arg(ap,int);
+ int x = va_arg(ap,int);
+ int y = va_arg(ap,int);
+
+ pc_setpos(sd,mapindex,x,y,CLR_TELEPORT);
+
+ return 0;
+}
+BUILDIN(instance_warpall) {
+ int16 m;
+ int instance_id = -1;
const char *mapn;
int x, y;
- unsigned short mapindex;
- struct party_data *p = NULL;
+ int mapindex;
mapn = script_getstr(st,2);
x = script_getnum(st,3);
y = script_getnum(st,4);
+
if( script_hasdata(st,5) )
instance_id = script_getnum(st,5);
- else if( st->instance_id )
+ else if( st->instance_id >= 0 )
instance_id = st->instance_id;
- else if( (pl_sd = script_rid2sd(st)) != NULL && pl_sd->status.party_id && (p = party_search(pl_sd->status.party_id)) != NULL && p->instance_id )
- instance_id = p->instance_id;
- else return true;
-
- if( (m = map_mapname2mapid(mapn)) < 0 || (map[m].flag.src4instance && (m = instance_mapid2imapid(m, instance_id)) < 0) )
+ else
return true;
- if( !(p = party_search(instance[instance_id].party_id)) )
+ if( (m = map_mapname2mapid(mapn)) < 0 || (map[m].flag.src4instance && (m = instance->mapid2imapid(m, instance_id)) < 0) )
return true;
-
+
mapindex = map_id2index(m);
- for( i = 0; i < MAX_PARTY; i++ )
- if( (pl_sd = p->data[i].sd) && map[pl_sd->bl.m].instance_id == st->instance_id ) pc_setpos(pl_sd,mapindex,x,y,CLR_TELEPORT);
+ map_foreachininstance(buildin_instance_warpall_sub, instance_id, BL_PC,mapindex,x,y);
+
return true;
}
@@ -16188,8 +16196,7 @@ BUILDIN(instance_warpall)
* Example: instance_check_party (getcharid(1){,amount}{,min}{,max});
* Example 2: instance_check_party (getcharid(1),1,1,99);
*------------------------------------------*/
-BUILDIN(instance_check_party)
-{
+BUILDIN(instance_check_party) {
struct map_session_data *pl_sd;
int amount, min, max, i, party_id, c = 0;
struct party_data *p = NULL;
@@ -16303,13 +16310,12 @@ BUILDIN(areamobuseskill)
int16 m;
int range,mobid,skill_id,skill_lv,casttime,emotion,target,cancel;
- if( (m = map_mapname2mapid(script_getstr(st,2))) < 0 )
- {
+ if( (m = map_mapname2mapid(script_getstr(st,2))) < 0 ) {
ShowError("areamobuseskill: invalid map name.\n");
return true;
}
- if( map[m].flag.src4instance && st->instance_id && (m = instance_mapid2imapid(m, st->instance_id)) < 0 )
+ if( map[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
return true;
center.m = m;
@@ -16999,6 +17005,309 @@ BUILDIN(npcskill)
return true;
}
+struct hQueue *script_hqueue_get(int idx) {
+ if( idx < 0 || idx >= script->hqs || script->hq[idx].items == -1 )
+ return NULL;
+ return &script->hq[idx];
+}
+/* set .@id,queue(); */
+/* creates queue, returns created queue id */
+BUILDIN(queue) {
+ int idx = script->hqs;
+ int i;
+
+ for(i = 0; i < script->hqs; i++) {
+ if( script->hq[i].items == -1 ) {
+ break;
+ }
+ }
+
+ if( i == script->hqs ) {
+ RECREATE(script->hq, struct hQueue, ++script->hqs);
+ script->hq[ idx ].item = NULL;
+ } else
+ idx = i;
+
+ script->hq[ idx ].id = idx;
+ script->hq[ idx ].items = 0;
+ script->hq[ idx ].onDeath[0] = '\0';
+ script->hq[ idx ].onLogOut[0] = '\0';
+ script->hq[ idx ].onMapChange[0] = '\0';
+
+ script_pushint(st,idx);
+ return true;
+}
+/* set .@length,queuesize(.@queue_id); */
+/* returns queue length */
+BUILDIN(queuesize) {
+ int idx = script_getnum(st, 2);
+
+ if( idx < 0 || idx >= script->hqs || script->hq[idx].items == -1 ) {
+ ShowWarning("buildin_queuesize: unknown queue id %d\n",idx);
+ script_pushint(st, 0);
+ } else
+ script_pushint(st, script->hq[ idx ].items );
+
+ return true;
+}
+bool script_hqueue_add(int idx, int var) {
+ if( idx < 0 || idx >= script->hqs || script->hq[idx].items == -1 ) {
+ ShowWarning("script_hqueue_add: unknown queue id %d\n",idx);
+ return true;
+ } else {
+ struct map_session_data *sd;
+ int i;
+
+ for(i = 0; i < script->hq[idx].items; i++) {
+ if( script->hq[idx].item[i] == var ) {
+ return true;
+ }
+ }
+
+ if( i == script->hq[idx].items ) {
+
+ for(i = 0; i < script->hq[idx].items; i++) {
+ if( script->hq[idx].item[i] == 0 ) {
+ break;
+ }
+ }
+
+ if( i == script->hq[idx].items )
+ RECREATE(script->hq[idx].item, int, ++script->hq[idx].items);
+
+ script->hq[idx].item[i] = var;
+
+ if( var >= START_ACCOUNT_NUM && (sd = map_id2sd(var)) ) {
+ for(i = 0; i < sd->queues_count; i++) {
+ if( sd->queues[i] == -1 ) {
+ break;
+ }
+ }
+
+ if( i == sd->queues_count )
+ RECREATE(sd->queues, int, ++sd->queues_count);
+
+ sd->queues[i] = idx;
+ }
+
+ }
+ }
+ return false;
+}
+/* queueadd(.@queue_id,.@var_id); */
+/* adds a new entry to the queue, returns 1 if already in queue, 0 otherwise */
+BUILDIN(queueadd) {
+ int idx = script_getnum(st, 2);
+ int var = script_getnum(st, 3);
+
+ script_pushint(st,script->queue_add(idx,var)?1:0);
+
+ return true;
+}
+bool script_hqueue_remove(int idx, int var) {
+ if( idx < 0 || idx >= script->hqs || script->hq[idx].items == -1 ) {
+ ShowWarning("script_hqueue_remove: unknown queue id %d (used with var %d)\n",idx,var);
+ return true;
+ } else {
+ int i;
+
+ for(i = 0; i < script->hq[idx].items; i++) {
+ if( script->hq[idx].item[i] == var ) {
+ return true;
+ }
+ }
+
+ if( i != script->hq[idx].items ) {
+ struct map_session_data *sd;
+ script->hq[idx].item[i] = 0;
+
+ if( var >= START_ACCOUNT_NUM && (sd = map_id2sd(var)) ) {
+ for(i = 0; i < sd->queues_count; i++) {
+ if( sd->queues[i] == var ) {
+ break;
+ }
+ }
+
+ if( i != sd->queues_count )
+ sd->queues[i] = -1;
+ }
+
+ }
+ }
+ return false;
+}
+/* queueremove(.@queue_id,.@var_id); */
+/* removes a entry from the queue, returns 1 if not in queue, 0 otherwise */
+BUILDIN(queueremove) {
+ int idx = script_getnum(st, 2);
+ int var = script_getnum(st, 3);
+
+ script_pushint(st, script->queue_remove(idx,var)?1:0);
+
+ return true;
+}
+
+/* queueopt(.@queue_id,optionType,<optional val>); */
+/* modifies the queue's options, when val is not provided the option is removed */
+/* when OnMapChange event is triggered, it sets a temp char var @QMapChangeTo$ with the destination map name */
+/* returns 1 when fails, 0 on success */
+BUILDIN(queueopt) {
+ int idx = script_getnum(st, 2);
+ int var = script_getnum(st, 3);
+
+ if( idx < 0 || idx >= script->hqs || script->hq[idx].items == -1 ) {
+ ShowWarning("buildin_queueopt: unknown queue id %d\n",idx);
+ script_pushint(st, 1);
+ } else if( var <= HQO_NONE || var >= HQO_MAX ) {
+ ShowWarning("buildin_queueopt: unknown optionType %d\n",var);
+ script_pushint(st, 1);
+ } else {
+ switch( (enum hQueueOpt)var ) {
+ case HQO_OnDeath:
+ if( script_hasdata(st, 4) )
+ safestrncpy(script->hq[idx].onDeath, script_getstr(st, 4), EVENT_NAME_LENGTH);
+ else
+ script->hq[idx].onDeath[0] = '\0';
+ break;
+ case HQO_onLogOut:
+ if( script_hasdata(st, 4) )
+ safestrncpy(script->hq[idx].onLogOut, script_getstr(st, 4), EVENT_NAME_LENGTH);
+ else
+ script->hq[idx].onLogOut[0] = '\0';
+ break;
+ case HQO_OnMapChange:
+ if( script_hasdata(st, 4) )
+ safestrncpy(script->hq[idx].onMapChange, script_getstr(st, 4), EVENT_NAME_LENGTH);
+ else
+ script->hq[idx].onMapChange[0] = '\0';
+ break;
+ default:
+ ShowWarning("buildin_queueopt: unsupported optionType %d\n",var);
+ script_pushint(st, 1);
+ break;
+ }
+ }
+
+ return true;
+}
+bool script_hqueue_del(int idx) {
+ if( idx < 0 || idx >= script->hqs || script->hq[idx].items == -1 ) {
+ ShowWarning("script_queue_del: unknown queue id %d\n",idx);
+ return true;
+ } else {
+ struct map_session_data *sd;
+ int i;
+
+ for(i = 0; i < script->hq[idx].items; i++) {
+ if( script->hq[idx].item[i] >= START_ACCOUNT_NUM && (sd = map_id2sd(script->hq[idx].item[i])) ) {
+ int j;
+ for(j = 0; j < sd->queues_count; j++) {
+ if( sd->queues[j] == script->hq[idx].item[i] ) {
+ break;
+ }
+ }
+
+ if( j != sd->queues_count )
+ sd->queues[j] = -1;
+ }
+ }
+
+ script->hq[idx].items = -1;
+ }
+ return false;
+}
+/* queuedel(.@queue_id); */
+/* deletes queue of id .@queue_id, returns 1 if id not found, 0 otherwise */
+BUILDIN(queuedel) {
+ int idx = script_getnum(st, 2);
+
+ script_pushint(st,script->queue_del(idx)?1:0);
+
+ return true;
+}
+
+/* set .@id, queueiterator(.@queue_id); */
+/* creates a new queue iterator, returns its id */
+BUILDIN(queueiterator) {
+ int qid = script_getnum(st, 2);
+ struct hQueue *queue = NULL;
+ int idx = script->hqis;
+ int i;
+
+ if( qid < 0 || qid >= script->hqs || script->hq[idx].items == -1 || !(queue = script->queue(qid)) ) {
+ ShowWarning("queueiterator: invalid queue id %d\n",qid);
+ return true;
+ }
+
+ for(i = 0; i < script->hqis; i++) {
+ if( script->hqi[i].items == -1 ) {
+ break;
+ }
+ }
+
+ if( i == script->hqis )
+ RECREATE(script->hqi, struct hQueueIterator, ++script->hqis);
+ else
+ idx = i;
+
+ RECREATE(script->hqi[ idx ].item, int, queue->items);
+
+ memcpy(&script->hqi[idx].item, &queue->item, sizeof(int)*queue->items);
+
+ script->hqi[ idx ].items = queue->items;
+ script->hqi[ idx ].pos = 0;
+
+ script_pushint(st,idx);
+ return true;
+}
+/* Queue Iterator Get Next */
+/* returns next/first member in the iterator, 0 if none */
+BUILDIN(qiget) {
+ int idx = script_getnum(st, 2);
+
+ if( idx < 0 || idx >= script->hqis ) {
+ ShowWarning("buildin_qiget: unknown queue iterator id %d\n",idx);
+ script_pushint(st, 0);
+ } else if ( script->hqi[idx].pos == script->hqi[idx].items ) {
+ script_pushint(st, 0);
+ } else {
+ struct hQueueIterator *it = &script->hqi[idx];
+ script_pushint(st, it->item[it->pos++]);
+ }
+
+ return true;
+}
+/* Queue Iterator Check */
+/* returns 1:0 if there is a next member in the iterator */
+BUILDIN(qicheck) {
+ int idx = script_getnum(st, 2);
+
+ if( idx < 0 || idx >= script->hqis ) {
+ ShowWarning("buildin_qicheck: unknown queue iterator id %d\n",idx);
+ script_pushint(st, 0);
+ } else if ( script->hqi[idx].pos == script->hqi[idx].items ) {
+ script_pushint(st, 0);
+ } else {
+ script_pushint(st, 1);
+ }
+
+ return true;
+}
+/* Queue Iterator Check */
+BUILDIN(qiclear) {
+ int idx = script_getnum(st, 2);
+
+ if( idx < 0 || idx >= script->hqis ) {
+ ShowWarning("buildin_qiclear: unknown queue iterator id %d\n",idx);
+ script_pushint(st, 1);
+ } else {
+ script->hqi[idx].items = -1;
+ script_pushint(st, 0);
+ }
+
+ return true;
+}
+
// declarations that were supposed to be exported from npc_chat.c
#ifdef PCRE_SUPPORT
BUILDIN(defpattern);
@@ -17447,12 +17756,12 @@ void script_parse_builtin(void) {
BUILDIN_DEF(bg_updatescore,"sii"),
// Instancing
- BUILDIN_DEF(instance_create,"si"),
+ BUILDIN_DEF(instance_create,"si?"),
BUILDIN_DEF(instance_destroy,"?"),
- BUILDIN_DEF(instance_attachmap,"si?"),
+ BUILDIN_DEF(instance_attachmap,"si??"),
BUILDIN_DEF(instance_detachmap,"s?"),
BUILDIN_DEF(instance_attach,"i"),
- BUILDIN_DEF(instance_id,"?"),
+ BUILDIN_DEF(instance_id,""),
BUILDIN_DEF(instance_set_timeout,"ii?"),
BUILDIN_DEF(instance_init,"i"),
BUILDIN_DEF(instance_announce,"isi?????"),
@@ -17497,6 +17806,20 @@ void script_parse_builtin(void) {
BUILDIN_DEF(checkquest, "i?"),
BUILDIN_DEF(changequest, "ii"),
BUILDIN_DEF(showevent, "ii"),
+
+ /**
+ * hQueue [Ind/Hercules]
+ **/
+ BUILDIN_DEF(queue,""),
+ BUILDIN_DEF(queuesize,"i"),
+ BUILDIN_DEF(queueadd,"ii"),
+ BUILDIN_DEF(queueremove,"ii"),
+ BUILDIN_DEF(queueopt,"ii?"),
+ BUILDIN_DEF(queuedel,"i"),
+ BUILDIN_DEF(queueiterator,"i"),
+ BUILDIN_DEF(qicheck,"i"),
+ BUILDIN_DEF(qiget,"i"),
+ BUILDIN_DEF(qiclear,"i"),
};
int i,n, len = ARRAYLENGTH(BUILDIN), start = script->buildin_count;
char* p;
@@ -17550,6 +17873,11 @@ void script_parse_builtin(void) {
void script_defaults(void) {
script = &script_s;
+ script->hq = NULL;
+ script->hqi = NULL;
+ script->hqs = script->hqis = 0;
+ memset(&script->hqe, 0, sizeof(script->hqe));
+
script->buildin_count = 0;
script->buildin = NULL;
@@ -17560,4 +17888,9 @@ void script_defaults(void) {
script->addScript = script_hp_add;
script->conv_num = conv_num;
script->conv_str = conv_str;
+
+ script->queue = script_hqueue_get;
+ script->queue_add = script_hqueue_add;
+ script->queue_del = script_hqueue_del;
+ script->queue_remove = script_hqueue_remove;
}
diff --git a/src/map/script.h b/src/map/script.h
index a0d282bfe..70ced5d43 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -4,6 +4,8 @@
#ifndef _SCRIPT_H_
#define _SCRIPT_H_
+#include "map.h" //EVENT_NAME_LENGTH
+
#define NUM_WHISPER_VAR 10
struct map_session_data;
@@ -110,6 +112,30 @@ struct script_stack {
struct DBMap* var_function;// scope variables
};
+enum hQueueOpt {
+ HQO_NONE,
+ HQO_onLogOut,
+ HQO_OnDeath,
+ HQO_OnMapChange,
+ HQO_MAX,
+};
+
+/* [Ind/Hercules] */
+struct hQueue {
+ int id;
+ int *item;
+ int items;
+ /* events */
+ char onLogOut[EVENT_NAME_LENGTH];
+ char onDeath[EVENT_NAME_LENGTH];
+ char onMapChange[EVENT_NAME_LENGTH];
+};
+
+struct hQueueIterator {
+ int *item;
+ int items;
+ int pos;
+};
//
// Script state
@@ -129,6 +155,7 @@ struct script_state {
int instance_id;
//For backing up purposes
struct script_state *bk_st;
+ unsigned char hIterator;
int bk_npcid;
unsigned freeloop : 1;// used by buildin_freeloop
unsigned op2ref : 1;// used by op_2
@@ -291,8 +318,14 @@ struct script_function {
char *name;
char *arg;
};
+
/* script.c interface (incomplete) */
struct script_interface {
+ /* */
+ struct hQueue *hq;
+ struct hQueueIterator *hqi;
+ int hqs, hqis;
+ int hqe[HQO_MAX];
/* */
char **buildin;
unsigned int buildin_count;
@@ -304,6 +337,11 @@ struct script_interface {
bool (*addScript) (char *name, char *args, bool (*func)(struct script_state *st));
int (*conv_num) (struct script_state *st,struct script_data *data);
const char* (*conv_str) (struct script_state *st,struct script_data *data);
+ /* */
+ struct hQueue *(*queue) (int idx);
+ bool (*queue_add) (int idx, int var);
+ bool (*queue_del) (int idx);
+ bool (*queue_remove) (int idx, int var);
} script_s;
struct script_interface *script;
diff --git a/src/map/skill.c b/src/map/skill.c
index 06bfca5f8..911410727 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -14464,7 +14464,7 @@ void skill_unitsetmapcell (struct skill_unit *src, uint16 skill_id, uint16 skill
for( y = src->bl.y - range; y <= src->bl.y + range; ++y )
for( x = src->bl.x - range; x <= src->bl.x + range; ++x )
- map_setcell(src->bl.m, x, y, cell, flag);
+ map[src->bl.m].setcell(src->bl.m, x, y, cell, flag);
}
/*==========================================
diff --git a/src/map/status.c b/src/map/status.c
index b7e906910..35ce70349 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2584,7 +2584,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
continue;
for(k = 0; k < map[sd->bl.m].zone->disabled_items_count; k++) {
- if( map[sd->bl.m].zone->disabled_items[k] == sd->inventory_data[index]->nameid ) {
+ if( map[sd->bl.m].zone->disabled_items[k] == data->nameid ) {
break;
}
}
@@ -6079,14 +6079,15 @@ void status_set_viewdata(struct block_list *bl, int class_)
/// Returns the status_change data of bl or NULL if it doesn't exist.
struct status_change *status_get_sc(struct block_list *bl) {
- if( bl )
- switch (bl->type) {
- case BL_PC: return &((TBL_PC*)bl)->sc;
- case BL_MOB: return &((TBL_MOB*)bl)->sc;
- case BL_NPC: return &((TBL_NPC*)bl)->sc;
- case BL_HOM: return &((TBL_HOM*)bl)->sc;
- case BL_MER: return &((TBL_MER*)bl)->sc;
- case BL_ELEM: return &((TBL_ELEM*)bl)->sc;
+ if( bl ) {
+ switch (bl->type) {
+ case BL_PC: return &((TBL_PC*)bl)->sc;
+ case BL_MOB: return &((TBL_MOB*)bl)->sc;
+ case BL_NPC: return NULL;
+ case BL_HOM: return &((TBL_HOM*)bl)->sc;
+ case BL_MER: return &((TBL_MER*)bl)->sc;
+ case BL_ELEM: return &((TBL_ELEM*)bl)->sc;
+ }
}
return NULL;
}
diff --git a/src/map/unit.c b/src/map/unit.c
index cbc695c4a..3ab1008cb 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -50,7 +50,7 @@ struct unit_data* unit_bl2ud(struct block_list *bl)
if( bl->type == BL_PC) return &((struct map_session_data*)bl)->ud;
if( bl->type == BL_MOB) return &((struct mob_data*)bl)->ud;
if( bl->type == BL_PET) return &((struct pet_data*)bl)->ud;
- if( bl->type == BL_NPC) return &((struct npc_data*)bl)->ud;
+ if( bl->type == BL_NPC) return ((struct npc_data*)bl)->ud;
if( bl->type == BL_HOM) return &((struct homun_data*)bl)->ud;
if( bl->type == BL_MER) return &((struct mercenary_data*)bl)->ud;
if( bl->type == BL_ELEM) return &((struct elemental_data*)bl)->ud;
@@ -678,10 +678,12 @@ int unit_setdir(struct block_list *bl,unsigned char dir)
return 0;
}
-uint8 unit_getdir(struct block_list *bl)
-{
+uint8 unit_getdir(struct block_list *bl) {
struct unit_data *ud;
- nullpo_ret(bl );
+ nullpo_ret(bl);
+
+ if( bl->type == BL_NPC )
+ return ((TBL_NPC*)bl)->dir;
ud = unit_bl2ud(bl);
if (!ud) return 0;
return ud->dir;
@@ -1961,8 +1963,7 @@ int unit_skillcastcancel(struct block_list *bl,int type)
}
// unit_data initialization process
-void unit_dataset(struct block_list *bl)
-{
+void unit_dataset(struct block_list *bl) {
struct unit_data *ud;
nullpo_retv(ud = unit_bl2ud(bl));
@@ -2121,8 +2122,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
npc_touchnext_areanpc(sd,true);
// Check if warping and not changing the map.
- if ( sd->state.warping && !sd->state.changemap )
- {
+ if ( sd->state.warping && !sd->state.changemap ) {
status_change_end(bl, SC_CLOAKING, INVALID_TIMER);
status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER);
}
@@ -2163,18 +2163,15 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
sd->state.active, sd->state.connect_new, sd->state.rewarp, sd->state.changemap, sd->state.debug_remove_map,
map[bl->m].name, map[bl->m].users,
sd->debug_file, sd->debug_line, sd->debug_func, file, line, func);
- }
- else
- if (--map[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex]
+ } else if (--map[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex]
map_removemobs(bl->m);
if( !(sd->sc.option&OPTION_INVISIBLE) )
{// decrement the number of active pvp players on the map
--map[bl->m].users_pvp;
}
- if( map[bl->m].instance_id )
- {
- instance[map[bl->m].instance_id].users--;
- instance_check_idle(map[bl->m].instance_id);
+ if( map[bl->m].instance_id >= 0 ) {
+ instances[map[bl->m].instance_id].users--;
+ instance->check_idle(map[bl->m].instance_id);
}
sd->state.debug_remove_map = 1; // temporary state to track double remove_map's [FlavioJS]
sd->debug_file = file;
@@ -2356,9 +2353,19 @@ int unit_free(struct block_list *bl, clr_type clrtype)
ers_free(pc_sc_display_ers, sd->sc_display[i]);
}
sd->sc_display_count = 0;
+ }
+ if( sd->sc_display != NULL ) {
aFree(sd->sc_display);
sd->sc_display = NULL;
}
+ if( sd->instance != NULL ) {
+ aFree(sd->instance);
+ sd->instance = NULL;
+ }
+ if( sd->queues != NULL ) {
+ aFree(sd->queues);
+ sd->queues = NULL;
+ }
break;
}
case BL_PET: