summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-05-30 22:20:16 -0300
committershennetsind <ind@henn.et>2013-05-30 22:20:16 -0300
commit5a138ceabf08fe0ca75a24306e849ce3f24faef8 (patch)
tree5cc9cae641157e05172f450d84a6fe6d9753b793
parent20bdc01fa687b174a732be4483ddea4982d67ce9 (diff)
parentb30c74a7733848f03e5defc238dca0e0cb044470 (diff)
downloadhercules-5a138ceabf08fe0ca75a24306e849ce3f24faef8.tar.gz
hercules-5a138ceabf08fe0ca75a24306e849ce3f24faef8.tar.bz2
hercules-5a138ceabf08fe0ca75a24306e849ce3f24faef8.tar.xz
hercules-5a138ceabf08fe0ca75a24306e849ce3f24faef8.zip
Memory Slasher - May 30 Patch
http://hercules.ws/board/topic/928-memory-slasher-may-30-patch/ Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--.travis.yml7
-rw-r--r--conf/channels.conf42
-rw-r--r--conf/map-server.conf2
-rw-r--r--conf/messages.conf16
-rw-r--r--conf/packet.conf10
-rw-r--r--doc/atcommands.txt2
-rw-r--r--doc/ea_job_system.txt2
-rw-r--r--doc/effect_list.txt2
-rw-r--r--doc/item_bonus.txt2
-rw-r--r--doc/item_db.txt21
-rw-r--r--doc/map_cache.txt2
-rw-r--r--doc/md5_hashcheck.txt2
-rw-r--r--doc/mob_db_mode_list.txt2
-rw-r--r--doc/packet_struct_notation.txt2
-rw-r--r--doc/permissions.txt6
-rw-r--r--doc/quest_variables.txt2
-rw-r--r--doc/script_commands.txt5055
-rw-r--r--doc/whisper_sys.txt2
-rw-r--r--doc/woe_time_explanation.txt2
-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/breeder.txt9
-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/NydhoggsNest.txt1
-rw-r--r--npc/mapflag/battleground.txt (renamed from conf/mapflag/battleground.txt)2
-rw-r--r--npc/mapflag/gvg.txt (renamed from conf/mapflag/gvg.txt)2
-rw-r--r--npc/mapflag/jail.txt (renamed from conf/mapflag/jail.txt)2
-rw-r--r--npc/mapflag/night.txt (renamed from conf/mapflag/night.txt)2
-rw-r--r--npc/mapflag/nightmare.txt (renamed from conf/mapflag/nightmare.txt)2
-rw-r--r--npc/mapflag/nobranch.txt (renamed from conf/mapflag/nobranch.txt)2
-rw-r--r--npc/mapflag/noexp.txt (renamed from conf/mapflag/noexp.txt)2
-rw-r--r--npc/mapflag/noicewall.txt (renamed from conf/mapflag/noicewall.txt)2
-rw-r--r--npc/mapflag/noloot.txt (renamed from conf/mapflag/noloot.txt)2
-rw-r--r--npc/mapflag/nomemo.txt (renamed from conf/mapflag/nomemo.txt)2
-rw-r--r--npc/mapflag/nopenalty.txt (renamed from conf/mapflag/nopenalty.txt)2
-rw-r--r--npc/mapflag/nopvp.txt (renamed from conf/mapflag/nopvp.txt)2
-rw-r--r--npc/mapflag/noreturn.txt (renamed from conf/mapflag/noreturn.txt)2
-rw-r--r--npc/mapflag/nosave.txt (renamed from conf/mapflag/nosave.txt)2
-rw-r--r--npc/mapflag/noskill.txt (renamed from conf/mapflag/noskill.txt)2
-rw-r--r--npc/mapflag/noteleport.txt (renamed from conf/mapflag/noteleport.txt)2
-rw-r--r--npc/mapflag/novending.txt (renamed from conf/mapflag/novending.txt)2
-rw-r--r--npc/mapflag/nowarp.txt (renamed from conf/mapflag/nowarp.txt)2
-rw-r--r--npc/mapflag/nowarpto.txt (renamed from conf/mapflag/nowarpto.txt)2
-rw-r--r--npc/mapflag/partylock.txt (renamed from conf/mapflag/partylock.txt)2
-rw-r--r--npc/mapflag/pvp.txt (renamed from conf/mapflag/pvp.txt)2
-rw-r--r--npc/mapflag/pvp_noguild.txt (renamed from conf/mapflag/pvp_noguild.txt)2
-rw-r--r--npc/mapflag/pvp_noparty.txt (renamed from conf/mapflag/pvp_noparty.txt)2
-rw-r--r--npc/mapflag/reset.txt (renamed from conf/mapflag/reset.txt)2
-rw-r--r--npc/mapflag/skillduration.txt (renamed from conf/mapflag/skillduration.txt)0
-rw-r--r--npc/mapflag/skillmodifier.txt (renamed from conf/mapflag/skillmodifier.txt)0
-rw-r--r--npc/mapflag/town.txt (renamed from conf/mapflag/town.txt)2
-rw-r--r--npc/mapflag/zone.txt (renamed from conf/mapflag/zone.txt)0
-rw-r--r--npc/merchants/hd_refine.txt318
-rw-r--r--npc/pre-re/scripts.conf (renamed from npc/pre-re/scripts_athena.conf)0
-rw-r--r--npc/pre-re/scripts_main.conf4
-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.txt72
-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_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/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/refine.txt2
-rw-r--r--npc/re/merchants/renters.txt6
-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/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_veins.txt4
-rw-r--r--npc/re/scripts.conf (renamed from npc/re/scripts_athena.conf)1
-rw-r--r--npc/re/scripts_main.conf12
-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/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.conf (renamed from npc/scripts_athena.conf)6
-rw-r--r--npc/scripts_mapflags.conf56
-rw-r--r--npc/warps/guildcastles.txt4
-rw-r--r--npc/warps/pvp.txt2
-rw-r--r--src/char/char.c4
-rw-r--r--src/common/cbasetypes.h18
-rw-r--r--src/common/des.c10
-rw-r--r--src/common/grfio.c14
-rw-r--r--src/common/malloc.c6
-rw-r--r--src/common/mapindex.h2
-rw-r--r--src/common/mmo.h63
-rw-r--r--src/login/account_sql.c4
-rw-r--r--src/login/login.c4
-rw-r--r--src/map/packets.h70
-rw-r--r--src/map/script.c9
-rw-r--r--src/map/skill.h30
268 files changed, 5762 insertions, 3391 deletions
diff --git a/.travis.yml b/.travis.yml
index 8c8e7e66f..9ae3460cb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,10 @@
language: c
compiler:
- - gcc
- clang
-# Change this to your needs
-script: ./configure --enable-debug && make
+ - gcc
+
+script: uname -a && ./configure --enable-debug && make
-# Disallow 'rathena' branch to be compiled by Travis
branches:
only:
- master
diff --git a/conf/channels.conf b/conf/channels.conf
index 3584fc2ea..f17d2aed1 100644
--- a/conf/channels.conf
+++ b/conf/channels.conf
@@ -8,21 +8,23 @@
//=
//= http://hercules.ws/board/
//====================================================
-//= http://hercules.ws/board/topic/316-introducing-hercules-channel-system/
+//================= More Information =================
+// http://hercules.ws/board/topic/316-introducing-hercules-channel-system/
+//====================================================
chsys: (
{
- /* default channels (available on boot) */
+ /* Default Channels (available on boot) */
default_channels: {
/* channel_name : channel_messages_color */
- main: "Orange" /* available as #main */
- support: "Blue" /* available as #support */
- trade: "Red" /* available as #trade */
- offtopic: "Cyan" /* available as #offtopic */
- /* as many channels as you like */
+ main: "Orange" /* Available as #main */
+ support: "Blue" /* Available as #support */
+ trade: "Red" /* Available as #trade */
+ offtopic: "Cyan" /* Available as #offtopic */
+ /* You may add as many channels as you like */
}
- /* colors available */
+ /* Colors Available */
colors: {
- Default: "0xffffff" /* custom channels will use the first in the list unless a font is selected thru @channel */
+ Default: "0xffffff" /* Custom channels use the first color listed unless a font is selected through @channel. */
Red: "0xff0000"
Blue: "0x83cfe9"
Orange: "0xe57c00"
@@ -31,22 +33,25 @@ chsys: (
Green: "0x28bf00"
Light_Green: "0x3dff98"
Normal: "0x00ff00"
- /* as many colors as you like */
+ /* As many colors as you like */
}
- /* allow users to create their own (private) channels through @channels command? */
+ /* Allow users to create their own (private) channels through @channels command? */
/* (must also allow players to use @channels in groups.conf) */
allow_user_channel_creation: true
- /* "map_local_channel" is a instanced channel unique to each map */
+
+ /* "map_local_channel" is a instanced channel unique to each map. */
map_local_channel: true
- map_local_channel_name: "map" /* available as #map */
+ map_local_channel_name: "map" /* Available as #map */
map_local_channel_color: "Yellow"
- map_local_channel_autojoin: true /* can disable autojoin in specific maps through a mapflag or zone */
+ map_local_channel_autojoin: true /* You can disable autojoin in specific maps through a mapflag or zone. */
+
/* "ally_channel" is a channel shared by all your guild allies */
ally_channel_enabled: true
- ally_channel_name: "ally" /* available as #ally */
+ ally_channel_name: "ally" /* Available as #ally */
ally_channel_color: "Green"
- ally_channel_autojoin: true /* will members autojoin to their respective #ally chats when they log-in? */
- /* "irc_channel" is a special channel connected to a specific chat room in any irc network */
+ ally_channel_autojoin: true /* Will members autojoin to their respective #ally chats when they log-in? */
+
+ /* "irc_channel" is a special channel connected to a specific chat room in any irc network. */
irc_channel_enabled: false
irc_channel_name: "irc" /* available as #irc */
irc_channel_color: "Light_Green"
@@ -55,5 +60,4 @@ chsys: (
irc_channel_nick: "Hercules_chSysBot" /* nick the bot will use */
irc_channel_nick_pw: "" /* password to this nick (if any) to identify to nick server on the irc network */
}
-)
-
+) \ No newline at end of file
diff --git a/conf/map-server.conf b/conf/map-server.conf
index d15ef8fa5..446bb0d0e 100644
--- a/conf/map-server.conf
+++ b/conf/map-server.conf
@@ -1,5 +1,5 @@
//--------------------------------------------------------------
-//Hercules Map-Server Configuration File
+// Hercules Map-Server Configuration File
//--------------------------------------------------------------
// Note: "Comments" are all text on the right side of a double slash "//"
diff --git a/conf/messages.conf b/conf/messages.conf
index ac2be835a..e2886a57d 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -1,12 +1,18 @@
-// Hercules messages.conf
-// Message Configuration
-// For translation, just change msg here (second line), no need to modify source code,
-// or alternatively, use conf/import/msg_conf.txt
+//===== Hercules Message Configuration =======================
+//= Hercules messages.conf
+//===== Description: =========================================
+//= This file handles all messages set throughout the server.
+//============================================================
+// For translation, just change msg here (second line),
+// no need to modify source code or alternatively,
+// use conf/import/msg_conf.txt.
+//============================================================
// Format:
// // English message
// msg_number: translated message
+//============================================================
-// 0-410: reserved for GM commands
+// 0-410: reserved for GM commands
// 500-900 reserved for others
// 900-1300: @atcommand
diff --git a/conf/packet.conf b/conf/packet.conf
index 3528d73bb..85996f4e3 100644
--- a/conf/packet.conf
+++ b/conf/packet.conf
@@ -1,11 +1,13 @@
-// Hercules Sockets Configuration file
-// translated (davidsiaw)
-
+//===== Hercules Sockets Configuration =======================
+//= Hercules Sockets Configuration File
+//===== Translated by: =======================================
+// Davidsiaw
+//============================================================
// Display debug reports (When something goes wrong during the report, the report is saved.)
debug: no
-// How long can a socket stall before closing the connection (in seconds)
+// How long can a socket stall before closing the connection (in seconds)?
stall_time: 60
// Maximum allowed size for clients packets in bytes (default: 24576).
diff --git a/doc/atcommands.txt b/doc/atcommands.txt
index b31fe4cef..1e2985f66 100644
--- a/doc/atcommands.txt
+++ b/doc/atcommands.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Atcommand List
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/doc/ea_job_system.txt b/doc/ea_job_system.txt
index 034b4a617..997debf4d 100644
--- a/doc/ea_job_system.txt
+++ b/doc/ea_job_system.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= eAthena Job System
//===== By: ==================================================
//= Skotlex
diff --git a/doc/effect_list.txt b/doc/effect_list.txt
index 19b323cc6..01ea2753b 100644
--- a/doc/effect_list.txt
+++ b/doc/effect_list.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Client Effects List
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt
index 559e49414..fce54b24e 100644
--- a/doc/item_bonus.txt
+++ b/doc/item_bonus.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Hercules Item Bonuses List
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/doc/item_db.txt b/doc/item_db.txt
index 742a27089..6630dd065 100644
--- a/doc/item_db.txt
+++ b/doc/item_db.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Item Database
//===== By: ==================================================
//= Hercules Dev Team
@@ -86,20 +86,21 @@ Upper: Equippable upper-types. Uses the following bitmasks:
Gender: Gender restriction. 0 is female, 1 is male, 2 for both.
Loc: Equipment's placement. Values are:
- 2^13 8192 = Costume Garment/Robe
- 2^12 4096 = Costume Low Headgear
- 2^11 2048 = Costume Mid Headgear
- 2^10 1024 = Costume Top Headgear
- 2^8 256 = Upper Headgear
- 2^9 512 = Middle Headgear
+
2^0 001 = Lower Headgear
- 2^4 016 = Armor
2^1 002 = Weapon
- 2^5 032 = Shield
2^2 004 = Garment
- 2^6 064 = Footgear
2^3 008 = Accessory 1
+ 2^4 016 = Armor
+ 2^5 032 = Shield
+ 2^6 064 = Footgear
2^7 128 = Accessory 2
+ 2^8 256 = Upper Headgear
+ 2^9 512 = Middle Headgear
+ 2^10 1024 = Costume Top Headgear
+ 2^11 2048 = Costume Mid Headgear
+ 2^12 4096 = Costume Low Headgear
+ 2^13 8192 = Costume Garment/Robe
wLV: Weapon level.
diff --git a/doc/map_cache.txt b/doc/map_cache.txt
index 99e54ef06..19ab92a4d 100644
--- a/doc/map_cache.txt
+++ b/doc/map_cache.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Hercules Map Cache Builder and Format Documentation
//===== By: ==================================================
//= DracoRPG
diff --git a/doc/md5_hashcheck.txt b/doc/md5_hashcheck.txt
index 12681f367..a2dbf42fa 100644
--- a/doc/md5_hashcheck.txt
+++ b/doc/md5_hashcheck.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= MD5 Hash Check
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt
index f747e38b0..08abf800d 100644
--- a/doc/mob_db_mode_list.txt
+++ b/doc/mob_db_mode_list.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Hercules Monster Modes Reference
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/doc/packet_struct_notation.txt b/doc/packet_struct_notation.txt
index c1598f3be..0e9c5d055 100644
--- a/doc/packet_struct_notation.txt
+++ b/doc/packet_struct_notation.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Packet Structure Notation
//===== By: ==================================================
//= Ai4rei
diff --git a/doc/permissions.txt b/doc/permissions.txt
index 1dbfd0056..6cfb98897 100644
--- a/doc/permissions.txt
+++ b/doc/permissions.txt
@@ -1,9 +1,9 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Permission List
//===== 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/quest_variables.txt b/doc/quest_variables.txt
index 556210dca..0be144183 100644
--- a/doc/quest_variables.txt
+++ b/doc/quest_variables.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Permanent Quest Variables
//===== By: ==================================================
//= Lupus
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index bf462c812..5fbf652a4 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= Hercules Script Commands
//===== By: ==================================================
//= Hercules Dev Team
@@ -7,22 +7,24 @@
//= Commands are sorted depending on their functionality.
//============================================================
-This document is a reference manual for all the scripting commands and functions
-available in current Hercules GIT. It is not a simple tutorial. When people tell
-you to "Read The F***ing Manual", they mean this.
-
-The information was mostly acquired through looking up how things actually work
-in the source code of the server, which was written by many people over time,
-and lots of them don't speak English and never left any notes - or are otherwise
-not available for comments. As such, anything written in here might not be
-correct, it is only correct to the best of our knowledge, which is limited.
-
-This is not a place to teach you basic programming. This document will not teach
-you basic programming by itself. It's more of a reference for those who have at
-least a vague idea of what they want to do and want to know what tools they have
-available to do it. We've tried to keep it as simple as feasible, but if you
-don't understand it, getting a clear book on programming in general will help
-better than yelling around the forum for help.
+This document is a reference manual for all the scripting commands and
+functions available in current Hercules GIT. It is not a simple tutorial.
+When people tell you to "Read The F***ing Manual", they mean this.
+
+The information was mostly acquired through looking up how things actually
+work in the source code of the server, which was written by many people
+over time, and lots of them don't speak English and never left any notes -
+or are otherwise not available for comments. As such, anything written in
+here might not be correct, it is only correct to the best of our
+knowledge, which is limited.
+
+This is not a place to teach you basic programming. This document will not
+teach you basic programming by itself. It's more of a reference for those
+who have at least a vague idea of what they want to do and want to know
+what tools they have available to do it. We've tried to keep it as simple
+as feasible, but if you don't understand it, getting a clear book on
+programming in general will help better than yelling around the forum for
+help.
A little learning never caused anyone's head to explode.
@@ -35,53 +37,55 @@ The commands and functions are listed in no particular order:
Descriptive text
- Small example if possible. Will usually be incomplete, it's there just to
- give you an idea of how it works in practice.
+ Small example if possible. Will usually be incomplete, it's there just
+ to give you an idea of how it works in practice.
To find a specific command, use Ctrl+F, (or whatever keys call up a search
-function in whatever you're reading this with) put an * followed by the command
-name, and it should find the command description for you.
+function in whatever you're reading this with) put an * followed by the
+command name, and it should find the command description for you.
-If you find anything omitted, please respond. :)
+If you find anything omitted, please tell us. :)
Syntax
------
-Throughout this document, wherever a command wants an argument, it is given in
-<angle brackets>. This doesn't mean you should type the angle brackets. :) If an
-argument of a command is optional, it is given in {curly brackets}. You've
-doubtlessly seen this convention somewhere, if you didn't, get used to it,
-that's how big boys do it. If a command can optionally take an unspecified
-number of arguments, you'll see a list like this:
+Throughout this document, wherever a command wants an argument, it is
+given in <angle brackets>. This doesn't mean you should type the angle
+brackets. :) If an argument of a command is optional, it is given in
+{curly brackets}. You've doubtlessly seen this convention somewhere, if
+you didn't, get used to it, that's how big boys do it. If a command can
+optionally take an unspecified number of arguments, you'll see a list like
+this:
command <argument>{,<argument>...<argument>}
This still means they will want to be separated by commas.
-Where a command wants a string, it will be given in "quotes", if it's a number,
-it will be given without them. Normally, you can put an expression, like a bunch
-of functions or operators returning a value, in (round brackets) instead of most
-numbers. Round brackets will not always be required, but they're often a good
-idea.
+Where a command wants a string, it will be given in "quotes", if it's a
+number, it will be given without them. Normally, you can put an
+expression, like a bunch of functions or operators returning a value, in
+(round brackets) instead of most numbers. Round brackets will not always
+be required, but they're often a good idea.
-Wherever you refer to a map name, it's always 'mapname' or 'mapname.gat'
+Wherever you refer to a map name, it's always 'mapname' or 'mapname.gat'
(Please, don't use .gat suffix anymore. It's useless.)
Script loading structure
------------------------
-Scripts are loaded by the map server as referenced in the 'conf/map-server.conf'
-configuration file, but in the default configuration, it doesn't load any script
-files itself. Instead, it loads the file 'npc/scripts_main.conf' which itself
-contains references to other files. The actual scripts are loaded from txt
-files, which are linked up like this:
+Scripts are loaded by the map server as referenced in the
+'conf/map-server.conf' configuration file, but in the default
+configuration, it doesn't load any script files itself. Instead, it loads
+the file 'npc/scripts_main.conf' which itself contains references to other
+files. The actual scripts are loaded from txt files, which are linked up
+like this:
npc: <path to a filename>
-Any line like this, invoked, ultimately, by 'map-server.conf' will load up the
-script contained in this file, which will make the script available. No file
-will get loaded twice, to prevent possible errors.
+Any line like this, invoked, ultimately, by 'map-server.conf' will load up
+the script contained in this file, which will make the script available.
+No file will get loaded twice, to prevent possible errors.
Another configuration file option of relevance is:
@@ -90,14 +94,14 @@ delnpc: <path to a filename>
This will unload a specified script filename from memory, which, while
seemingly useless, may sometimes be required.
-Whenever '//' is encountered in a line upon reading, everything beyond this on
-that line is considered to be a comment and is ignored. This works wherever you
-place it.
+Whenever '//' is encountered in a line upon reading, everything beyond
+this on that line is considered to be a comment and is ignored. This works
+wherever you place it.
// This line will be ignored when processing the script.
-Block comments can also be used, where you can place /* and */ between any text you
-wish Hercules to ignore.
+Block comments can also be used, where you can place /* and */ between any
+text you wish Hercules to ignore.
Example:
/* This text,
@@ -105,23 +109,25 @@ Example:
* is ignored, until the following
* symbol is encountered: */
-The asterisks (*) in front of each line is a personal preference, and is not required.
-
-Upon loading all the files, the server will execute all the top-level commands
-in them. No variables exist yet at this point, no commands can be called other
-than those given in this section. These commands set up the basic server script
-structure - create NPC objects, spawn monster objects, set map flags, etc. No
-code is actually executed at this point except them. The top-level commands the
-scripting are pretty confusing, since they aren't structured like you would
-expect commands, command name first, but rather, normally start with a map name.
-
-What's more confusing about the top-level commands is that most of them use a
-tab symbol to divide their arguments.
-
-To prevent problems and confusion, the tab symbols are written as '%TAB%' or '<TAB>'
-throughout this document, even though this makes the text a bit less readable.
-Using an invisible symbol to denote arguments is one of the bad things about
-this language, but we're stuck with it for now. :)
+The asterisks (*) in front of each line is a personal preference, and is
+not required.
+
+Upon loading all the files, the server will execute all the top-level
+commands in them. No variables exist yet at this point, no commands can be
+called other than those given in this section. These commands set up the
+basic server script structure - create NPC objects, spawn monster objects,
+set map flags, etc. No code is actually executed at this point except
+them. The top-level commands the scripting are pretty confusing, since
+they aren't structured like you would expect commands, command name first,
+but rather, normally start with a map name.
+
+What's more confusing about the top-level commands is that most of them
+use a tab symbol to divide their arguments.
+
+To prevent problems and confusion, the tab symbols are written as '%TAB%'
+or '<TAB>' throughout this document, even though this makes the text a bit
+less readable. Using an invisible symbol to denote arguments is one of the
+bad things about this language, but we're stuck with it for now. :)
Here is a list of valid top-level commands:
@@ -129,55 +135,57 @@ Here is a list of valid top-level commands:
<map name>%TAB%mapflag%TAB%<flag>
-This will, upon loading, set a specified map flag on a map you like. These are
-normally in files inside 'conf/mapflag' and are loaded first, so by the time the
-server's up, all the maps have the flags they should have. Map flags determine
-the behavior of the map regarding various common problems, for a better
-explanation, see 'setmapflag'.
+This will, upon loading, set a specified map flag on a map you like. These
+are normally in files inside 'npc/mapflag' and are loaded first, so by the
+time the server's up, all the maps have the flags they should have. Map
+flags determine the behavior of the map regarding various common problems,
+for a better explanation, see 'setmapflag'.
** Create a permanent monster spawn:
<map name>,<x>,<y>,<xs>,<ys>%TAB%monster%TAB%<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event>{,<mob size>,<mob ai>}
-Map name is the name of the map the monsters will spawn on. x,y are the
-coordinates where the mob should spawn. If xs and ys are non-zero, they
-specify the 'radius' of a spawn-rectangle area centered at x,y.
-Putting zeros instead of these coordinates will spawn the monsters randomly.
-Note this is only the initial spawn zone, as mobs random-walk, they are free
-to move away from their specified spawn region.
-
-Monster name is the name the monsters will have on screen, and has no relation
-whatsoever to their names anywhere else. It's the mob id that counts, which
-identifies monster record in 'mob_db.txt' database of monsters. If the mob name
-is given as "--ja--", the 'japanese name' field from the monster database is
-used, (which, in Hercules, actually contains an English name) if it's "--en--",
-it's the 'english name' from the monster database (which contains an uppercase
-name used to summon the monster with a GM command).
+Map name is the name of the map the monsters will spawn on. x,y are the
+coordinates where the mob should spawn. If xs and ys are non-zero, they
+specify the 'radius' of a spawn-rectangle area centered at x,y. Putting
+zeros instead of these coordinates will spawn the monsters randomly. Note
+this is only the initial spawn zone, as mobs random-walk, they are free to
+move away from their specified spawn region.
+
+Monster name is the name the monsters will have on screen, and has no
+relation whatsoever to their names anywhere else. It's the mob id that
+counts, which identifies monster record in 'mob_db.txt' database of
+monsters. If the mob name is given as "--ja--", the 'japanese name' field
+from the monster database is used, (which, in Hercules, actually contains
+an English name) if it's "--en--", it's the 'english name' from the
+monster database (which contains an uppercase name used to summon the
+monster with a GM command).
Amount is the amount of monsters that will be spawned when this command is
executed, it is affected by spawn rates in 'battle.conf'.
-Delay1 and delay2 control monster respawn delays - the first one is the fixed
-base respawn time, and the second is random variance on top of the base time.
-Both values are given in milliseconds (1000 = 1 second).
-Note that the server also enforces a minimum respawn delay of 5 seconds.
+Delay1 and delay2 control monster respawn delays - the first one is the
+fixed base respawn time, and the second is random variance on top of the
+base time. Both values are given in milliseconds (1000 = 1 second). Note
+that the server also enforces a minimum respawn delay of 5 seconds.
-You can specify a custom level to use for the mob different from the one of
-the database by adjoining the level after the name with a comma. eg:
+You can specify a custom level to use for the mob different from the one
+of the database by adjoining the level after the name with a comma. eg:
"Poring,50" for a name will spawn a monster with name Poring and level 50.
-Event is a script event to be executed when the mob is killed. The event must
-be in the form "NPCName::OnEventName" to execute, and the event name label
-should start with "On". As with all events, if the NPC is an on-touch NPC, the
-player who triggers the script must be within 'trigger' range for the event to
-work.
+Event is a script event to be executed when the mob is killed. The event
+must be in the form "NPCName::OnEventName" to execute, and the event name
+label should start with "On". As with all events, if the NPC is an
+on-touch NPC, the player who triggers the script must be within 'trigger'
+range for the event to work.
-There are two optional fields for monster size and AI. Size can be 0 (medium),
-1 (small), or 2 (big). AI can be 0 (default), 1 (attack/friendly), 2 (sphere),
-3 (flora), or 4 (zanzou).
+There are two optional fields for monster size and AI. Size can be 0
+(medium), 1 (small), or 2 (big). AI can be 0 (default), 1
+(attack/friendly), 2 (sphere), 3 (flora), or 4 (zanzou).
-Alternately, a monster spawned using 'boss_monster' instead of 'monster' is able
-to be detected on the map with the SC_BOSSMAPINFO status (used by Convex Mirror).
+Alternately, a monster spawned using 'boss_monster' instead of 'monster'
+is able to be detected on the map with the SC_BOSSMAPINFO status (used by
+Convex Mirror, item ID# 12214).
** NPC names
@@ -187,13 +195,14 @@ NPC names are kinda special and are formatted this way:
<Display name>{::<Unique name>}
-All NPCs need to have a unique name that is used for identification purposes.
-When you have to identify a NPC by it's name, you should use <Unique name>.
-If <Unique name> is not provided, use <Display name> instead.
+All NPCs need to have a unique name that is used for identification
+purposes. When you have to identify a NPC by it's name, you should use
+<Unique name>. If <Unique name> is not provided, use <Display name>
+instead.
-The client has a special feature when displaying names:
-if the display name contains a '#' character, it hides that part of the name.
-ex: if your NPC is named 'Hunter#hunter1', it will be displayed as 'Hunter'
+The client has a special feature when displaying names: if the display
+name contains a '#' character, it hides that part of the name.
+Ex: if your NPC is named 'Hunter#hunter1', it will be displayed as 'Hunter'
<Display name> must be at most 24 characters in length.
<Unique name> must be at most 24 characters in length.
@@ -202,16 +211,16 @@ ex: if your NPC is named 'Hunter#hunter1', it will be displayed as 'Hunter'
<from map name>,<fromX>,<fromY>,<facing>%TAB%warp%TAB%<warp name>%TAB%<spanx>,<spany>,<to map name>,<toX>,<toY>
-This will define a warp NPC that will warp a player between maps, and while most
-arguments of that are obvious, some deserve special mention.
+This will define a warp NPC that will warp a player between maps, and
+while most arguments of that are obvious, some deserve special mention.
-SpanX and SpanY will make the warp sensitive to a character who didn't step
-directly on it, but walked into a zone which is centered on the warp from
-coordinates and is SpanX in each direction across the X axis and SpanY in each
-direction across the Y axis.
+SpanX and SpanY will make the warp sensitive to a character who didn't
+step directly on it, but walked into a zone which is centered on the warp
+from coordinates and is SpanX in each direction across the X axis and
+SpanY in each direction across the Y axis.
-Warp NPC objects also have a name, because you can use it to refer to them later
-with 'enablenpc'/'disablenpc'
+Warp NPC objects also have a name, because you can use it to refer to them
+later with 'enablenpc'/'disablenpc'.
Facing of a warp object is irrelevant, it is not used in the code and all
current scripts have a zero in there.
@@ -221,41 +230,42 @@ current scripts have a zero in there.
<map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,{<code>}
<map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>,{<code>}
-This will place an NPC object on a specified map at the specified location, and
-is a top-level command you will use the most in your custom scripting. The NPCs
-are triggered by clicking on them, and/or by walking in their trigger area, if
-defined, see that below.
-
-Facing is a direction the NPC sprite will face in. Not all NPC sprites have
-different images depending on the direction you look from, so for some facing
-will be meaningless. Facings are counted counterclockwise in increments of 45
-degrees, where 0 means facing towards the top of the map. (So to turn the sprite
-towards the bottom of the map, you use facing 4, and to make it look southeast
-it's facing 5.)
-
-Sprite id is the sprite number used to display this particular NPC. For a full
-list of sprite id numbers see http://kalen.s79.xrea.com/npc/npce.shtml You may
-also use a monster's ID number instead to display a monster sprite for this NPC.
-It is possible to use a job sprite as well, but you must first define it as a
-monster sprite in 'mob_avail.txt', a full description on how to do this is not
-in the scope of this manual.
+This will place an NPC object on a specified map at the specified
+location, and is a top-level command you will use the most in your custom
+scripting. The NPCs are triggered by clicking on them, and/or by walking
+in their trigger area, if defined. See that below.
+
+Facing is a direction the NPC sprite will face in. Not all NPC sprites
+have different images depending on the direction you look from, so for
+some facing will be meaningless. Facings are counted counterclockwise in
+increments of 45 degrees, where 0 means facing towards the top of the map.
+(So to turn the sprite towards the bottom of the map, you use facing 4,
+and to make it look southeast it's facing 5.)
+
+Sprite id is the sprite number used to display this particular NPC. For a
+full list of sprite id numbers see http://kalen.s79.xrea.com/npc/npce.shtml
+You may also use a monster's ID number instead to display a monster sprite
+for this NPC. It is possible to use a job sprite as well, but you must
+first define it as a monster sprite in 'mob_avail.txt', a full description
+on how to do this is not in the scope of this manual.
A '-1' sprite id will make the NPC invisible (and unclickable).
-A '111' sprite id will make an NPC which does not have a sprite, but is still
-clickable, which is useful if you want to make a clickable object of the 3D
-terrain.
+A '111' sprite id will make an NPC which does not have a sprite, but is
+still clickable, which is useful if you want to make a clickable object of
+the 3D terrain.
TriggerX and triggerY, if given, will define an area, centered on NPC and
spanning triggerX cells in every direction across X and triggerY in every
direction across Y. Walking into that area will trigger the NPC. If no
-'OnTouch:' special label is present in the NPC code, the execution will start
-from the beginning of the script, otherwise, it will start from the 'OnTouch:'
-label. Monsters can also trigger the NPC, though the label 'OnTouchNPC:' is
-used in this case.
+'OnTouch:' special label is present in the NPC code, the execution will
+start from the beginning of the script, otherwise, it will start from the
+'OnTouch:' label. Monsters can also trigger the NPC, though the label
+'OnTouchNPC:' is used in this case.
The code part is the script code that will execute whenever the NPC is
-triggered. It may contain commands and function calls, descriptions of which
-compose most of this document. It has to be in curly brackets, unlike elsewhere
-where we use curly brackets, these do NOT signify an optional parameter.
+triggered. It may contain commands and function calls, descriptions of
+which compose most of this document. It has to be in curly brackets,
+unlike elsewhere where we use curly brackets, these do NOT signify an
+optional parameter.
** Define a 'floating' NPC object.
@@ -263,30 +273,30 @@ where we use curly brackets, these do NOT signify an optional parameter.
This will define an NPC object not triggerable by normal means. This would
normally mean it's pointless since it can't do anything, but there are
-exceptions, mostly related to running scripts at specified time, which is what
-these floating NPC objects are for. More on that below.
+exceptions, mostly related to running scripts at specified time, which is
+what these floating NPC objects are for. More on that below.
** Define a shop/cashshop NPC.
-%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}
<map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}
-This will define a shop NPC, which, when triggered (which can only be done by
-clicking) will cause a shop window to come up. No code whatsoever runs in shop
-NPCs and you can't change the prices otherwise than by editing the script
-itself. (No variables even exist at this point of scripting, so don't even
-bother trying to use them.)
-
-The item id is the number of item in the 'item_db.txt' database. If Price is set
-to -1, the 'buy price' given in the item database will be used. Otherwise, the
-price you gave will be used for this item, which is how you create differing
-prices for items in different shops.
-
-You can alternatively use "cashshop" in place of "shop" to use the Cash Shop
-interface, allowing you to buy items with special points (Currently stored as
-account vars in global_reg #CASHPOINTS and #KAFRAPOINTS).
-This type of shop will not allow you to sell items at it, you may only
-purchase items here. The layout used to define sale items still count, and
+This will define a shop NPC, which, when triggered (which can only be done
+by clicking) will cause a shop window to come up. No code whatsoever runs
+in shop NPCs and you can't change the prices otherwise than by editing the
+script itself (no variables even exist at this point of scripting, so
+don't even bother trying to use them).
+
+The item id is the number of item in the 'item_db.txt' database. If Price
+is set to -1, the 'buy price' given in the item database will be used.
+Otherwise, the price you gave will be used for this item, which is how you
+create differing prices for items in different shops.
+
+You can alternatively use "cashshop" in place of "shop" to use the Cash
+Shop interface, allowing you to buy items with special points (Currently
+stored as account vars in global_reg #CASHPOINTS and #KAFRAPOINTS). This
+type of shop will not allow you to sell items at it, you may only purchase
+items here. The layout used to define sale items still count, and
"<price>" refers to how many points will be spent purchasing the them.
** Define an warp/shop/cashshop/NPC duplicate.
@@ -301,25 +311,25 @@ This will duplicate an warp/shop/cashshop/NPC referred to by 'label'.
Warp duplicates inherit the target location.
Shop/cashshop duplicates inherit the item list.
NPC duplicates inherit the script code.
-The rest (name, location, facing, sprite ID, span/trigger area)
-is obtained from the definition of the duplicate (not inherited).
+The rest (name, location, facing, sprite ID, span/trigger area) is
+obtained from the definition of the duplicate (not inherited).
** Define a function object
function%TAB%script%TAB%<function name>%TAB%{<code>}
-This will define a function object, callable with the 'callfunc' command (see
-below). This object will load on every map server separately, so you can get at
-it from anywhere. It's not possible to call the code in this object by
-anything other than the 'callfunc' script command.
-
-The code part is the script code that will execute whenever the function is
-called with 'callfunc'. It has to be in curly brackets, unlike elsewhere where
-we use curly brackets, these do NOT signify an optional parameter.
+This will define a function object, callable with the 'callfunc' command
+(see below). This object will load on every map server separately, so you
+can get at it from anywhere. It's not possible to call the code in this
+object by anything other than the 'callfunc' script command.
+The code part is the script code that will execute whenever the function
+is called with 'callfunc'. It has to be in curly brackets, unlike
+elsewhere where we use curly brackets, these do NOT signify an optional
+parameter.
Once an object is defined which has a 'code' field to it's definition, it
-contains script commands which can actually be triggered and executed.
+contains script commands which can actually be triggered and executed.
~ RID? GID? ~
@@ -328,82 +338,83 @@ What a RID is and why do you need to know
Most scripting commands and functions will want to request data about a
character, store variables referenced to that character, send stuff to the
-client connected to that specific character. Whenever a script is invoked by a
-character, it is passed a so-called RID - this is the account ID number of a
-character that caused the code to execute by clicking on it, walking into it's
-OnTouch zone, or otherwise.
-
-If you are only writing common NPCs, you don't need to bother with it. However,
-if you use functions, if you use timers, if you use clock-based script
-activation, you need to be aware of all cases when a script execution can be
-triggered without a RID attached. This will make a lot of commands and functions
-unusable, since they want data from a specific character, want to send stuff to
-a specific client, want to store variables specific to that character, and they
-would not know what character to work on if there's no RID.
-
-Unless you use 'attachrid' to explicitly attach a character to the script first.
+client connected to that specific character. Whenever a script is invoked
+by a character, it is passed a so-called RID - this is the account ID
+number of a character that caused the code to execute by clicking on it,
+walking into it's OnTouch zone, or otherwise.
+
+If you are only writing common NPCs, you don't need to bother with it.
+However, if you use functions, if you use timers, if you use clock-based
+script activation, you need to be aware of all cases when a script
+execution can be triggered without a RID attached. This will make a lot of
+commands and functions unusable, since they want data from a specific
+character, want to send stuff to a specific client, want to store
+variables specific to that character, and they would not know what
+character to work on if there's no RID.
+
+Unless you use 'attachrid' to explicitly attach a character to the script
+first (see player-related commands).
Whenever we say 'invoking character', we mean 'the character who's RID is
-attached to the running script. The script function "playerattached" can be
-used to check which is the currently attached player to the script (it will
-return 0 if the there is no player attached or the attached player no longer
-is logged on to the map-server).
+attached to the running script. The script function "playerattached" can
+be used to check which is the currently attached player to the script (it
+will return 0 if the there is no player attached or the attached player no
+longer is logged on to the map-server).
But what about GID?
--- ---- ----- ----
-GID stands for the Game ID of something, this can either be the GID obtained
-through mobspawn (mob control commands) or the account ID of a character.
-Another way would be to right click on a mob,
-NPC or char as GM sprited char to view the GID.
-
-This is mostly used for the new version of skill and the mob control commands
-implemented (but NEVER documented by Lance. Shame on you...).
+GID stands for the Game ID of something, this can either be the GID of a
+mob obtained through the monster script command (if only summoned one),
+the GID of a NPC obtained through the getnpcid script command or the
+account ID of a character (same as its RID). Another way would be to right
+click on a mob, NPC or char as GM sprited char to view its GID.
Item and pet scripts
--------------------
-Each item in the item database has three special fields - Script , OnEquip_Script
-and OnUnequip_Script. The first is script code run every time a character equips the item,
-with the RID of the equipping character. Every time they unequip an item, all
-temporary bonuses given by the script commands are cleared, and all the scripts
-are executed once again to rebuild them. This also happens in several other
-situations (like upon login) but the full list is currently unknown.
+Each item in the item database has three special fields - Script,
+OnEquip_Script and OnUnequip_Script. The first is script code run every
+time a character equips the item, with the RID of the equipping character.
+Every time they unequip an item, all temporary bonuses given by the script
+commands are cleared, and all the scripts are executed once again to
+rebuild them. This also happens in several other situations (like upon
+login) but the full list is currently unknown.
-OnEquip_Script is a piece of script code run whenever the item is used by a character
-by double-clicking on it. OnUnequip_Script runs whenever the
-equipment is unequip by a character
+OnEquip_Script is a piece of script code run whenever the item is used by
+a character by double-clicking on it. OnUnequip_Script runs whenever the
+equipment is unequipped by a character.
-Not all script commands work properly in the item scripts. Where commands and
-functions are known to be meant specifically for use in item scripts, they are
-described as such.
+Not all script commands work properly in the item scripts. Where commands
+and functions are known to be meant specifically for use in item scripts,
+they are described as such.
Every pet in the pet database has a PetScript field, which determines pet
-behavior. It is invoked wherever a pet of the specified type is spawned.
-(hatched from an egg, or loaded from the char server when a character who had
-that pet following them connects) This may occur in some other situations as
-well. Don't expect anything other than commands definitely marked as usable in
-pet scripts to work in there reliably.
+behavior. It is invoked wherever a pet of the specified type is spawned
+(hatched from an egg, or loaded from the char server when a character who
+had that pet following them connects). This may occur in some other
+situations as well. Don't expect anything other than commands definitely
+marked as usable in pet scripts to work in there reliably.
Numbers
-------
-Beside the common decimal numbers, which are nothing special whatsoever (though
-do not expect to use fractions, since ALL numbers are integer in this language),
-the script engine also handles hexadecimal numbers, which are otherwise
-identical. Writing a number like '0x<hex digits>' will make it recognized as a
-hexadecimal value. Notice that 0x10 is equal to 16. Also notice that if you try
-to 'mes 0x10' it will print '16'.
+Beside the common decimal numbers, which are nothing special whatsoever
+(though do not expect to use fractions, since ALL numbers are integer in
+this language), the script engine also handles hexadecimal numbers, which
+are otherwise identical. Writing a number like '0x<hex digits>' will make
+it recognized as a hexadecimal value. Notice that 0x10 is equal to 16.
+Also notice that if you try to 'mes 0x10' it will print '16'.
This is not used much, but it pays to know about it.
Variables
---------
-The meat of every programming language is variables - places where you store
-data.
+The meat of every programming language is variables - places where you
+store data.
-In the Hercules scripting language, variable names are not case sensitive.
+In Hercules scripting language, variable names are not case sensitive.
Variables are divided into and uniquely identified by the combination of:
prefix - determines the scope and extent (or lifetime) of the variable
@@ -423,51 +434,45 @@ permanent - They still exist when the server resets.
temporary - They cease to exist when the server resets.
Prefix: scope and extent
-nothing - A permanent variable attached to the character, the default variable
- type. They are stored with all the account data in "save\athena.txt"
- in TXT versions and in the SQL versions in the `global_reg_value`
- table using type 3.
-"@" - A temporary variable attached to the character.
- SVN versions before 2094 revision and RC5 version will also treat
- 'l' as a temporary variable prefix, so beware of having variable
- names starting with 'l' if you want full backward compatibility.
-"$" - A global permanent variable.
- They are stored in "save\mapreg.txt" or database table `mapreg`,
- depending on server type.
+nothing - A permanent variable attached to the character, the default
+ variable type. They are stored with all the account data in the
+ `global_reg_value` table using type 3.
+"@" - A temporary variable attached to the character.
+ They disappear when the character logs out.
+"$" - A global permanent variable.
+ They are stored in database table `mapreg`.
"$@" - A global temporary variable.
- This is important for scripts which are called with no RID
+ Thhey are important for scripts which are called with no RID
attached, that is, not triggered by a specific character object.
"." - A NPC variable.
- They exist in the NPC and disappear when the server restarts or the
- NPC is reloaded. Can be accessed from inside the NPC or by calling
- 'getvariableofnpc'. Function objects can also have .variables which
- are accessible from inside the function, however 'getvariableofnpc'
- does NOT work on function objects.
+ They exist in the NPC and disappear when the server restarts or
+ the NPC is reloaded. Can be accessed from inside the NPC or by
+ calling 'getvariableofnpc'. Function objects can also have
+ .variables which are accessible from inside the function,
+ however 'getvariableofnpc' does NOT work on function objects.
".@" - A scope variable.
- They are unique to the instance and scope. Each instance has it's
- own scope that ends when the script ends. Calling a function with
- callsub/callfunc starts a new scope, returning from the function
- ends it. When a scope ends, it's variables are converted to values
- ('return .@var;' returns a value, not a reference).
-"'" - An instance variable
- These are used with the instancing system, and are unique to each
- party's instance.
+ They are unique to the instance and scope. Each instance has
+ its own scope that ends when the script ends. Calling a
+ function with callsub/callfunc starts a new scope, returning
+ from the function ends it. When a scope ends, it's variables
+ are converted to values ('return .@var;' returns a value, not a
+ reference).
+"'" - An instance variable.
+ These are used with the instancing system, and are unique to
+ each party's instance.
"#" - A permanent local account variable.
- They are stored with all the account data in "save\accreg.txt" in
- TXT versions and in the SQL versions in the 'global_reg_value'
- table using type 2.
-"##" - A permanent global account variable stored by the login server.
- They are stored in "save\account.txt" and in the SQL versions in the
- 'global_reg_value' table, using type 1. The only difference you will
- note from normal # variables is when you have multiple char-servers
- connected to the same login server. The # variables are unique to
- each char-server, while the ## variables are shared by all these
- char-servers.
+ They are stored in the 'global_reg_value' table using type 2.
+"##" - A permanent global account variable stored by the login server.
+ They are stored in the 'global_reg_value' table, using type 1.
+ The only difference you will note from normal # variables is
+ when you have multiple char-servers connected to the same
+ login-server. The # variables are unique to each char-server,
+ while the ## variables are shared by all these char-servers.
Postfix: integer or string
-nothing - integer variable, can store positive and negative numbers, but only
- whole numbers (so don't expect to do any fractional math)
-'$' - string variable, can store text
+nothing - integer variable, can store positive and negative numbers, but
+ only whole numbers (so don't expect to do any fractional math).
+'$' - string variable, can store text.
Examples:
name - permanent character integer variable
@@ -490,14 +495,15 @@ $@name$ - temporary global string variable
If a variable was never set, it is considered to equal zero for integer
variables or an empty string ("", nothing between the quotes) for string
variables. Once you set it to that, the variable is as good as forgotten
-forever, and no trace remains of it even if it was stored with character or
-account data.
+forever, and no trace remains of it even if it was stored with character
+or account data.
-Some variables are special, that is, they are already defined for you by the
-scripting engine. You can see the full list somewhere in 'db/const.txt', which
-is a file you should read, since it also allows you to replace lots of numbered
-arguments for many commands with easier to read text. The special variables most
-commonly used are all permanent character-based variables:
+Some variables are special, that is, they are already defined for you by
+the scripting engine. You can see the full list somewhere in
+'db/const.txt', which is a file you should read, since it also allows you
+to replace lots of numbered arguments for many commands with easier to
+read text. The special variables most commonly used are all permanent
+character-based variables:
Zeny - Amount of Zeny.
Hp - Current amount of hit points.
@@ -510,48 +516,51 @@ BaseLevel - Character's base level.
JobLevel - Character's job level.
BaseExp - Amount of base experience points.
JobExp - Amount of job experience points.
-NextBaseExp - Amount of base experience points needed to reach the next level.
-NextJobExp - Amount of job experience points needed to reach the next level.
+NextBaseExp - Amount of base experience points needed to reach next level.
+NextJobExp - Amount of job experience points needed to reach next level.
Weight - Amount of weight the character currently carries.
MaxWeight - Maximum weight the character can carry.
Sex - 0 if female, 1 if male.
Class - Character's job.
-Upper - 0 if the character is a normal class, 1 if advanced, 2 if baby.
+Upper - 0 if the character is normal class, 1 if advanced, 2 if baby.
BaseClass - The character's 1-1 'normal' job, regardless of Upper value.
- For example, this will return Job_Acolyte for Acolyte, Priest/Monk,
- High Priest/Champion, and Arch Bishop/Sura. If the character has not
- reached a 1-1 class, it will return Job_Novice.
+ For example, this will return Job_Acolyte for Acolyte,
+ Priest/Monk, High Priest/Champion, and Arch Bishop/Sura.
+ If the character has not reached a 1-1 class, it will return
+ Job_Novice.
BaseJob - The character's 'normal' job, regardless of Upper value.
For example, this will return Job_Acolyte for Acolyte,
Baby Acolyte, and High Acolyte.
-Karma - The character's karma. Karma system is not fully functional, but
- this doesn't mean this doesn't work at all. Not tested.
-Manner - The character's manner rating. Becomes negative if the player
- utters words forbidden through the use of 'manner.txt' client-side
- file.
-
-While these behave as variables, do not always expect to just set them - it is
-not certain whether this will work for all of them. Whenever there is a command
-or a function to set something, it's usually preferable to use that instead. The
-notable exception is Zeny, which you can and often will address directly -
-setting it will make the character own this number of Zeny.
-If you try to set Zeny to a negative number, the script will be terminated with an error.
+Karma - The character's karma. Karma system is not fully functional,
+ but this doesn't mean this doesn't work at all. Not tested.
+Manner - The character's manner rating. Becomes negative if the
+ player utters words forbidden through the use of
+ 'manner.txt' client-side file.
+
+While these behave as variables, do not always expect to just set them -
+it is not certain whether this will work for all of them. Whenever there
+is a command or a function to set something, it's usually preferable to
+use that instead. The notable exception is Zeny, which you can and often
+will address directly - setting it will make the character own this number
+of Zeny. If you try to set Zeny to a negative number, the script will be
+terminated with an error.
Assigning variables
--------- ---------
-Variables can be accessed and assigned values directly without the use of the built-in
-'set' function. This means that variables can be accessed and modified much like other
-programming languages.
+Variables can be accessed and assigned values directly without the use of
+the built-in 'set' function. This means that variables can be accessed and
+modified much like other programming languages.
@x = 100;
@x = @y = 100;
-Support for modifying variable values using 'set' is still supported (and required
-to exist for this new method to work) so previous scripts will continue to work.
+Support for modifying variable values using 'set' is still supported (and
+required to exist for this method to work) so previous scripts will
+continue working.
-When assigning values, all operator methods are supported which exist in the below
-'Operators' section. For instance:
+When assigning values, all operator methods are supported which exist in
+the below 'Operators' section. For instance:
@x += 100;
@x -= 100;
@@ -561,58 +570,59 @@ When assigning values, all operator methods are supported which exist in the bel
@x >>= 2;
@x <<= 2;
-Will all work. For more information on available operators, see the Operators section
-described below. All operators listed there may be placed in-front of the '=' sign
-when modifying variables to perform the action as required.
+Will all work. For more information on available operators, see the
+Operators section described below. All operators listed there may be
+placed in-front of the '=' sign when modifying variables to perform the
+action as required.
Note:
- !! Currently the scripting engine does not support directly copying array variables.
- !! In order to copy arrays between variables the use of 'copyarray' function is still
- !! required.
+ !! Currently the scripting engine does not support directly copying array
+ !! variables. In order to copy arrays between variables the use of
+ !! 'copyarray' function is still required.
Strings
-------
-To include symbol '"' in a string you should use prefix '\"'
+To include symbol '"' in a string you should use prefix '\"'.
Arrays
------
-Arrays (in Hercules at least) are essentially a set of variables going under the
-same name. You can tell between the specific variables of an array with an
-'array index', a number of a variable in that array:
+Arrays (in Hercules at least) are essentially a set of variables going
+under the same name. You can tell between the specific variables of an
+array with an 'array index', a number of a variable in that array:
<variable name>[<array index>]
-Variables stored in this way, inside an array, are also called 'array elements'.
-Arrays are specifically useful for storing a set of similar data (like several
-item IDs for example) and then looping through it. You can address any array
-variable as if it was a normal variable:
+Variables stored in this way, inside an array, are also called 'array
+elements'. Arrays are specifically useful for storing a set of similar
+data (like several item IDs for example) and then looping through it. You
+can address any array variable as if it was a normal variable:
set @arrayofnumbers[0],1;
-You can also do sneaky things like using a variable (or an expression, or even a
-value from an another array) to get at an array value:
+You can also do sneaky things like using a variable (or an expression, or
+even a value from an another array) to get at an array value:
set @x,100;
set @arrayofnumbers[@x],10;
This will make @arrayofnumbers[100] equal to 10.
-Notice that index numbering always starts with 0. Arrays cannot hold more than
-128 variables. (So the last one can't have a number higher than 127)
+Notice that index numbering always starts with 0. Arrays cannot hold more
+than 128 variables (so the last one can't have a number higher than 127).
-And array indexes probably can't be negative. Nobody tested what happens when
-you try to get a negatively numbered variable from an array, but it's not going
-to be pretty. :)
+And array indexes probably can't be negative. Nobody tested what happens
+when you try to get a negatively numbered variable from an array, but it's
+not going to be pretty. :)
Arrays can naturally store strings:
-@menulines$[0] is the 0th element of the @menulines$ array of strings. Notice
-the '$', normally denoting a string variable, before the square brackets that
-denotes an array index.
+@menulines$[0] is the 0th element of the @menulines$ array of strings.
+Notice the '$', normally denoting a string variable, before the square
+brackets that denotes an array index.
Resume of the allowed variable and array scopes
------ -- --- ------- -------- --- ----- ------
@@ -659,12 +669,13 @@ Variable References
Operators
---------
-Operators are things you can do to variables and numbers. They are either the
-common mathematical operations or conditional operators
+Operators are things you can do to variables and numbers. They are either
+the common mathematical operations or conditional operators:
-+ - will add two numbers. If you try to add two strings, the result will be a
- string glued together at the +. You can add a number to a string, and the
- result will be a string. No other math operators work with strings.
++ - will add two numbers. If you try to add two strings, the result will
+ be a string glued together at the +. You can add a number to a string,
+ and the result will be a string. No other math operators work with
+ strings.
- - will subtract two numbers.
* - will multiply two numbers.
/ - will divide two numbers. Note that this is an integer division, i.e.
@@ -672,20 +683,22 @@ common mathematical operations or conditional operators
% - will give you the remainder of the division. 7%2 is equal to 1.
There are also conditional operators. This has to do with the conditional
-command 'if' and they are meant to return either 1 if the condition is satisfied
-and 0 if it isn't. (That's what they call 'boolean' variables. 0 means 'False'.
-Anything except the zero is 'True' Odd as it is, -1 and -5 and anything below
-zero will also be True.)
-
-You can compare numbers to each other and you compare strings to each other, but
-you can not compare numbers to strings.
-
- == - Is true if both sides are equal. For strings, it means they are the same.
- >= - True if the first value is equal to, or greater than, the second value.
- <= - True if the first value is equal to, or less than, the second value
- > - True if the first value greater than the second value
- < - True if the first value is less than the second value
- != - True if the first value IS NOT equal to the second one
+command 'if' and they are meant to return either 1 if the condition is
+satisfied and 0 if it isn't. That's what they call 'boolean' variables. 0
+means 'False'. Anything except the zero is 'True'. Odd as it is, -1 and -5
+and anything below zero will also be True.)
+
+You can compare numbers to each other and you compare strings to each
+other, but you can not compare numbers to strings.
+
+ == - Is true if both sides are equal. For strings, it means they contain
+ the same value.
+ >= - True if the first value is equal to, or greater than, the second
+ value.
+ <= - True if the first value is equal to, or less than, the second value.
+ > - True if the first value greater than the second value.
+ < - True if the first value is less than the second value.
+ != - True if the first value IS NOT equal to the second one.
Examples:
@@ -693,9 +706,9 @@ Examples:
1<2 is True while 1>2 is False.
@x>2 is True if @x is equal to 3. But it isn't true if @x is 2.
-Only '==' and '!=' have been tested for comparing strings. Since there's no way
-to code a seriously complex data structure in this language, trying to sort
-strings by alphabet would be pointless anyway.
+Only '==' and '!=' have been tested for comparing strings. Since there's
+no way to code a seriously complex data structure in this language, trying
+to sort strings by alphabet would be pointless anyway.
Comparisons can be stacked in the same condition:
@@ -711,34 +724,38 @@ Logical bitwise operators work only on numbers, and they are the following:
<< - Left shift.
>> - Right shift.
- Left shift moves the binary 1(s) of a number n positions to the left,
- which is the same as multiplying by 2, n times.
- In the other hand, Right shift moves the binary 1(s) of a number n positions
- to the right, which is the same as dividing by 2, n times.
+ Left shift moves the binary 1(s) of a number n positions to the left,
+ which is the same as multiplying by 2, n times.
+ In the other hand, Right shift moves the binary 1(s) of a number n
+ positions to the right, which is the same as dividing by 2, n times.
Example:
set b,2;
set a, b << 3;
mes a;
set a, a >> 2;
mes a;
- The first mes command would display 16, which is the same as 2 x (2 x 2 x 2) = 16.
- The second mes command would display 4, which is the same as 16 / 2 = 8. 8 / 2 = 4.
+ The first mes command would display 16, which is the same as:
+ 2 x (2 x 2 x 2) = 16.
+ The second mes command would display 4, which is the same as:
+ 16 / 2 = 8; 8 / 2 = 4.
& - And.
| - Or.
- The bitwise operator AND (&) is used to test two values against each other,
- and results in setting bits which are active in both arguments. This can
- be used for a few things, but in Hercules this operator is usually used to
- create bit-masks in scripts.
+ The bitwise operator AND (&) is used to test two values against each
+ other, and results in setting bits which are active in both arguments.
+ This can be used for a few things, but in Hercules this operator is
+ usually used to create bit-masks in scripts.
- The bitwise operator OR (|)sets to 1 a binary position if the binary position
- of one of the numbers is 1. This way a variable can hold several values we can check,
- known as bit-mask. A variable currently can hold up to 32 bit-masks (from position 0
- to position 1). This is a cheap(skate) and easy way to avoid using arrays to store several checks
- that a player can have.
+ The bitwise operator OR (|) sets to 1 a binary position if the binary
+ position of one of the numbers is 1. This way a variable can hold
+ several values we can check, known as bit-mask. A variable currently
+ can hold up to 32 bit-masks (from position 0 to position 1). This is a
+ cheap(skate) and easy way to avoid using arrays to store several
+ checks that a player can have.
- A bit-mask basically is (ab)using the variables bits to set various options in
- one variable. With the current limit if variables it is possible to store 32
- different options in one variable (by using the bits on position 0 to 31).
+ A bit-mask basically is (ab)using the variables bits to set various
+ options in one variable. With the current limit in variables it is
+ possible to store 32 different options in one variable (by using the
+ bits on position 0 to 31).
Example(s):
- Basic example of the & operator, bit example:
@@ -746,56 +763,60 @@ Logical bitwise operators work only on numbers, and they are the following:
Why? :
10 = 2^1 + 2^3 (2 + 8), so in bits, it would be 1010
2 = 2^1 (2), so in bits (same size) it would be 0010
- The & (AND) operator sets bits which are active (1) in both arguments, so in the
- example 1010 & 0010, only the 2^1 bit is active (1) in both. Resulting in the bit
- 0010, which is 2.
+ The & (AND) operator sets bits which are active (1) in both
+ arguments, so in the example 1010 & 0010, only the 2^1 bit is
+ active (1) in both. Resulting in the bit 0010, which is 2.
- Basic example of creating and using a bit-mask:
- set @options,2|4|16; //(note: this is the same as 2+4+16, or 22)
- if (@options & 1) mes "Option 1 is activated";
+ set @options,2|4|16; // (note: this is the same as 2+4+16, or 22)
+ if (@options & 1) mes "Option 1 is activated";
if (@options & 2) mes "Option 2 is activated";
if (@options & 4) mes "Option 3 is activated";
if (@options & 8) mes "Option 4 is activated";
if (@options & 16) mes "Options 5 is activated";
- This would return the messages about option 2, 3 and 5 being shown (since we've set
- the 2,4 and 16 bit to 1).
+ This would return the messages about option 2, 3 and 5 being shown
+ (since we've set the 2,4 and 16 bit to 1).
^ - Xor.
- The bitwise operator XOR (eXclusive OR) sets a binary position to 0 if both
- numbers have the same value in the said position. On the other hand, it
- sets to 1 if they have different values in the said binary position.
- This is another way of setting and unsetting bits in bit-masks.
+ The bitwise operator XOR (eXclusive OR) sets a binary position to 0 if
+ both numbers have the same value in the said position. On the other
+ hand, it sets to 1 if they have different values in the said binary
+ position. This is another way of setting and unsetting bits in
+ bit-masks.
Example:
- First let's set the quests that are currently in progress:
set inProgress,1|8|16; // quest 1,8 and 16 are in progress
- After playing for a bit, the player starts another quest:
if( inProgress&2 == 0 ){
- // this will set the bit for quest 2 (inProgress has that bit set to 0)
+ // this will set the bit for quest 2 (inProgress has that bit
+ // set to 0)
set inProgress,inProgress^2;
mes "Quest 2: find a newbie and be helpful to him for an hour.";
close;
}
- - After spending some time reading info on Xor's, the player finally completes quest 1:
+ - After spending some time reading info on Xor's, the player finally
+ completes quest 1:
if( inProgress&1 && isComplete ){
- // this will unset the bit for quest 1 (inProgress has that bit set to 1)
+ // this will unset the bit for quest 1 (inProgress has that
+ // bit set to 1)
set inProgress,inProgress^1;
mes "Quest 1 complete!! You unlocked the secrets of the Xor dynasty, use them wisely.";
close;
}
-Unary operators with only with a single number, which follows the operator, and
-are following:
+Unary operators with only with a single number, which follows the
+operator, and are the following:
- - Negation.
- The sign of the number will be reversed. If the number was positive, it will
- become negative and vice versa.
+ The sign of the number will be reversed. If the number was positive,
+ it will become negative and vice versa.
Example:
set .@myvar,10;
mes "Negative 10 is "+(-.@myvar);
! - Logical Not.
- Reverses the boolean result of an expression. True will become false and
- false will become true.
+ Reverses the boolean result of an expression. True will become false
+ and false will become true.
Example:
if(!callfunc("F_dosomething"))
@@ -805,15 +826,17 @@ are following:
}
~ - Bitwise Not.
- Reverses each bit in a number, also known as one's complement. Cleared bits
- are set, and set bits are cleared.
+ Reverses each bit in a number, also known as one's complement. Cleared
+ bits are set, and set bits are cleared.
Example:
- - Ensure, that quest 2 is disabled, while keeping all other active, if they are.
- set inProgress,inProgress&(~2); // same as set inProgress,inProgress&0xfffffffd
+ - Ensure, that quest 2 is disabled, while keeping all other active, if
+ they are.
+ set inProgress,inProgress&(~2);
+ // same as set inProgress,inProgress&0xfffffffd
-Ternary operators take three expressions (numbers, strings or boolean), and are
-following:
+Ternary operators take three expressions (numbers, strings or boolean),
+and are the following:
?: - Conditional operator
Very useful e.g. to replace
@@ -836,14 +859,14 @@ Within executable script code, some lines can be labels:
<label name>:
Labels are points of reference in your script, which can be used to route
-execution with 'goto', 'menu' and 'jump_zero' commands, invoked with 'doevent'
-and 'donpcevent' commands and are otherwise essential. A label's name may not be
-longer than 22 characters. (23rd is the ':'.) There is some confusion in the
-source about whether it's 22, 23 or 24 all over the place, so keeping labels
-under 22 characters could be wise. It may only contain alphanumeric characters
-and underscore. In addition to labels you name yourself, there are also some
-special labels which the script engine will start execution from if a special
-event happens:
+execution with 'goto', 'menu' and 'jump_zero' commands, invoked with
+'doevent' and 'donpcevent' commands and are otherwise essential. A label's
+name may not be longer than 22 characters. (23rd is the ':'.) There is
+some confusion in the source about whether it's 22, 23 or 24 all over the
+place, so keeping labels under 22 characters could be wise. It may only
+contain alphanumeric characters and underscore. In addition to labels you
+name yourself, there are also some special labels which the script engine
+will start execution from if a special event happens:
OnClock<hour><minute>:
OnMinute<minute>:
@@ -851,19 +874,20 @@ OnHour<hour>:
On<weekday><hour><minute>:
OnDay<month><day>:
-This will execute when the server clock hits the specified date or time. Hours
-and minutes are given in military time. ('0105' will mean 01:05 AM). Weekdays
-are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01 to 31.
-Remember the zero. :)
+This will execute when the server clock hits the specified date or time.
+Hours and minutes are given in military time. ('0105' will mean 01:05 AM).
+Weekdays are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01
+to 31. Remember the zero. :)
OnInit:
OnInterIfInit:
OnInterIfInitOnce:
-OnInit will execute every time the scripts loading is complete, including when
-they are reloaded with @reloadscript command. OnInterIfInit will execute when
-the map server connects to a char server, OnInterIfInitOnce will only execute
-once and will not execute if the map server reconnects to the char server later.
+OnInit will execute every time the scripts loading is complete, including
+when they are reloaded with @reloadscript command. OnInterIfInit will
+execute when the map server connects to a char server, OnInterIfInitOnce
+will only execute once and will not execute if the map server reconnects
+to the char server later.
OnAgitStart:
OnAgitEnd:
@@ -872,25 +896,28 @@ OnAgitStart2:
OnAgitEnd2:
OnAgitInit2:
-OnAgitStart will run whenever the server shifts into WoE mode, whether it is
-done with @agitstart GM command or with 'AgitStart' script command. OnAgitEnd
-will do likewise for the end of WoE.
+OnAgitStart will run whenever the server shifts into WoE mode, whether it
+is done with @agitstart GM command or with 'AgitStart' script command.
+OnAgitEnd will do likewise for the end of WoE.
-OnAgitInit will run when data for all castles and all guilds that hold a castle
-is received by map-server from the char-server after initial connect.
+OnAgitInit will run when data for all castles and all guilds that hold a
+castle is received by map-server from the char-server after initial
+connect.
-No RID will be attached while any of the above mentioned labels are triggered, so
-no character or account-based variables will be accessible, until you attach a
-RID with 'attachrid' (see below).
+No RID will be attached while any of the above mentioned labels are
+triggered, so no character or account-based variables will be accessible,
+until you attach a RID with 'attachrid' (see below).
-The above also applies to, the last three labels, the only difference is that
-these labels are used exclusively for WoE SE, and are called independently.
+The above also applies to, the last three labels, the only difference is
+that these labels are used exclusively for WoE SE, and are called
+independently.
OnTouch:
-This label will be executed if a trigger area is defined for the NPC object it's
-in. If it isn't present, the execution will start from the beginning of the NPC
-code. The RID of the triggering character object will be attached.
+This label will be executed if a trigger area is defined for the NPC
+object it's in. If it isn't present, the execution will start from the
+beginning of the NPC code. The RID of the triggering character object will
+be attached.
OnTouch_:
@@ -906,36 +933,37 @@ It's pretty obvious when these four special labels will be invoked.
OnPCDieEvent:
-This special label triggers when a player dies. The variable 'killerrid' is
-set to the ID of the killer.
+This special label triggers when a player dies. The variable 'killerrid'
+is set to the ID of the killer.
OnPCKillEvent:
-This special label triggers when a player kills another player. The variable
-'killedrid' is set to the ID of the player killed.
+This special label triggers when a player kills another player. The
+variable 'killedrid' is set to the ID of the player killed.
OnNPCKillEvent:
-This special label triggers when a player kills a monster. The variable
+This special label triggers when a player kills a monster. The variable
'killedrid' is set to the Class of the monster killed.
OnPCLoadMapEvent:
-This special label will trigger once a player steps in a map marked with the
-'loadevent' mapflag and attach its RID. The fact that this label requires a
-mapflag for it to work is because, otherwise, it'd be server-wide and trigger
-every time a player would change maps. Imagine the server load with 1,000 players
-(oh the pain...)
+This special label will trigger once a player steps in a map marked with
+the 'loadevent' mapflag and attach its RID. The fact that this label
+requires a mapflag for it to work is because, otherwise, it'd be
+server-wide and trigger every time a player would change maps. Imagine the
+server load with 1,000 players (oh the pain...)
-Only the special labels which are not associated with any script command are
-listed here. There are other kinds of labels which may be triggered in a similar
-manner, but they are described with their associated commands.
+Only the special labels which are not associated with any script command
+are listed here. There are other kinds of labels which may be triggered in
+a similar manner, but they are described with their associated commands.
On<label name>:
-These special labels are used with Mob scripts mostly, and script commands
-that requires you to point/link a command to a mob or another NPC, giving a label
-name to start from. The label name can be any of your liking, but must be
+These special labels are used with Mob scripts mostly, and script commands
+that requires you to point/link a command to a mob or another NPC, giving
+a label name to start from. The label name can be any of your liking, but
+must be started with "On".
Example:
@@ -954,28 +982,29 @@ Each time you kill one, that announce will appear in blue to everyone.
"Global" labels
-There's a catch with labels and doevent. If you call a label (using doevent)
-and called label is in NPC that has trigger area, that label must end with
-"Global" to work globally (i.e. if RID is outside of the trigger area, which
-usually happens since otherwise there would be no point calling the label with
-doevent, because OnTouch would do the job). For further reference look for
-npc_event in npc.c.
+There's a catch with labels and doevent. If you call a label (using
+doevent) and called label is in NPC that has trigger area, that label must
+end with "Global" to work globally (i.e. if RID is outside of the trigger
+area, which usually happens since otherwise there would be no point
+calling the label with doevent, because OnTouch would do the job). For
+further reference look for npc_event in npc.c.
Scripting commands and functions
--------------------------------
-The commands and functions are listed here in no particular order. There's a
-difference between commands and functions - commands leave no 'return value'
-which might be used in a conditional statement, as a command argument, or stored
-in a variable. Calling commands as if they were functions will sometimes work,
-but is not advised, as this can lead to some hard to track errors. Calling
-functions as if they were commands will mess up the stack, so 'return' command
-will not return correctly after this happens in a particular script.
+The commands and functions are listed here in no particular order. There's
+a difference between commands and functions - commands leave no 'return
+value' which might be used in a conditional statement, as a command
+argument, or stored in a variable. Calling commands as if they were
+functions will sometimes work, but is not advised, as this can lead to
+some hard to track errors. Calling functions as if they were commands will
+mess up the stack, so 'return' command will not return correctly after
+this happens in a particular script.
-All commands must end with a ';'. Actually, you may expect to have multiple
-commands on one line if you properly terminate them with a ';', but it's better
-if you don't, since it is not certain just whether the scripting engine will
-behave nicely if you do.
+All commands must end with a ';'. Actually, you may expect to have
+multiple commands on one line if you properly terminate them with a ';',
+but it's better if you don't, since it is not certain just whether the
+scripting engine will behave nicely if you do.
-------------------------
@@ -998,36 +1027,36 @@ From here on, we will have the commands sorted as follow:
=====================
---------------------------------------
-*mes "<string>";
+*mes "<string>"{,"<string>"..."<string>"};
-This command will displays a box on the screen for the invoking character, if no
-such box is displayed already, and will print the string specified into that
-box. There is normally no 'close' or 'next' button on this box, unless you
-create one with 'close' or 'next', and while it's open the player can't do much
-else, so it's important to create a button later. If the string is empty, it
-will show up as an empty line.
+This command will displays a box on the screen for the invoking character,
+if no such box is displayed already, and will print the string specified
+into that box. There is normally no 'close' or 'next' button on this box,
+unless you create one with 'close' or 'next', and while it's open the
+player can't do much else, so it's important to create a button later. If
+the string is empty, it will show up as an empty line.
mes "Text that will appear in the box";
-Inside the string you may put color codes, which will alter the color of the
-text printed after them. The color codes are all '^<R><G><B>' and contain three
-hexadecimal numbers representing colors as if they were HTML colors - ^FF0000 is
-bright red, ^00FF00 is bright green, ^0000FF is bright blue, ^000000 is black.
-^FF00FF is a pure magenta, but it's also a color that is considered transparent
-whenever the client is drawing windows on screen, so printing text in that color
-will have kind of a weird effect. Once you've set a text's color to something,
-you have to set it back to black unless you want all the rest of the text be in
-that color:
+Inside the string you may put color codes, which will alter the color of
+the text printed after them. The color codes are all '^<R><G><B>' and
+contain three hexadecimal numbers representing colors as if they were HTML
+colors - ^FF0000 is bright red, ^00FF00 is bright green, ^0000FF is bright
+blue, ^000000 is black. ^FF00FF is a pure magenta, but it's also a color
+that is considered transparent whenever the client is drawing windows on
+screen, so printing text in that color will have kind of a weird effect.
+Once you've set a text's color to something, you have to set it back to
+black unless you want all the rest of the text be in that color:
mes "This is ^FF0000 red ^000000 and this is ^00FF00 green, ^000000 so.";
-Notice that the text coloring is handled purely by the client. If you use non-
-English characters, the color codes might get screwed if they stick to letters
-with no intervening space. Separating them with spaces from the letters on
-either side solves the problem.
+Notice that the text coloring is handled purely by the client. If you use
+non-English characters, the color codes might get screwed if they stick to
+letters with no intervening space. Separating them with spaces from the
+letters on either side solves the problem.
-To display multiple lines of message while only using a single mes; command,
-use the script command in the following format:
+To display multiple lines of message while only using a single mes;
+command, use the script command in the following format:
mes "Line 1", "Line 2", "Line 3";
@@ -1038,19 +1067,19 @@ the relevant script file.
*next;
-This command will display a 'next' button in the message window for the
-invoking character. Clicking on it will cause the window to clear and display
-a new one. Used to segment NPC-talking, next is often used in combination with
-'mes' and 'close'.
+This command will display a 'next' button in the message window for the
+invoking character. Clicking on it will cause the window to clear and
+display a new one. Used to segment NPC-talking, next is often used in
+combination with 'mes' and 'close'.
-If no window is currently on screen, one will be created, but once the invoking
-character clicks on it, a warning is thrown on the server console and the script
-will terminate.
+If no window is currently on screen, one will be created, but once the
+invoking character clicks on it, a warning is thrown on the server console
+and the script will terminate.
mes "[Woman]";
mes "This would appear on the page";
next;
- // This is needed cause it is a new page and the top will now be blank
+ // This is needed since it is a new page and the top will now be blank
mes "[Woman]";
mes "This would appear on the 2nd page";
@@ -1058,29 +1087,31 @@ will terminate.
*close;
-This command will create a 'close' button in the message window for the invoking
-character. If no window is currently on screen, the script execution will end. This is one
-of the ways to end a speech from an NPC. Once the button is clicked, the NPC
-script execution will end, and the message box will disappear.
+This command will create a 'close' button in the message window for the
+invoking character. If no window is currently on screen, the script
+command 'end;' must be used. This is one of the ways to end a speech from
+an NPC. Once the button is clicked, the NPC script execution will end, and
+the message box will disappear.
mes "[Woman]";
- mes "I am finished talking to you, click the close button";
+ mes "I am finished talking to you, click the close button.";
close;
- mes "This command will not run at all, cause the script has ended.";
+ mes "This command will not run at all, since the script has ended.";
---------------------------------------
*close2;
-This command will create a 'close' button in the message window for the invoking
-character. WARNING: If no window is currently on screen, the script execution will halt
-indefinitely! See 'close'. There is one important difference, though - even though
-the message box will have closed, the script execution will not stop, and commands after
-'close2' will still run, meaning an 'end' has to be used to stop the script, unless you
-make it stop in some other manner.
+This command will create a 'close' button in the message window for the
+invoking character. WARNING: If no window is currently on screen, the
+script execution will halt indefinitely! See 'close'. There is one
+important difference, though - even though the message box will have
+closed, the script execution will not stop, and commands after 'close2'
+will still run, meaning an 'end' has to be used to stop the script, unless
+you make it stop in some other manner.
mes "[Woman]";
- mes "I will warp you now";
+ mes "I will warp you now.";
close2;
warp "place",50,50;
end;
@@ -1091,9 +1122,8 @@ Don't expect things to run smoothly if you don't make your scripts 'end'.
*end;
-This command will stop the execution for this particular script. The two
-versions are perfectly equivalent. It is the normal way to end a script which
-does not use 'mes'.
+This command will stop the execution for this particular script.
+It is required for any script not using 'mes'.
if (BaseLevel<=10) goto L_Lvl10;
if (BaseLevel<=20) goto L_Lvl20;
@@ -1115,20 +1145,22 @@ does not use 'mes'.
npctalk "Look at that you are almost 2nd profession";
end;
-Without the use if 'end' it would travel through the labels until the end of the
-script. If you were lvl 10 or less, you would see all the speech lines, the use
-of 'end' stops this, and ends the script.
+Without the use if 'end' it would travel through the labels until the end
+of the script. If you were lvl 10 or less, you would see all the speech
+lines, the use of 'end' stops this, and ends the script.
---------------------------------------
*set <variable>,<expression>;
*set(<variable>,<expression>)
-This command will set a variable to the value that the expression results in.
-This is the only way to set a variable directly.
+This command will set a variable to the value that the expression results
+in. This isn't the only way to set a variable directly: you can set them
+much like any other programming language as stated before (refer to the
+'Assigning variables' section).
-This is the most basic script command and is used a lot whenever you try to do
-anything more advanced than just printing text into a message box.
+This is the most basic script command and is used a lot whenever you try
+to do anything more advanced than just printing text into a message box.
set @x,100;
@@ -1136,8 +1168,8 @@ will make @x equal 100.
set @x,1+5/8+9;
-will compute 1+5/8+9 (which is, surprisingly, 10 - remember, all numbers are
-integer in this language) and make @x equal it.
+will compute 1+5/8+9 (which is, surprisingly, 10 - remember, all numbers
+are integer in this language) and make @x equal to it.
Returns the variable reference.
@@ -1145,8 +1177,8 @@ Returns the variable reference.
*setd "<variable name>",<value>;
-Works almost identically as set, except the variable name is identified as a string
-and can thus be constructed dynamically.
+Works almost identically as set, except the variable name is identified as
+a string and can thus be constructed dynamically.
This command is equivalent to:
set getd("variable name"),<value>;
@@ -1183,24 +1215,26 @@ This can only be used to get . variables.
Examples:
-//This will return the value of .var, note that this can't be used, since the value isn't caught.
+//This will return the value of .var, note that this can't be used, since
+//the value isn't caught.
getvariableofnpc(.var,"TargetNPC");
-//This will set the .v variable to the value of the TargetNPC's .var variable.
+//This will set the .v variable to the value of the TargetNPC's .var
+//variable.
set .v,getvariableofnpc(.var,"TargetNPC");
//This will set the .var variable of TargetNPC to 1.
set getvariableofnpc(.var,"TargetNPC"),1;
-Note: even though function objects can have .variables,
-getvariableofnpc will not work on them.
+Note: even though function objects can have .variables, getvariableofnpc
+will not work on them.
---------------------------------------
*goto <label>;
-This command will make the script jump to a label, usually used in conjunction
-with other command, such as "if", but often used on it's own.
+This command will make the script jump to a label, usually used in
+conjunction with other command, such as "if", but often used on it's own.
...
goto Label;
@@ -1208,25 +1242,25 @@ with other command, such as "if", but often used on it's own.
Label:
mes "This will be seen";
-Note by FlavioJS: goto's are "evil" and should be avoided if possible (ò_ó)
+Gotos are considered to be harmful and should be avoided whenever possible.
---------------------------------------
*menu "<option_text>",<target_label>{,"<option_text>",<target_label>,...};
-This command will create a selectable menu for the invoking character. Only one
-menu can be on screen at the same time.
+This command will create a selectable menu for the invoking character.
+Only one menu can be on screen at the same time.
-Depending on what the player picks from the menu, the script execution will
-continue from the corresponding label. (it's string-label pairs, not label-
-string)
+Depending on what the player picks from the menu, the script execution
+will continue from the corresponding label. It's string-label pairs, not
+label-string.
Options can be grouped together, separated by the character ':'.
menu "A:B",L_Wrong,"C",L_Right;
-It also sets a special temporary character variable @menu, which contains the
-number of option the player picked. (Numbering of options starts at 1.)
+It also sets a special temporary character variable @menu, which contains
+the number of option the player picked. Numbering of options starts at 1.
This number is consistent with empty options and grouped options.
menu "A::B",L_Wrong,"",L_Impossible,"C",L_Right;
@@ -1256,18 +1290,18 @@ optimize big scripts.
Both these examples will perform the exact same task.
-If you give an empty string as a menu item, the item will not display. This
-can effectively be used to script dynamic menus by using empty string for
-entries that should be unavailable at that time.
+If you give an empty string as a menu item, the item will not display.
+This can effectively be used to script dynamic menus by using empty string
+for entries that should be unavailable at that time.
You can do it by using arrays, but watch carefully - this trick isn't high
-wizardry, but minor magic at least. You can't expect to easily duplicate it
-until you understand how it works.
+wizardry, but minor magic at least. You can't expect to easily duplicate
+it until you understand how it works.
-Create a temporary array of strings to contain your menu items, and populate it
-with the strings that should go into the menu at this execution, making sure not
-to leave any gaps. Normally, you do it with a loop and an extra counter, like
-this:
+Create a temporary array of strings to contain your menu items, and
+populate it with the strings that should go into the menu at this
+execution, making sure not to leave any gaps. Normally, you do it with a
+loop and an extra counter, like this:
setarray @possiblemenuitems$[0],<list of potential menu items>;
set @j,0; // That's the menu lines counter.
@@ -1281,7 +1315,8 @@ this:
if (<condition>)
{
- // We record the option into the list of options actually available.
+ // We record the option into the list of options actually
+ // available.
set @menulist$[@j],@possiblemenuitems$[@i];
@@ -1290,8 +1325,8 @@ this:
set @menureference[@j],@i;
- // Since we've just added a menu item into the list, we increment
- // the menu lines counter.
+ // Since we've just added a menu item into the list, we
+ // increment the menu lines counter.
set @j,@j+1;
}
@@ -1299,52 +1334,55 @@ this:
// We go on to the next possible menu item.
}
-This will create you an array @menulist$ which contains the text of all items
-that should actually go into the menu based on your condition, and an array
-@menureference, which contains their numbers in the list of possible menu items.
-(Remember, arrays start with 0.) There's less of them than the possible menu
-items you've defined, but the menu command can handle the empty lines - only if
-they are last in the list, and if it's made this way, they are. Now comes a
-dirty trick:
+This will create you an array @menulist$ which contains the text of all
+items that should actually go into the menu based on your condition, and
+an array @menureference, which contains their numbers in the list of
+possible menu items. Remember, arrays start with 0. There's less of them
+than the possible menu items you've defined, but the menu command can
+handle the empty lines - only if they are last in the list, and if it's
+made this way, they are. Now comes a dirty trick:
// X is whatever the most menu items you expect to handle.
menu @menulist$[0],-,@menulist$[1],-,....@menulist$[<X>],-;
This calls up a menu of all your items. Since you didn't copy some of the
-possible menu items into the list, it's end is empty and so no menu items will
-show up past the end. But this menu call doesn't jump anywhere, it just
-continues execution right after the menu command. (And it's a good thing it
-doesn't, cause you can only explicitly define labels to jump to, and how do you
-know which ones to define if you don't know beforehand which options will end up
-where in your menu?)
+possible menu items into the list, it's end is empty and so no menu items
+will show up past the end. But this menu call doesn't jump anywhere, it
+just continues execution right after the menu command. (And it's a good
+thing it doesn't, cause you can only explicitly define labels to jump to,
+and how do you know which ones to define if you don't know beforehand
+which options will end up where in your menu?)
But how do you figure out which option the user picked? Enter the @menu.
@menu contains the number of option that the user selected from the list,
-starting with 1 for the first option. You know now which option the user picked
-and which number in your real list of possible menu items it translated to:
+starting with 1 for the first option. You know now which option the user
+picked and which number in your real list of possible menu items it
+translated to:
mes "You selected "+@possiblemenuitems$[@menureference[@menu-1]]+"!";
@menu is the number of option the user picked.
-@menu-1 is the array index for the list of actually used menu items that we
-made.
-@menureference[@menu-1] is the number of the item in the array of possible menu
-items that we've saved just for this purpose.
+@menu-1 is the array index for the list of actually used menu items that
+we made.
+@menureference[@menu-1] is the number of the item in the array of possible
+menu items that we've saved just for this purpose.
-And @possiblemenuitems$[@menureference[@menu-1]] is the string that we used to
-display the menu line the user picked. (Yes, it's a handful, but it works.)
+And @possiblemenuitems$[@menureference[@menu-1]] is the string that we
+used to display the menu line the user picked. (Yes, it's a handful, but
+it works.)
-You can set up a bunch of 'if (@menureference[@menu-1]==X) goto Y' statements to
-route your execution based on the line selected and still generate a different
-menu every time, which is handy when you want to, for example, make users select
-items in any specific order before proceeding, or make a randomly shuffled menu.
+You can set up a bunch of 'if (@menureference[@menu-1]==X) goto Y'
+statements to route your execution based on the line selected and still
+generate a different menu every time, which is handy when you want to, for
+example, make users select items in any specific order before proceeding,
+or make a randomly shuffled menu.
-Kafra code bundled with the standard distribution uses a similar array-based
-menu technique for teleport lists, but it's much simpler and doesn't use @menu,
-probably since that wasn't documented anywhere.
+Kafra code bundled with the standard distribution uses a similar
+array-based menu technique for teleport lists, but it's much simpler and
+doesn't use @menu, probably since that wasn't documented anywhere.
-See also 'select', which is probably better in this particular case. Instead of
-menu, you could use 'select' like this:
+See also 'select', which is probably better in this particular case.
+Instead of menu, you could use 'select' like this:
set @dummy,select(@menulist$[0],@menulist$[1],....@menulist$[<X>]);
@@ -1356,28 +1394,28 @@ perfectly equivalent.
*select("<option>"{,"<option>",...})
*prompt("<option>"{,"<option>",...})
-This function is a handy replacement for 'menu' for some specific cases where
-you don't want a complex label structure - like, for example, asking simple yes-
-no questions. It will return the number of menu option picked, starting with 1.
-Like 'menu', it will also set the variable @menu to contain the option the user
-picked.
+This function is a handy replacement for 'menu' for some specific cases
+where you don't want a complex label structure - like, for example, asking
+simple yes-no questions. It will return the number of menu option picked,
+starting with 1. Like 'menu', it will also set the variable @menu to
+contain the option the user picked.
if (select("Yes:No")==1) mes "You said yes, I know.";
And like 'menu', the selected option is consistent with grouped options
and empty options.
-prompt works almost the same as select, except that when a character clicks
-the Cancel button, this function will return 255 instead.
+'prompt' works almost the same as select, except that when a character
+clicks the Cancel button, this function will return 255 instead.
---------------------------------------
*input(<variable>{,<min>{,<max>}})
This command will make an input box pop up on the client connected to the
-invoking character, to allow entering of a number or a string. This has many
-uses, one example would be a guessing game, also making use of the 'rand'
-function:
+invoking character, to allow entering of a number or a string. This has
+many uses, one example would be a guessing game, also making use of the
+'rand' function:
mes "[Woman]";
mes "Try and guess the number I am thinking of.";
@@ -1398,8 +1436,9 @@ function:
close;
}
-If you give the input command a string variable to put the input in, it will
-allow the player to enter text. Otherwise, only numbers will be allowed.
+If you give the input command a string variable to put the input in, it
+will allow the player to enter text. Otherwise, only numbers will be
+allowed.
mes "[Woman]";
mes "Please say HELLO";
@@ -1419,15 +1458,15 @@ allow the player to enter text. Otherwise, only numbers will be allowed.
}
Normally you may not input a negative number with this command.
-This is done to prevent exploits in badly written scripts, which would
-let people, for example, put negative amounts of Zeny into a bank script and
+This is done to prevent exploits in badly written scripts, which would let
+people, for example, put negative amounts of Zeny into a bank script and
receive free Zeny as a result.
The command has two optional arguments and a return value.
The default value of 'min' and 'max' can be set with 'input_min_value' and
'input_max_value' in script.conf.
-For numeric inputs the value is capped to the range [min,max]. Returns 1 if
-the value was higher than 'max', -1 if lower than 'min' and 0 otherwise.
+For numeric inputs the value is capped to the range [min,max]. Returns 1
+if the value was higher than 'max', -1 if lower than 'min' and 0 otherwise.
For string inputs it returns 1 if the string was longer than 'max', -1 is
shorter than 'min' and 0 otherwise.
@@ -1436,9 +1475,9 @@ shorter than 'min' and 0 otherwise.
*callfunc "<function>"{,<argument>,...<argument>};
*callfunc("<function>"{,<argument>,...<argument>})
-This command lets you call up a function NPC. A function NPC can be called from
-any script on any map server. Using the 'return' command it will come back to
-the place that called it.
+This command lets you call up a function NPC. A function NPC can be called
+from any script on any map server. Using the 'return' command it will come
+back to the place that called it.
place,50,50,6%TAB%script%TAB%Woman%TAB%115,{
mes "[Woman]"
@@ -1454,13 +1493,13 @@ the place that called it.
end;
}
-You can pass arguments to your function - values telling it what exactly to do -
-which will be available there with getarg() (see 'getarg')
+You can pass arguments to your function - values telling it what exactly
+to do - which will be available there with getarg() (see 'getarg').
Notice that returning is not mandatory, you can end execution right there.
-If you want to return a real value from inside your function NPC, it is better
-to write it in the function form, which will also work and will make the script
-generally cleaner:
+If you want to return a real value from inside your function NPC, it is
+better to write it in the function form, which will also work and will
+make the script generally cleaner:
place,50,50,6%TAB%script%TAB%Man%TAB%115,{
mes "[Man]"
@@ -1475,8 +1514,8 @@ generally cleaner:
return 1;// it's odd
}
-Alternately, user-defined functions may be called directly without the use of
-the 'callfunc' script command.
+Alternately, user-defined functions may be called directly without the use
+of the 'callfunc' script command.
function<TAB>script<TAB>SayHello<TAB>{
mes "Hello " + getarg(0);
@@ -1492,23 +1531,24 @@ the 'callfunc' script command.
Note:
!! A user-defined function must be declared /before/ a script attempts to
- !! call it. That is to say, any functions should be placed above scripts or NPCs
- !! (or loaded in a separate file first) before attempting to call them directly.
+ !! call it. That is to say, any functions should be placed above scripts
+ !! or NPCs (or loaded in a separate file first) before attempting to call
+ !! them directly.
---------------------------------------
*callsub <label>{,<argument>,...<argument>};
*callsub(<label>{,<argument>,...<argument>})
-This command will go to a specified label within the current script (do NOT use
-quotes around it) coming in as if it were a 'callfunc' call, and pass it
-arguments given, if any, which can be recovered there with 'getarg'. When done
-there, you should use the 'return' command to go back to the point from where
-this label was called. This is used when there is a specific thing the script
-will do over and over, this lets you use the same bit of code as many times as
-you like, to save space and time, without creating extra NPC objects which are
-needed with 'callfunc'. A label is not callable in this manner from another
-script.
+This command will go to a specified label within the current script (do
+NOT use quotes around it) coming in as if it were a 'callfunc' call, and
+pass it arguments given, if any, which can be recovered there with
+'getarg'. When done there, you should use the 'return' command to go back
+to the point from where this label was called. This is used when there is
+a specific thing the script will do over and over, this lets you use the
+same bit of code as many times as you like, to save space and time,
+without creating extra NPC objects which are needed with 'callfunc'. A
+label is not callable in this manner from another script.
Example 1: callsub for checking (if checks pass, return to script)
callsub S_CheckFull, "guild_vs2",50;
@@ -1529,7 +1569,8 @@ S_CheckFull:
return;
Example 2: callsub used repeatedly, with different arguments
-// notice how the Zeny check/delete is reused, instead of copy-pasting for every warp
+// notice how the Zeny check/delete is reused, instead of copy-pasting for
+// every warp.
switch(select("Abyss Lake:Amatsu Dungeon:Anthell:Ayothaya Dungeon:Beacon Island, Pharos") {
case 1: callsub S_DunWarp,"hu_fild05",192,207;
case 2: callsub S_DunWarp,"ama_in02",119,181;
@@ -1557,14 +1598,14 @@ S_DunWarp:
*getarg(<index>{,<default_value>})
-This function is used when you use the 'callsub' or 'callfunc' commands. In the
-call you can specify variables that will make that call different from another
-one. This function will return an argument the function or subroutine was
-called with, and is the normal way to get them.
+This function is used when you use the 'callsub' or 'callfunc' commands.
+In the call you can specify variables that will make that call different
+from another one. This function will return an argument the function or
+subroutine was called with, and is the normal way to get them.
This is another thing that can let you use the same code more than once.
-Argument numbering starts with 0, i.e. the first argument you gave is number 0.
-If no such argument was given, a zero is returned.
+Argument numbering starts with 0, i.e. the first argument you gave is
+number 0. If no such argument was given, a zero is returned.
place,50,50,6%TAB%script%TAB%Woman1%TAB%115,{
mes "[Woman]";
@@ -1587,11 +1628,11 @@ If no such argument was given, a zero is returned.
if(@win==0) return;
mes "Sorry you lost";
-"woman1" NPC object calls the funcNPC. The argument it gives in this call is
-stated as 2, so when the random number is generated by the 'rand' function, it
-can only be 0 or 1. Whereas "woman2" gives 5 as the argument number 0 when
-calling the function, so the random number could be 0, 1, 2, 3 or 4, this makes
-"woman2" less likely to say the player won.
+"woman1" NPC object calls the funcNPC. The argument it gives in this call
+is stated as 2, so when the random number is generated by the 'rand'
+function, it can only be 0 or 1. Whereas "woman2" gives 5 as the argument
+number 0 when calling the function, so the random number could be 0, 1, 2,
+3 or 4, this makes "woman2" less likely to say the player won.
You can pass multiple arguments in a function call:
@@ -1599,20 +1640,20 @@ You can pass multiple arguments in a function call:
getarg(0) would be 5, getarg(1) would be 4 and getarg(2) would be 3.
-Getarg has an optional argument:
+Getarg also has an optional argument:
If the target argument exists, it is returned.
-Otherwise, if <default_value> is present it is returned instead,
-if not the script terminates immediately.
+Otherwise, if <default_value> is present it is returned instead, if not
+the script terminates immediately.
-in the previous example getarg(2,-1) would be 3 and getarg(3,-1) would be -1
+In previous example getarg(2,-1) would be 3 and getarg(3,-1) would be -1.
---------------------------------------
*getargcount()
-This function is used when you use the 'callsub' or 'callfunc' commands. In the
-call you can specify arguments. This function will return the number of arguments
-provided.
+This function is used when you use the 'callsub' or 'callfunc' commands.
+In the call you can specify arguments. This function will return the
+number of arguments provided.
Example:
callfunc "funcNPC",5,4,3;
@@ -1626,16 +1667,17 @@ Example:
*return {<value>};
-This command causes the script execution to leave previously called function
-with callfunc or script with callsub and return to the location, where the call
-originated from. Optionally a return value can be supplied, when the call was
-done using the function form.
+This command causes the script execution to leave previously called
+function with callfunc or script with callsub and return to the location,
+where the call originated from. Optionally a return value can be supplied,
+when the call was done using the function form.
-Using this command outside of functions or scripts referenced by callsub will
-result in error and termination of the script.
+Using this command outside of functions or scripts referenced by callsub
+will result in error and termination of the script.
callfunc "<your function>";// when nothing is returned
- set <variable>,callfunc("<your function>");// when a value is being returned
+ set <variable>,callfunc("<your function>");
+ // when a value is being returned
---------------------------------------
@@ -1645,8 +1687,9 @@ result in error and termination of the script.
<code>
}
-This works like callfunc, and is used for cleaner and faster scripting. The function
-must be defined and used within a script, and works like a label with arguments.
+This works like callfunc, and is used for cleaner and faster scripting.
+The function must be defined and used within a script, and works like a
+label with arguments.
Note that the name may only contain alphanumeric characters and underscore.
Usage:
@@ -1729,24 +1772,25 @@ Example:
*if (<condition>) <statement>;
-This is the basic conditional statement command, and just about the only one
-available in this scripting language.
+This is the basic conditional statement command, and just about the only
+one available in this scripting language.
-The condition can be any expression. All expressions resulting in a non-zero
-value will be considered True, including negative values. All expressions
-resulting in a zero are false.
+The condition can be any expression. All expressions resulting in a
+non-zero value will be considered True, including negative values. All
+expressions resulting in a zero are false.
-If the expression results in True, the statement will be executed. If it isn't
-true, nothing happens and we move on to the next line of the script.
+If the expression results in True, the statement will be executed. If it
+isn't true, nothing happens and we move on to the next line of the script.
if (1) mes "This will always print.";
if (0) mes "And this will never print.";
if (5) mes "This will also always print.";
if (-1) mes "Funny as it is, this will also print just fine.";
-For more information on conditional operators see the operators section above.
-Anything that is returned by a function can be used in a condition check without
-bothering to store it in a specific variable:
+For more information on conditional operators see the operators section
+above.
+Anything that is returned by a function can be used in a condition check
+without bothering to store it in a specific variable:
if (strcharinfo(0)=="Daniel Jackson") mes "It is true, you are Daniel!";
@@ -1786,7 +1830,8 @@ Example 4:
mes "[Quest Person]";
if(countitem(512)>=1) goto L_GiveApple;
- // The number 512 was found from item_db, it is the item number for the Apple.
+ // The number 512 was found from item_db, it is the item number
+ // for the Apple.
mes "Can you please bring me an apple?";
close;
L_GiveApple:
@@ -1843,7 +1888,7 @@ else
dothat;
If the condition doesn't meet, it'll do the action following the else.
-We can also group several actions depending on a condition, the following way:
+We can also group several actions depending on a condition, this way:
if (<condition)
{
@@ -1857,13 +1902,14 @@ if (<condition)
dothat4;
}
-Remember that if you plan to do several actions upon the condition being false, and
-you forget to use the curly braces (the { } ), the second action will be executed regardless
-the output of the condition, unless of course, you stop the execution of the script if the
-condition is true (that is, in the first grouping using a return; , and end; or a close; )
+Remember that if you plan to do several actions upon the condition being
+false, and you forget to use the curly braces (the { } ), the second
+action will be executed regardless the output of the condition, unless of
+course, you stop the execution of the script if the condition is true
+(that is, in the first grouping using a return; , and end; or a close; ).
-Also, you can have multiple conditions nested or chained, and don't worry about limits as to
-how many nested if you can have, there is no spoon ;)
+Also, you can have multiple conditions nested or chained, and don't worry
+about limits as to how many nested if you can have, there is no spoon ;).
...
if (<condition 1>)
@@ -1881,28 +1927,30 @@ else if (<condition 2>)
*jump_zero (<condition>),<label>;
-This command works kinda like an 'if'+'goto' combination in one go. (See 'if').
-If the condition is false (equal to zero) this command will immediately jump to
-the specified label like in 'goto'. While 'if' is more generally useful, for
-some cases this could be an optimization.
+This command works like an 'if'+'goto' combination in one go. (See 'if').
+If the condition is false (equal to zero) this command will immediately
+jump to the specified label like in 'goto'. While 'if' is more generally
+useful, for some cases this could be an optimization.
-The main reason for this command is that other control statements, like
-'switch', 'for' or 'while', are disassembled into simple expressions together
-with this command when a script is parsed.
+The main reason for this command is that other control statements, like
+'switch', 'for' or 'while', are disassembled into simple expressions
+together with this command when a script is parsed.
---------------------------------------
*while (<condition>) <statement>;
-This is probably the simplest and most frequently used loop structure. The 'while'
-statement can be interpreted as "while <condition> is true, perform <statement>".
-It is a pretest loop, meaning the conditional expression is tested before any of the
-statements in the body of the loop are performed. If the condition evaluates to
-false, the statement(s) in the body of the loop is/are never executed. If the
-condition evaluates to true, the statement(s) are executed, then control transfers
-back to the conditional expression, which is reevaluated and the cycle continues.
+This is probably the simplest and most frequently used loop structure. The
+'while' statement can be interpreted as "while <condition> is true,
+perform <statement>". It is a pretest loop, meaning the conditional
+expression is tested before any of the statements in the body of the loop
+are performed. If the condition evaluates to false, the statement(s) in
+the body of the loop is/are never executed. If the condition evaluates to
+true, the statement(s) are executed, then control transfers back to the
+conditional expression, which is reevaluated and the cycle continues.
-Multiple statements can be grouped with { }, curly braces, just like with the 'if' statement.
+Multiple statements can be grouped with { }, curly braces, just like with
+the 'if' statement.
Example 1:
while (switch(select("Yes:No") == 2 ))
@@ -1934,14 +1982,15 @@ Example 4: sentinel-controlled loop
*for (<variable initialization>; <condition>; <variable update>) <statement>;
-Another pretest looping structure is the 'for' statement. It is considered a
-specialized form of the 'while' statement, and is usually associated with counter-
-controlled loops. Here are the steps of the 'for' statement: the initialize
-statement is executed first and only once. The condition test is performed.
-When the condition evaluates to false, the rest of the for statement is skipped.
-When the condition evaluates to true, the body of the loop is executed, then the
-update statement is executed (this usually involves incrementing a variable).
-Then the condition is reevaluated and the cycle continues.
+Another pretest looping structure is the 'for' statement. It is considered
+a specialized form of the 'while' statement, and is usually associated
+with counter-controlled loops. Here are the steps of the 'for' statement:
+the initialize statement is executed first and only once. The condition
+test is performed. When the condition evaluates to false, the rest of the
+for statement is skipped. When the condition evaluates to true, the body
+of the loop is executed, then the update statement is executed (this
+usually involves incrementing a variable). Then the condition is
+reevaluated and the cycle continues.
Example 1:
for( set .@i, 1; .@i <= 5; set .@i, .@i +1 )
@@ -1956,11 +2005,11 @@ Example 2:
*do { <statement>; } while (<condition>);
-The 'do...while' is the only post-test loop structure available in this script
-language. With a post-test, the statements are executed once before the condition
-is tested. When the condition is true, the statement(s) are repeated. When the
-condition is false, control is transferred to the statement following the
-'do...while' loop expression.
+The 'do...while' is the only post-test loop structure available in this
+script language. With a post-test, the statements are executed once before
+the condition is tested. When the condition is true, the statement(s) are
+repeated. When the condition is false, control is transferred to the
+statement following the 'do...while' loop expression.
Example 1: sentinel-controlled loop
mes "This menu will keep appearing until you pick Cancel";
@@ -1980,9 +2029,9 @@ Example 2: counter-controlled loop
*freeloop(<toggle>)
-Toggling this to enabled (1) allows the script instance to bypass the infinite loop
-protection, allowing your script to loop as much as it may need. Disabling (0) will
-warn you if an infinite loop is detected.
+Toggling this to enabled (1) allows the script instance to bypass the
+infinite loop protection, allowing your script to loop as much as it may
+need. Disabling (0) will warn you if an infinite loop is detected.
Example:
freeloop(1); // enable script to loop freely
@@ -1991,7 +2040,8 @@ Example:
for ( set .@i,0; .@i<.@bigloop; set .@i, .@i+1 ) {
dothis;
// will sleep the script for 1ms when detect an infinity loop to
- // let Hercules do what it need to do (socket, timer, process, etc.)
+ // let Hercules do what it need to do (socket, timer, process,
+ // etc.)
}
freeloop(0); // disable
@@ -2005,8 +2055,8 @@ Example:
*setarray <array name>[<first value>],<value>{,<value>...<value>};
-This command will allow you to quickly fill up an array in one go. Check the
-Kafra scripts in the distribution to see this used a lot.
+This command will allow you to quickly fill up an array in one go. Check
+the Kafra scripts in the distribution to see this used a lot.
setarray @array[0], 100, 200, 300, 400, 500, 600;
@@ -2026,7 +2076,8 @@ will produce:
*cleararray <array name>[<first value to alter>],<value>,<number of values to set>;
-This command will change many array values at the same time to the same value.
+This command will change many array values at the same time to the same
+value.
setarray @array[0], 100, 200, 300, 400, 500, 600;
// This will make all 6 values 0
@@ -2042,8 +2093,8 @@ See 'setarray'.
*copyarray <destination array>[<first value>],<source array>[<first value>],<amount of data to copy>;
-This command lets you quickly shuffle a lot of data between arrays, which is in
-some cases invaluable.
+This command lets you quickly shuffle a lot of data between arrays, which
+is in some cases invaluable.
setarray @array[0], 100, 200, 300, 400, 500, 600;
// So we have made @array[]
@@ -2066,22 +2117,22 @@ New Array:
@array2[2] = 0
@array2[3] = 0
-Notice that @array[4] and @array[5] won't be copied to the second array, and it will return a
-0.
+Notice that @array[4] and @array[5] won't be copied to the second array,
+and it will return a 0.
---------------------------------------
*deletearray <array name>[<first value>],<how much to delete>;
-This command will delete a specified number of array elements totally from an
-array, shifting all the elements beyond this towards the beginning.
+This command will delete a specified number of array elements totally from
+an array, shifting all the elements beyond this towards the beginning.
- // This will delete array element 0, and move all the other array elements
- // up one place.
+ // This will delete array element 0, and move all the other array
+ // elements up one place.
deletearray @array[0],1
-// This would delete array elements numbered 1, 2 and 3, leave element 0 in its
-// place, and move the other elements ups, so there are no gaps.
+// This would delete array elements numbered 1, 2 and 3, leave element 0
+// in its place, and move the other elements ups, so there are no gaps.
deletearray @array[1],3
@@ -2094,16 +2145,16 @@ array, shifting all the elements beyond this towards the beginning.
*strcharinfo(<type>)
-This function will return either the name, party name or guild name for the
-invoking character. Whatever it returns is determined by type.
+This function will return either the name, party name or guild name for
+the invoking character. Whatever it returns is determined by type.
0 - Character's name.
1 - The name of the party they're in if any.
2 - The name of the guild they're in if any.
3 - The name of the map the character is in.
-If a character is not a member of any party or guild, an empty string will be
-returned when requesting that information.
+If a character is not a member of any party or guild, an empty string will
+be returned when requesting that information.
---------------------------------------
@@ -2123,8 +2174,8 @@ Whatever it returns is determined by type.
*getarraysize(<array name>)
This function returns the number of values that are contained inside the
-specified array. Notice that zeros and empty strings at the end of this array
-are not counted towards this number.
+specified array. Notice that zeros and empty strings at the end of this
+array are not counted towards this number.
For example:
@@ -2142,15 +2193,16 @@ This will make @arraysize == 6. But if you try this:
*getelementofarray(<array name>,<index>)
-This command retrieves the value of the element of given array at given index.
-This is equivalent to using:
+This command retrieves the value of the element of given array at given
+index. This is equivalent to using:
<array name>[<index>]
-The reason for this is, that this short form is internally converted into a call
-to getelementofarray, when the script is loaded.
+The reason for this is, that this short form is internally converted into
+a call to getelementofarray, when the script is loaded.
-Also useful when passing arrays to functions or accessing another npc's arrays:
+Also useful when passing arrays to functions or accessing another npc's
+arrays:
getelementofarray(getarg(0),<index>)
getelementofarray(getvariableofnpc(.var, "testNPC"),<index>)
@@ -2158,26 +2210,26 @@ Also useful when passing arrays to functions or accessing another npc's arrays:
*readparam(<parameter number>)
-This function will return the basic stats of an invoking character, referred to
-by the parameter number. Instead of a number, you can use a parameter name if it
-is defined in 'db/const.txt'.
+This function will return the basic stats of an invoking character,
+referred to by the parameter number. Instead of a number, you can use a
+parameter name if it is defined in 'db/const.txt'.
Example parameters:
-StatusPoint, BaseLevel, SkillPoint, Class, Upper, Zeny, Sex, Weight, MaxWeight,
-JobLevel, BaseExp, JobExp, NextBaseExp, NextJobExp, Hp, MaxHp, Sp, MaxSp,
-BaseJob, Karma, Manner, bVit, bDex, bAgi, bStr, bInt, bLuk
+StatusPoint, BaseLevel, SkillPoint, Class, Upper, Zeny, Sex, Weight,
+MaxWeight, JobLevel, BaseExp, JobExp, NextBaseExp, NextJobExp, Hp, MaxHp,
+Sp, MaxSp, BaseJob, Karma, Manner, bVit, bDex, bAgi, bStr, bInt, bLuk
-All of these also behave as variables, but don't expect to be able to just 'set'
-them - some will not work for various internal reasons.
+All of these also behave as variables, but don't expect to be able to just
+'set' them - some will not work for various internal reasons.
Example 1:
// Returns how many status points you haven't spent yet.
mes "Unused status points: "+readparam(9);
-Using this particular information as a function call is not required. Typing this
-will return the same result:
+Using this particular information as a function call is not required.
+Typing this will return the same result:
mes "Unused status points: "+StatusPoint;
@@ -2192,8 +2244,8 @@ You can also use this command to get stat values.
*getcharid(<type>{,"<character name>"})
-This function will return a unique ID number of the invoking character, or, if a
-character name is specified, of that player.
+This function will return a unique ID number of the invoking character,
+or, if a character name is specified, of that player.
Type is the kind of associated ID number required:
@@ -2203,16 +2255,16 @@ Type is the kind of associated ID number required:
3 - Account ID number.
4 - Battle ground ID
-For most purposes other than printing it, a number is better to have than a name
-(people do horrifying things to their character names).
+For most purposes other than printing it, a number is better to have than
+a name (people do horrifying things to their character names).
-If the character is not in a party or not in a guild, the function will return 0
-if guild or party number is requested. If a name is specified and the character
-is not found, 0 is returned.
+If the character is not in a party or not in a guild, the function will
+return 0 if guild or party number is requested. If a name is specified and
+the character is not found, 0 is returned.
-If getcharid(0) returns a zero, the script got called not by a character and
-doesn't have an attached RID. Note that this will cause the map server to
-print "player not attached!" error messages, so it is preferred to use
+If getcharid(0) returns a zero, the script got called not by a character
+and doesn't have an attached RID. Note that this will cause the map server
+to print "player not attached!" error messages, so it is preferred to use
"playerattached" to check for the character attached to the script.
if( getcharid(2) == 0 ) mes "Only members of a guild are allowed here!";
@@ -2221,9 +2273,9 @@ if( getcharid(2) == 0 ) mes "Only members of a guild are allowed here!";
*getnpcid(<type>{,"<npc name>"});
-Retrieves IDs of the currently invoked NPC. If a unique npc name is
-given, IDs of that NPC are retrieved instead. Type specifies what ID
-to retrieve and can be one of the following:
+Retrieves IDs of the currently invoked NPC. If a unique npc name is given,
+IDs of that NPC are retrieved instead. Type specifies what ID to retrieve
+and can be one of the following:
0 - Unit ID (GID)
@@ -2235,7 +2287,7 @@ If an invalid type is given or the NPC does not exist, 0 is returned.
*getmotherid()
*getfatherid()
-These functions return the character ID of the attached player's child,
+These functions return the character ID of the attached player's child,
mother, mother, or father, respectively. It returns 0 if no ID is found.
if (getmotherid()) mes "Your mother's ID is: "+getmotherid();
@@ -2251,39 +2303,40 @@ currently online and 0 if they are not or if the character has no partner.
*getpartnerid()
-This function returns the character ID of the invoking character's marriage
-partner, if any. If the invoking character is not married, it will return 0,
-which is a quick way to see if they are married:
+This function returns the character ID of the invoking character's
+marriage partner, if any. If the invoking character is not married, it
+will return 0, which is a quick way to see if they are married:
- if (getpartnerid()) mes "I'm not going to be your girlfriend!";
+ if (!getpartnerid()) mes "I'm not going to be your girlfriend!";
if (getpartnerid()) mes "You're married already!";
---------------------------------------
*getpartyname(<party id>)
-This function will return the name of a party that has the specified ID number.
-If there is no such party ID, "null" will be returned.
+This function will return the name of a party that has the specified ID
+number. If there is no such party ID, "null" will be returned.
Lets say the ID of a party was saved as a global variable:
- // This would return the name of the party from the ID stored in a variable
+ // This would return the name of the party from the ID stored in a
+ // variable
mes "You're in the '"+getpartyname($@var)+"' party, I know!";
---------------------------------------
*getpartymember <party id>{,<type>};
-This command will find all members of a specified party and returns their names
-(or character id or account id depending on the value of "type") into an array
-of temporary global variables. There's actually quite a few commands like this
-which will fill a special variable with data upon execution and not do anything
-else.
+This command will find all members of a specified party and returns their
+names (or character id or account id depending on the value of "type")
+into an array of temporary global variables. There's actually quite a few
+commands like this which will fill a special variable with data upon
+execution and not do anything else.
Upon executing this,
-$@partymembername$[] is a global temporary string array which contains all the
- names of these party members
+$@partymembername$[] is a global temporary string array which contains all
+ the names of these party members.
(only set when type is 0 or not specified)
$@partymembercid[] is a global temporary number array which contains the
@@ -2296,18 +2349,19 @@ $@partymemberaid[] is a global temporary number array which contains the
$@partymembercount is the number of party members that were found.
-The party members will (apparently) be found regardless of whether they are
-online or offline. Note that the names come in no particular order.
+The party members will (apparently) be found regardless of whether they
+are online or offline. Note that the names come in no particular order.
Be sure to use $@partymembercount to go through this array, and not
-'getarraysize', because it is not cleared between runs of 'getpartymember'. If
-someone with 7 party members invokes this script, the array would have 7
-elements. But if another person calls up the NPC, and he has a party of 5, the
-server will not clear the array for you, overwriting the values instead. So in
-addition to returning the 5 member names, the 6th and 7th elements from the last
-call remain, and you will get 5+2 members, of which the last 2 don't belong to
-the new guy's party. $@partymembercount will always contain the correct number,
-(5) unlike 'getarraysize()' which will return 7 in this case.
+'getarraysize', because it is not cleared between runs of 'getpartymember'.
+If someone with 7 party members invokes this script, the array would have
+7 elements. But if another person calls up the NPC, and he has a party of
+5, the server will not clear the array for you, overwriting the values
+instead. So in addition to returning the 5 member names, the 6th and 7th
+elements from the last call remain, and you will get 5+2 members, of which
+the last 2 don't belong to the new guy's party. $@partymembercount will
+always contain the correct number, (5) unlike 'getarraysize()' which will
+return 7 in this case.
Example 1: list party member names
@@ -2315,10 +2369,10 @@ Example 1: list party member names
getpartymember getcharid(1),0;
// It's a good idea to copy the global temporary $@partymember*****
- // variables to your own scope variables because if you have pauses in this
- // script (sleep, sleep2, next, close2, input, menu, select, or prompt),
- // another player could click this NPC, trigger 'getpartymember', and
- // overwrite the $@partymember***** variables.
+ // variables to your own scope variables because if you have pauses in
+ // this script (sleep, sleep2, next, close2, input, menu, select, or
+ // prompt), another player could click this NPC, trigger
+ // 'getpartymember', and overwrite the $@partymember***** variables.
set .@count, $@partymembercount;
copyarray .@name$[0], $@partymembername$[0], $@partymembercount;
@@ -2346,10 +2400,11 @@ Example 2: check party count (with a 'next' pause), before warping to event
for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 )
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) )
set .@count_online, .@count_online +1 ;
- // We search accountID & charID because a single party can have multiple
- // characters from the same account. Without searching through the charID,
- // if a player has 2 characters from the same account inside the party but
- // only 1 char online, it would count their online char twice.
+ // We search accountID & charID because a single party can have
+ // multiple characters from the same account. Without searching
+ // through the charID, if a player has 2 characters from the same
+ // account inside the party but only 1 char online, it would count
+ // their online char twice.
if ( .@count_online != .register_num ) {
mes "All your party members must be online to continue";
@@ -2363,9 +2418,10 @@ Example 2: check party count (with a 'next' pause), before warping to event
next; // careful here
select "Yes";
- // When a script hits a next, menu, sleep or input that pauses the script,
- // players can invite or /leave and make changes in their party. To prevent
- // this, we call getpartymember again and compare with the original values.
+ // When a script hits a next, menu, sleep or input that pauses the
+ // script, players can invite or /leave and make changes in their
+ // party. To prevent this, we call getpartymember again and compare
+ // with the original values.
getpartymember getcharid(1), 1;
if ( $@partymembercount != .register_num ) {
@@ -2387,8 +2443,8 @@ Example 2: check party count (with a 'next' pause), before warping to event
*getpartyleader(<party id>{,<type>})
This function returns some information about the given party-id's leader.
-When type is omitted, the default information retrieved is the leader's name.
-Possible types are:
+When type is omitted, the default information retrieved is the leader's
+name. Possible types are:
1: Leader account id
2: Leader character id
@@ -2397,8 +2453,9 @@ Possible types are:
5: Leader's current level as stored on the party structure (may not be
current level if leader leveled up recently).
-If retrieval fails (leader not found or party does not exist), this function
-returns "null" instead of the character name, and -1 for the other types.
+If retrieval fails (leader not found or party does not exist), this
+function returns "null" instead of the character name, and -1 for the
+other types.
---------------------------------------
@@ -2407,16 +2464,16 @@ returns "null" instead of the character name, and -1 for the other types.
This function will return the number for the current character look value
specified by type. See 'setlook' for valid look types.
-This can be used to make a certain script behave differently for characters
-dressed in black. :)
+This can be used to make a certain script behave differently for
+characters dressed in black. :)
---------------------------------------
*getsavepoint(<information type>)
-This function will return information about the invoking character's save point.
-You can use it to let a character swap between several recorded save points.
-Available information types are:
+This function will return information about the invoking character's save
+point. You can use it to let a character swap between several recorded
+save points. Available information types are:
0 - Map name (a string)
1 - X coordinate
@@ -2426,8 +2483,9 @@ Available information types are:
*getcharip({"<character name>"|<account id>|<char id>})
-This function will return the IP address of the invoking character, or, if a player
-is specified, of that character. A blank string is returned if no player is attached.
+This function will return the IP address of the invoking character, or, if
+a player is specified, of that character. A blank string is returned if no
+player is attached.
Examples:
@@ -2445,9 +2503,9 @@ Examples:
*getequipid(<equipment slot>)
-This function returns the item ID of the item equipped in the equipment slot
-specified on the invoking character. If nothing is equipped there, it returns -1.
-Valid equipment slots are:
+This function returns the item ID of the item equipped in the equipment
+slot specified on the invoking character. If nothing is equipped there, it
+returns -1. Valid equipment slots are:
EQI_HEAD_TOP (1) - Upper head gear
EQI_ARMOR (2) - Armor (Where you keep your Jackets and Robes)
@@ -2463,8 +2521,9 @@ EQI_COSTUME_HEAD_LOW (11) - Lower Costume Headgear
EQI_COSTUME_HEAD_MID (12) - Middle Costume Headgear
EQI_COSTUME_HEAD_TOP (13) - Upper Costume Headgear
-Notice that a few items occupy several equipment slots, and if the character is
-wearing such an item, 'getequipid' will return it's ID number for either slot.
+Notice that a few items occupy several equipment slots, and if the
+character is wearing such an item, 'getequipid' will return it's ID number
+for either slot.
Can be used to check if you have something equipped, or if you haven't got
something equipped:
@@ -2476,13 +2535,15 @@ something equipped:
mes "What a lovely Tiara you have on";
close;
-You can also use it to make sure people don't pass a point before removing an
-item totally from them. Let's say you don't want people to wear Legion Plate
-armor, but also don't want them to equip if after the check, you would do this:
+You can also use it to make sure people don't pass a point before removing
+an item totally from them. Let's say you don't want people to wear Legion
+Plate armor, but also don't want them to equip if after the check, you
+would do this:
if ((getequipid(EQI_ARMOR) == 2341) || (getequipid(EQI_ARMOR) == 2342) goto L_EquipedLegionPlate;
- // the || is used as an or argument, there is 2341 and 2342 cause there are
- // two different legion plate armors, one with a slot one without.
+ // the || is used as an or argument, there is 2341 and 2342 cause
+ // there are two different legion plate armors, one with a slot one
+ // without.
if ((countitem(2341) > 0) || (countitem(2432) > 0) goto L_InventoryLegionPlate;
mes "I will lets you pass";
close2;
@@ -2499,10 +2560,11 @@ armor, but also don't want them to equip if after the check, you would do this:
*getequipname(<equpment slot>)
-Returns the jname of the item equipped in the specified equipment slot on the
-invoking character, or an empty string if nothing is equipped in that position.
-Does the same thing as getitemname(getequipid()). Useful for an NPC to state
-what your are wearing, or maybe saving as a string variable.
+Returns the jname of the item equipped in the specified equipment slot on
+the invoking character, or an empty string if nothing is equipped in that
+position.
+Does the same thing as getitemname(getequipid()). Useful for an NPC to
+state what your are wearing, or maybe saving as a string variable.
See 'getequipid' for a full list of valid equipment slots.
if( getequipname(EQI_HEAD_TOP) != "" )
@@ -2514,18 +2576,19 @@ See 'getequipid' for a full list of valid equipment slots.
*getitemname(<item id>)
-Given the database ID number of an item, this function will return the text
-stored in the 'japanese name' field (which, in Hercules, stores an English name
-the players would normally see on screen.)
+Given the database ID number of an item, this function will return the
+text stored in the 'japanese name' field (which, in Hercules, stores an
+English name the players would normally see on screen).
---------------------------------------
*getbrokenid(<number>)
-This function will search the invoking character's inventory for any broken
-items, and will return their item ID numbers. Since the character may have
-several broken items, 1 given as an argument will return the first one found, 2
-will return the second one, etc. Will return 0 if no such item is found.
+This function will search the invoking character's inventory for any
+broken items, and will return their item ID numbers. Since the character
+may have several broken items, 1 given as an argument will return the
+first one found, 2 will return the second one, etc. Will return 0 if no
+such item is found.
// Let's see if they have anything broken:
if (getbrokenid(1)==0) goto Skip;
@@ -2538,8 +2601,8 @@ will return the second one, etc. Will return 0 if no such item is found.
*getequipisequiped(<equipment slot>)
-This functions will return 1 if there is an equipment placed on the specified
-equipment slot and 0 otherwise. For a list of equipment slots
+This functions will return 1 if there is an equipment placed on the
+specified equipment slot and 0 otherwise. For a list of equipment slots
see 'getequipid'. Function originally used by the refining NPCs:
if (getequipisequiped(EQI_HEAD_TOP)) goto L_equipped;
@@ -2555,9 +2618,9 @@ see 'getequipid'. Function originally used by the refining NPCs:
*getequipisenableref(<equipment slot>)
-Will return 1 if the item equipped on the invoking character in the specified
-equipment slot is refinable, and 0 if it isn't. For a list of equipment slots
-see 'getequipid'.
+Will return 1 if the item equipped on the invoking character in the
+specified equipment slot is refinable, and 0 if it isn't. For a list of
+equipment slots see 'getequipid'.
if (getequipisenableref(EQI_HEAD_TOP)) goto L_Refine;
mes "[Refiner]";
@@ -2572,11 +2635,11 @@ see 'getequipid'.
*getequiprefinerycnt(<equipment slot>)
-Returns the current number of pluses for the item in the specified equipment
-slot. For a list of equipment slots see 'getequipid'.
+Returns the current number of pluses for the item in the specified
+equipment slot. For a list of equipment slots see 'getequipid'.
-Can be used to check if you have reached a maximum refine value, default for
-this is +10:
+Can be used to check if you have reached a maximum refine value, default
+for this is +10:
if(getequiprefinerycnt(EQI_HEAD_TOP) < 10) goto L_Refine_HeadGear;
mes "Sorry, it's not possible to refine hats better than +10";
@@ -2588,13 +2651,13 @@ this is +10:
*getequipweaponlv(<equipment slot>)
-This function returns the weapon level for the weapon equipped in the specified
-equipment slot on the invoking character. For a list of equipment slots see
-'getequipid'.
+This function returns the weapon level for the weapon equipped in the
+specified equipment slot on the invoking character. For a list of
+equipment slots see 'getequipid'.
-Only EQI_HAND_L and EQI_HAND_R normally make sense, since only weapons have
-a weapon level. You can, however, probably, use this field for other equippable
-custom items as a flag or something.
+Only EQI_HAND_L and EQI_HAND_R normally make sense, since only weapons
+have a weapon level. You can, however, probably, use this field for other
+equippable custom items as a flag or something.
If no item is equipped in this slot, or if it doesn't have a weapon level
according to the database, 0 will be returned.
@@ -2629,48 +2692,49 @@ Examples:
*getequippercentrefinery(<equipment slot>)
-This function calculates and returns the percent value chance to successfully
-refine the item found in the specified equipment slot of the invoking character
-by +1. There is no actual formula, the success rate for a given weapon level of
-a certain refine level is found in the db/refine_db.txt file. For a list of
-equipment slots see 'getequipid'.
+This function calculates and returns the percent value chance to
+successfully refine the item found in the specified equipment slot of the
+invoking character by +1. There is no actual formula, the success rate for
+a given weapon level of a certain refine level is found in the
+db/refine_db.txt file. For a list of equipment slots see 'getequipid'.
-These values can be displayed for the player to see, or used to calculate the
-random change of a refine succeeding or failing and then going through with it
-(which is what the official NPC refinery scripts use it for)
+These values can be displayed for the player to see, or used to calculate
+the random change of a refine succeeding or failing and then going through
+with it (which is what the official NPC refinery scripts use it for).
-// This will find a random number from 0 - 99 and if that is equal to or more
-// than the value recovered by this command it will go to L_Fail
+// This will find a random number from 0 - 99 and if that is equal to or
+// more than the value recovered by this command it will go to L_Fail
if (getequippercentrefinery(EQI_HAND_L)<=rand(100)) goto L_Fail;
---------------------------------------
*getareadropitem("<map name>",<x1>,<y1>,<x2>,<y2>,<item>)
-This function will count all the items with the specified ID number lying on the
-ground on the specified map within the x1/y1-x2/y2 square on it and return that
-number.
+This function will count all the items with the specified ID number lying
+on the ground on the specified map within the x1/y1-x2/y2 square on it and
+return that number.
-This is the only function around where a parameter may be either a string or a
-number! If it's a number, it means that only the items with that item ID number
-will be counted. If it is a string, it is assumed to mean the 'english name'
-field from the item database. If you give it an empty string, or something that
-isn't found from the item database, it will count items number '512' (apples).
+This is the only function around where a parameter may be either a string
+or a number! If it's a number, it means that only the items with that item
+ID number will be counted. If it is a string, it is assumed to mean the
+'english name' field from the item database. If you give it an empty
+string, or something that isn't found from the item database, it will
+count items number '512' (apples).
---------------------------------------
*getequipcardcnt(<equipment slot>)
-This function will return the number of cards that have been compounded onto a
-specific equipped item for the invoking character. See 'getequipid' for a list
-of possible equipment slots.
+This function will return the number of cards that have been compounded
+onto a specific equipped item for the invoking character. See 'getequipid'
+for a list of possible equipment slots.
---------------------------------------
*getinventorylist;
This command sets a bunch of arrays with a complete list of whatever the
-invoking character has in their inventory, including all the data needed to
+invoking character has in its inventory, including all the data needed to
recreate these items perfectly if they are destroyed. Here's what you get:
@inventorylist_id[] - array of item ids.
@@ -2679,33 +2743,34 @@ recreate these items perfectly if they are destroyed. Here's what you get:
@inventorylist_refine[] - for how much it is refined.
@inventorylist_identify[] - whether it is identified.
@inventorylist_attribute[] - whether it is broken.
-@inventorylist_card1[] - These four arrays contain card data for the items.
-@inventorylist_card2[] These data slots are also used to store names
-@inventorylist_card3[] inscribed on the items, so you can explicitly check
-@inventorylist_card4[] if the character owns an item made by a specific
- craftsman.
-@inventorylist_expire[] - expire time (Unix time stamp). 0 means never expires.
+@inventorylist_card1[] - These four arrays contain card data for the
+@inventorylist_card2[] items. These data slots are also used to store
+@inventorylist_card3[] names inscribed on the items, so you can
+@inventorylist_card4[] explicitly check if the character owns an item
+ made by a specific craftsman.
+@inventorylist_expire[] - expire time (Unix time stamp). 0 means never
+ expires.
@inventorylist_count - the number of items in these lists.
-This could be handy to save/restore a character's inventory, since no other
-command returns such a complete set of data, and could also be the only way to
-correctly handle an NPC trader for carded and named items who could resell them
-- since NPC objects cannot own items, so they have to store item data in
-variables and recreate the items.
+This could be handy to save/restore a character's inventory, since no
+other command returns such a complete set of data, and could also be the
+only way to correctly handle an NPC trader for carded and named items who
+could resell them - since NPC objects cannot own items, so they have to
+store item data in variables and recreate the items.
-Notice that the variables this command generates are all temporary, attached to
-the character, and integer.
+Notice that the variables this command generates are all temporary,
+attached to the character, and integer.
Be sure to use @inventorylist_count to go through these arrays, and not
-'getarraysize', because the arrays are not automatically cleared between runs
-of 'getinventorylist'.
+'getarraysize', because the arrays are not automatically cleared between
+runs of 'getinventorylist'.
---------------------------------------
*cardscnt()
-This function will return the number of cards inserted into the weapon currently
-equipped on the invoking character.
+This function will return the number of cards inserted into the weapon
+currently equipped on the invoking character.
While this function was meant for item scripts, it will work outside them:
if (cardscnt()==4) mes "So you've stuck four cards into that weapon, think you're cool now?";
@@ -2714,9 +2779,8 @@ While this function was meant for item scripts, it will work outside them:
*getrefine()
-This function will return the number of pluses the weapon currently equipped on
-the invoking character has been refined for.
-While this function was meant for item scripts, it will work outside them:
+This function will return the refine count of the equipment from which
+the function is called. This function is intended for use in item scripts.
if (getrefine()==10) mes "Wow. That's a murder weapon.";
@@ -2725,27 +2789,29 @@ While this function was meant for item scripts, it will work outside them:
*getnameditem(<item id>,"<name to inscribe>");
*getnameditem("<item name>","<name to inscribe>");
-This function is equivalent to using 'getitem', however, it will not just give
-the character an item object, but will also inscribe it with a specified
-character's name. You may not inscribe items with arbitrary strings, only with
-names of characters that actually exist. While this isn't said anywhere
-specifically, apparently, named items may not have cards in them, slots or no -
-these data slots are taken by the character ID who's name is inscribed. Only one
-remains free and it's not quite clear if a card may be there.
+This function is equivalent to using 'getitem', however, it will not just
+give the character an item object, but will also inscribe it with a
+specified character's name. You may not inscribe items with arbitrary
+strings, only with names of characters that actually exist. While this
+isn't said anywhere specifically, apparently, named items may not have
+cards in them, slots or no - these data slots are taken by the character
+ID who's name is inscribed. Only one remains free and it's not quite clear
+if a card may be there.
-This function will return 1 if an item was successfully created and 0 if it
-wasn't for whatever reason. Like 'getitem', this function will also accept an
-'english name' from the item database as an item name and will return 0 if no
-such item exists.
+This function will return 1 if an item was successfully created and 0 if
+it wasn't for whatever reason. Like 'getitem', this function will also
+accept an 'english name' from the item database as an item name and will
+return 0 if no such item exists.
---------------------------------------
*getitemslots(<item ID>)
-This function will look up the item with the specified ID number in the database
-and return the number of slots this kind of items has - 0 if they are not
-slotted. It will also be 0 for all non-equippable items, naturally, unless
-someone messed up the item database. It will return -1 if there is no such item.
+This function will look up the item with the specified ID number in the
+database and return the number of slots this kind of items has - 0 if they
+are not slotted. It will also be 0 for all non-equippable items,
+naturally, unless someone messed up the item database. It will return -1
+if there is no such item.
Example:
@@ -2756,8 +2822,8 @@ Example:
*getiteminfo(<item ID>,<type>)
-This function will look up the item with the specified ID number in the database
-and return the info set by TYPE argument.
+This function will look up the item with the specified ID number in the
+database and return the info set by TYPE argument.
It will return -1 if there is no such item.
Valid types are:
@@ -2776,10 +2842,11 @@ Check sample in doc/sample/getiteminfo.txt
*getequipcardid(<equipment slot>,<card slot>)
-Returns value from equipped item slot in the indicated slot (0, 1, 2, or 3).
+Returns value for equipped item slot in the indicated slot (0, 1, 2, or 3).
-This function returns CARD ID, 255,254,-255 (for card 0, if the item is produced).
-It's useful for when you want to check whether an item contains cards or if it's signed.
+This function returns CARD ID, 255,254,-255 (for card 0, if the item is
+produced). It's useful for when you want to check whether an item contains
+cards or if it's signed.
---------------------------------------
//
@@ -2789,10 +2856,10 @@ It's useful for when you want to check whether an item contains cards or if it's
*getmapxy("<variable for map name>",<variable for x>,<variable for y>,<type>{,"<search string>"})
-This function will locate a character object, NPC object or pet's coordinates
-and place their coordinates into the variables specified when calling it. It
-will return 0 if the search was successful, and -1 if the parameters given were
-not variables or the search was not successful.
+This function will locate a character object, NPC object or pet's
+coordinates and place their coordinates into the variables specified when
+calling it. It will return 0 if the search was successful, and -1 if the
+parameters given were not variables or the search was not successful.
Type is the type of object to search for:
@@ -2804,16 +2871,16 @@ Type is the type of object to search for:
5 - Mercenary object
6 - Elemental object
-While 3 is meant to look for a monster object, no searching will be done if you
-specify type 3, and the function will always return -1.
+While 3 is meant to look for a monster object, no searching will be done
+if you specify type 3, and the function will always return -1.
The search string is optional. If it is not specified, the location of the
-invoking character will always be returned for types 0 and 2, the location of
-the NPC running this function for type 1.
-If a search string is specified, for types 0 and 1, the character or NPC with
-the specified name will be located. If type is 3, the search will locate the
-current pet of the character who's name is given in the search string, it will
-NOT locate a pet by name.
+invoking character will always be returned for types 0 and 2, the location
+of the NPC running this function for type 1.
+If a search string is specified, for types 0 and 1, the character or NPC
+with the specified name will be located. If type is 3, the search will
+locate the current pet of the character who's name is given in the search
+string, it will NOT locate a pet by name.
What a mess. Example, a working and tested one now:
@@ -2839,12 +2906,13 @@ Notice that NPC objects disabled with 'disablenpc' will still be located.
*getgmlevel()
-This function will return the (GM) level of player group the account to which the
-invoking character belongs. If this is somehow executed from a console command,
-99 will be returned, and 0 will be returned if the account has no GM level.
+This function will return the (GM) level of player group the account to
+which the invoking character belongs. If this is somehow executed from a
+console command, 99 will be returned, and 0 will be returned if the
+account has no GM level.
-This allows you to make NPC's only accessible for certain GM levels, or behave
-specially when talked to by GMs.
+This allows you to make NPC's only accessible for certain GM levels, or
+behave specially when talked to by GMs.
if (getgmlevel()) mes "What is your command, your godhood?";
if (getgmlevel()) goto Wherever;
@@ -2860,22 +2928,24 @@ invoking player belongs.
*gettimetick(<tick type>)
-This function will return the system time in UNIX epoch time (if tick type is 2)
-or the time since the start of the current day in seconds if tick type is 1.
+This function will return the system time in UNIX epoch time (if tick type
+is 2) or the time since the start of the current day in seconds if tick
+type is 1.
Passing 0 will make it return the server's tick, which is a measurement in
milliseconds used by the server's timer system. The server's tick is an
unsigned int which loops every ~50 days.
-Just in case you don't know, UNIX epoch time is the number of seconds elapsed
-since 1st of January 1970, and is useful to see, for example, for how long the
-character has been online with OnPCLoginEvent and OnPCLogoutEvent, which could allow
-you to make an 'online time counted for conviction only' jail script.
+Just in case you don't know, UNIX epoch time is the number of seconds
+elapsed since 1st of January 1970, and is useful to see, for example,
+for how long the character has been online with OnPCLoginEvent and
+OnPCLogoutEvent, which could allow you to make an 'online time counted for
+conviction only' jail script.
---------------------------------------
*gettime(<type>)
-This function will return specified information about the current system time.
+This function returns specified information about the current system time.
1 - Seconds (of a minute)
2 - Minutes (of an hour)
@@ -2894,12 +2964,12 @@ It will only return numbers.
*gettimestr(<format string>,<max length>)
-This function will return a string containing time data as specified by the
-format string.
+This function will return a string containing time data as specified by
+the format string.
-This uses the C function 'strfmtime', which obeys special format characters. For
-a full description see, for example, the description of 'strfmtime' at
-http://www.delorie.com/gnu/docs/glibc/libc_437.html
+This uses the C function 'strfmtime', which obeys special format
+characters. For a full description see, for example, the description of
+'strfmtime' at http://www.delorie.com/gnu/docs/glibc/libc_437.html
All the format characters given in there should properly work.
Max length is the maximum length of a time string to generate.
@@ -2913,10 +2983,10 @@ This will print a full date and time like 'YYYY-MM/DD HH:MM:SS'.
*getusers(<type>)
-This function will return a number of users on a map or the whole server. What
-it returns is specified by Type.
+This function will return a number of users on a map or the whole server.
+What it returns is specified by Type.
-Type can be one of the following values, which control what will be returned:
+Type can be one of the following values, which control what is returned:
0 - Count of all characters on the map of the invoking character.
1 - Count of all characters in the entire server.
@@ -2927,30 +2997,31 @@ Type can be one of the following values, which control what will be returned:
*getmapusers("<map name>")
-This function will return the number of users currently located on the specified
-map.
+This function will return the number of users currently located on the
+specified map.
-Currently being used in the PVP scripts to check if a PVP room is full of not,
-if the number returned it equal to the maximum allowed it will not let you
-enter.
+Currently being used in the PVP scripts to check if a PVP room is full of
+not, if the number returned it equal to the maximum allowed it will not
+let you enter.
---------------------------------------
*getareausers("<map name>",<x1>,<y1>,<x2>,<y2>)
-This function will return the count of connected characters which are located
-within the specified area - an x1/y1-x2/y2 square on the specified map.
+This function will return the count of connected characters which are
+located within the specified area - an x1/y1-x2/y2 square - on the
+specified map.
-This is useful for maps that are split into many buildings, such as all the
-"*_in" maps, due to all the shops and houses.
+This is useful for maps that are split into many buildings, such as all
+the "*_in" maps, due to all the shops and houses.
---------------------------------------
*getusersname;
-This command will give the invoking character a list of names of the connected
-characters (including themselves) into an NPC script message window (see 'mes')
-paging it by 10 names as if with the 'next' command.
+This command will give the invoking character a list of names of the
+connected characters (including themselves) into an NPC script message
+window (see 'mes') paging it by 10 names as if with the 'next' command.
You need to put a 'close' after that yourself.
@@ -2961,31 +3032,31 @@ You need to put a 'close' after that yourself.
---------------------------------------
*getguildname(<guild id>)
-This function returns a guild's name given an ID number. If there is no such
-guild, "null" will be returned;
+This function returns a guild's name given an ID number. If there is no
+such guild, "null" will be returned;
- // Would print what ever guild 10007 is, in my case this would return "AlcoROhics"
+ // Would print whatever guild 10007 name is.
mes "The guild "+GetGuildName(10007)+" are all nice people.";
// This will do the same as above:
set @var,10007;
mes "We have some friends in "+GetGuildName(@var)+", you know.";
-This is used all over the WoE controlling scripts. You could also use it for a
-guild-based event.
+This is used all over the WoE controlling scripts. You could also use it
+for a guild-based event.
---------------------------------------
*getguildmaster(<guild id>)
-This function return the name of the master of the guild which has the specified
-ID number. If there is no such guild, "null" will be returned.
+This function return the name of the master of the guild which has the
+specified ID number. If there is no such guild, "null" will be returned.
// Would return the guild master of guild 10007, whatever that might be.
-// In this example it would return "MissDjax" cause she owns "AlcoROhics" (10007)
mes getguildmaster(10007)+" runs "+getguildname(10007);
-Can be used to check if the character is the guild master of the specified guild.
+Can be used to check if the character is the guild master of the specified
+guild.
Maybe you want to make a room only guild masters can enter:
@@ -3006,23 +3077,25 @@ Maybe you want to make a room only guild masters can enter:
*getguildmasterid(<guild id>)
-This function will return the character ID number of the guild master of the
-guild specified by the ID. 0 if the character is not a guild master of any guild.
+This function will return the character ID number of the guild master of
+the guild specified by the ID. 0 if the character is not a guild master of
+any guild.
---------------------------------------
*getcastlename("<map name>")
-This function returns the name of the castle when given the map name for that
-castle. The data is read from 'db/castle_db.txt'.
+This function returns the name of the castle when given the map name for
+that castle. The data is read from 'db/castle_db.txt'.
---------------------------------------
*getcastledata("<map name>",<type of data>)
*setcastledata "<map name>",<type of data>,<value>;
-This function returns the castle ownership information for the castle referred
-to by its map name. Castle information is stored in `guild_castle` SQL table.
+This function returns the castle ownership information for the castle
+referred to by its map name. Castle information is stored in
+`guild_castle` SQL table.
Types of data correspond to `guild_castle` table columns:
@@ -3044,15 +3117,15 @@ Types of data correspond to `guild_castle` table columns:
16 - `visibleG6` - Is 1 if the 7th guardian is present (Knight Guardian)
17 - `visibleG7` - Is 1 if the 8th guardian is present (Knight Guardian)
-All types of data have their meaning determined by War of Emperium scripts,
-with exception of:
- - `guild_id` that is always considered ID of the guild that owns the castle,
+All types of data have their meaning determined by War of Emperium
+scripts, with exception of:
+ - `guild_id` that is always the ID of the guild that owns the castle,
- `defense` that is used in Guardians & Emperium HP calculations,
- `visibleG` that is always considered to hold guardian presence bits.
-The 'setcastledata' command will behave identically, but instead of returning
-values for the specified types of accessible data, it will alter them and cause
-them to be sent to the char-server for storage.
+The 'setcastledata' command will behave identically, but instead of
+returning values for the specified types of accessible data, it will alter
+them and cause them to be sent to the char-server for storage.
Changing Guild ID or Castle Defense will trigger additional actions, like
recalculating guardians' HP.
@@ -3062,20 +3135,22 @@ recalculating guardians' HP.
*getgdskilllv(<guild id>,<skill id>)
*getgdskilllv(<guild id>,"<skill name>")
-This function returns the level of the skill <skill id> of the guild <guild id>.
+This function returns the level of the skill <skill id> of the guild
+<guild id>.
If the guild does not have that skill, 0 is returned.
If the guild does not exist, -1 is returned.
-Refer to 'db/(pre-)re/skill_db.txt' for the full list of skills. (GD_* are guild skills)
+Refer to 'db/(pre-)re/skill_db.txt' for the full list of skills.
+GD_* are guild skills
---------------------------------------
*requestguildinfo <guild id>{,"<event label>"};
-This command requests the guild data from the char server and merrily continues
-with the execution. Whenever the guild information becomes available (which
-happens instantly if the guild information is already in memory, or later, if it
-isn't and the map server has to wait for the char server to reply) it will run
-the specified event as in a 'doevent' call.
+This command requests the guild data from the char server and merrily
+continues with the execution. Whenever the guild information becomes
+available (which happens instantly if the guild information is already in
+memory, or later, if it isn't and the map server has to wait for the char
+server to reply) it will run the specified event as in a 'doevent' call.
---------------------------------------
@@ -3097,11 +3172,12 @@ mes "You have "+getMapGuildUsers("prontera",getcharid(2))+" guild members in Pro
*getskilllv("<skill name>")
This function returns the level of the specified skill that the invoking
-character has. If they don't have the skill, 0 will be returned. The full list
-of character skills is available in 'db/(pre-)re/skill_db.txt'.
+character has. If they don't have the skill, 0 will be returned. The full
+list of character skills is available in 'db/(pre-)re/skill_db.txt'.
-There are two main uses for this function, it can check whether the character
-has a skill or not, and it can tell you if the level is high enough.
+There are two main uses for this function, it can check whether the
+character has a skill or not, and it can tell you if the level is high
+enough.
Example 1:
@@ -3138,48 +3214,35 @@ invoking character has. Here's what you get:
@skilllist_count - number of skills in the above arrays.
While 'getskillv' is probably more useful for most situations, this is the
-easiest way to store all the skills and make the character something else for a
-while. Advanced job for a day? :) This could also be useful to see how many
-skills a character has.
+easiest way to store all the skills and make the character something else
+for a while. Advanced job for a day? :) This could also be useful to see
+how many skills a character has.
---------------------------------------
*getpetinfo(<type>)
-This function will return pet information for the pet the invoking character
-currently has active. Valid types are:
+This function will return pet information for the pet the invoking
+character currently has active. Valid types are:
- 0 - Unique pet ID number as stored by the char server and distinguishing it
- from all other pets the characters actually have. This value is currently
- useless, at most you can use it to tell pets apart reliably.
- 1 - Pet class number as per 'db/pet_db.txt' - will tell you what kind of a pet it
- is.
- 2 - Pet name. Will return "null" if there's no pet.
+ 0 - Unique pet ID number as stored by the char server and distinguishing
+ it from all other pets the characters actually have. This value is
+ currently useless, at most you can use it to tell pets apart reliably.
+ 1 - Pet class number as per 'db/pet_db.txt' - will tell you what kind of
+ a pet it is.
+ 2 - Pet name. Will return "null" if there's no pet.
3 - Pet friendly level (intimacy score). 1000 is full loyalty.
4 - Pet hungry level. 100 is completely full.
5 - Pet rename flag. 0 means this pet has not been named yet.
---------------------------------------
-*gethominfo(<type>)
-
-This function works as a direct counterpart of 'getpetinfo':
- 0 - Homunculus unique ID
- 1 - Homunculus Class
- 2 - Name
- 3 - Friendly level (intimacy score). 100000 is full loyalty.
- 4 - Hungry level. 100 is completely full.
- 5 - Rename flag. 0 means this homunculus has not been named yet.
- 6 - Homunculus level
-
----------------------------------------
-
*petstat(<flag>)
Returns current pet status, all are integers except name.
Returns 0 or "" if the player doesn't have pets.
-Flags usable >>
+Flags usable:
PET_CLASS
PET_NAME
PET_LEVEL
@@ -3195,8 +3258,8 @@ Example:
This function will look up the monster with the specified ID number in the
mob database and return the info set by TYPE argument.
-It will return -1 if there is no such monster (or the type value is invalid),
-or "null" if you requested the monster's name.
+It will return -1 if there is no such monster (or the type value is
+invalid), or "null" if you requested the monster's name.
Valid types are listed in const.txt:
MOB_NAME 0
@@ -3229,8 +3292,8 @@ Check sample in doc/sample/getmonsterinfo.txt
*getmobdrops(<mob id>)
-This command will find all drops of the specified mob and return the item IDs
-and drop percentages into arrays of temporary global variables.
+This command will find all drops of the specified mob and return the item
+IDs and drop percentages into arrays of temporary global variables.
'getmobdrops' returns 1 if successful and 0 if the mob ID doesn't exist.
Upon executing this,
@@ -3244,14 +3307,15 @@ $@MobDrop_rate[] is a global temporary number array which contains the
$@MobDrop_count is the number of item drops found.
Be sure to use $@MobDrop_count to go through the arrays, and not
-'getarraysize', because the temporary global arrays are not cleared between
-runs of 'getmobdrops'. If a mob with 7 item drops is looked up, the arrays would
-have 7 elements. But if another mob is looked up and it only has 5 item drops,
-the server will not clear the arrays for you, overwriting the values instead. So
-in addition to returning the 5 item drops, the 6th and 7th elements from the
-last call remain, and you will get 5+2 item drops, of which the last 2 don't
-belong to the new mob. $@MobDrop_count will always contain the correct number
-(5), unlike 'getarraysize()' which would return 7 in this case.
+'getarraysize', because the temporary global arrays are not cleared
+between runs of 'getmobdrops'. If a mob with 7 item drops is looked up,
+the arrays would have 7 elements. But if another mob is looked up and it
+only has 5 item drops, the server will not clear the arrays for you,
+overwriting the values instead. So in addition to returning the 5 item
+drops, the 6th and 7th elements from the last call remain, and you will
+get 5+2 item drops, of which the last 2 don't belong to the new mob.
+$@MobDrop_count will always contain the correct number (5), unlike
+'getarraysize()' which would return 7 in this case.
Example:
@@ -3259,9 +3323,10 @@ Example:
input .@mob_id;
if (getmobdrops(.@mob_id)) { // 'getmobdrops' returns 1 on success
- // immediately copy global temporary variables into scope variables,
- // since we don't know when 'getmobdrops' will get called again for
- // another mob, overwriting your global temporary variables
+ // immediately copy global temporary variables into scope
+ // variables, since we don't know when 'getmobdrops' will get
+ // called again for another mob, overwriting your global temporary
+ // variables.
set .@count, $@MobDrop_count;
copyarray .@item[0],$@MobDrop_item[0],.@count;
copyarray .@rate[0],$@MobDrop_rate[0],.@count;
@@ -3279,14 +3344,16 @@ Example:
*skillpointcount()
-Returns the total amount of skill points a character possesses (SkillPoint+SP's used in skills)
-This command can be used to check the currently attached characters total amount of skill points.
-This means the skill points used in skill are counted, and added to SkillPoints (number of skill points not used).
+Returns the total amount of skill points a character possesses
+(SkillPoint+SP's used in skills) This command can be used to check the
+currently attached characters total amount of skill points. This means the
+skill points used in skill are counted, and added to SkillPoints (number
+of skill points not used).
Example:
-//This will set the temp character variable @skillPoints to the amount of skill points,
-//and then tell the player the value.
+//This will set the temp character variable @skillPoints to the amount of
+//skill points, and then tell the player the value.
set @skillPoints, skillPointCount();
mes "You have "+@skillPoints+" skill points in total!";
@@ -3294,20 +3361,21 @@ Example:
if (skillPointCount() > 20)
mes "Wow, you have more then 20 Skill Points in total!";
-This command does not count skills which are set as flag 3 (permamently granted) (e.g. ALL_BUYING_STORE/ALL_INCCARRY)
+This command does not count skills which are set as flag 3 (permamently
+granted) (e.g. ALL_BUYING_STORE/ALL_INCCARRY).
---------------------------------------
*getscrate(<effect type>,<base rate>{,<GID>})
-This function will return the chance of a status effect affecting the invoking
-character, in percent, modified by the their current defense against said
-status. The 'base rate' is the base chance of the status effect being inflicted,
-in percent.
+This function will return the chance of a status effect affecting the
+invoking character, in percent, modified by the their current defense
+against said status. The 'base rate' is the base chance of the status
+effect being inflicted, in percent.
if (rand(100) > getscrate(Eff_Blind, 50)) goto BlindHimNow;
-You can see the full list of available effect types you can possibly inflict in
-'db/const.txt' under 'Eff_'.
+You can see the full list of available effect types you can possibly
+inflict in 'db/const.txt' under 'Eff_'.
---------------------------------------
@@ -3318,19 +3386,20 @@ You can see the full list of available effect types you can possibly inflict in
*playerattached()
-Returns the ID of the player currently attached to the script. It will return
-0 if no one is attached, or if the attached player no longer exists on the map
-server. It is wise to check for the attached player in script functions that
-deal with timers as there's no guarantee the player will still be logged on
-when the timer triggers. Note that the ID of a player is actually their
-account ID.
+Returns the ID of the player currently attached to the script. It will
+return 0 if no one is attached, or if the attached player no longer exists
+on the map server. It is wise to check for the attached player in script
+functions that deal with timers as there's no guarantee the player will
+still be logged on when the timer triggers. Note that the ID of a player
+is actually their account ID.
---------------------------------------
*isloggedin(<account id>{,<char id>})
-This function returns 1 if the specified account is logged in and 0 if they
-aren't. You can also pass the char_id to check for both account and char id.
+This function returns 1 if the specified account is logged in and 0 if
+they aren't. You can also pass the char_id to check for both account and
+char id.
---------------------------------------
@@ -3338,11 +3407,11 @@ aren't. You can also pass the char_id to check for both account and char id.
*checkweight("<item name>",<amount>{,"<item name>",<amount>,"<item name>",<amount>,...});
*checkweight2(<id_array>,<amount_array>);
-These functions will compute and return 1 if the total weight of the specified
-number of specific items does not exceed the invoking character's carrying
-capacity, and 0 otherwise. It is important to see if a player can carry the
-items you expect to give them, failing to do that may open your script up to
-abuse or create some very unfair errors.
+These functions will compute and return 1 if the total weight of the
+specified number of specific items does not exceed the invoking
+character's carrying capacity, and 0 otherwise. It is important to see if
+a player can carry the items you expect to give them, failing to do that
+may open your script up to abuse or create some very unfair errors.
The second function will check an array of items and amounts, and also
returns 1 on success and 0 on failure.
@@ -3375,12 +3444,12 @@ Example 2:
*basicskillcheck()
This function will return the state of the configuration option
-'basic_skill_check' in 'battle.conf'. It returns 1 if the option is
-enabled and 0 if it isn't. If the 'basic_skill_check' option is enabled, which
-it is by default, characters must have a certain number of basic skill levels to
-sit, request a trade, use emotions, etc. Making your script behave differently
-depending on whether the characters must actually have the skill to do all these
-things might in some cases be required.
+'basic_skill_check' in 'battle.conf'. Returns 1 if the option is enabled
+and 0 if it isn't. If the 'basic_skill_check' option is enabled, which it
+is by default, characters must have a certain number of basic skill levels
+to sit, request a trade, use emotions, etc. Making your script behave
+differently depending on whether the characters must actually have the
+skill to do all these things might in some cases be required.
---------------------------------------
@@ -3389,12 +3458,13 @@ things might in some cases be required.
*checkoption2(<option number>)
*setoption <option number>{,<flag>};
-The 'setoption' series of functions check for a so-called option that is set on
-the invoking character. 'Options' are used to store status conditions and a lot
-of other non-permanent character data of the yes-no kind. For most common cases,
-it is better to use 'checkcart','checkfalcon','checkpeco' and other similar
-functions, but there are some options which you cannot get at this way. They
-return 1 if the option is set and 0 if the option is not set.
+The 'setoption' series of functions check for a so-called option that is
+set on the invoking character. 'Options' are used to store status
+conditions and a lot of other non-permanent character data of the yes-no
+kind. For most common cases, it is better to use 'checkcart',
+'checkfalcon', 'checkpeco' and other similar functions, but there are some
+options which you cannot get at this way. They return 1 if the option is
+set and 0 if the option is not set.
Option numbers valid for the first (option) version of this command are:
@@ -3431,21 +3501,24 @@ Option numbers valid for the third version (opt2) of this command are:
0x1 - Poisoned.
0x2 - Cursed.
0x4 - Silenced.
-0x8 - Signum Crucis (plays a howl-like sound effect, but otherwise no visible effects are displayed)
+0x8 - Signum Crucis (plays a howl-like sound effect, but otherwise no
+ visible effects are displayed)
0x10 - Blinded.
0x80 - Deadly poisoned.
-Option numbers (except for opt1) are bit-masks - you can add them up to check
- for several states, but the functions will return true if at least one of them
- is in effect.
+Option numbers (except for opt1) are bit-masks - you can add them up to
+check for several states, but the functions will return true if at least
+one of them is in effect.
-'setoption' will set options on the invoking character. There are no second and
-third versions of this command, so you can only change the values in the first
-list (cloak, cart, ruwach, etc). if flag is 1 (default when omitted),
-the option will be added to what the character currently has; if 0, the option is removed.
+'setoption' will set options on the invoking character. There are no
+second and third versions of this command, so you can only change the
+values in the first list (cloak, cart, ruwach, etc). If flag is 1 (default
+when omitted), the option will be added to what the character currently
+has; if 0, the option is removed.
-This is definitely not a complete list of available option flag numbers. Ask a
-core developer (or read the source: src/map/status.h) for the full list.
+This is definitely not a complete list of available option flag numbers.
+Ask a core developer (or read the source: src/map/status.h) for the full
+list.
---------------------------------------
@@ -3456,10 +3529,10 @@ If <type> is 0 this command will remove the cart from the character.
Otherwise it gives the invoking character a cart. The cart given will be
cart number <type> and will work regardless of whether the character is a
merchant class or not.
-Note: the character needs to have the skill MC_PUSHCART to gain a cart
+Note: the character needs to have the skill MC_PUSHCART to gain a cart.
-The accompanying function will return 1 if the invoking character has a cart
-(any kind of cart) and 0 if they don't.
+The accompanying function will return 1 if the invoking character has a
+cart (any kind of cart) and 0 if they don't.
if (checkcart()) mes "But you already have a cart!";
@@ -3469,13 +3542,13 @@ The accompanying function will return 1 if the invoking character has a cart
*checkfalcon()
If <flag> is 0 this command will remove the falcon from the character.
-Otherwise it gives the invoking character a falcon. The falcon will be there
-regardless of whether the character is a hunter or not. It will (probably) not
-have any useful effects for non-hunters though.
-Note: the character needs to have the skill HT_FALCON to gain a falcon
+Otherwise it gives the invoking character a falcon. The falcon will be
+there regardless of whether the character is a hunter or not. It will
+(probably) not have any useful effects for non-hunters though.
+Note: the character needs to have the skill HT_FALCON to gain a falcon.
-The accompanying function will return 1 if the invoking character has a falcon
-and 0 if they don't.
+The accompanying function will return 1 if the invoking character has a
+falcon and 0 if they don't.
if (checkfalcon()) mes "But you already have a falcon!";
@@ -3486,13 +3559,13 @@ and 0 if they don't.
If <flag> is 0 this command will remove the mount from the character.
Otherwise it gives the invoking character a PecoPeco (if they are a Knight
-series class), a GrandPeco (if they are a Crusader series class), or
-a Gryphon (if they are a Royal Guard). Unlike 'setfalcon' and 'setcart'
+series class), a GrandPeco (if they are a Crusader series class), or
+a Gryphon (if they are a Royal Guard). Unlike 'setfalcon' and 'setcart'
this will not work at all if they aren't of a class which can ride.
-Note: the character needs to have the skill KN_RIDING to gain a mount
+Note: the character needs to have the skill KN_RIDING to gain a mount.
-The accompanying function will return 1 if the invoking character is riding a
-bird and 0 if they aren't.
+The accompanying function will return 1 if the invoking character is
+riding a bird and 0 if they aren't.
if (checkriding()) mes "PLEASE leave your bird outside! No riding birds on the floor here!";
@@ -3501,8 +3574,8 @@ bird and 0 if they aren't.
*setdragon {<color>};
*checkdragon()
-The 'setdragon' function toggles mounting a dragon for the invoking character.
-It will return 1 if successful, 0 otherwise.
+The 'setdragon' function toggles mounting a dragon for the invoking
+character. It will return 1 if successful, 0 otherwise.
If the character can mount a dragon, the <color> options are:
1 - Green Dragon (default when omitted)
@@ -3511,10 +3584,11 @@ If the character can mount a dragon, the <color> options are:
4 - Blue Dragon
5 - Red Dragon
-Note: the character must be a Rune Knight and have the skill RK_DRAGONTRAINING to gain a mount
+Note: the character must be a Rune Knight and have the skill
+ RK_DRAGONTRAINING to gain a mount.
-The accompanying function will return 1 if the invoking character is riding a
-dragon and 0 if they aren't.
+The accompanying function will return 1 if the invoking character is
+riding a dragon and 0 if they aren't.
---------------------------------------
@@ -3524,7 +3598,7 @@ dragon and 0 if they aren't.
If <flag> is 0 this command will remove the mount from the character.
Otherwise it gives the invoking character a Mado (if they are a Mechanic).
-The accompanying function will return 1 if the invoking character has a
+The accompanying function will return 1 if the invoking character has a
Mado and 0 if they don't.
---------------------------------------
@@ -3535,17 +3609,18 @@ Mado and 0 if they don't.
The 'setmounting' function toggles cash mount for the invoking character.
It will return 1 if successful, 0 otherwise.
-Note: Character must not be mounting a non-cash mount (eg. dragon, peco, wug, etc.)
+Note: Character must not be mounting a non-cash mount (eg. dragon, peco,
+ wug, etc.)
-The accompanying function will return 1 if the invoking character has a
+The accompanying function will return 1 if the invoking character has a
cash mount and 0 if they don't.
---------------------------------------
*checkwug()
-This function will return 1 if the invoking character has a
-warg and 0 if they don't.
+This function will return 1 if the invoking character has a warg and 0 if
+they don't.
---------------------------------------
@@ -3563,8 +3638,8 @@ Return values for 'checkvending' are
'checkchatting' returns 1 if they are in a chat room, 0 if they are not.
Examples:
- //This will check if Aaron is vending, and if so, put a message in front
- //of the attached player saying Aaron is vending.
+ //This will check if Aaron is vending, and if so, put a message in
+ //front of the attached player saying Aaron is vending.
if (checkvending("Aaron"))
mes "Aaron is currently vending!";
@@ -3576,27 +3651,27 @@ Examples:
*checkidle({"<Player Name>"})
- Returns the time, in seconds, that the specified player has been idle.
- Name is optional, and defaults to the attached player if omitted.
+Returns the time, in seconds, that the specified player has been idle.
+Name is optional, and defaults to the attached player if omitted.
---------------------------------------
*agitcheck()
*agitcheck2()
-These function will let you check whether the server is currently in WoE mode
-(or WoE SE mode if the second function is called) and will return 1 if War of
-Emperium is on and 0 if it isn't.
+These function will let you check whether the server is currently in WoE
+mode (or WoE SE mode if the second function is called) and will return 1
+if War of Emperium is on and 0 if it isn't.
---------------------------------------
*isnight()
*isday()
-These functions will return 1 or 0 depending on whether the server is in night
-mode or day mode. 'isnight' returns 1 if it's night and 0 if it isn't, 'isday'
-the other way around. They can be used interchangeably, pick the one you like
-more:
+These functions will return 1 or 0 depending on whether the server is in
+night mode or day mode. 'isnight' returns 1 if it's night and 0 if it
+isn't, 'isday' the other way around. They can be used interchangeably,
+pick the one you like more:
// These two are equivalent:
if (isday()) mes "I only prowl in the night.";
@@ -3606,8 +3681,9 @@ more:
*checkre(<type>)
-Checks if a renewal feature is enabled or not in renewal.h, and returns 1 if enabled and 0 for disabled.
-The renewal feature to check is determined by type.
+Checks if a renewal feature is enabled or not in renewal.h, and returns 1
+if enabled and 0 for disabled. The renewal feature to check is determined
+by the type parameter.
0 - RENEWAL (game renewal server mode)
1 - RENEWAL_CAST (renewal cast time)
@@ -3625,9 +3701,10 @@ The renewal feature to check is determined by type.
*isequipped(<id>{,<id>{,<id>{,<id>}}})
This function will return 1 if the invoking character has all of the item
-IDs given equipped (if card IDs are passed, then it checks if the cards are
-inserted into slots in the equipment they are currently wearing). Theoretically
-there is no limit to the number of items that may be tested for at the same time.
+IDs given equipped (if card IDs are passed, then it checks if the cards
+are inserted into slots in the equipment they are currently wearing).
+Theoretically there is no limit to the number of items that may be tested
+for at the same time.
If even one of the items given is not equipped, 0 will be returned.
// (Poring,Santa Poring,Poporing,Marin)
@@ -3635,15 +3712,16 @@ If even one of the items given is not equipped, 0 will be returned.
// (Poring)
if (isequipped(4001)) mes "A poring card is useful, don't you think?";
-The function was meant for item scripts to support the cards released by Gravity
-in February 2005, but it will work just fine in normal NPC scripts.
+The function was meant for item scripts to support the cards released by
+Gravity in February 2005, but it will work just fine in normal NPC scripts.
---------------------------------------
*isequippedcnt(<card id>{,<card id>{,<card id>{,<card id>}}})
-This function is similar to 'isequipped', but instead of 1 or 0, it will return
-the number of cards in the list given that were found on the invoking character.
+This function is similar to 'isequipped', but instead of 1 or 0, it will
+return the number of cards in the list given that were found on the
+invoking character.
if (isequippedcnt(4001,4005,4033,4196) == 4) mes "Finally got all four poring cards?";
@@ -3651,19 +3729,19 @@ the number of cards in the list given that were found on the invoking character.
*checkequipedcard(<card id>)
-This function will return 1 if the card specified by it's item ID number is
-inserted into any equipment they have in their inventory, currently equipped or
-not.
+This function will return 1 if the card specified by it's item ID number
+is inserted into any equipment they have in their inventory, currently
+equipped or not.
---------------------------------------
*getequipisidentify(<equipment slot>)
This function will return 1 if an item in the specified equipment slot is
-identified and 0 if it isn't. Since you can't even equip unidentified equipment,
-there's a question of whether it can actually end up there, and it will normally
-return 1 all the time if there is an item in this equipment slot.
-Which is kinda pointless.
+identified and 0 if it isn't. Since you can't even equip unidentified
+equipment, there's a question of whether it can actually end up there, and
+it will normally return 1 all the time if there is an item in this
+equipment slot, which makes this script command kinda pointless.
For a list of equipment slots see 'getequipid'.
---------------------------------------
@@ -3680,12 +3758,12 @@ For a list of equipment slots see 'getequipid'.
*attachrid(<account ID>)
*detachrid;
-These commands allow the manipulation of the script's currently attached player.
-While attachrid allows attaching of a different player by using it's account id
-for the parameter rid, detachrid makes the following commands run, as if the
-script was never invoked by a player.
+These commands allow the manipulation of the script's currently attached
+player. While attachrid allows attaching of a different player by using
+its account id for the parameter rid, detachrid makes the following
+commands run as if the script was never invoked by a player.
-In case, that the player cannot be attached, such as, when the player went
+In case, that the player cannot be attached, such as, when the player went
offline in the mean time, attachrid returns 0, otherwise 1.
---------------------------------------
@@ -3693,25 +3771,27 @@ offline in the mean time, attachrid returns 0, otherwise 1.
*rid2name(<rid>)
Converts rid to name. Note: The player/monster/NPC must be online/enabled.
-Good for PCKillEvent where you can convert 'killedrid' to the name of the player.
+Good for PCKillEvent where you can convert 'killedrid' to the name of the
+player.
-Note: rid2name may not produce correct character names since rid = account id.
+Note: rid2name may not produce correct character names since rid means
+ account id.
It will return the current online character of the account only.
---------------------------------------
*message "<character name>","<message>";
-That command will send a message to the chat window of the character specified
-by name. The text will also appear above the head of that character. It will not
-be seen by anyone else.
+That command will send a message to the chat window of the character
+specified by name. The text will also appear above the head of that
+character. It will not be seen by anyone else.
---------------------------------------
*dispbottom "<message>";
-This command will send the given message into the invoking character's chat
-window.
+This command will send the given message into the invoking character's
+chat window.
---------------------------------------
@@ -3722,18 +3802,18 @@ wanted, specified coordinates too, but these can be random.
warp "place",50,55;
-This would take them to X 50 Y 55 on the map called "place". If your X and Y
-coordinates land on an unwalkable map square, it will send the warped character
-to a random place. Same will happen if they are both zero:
+This would take them to X 50 Y 55 on the map called "place". If your X and
+Y coordinates land on an unwalkable map square, it will send the warped
+character to a random place. Same will happen if they are both zero:
warp "place",0,0;
-Notice that while warping people to coordinates 0,0 will normally get them into
-a random place, it's not certain to always be so. Darned if I know where this is
-actually coded, it might be that this happens because square 0,0 is unwalkable
-on all official maps. If you're using custom maps, beware.
+Notice that while warping people to coordinates 0,0 will normally get them
+into a random place, it's not certain to always be so. Darned if I know
+where this is actually coded, it might be that this happens because square
+0,0 is unwalkable on all official maps. Beware if you're using custom maps.
-There are also three special 'map names' you can use.
+There are also three special 'map names' you can use:
"Random" will warp the player randomly on the current map.
"Save" and "SavePoint" will warp the player back to their save point.
@@ -3742,29 +3822,31 @@ There are also three special 'map names' you can use.
*areawarp "<from map name>",<x1>,<y1>,<x2>,<y2>,"<to map name>",<x3>,<y3>{,<x4>,<y4>};
-This command is similar to 'warp', however, it will not refer to the invoking
-character, but instead, all characters within a specified area, defined by the
-x1/y1-x2/y2 square, will be warped. Nobody outside the area will be affected,
-including the activating character, if they are outside the area.
+This command is similar to 'warp', however, it will not refer to the
+invoking character, but instead, all characters within a specified area,
+defined by the x1/y1-x2/y2 square, will be warped. Nobody outside the area
+will be affected, including the activating character, if they are outside
+the area.
areawarp "place",10,10,120,120,"place2",150,150;
-Everyone that is in the area between X 10 Y 10 and X 120 Y 120, in a square
-shape, on the map called "place", will be affected, and warped to "place2" X 150
-Y 150
+Everyone that is in the area between X 10 Y 10 and X 120 Y 120, in a
+square shape, on the map called "place", will be affected, and warped to
+"place2" X 150 Y 150.
areawarp "place",10,10,120,120,"place2",0,0;
-By using ,0,0; as the destination coordinates it will take all the characters in
-the affected area to a random set of co-ordinates on "place2".
+By using ,0,0; as the destination coordinates it will take all the
+characters in the affected area to a random set of co-ordinates on the
+"place2" map.
areawarp "place",10,10,120,120,"place2",150,150,200,200;
-By using the optional x4 and y4 parameters, the destination coordinates will be a
-random place within the defined x3/y3-x4/y4 square.
+By using the optional x4 and y4 parameters, the destination coordinates
+will be a random place within the defined x3/y3-x4/y4 square.
-Like 'warp', areawarp will also explicitly warp characters randomly into the
-current map if you give the 'to map name' as "Random".
+Like 'warp', areawarp will also explicitly warp characters randomly into
+the current map if you give the 'to map name' as "Random".
See also 'warp'.
@@ -3772,19 +3854,23 @@ See also 'warp'.
*warpparty "<to_mapname>",<x>,<y>,<party_id>,{"<from_mapname>"};
-Warps a party to specified map and coordinate given the party ID, which you can get with
-getcharid(1). You can also request another party id given a member's name with getcharid(1,<player_name>).
+Warps a party to specified map and coordinate given the party ID, which
+you can get with getcharid(1). You can also request another party id given
+a member's name with getcharid(1,<player_name>).
You can use the following "map names" for special warping behavior:
-Random: All party members are randomly warped in their current map (as if they
- all used a fly wing)
+Random: All party members are randomly warped in their current map
+ (as if they all used a fly wing).
SavePointAll: All party members are warped to their respective save point.
-SavePoint: All party members are warped to the save point of the currently
- attached player (will fail if there's no player attached).
-Leader: All party members are warped to the leader's position. The leader must
- be online and in the current map-server for this to work.
-
-If you specify a from_mapname, warpparty will only affect those on that map.
+SavePoint: All party members are warped to the save point of the
+ currently attached player (will fail if there's no player
+ attached).
+Leader: All party members are warped to the leader's position. The
+ leader must be online and in the current map-server for this
+ to work.
+
+If you specify a from_mapname, warpparty will only affect those on that
+map.
Example:
@@ -3799,9 +3885,10 @@ close;
*warpchar "<mapname>",<x>,<y>,<char_id>;
-Warps another player to specified map and coordinate given the char id, which you can get with
-getcharid(0,<player_name>). Obviously this is useless if you want to warp the same player that
-is executing this script, unless it's some kind of "chosen" script.
+Warps another player to specified map and coordinate given the char id,
+which you can get with getcharid(0,<player_name>). Obviously this is
+useless if you want to warp the same player that is executing this script,
+unless it's some kind of "chosen" script.
Example:
@@ -3811,15 +3898,17 @@ warpchar "prontera",150,100,150001;
*warpguild "<mapname>",<x>,<y>,<guild_id>;
-Warps a guild to specified map and coordinate given the guild id, which you can get with
-getcharid(2). You can also request another guild id given the member's name with getcharid(2,<player_name>).
+Warps a guild to specified map and coordinate given the guild id, which
+you can get with getcharid(2). You can also request another guild id given
+the member's name with getcharid(2,<player_name>).
You can use the following "map names" for special warping behavior:
-Random: All guild members are randomly warped in their current map (as if they
- all used a fly wing)
+Random: All guild members are randomly warped in their current map
+ (as if they all used a fly wing)
SavePointAll: All guild members are warped to their respective save point.
-SavePoint: All guild members are warped to the save point of the currently
- attached player (will fail if there's no player attached).
+SavePoint: All guild members are warped to the save point of the
+ currently attached player (will fail if there's no player
+ attached).
Example:
@@ -3829,11 +3918,11 @@ warpguild "prontera",x,y,Guild_ID;
*warppartner("<map name>",<x>,<y>);
-This function will find the invoking character's marriage partner, if any, and
-warp them to the map and coordinates given. Go kidnap that spouse. :) It will
-return 1 upon success and 0 if the partner is not online, the character is not
-married, or if there's no invoking character (no RID). 0,0 will, as usual,
-normally translate to random coordinates.
+This function will find the invoking character's marriage partner, if any,
+and warp them to the map and coordinates given. Go kidnap that spouse. :)
+It will return 1 upon success and 0 if the partner is not online, the
+character is not married, or if there's no invoking character (no RID).
+0,0 will, as usual, normally translate to random coordinates.
---------------------------------------
@@ -3841,10 +3930,10 @@ normally translate to random coordinates.
*save "<map name>",<x>,<y>;
This command saves where the invoking character will return to upon
-'return to save point', if dead or in some other cases. The two versions are
-equivalent. Map name, X coordinate and Y coordinate should be perfectly obvious.
-This ignores any and all map flags, and can make a character respawn where no
-teleportation is otherwise possible.
+'return to save point', if dead or in some other cases. The two versions
+are equivalent. Map name, X coordinate and Y coordinate should be
+perfectly obvious. This ignores any and all map flags, and can make a
+character respawn where no teleportation is otherwise possible.
savepoint "place",350,75;
@@ -3852,7 +3941,8 @@ teleportation is otherwise possible.
*heal <hp>,<sp>;
-This command will heal a set amount of HP and/or SP on the invoking character.
+This command will heal a set amount of HP and/or SP on the invoking
+character.
heal 30000,0; // This will heal 30,000 HP
heal 0,30000; // This will heal 30,000 SP
@@ -3865,13 +3955,14 @@ character and produces no other output whatsoever.
*itemheal <hp>,<sp>;
-This command heals given absolute amounts of HP and/or SP on the invoking
-character. Unlike heal, this command is intended for use in item scripts. It
-applies potion-related bonuses, such as alchemist ranking, cards and status
-changes. When used inside an NPC script, certain bonuses are omitted.
+This command heals given absolute amounts of HP and/or SP on the invoking
+character. Unlike heal, this command is intended for use in item scripts.
+It applies potion-related bonuses, such as alchemist ranking, cards and
+status changes. When used inside an NPC script, certain bonuses are
+omitted.
-There is also a nice example on using this with the 'rand' function, to give you
-a random amount of healing.
+There is also a nice example on using this with the 'rand' function, to
+give you a random amount of healing.
// This will heal anything thing from 100 to 150 HP and no SP
itemheal rand(100,150),0;
@@ -3880,22 +3971,23 @@ a random amount of healing.
*percentheal <hp>,<sp>;
-This command will heal the invoking character. It heals the character, but not
-by a set value - it adds percent of their maximum HP/SP.
+This command will heal the invoking character. It heals the character, but
+not by a set value - it adds percent of their maximum HP/SP.
percentheal 100,0; // This will heal 100% HP
percentheal 0,100; // This will heal 100% SP
percentheal 50,50; // This will heal 50% HP and 50% SP
-So the amount that this will heal will depend on the total amount of HP or SP
-you have maximum. Like 'heal', this will not call up any animations or effects.
+So the amount that this will heal will depend on the total amount of HP or
+SP you have maximum. Like 'heal', this will not call up any animations or
+effects.
---------------------------------------
*recovery;
-This command will revive and restore full HP and SP to all characters currently
-connected to the server.
+This command will revive and restore full HP and SP to all characters
+currently connected to the server.
---------------------------------------
@@ -3906,8 +3998,8 @@ This command will change the job class of the invoking character.
jobchange 1; // This would change your player into a Swordman
jobchange 4002; // This would change your player into a Swordman High
-This command does work with numbers, but you can also use job names. The full
-list of job names and the numbers they correspond to can be found in
+This command does work with numbers, but you can also use job names. The
+full list of job names and the numbers they correspond to can be found in
'db/const.txt'.
// This would change your player into a Swordman
@@ -3915,23 +4007,24 @@ list of job names and the numbers they correspond to can be found in
// This would change your player into a Swordman High
jobchange Job_Swordman_High;
-'upper flag' can alternatively be used to specify the type of job one changes
-to. For example, jobchange Job_Swordman,1; will change the character to a high
-swordsman. The upper values are:
+'upper flag' can alternatively be used to specify the type of job one
+changes to. For example, jobchange Job_Swordman,1; will change the
+character to a high swordsman. The upper values are:
-1 (or when omitted): preserves the current job type.
0: Normal/standard classes
1: High/Advanced classes
2: Baby classes
This command will also set a permanent character-based variable
-'jobchange_level' which will contain the job level at the time right before
-changing jobs, which can be checked for later in scripts.
+'jobchange_level' which will contain the job level at the time right
+before changing jobs, which can be checked for later in scripts.
---------------------------------------
*jobname (<job number>)
-This command retrieves the name of the given job using the messages.conf entries 550->650.
+This command retrieves the name of the given job using the messages.conf
+entries 550 to 650.
mes "[Kid]";
mes "I never thought I'd met a "+jobname(Class)+" here of all places.";
@@ -3941,11 +4034,12 @@ This command retrieves the name of the given job using the messages.conf entries
*eaclass ({<job number>})
-This commands returns the "eA job-number" corresponding to the given class, and
-uses the invoking player's class if none is given. The eA job-number is also a
-class number system, but it's one that comes with constants which make it easy
-to convert among classes. The command will return -1 if you pass it a job number
-which doesn't have an eA job-number equivalent.
+This commands returns the "eA job-number" corresponding to the given
+class, and uses the invoking player's class if none is given. The eA
+job-number is also a class number system, but it's one that comes with
+constants which make it easy to convert among classes. The command will
+return -1 if you pass it a job number which doesn't have an eA job-number
+equivalent.
set @eac, eaclass();
if ((@eac&EAJ_BASEMASK) == EAJ_SWORDMAN)
@@ -3955,17 +4049,19 @@ which doesn't have an eA job-number equivalent.
if ((@eac&EAJ_UPPERMASK) == EAJ_SWORDMAN)
mes "You must be a Swordman, Baby Swordman or High Swordman.";
-For more information on the eA Job System, see the docs/ea_job_system.txt file.
+For more information on the eA Job System, see the docs/ea_job_system.txt
+file.
---------------------------------------
*roclass <job number> {,<gender>}
-Does the opposite of eaclass. That is, given an eA job-number, it returns the
-corresponding RO class number. A gender is required because both Bard and Dancers
-share the same eA job-number (EAJ_BARDDANCER), and uses the invoking player's
-gender if none is given (if no player is attached, male will be used by default).
-The command will return -1 if there is no valid class to represent the specified
-job (for example, if you try to get the baby version of a Taekwon class).
+Does the opposite of eaclass. That is, given an eA job-number, it returns
+the corresponding RO class number. A gender is required because both Bard
+and Dancers share the same eA job-number (EAJ_BARDDANCER), and uses the
+invoking player's gender if none is given (if no player is attached,
+male will be used by default). The command will return -1 if there is no
+valid class to represent the specified job (for example, if you try to get
+the baby version of a Taekwon class).
set @eac, eaclass();
//Check if class is already rebirth
@@ -3984,8 +4080,8 @@ job (for example, if you try to get the baby version of a Taekwon class).
*changebase <job ID number>;
-This command will change the appearance of the invoking character to that of a
-specified job class. Nothing but appearance will change.
+This command will change the appearance of the invoking character to that
+of a specified job class. Nothing but appearance will change.
Examples:
@@ -4000,33 +4096,34 @@ changebase Class; // Changes player back to default sprite.
*classchange <view id>,<type>;
This command is very ancient, it's origins are clouded in mystery.
-It will send a 'display id change' packet to everyone in the immediate area of
-the NPC object, which will supposedly make the NPC look like a different sprite,
-an NPC sprite ID, or a monster ID. This effect is not stored anywhere and will
-not persist (Which is odd, cause it would be relatively easy to make it do so)
-and most importantly, will not work at all since this command was broken with
-the introduction of advanced classes. The code is written with the assumption
-that the lowest sprite IDs are the job sprites and the anything beyond them is
-monster and NPC sprites, but since the advanced classes rolled in, they got the
-ID numbers on the other end of the number pool where monster sprites float.
+It will send a 'display id change' packet to everyone in the immediate
+area of the NPC object, which will supposedly make the NPC look like a
+different sprite, an NPC sprite ID, or a monster ID. This effect is not
+stored anywhere and will not persist (Which is odd, cause it would be
+relatively easy to make it do so) and most importantly, will not work at
+all since this command was broken with the introduction of advanced
+classes. The code is written with the assumption that the lowest sprite
+IDs are the job sprites and the anything beyond them is monster and NPC
+sprites, but since the advanced classes rolled in, they got the ID numbers
+on the other end of the number pool where monster sprites float.
-As a result it is currently impossible to call this command with a valid view
-id. It will do nothing whatsoever if the view ID is below 4047. Getting it to
-run will actually just crash the client.
+As a result it is currently impossible to call this command with a valid
+view id. It will do nothing whatsoever if the view ID is below 4047.
+Getting it to run will actually just crash the client.
-It could be a real gem if it can be gotten to actually do what it's supposed to
-do, but this will only happen in a later SVN revision.
+It could be a real gem if it can be gotten to actually do what it's
+supposed to do, but this will only happen in a later Git revision.
---------------------------------------
*changesex;
-This command will change the gender for the attached character's account. If it
-was male, it will become female, if it was female, it will become male. The
-change will be written to the character server, the player will receive the
-message: "Need disconnection to perform change-sex request..." and the player
-will be immediately kicked to the login screen. When they log back in, they will
-be the opposite sex.
+This command will change the gender for the attached character's account.
+If it was male, it will become female, if it was female, it will become
+male. The change will be written to the character server, the player will
+receive the message: "Need disconnection to perform change-sex request..."
+and the player will be immediately kicked to the login screen. When they
+log back in, they will be the opposite sex.
If there are any Dancer/Gypsy or Bard/Clown characters on the account,
they will also have their skills reset upon 'changesex'.
@@ -4035,12 +4132,14 @@ they will also have their skills reset upon 'changesex'.
*getexp <base xp>,<job xp>;
-This command will give the invoking character a specified number of base and job
-experience points. Can be used as a quest reward. Negative values won't work.
+This command will give the invoking character a specified number of base
+and job experience points. Can be used as a quest reward. Negative values
+won't work.
getexp 10000,5000;
-You can also use the "set" command with the constants defined in 'db/const.txt':
+You can also use the "set" command with the constants defined in
+'db/const.txt':
// These 2 combined has the same effect as the above command
set BaseExp,BaseExp+10000;
@@ -4050,8 +4149,9 @@ You can also reduce the amount of experience points:
set BaseExp,BaseExp-10000;
-Note that 'getexp' is now subject to the 'quest_exp_rate' config option, which
-adjusts the gained value. If you want to bypass this, use the 'set' method.
+Note that 'getexp' is now subject to the 'quest_exp_rate' config option,
+which adjusts the gained value. If you want to bypass this, use the 'set'
+method.
---------------------------------------
@@ -4059,18 +4159,20 @@ adjusts the gained value. If you want to bypass this, use the 'set' method.
*changelook <look type>,<look value>;
'setlook' will alter the look data for the invoking character. It is used
-mainly for changing the palette used on hair and clothes: you specify which look
-type you want to change, then the palette you want to use. Make sure you specify
-a palette number that exists/is usable by the client you use.
-'changelook' works the same, but is only client side (it doesn't save the look value).
+mainly for changing the palette used on hair and clothes: you specify
+which look type you want to change, then the palette you want to use. Make
+sure you specify a palette number that exists/is usable by the client you
+use. 'changelook' works the same, but is only client side (it doesn't save
+the look value).
- // This will change your hair(6), so that it uses palette 8, what ever your
- // palette 8 is, your hair will use that color
+ // This will change your hair(6), so that it uses palette 8, what ever
+ // your palette 8 is, your hair will use that color.
setlook 6,8;
- // This will change your clothes(7), so they are using palette 1, whatever
- // your palette 1 is, your clothes will then use that set of colors.
+ // This will change your clothes(7), so they are using palette 1,
+ // whatever your palette 1 is, your clothes will then use that set of
+ // colors.
setlook 7,1;
@@ -4087,37 +4189,39 @@ Here are the possible look types:
8 - Shield
9 - Shoes
-Whatever 'shoes' means is anyone's guess, ask Gravity - the client does nothing
-with this value. It still wants it from the server though, so it is kept, but
-normally doesn't do a thing.
+Whatever 'shoes' means is anyone's guess, ask Gravity - the client does
+nothing with this value. It still wants it from the server though, so it
+is kept, but normally doesn't do a thing.
-Only the look data for hairstyle, hair color and clothes color are saved to the
-char server's database and will persist. The rest freely change as the character
-puts on and removes equipment, changes maps, logs in and out and otherwise you
-should not expect to set them. In fact, messing with them is generally
-hazardous, do it at your own risk, it is not tested what will this actually do -
-it won't cause database corruption and probably won't cause a server crash, but
-it's easy to crash the client with just about anything unusual.
+Only the look data for hairstyle, hair color and clothes color are saved
+to the char server's database and will persist. The rest freely change as
+the character puts on and removes equipment, changes maps, logs in and out
+and otherwise you should not expect to set them. In fact, messing with
+them is generally hazardous, do it at your own risk, it is not tested
+what will this actually do - it won't cause database corruption and
+probably won't cause a server crash, but it's easy to crash the client
+with just about anything unusual.
However, it might be an easy way to quickly check for empty view IDs for
sprites, which is essential for making custom headgear.
Since a lot of people have different palettes for hair and clothes, it's
-impossible to tell you what all the color numbers are. If you want a serious
-example, there is a Stylist script inside the default Hercules installation that
-you can look at: 'npc/custom/stylist.txt'
+impossible to tell you what all the color numbers are. If you want a
+serious example, there is a Stylist script inside the default Hercules
+installation that you can look at: 'npc/custom/stylist.txt'
---------------------------------------
*pushpc <direction>,<cells>;
-This command will push the currently attached player to given direction by given
-amount of square cells. Direction is the same as used when declaring NPCs, and
-can be specified by using one of the DIR_* constants (db/const.txt).
+This command will push the currently attached player to given direction by
+given amount of square cells. Direction is the same as used when declaring
+NPCs, and can be specified by using one of the DIR_* constants
+(db/const.txt).
-The knock-back is not restricted by items or map flags, only obstacles are taken
-into account. If there is not enough space to perform the push (e.g. due to a
-wall), the character is pushed only up to the obstacle.
+The knock-back is not restricted by items or map flags, only obstacles are
+taken into account. If there is not enough space to perform the push (e.g.
+due to a wall), the character is pushed only up to the obstacle.
// pushes the character 5 cells in 3 o'clock direction from it's
// current position.
@@ -4127,9 +4231,9 @@ wall), the character is pushed only up to the obstacle.
*get_version()
-This command will return the SVN revision number or Git SHA-1 hash that the server
-is currently running on (depends on whether you used a SVN or Git client for
-getting Hercules.
+This command will return the SVN revision number or Git SHA-1 hash the
+server is currently running on (depends on whether you used a SVN or Git
+client for getting Hercules).
if ( get_version() >= 15000 )
mes "Welcome Hercules!";
@@ -4149,78 +4253,84 @@ If <account ID> is not specified, items will be created in the invoking
character inventory instead.
In the first and most commonly used version of this command, items are
-referred to by their database ID number found inside 'db/(pre-)re/item_db.txt'.
+referred to by their database ID number found in 'db/(pre-)re/item_db.txt'.
getitem 502,10 // The person will receive 10 apples
getitem 617,1 // The person will receive 1 Old Violet Box
-Giving an item ID of -1 will give a specified number of random items from the
-list of those that fall out of Old Blue Box. Unlike in all other cases, these
-will be unidentified, if they turn out to be equipment. This is exactly what's
-written in the Old Blue Box's item script.
+Giving an item ID of -1 will give a specified number of random items from
+the list of those that fall out of Old Blue Box. Unlike in all other
+cases, these will be unidentified, if they turn out to be equipment. This
+is exactly what's written in the Old Blue Box's item script.
-Other negative IDs also correspond to other random item generating item tables:
+Other negative IDs also correspond to other random item generating item
+tables:
Giving an item ID of -2 will produce the effects of Old Violet Box.
Giving an item ID of -3 will produce the effects of Old Card Album.
Giving an item ID of -4 will produce the effects of Gift Box.
-Giving an item ID of -5 will produce the effects of Worn Out Scroll, which, in
-current SVN, drops only Jellopies anyway.
+Giving an item ID of -5 will produce the effects of Worn Out Scroll,
+which, in current Git, drops only Jellopies anyway.
-This transaction is logged if the log script generated transactions option is
-enabled.
+This transaction is logged if the log script generated transactions option
+is enabled.
-You may also create an item by it's name in the 'english name' field in the
-item database:
+You may also create an item by it's name in the 'english name' field in
+the item database:
getitem "RED_POTION",10;
-Which will do what you'd expect. If it can't find that name in the database,
-apples will be created anyway. It is often a VERY GOOD IDEA to use it like this.
+Which will do what you'd expect. If it can't find that name in the
+database, apples will be created anyway. It is often a VERY GOOD IDEA to
+use it like this.
This is used in pretty much all NPC scripts that have to do with items and
-quite a few item scripts. For more examples check just about any official script.
+quite a few item scripts. For more examples check just about any official
+script.
---------------------------------------
*getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
*getitem2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
-This command will give an amount of specified items to the invoking character.
-If an optional account ID is specified, and the target character is currently
-online, items will be created in their inventory instead. If they are not
-online, nothing will happen. It works essentially the same as 'getitem' (it even
-works for negative ID numbers the same way) but is a lot more flexible.
+This command will give an amount of specified items to the invoking
+character. If an optional account ID is specified, and the target
+character is currently online, items will be created in their inventory
+instead. If they are not online, nothing will happen. It works essentially
+the same as 'getitem' (it even works for negative ID numbers the same way)
+but is a lot more flexible.
Those parameters that are different from 'getitem' are:
identify - Whether you want the item to be identified (1) or not (0).
-refine - For how many pluses will it be refined.
- It will not let you refine an item higher than the max refine.
+refine - For how many pluses will it be refined. It will not let you
+ refine an item higher than the max refine.
attribute - Whether the item is broken (1) or not (0).
-card1,2,3,4 - If you want a card compound to it, place the card ID number into
- the specific card slot.
+card1,2,3,4 - If you want a card compound to it, place the card ID number
+ into the specific card slot.
-Card1-card4 values are also used to store name information for named items, as
-well as the elemental property of weapons and armor. You can create a named item
-in this manner, however, if you just need a named piece of standard equipment,
-it is much easier to the 'getnameditem' function instead.
+Card1-card4 values are also used to store name information for named
+items, as well as the elemental property of weapons and armor. You can
+create a named item in this manner, however, if you just need a named
+piece of standard equipment, it is much easier to the 'getnameditem'
+function instead.
-You will need to keep these values if you want to destroy and then perfectly
-recreate a named item, for this see 'getinventorylist'.
+You will need to keep these values if you want to destroy and then
+perfectly recreate a named item, for this see 'getinventorylist'.
If you still want to try creating a named item with this command because
-'getnameditem' won't do it for you cause it's too limited, you can do it like
-this. Careful, minor magic ahead.
+'getnameditem' won't do it for you cause it's too limited, you can do it
+like this. Careful, minor magic ahead.
- // First, let's get an ID of a character who's name will be on the item.
- // Only an existing character's name may be there.
+ // First, let's get an ID of a character who's name will be on the
+ // item. Only an existing character's name may be there.
// Let's assume our character is 'Adam' and find his ID.
set @charid,getcharid(0,"Adam");
- // Now we split the character ID number into two portions with a binary
- // shift operation. If you don't understand what this does, just copy it.
+ // Now we split the character ID number into two portions with a
+ // binary shift operation. If you don't understand what this does,
+ // just copy it.
set @card3, @charid & 65535;
set @card4, @charid >> 16;
@@ -4265,15 +4375,15 @@ To create equipment, continue this example it like this:
getitem2 1216,1,1,2,0,@card1,@card2,@card3,@card4;
-Experiment with the number of star crumbs - I'm not certain just how much will
-work most and what it depends on. The valid element numbers are:
+Experiment with the number of star crumbs - I'm not certain just how much
+will work most and what it depends on. The valid element numbers are:
1 - Ice, 2 - Earth 3 - Fire 4 - Wind.
You can, apparently, even create duplicates of the same pet egg with this
-command, creating a pet which is the same, but simultaneously exists in two
-eggs, and may hatch from either, although, I'm not sure what kind of a mess will
-this really cause.
+command, creating a pet which is the same, but simultaneously exists in
+two eggs, and may hatch from either, although, I'm not sure what kind of a
+mess will this really cause.
---------------------------------------
@@ -4282,15 +4392,16 @@ this really cause.
Create an item signed with the given character's name.
-The command returns 1 when the item is created successfully, or 0 if it fails.
-Failure occurs when:
+The command returns 1 when the item is created successfully, or 0 if it
+fails. Failure occurs when:
- There is no player attached.
- Item name or ID is not valid.
- The given character ID/name is offline.
Example:
-//This will give the currently attached player a Aaron's Apple (if Aaron is online).
+//This will give the currently attached player a Aaron's Apple (if Aaron
+//is online).
getnameditem "Apple","Aaron";
//Self-explanatory (I hope).
@@ -4303,13 +4414,15 @@ Example:
*rentitem <item id>,<time>;
*rentitem "<item name>",<time>;
-Creates a rental item in the attached character's inventory. The item will expire
-in <time> seconds and be automatically deleted. When receiving a rental item,
-the character will receive a message in their chat window. The character will
-also receive warning messages in their chat window before the item disappears.
+Creates a rental item in the attached character's inventory. The item will
+expire in <time> seconds and be automatically deleted. When receiving a
+rental item, the character will receive a message in their chat window.
+The character will also receive warning messages in their chat window
+before the item disappears.
-This command can not be used to rent stackable items. Rental items cannot be
-dropped, traded, sold to NPCs, or placed in guild storage. (i.e. trade mask 75)
+This command can not be used to rent stackable items. Rental items cannot
+be dropped, traded, sold to NPCs, or placed in guild storage (i.e. trade
+mask 75).
Note: 'delitem' in an NPC script can still remove rental items.
---------------------------------------
@@ -4326,26 +4439,27 @@ specified location.
X - The X coordinate
Y - The Y coordinate.
-This item will still disappear just like any other dropped item. Like 'getitem',
-it also accepts an 'english name' field from the database and creates apples if
-the name isn't found.
-If the map name is given as "this", the map the invoking character is on will be used.
+This item will still disappear just like any other dropped item. Like
+'getitem', it also accepts an 'english name' field from the database and
+creates apples if the name isn't found.
+If the map name is given as "this", the map the invoking character is on
+will be used.
---------------------------------------
*cleanarea "<map name>",<x1>,<y1>,<x2>,<y2>;
*cleanmap "<map name>";
-These commands will clear all items lying on the ground on the specified map, either
-within the x1/y1-x2/y2 rectangle or across the entire map.
+These commands will clear all items lying on the ground on the specified
+map, either within the x1/y1-x2/y2 rectangle or across the entire map.
---------------------------------------
*searchitem <array name>,"<item name>";
-This command will fill the given array with the ID of items whose name matches
-the given one. It returns the number of items found. For performance reasons,
-the results array is limited to 10 items.
+This command will fill the given array with the ID of items whose name
+matches the given one. It returns the number of items found. For
+performance reasons, the results array is limited to 10 items.
mes "What item are you looking for?";
input @name$;
@@ -4360,25 +4474,28 @@ the results array is limited to 10 items.
*delitem <item id>,<amount>{,<account ID>};
*delitem "<item name>",<amount>{,<account ID>};
-This command will remove a specified amount of items from the invoking/target character.
-Like all the item commands, it uses the item ID found inside 'db/(pre-)re/item_db.txt'.
+This command will remove a specified amount of items from the invoking or
+target character. Like all the item commands, it uses the item ID found
+inside 'db/(pre-)re/item_db.txt'.
delitem 502,10; // The person will lose 10 apples
delitem 617,1; // The person will lose 1 Old Violet Box
-It is always a good idea to check if the player actually has the items before you delete them.
-If you try to delete more items that the player has, the player will lose the ones he/she has
-and the script will be terminated with an error.
+It is always a good idea to check if the player actually has the items
+before you delete them. If you try to delete more items that the player
+has, the player will lose the ones he/she has and the script will be
+terminated with an error.
-Like 'getitem' this command will also accept an 'english name' field from the
-database. If the name is not found, nothing will be deleted.
+Like 'getitem' this command will also accept an 'english name' field from
+the database. If the name is not found, nothing will be deleted.
---------------------------------------
*delitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
*delitem2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
-This command will remove a specified amount of items from the invoking/target character.
+This command will remove a specified amount of items from the invoking or
+target character.
Check 'getitem2' to understand its expanded parameters.
---------------------------------------
@@ -4386,8 +4503,8 @@ Check 'getitem2' to understand its expanded parameters.
*countitem(<item id>)
*countitem("<item name>")
-This function will return the number of items for the specified item ID that the
-invoking character has in the inventory.
+This function will return the number of items for the specified item ID
+that the invoking character has in the inventory.
mes "[Item Checker]";
mes "Hmmm, it seems you have "+countitem(502)+" apples";
@@ -4408,21 +4525,23 @@ adding up strings:
*countitem2(<item id>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>)
*countitem2("<item name>",<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>)
-Expanded version of 'countitem' function, used for created/carded/forged items.
+Expanded version of 'countitem' function, used for created/carded/forged
+items.
-This function will return the number of items for the specified item ID and
-other parameters that the invoking character has in the inventory.
+This function will return the number of items for the specified item ID
+and other parameters that the invoking character has in the inventory.
Check 'getitem2' to understand the arguments of the function.
---------------------------------------
*groupranditem <group id>;
-Returns the item_id of a random item picked from the group specified. The
-different groups and their group number are specified in 'db/(pre-)re/item_group_db.txt'.
+Returns the item_id of a random item picked from the group specified. The
+different groups and their group number are specified in
+'db/(pre-)re/item_group_db.txt'.
-When used in conjunction with other functions, you can get a random item. For
-example, for a random pet lure:
+When used in conjunction with other functions, you can get a random item.
+For example, for a random pet lure:
getitem groupranditem(15),1;
@@ -4430,9 +4549,10 @@ getitem groupranditem(15),1;
*getrandgroupitem <group id>,<quantity>;
-Similar to the above example, this command allows players to obtain the specified
-quantity of a random item from the group "<group id>". The different groups and
-their group number are specified in db/(pre-)re/item_group_db.txt
+Similar to the above example, this command allows players to obtain the
+specified quantity of a random item from the group "<group id>". The
+different groups and their group number are specified in
+db/(pre-)re/item_group_db.txt
For example, obtaining three of the same random item from Old Blue Box:
@@ -4443,29 +4563,33 @@ getrandgroupitem(1,3);
*enable_items;
*disable_items;
-These commands enable/disable changing of equipments while an NPC is running. When disable_items is
-run, equipments cannot be changed during scripts until enable_items is called or the script has terminated.
-To avoid possible exploits, when disable_items is invoked, it will only disable
-changing equips while running that script in particular. Note that if a different
-script also calls disable_items, it will override the last call (so you may
-want to call this command at the start of your script without assuming the
-effect is still in effect).
-If 'item_enabled_npc' option is set to Yes in 'items.conf' all NPC are allowing changing of equipment by default
-except for those have been set with 'disable_items'.
+These commands enable/disable changing of equipments while an NPC is
+running. When disable_items is run, equipments cannot be changed during
+scripts until enable_items is called or the script has terminated. To
+avoid possible exploits, when disable_items is invoked, it will only
+disable changing equips while running that script in particular. Note that
+if a different script also calls disable_items, it will override the last
+call (so you may want to call this command at the start of your script
+without assuming the effect is still in effect).
+If 'item_enabled_npc' option is set to Yes in 'items.conf' all NPC are
+allowing changing of equipment by default except for those have been set
+with 'disable_items'.
---------------------------------------
*itemskill <skill id>,<skill level>,{flag};
*itemskill "<skill name>",<skill level>,{flag};
-This command meant for item scripts to replicate single-use skills in usable
-items. It will not work properly if there is a visible dialog window or menu.
-If the skill is self or auto-targeting it will be used immediately otherwise a
-target cursor is shown.
-Flag is a optional param and when present the command will not check for skill requirements
+This command meant for item scripts to replicate single-use skills in
+usable items. It will not work properly if there is a visible dialog
+window or menu.
+If the skill is self or auto-targeting, it will be used immediately.
+Otherwise, a target cursor is shown.
+Flag is a optional param and, when present, the command will not check for
+skill requirements.
-// When Anodyne is used, it will cast Endure (8), Level 1, as if the actual
-// skill has been used from skill tree.
+// When Anodyne is used, it will cast Endure (8), Level 1, as if the
+// actual skill has been used from skill tree.
605,Anodyne,Anodyne,11,2000,0,100,,,,,10477567,2,,,,,{ itemskill 8,1; },{}
---------------------------------------
@@ -4473,26 +4597,27 @@ Flag is a optional param and when present the command will not check for skill r
itemeffect <item id>;
itemeffect "<item name>";
-This command will run the item script of the specified item on the invoking
-character. The character does not need to posess the item, and the item will
-not be deleted. While this command is intended for usable items, it will run
-for any item type.
+This command will run the item script of the specified item on the
+invoking character. The character does not need to posess the item, and
+the item will not be deleted. While this command is intended for usable
+items, it will run for any item type.
---------------------------------------
*produce <item level>;
-This command will open a crafting window on the client connected to the invoking
-character. The 'item level' is a number which determines what kind of a crafting
-window will pop-up.
+This command will open a crafting window on the client connected to the
+invoking character. The 'item level' is a number which determines what
+kind of a crafting window will pop-up.
-You can see the full list of such item levels in 'db/produce_db.txt' which determines
-what can actually be produced. The window will not be empty only if the invoking
-character can actually produce the items of that type and has the appropriate raw
-materials in their inventory.
+You can see the full list of such item levels in 'db/produce_db.txt' which
+determines what can actually be produced. The window will not be empty
+only if the invoking character can actually produce the items of that type
+and has the appropriate raw materials in their inventory.
-The success rate to produce the item is the same as the success rate of the skill
-associated with the item level. If there is no skill id, the success rate will be 50%.
+The success rate to produce the item is the same as the success rate of
+the skill associated with the item level. If there is no skill id, the
+success rate will be 50%.
Valid item levels are:
@@ -4507,13 +4632,13 @@ Valid item levels are:
*cooking <dish level>;
-This command will open a produce window on the client connected to the invoking
-character. The 'dish level' is the number which determines what kind of dish
-level you can produce. You can see the full list of dishes that can be produced in
-'db/produce_db.txt'.
+This command will open a produce window on the client connected to the
+invoking character. The 'dish level' is the number which determines what
+kind of dish level you can produce. You can see the full list of dishes
+that can be produced in 'db/produce_db.txt'.
-The window will be shown empty if the invoking character does not have enough of
-the required incredients to cook a dish.
+The window will be shown empty if the invoking character does not have
+enough of the required incredients to cook a dish.
Valid dish levels are:
@@ -4528,38 +4653,40 @@ Valid dish levels are:
19 - Level 9 Dish
20 - Level 10 Dish
-Although it's required to set a dish level, it doesn't matter if you set it to 1
-and you want to cook a level 10 dish, as long as you got the required incredients
-to cook the dish the command works.
+Although it's required to set a dish level, it doesn't matter if you set
+it to 1 and you want to cook a level 10 dish, as long as you got the
+required ingredients to cook the dish the command works.
---------------------------------------
*makerune <% success bonus>;
-This command will open a rune crafting window on the client connected to the
-invoking character. Since this command is officially used in rune ores, a bonus
-success rate must be specified (which adds to the base formula).
+This command will open a rune crafting window on the client connected to
+the invoking character. Since this command is officially used in rune
+ores, a bonus success rate must be specified (which adds to the base
+formula).
-You can see the full list of runes that can be produced in 'db/produce_db.txt'.
-The window will not be empty only if the invoking character can actually produce
-a rune and has the appropriate raw materials in their inventory.
+You can see the full list of runes that can be produced in
+'db/produce_db.txt'. The window will not be empty only if the invoking
+character can actually produce a rune and has the appropriate raw
+materials in their inventory.
---------------------------------------
*successremovecards <equipment slot>;
This command will remove all cards from the item found in the specified
-equipment slot of the invoking character, create new card items and give them to
-the character. If any cards were removed in this manner, it will also show a
-success effect.
+equipment slot of the invoking character, create new card items and give
+them to the character. If any cards were removed in this manner, it will
+also show a success effect.
---------------------------------------
*failedremovecards <equipment slot>,<type>;
This command will remove all cards from the item found in the specified
-equipment slot of the invoking character. 'type' determines what happens to the
-item and the cards:
+equipment slot of the invoking character. 'type' determines what happens
+to the item and the cards:
0 - will destroy both the item and the cards.
1 - will keep the item, but destroy the cards.
@@ -4571,80 +4698,84 @@ Whatever the type is, it will also show a failure effect on screen.
*repair <broken item number>;
-This command repairs a broken piece of equipment, using the same list of broken
-items as available through 'getbrokenid'.
+This command repairs a broken piece of equipment, using the same list of
+broken items as available through 'getbrokenid'.
The official scripts seem to use the repair command as a function instead:
-'repair(<number>)' but it returns nothing on the stack. Probably only Valaris,
-who made it, can answer why is it so.
+'repair(<number>)' but it returns nothing on the stack. Probably only
+Valaris, who made it, can answer why is it so.
---------------------------------------
*repairall;
-This command repairs all broken equipment in the attached player's inventory.
-A repair effect will be shown if any items are repaired, else the command will
-end silently.
+This command repairs all broken equipment in the attached player's
+inventory. A repair effect will be shown if any items are repaired, else
+the command will end silently.
---------------------------------------
*successrefitem <equipment slot>;
-This command will refine an item in the specified equipment slot of the invoking
-character by +1. For a list of equipment slots see 'getequipid'. This command
-will not only add the +1, but also display a 'refine success' effect on the
-character and put appropriate messages into their chat window. It will also give
-the character fame points if a weapon reached +10 this way, even though these
-will only take effect for blacksmith who will later forge a weapon.
+This command will refine an item in the specified equipment slot of the
+invoking character by +1. For a list of equipment slots see 'getequipid'.
+This command will not only add the +1, but also display a 'refine success'
+effect on the character and put appropriate messages into their chat
+window. It will also give the character fame points if a weapon reached
++10 this way, even though these will only take effect for blacksmith who
+will later forge a weapon.
-The official scripts seems to use the 'successrefitem' command as a function
-instead: 'successrefitem(<number>)' but it returns nothing on the stack.
-This is since jAthena, so probably nobody knows for sure why is it so.
+The official scripts seems to use the 'successrefitem' command as a
+function instead: 'successrefitem(<number>)' but it returns nothing on the
+stack. This is since jAthena, so probably nobody knows for sure why is it
+so.
---------------------------------------
*failedrefitem <equipment slot>;
-This command will fail to refine an item in the specified equipment slot of the
-invoking character. The item will be destroyed. This will also display a 'refine
-failure' effect on the character and put appropriate messages into their chat
-window.
+This command will fail to refine an item in the specified equipment slot
+of the invoking character. The item will be destroyed. This will also
+display a 'refine failure' effect on the character and put appropriate
+messages into their chat window.
-The official scripts seems to use the 'failedrefitem' command as a function
-instead: 'failedrefitem(<number>)' but it returns nothing on the stack. This is
-since jAthena, so probably nobody knows for sure why is it so.
+The official scripts seems to use the 'failedrefitem' command as a
+function instead: 'failedrefitem(<number>)' but it returns nothing on the
+stack. This is since jAthena, so probably nobody knows for sure why is it
+so.
---------------------------------------
*downrefitem <equipment slot>;
-This command will downgrade an item by - 1 in the specified equipment slot of the
-invoking character. So the item will not be destroyed unlike in the failedrefitem script command.
-This will also display a 'refine failure' effect on the character and put appropriate
-messages into their chat window.
+This command will downgrade an item by - 1 in the specified equipment slot
+of the invoking character. So the item will not be destroyed unlike in the
+failedrefitem script command. This will also display a 'refine failure'
+effect on the character and put appropriate messages into their chat
+window.
The official scripts seems to use the 'downrefitem' command as a function
-instead: 'downrefitem(<number>)' but it returns nothing on the stack. This is
-since jAthena, so probably nobody knows for sure why is it so.
+instead: 'downrefitem(<number>)' but it returns nothing on the stack.
+This is since jAthena, so probably nobody knows for sure why is it so.
---------------------------------------
*unequip <equipment slot>;
This command will unequip whatever is currently equipped in the invoking
-character's specified equipment slot. For a full list of possible equipment
-slots see 'getequipid'.
+character's specified equipment slot. For a full list of possible
+equipment slots see 'getequipid'.
-If an item occupies several equipment slots, it will get unequipped from all of
-them.
+If an item occupies several equipment slots, it will get unequipped from
+all of them.
---------------------------------------
*clearitem;
This command will destroy all items the invoking character has in their
-inventory (including equipped items). It will not affect anything else, like
-storage or cart.
+inventory (including equipped items). It will not affect anything else,
+like storage or cart.
---------------------------------------
@@ -4652,17 +4783,19 @@ storage or cart.
*autoEquip <item id>,<option>;
These commands are to equip a equipment on the attached character.
-The equip function will equip the item ID given when the player has
-this item in his/her inventory, while the autoequip function will
-equip the given item ID when this is looted. The option parameter of
-the autoequip is 1 or 0, 1 to turn it on, and 0 to turn it off.
+The equip function will equip the item ID given when the player has this
+item in his/her inventory, while the autoequip function will equip the
+given item ID when this is looted. The option parameter of the autoequip
+is 1 or 0, 1 to turn it on, and 0 to turn it off.
Examples:
-//This will equip a 1104 (falchion) on the character if this is in the inventory.
+//This will equip a 1104 (falchion) on the character if this is in the
+//inventory.
equip 1104;
-//The invoked character will now automatically equip a falchion when it's looted.
+//The invoked character will now automatically equip a falchion when it's
+//looted.
autoequip 1104,1;
//The invoked character will no longer automatically equip a falchion.
@@ -4672,9 +4805,9 @@ Examples:
*buyingstore <slots>;
-Invokes buying store preparation window like the skill 'Open Buying Store',
-without the item requirement. Amount of slots is limited by the server to
-a maximum of 5 slots by default.
+Invokes buying store preparation window like the skill 'Open Buying
+Store', without the item requirement. Amount of slots is limited by the
+server to a maximum of 5 slots by default.
Example:
@@ -4685,15 +4818,15 @@ Example:
*searchstores <uses>,<effect>;
-Invokes the store search window, which allows to search for both vending
-and buying stores. Parameter uses indicates, how many searches can be
-started, before the window has to be reopened. Effect value affects,
-what happens, when a result item is double-clicked and can be one of the
+Invokes the store search window, which allows to search for both vending
+and buying stores. Parameter uses indicates, how many searches can be
+started, before the window has to be reopened. Effect value affects what
+happens when a result item is double-clicked and can be one of the
following:
- 0 = Shows the store's position on the mini-map and highlights the
- shop sign with yellow color, when the store is on same map
- as the invoking player.
+ 0 = Shows the store's position on the mini-map and highlights the shop
+ sign with yellow color, when the store is on same map as the
+ invoking player.
1 = Directly opens the shop, regardless of distance.
Example:
@@ -4709,13 +4842,13 @@ Example:
*openstorage;
-This will open character's Kafra storage window on the client connected to the
-invoking character. It can be used from any kind of NPC or item script, not just
-limited to Kafra Staff.
+This will open character's Kafra storage window on the client connected to
+the invoking character. It can be used from any kind of NPC or item
+script, not just limited to Kafra Staff.
-The storage window opens regardless of whether there are open NPC dialogs or
-not, but it is preferred to close the dialog before displaying the storage
-window, to avoid any disruption when both windows overlap.
+The storage window opens regardless of whether there are open NPC dialogs
+or not, but it is preferred to close the dialog before displaying the
+storage window, to avoid any disruption when both windows overlap.
mes "I will now open your stash for you";
close2;
@@ -4738,7 +4871,8 @@ invoking character.
*openauction;
-This will open the Auction window on the client connected to the invoking character.
+This will open the Auction window on the client connected to the invoking
+character.
mes "Close this window to open the Auction window.";
close2;
@@ -4753,21 +4887,24 @@ This will open the Auction window on the client connected to the invoking charac
*guildopenstorage()
-This function works the same as 'openstorage' but will open a guild storage
-window instead for the guild storage of the guild the invoking character belongs
-to. This is a function because it returns a value - 0 if the guild storage was
-opened successfully and 1 if it wasn't. (Notice, it's a ZERO upon success.)
-Since guild storage is only accessible to one character at one time, it may fail
-if another character is accessing the guild storage at the same time.
+This function works the same as 'openstorage' but will open a guild
+storage window instead for the guild storage of the guild the invoking
+character belongs to. This is a function because it returns a value - 0 if
+the guild storage was opened successfully and 1 if it wasn't. (Notice,
+it's a ZERO upon success.)
+Since guild storage is only accessible to one character at one time, it
+may fail if another character is accessing the guild storage at the same
+time.
-This will also fail and return 2 if the character does not belong to any guild.
+This will also fail and return 2 if the attached character does not belong
+to any guild.
---------------------------------------
*guildchangegm(<guild id>,<new master's name>)
-This function will change the Guild Master of a guild. The ID is the guild's
-id, and the new guild master's name must be passed.
+This function will change the Guild Master of a guild. The ID is the
+guild's id, and the new guild master's name must be passed.
Returns 1 on success, 0 otherwise.
@@ -4775,37 +4912,34 @@ Returns 1 on success, 0 otherwise.
*guildgetexp <amount>;
-This will give the specified amount of guild experience points to the guild the
-invoking character belongs to. It will silently fail if they do not belong to
-any guild.
+This will give the specified amount of guild experience points to the
+guild the invoking character belongs to. It will silently fail if they do
+not belong to any guild.
---------------------------------------
*guildskill <skill id>,<level>
*guildskill "<skill name>",<level>
-This command will bump up the specified guild skill by the specified number of
-levels. This refers to the invoking character and will only work if the invoking
-character is a member of a guild AND it's guild master, otherwise no failure
-message will be given and no error will occur, but nothing will happen - same
-about the guild skill trying to exceed the possible maximum. The full list of
-guild skills is available in 'db/(pre-)re/skill_db.txt', these are all the GD_ skills at
-the end.
-
-The flag parameter is currently not functional and it's a mystery of what it
-would actually do. (Though probably, like for character skills, it would allow
-temporary bumping.) Using this command will bump the guild skill up permanently.
+This command will bump up the specified guild skill by the specified
+number of levels. This refers to the invoking character and will only work
+if the invoking character is a member of a guild AND it's guild master,
+otherwise no failure message will be given and no error will occur, but
+nothing will happen - same about the guild skill trying to exceed the
+possible maximum. The full list of guild skills is available in
+'db/(pre-)re/skill_db.txt', these are all the GD_ skills at the end.
-// This would give your character's guild one level of Approval (GD_APPROVAL ID
-// 10000). Notice that if you try to add two levels of Approval, or add
-// Approval when the guild already has it, it will only have one level of
-// Approval afterwards.
- guildskill 10000,1,0;
+// This would give your character's guild one level of Approval
+// (GD_APPROVAL ID 10000). Notice that if you try to add two levels of
+// Approval, or add Approval when the guild already has it, it will only
+// have one level of Approval afterwards.
+ guildskill 10000,1;
-You might want to make a quest for getting a certain guild skill, make it hard
-enough that all the guild needs to help or something. Doing this for the Glory
-of the Guild skill, which allows your guild to use an emblem, is a good idea for
-a fun quest. (Wasting a level point on that is really annoying :D)
+You might want to make a quest for getting a certain guild skill, make it
+hard enough that all the guild needs to help or something. Doing this for
+the Glory of the Guild skill, which allows your guild to use an emblem, is
+a good idea for a fun quest. (Wasting a level point on that is really
+annoying :D)
---------------------------------------
//
@@ -4815,14 +4949,14 @@ a fun quest. (Wasting a level point on that is really annoying :D)
*resetlvl <action type>;
-This is a character reset command, meant mostly for rebirth script supporting
-Advanced jobs, which will reset the invoking character's stats and level
-depending on the action type given. Valid action types are:
+This is a character reset command, meant mostly for rebirth script
+supporting Advanced jobs, which will reset the invoking character's stats
+and level depending on the action type given. Valid action types are:
- 1 - Base level 1, Job level 1, 0 skill points, 0 base exp, 0 job exp, wipes the
- status effects (only the ones settable by 'setoption'), sets all stats to 1.
- If the new job is 'Novice High', give 100 status points, give First Aid and
- Play Dead skills.
+ 1 - Base level 1, Job level 1, 0 skill points, 0 base exp, 0 job exp,
+ wipes the status effects (only the ones settable by 'setoption'),
+ sets all stats to 1. If the new job is 'Novice High', give 100 status
+ points, give First Aid and Play Dead skills.
2 - Base level 1, Job level 1, 0 skill points, 0 base exp, 0 job exp.
Skills and attribute values are not altered.
3 - Base level 1, base exp 0. Nothing else is changed.
@@ -4830,31 +4964,31 @@ depending on the action type given. Valid action types are:
In all cases everything the character has on will be unequipped.
-Even though it doesn't return a value, it is used as a function in the official
-rebirth scripts. Ask AppleGirl why.
+Even though it doesn't return a value, it is used as a function in the
+official rebirth scripts.
---------------------------------------
*resetstatus;
-This is a character reset command, which will reset the stats on the invoking
-character and give back all the stat points used to raise them previously.
-Nothing will happen to any other numbers about the character.
+This is a character reset command, which will reset the stats on the
+invoking character and give back all the stat points used to raise them
+previously. Nothing will happen to any other numbers about the character.
-Used in reset NPC's (duh!)
+Used in reset NPC's (duh!).
---------------------------------------
*resetskill;
-This command takes off all the skill points on the invoking character, so they
-only have Basic Skill blanked out (lvl 0) left, and returns the points for them
-to spend again. Nothing else will change but the skills. Quest skills will also
-reset if 'quest_skill_reset' option is set to Yes in 'battle.conf'. If
-the 'quest_skill_learn' option is set in there, the points in the quest skills
-will also count towards the total.
+This command takes off all the skill points on the invoking character, so
+they only have Basic Skill blanked out (lvl 0) left, and returns the
+points for them to spend again. Nothing else will change but the skills.
+Quest skills will also reset if 'quest_skill_reset' option is set to Yes
+in 'battle.conf'. If the 'quest_skill_learn' option is set in there, the
+points in the quest skills will also count towards the total.
-Used in reset NPC's (duh!)
+Used in reset NPC's (duh!).
---------------------------------------
@@ -4863,54 +4997,55 @@ Used in reset NPC's (duh!)
*sc_start4 <effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<GID>};
*sc_end <effect type>{,<GID>};
-These command bestow a status effect on the invoking character. This command is
-used a lot in the item scripts.
+These command bestow a status effect on the invoking character. This
+command is used a lot in the item scripts.
// This would poison them for 10 min
sc_start SC_Poison,600000,0;
Effect type is a number of effect, 'db/const.txt' lists the common (mostly
-negative) status effect types as constants, starting with 'SC_'. You can also
-use this to give someone an effect of a player-cast spell:
+negative) status effect types as constants, starting with 'SC_'. You can
+also use this to give someone an effect of a player-cast spell:
// This will bless someone as if with Bless 10:
sc_start 10,240000,10;
-Extra argument's meaning differs depending on the effect type, for most effects
-caused by a player skill the extra argument means the level of the skill that
-would have been used to create that effect, for others it might have no meaning
-whatsoever. You can actually bless someone with a 0 bless spell level this way,
-which is fun, but weird.
-
-The GID, if given, will cause the status effect to appear on a
-specified character, instead of the one attached to the running script. This has
-not been properly tested.
-
-'sc_start2' is perfectly equivalent, but unlike 'sc_start', a status change
-effect will only occur with a specified percentage chance. 10000 given as the
-chance is equivalent to a 100% chance, 0 is a zero.
-
-'sc_start4' is just like sc_start, however it takes four parameters for the
-status change instead of one. What these values are depends on the status
-change in question. For example, elemental armor defense takes the following
-four values:
+Extra argument's meaning differs depending on the effect type, for most
+effects caused by a player skill the extra argument means the level of the
+skill that would have been used to create that effect, for others it might
+have no meaning whatsoever. You can actually bless someone with a 0 bless
+spell level this way, which is fun, but weird.
+
+The GID, if given, will cause the status effect to appear on a specified
+character, instead of the one attached to the running script. This has not
+been properly tested.
+
+'sc_start2' is perfectly equivalent, but unlike 'sc_start', a status
+change effect will only occur with a specified percentage chance. 10000
+given as the chance is equivalent to a 100% chance, 0 is a zero.
+
+'sc_start4' is just like sc_start, however it takes four parameters for
+the status change instead of one. What these values are depends on the
+status change in question. For example, elemental armor defense takes the
+following four values:
- val1 is the first element, val2 is the resistance to the element val1.
- val3 is the second element, val4 is the resistance to said element.
eg: sc_start4 SC_DefEle,60000,Ele_Fire,20,Ele_Water,-15;
-'sc_end' will remove a specified status effect. If SC_All is used (-1), it will
-do a complete removal of all statuses (although permanent ones will re-apply).
+'sc_end' will remove a specified status effect. If SC_All is used (-1), it
+will do a complete removal of all statuses (although permanent ones will
+re-apply).
You can see the full list of status effects caused by skills in
-'src/map/status.h' - they are currently not fully documented, but most of that
-should be rather obvious.
+'src/map/status.h' - they are currently not fully documented, but most of
+that should be rather obvious.
---------------------------------------
*getstatus <effect type>{,<type>};
-Retrieve information about a specific status effect when called. Depending on <type>
-specified the function will return different information.
+Retrieve information about a specific status effect when called. Depending
+on <type> specified the function will return different information.
Possible <type> values:
- 0 or undefined: whether the status is active
@@ -4920,22 +5055,22 @@ Possible <type> values:
- 4: the val4 of the status
- 5: the amount of time in milliseconds that the status has remaining
-If <type> is not defined or is set to 0, then the script function will either
-return 1 if the status is active, or 0 if the status is not active. If the status
-is not active when any of the <type> fields are provided, this script function
-will always return 0.
+If <type> is not defined or is set to 0, then the script function will
+either return 1 if the status is active, or 0 if the status is not active.
+If the status is not active when any of the <type> fields are provided,
+this script function will always return 0.
---------------------------------------
*skilleffect <skill id>,<number>;
*skilleffect "<skill name>",<number>;
-This command displays visual and aural effects of given skill on currently
-attached character. The number parameter is for skill whose visual effect
-involves displaying of a number (healing or damaging). Note, that this command
-will not actually use the skill, it is intended for scripts, which simulate
-skill usage by the NPC, such as buffs, by setting appropriate status and
-displaying the skill's effect.
+This command displays visual and aural effects of given skill on currently
+attached character. The number parameter is for skill whose visual effect
+involves displaying of a number (healing or damaging). Note that this
+command will not actually use the skill: it is intended for scripts which
+simulate skill usage by the NPC, such as buffs, by setting appropriate
+status and displaying the skill's effect.
mes "Be blessed!";
// Heal of 2000 HP
@@ -4948,7 +5083,7 @@ displaying the skill's effect.
sc_start 12,140000,5;
skilleffect 29,0;
-This will heal the character with 2000 HP, buff it with Blessing Lv 10 and
+This will heal the character with 2000 HP, buff it with Blessing Lv 10 and
Increase AGI Lv 5, and display appropriate effects.
---------------------------------------
@@ -4956,25 +5091,25 @@ Increase AGI Lv 5, and display appropriate effects.
*npcskilleffect <skill id>,<number>,<x>,<y>;
*npcskilleffect "<skill name>",<number>,<x>,<y>;
-This command behaves identically to 'skilleffect', however, the effect will not
-be centered on the invoking character's sprite, nor on the NPC sprite, if any,
-but will be centered at map coordinates given on the same map as the invoking
-character.
+This command behaves identically to 'skilleffect', however, the effect
+will not be centered on the invoking character's sprite, nor on the NPC
+sprite, if any, but will be centered at map coordinates given on the same
+map as the invoking character.
---------------------------------------
*specialeffect <effect number>{,<send_target>{,"<NPC Name>"}};
-This command will display special effect with the given number, centered on the
-specified NPCs coordinates, if any. For a full list of special effect numbers
-known see 'doc/effect_list.txt'. Some effect numbers are known not to work in
-some client releases. (Notably, rain is absent from any client executables
-released after April 2005.)
+This command will display special effect with the given number, centered
+on the specified NPCs coordinates, if any. For a full list of special
+effect numbers known see 'doc/effect_list.txt'. Some effect numbers are
+known not to work in some client releases. (Notably, rain is absent from
+any client executables released after April 2005.)
-<NPC name> parameter will display <effect number> on another NPC. If the NPC
-specified does not exist, the command will do nothing. When specifying an NPC,
-<send_target> must be specified when specifying an <NPC Name>, specifying AREA
-will retain the default behavior of the command.
+<NPC name> parameter will display <effect number> on another NPC. If the
+NPC specified does not exist, the command will do nothing. When specifying
+an NPC, <send_target> must be specified when specifying an <NPC Name>,
+specifying AREA will retain the default behavior of the command.
// this will make the NPC "John Doe#1"
// show the effect "EF_HIT1" specified by
@@ -4988,21 +5123,21 @@ will retain the default behavior of the command.
*specialeffect2 <effect number>{,<send_target>{,"<Player Name>"}};
-This command behaves identically to the 'specialeffect', but the effect will be
-centered on the invoking character's sprite.
+This command behaves identically to the 'specialeffect', but the effect
+will be centered on the invoking character's sprite.
-<Player name> parameter will display <effect number> on another Player than the
-one currently attached to the script. Like with specialeffect, when specifying
-a player, <send_target> must be supplied, specifying AREA will retain the default
-behavior of the command.
+<Player name> parameter will display <effect number> on another Player
+than the one currently attached to the script. Like with specialeffect,
+when specifying a player, <send_target> must be supplied, specifying AREA
+will retain the default behavior of the command.
---------------------------------------
*statusup <stat>;
-This command will bump a specified stat of the invoking character up by one
-permanently. Stats are to be given as number, but you can use these constants to
-replace them:
+This command will bump a specified stat of the invoking character up by
+one permanently. Stats are to be given as number, but you can use these
+constants to replace them:
bStr - Strength
bVit - Vitality
@@ -5015,8 +5150,8 @@ bLuk - Luck
*statusup2 <stat>,<amount>;
-This command will bump a specified stat of the invoking character up by the
-specified amount permanently. The amount can be negative. See 'statusup'.
+This command will bump a specified stat of the invoking character up by
+the specified amount permanently. Amount can be negative. See 'statusup'.
// This will decrease a character's Vit forever.
statusup bVit,-1;
@@ -5029,12 +5164,12 @@ specified amount permanently. The amount can be negative. See 'statusup'.
*bonus4 <bonus type>,<val1>,<val2>,<val3>,<val4>;
*bonus5 <bonus type>,<val1>,<val2>,<val3>,<val4>,<val5>;
-These commands are meant to be used in item scripts. They will probably work
-outside item scripts, but the bonus will not persist for long. They, as
-expected, refer only to an invoking character.
+These commands are meant to be used in item scripts. They will probably
+work outside item scripts, but the bonus will not persist for long. They,
+as expected, refer only to an invoking character.
-You can find the full list of possible bonuses and which command to use for each
-kind in 'doc/item_bonus.txt'.
+You can find the full list of possible bonuses and which command to use
+for each kind in 'doc/item_bonus.txt'.
---------------------------------------
@@ -5043,21 +5178,24 @@ kind in 'doc/item_bonus.txt'.
*autobonus3 <bonus script>,<rate>,<duration>,<skill id>,{<other script>};
*autobonus3 <bonus script>,<rate>,<duration>,"<skill name>",{<other script>};
-These commands are meant to be used in item scripts. They will probably work
-outside item scripts, but the bonus will not persist for long. They, as
-expected, refer only to an invoking character.
+These commands are meant to be used in item scripts. They will probably
+work outside item scripts, but the bonus will not persist for long. They,
+as expected, refer only to an invoking character.
What these commands do is 'attach' a script to the player which will get
executed on attack (or when attacked in the case of autobonus2).
-Rate is the trigger rate of the script (1000 = 100%).
+Rate is the trigger rate of the script (10000 = 100%).
-Duration is the time that the bonus will last for since the script has triggered.
+Duration is the time that the bonus will last for since the script has
+triggered.
-Skill ID/skill name the skill which will be used as trigger to start the bonus. (autobonus3)
+Skill ID/skill name the skill which will be used as trigger to start the
+bonus (for autobonus3).
-The optional argument 'flag' is used to classify the type of attack where the script
-can trigger (it shares the same flags as the bAutoSpell bonus script):
+The optional argument 'flag' is used to classify the type of attack where
+the script can trigger (it shares the same flags as the bAutoSpell bonus
+script):
Range criteria:
BF_SHORT: Trigger on melee attack
@@ -5072,22 +5210,23 @@ Skill criteria:
BF_NORMAL: Trigger on normal attacks
BF_SKILL: Trigger on skills
default: If the attack type is BF_WEAPON (only) BF_NORMAL is used,
- otherwise BF_SKILL+BF_NORMAL is used.
-
-The difference between the optional argument 'other script' and the 'bonus script' is that,
-the former one triggers only when attacking(or attacked) and the latter one runs on
-status calculation as well, which makes sure, within the duration, the "bonus" that get
-lost on status calculation is restored. So, 'bonus script' is technically supposed to accept
-"bonus" command only. And we usually use 'other script' to show visual effects.
-
-In all cases, when the script triggers, the attached player will be the one
-who holds the bonus. There is currently no way of knowing within this script
-who was the other character (the attacker in autobonus2, or the target in
-autobonus and autobonus3).
-
-//Grants a 1% chance of starting the state "all stats +10" for 10 seconds when
-//using weapon or misc attacks (both melee and ranged skills) and shows a special
-//effect when the bonus is active.
+ otherwise BF_SKILL+BF_NORMAL is used.
+
+The difference between the optional argument 'other script' and the 'bonus
+script' is that, the former one triggers only when attacking (or attacked)
+and the latter one runs on status calculation as well, which makes sure,
+within the duration, the "bonus" that get lost on status calculation is
+restored. So, 'bonus script' is technically supposed to accept "bonus"
+command only. And we usually use 'other script' to show visual effects.
+
+In all cases, when the script triggers, the attached player will be the
+one who holds the bonus. There is currently no way of knowing within this
+script who was the other character (the attacker in autobonus2, or the
+target in autobonus and autobonus3).
+
+//Grants a 1% chance of starting the state "all stats +10" for 10 seconds
+//when using weapon or misc attacks (both melee and ranged skills) and
+//shows a special effect when the bonus is active.
autobonus "{ bonus bAllStats,10; }",10,10000,BF_WEAPON|BF_MISC,"{ specialeffect2 EF_FIRESPLASHHIT; }";
---------------------------------------
@@ -5097,37 +5236,43 @@ autobonus and autobonus3).
*addtoskill <skill id>,<level>{,<flag>};
*addtoskill "<skill name>",<level>{,<flag>};
-These commands will give the invoking character a specified skill. This is also
-used for item scripts.
+These commands will give the invoking character a specified skill. This is
+also used for item scripts.
-Level is obvious. Skill id is the ID number of the skill in question as per
-'db/(pre-)re/skill_db.txt'. It is not known for certain whether this can be used to give
-a character a monster's skill, but you're welcome to try with the numbers given
-in 'db/(pre-)re/mob_skill_db.txt'.
+Level is obvious. Skill id is the ID number of the skill in question as
+per 'db/(pre-)re/skill_db.txt'. It is not known for certain whether this
+can be used to give a character a monster's skill, but you're welcome to
+try with the numbers given in 'db/(pre-)re/mob_skill_db.txt'.
-Flag is 0 if the skill is given permanently (will get written with the character
-data) or 1 if it is temporary (will be lost eventually, this is meant for card
-item scripts usage.). The flag parameter is optional, and defaults to 1 in
-'skill' and to 2 in 'addtoskill'.
+Flag is 0 if the skill is given permanently (will get written with the
+character data) or 1 if it is temporary (will be lost eventually, this is
+meant for card item scripts usage.). The flag parameter is optional, and
+defaults to 1 in 'skill' and to 2 in 'addtoskill'.
Flag 2 means that the level parameter is to be interpreted as a stackable
-additional bonus to the skill level. If the character did not have that skill
-previously, they will now at 0+the level given.
+additional bonus to the skill level. If the character did not have that
+skill previously, they will now at 0+the level given.
-// This will permanently give the character Stone Throw (TF_THROWSTONE,152), at
-// level 1.
+// This will permanently give the character Stone Throw
+// (TF_THROWSTONE,152), at level 1.
skill 152,1,0;
-Flag 3 is the same as flag 0 in that it saves to the database. However, these skills
-are ignored when any action is taken that adjusts the skill tree (reset/job change).
+Flag 3 is the same as flag 0 in that it saves to the database. However,
+these skills are ignored when any action is taken that adjusts the skill
+tree (reset/job change).
+
+Flag 4 is the same as flag 1 in that it saves to the database. However,
+these skills are ignored when any action is taken that adjusts the skill
+tree (reset/job change).
+
---------------------------------------
*nude;
This command will unequip anything equipped on the invoking character.
-It is not required to do this when changing jobs since 'jobchange' will unequip
-everything not equippable by the new job class anyway.
+It is not required to do this when changing jobs since 'jobchange' will
+unequip everything not equippable by the new job class anyway.
---------------------------------------
@@ -5151,34 +5296,38 @@ undisguise; // Return to normal character sprite.
*marriage("<spouse name>");
-This function will marry two characters, the invoking character and the one
-referred to by name given, together, setting them up as each other's marriage
-partner. No second function call has to be issued (in current SVN at least) to
-make sure the marriage works both ways. The function returns 1 upon success, or
-0 if the marriage could not be completed, either because the other character
-wasn't found or because one of the two characters is already married.
+This function will marry two characters, the invoking character and the
+one referred to by name given, together, setting them up as each other's
+marriage partner. No second function call has to be issued (in current Git
+at least) to make sure the marriage works both ways. The function returns
+1 upon success, or 0 if the marriage could not be completed, either
+because the other character wasn't found or because one of the two
+characters is already married.
-This will do nothing else for the marriage except setting up the spouse ID for
-both of these characters. No rings will be given and no effects will be shown.
+This will do nothing else for the marriage except setting up the spouse ID
+for both of these characters. No rings will be given and no effects will
+be shown.
---------------------------------------
*wedding;
-This command will call up wedding effects - the music and confetti - centered on
-the invoking character. Example can be found in the wedding script.
+This command will call up wedding effects - the music and confetti -
+centered on the invoking character. Example can be found in the wedding
+script.
---------------------------------------
*divorce()
-This function will "un-marry" the invoking character from whoever they were
-married to. Both will no longer be each other's marriage partner, (at least in
-current SVN, which prevents the cases of multi-spouse problems). It will return
-1 upon success or 0 if the character was not married at all.
+This function will "un-marry" the invoking character from whoever they
+were married to. Both will no longer be each other's marriage partner,
+(at least in current Git, which prevents the cases of multi-spouse
+problems). It will return 1 upon success or 0 if the character was not
+married at all.
-This function will also destroy both wedding rings and send a message to both
-players, telling them they are now divorced.
+This function will also destroy both wedding rings and send a message to
+both players, telling them they are now divorced.
---------------------------------------
//
@@ -5189,12 +5338,14 @@ players, telling them they are now divorced.
*pcfollow <id>,<target id>;
*pcstopfollow <id>;
-Makes a character follow or stop following someone. This command does the same as the @follow command.
-The main difference is that @follow can use character names, and this commands needs the Account ID for the target.
+Makes a character follow or stop following someone. This command does the
+same as the @follow command. The main difference is that @follow can use
+character names, and this commands needs the Account ID for the target.
Examples:
-// This will make Aaron follow Bullah, when both of these characters are online.
+// This will make Aaron follow Bullah, when both of these characters are
+// online.
PCFollow getCharID(3,"Aaron"),getCharID(3,"Bullah");
// Makes Aaron stop following whoever he is following.
@@ -5204,9 +5355,10 @@ Examples:
*pcblockmove <id>,<option>;
-Prevents the given ID from moving when the option != 0, and 0 enables the ID to
-move again. The ID can either be the GID of a monster/NPC or account ID of a
-character, and will run for the attached player if zero is supplied.
+Prevents the given ID from moving when the option != 0, and 0 enables the
+ID to move again. The ID can either be the GID of a monster/NPC or account
+ID of a character, and will run for the attached player if zero is
+supplied.
Examples:
@@ -5226,25 +5378,26 @@ Examples:
*monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>};
*areamonster "<map name>",<x1>,<y1>,<x2>,<y2>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>};
-This command will spawn a monster on the specified coordinates on the specified
-map. If the script is invoked by a character, a special map name, "this", will
-be recognized to mean the name of the map the invoking character is located at.
-This command works fine in the item scripts.
+This command will spawn a monster on the specified coordinates on the
+specified map. If the script is invoked by a character, a special map
+name, "this", will be recognized to mean the name of the map the invoking
+character is located at. This command works fine in the item scripts.
The same command arguments mean the same things as described above in the
-beginning of this document when talking about permanent monster spawns. Monsters
-spawned in this manner will not respawn upon being killed.
+beginning of this document when talking about permanent monster spawns.
+Monsters spawned in this manner will not respawn upon being killed.
-Unlike the permanent monster spawns, if the mob id is -1, a random monster will
-be picked from the entire database according to the rules configured in the
-server for dead branches. This will work for all other kinds of non-permanent
-monster spawns.
+Unlike the permanent monster spawns, if the mob id is -1, a random monster
+will be picked from the entire database according to the rules configured
+in the server for dead branches. This will work for all other kinds of
+non-permanent monster spawns.
-The only very special thing about this command is an event label, which is an
-optional parameter. This label is written like '<NPC object name>::<label name>'
-and upon the monster being killed, it will execute the script inside of the
-specified NPC object starting from the label given. The RID of the player
-attached at this execution will be the RID of the killing character.
+The only very special thing about this command is an event label, which is
+an optional parameter. This label is written like
+'<NPC object name>::<label name>' and upon the monster being killed, it
+will execute the script inside of the specified NPC object starting from
+the label given. The RID of the player attached at this execution will be
+the RID of the killing character.
<size> can be:
0 = medium (default)
@@ -5260,15 +5413,35 @@ attached at this execution will be the RID of the killing character.
monster "place",60,100,"Poring",1002,1,"NPCNAME::OnLabel";
-The coordinates of 0,0 will spawn the monster on a random place on the map.
+The coordinates of 0,0 will spawn the monster on a random place on the
+map. Both 'monster' and 'areamonster' return the GID of the monster
+spawned if there was ONLY ONE monster to be spawned. This is useful for
+controlling each of the spawned mobs with the unit* commands shown below.
+For example:
+
+ // We'll make a poring which will automatically attack invoking player:
+ set .@mobGID, monster "Prontera",150,150,"Poring",1002,1;
+ unitattack .@mobGID, getcharid(3); // Attacker GID, attacked GID
+
+The way you can get the GID of more than only one monster is looping
+through all the summons to get their individual GIDs and do whatever you
+want with them. For example:
+
+ // We want to summon .mobnumber porings which will give us a kiss
+ for (set .@i, 0; .@i < .mobnumber; set .@i, .@i + 1){
+ set .@mobGID, monster "map",.x,.y,"Kisser Poring",1002,1;
+ unitemote .@mobGID, e_kis;
+ }
+
+Refer to the unit* commands below.
The 'areamonster' command works much like the 'monster' command and is not
-significantly different, but spawns the monsters within a square defined by
-x1/y1-x2/y2.
+significantly different, but spawns the monsters within a square defined
+by x1/y1-x2/y2.
Simple monster killing script:
- <Normal NPC object definition. Let's assume you called him NPCNAME.>
+ <NPC object definition. Let's assume you called him NPCNAME.>
mes "[Summon Man]";
mes "Want to start the kill?";
next;
@@ -5292,18 +5465,19 @@ Simple monster killing script:
set $PoringKilled,0;
end;
-For more good examples see just about any official 2-1 or 2-2 job quest script.
+For more examples see just about any official 2-1 or 2-2 job quest script.
---------------------------------------
*areamobuseskill "<map name>",<x>,<y>,<range>,<mob id>,<skill id>,<skill level>,<cast time>,<cancelable>,<emotion>,<target type>;
*areamobuseskill "<map name>",<x>,<y>,<range>,<mob id>,"<skill name>",<skill level>,<cast time>,<cancelable>,<emotion>,<target type>;
-This command will make all monsters of the specified mob ID in the specified
-area use the specified skill. Map name, x, and y define the center of the area,
-which extending <range> cells in each direction (ex: a range of 3 would create
-a 7x7 square). The skill can be specified by skill ID or name. <cast time> is in
-milliseconds (1000 = 1 second), and the rest should be self-explanatory.
+This command will make all monsters of the specified mob ID in the
+specified area use the specified skill. Map name, x, and y define the
+center of the area, which extending <range> cells in each direction (ex: a
+range of 3 would create a 7x7 square). The skill can be specified by skill
+ID or name. <cast time> is in milliseconds (1000 = 1 second), and the rest
+should be self-explanatory.
<target type> can be:
0 = self
@@ -5323,33 +5497,36 @@ Example:
*killmonster "<map name>","<event label>"{,<type>};
This command will kill all monsters that were spawned with 'monster' or
-'addmonster' and have a specified event label attached to them. Commonly used to
-get rid of remaining quest monsters once the quest is complete.
+'addmonster' and have a specified event label attached to them. Commonly
+used to get rid of remaining quest monsters once the quest is complete.
-If the label is given as "All", all monsters which have their respawn times set
-to -1 (like all the monsters summoned with 'monster' or 'areamonster' script
-command, and all monsters summoned with GM commands, but no other ones - that
-is, all non-permanent monsters) on the specified map will be killed regardless
-of the event label value.
+If the label is given as "All", all monsters which have their respawn
+times set to -1 (like all the monsters summoned with 'monster' or
+'areamonster' script command, and all monsters summoned with GM commands,
+but no other ones - that is, all non-permanent monsters) on the specified
+map will be killed regardless of the event label value.
-killmonster supports an optional argument type. Using 1 for type will make the command
-fire "OnMyMobDead" events from any monsters that do die as a result of this command.
+killmonster supports an optional argument type. Using 1 for type will make
+the command fire "OnMyMobDead" events from any monsters that do die as a
+result of this command.
---------------------------------------
*killmonsterall "<map name>"{,<type>};
-This command will kill all monsters on a specified map name, regardless of how
-they were spawned or what they are without triggering any event label attached to them,
-unless you specify 1 for type parameter. In this case, mob death labels will be allowed to
-trigger when there is no player. Any other number for this parameter won't be recognized.
+This command will kill all monsters on a specified map name, regardless of
+how they were spawned or what they are without triggering any event label
+attached to them, unless you specify 1 for type parameter. In this case,
+mob death labels will be allowed totrigger when there is no player. Any
+other number for this parameter won't be recognized.
---------------------------------------
*strmobinfo(<type>,<monster id>);
-This function will return information about a monster record in the database, as
-per 'db/(pre-)re/mob_db.txt'. Type is the kind of information returned. Valid types are:
+This function will return information about a monster record in the
+database, as per 'db/(pre-)re/mob_db.txt'. Type is the kind of information
+returned. Valid types are:
1 - 'english name' field in the database, a string.
2 - 'japanese name' field in the database, a string.
@@ -5364,64 +5541,67 @@ per 'db/(pre-)re/mob_db.txt'. Type is the kind of information returned. Valid ty
*mobcount("<map name>","<event label>")
-This function will count all the monsters on the specified map that have a given
-event label and return the number or 0 if it can't find any. Naturally, only
-monsters spawned with 'monster' and 'areamonster' script commands can have non-empty
-event label.
-If you pass this function an empty string for the event label, it will return
-the total count of monster without event label, including permanently spawning monsters.
-With the dynamic mobs system enabled, where mobs are not kept
-in memory for maps with no actual people playing on them, this will return a 0
-for any such map.
-If the event label is given as "all", all monsters will be counted, regardless of
-having any event label attached.
+This function will count all the monsters on the specified map that have a
+given event label and return the number or 0 if it can't find any.
+Naturally, only monsters spawned with 'monster' and 'areamonster' script
+commands can have non-empty event label.
+If you pass this function an empty string for the event label, it will
+return the total count of monster without event label, including
+permanently spawning monsters.
+With the dynamic mobs system enabled, where mobs are not kept in memory
+for maps with no actual people playing on them, this will return a 0 for
+any such map.
+If the event label is given as "all", all monsters will be counted,
+regardless of having any event label attached.
-If the map name is given as "this", the map the invoking character is on will
-be used. If the map is not found, or the invoker is not a character while the map
-is "this", it will return -1.
+If the map name is given as "this", the map the invoking character is on
+will be used. If the map is not found, or the invoker is not a character
+while the map is "this", it will return -1.
---------------------------------------
*clone "<map name>",<x>,<y>,"<event>",<char id>{,<master_id>{,<mode>{,<flag>,<duration>}}}
-This command creates a monster which is a copy of another player. The first
-four arguments serve the same purpose as in the monster script command, The
-<char id> is the character id of the player to clone (player must be online).
-If <master id> is given, the clone will be a 'slave/minion' of it. Master_id
-must be a character id of another online player.
+This command creates a monster which is a copy of another player. The
+first four arguments serve the same purpose as in the monster script
+command, The <char id> is the character id of the player to clone (player
+must be online).
+If <master id> is given, the clone will be a 'slave/minion' of it.
+Master_id must be a character id of another online player.
-The mode can be specified to determine the behavior of the clone, it's
-values are the same as the ones used for the mode field in the mob_db. The
+The mode can be specified to determine the behavior of the clone, its
+values are the same as the ones used for the mode field in the mob_db. The
default mode is aggressive, assists, can move, can attack.
-Flag can be either zero or one currently. If zero, the clone is a normal
-monster that'll target players, if one, it is considered a summoned monster,
-and as such, it'll target other monsters. Defaults to zero.
+Flag can be either zero or one currently. If zero, the clone is a normal
+monster that'll target players, if one, it is considered a summoned
+monster, and as such, it'll target other monsters. Defaults to zero.
-The duration specifies how long the clone will live before it is auto-removed.
-Specified in seconds, defaults to no limit (zero).
+The duration specifies how long the clone will live before it is
+auto-removed. Specified in seconds, defaults to no limit (zero).
-Returned value is the monster ID of the spawned clone. If command fails,
+Returned value is the monster ID of the spawned clone. If command fails,
returned value is zero.
---------------------------------------
*summon "Monster name",<monster id>{,<Time Out>{,"event label"}};
-This command will summon a monster. (see also 'monster') Unlike monsters spawned
-with other commands, this one will set up the monster to fight to protect the
-invoking character. Monster name and mob id obey the same rules as the one given
-at the beginning of this document for permanent monster spawns with the
-exceptions mentioned when describing 'monster' command.
+This command will summon a monster. (see also 'monster') Unlike monsters
+spawned with other commands, this one will set up the monster to fight to
+protect the invoking character. Monster name and mob id obey the same
+rules as the one given at the beginning of this document for permanent
+monster spawns with the exceptions mentioned when describing 'monster'
+command.
-The effect for the skill 'Call Homunculus' will be displayed centered on the
-invoking character.
+The effect for the skill 'Call Homunculus' will be displayed centered on
+the invoking character.
Timeout is the time in milliseconds the summon lives, and is set default
-to 60000 (1 minute). Note that also the value 0 will set the timer to default,
-and it is not possible to create a spawn that lasts forever.
-If an event label is given, upon the monster being killed, the event label will
-run as if by 'donpcevent'.
+to 60000 (1 minute). Note that also the value 0 will set the timer to
+default, and it is not possible to create a spawn that lasts forever.
+If an event label is given, upon the monster being killed, the event label
+will run as if by 'donpcevent'.
// Will summon a dead branch-style monster to fight for the character.
summon "--ja--",-1;
@@ -5433,42 +5613,60 @@ summon "--ja--",-1;
This command will try to evolve the current player's homunculus.
If it doesn't work, the /swt emotion is shown.
-To evolve a homunculus, the invoking player must have a homunculus,
-the homunculus must not be the last evolution and
-the homunculus must have above 91000 intimacy with its owner.
+To evolve a homunculus, the invoking player must have a homunculus, the
+homunculus must not be the last evolution and the homunculus must have
+above 91000 intimacy with its owner.
---------------------------------------
*hommutate {<ID>};
-This command will try to evolve the current player's homunculus into the
-new Homunculus S. If it doesn't work, the /swt emotion is shown.
+This command will try to mutate the invoking player's Homunculus into a
+Homunculus S. The Strange Embryo (ID 6415) is deleted upon success.
+
+The command will fail if the invoking player does not have an evolved
+Homunculus at level 99 or above, if it is not in the embryo state (from
+the 'morphembryo' command), or if the invoking player does not possess a
+Strange Embryo. The /swt emotion is shown upon failure.
+
+If the optional parameter <ID> is set, the invoking player's Homunculus
+will change into the specified Homunculus ID. Otherwise, a random
+Homunculus S will be chosen. See 'db/homunculus_db.txt' for a full list of
+IDs.
-To mutate a homunculus, the invoking player must have an evolved
-homunculus and it must be at least level 99.
+Returns 1 upon success and 0 for all failures.
-If the optional parameter <ID> is set, the invoking player's homunculus will
-change into the given homunculus ID. Otherwise, a random Homunculus S
-will be chosen.
+*gethominfo(<type>)
+
+This function works as a direct counterpart of 'getpetinfo':
+ 0 - Homunculus unique ID
+ 1 - Homunculus Class
+ 2 - Name
+ 3 - Friendly level (intimacy score). 100000 is full loyalty.
+ 4 - Hungry level. 100 is completely full.
+ 5 - Rename flag. 0 means this homunculus has not been named yet.
+ 6 - Homunculus level
---------------------------------------
*unitwalk <GID>,<x>,<y>;
*unitwalk <GID>,<mapid>;
-This is one command, but can be used in two ways. If only the first argument is given,
-the unit whose GID is given will start walking towards the map with the given mapid
-(we believe these are the map-indexes found in db/map_index.txt).
+This is one command, but can be used in two ways. If only the first
+argument is given, the unit whose GID is given will start walking towards
+the map with the given mapid (we believe these are the map-indexes found
+in db/map_index.txt).
-When 2 arguments are passed, the given unit will walk to the given x,y coordinates on
-the map where the unit currently is.
+When 2 arguments are passed, the given unit will walk to the given x,y
+coordinates on the map where the unit currently is.
Examples:
//Will move/walk the poring we made to the coordinates 150,150
unitwalk .GID,150,150;
-//Will move the poring towards alberta (if my assumed map-indexes are correct).
+//Will move the poring towards alberta (if my assumed map-indexes are
+//correct).
unitwalk .GID,3;
---------------------------------------
@@ -5482,7 +5680,8 @@ Examples:
Okay, these commands should be fairly self explaining.
For the emotions, you can look in db/const.txt for prefixes with e_
-PS: unitwarp supports a <GID> of zero, which causes the executor of the script to be affected. This can be used with OnTouchNPC to warp monsters:
+PS: unitwarp supports a <GID> of zero, which causes the executor of the
+script to be affected. This can be used with OnTouchNPC to warp monsters:
OnTouchNPC:
unitwarp 0,"this",-1,-1;
@@ -5493,45 +5692,46 @@ OnTouchNPC:
*enablenpc "<NPC object name>";
These two commands will disable and enable, respectively, an NPC object
-specified by name. The disabled NPC will disappear from sight and will no longer
-be triggerable in the normal way. It is not clear whether it will still be
-accessible through 'donpcevent' and other triggering commands, but it probably
-will be. You can disable even warp NPCs if you know their object names, which is
-an easy way to make a map only accessible through walking half the time. Then
-you 'enablenpc' them back.
+specified by name. The disabled NPC will disappear from sight and will no
+longer be triggerable in the normal way. It is not clear whether it will
+still be accessible through 'donpcevent' and other triggering commands,
+but it probably will be. You can disable even warp NPCs if you know their
+object names, which is an easy way to make a map only accessible through
+walking half the time. Then you 'enablenpc' them back.
You can also use these commands to create the illusion of an NPC switching
-between several locations, which is often better than actually moving the NPC -
-create one NPC object with a visible and a hidden part to their name, make a few
-copies, and then disable all except one.
+between several locations, which is often better than actually moving the
+NPC - create one NPC object with a visible and a hidden part to their
+name, make a few copies, and then disable all except one.
---------------------------------------
*hideonnpc "<NPC object name>";
*hideoffnpc "<NPC object name>";
-These commands will make the NPC object specified display as hidden/visible,
-even though not actually disabled per se. Hidden as in thief Hide skill, but
-unfortunately, not detectable by Ruwach or Sight.
+These commands will make the NPC object specified display as hidden or
+visible, even though not actually disabled per se. Hidden as in thief Hide
+skill, but unfortunately, not detectable by Ruwach or Sight.
As they are now, these commands are pointless, it is suggested to use
-'disablenpc'/'enablenpc', because these two commands actually unload the NPC
-sprite location and other accompanying data from memory when it is not used.
-However, you can use these for some quest ideas (such as cloaking NPCs talking
-while hidden then revealing.... you can wonder around =P
+'disablenpc'/'enablenpc', because these two commands actually unload the
+NPC sprite location and other accompanying data from memory when it is not
+used. However, you can use these for some quest ideas (such as cloaking
+NPCs talking while hidden then revealing... you can wonder around =P).
---------------------------------------
*doevent "<NPC object name>::<event label>";
-This command will start a new execution thread in a specified NPC object at the
-specified label. The execution of the script running this command will not stop,
-and the event called by the 'doevent' command will not run until the invoking
-script has terminated. No parameters may be passed with a doevent call.
+This command will start a new execution thread in a specified NPC object
+at the specified label. The execution of the script running this command
+will not stop, and the event called by the 'doevent' command will not run
+until the invoking script has terminated. No parameters may be passed with
+a doevent call.
-The script of the NPC object invoked in this manner will run as if it's been
-invoked by the RID that was active in the script that issued a 'doevent'. As
-such, the command will not work if an RID is not attached.
+The script of the NPC object invoked in this manner will run as if it's
+been invoked by the RID that was active in the script that issued a
+'doevent'. As such, the command will not work if an RID is not attached.
place,100,100,1%TAB%script%TAB%NPC%TAB%53,{
mes "This is what you will see when you click me";
@@ -5549,19 +5749,21 @@ such, the command will not work if an RID is not attached.
*donpcevent "<NPC object name>::<event label>";
-This command invokes the event label code within an another NPC or NPCs. It
-starts a separate instance of execution, and the invoking NPC will resume
-execution its immediately.
+This command invokes the event label code within an another NPC or NPCs.
+It starts a separate instance of execution, and the invoking NPC will
+resume execution its immediately.
-If the supplied event label has the form "NpcName::OnLabel", then only given
-NPC's event label will be invoked (much like 'goto' into another NPC). If the
-form is "::OnLabel" (NPC name omitted), the event code of all NPCs with given
-label will be invoked, one after another. In both cases the invoked script
-will run without an attached RID, whether or not the invoking script was
-attached to a player. The event label name is required to start with "On".
+If the supplied event label has the form "NpcName::OnLabel", then only
+given NPC's event label will be invoked (much like 'goto' into another
+NPC). If the form is "::OnLabel" (NPC name omitted), the event code of all
+NPCs with given label will be invoked, one after another. In both cases
+the invoked script will run without an attached RID, whether or not the
+invoking script was attached to a player. The event label name is required
+to start with "On".
-This command can be used to make other NPCs act, as if they were responding to
-the invoking NPC's actions, such as using an emotion or talking.
+This command can be used to make other NPCs act, as if they were
+responding to the invoking NPC's actions, such as using an emotion or
+talking.
place,100,100,1%TAB%script%TAB%NPC%TAB%53,{
mes "Hey NPC2 copy what I do";
@@ -5583,8 +5785,8 @@ the invoking NPC's actions, such as using an emotion or talking.
end;
}
-Whichever of the both NPCs is talked to, both will show a random emotion at the
-same time.
+Whichever of the both NPCs is talked to, both will show a random emotion
+at the same time.
Command returns 1 or 0 on success and failure.
A debug message also shows on the console when no events are triggered.
@@ -5600,10 +5802,10 @@ It is an approximation of official server script language's 'cmdothernpc'.
*npctalk "<message>";
-This command will display a message to the surrounding area as if the NPC object
-running it was a player talking - that is, above their head and in the chat
-window. The display name of the NPC will get appended in front of the message to
-complete the effect.
+This command will display a message to the surrounding area as if the NPC
+object running it was a player talking - that is, above their head and in
+the chat window. The display name of the NPC will get appended in front of
+the message to complete the effect.
// This will make everyone in the area see the NPC greet the character
// who just invoked it.
@@ -5629,21 +5831,23 @@ Size is 0 = normal 1 = small 2 = big.
*deltimer "NPC::OnLabel";
*addtimercount <ticks>,"NPC::OnLabel";
-These commands will create, destroy, and delay a countdown timer - 'addtimer' to
-create, 'deltimer' to destroy and 'addtimercount' to delay it by the specified
-number of ticks. For all three cases, the event label given is the identifier of
-that timer. The timer runs on the character object that is attached to the script,
-and can have multiple instances. When the label is run, it is run as if the player that
-the timer runs on has clicked the NPC.
+These commands will create, destroy, and delay a countdown timer -
+'addtimer' to create, 'deltimer' to destroy and 'addtimercount' to delay
+it by the specified number of ticks. For all three cases, the event label
+given is the identifier of that timer. The timer runs on the character
+object that is attached to the script, and can have multiple instances.
+When the label is run, it is run as if the player that the timer runs on
+has clicked the NPC.
-When this timer runs out, a new execution thread will start in the specified NPC
-object at the specified label.
+When this timer runs out, a new execution thread will start in the
+specified NPC object at the specified label.
The ticks are given in 1/1000ths of a second.
-One more thing. These timers are stored as part of player data. If the player
-logs out, all of these get immediately deleted, without executing the script.
-If this behavior is undesirable, use some other timer mechanism (like 'sleep').
+One more thing. These timers are stored as part of player data. If the
+player logs out, all of these get immediately deleted, without executing
+the script. If this behavior is undesirable, use some other timer
+mechanism (like 'sleep').
Example:
<NPC Header> {
@@ -5668,53 +5872,59 @@ On5secs:
*attachnpctimer {"<character name>"};
*detachnpctimer {"<NPC name>"};
-This set of commands and functions will create and manage an NPC-based timer.
-The NPC name may be omitted, in which case the calling NPC is used as target.
+This set of commands and functions will create and manage an NPC-based
+timer. The NPC name may be omitted, in which case the calling NPC is used
+as target.
-Contrary to addtimer/deltimer commands which let you have many different timers
-referencing different labels in the same NPC, each with their own countdown,
-'initnpctimer' can only have one per NPC object. But it can trigger many labels
-and let you know how many were triggered already and how many still remain.
+Contrary to addtimer/deltimer commands which let you have many different
+timers referencing different labels in the same NPC, each with their own
+countdown, 'initnpctimer' can only have one per NPC object. But it can
+trigger many labels and let you know how many were triggered already and
+how many still remain.
-This timer is counting up from 0 in ticks of 1/1000ths of a second each. Upon
-creating this timer, the execution will not stop, but will happily continue
-onward. The timer will then invoke new execution threads at labels
-"OnTimer<time>:" in the NPC object it is attached to.
+This timer is counting up from 0 in ticks of 1/1000ths of a second each.
+Upon creating this timer, the execution will not stop, but will happily
+continue onward. The timer will then invoke new execution threads at
+labels "OnTimer<time>:" in the NPC object it is attached to.
To create the timer, use the 'initnpctimer', which will start it running.
-'stopnpctimer' will pause the timer, without clearing the current tick, while
-'startnpctimer' will let the paused timer continue.
-
-By default timers do not have a RID attached, which lets them continue even
-if the player that started them logs off. To attach a RID to a timer, you can
-either use the optional "attach flag" when using 'initnpctimer/startnpctimer',
-or do it manually by using 'attachnpctimer'. Likewise, the optional flag of
-stopnpctimer lets you detach any RID after stopping the timer, and by using
-'detachnpctimer' you can detach a RID at any time.
-
-Normally there is only a single timer per NPC, but as an exception, as long as
-you attach a player to the timer, you can have multiple timers running at once,
-because these will get stored on the players instead of the NPC.
+'stopnpctimer' will pause the timer, without clearing the current tick,
+while 'startnpctimer' will let the paused timer continue.
+
+By default timers do not have a RID attached, which lets them continue
+even if the player that started them logs off. To attach a RID to a timer,
+you can either use the optional "attach flag" when using
+'initnpctimer/startnpctimer', or do it manually by using 'attachnpctimer'.
+Likewise, the optional flag of stopnpctimer lets you detach any RID after
+stopping the timer, and by using 'detachnpctimer' you can detach a RID at
+any time.
+
+Normally there is only a single timer per NPC, but as an exception, as
+long as you attach a player to the timer, you can have multiple timers
+running at once, because these will get stored on the players instead of
+the NPC.
NOTE: You need to attach the RID before the timer _before_ you start it to
get a player-attached timer. Otherwise it'll stay a NPC timer (no effect).
-If the player that is attached to the npctimer logs out, the "OnTimerQuit:"
-event label of that NPC will be triggered, so you can do the appropriate
-cleanup (the player is still attached when this event is triggered).
+If the player that is attached to the npctimer logs out, the
+"OnTimerQuit:" event label of that NPC will be triggered, so you can do
+the appropriate cleanup (the player is still attached when this event is
+triggered).
-The 'setnpctimer' command will explicitly set the timer to a given tick.
+The 'setnpctimer' command will explicitly set the timer to a given tick.
'getnpctimer' provides timer information. Its parameter defines what type:
0 - Will return the current tick count of the timer.
1 - Will return 1 if there are remaining "OnTimer<ticks>:" labels in the
specified NPC waiting for execution.
- 2 - Will return the number of times the timer has triggered and will trigger
- an "OnTimer<tick>:" label in the specified NPC.
+ 2 - Will return the number of times the timer has triggered and will
+ trigger an "OnTimer<tick>:" label in the specified NPC.
Example 1:
<NPC Header> {
- // We need to use attachnpctimer because the mes command below needs RID attach
+ // We need to use attachnpctimer because the mes command below
+ // needs RID attach
attachnpctimer;
initnpctimer;
npctalk "I cant talk right now, give me 10 seconds";
@@ -5739,7 +5949,8 @@ Example 1:
mes "[Man]";
mes "Ok we can talk now";
detachnpctimer;
- // and remember attachnpctimer and detachnpctimer can only use while the NPC timer is not running !
+ // and remember attachnpctimer and detachnpctimer can only be used
+ // while the NPC timer is not running!
}
Example 2:
@@ -5749,13 +5960,15 @@ Example 2:
// You have to use 'initnpctimer' instead of 'setnpctimer 0'.
// This is equal to 'setnpctimer 0' + 'startnpctimer'.
- // Alternatively, you can also insert another 'OnTimer15001' label so that the timer won't stop. */
+ // Alternatively, you can also insert another 'OnTimer15001' label
+ // so that the timer won't stop.
initnpctimer;
end;
- // This OnInit label will run when the script is loaded, so that the timer
- // is initialized immediately as the server starts. It is dropped back to 0
- // every time the NPC says something, so it will cycle continuously.
+ // This OnInit label will run when the script is loaded, so that the
+ // timer is initialized immediately as the server starts. It is
+ // dropped back to 0 every time the NPC says something, so it will
+ // cycle continuously.
OnInit:
initnpctimer;
end;
@@ -5764,7 +5977,8 @@ Example 3:
mes "[Man]";
mes "I have been waiting "+(getnpctimer(0)/1000)+" seconds for you.";
- // We divide the timer returned by 1000 to convert milliseconds to seconds.
+ // We divide the timer returned by 1000 to convert milliseconds to
+ // seconds.
close;
Example 4:
@@ -5773,8 +5987,8 @@ Example 4:
mes "Ok, I will let you have 30 more seconds...";
close2;
setnpctimer (getnpctimer(0)-30000);
- // Notice the 'close2'. If there were a 'next' there the timer would be
- // changed only after the player pressed the 'next' button.
+ // Notice the 'close2'. If there were a 'next' there the timer would
+ // be changed only after the player pressed the 'next' button.
end;
---------------------------------------
@@ -5784,27 +5998,32 @@ Example 4:
*awake "<NPC name>";
These commands are used to control the pause of a NPC.
-sleep and sleep2 will pause the script for the given amount of milliseconds.
-Awake is used to cancel a sleep. When awake is called on a NPC it will run as
-if the sleep timer ran out, and thus making the script continue. Sleep and sleep2
-basically do the same, but the main difference is that sleep will not keep the rid,
-while sleep2 does.
+sleep and sleep2 will pause the script for the given amount of
+milliseconds.
+Awake is used to cancel a sleep. When awake is called on a NPC it will run
+as if the sleep timer ran out, and thus making the script continue. Sleep
+and sleep2 basically do the same, but the main difference is that sleep
+will not keep the rid, while sleep2 does.
Examples:
- sleep 10000; //pause the script for 10 seconds and ditch the RID (so no player is attached anymore)
- sleep2 5000; //pause the script for 5 seconds, and continue with the RID attached.
- awake "NPC"; //Cancels any running sleep timers on the NPC 'NPC'.
+ // This will pause the script for 10 seconds and ditch the RID
+ // (so no player is attached anymore)
+ sleep 10000;
+ // Pauses the script for 5 seconds, and continue with the RID attached.
+ sleep2 5000;
+ //Cancels any running sleep timers on the NPC 'NPC'.
+ awake "NPC";
---------------------------------------
*progressbar "<color>",<seconds>;
-This command works almost like sleep2, but displays a progress bar
-above the head of the currently attached character (like cast bar).
-Once the given amount of seconds passes, the script resumes. If the
-character moves while the progress bar progresses, it is aborted and
-the script ends. The color format is in RGB (0xRRGGBB). The color is
-currently ignored by the client and appears always green.
+This command works almost like sleep2, but displays a progress bar above
+the head of the currently attached character (like cast bar). Once the
+given amount of seconds passes, the script resumes. If the character moves
+while the progress bar progresses, it is aborted and the script ends. The
+color format is in RGB (0xRRGGBB). The color is currently ignored by the
+client and appears always green.
---------------------------------------
//
@@ -5818,51 +6037,59 @@ This command will broadcast a message to all or most players, similar to
announce "This will be shown to everyone at all in yellow.",0;
-The region the broadcast is heard in (target), source of the broadcast
-and the color the message will come up as is determined by the flags.
+The region the broadcast is heard in (target), source of the broadcast and
+the color the message will come up as is determined by the flags.
-The flag values are coded as constants in db/const.txt to make them easier to use.
+The flag values are coded as constants in db/const.txt to make them easier
+to use.
Target flags:
-- bc_all: Broadcast message is sent server-wide (default).
-- bc_map: Message is sent to everyone in the same map as the source of the broadcast (see below).
+- bc_all: Broadcast message is sent server-wide (default).
+- bc_map: Message is sent to everyone in the same map as the source of
+ the broadcast (see below).
- bc_area: Message is sent to players in the vicinity of the source.
- bc_self: Message is sent only to current player.
You cannot use more than one target flag.
Source flags:
-- bc_pc: Broadcast source is the attached player (default).
-- bc_npc: Broadcast source is the NPC, not the player attached to the script
- (useful when a player is not attached or the message should be sent to those
- nearby the NPC).
+- bc_pc: Broadcast source is the attached player (default).
+- bc_npc: Broadcast source is the NPC, not the player attached to the
+ script (useful when a player is not attached or the message
+ should be sent to those nearby the NPC).
You cannot use more than one source flag.
Special flags:
- bc_yellow: Broadcast will be displayed in yellow color (default).
-- bc_blue: Broadcast will be displayed in blue color.
-- bc_woe: Indicates that this broadcast is 'WoE Information' that can be disabled client-side.
-Due to the way client handles broadcasts, it is impossible to set both bc_blue and bc_woe.
+- bc_blue: Broadcast will be displayed in blue color.
+- bc_woe: Indicates that this broadcast is 'WoE Information' that can
+ be disabled client-side.
+Due to the way client handles broadcasts, it is impossible to set both
+bc_blue and bc_woe.
+
+The optional parameters allow usage of broadcasts in custom colors,
+font-weights, sizes etc. If any of the optional parameters is used,
+special flag is ignored. Optional parameters may not work well (or at all)
+depending on a game client used.
-The optional parameters allow usage of broadcasts in custom colors, font-weights, sizes etc.
-If any of the optional parameters is used, special flag is ignored.
-Optional parameters may not work well (or at all) depending on a game client used.
+The color parameter is a single number which can be in hexadecimal
+notation.
-The color parameter is a single number which can be in hexadecimal notation.
For example:
announce "This will be shown to everyone at all in green.",bc_all,0x00FF00;
-Will display a global announce in green. The color format is in RGB (0xRRGGBB).
+Will display a global announce in green. The color format is in RGB
+(0xRRGGBB).
In official scripts only two font-weights (types) are used:
- normal (FW_NORMAL = 400, default),
- - bold (FW_BOLD = 700).
+ - bold (FW_BOLD = 700).
Default font size is 12.
-Using this for private messages to players is probably not that good an idea,
-but it can be used instead in NPCs to "preview" an announce.
+Using this for private messages to players is probably not that good an
+idea, but it can be used instead in NPCs to "preview" an announce.
- // This will be a private message to the player using the NPC that made the
- // announcement
+ // This will be a private message to the player using the NPC that
+ // made the announcement
announce "This is my message just for you",bc_blue|bc_self;
// This will be shown on everyones screen that is in sight of the NPC.
@@ -5872,17 +6099,19 @@ but it can be used instead in NPCs to "preview" an announce.
*mapannounce "<map name>","<text>",<flag>{,<fontColor>{,<fontType>{,<fontSize>{,<fontAlign>{,<fontY>}}}}}};
-This command will work like 'announce' but will only broadcast to characters
-currently residing on the specified map. The flag and optional parameters
-parameters are the same as in 'announce', but target and source flags are ignored.
+This command will work like 'announce' but will only broadcast to
+characters currently residing on the specified map. The flag and optional
+parameters parameters are the same as in 'announce', but target and source
+flags are ignored.
---------------------------------------
*areaannounce "<map name>",<x1>,<y1>,<x2>,<y2>,"<text>",<flag>{,<fontColor>{,<fontType>{,<fontSize>{,<fontAlign>{,<fontY>}}}}}};
This command works like 'announce' but will only broadcast to characters
-residing in the specified x1/y1-x2/y2 rectangle on the map given. The flags and
-optional parameters are the same as in 'announce', but target and source flags are ignored.
+residing in the specified x1/y1-x2/y2 rectangle on the map given. The
+flags and optional parameters are the same as in 'announce', but target
+and source flags are ignored.
areaannounce "prt_church",0,0,350,350,"God's in his heaven, all right with the world",0;
@@ -5891,7 +6120,8 @@ optional parameters are the same as in 'announce', but target and source flags a
*callshop "<name>",<option>;
These are a series of commands used to create dynamic shops.
-The callshop function calls a invisible shop (view -1) as if the player clicked on it.
+The callshop function calls an invisible shop (view -1) as if the player
+clicked on it.
For the options on callShop:
0 = The normal window (buy, sell and cancel)
@@ -5900,36 +6130,40 @@ For the options on callShop:
Example:
-callshop "DaShop",1; //Will call the shop named DaShop and opens the buy menu.
+//Will call the shop named DaShop and opens the buy menu.
+callshop "DaShop",1;
+
-The shop which is called by callshop (as long as an npcshop* command is executed
-from that NPC (see note 1)) will trigger the labels OnBuyItem and OnSellitem. These
-labels can take over handling for relatively the buying of items from the shop
-and selling the items to a shop. Via these labels you can customize the way an item
-is bought or sold by a player.
+The shop which is called by callshop (as long as an npcshop* command is
+executed from that NPC (see note 1)) will trigger the labels OnBuyItem and
+OnSellitem. These labels can take over handling for relatively the buying
+of items from the shop and selling the items to a shop. Via these labels
+you can customize the way an item is bought or sold by a player.
-In the OnBuyItem, two arrays are set (@bought_nameid and @bought_quantity), which
-hold information about the name id (item id) sold and the amount sold of it. Same
-goes for the OnSellItem label, only the variables are named different
-(@sold_nameid, @sold_quantity, @sold_refine, @sold_attribute, @sold_identify,
-@sold_card1, @sold_card2, @sold_card3, @sold_card4). An example on a shop comes
-with Hercules, and can be found in the doc/sample/npc_dynamic_shop.txt file.
+In the OnBuyItem, two arrays are set (@bought_nameid and
+@bought_quantity), which hold information about the name id (item id) sold
+and the amount sold of it. Same goes for the OnSellItem label, only the
+variables are named different (@sold_nameid, @sold_quantity, @sold_refine,
+@sold_attribute, @sold_identify, @sold_card1, @sold_card2, @sold_card3,
+@sold_card4). An example on a shop comes with Hercules, and can be found
+in the doc/sample/npc_dynamic_shop.txt file.
-This example shows how to use the labels and their set variables to create a dynamic shop.
+This example shows how to use the labels and their set variables to create
+a dynamic shop.
-Note 1: These labels will only be triggered if a npcshop* command is executed, this is
-because these commands set a special data on the shop NPC,named master_nd in the source.
-The OnSellItem and OnBuyItem are triggered in the NPC whose master_nd is given in the shop.
-This was found out thanks to 'Hondacrx', noticing the OnBuyItem wasn't triggered unless
-npcshopitem was used. After rechecking the source, I found what caused this.
+Note 1: These labels will only be triggered if a npcshop* command is
+executed, this is because these commands set a special data on the shop
+NPC, named master_nd in the source.
+The OnSellItem and OnBuyItem are triggered in the NPC whose master_nd is
+given in the shop.
---------------------------------------
*npcshopitem "<name>",<item id>,<price>{,<item id>,<price>{,<item id>,<price>{,...}}}
-This command lets you override the contents of an existing NPC shop or cashshop. The
-current sell list will be wiped, and only the items specified with the price
-specified will be for sale.
+This command lets you override the contents of an existing NPC shop or
+cashshop. The current sell list will be wiped, and only the items
+specified with the price specified will be for sale.
The function returns 1 if shop was updated successfully, or 0 if not found.
@@ -5939,9 +6173,9 @@ Note that you cannot use -1 to specify default selling price!
*npcshopadditem "<name>",<item id>,<price>{,<item id>,<price>{,<item id>,<price>{,...}}}
-This command will add more items at the end of the selling list for the
-specified NPC shop or cashshop. If you specify an item already for sell, that item will
-appear twice on the sell list.
+This command will add more items at the end of the selling list for the
+specified NPC shop or cashshop. If you specify an item already for sell,
+that item will appear twice on the sell list.
The function returns 1 if shop was updated successfully, or 0 if not found.
@@ -5952,10 +6186,10 @@ Note that you cannot use -1 to specify default selling price!
*npcshopdelitem "<name>",<item id>{,<item id>{,<item id>{,...}}}
This command will remove items from the specified NPC shop or cashshop.
-If the item to remove exists more than once on the shop, all instances will be
-removed.
+If the item to remove exists more than once on the shop, all instances
+will be removed.
-Note that the function returns 1 even if no items were removed. The return
+Note that the function returns 1 even if no items were removed. The return
value is only to confirm that the shop was indeed found.
---------------------------------------
@@ -5963,16 +6197,16 @@ value is only to confirm that the shop was indeed found.
*npcshopattach "<name>"{,<flag>}
This command will attach the current script to the given NPC shop.
-When a script is attached to a shop, the events "OnBuyItem" and "OnSellItem"
-of your script will be executed whenever a player buys/sells from the shop.
-Additionally, the arrays @bought_nameid[], @bought_quantity[] or @sold_nameid[]
-and @sold_quantity[] will be filled up with the items and quantities
-bought/sold.
+When a script is attached to a shop, the events "OnBuyItem" and
+"OnSellItem" of your script will be executed whenever a player buys/sells
+from the shop. Additionally, the arrays @bought_nameid[],
+@bought_quantity[] or @sold_nameid[] and @sold_quantity[] will be filled
+up with the items and quantities bought/sold.
-The optional parameter specifies whether to attach ("1") or detach ("0") from
-the shop (the default is to attach). Note that detaching will detach any NPC
-attached to the shop, even if it's from another script, while attaching will
-override any other script that may be already attached.
+The optional parameter specifies whether to attach ("1") or detach ("0")
+from the shop (the default is to attach). Note that detaching will detach
+any NPC attached to the shop, even if it's from another script, while
+attaching will override any other script that may be already attached.
The function returns 0 if the shop was not found, 1 otherwise.
@@ -5984,45 +6218,48 @@ This command will create a chat room, owned by the NPC object running this
script and displayed above the NPC sprite.
The maximum length of a chat room name is 60 letters.
-The limit is the maximum number of people allowed to enter the chat room.
-The attached NPC is included in this count. If the optional event and trigger
-parameters are given, the event label ("<NPC object name>::<label name>")
-will be invoked as if with a 'doevent' upon the number of people in the chat
-room reaching the given triggering amount.
+The limit is the maximum number of people allowed to enter the chat room.
+The attached NPC is included in this count. If the optional event and
+trigger parameters are given, the event label
+("<NPC object name>::<label name>") will be invoked as if with a 'doevent'
+upon the number of people in the chat room reaching the given triggering
+amount.
-// The NPC will just show a box above its head that says "Hello World", clicking
-// it will do nothing, since the limit is zero.
+// The NPC will just show a box above its head that says "Hello World",
+// clicking it will do nothing, since the limit is zero.
waitingroom "Hello World",0;
-// The NPC will have a box above its head, it will say "Disco - Waiting Room"
-// and will have 8 waiting slots. Clicking this will enter the chat room, where
-// the player will be able to wait until 7 players accumulate. Once this happens,
-// it will cause the NPC "Bouncer" run the label "OnStart".
+// The NPC will have a box above its head, with "Disco - Waiting Room"
+// written on it, and will have 8 waiting slots. Clicking this will enter
+// the chat room, where the player will be able to wait until 7 players
+// accumulate. Once this happens, it will cause the NPC "Bouncer" run the
+// label "OnStart".
waitingroom "Disco - Waiting Room",8,"Bouncer::OnStart",7;
-// The NPC will have a box above its head, it will say "Party - Waiting Room"
-// and will have 8 waiting slots. Clicking this will allow a player who has
-// 5000 zeny and lvl 50~99 to enter the chat room, where the player will be
-// able to wait until 7 players accumulate. Once this happens, it will cause
-// the NPC "Bouncer" run the label "OnStart".
+// The NPC will have a box above its head, with "Party - Waiting Room"
+// written on it, and will have 8 waiting slots. Clicking this will allow
+// a player who has 5000 zeny and lvl 50~99 to enter the chat room, where
+// the player will be able to wait until 7 players accumulate. Once this
+// happens, it will cause the NPC "Bouncer" run the label "OnStart".
waitingroom "Party - Waiting Room",8,"Bouncer::OnStart",7,5000,50,99;
-Creating a waiting room does not stop the execution of the script and it will
-continue to the next line.
+Creating a waiting room does not stop the execution of the script and it
+will continue to the next line.
-For more examples see the 2-1 and 2-2 job quest scripts which make extensive use
-of waiting rooms.
+For more examples see the 2-1 and 2-2 job quest scripts which make
+extensive use of waiting rooms.
---------------------------------------
*delwaitingroom {"<NPC object name"};
This command will delete a waiting room. If no parameter is given, it will
-delete a waiting room attached to the NPC object running this command, if it is,
-it will delete a waiting room owned by another NPC object. This is the only way
-to get rid of a waiting room, nothing else will cause it to disappear.
+delete a waiting room attached to the NPC object running this command, if
+it is, it will delete a waiting room owned by another NPC object. This is
+the only way to get rid of a waiting room, nothing else will cause it to
+disappear.
It's not clear what happens to a waiting room if the NPC is disabled with
'disablenpc', by the way.
@@ -6035,28 +6272,28 @@ It's not clear what happens to a waiting room if the NPC is disabled with
*disablearena;
This will enable and disable triggering the waiting room event (see
-'waitingroom') respectively. Optionally giving an NPC object name will do that
-for a specified NPC object. The chat room will not disappear when triggering is
-disabled and enabled in this manner and players will not be kicked out of it.
-Enabling a chat room event will also cause it to immediately check whether the
-number of users in it exceeded the trigger amount and trigger the event
-accordingly.
+'waitingroom') respectively. Optionally giving an NPC object name will do
+that for a specified NPC object. The chat room will not disappear when
+triggering is disabled and enabled in this manner and players will not be
+kicked out of it. Enabling a chat room event will also cause it to
+immediately check whether the number of users in it exceeded the trigger
+amount and trigger the event accordingly.
Normally, whenever a waiting room was created to make sure that only one
character is, for example, trying to pass a job quest trial, and no other
characters are present in the room to mess up the script.
-The 'enablearena'/'disablearena' commands are just aliases with no parameter.
-These are supposedly left here for compatibility with official server scripts,
-but no Hercules script uses these at the moment.
+The 'enablearena'/'disablearena' commands are just aliases with no
+parameter. These are supposedly left here for compatibility with official
+server scripts, but no Hercules script uses these at the moment.
---------------------------------------
*getwaitingroomstate(<information type>{,"<NPC object name>"})
This function will return information about the waiting room state for the
-attached waiting room or for a waiting room attached to the specified NPC if
-any.
+attached waiting room or for a waiting room attached to the specified NPC
+if any.
The valid information types are:
@@ -6067,30 +6304,31 @@ The valid information types are:
3 - Will return 1 if the waiting room is currently disabled.
0 otherwise.
4 - The Title of the waiting room (string)
- 5 - Password of the waiting room, if any. Pointless, since there is no way to
- set a password on a waiting room right now.
+ 5 - Password of the waiting room, if any. Pointless, since there is no
+ way to set a password on a waiting room right now.
16 - Event name of the waiting room (string)
32 - Whether or not the waiting room is full.
- 33 - Whether the amount of users in the waiting room is higher than the trigger
- number.
+ 33 - Whether the amount of users in the waiting room is higher than the
+ trigger number.
---------------------------------------
*warpwaitingpc "<map name>",<x>,<y>{,<number of people>};
-This command will warp the amount of characters equal to the trigger number of
-the waiting room chat attached to the NPC object running this command to the
-specified map and coordinates, kicking them out of the chat. Those waiting the
-longest will get warped first. It can also do a random warp on the same map
-("Random" instead of map name) and warp to the save point ("SavePoint").
+This command will warp the amount of characters equal to the trigger
+number of the waiting room chat attached to the NPC object running this
+command to the specified map and coordinates, kicking them out of the
+chat. Those waiting the longest will get warped first. It can also do a
+random warp on the same map ("Random" instead of map name) and warp to the
+save point ("SavePoint").
-The list of characters to warp is taken from the list of the chat room members.
-Those not in the chat room will not be considered even if they are talking to
-the NPC in question. If the number of people is given, exactly this much people
-will be warped.
+The list of characters to warp is taken from the list of the chat room
+members. Those not in the chat room will not be considered even if they
+are talking to the NPC in question. If the number of people is given,
+exactly this much people will be warped.
-This command can also keep track of who just got warped. It does this by setting
-special variables:
+This command can also keep track of who just got warped. It does this by
+setting special variables:
$@warpwaitingpc[] is an array containing the account_id numbers of the
characters who were just warped.
@@ -6098,9 +6336,9 @@ $@warpwaitingpcnum contains the number of the character it just warped.
See also 'getpartymember' for advice on what to do with those variables.
-The obvious way of using this effectively would be to set up a waiting room for
-two characters to be warped onto a random PVP map for a one-on-one duel, for
-example.
+The obvious way of using this effectively would be to set up a waiting
+room for two characters to be warped onto a random PVP map for a
+one-on-one duel, for example.
---------------------------------------
@@ -6112,33 +6350,34 @@ This command kicks everybody out of a specified waiting room chat.
*setmapflagnosave "<map name>","<alternate map name>",<x>,<y>;
-This command sets the 'nosave' flag for the specified map and also gives an
-alternate respawn-upon-relogin point.
+This command sets the 'nosave' flag for the specified map and also gives
+an alternate respawn-upon-relogin point.
-It does not make a map impossible to make a save point on as you would normally
-think, 'savepoint' will still work. It will, however, make the specified map
-kick the reconnecting players off to the alternate map given to the coordinates
-specified.
+It does not make a map impossible to make a save point on as you would
+normally think, 'savepoint' will still work. It will, however, make the
+specified map kick the reconnecting players off to the alternate map given
+to the coordinates specified.
---------------------------------------
*setmapflag "<map name>",<flag>{,<val>};
-This command marks a specified map with a map flag given. Map flags alter the
-behavior of the map, you can see the list of the available ones in
+This command marks a specified map with a map flag given. Map flags alter
+the behavior of the map, you can see the list of the available ones in
'db/const.txt' under 'mf_'.
-The map flags alter the behavior of the map regarding teleporting (mf_nomemo,
-mf_noteleport, mf_nowarp, mf_nogo), storing location when disconnected
-(mf_nosave), dead branch usage (mf_nobranch), penalties upon death
-(mf_nopenalty, mf_nozenypenalty), PVP behavior (mf_pvp, mf_pvp_noparty,
-mf_pvp_noguild), WoE behavior (mf_gvg,mf_gvg_noparty), ability to use
-skills or open up trade deals (mf_notrade, mf_novending, mf_noskill, mf_noicewall),
-current weather effects (mf_snow, mf_fog, mf_sakura, mf_leaves, mf_rain, mf_clouds,
-mf_fireworks) and whether night will be in effect on this map (mf_nightenabled).
+The map flags alter the behavior of the map regarding teleporting
+(mf_nomemo, mf_noteleport, mf_nowarp, mf_nogo), storing location when
+disconnected (mf_nosave), dead branch usage (mf_nobranch), penalties upon
+death (mf_nopenalty, mf_nozenypenalty), PVP behavior (mf_pvp,
+mf_pvp_noparty, mf_pvp_noguild), WoE behavior (mf_gvg,mf_gvg_noparty),
+ability to use skills or open up trade deals (mf_notrade, mf_novending,
+mf_noskill, mf_noicewall), current weather effects (mf_snow, mf_fog,
+mf_sakura, mf_leaves, mf_rain, mf_clouds, mf_fireworks) and whether night
+will be in effect on this map (mf_nightenabled).
-The val optional parameter is as the mapflags variable when one exists,
-it may be a number or a string depending on the mapflag in question.
+The val optional parameter is as the mapflags variable when one exists, it
+may be a number or a string depending on the mapflag in question.
---------------------------------------
@@ -6147,13 +6386,15 @@ it may be a number or a string depending on the mapflag in question.
This command removes a mapflag from a specified map.
See 'setmapflag' for a list of mapflags.
-The zone optional parameter is used to remove the zone from restricted mapflags.
+The zone optional parameter is used to remove the zone from restricted
+mapflags.
---------------------------------------
*getmapflag("<map name>",<flag>)
-This command checks the status of a given mapflag and returns the mapflag's state.
+This command checks the status of a given mapflag and returns the
+mapflag's state.
0 means OFF, and 1 means ON. See 'setmapflag' for a list of mapflags.
---------------------------------------
@@ -6162,14 +6403,16 @@ This command checks the status of a given mapflag and returns the mapflag's stat
*getbattleflag("<battle flag>")
Sets or gets the value of the given battle flag.
-Battle flags are the flags found in the battle/*.conf files and is also used in Lupus' variable rates script.
+Battle flags are the flags found in the battle/*.conf files and is also
+used in Lupus' variable rates script.
Examples:
// Will set the base experience rate to 20x (2000%)
setBattleFlag "base_exp_rate",2000;
-// Will return the value of the base experience rate (when used after the above example, it would print 2000).
+// Will return the value of the base experience rate (when used after the
+// above example, it would print 2000).
mes getBattleFlag("base_exp_rate");
---------------------------------------
@@ -6177,22 +6420,24 @@ Examples:
*warpportal <x>,<y>,"<mapname>",<x>,<y>;
Creates a warp Portal as if a acolyte class character did it.
-The first x and y is the place of the warp portal on the map where the NPC is on
-The mapname and second x and y is the target area of the warp portal.
+The first x and y is the place of the warp portal on the map where the NPC
+is on the mapname and second x and y is the target area of the warp portal.
Examples:
-// Will create a warp portal on the NPC's map at 150,150 leading to prontera, coords 150,180.
+// Will create a warp portal on the NPC's map at 150,150
+// leading to prontera, coords 150,180.
warpportal 150,150,"prontera",150,180;
---------------------------------------
*mapwarp "<from map>","<to map>",<x>,<y>{,<type>,<ID>};
-This command will collect all characters located on the From map and warp them
-wholesale to the same point on the To map, or randomly distribute them there if
-the coordinates are zero. "Random" is understood as a special To map name and
-will mean randomly shuffling everyone on the same map.
+This command will collect all characters located on the From map and warp
+them wholesale to the same point on the To map, or randomly distribute
+them there if the coordinates are zero. "Random" is understood as a
+special To map name and will mean randomly shuffling everyone on the same
+map.
Optionally, a type and ID can be specified. Available types are:
@@ -6202,7 +6447,7 @@ Optionally, a type and ID can be specified. Available types are:
Example:
-// Will warp all members of guild with ID 63 on map prontera to map alberta.
+// Will warp all members of guild with ID 63 on map prontera to alberta.
mapwarp "prontera","alberta",150,150,1,63;
---------------------------------------
@@ -6213,19 +6458,21 @@ Example:
*maprespawnguildid "<map name>",<guild id>,<flag>;
-This command goes through the specified map and for each player and monster
-found there does stuff.
+This command goes through the specified map and for each player and
+monster found there does stuff.
Flag is a bit-mask (add up numbers to get effects you want)
1 - warp all guild members to their save points.
2 - warp all non-guild members to their save points.
4 - remove all monsters which are not guardian or Emperium.
-Flag 7 will, therefore, mean 'wipe all mobs but guardians and the Emperium and
-kick all characters out', which is what the official scripts do upon castle
-surrender. Upon start of WoE, the scripts do 2 (warp all intruders out).
+Flag 7 will, therefore, mean 'wipe all mobs but guardians and the Emperium
+and kick all characters out', which is what the official scripts do upon
+castle surrender. Upon start of WoE, the scripts do 2 (warp out all people
+not in the guild that owns the castle).
-Characters not belonging to any guild will warp out regardless of the flag setting.
+Characters not belonging to any guild will be warped out regardless of the
+flag setting.
For examples, check the WoE scripts in the distribution.
@@ -6236,37 +6483,39 @@ For examples, check the WoE scripts in the distribution.
*agitstart2;
*agitend2;
-These four commands will start and end War of Emperium or War of Emperium SE.
+These four commands will start/end War of Emperium or War of Emperium SE.
-This is a bit more complex than it sounds, since the commands themselves won't
-actually do anything interesting, except causing all 'OnAgitStart:' and
-'OnAgitEnd:', or 'OnAgitStart2:' and 'OnAgitEnd2:' in the case of latter two
-commands, events to run everywhere, respectively. They are used as simple
-triggers to run a lot of complex scripts all across the server, and they,
-in turn, are triggered by clock with an 'OnClock<time>:' time-triggering label.
+This is a bit more complex than it sounds, since the commands themselves
+won't actually do anything interesting, except causing all 'OnAgitStart:'
+and 'OnAgitEnd:', or 'OnAgitStart2:' and 'OnAgitEnd2:' in the case of
+latter two commands, events to run everywhere, respectively. They are used
+as simple triggers to run a lot of complex scripts all across the server,
+and they, in turn, are triggered by clock with an 'OnClock<time>:'
+time-triggering label.
---------------------------------------
*gvgon "<map name>";
*gvgoff "<map name>";
-These commands will turn GVG mode for the specified maps on and off, setting up
-appropriate map flags. In GVG mode, maps behave as if during the time of WoE,
-even though WoE itself may or may not actually be in effect.
+These commands will turn GVG mode for the specified maps on and off,
+setting up appropriate map flags. In GVG mode, maps behave as if during
+the time of WoE, even though WoE itself may or may not actually be in
+effect.
---------------------------------------
*flagemblem <guild id>;
-This command only works when run by the NPC objects which have sprite id 722,
-which is a 3D guild flag sprite. If it isn't, the data will change, but nothing
-will be seen by anyone. If it is invoked in that manner, the emblem of the
-specified guild will appear on the flag, though, if any players are watching it
-at this moment, they will not see the emblem change until they move out of sight
-of the flag and return.
+This command only works when run by the NPC objects which have sprite id
+722, which is a 3D guild flag sprite. If it isn't, the data will change,
+but nothing will be seen by anyone. If it is invoked in that manner, the
+emblem of the specified guild will appear on the flag, though, if any
+players are watching it at this moment, they will not see the emblem
+change until they move out of sight of the flag and return.
-This is commonly used in official guildwar scripts with a function call which
-returns a guild id:
+This is commonly used in official guildwar scripts with a function call
+which returns a guild id:
// This will change the emblem on the flag to that of the guild that owns
// "guildcastle"
@@ -6277,21 +6526,23 @@ returns a guild id:
*guardian "<map name>",<x>,<y>,"<name to show>",<mob id>{,"<event label>"{,<guardian index>}};
-This command is roughly equivalent to 'monster', but is meant to be used with
-castle guardian monsters and will only work with them. It will set the guardian
-characteristics up according to the castle's investment values and otherwise
-set the things up that only castle guardians need.
+This command is roughly equivalent to 'monster', but is meant to be used
+with castle guardian monsters and will only work with them. It will set
+the guardian characteristics up according to the castle's investment
+values and otherwise set the things up that only castle guardians need.
Returns the id of the mob or 0 if an error occurred.
When 'guardian index' isn't supplied it produces a temporary guardian.
-Temporary guardians are not saved with the castle and can't be accessed by guardianinfo.
+Temporary guardians are not saved with the castle and can't be accessed by
+guardianinfo.
---------------------------------------
*guardianinfo("<map name>", <guardian number>, <type>);
-This function will return various info about the specified guardian, or -1
-if it fails for some reason. It is primarily used in the castle manager NPC.
+This function will return various info about the specified guardian, or -1
+if it fails for some reason. It is primarily used in the castle manager
+NPC.
Map name and guardian number (value between 0 and 7) define the target.
Type indicates what information to return:
@@ -6309,26 +6560,28 @@ Type indicates what information to return:
*npcwalkto <x>,<y>;
*npcstop;
-These commands will make the NPC object in question move around the map. As they
-currently are, they are a bit buggy and are not useful for much more than making
-an NPC move randomly around the map.
+These commands will make the NPC object in question move around the map.
+As they currently are, they are a bit buggy and are not useful for much
+more than making an NPC move randomly around the map.
'npcspeed' will set the NPCs walking speed to a specified value. As in the
-@speed GM command, 200 is the slowest possible speed while 0 is the fastest
-possible (instant motion). 100 is the default character walking speed.
-'npcwalkto' will start the NPC sprite moving towards the specified coordinates
-on the same map as it is currently on.
+@speed GM command, 200 is the slowest possible speed while 0 is the
+fastest possible (instant motion). 100 is the default character walking
+speed.
+'npcwalkto' will start the NPC sprite moving towards the specified
+coordinates on the same map as it is currently on. The script proceeds
+immediately after the NPC begins moving.
'npcstop' will stop the motion.
-While in transit, the NPC will be clickable, but invoking it will cause it to
-stop motion, which will make it's coordinates different from what the client
-computed based on the speed and motion coordinates. The effect is rather
-unnerving.
+While in transit, the NPC will be clickable, but invoking it will cause it
+to stop moving, which will make it's coordinates different from what the
+client computed based on the speed and motion coordinates. The effect is
+rather unnerving.
-Only a few NPC sprites have walking animations, and those that do, do not get
-the animation invoked when moving the NPC, due to the problem in the NPC walking
-code, which looks a bit silly. You might have better success by defining a job-
-sprite based sprite id in 'db/mob_avail.txt' with this.
+Only a few NPC sprites have walking animations, and those that do, do not
+get the animation invoked when moving the NPC, due to the problem in the
+NPC walking code, which looks a bit silly. You might have better success
+by defining a job-sprite based sprite id in 'db/mob_avail.txt' with this.
---------------------------------------
@@ -6336,14 +6589,16 @@ sprite based sprite id in 'db/mob_avail.txt' with this.
This command looks like the NPCWalkToxy function,but is a little different.
-While NPCWalkToXY just makes the NPC 'walk' to the coordinates given (which
-sometimes gives problems if the path isn't a straight line without objects),
-this command just moves the NPC. It basically warps out and in on the current
-and given spot. Direction can be used to change the NPC's facing direction.
+While NPCWalkToXY just makes the NPC 'walk' to the coordinates given
+(which sometimes gives problems if the path isn't a straight line without
+objects), this command just moves the NPC. It basically warps out and in
+on the current and given spot. Direction can be used to change the NPC's
+facing direction.
Example:
-// This will move Bugga from to the coordinates 100,20 (if those coordinates are legit).
+// This will move Bugga from to the coordinates 100,20 (if those
+// coordinates are legit).
moveNPC "Bugga",100,20;
---------------------------------------
@@ -6355,8 +6610,8 @@ Example:
*debugmes "<message>";
-This command will send the message to the server console (map-server window). It
-will not be displayed anywhere else.
+This command will send the message to the server console (map-server
+window). It will not be displayed anywhere else.
// Displays "NAME has clicked me!" in the map-server window.
debugmes strcharinfo(0)+" has clicked me!";
@@ -6365,31 +6620,31 @@ will not be displayed anywhere else.
*logmes "<message>";
-This command will write the message given to the map server NPC log file, as
-specified in 'conf/logs.conf'. In the TXT version of the server, the log
-file is 'log/npclog.log' by default. In the SQL version, if SQL logging is
-enabled, the message will go to the 'npclog' table, otherwise, it will go to the
-same log file.
+This command will write the message given to the map server NPC log file,
+as specified in 'conf/logs.conf'. If SQL logging is enabled, the message
+will go to the 'npclog' table.
-If logs are not enabled, nothing will happen.
+If logs are not enabled for NPCs, nothing will happen.
---------------------------------------
*globalmes "<message>"{,"<NPC name>"};
-This command will send a message to the chat window of all currently connected
-characters.
+This command will send a message to the chat window of all currently
+connected characters.
-If NPC name is specified, the message will be sent as if the sender would be
-the NPC with the said name.
+If NPC name is specified, the message will be sent as if the sender would
+be the NPC with the said name.
---------------------------------------
*rand(<number>{,<number>});
This function returns a number ...
-(if you specify one) ... randomly positioned between 0 and the number you specify -1.
-(if you specify two) ... randomly positioned between the two numbers you specify.
+(if you specify one) ... randomly positioned between 0 and the number you
+ specify -1.
+(if you specify two) ... randomly positioned between the two numbers you
+ specify.
rand(10) would result in 0,1,2,3,4,5,6,7,8 or 9
rand(0,9) would result in 0,1,2,3,4,5,6,7,8 or 9
@@ -6399,20 +6654,21 @@ rand(2,5) would result in 2,3,4 or 5
*viewpoint <action>,<x>,<y>,<point number>,<color>;
-This command will mark places on the mini map in the client connected to the
-invoking character. It uses the normal X and Y coordinates from the main map.
-The colors of the marks are defined using a hexadecimal number, same as the ones
-used to color text in 'mes' output, but are written as hexadecimal numbers in C.
-(They look like 0x<six numbers>.)
-
-Action is what you want to do with a point, 1 will set it, while 2 will clear
-it. 0 will also set it, but automatically removes the point after 15 seconds.
-Point number is the number of the point - you can have several. If more than
-one point is drawn at the same coordinates, they will cycle, which can be used
-to create flashing marks.
-
- // This command will show a mark at coordinates X 30 Y 40, is mark number 1,
- // and will be red.
+This command will mark places on the mini map in the client connected to
+the invoking character. It uses the normal X and Y coordinates from the
+main map. The colors of the marks are defined using a hexadecimal number,
+same as the ones used to color text in 'mes' output, but are written as
+hexadecimal numbers in C. (They look like 0x<six numbers>.)
+
+Action is what you want to do with a point, 1 will set it, while 2 will
+clear it. 0 will also set it, but automatically removes the point after 15
+seconds.
+Point number is the number of the point - you can have several. If more
+than one point is drawn at the same coordinates, they will cycle, which
+can be used to create flashing marks.
+
+ // This command will show a mark at coordinates X 30 Y 40, is mark
+ // number 1, and will be red.
viewpoint 1,30,40,1,0xFF0000;
@@ -6428,16 +6684,16 @@ And this is how you remove them:
viewpoint 2,35,45,2,0xFF0000;
viewpoint 2,40,50,3,0xFF0000;
-The client determines what it does with the points entirely, the server keeps no
-memory of where the points are set whatsoever.
+The client determines what it does with the points entirely, the server
+keeps no memory of where the points are set whatsoever.
---------------------------------------
*cutin "<filename>",<position>;
-This command will display a picture, usually an NPC illustration, also called
-cutin, for the currently attached client. The position parameter determines the
-placement of the illustration and takes following values:
+This command will display a picture, usually an NPC illustration, also
+called cutin, for the currently attached client. The position parameter
+determines the placement of the illustration and takes following values:
0 - bottom left corner
1 - bottom middle
@@ -6445,18 +6701,19 @@ placement of the illustration and takes following values:
3 - middle of screen in a movable window with an empty title bar
4 - middle of screen without the window header, but still movable
-The picture is read from data\texture\유저ì¸í„°íŽ˜ì´ìŠ¤\illust, from both the GRF archive
-and data folder, and is required to be a bitmap. The file extension .bmp can be
-omitted. Magenta color (#ff00ff) is considered transparent. There is no limit
-placed on the size of the illustrations by the client, although loading of large
-pictures (about 700x700 and larger) causes the client to freeze shortly (lag).
-Typically the size is about 320x480. New illustrations can be added by just
-putting the new file into the location above.
+The picture is read from data\texture\???????\illust, from both the
+GRF archive and data folder, and is required to be a bitmap. The file
+extension .bmp can be omitted. Magenta color (#ff00ff) is considered
+transparent. There is no limit placed on the size of the illustrations
+by the client, although loading of large pictures (about 700x700 and
+larger) causes the client to freeze shortly (lag). Typically the size is
+about 320x480. New illustrations can be added by just putting the new file
+into the location above.
-The client is able to display only one cutin at the same time and each new one
-will cause the old one to disappear. To delete the currently displayed
-illustration without displaying a new one, an empty file name and position 255
-must be used.
+The client is able to display only one cutin at the same time and each new
+one will cause the old one to disappear. To delete the currently displayed
+illustration without displaying a new one, an empty file name and position
+255 must be used.
// Displays the Comodo Kafra illustration in lower right corner.
cutin "kafra_07",2;
@@ -6472,10 +6729,10 @@ must be used.
*pet <pet id>;
-This command is used in all the item scripts for taming items. Running this
-command will make the pet catching cursor appear on the client connected to the
-invoking character, usable on the monsters with the specified pet ID number. It
-will still work outside an item script.
+This command is used in all the item scripts for taming items. Running
+this command will make the pet catching cursor appear on the client
+connected to the invoking character, usable on the monsters with the
+specified pet ID number. It will still work outside an item script.
A full list of pet IDs can be found inside 'db/pet_db.txt'
@@ -6484,55 +6741,57 @@ A full list of pet IDs can be found inside 'db/pet_db.txt'
*emotion <emotion number>{,<target>{,"<target name>"}};
This command makes an object display an emotion sprite above their own as
-if they were doing that emotion. For a full list of emotion numbers,
-see 'db/const.txt' under 'e_'. The not so obvious ones are 'e_what' (a question mark)
-and 'e_gasp' (the exclamation mark).
+if they were doing that emotion. For a full list of emotion numbers, see
+'db/const.txt' under 'e_'. The not so obvious ones are 'e_what' (a
+question mark) and 'e_gasp' (the exclamation mark).
-The optional target parameter specifies who will get the emotion on top of
-their head. If 0 (the default if omitted), the NPC in current use will show
+The optional target parameter specifies who will get the emotion on top of
+their head. If 0 (default if omitted), the NPC in current use will show
the emotion, if 1, the player that is running the script will display it.
-Target name parameter allows to display emotion on top of other NPC/PC without
-event labels. If specified name is not found, command does nothing.
+Target name parameter allows to display emotion on top of other NPC/PC
+without event labels. If specified name is not found, command does nothing.
---------------------------------------
*misceffect <effect number>;
This command, if run from an NPC object that has a sprite, will call up a
-specified effect number, centered on the NPC sprite. If the running code does
-not have an object ID (a 'floating' NPC) or is not running from an NPC object at
-all (an item script) the effect will be centered on the character who's RID got
-attached to the script, if any. For usable item scripts, this command will
-create an effect centered on the player using the item.
+specified effect number, centered on the NPC sprite. If the running code
+does not have an object ID (a 'floating' NPC) or is not running from an
+NPC object at all (an item script) the effect will be centered on the
+character who's RID got attached to the script, if any. For usable item
+scripts, this command will create an effect centered on the player using
+the item.
-A full list of known effects is found in 'doc/effect_list.txt'. The list of
-those that actually work may differ greatly between client versions.
+A full list of known effects is found in 'doc/effect_list.txt'. The list
+of those that actually work may differ greatly between client versions.
---------------------------------------
*soundeffect "<effect filename>",<type>;
*soundeffectall "<effect filename>",<type>{,"<map name>"}{,<x0>,<y0>,<x1>,<y1>};
-These two commands will play a sound effect to either the invoking character
-only ('soundeffect') or multiple characters ('soundeffectall'). If the running
-code does not have an object ID (a 'floating' NPC) or is not running from an NPC
-object at all (an item script) the sound will be centered on the character who's
-RID got attached to the script, if any. If it does, it will be centered on that
-object. (an NPC sprite)
+These two commands will play a sound effect to either the invoking
+character only ('soundeffect') or multiple characters ('soundeffectall').
+If the running code does not have an object ID (a 'floating' NPC) or is
+not running from an NPC object at all (an item script) the sound will be
+centered on the character who's RID got attached to the script, if any.
+If it does, it will be centered on that object. (an NPC sprite)
Effect filename is the filename in a GRF. It must have the .wav extension.
-It's not quite certain what the 'type' actually does, it is sent to the client
-directly. It probably determines which directory to play the effect from.
-It's certain that giving 0 for the number will play sound files from '\data\wav\',
-but where the other numbers will read from is unclear.
+It's not quite certain what the 'type' actually does, it is sent to the
+client directly. It probably determines which directory to play the effect
+from. It's certain that giving 0 for the number will play sound files from
+'\data\wav\', but where the other numbers will read from is unclear.
-The sound files themselves must be in the PCM format, and file names should also
-have a maximum length of 23 characters including the .wav extension:
+The sound files themselves must be in the PCM format, and file names
+should also have a maximum length of 23 characters including the .wav
+extension:
-soundeffect "1234567890123456789.wav", 0; // this will play the soundeffect
-soundeffect "12345678901234567890.wav", 0; // throw gravity error
+soundeffect "1234567890123456789.wav", 0; // will play the soundeffect
+soundeffect "12345678901234567890.wav", 0; // throws gravity error
You can add your own effects this way, naturally.
@@ -6541,14 +6800,14 @@ You can add your own effects this way, naturally.
*playBGM "<BGM filename>";
*playBGMall "<BGM filename>"{,"<map name>"{,<x0>,<y0>,<x1>,<y1>}};
-These two commands will play a Background Music to either the invoking character
-only ('playBGM') or multiple characters ('playBGMall').
+These two commands will play a Background Music to either the invoking
+character only ('playBGM') or multiple characters ('playBGMall').
-BGM filename is the filename in /BGM/ folder. It has to be in .mp3 extension.
+BGM filename is the filename in /BGM/ folder. It has to be in .mp3
+extension, but it's not required to specify the extension in the script.
-It's not required to specify the extension inside the script.
-If coordinates are omitted, BGM will be broadcasted on the entire map. If the map name
-is omitted as well the BGM will be played for the entire server.
+If coordinates are omitted, BGM will be broadcasted on the entire map. If
+the map name is also omitted the BGM will be played for the entire server.
You can add your own BGMs this way, naturally.
@@ -6557,32 +6816,33 @@ You can add your own BGMs this way, naturally.
*pvpon "<map name>";
*pvpoff "<map name>";
-These commands will turn PVP mode for the specified maps on and off. Beside
-setting the flags referred to in 'setmapflag', 'pvpon' will also create a PVP
-timer and ranking as will @pvpon GM command do.
+These commands will turn PVP mode for the specified maps on and off.
+Beside setting the flags referred to in 'setmapflag', 'pvpon' will also
+create a PVP timer and ranking as will @pvpon GM command do.
---------------------------------------
*atcommand "<command>";
-This command will run the given command line exactly as if it was typed in from
-the keyboard by the player connected to the invoking character, and that
-character belonged to an account which had GM level 99.
+This command will run the given command line exactly as if it was typed in
+from the keyboard by the player connected to the invoking character, and
+that character belonged to an account which had GM level 99.
- // This will ask the invoker for a character name and then use the '@nuke'
- // GM command on them, killing them mercilessly.
+ // This will ask the invoker for a character name and then use the
+ // '@nuke' GM command on them, killing them mercilessly.
input @player$;
atcommand "@nuke "+@player$;
-This command has a lot of good uses, I am sure you can have some fun with this
-one.
+This command has a lot of good uses, I am sure you can have some fun with
+this one.
---------------------------------------
*charcommand "<command>";
-This command will run the given command line exactly as if it was typed in from
-the keyboard from a character that belonged to an account which had GM level 99.
+This command will run the given command line exactly as if it was typed in
+from the keyboard from a character that belonged to an account which had
+GM level 99.
The commands can also run without an attached rid.
@@ -6594,20 +6854,22 @@ The commands can also run without an attached rid.
*bindatcmd "command","<NPC object name>::<event label>"{,<group level>,<group level char>,<log>};
-This command will bind a NPC event label to an atcommand. Upon execution of the
-atcommand, the user will invoke the NPC event label. Each atcommand is only allowed
-one binding. If you rebind, it will override the original binding. If group level is provided,
-only users of that group level or above will be able to access the command, if not provided,
-everyone will be able to access the command.
-"group level char" is the minimum group level required for the label to be used on others,
-like a char command would, e.g. "#command "target" params" , when not provided,
-"group level char" defaults to 99.
-"log" whether to log the usages of this command with the atcommand log (1 = log, 0 = no log),
-default is to not log.
+This command will bind a NPC event label to an atcommand. Upon execution
+of the atcommand, the user will invoke the NPC event label. Each atcommand
+is only allowed one binding. If you rebind, it will override the original
+binding. If group level is provided, only users of that group level or
+above will be able to access the command, if not provided, everyone will
+be able to access the command.
+"group level char" is the minimum group level required for the label to be
+used on others like a char command would, e.g. "#command "target" params",
+when not provided, "group level char" defaults to 99.
+"log" whether to log the usages of this command with the atcommand log
+(1 = log, 0 = no log), default is to not log.
The following variables are set upon execution:
.@atcmd_command$ = The name of the @command used.
- .@atcmd_parameters$[] = Array containing the given parameters, starting from an index of 0.
+ .@atcmd_parameters$[] = Array containing the given parameters,
+ starting from an index of 0.
.@atcmd_numparameters = The number of parameters defined.
Example:
@@ -6633,8 +6895,9 @@ This command will unbind a NPC event label from an atcommand.
*useatcmd "command";
-This command will execute an atcommand binding on the attached RID from a script.
-The three .@atcmd_***** variables will NOT be set when invoking scripts-atcommands this way.
+This command will execute an atcommand binding on the attached RID from a
+script. The three .@atcmd_***** variables will NOT be set when invoking
+scripts-atcommands this way.
---------------------------------------
@@ -6643,8 +6906,8 @@ The three .@atcmd_***** variables will NOT be set when invoking scripts-atcomman
*unitskillusepos <GID>,<skill id>,<skill lvl>,<x>,<y>;
*unitskillusepos <GID>,"<skill name>",<skill lvl>,<x>,<y>;
-This is the replacement of the older commands, these use the same values for
-GID as the other unit* commands (See 'GID').
+This is the replacement of the older commands, these use the same values
+for GID as the other unit* commands (See 'GID').
Skill ID is the ID of the skill, skill level is the level of the skill.
For the position, the x and y are given in the unitSkillUsePos.
@@ -6654,14 +6917,14 @@ For the position, the x and y are given in the unitSkillUsePos.
*npcskill <skill id>,<skill lvl>,<stat point>,<NPC level>;
*npcskill "<skill name>",<skill lvl>,<stat point>,<NPC level>;
-This command causes the attached NPC object to cast a skill on the attached
-player. The skill will have no cast time or cooldown. The player must be
-within the default skill range or the command will fail silently.
+This command causes the attached NPC object to cast a skill on the
+attached player. The skill will have no cast time or cooldown. The player
+must be within the default skill range or the command will fail silently.
-The "stat point" parameter temporarily sets all NPC stats to the given value,
-and "NPC level" is the temporary level of the NPC (used in some skills).
-Neither value can be greater than the max level defined in config, and will
-not work properly if the NPC has a mob sprite.
+The "stat point" parameter temporarily sets all NPC stats to the given
+value, and "NPC level" is the temporary level of the NPC (used in some
+skills). Neither value can be greater than the max level defined in
+config, and will not work properly if the NPC has a mob sprite.
// Casts Level 10 Heal on the attached player, calculated with
// all stats 99 and base level 60.
@@ -6672,8 +6935,8 @@ not work properly if the NPC has a mob sprite.
*day;
*night;
-These two commands will switch the entire server between day and night mode
-respectively. If your server is set to cycle between day and night by
+These two commands will switch the entire server between day and night
+mode respectively. If your server is set to cycle between day and night by
configuration, it will eventually return to that cycle.
Example:
@@ -6690,9 +6953,11 @@ OnClock1800:
end;
}
-This script allows to emulate the day/night cycle as the server does, but also
-allows triggering additional effects upon change, like announces, gifts, etc.
-The day/night cycle set by configuration should be disabled when this script is used.
+This script allows to emulate the day/night cycle as the server does, but
+also allows triggering additional effects upon change, like announces,
+gifts, etc.
+The day/night cycle set by configuration should be disabled when this
+script is used.
---------------------------------------
@@ -6701,44 +6966,45 @@ The day/night cycle set by configuration should be disabled when this script is
*deactivatepset <set number>;
*deletepset <set number>;
-This set of commands is only available if the server is compiled with regular
-expressions library enabled. Default compilation and most binary distributions
-aren't, which is probably bad, since these, while complex to use, are quite
-fascinating.
+This set of commands is only available if the server is compiled with
+regular expressions library enabled. Default compilation and most binary
+distributions aren't, which is probably bad, since these, while complex to
+use, are quite fascinating.
-They will make the NPC object listen for text spoken publicly by players and
-match it against regular expression patterns, then trigger labels associated
-with these regular expression patterns.
+They will make the NPC object listen for text spoken publicly by players
+and match it against regular expression patterns, then trigger labels
+associated with these regular expression patterns.
-Patterns are organized into sets, which are referred to by a set number. You can
-have multiple sets patterns, and multiple patterns may be active at once.
-Numbers for pattern sets start at 1.
+Patterns are organized into sets, which are referred to by a set number.
+You can have multiple sets patterns, and multiple patterns may be active
+at once. Numbers for pattern sets start at 1.
-'defpattern' will associate a given regular expression pattern with an event
-label. This event will be triggered whenever something a player says is matched
-by this regular expression pattern, if the pattern is currently active.
+'defpattern' will associate a given regular expression pattern with an
+event label. This event will be triggered whenever something a player says
+is matched by this regular expression pattern, if the pattern is currently
+active.
-'activatepset' will make the pattern set specified active. An active pattern
-will enable triggering labels defined with 'defpattern', which will not happen
-by default.
-'deactivatepset' will deactivate a specified pattern set. Giving -1 as a pattern
-set number in this case will deactivate all pattern sets defined.
+'activatepset' will make the pattern set specified active. An active
+pattern will enable triggering labels defined with 'defpattern', which
+will not happen by default.
+'deactivatepset' will deactivate a specified pattern set. Giving -1 as a
+pattern set number in this case will deactivate all pattern sets defined.
-'deletepset' will delete a pattern set from memory, so you can create a new
-pattern set in its place.
+'deletepset' will delete a pattern set from memory, so you can create a
+new pattern set in its place.
-Using regular expressions is high wizardry. But with this high wizardry comes
-unparalleled power of text manipulation. For an explanation of what a regular
-expression pattern is, see a few web pages:
+Using regular expressions is high wizardry. But with this high wizardry
+comes unparalleled power of text manipulation. For an explanation of what
+a regular expression pattern is, see a few web pages:
http://www.regular-expressions.info/
http://www.weitz.de/regex-coach/
For an example of this in use, see doc/sample/npc_test_pcre.txt
-With this you could, for example, automatically punish players for asking for
-Zeny in public places, or alternatively, automatically give them Zeny instead if
-they want it so much.
+With this you could, for example, automatically punish players for asking
+for Zeny in public places, or alternatively, automatically give them Zeny
+instead if they want it so much.
---------------------------------------
@@ -6775,18 +7041,19 @@ Returns the md5 checksum of a number or string.
Example:
mes md5(12345);
- mes md5("12345"); // Will both display 827ccb0eea8a706c4c34a16891f84e7b
- mes md5("qwerty"); // Will display d8578edf8458ce06fbc5bb76a58c5ca4
+ mes md5("12345"); // Will both display 827ccb0eea8a706c4c34a16891f84e7b
+ mes md5("qwerty");// Will display d8578edf8458ce06fbc5bb76a58c5ca4
---------------------------------------
*query_sql("your MySQL query"{, <array variable>{, <array variable>{, ...}}});
*query_logsql("your MySQL query"{, <array variable>{, <array variable>{, ...}}});
-Executes an SQL query. A 'select' query can fill array variables with up to 128 rows of values,
-and will return the number of rows (i.e. array size).
+Executes an SQL query. A 'select' query can fill array variables with up
+to 128 rows of values, and will return the number of rows (the array size).
-Note that 'query_sql' runs on the main database while 'query_logsql' runs on the log database.
+Note that 'query_sql' runs on the main database while 'query_logsql' runs
+on the log database.
Example:
set @nb, query_sql("select name,fame from `char` ORDER BY fame DESC LIMIT 5", @name$, @fame);
@@ -6801,8 +7068,8 @@ mes "5."+@name$[4]+"("+@fame[4]+")";
*escape_sql(<value>)
-Converts the value to a string and escapes special characters so that it is safe to use in query_sql().
-Returns the escaped form of the given value.
+Converts the value to a string and escapes special characters so that it's
+safe to use in query_sql(). Returns the escaped form of the given value.
Example:
set .@str$, "John's Laptop";
@@ -6813,7 +7080,8 @@ Example:
*setiteminfo(<item id>,<type>,<value>)
This function will set some value of an item.
-Returns the new value on success, or -1 on fail (item_id not found or invalid type).
+Returns the new value on success, or -1 on fail (item_id not found or
+invalid type).
Valid types are:
0 - Buy Price; 1 - Sell Price; 2 - Item Type;
@@ -6832,8 +7100,9 @@ setiteminfo 7049,6,9990; // Stone now weighs 999.0
*setitemscript(<item id>,<"{ new item script }">{,<type>});
Set a new script bonus to the Item. Very useful for game events.
-You can remove an item's itemscript by leaving the itemscript argument empty.
-Returns 1 on success, or 0 on fail (item_id not found or new item script is invalid).
+You can remove an item's itemscript by leaving the itemscript argument
+empty. Returns 1 on success, or 0 on fail (item_id not found or new item
+script is invalid).
Type can optionally be used indicates which script to set (default is 0):
0 - Script
1 - OnEquip_Script
@@ -6849,9 +7118,9 @@ setitemscript 2637,"";
*atoi ("<string>")
*axtoi ("<string>")
-These commands are used to convert strings to numbers. 'atoi' will interpret
-given string as a decimal number (base 10), while 'axtoi' interprets strings as
-hexadecimal numbers (base 16).
+These commands are used to convert strings to numbers. 'atoi' will
+interpret given string as a decimal number (base 10), while 'axtoi'
+interprets strings as hexadecimal numbers (base 16).
Hexadecimal number set: {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}
@@ -6865,8 +7134,8 @@ mes axtoi("11"); // Displays 17 (1 = 1, 10 = 16)
*compare(<string>,<substring>)
-This command returns 1 or 0 when the substring is in the main string (1) or not (0).
-This command is not case sensitive.
+This command returns 1 or 0 when the substring is in the main string (1)
+or not (0). This command is not case sensitive.
Examples:
@@ -6881,23 +7150,25 @@ Examples:
*getstrlen("<string>")
-This function will return the length of the string given as an argument. It is
-useful to check if anything input by the player exceeds name length limits and
-other length limits and asking them to try to input something else.
+This function will return the length of the string given as an argument.
+It is useful to check if anything input by the player exceeds name length
+limits and other length limits and asking them to try to input something
+else.
---------------------------------------
*charisalpha("<string>",<position>)
-This function will return 1 if the character number Position in the given string
-is a letter, 0 if it isn't a letter but a digit or a space.
+This function will return 1 if the character number Position in the given
+string is a letter, 0 if it isn't a letter but a digit or a space.
The first letter is position 0.
---------------------------------------
*charat(<string>,<index>)
-Returns char at specified index. If index is out of range, returns empty string.
+Returns char at specified index. If index is out of range, returns an
+empty string.
Example:
@@ -6907,9 +7178,9 @@ Example:
*setchar(<string>,<char>,<index>)
-Returns the original string with the char at the specified index set to the
-specified char. If index out of range, the original string will be returned.
-Only the 1st char in the <char> parameter will be used.
+Returns the original string with the char at the specified index set to
+the specified char. If index is out of range, the original string will be
+returned. Only the 1st char in the <char> parameter will be used.
Example:
@@ -6919,9 +7190,10 @@ Example:
*insertchar(<string>,<char>,<index>)
-Returns the original string with the specified char inserted at the specified
-index. If index is out of range, the char will be inserted on the end of the
-string that it is closest. Only the 1st char in the <char> parameter will be used.
+Returns the original string with the specified char inserted at the
+specified index. If index is out of range, the char will be inserted on
+the end of the string that it is closest. Only the 1st char in the <char>
+parameter will be used.
Example:
@@ -6956,7 +7228,8 @@ Example:
*charislower(<string>,<index>)
Returns 1 if character at specified index of specified string is
-uppercase/lowercase. Otherwise, 0. Characters not of the alphabelt will return 0.
+uppercase for 'charisupper' or lowercase for 'charislower'. Otherwise, 0.
+Characters not of the alphabelt will return 0.
Example:
@@ -6966,8 +7239,8 @@ Example:
*substr(<string>,<start_index>,<end_index>)
-Returns the sub-string of the specified string inclusively between the set
-indexes. If indexes are out of range, or the start index is after the end
+Returns the sub-string of the specified string inclusively between the set
+indexes. If indexes are out of range, or the start index is after the end
index, an empty string will be returned.
Example:
@@ -6978,10 +7251,11 @@ Example:
*explode(<dest_array>,<string>,<delimiter>)
-Breaks a string up into substrings based on the specified delimiter. Substrings
-will be stored within the specified string array. Only the 1st char of the
-delimiter parameter will be used. If an empty string is passed as a delimiter,
-the string will be placed in the array in it's original form.
+Breaks a string up into substrings based on the specified delimiter.
+Substrings will be stored within the specified string array. Only the 1st
+char of the delimiter parameter will be used. If an empty string is passed
+as a delimiter, the string will be placed in the array in its original
+form, without any changes.
Example:
@@ -6997,8 +7271,9 @@ Example:
*implode(<string_array>{,<glue>})
-Combines all substrings within the specified string array into a single string.
-If the glue parameter is specified, it will be inserted inbetween each substring.
+Combines all substrings within the specified string array into a single
+string. If the glue parameter is specified, it will be inserted inbetween
+each substring.
Example:
setarray .@my_array$[0], "This", "is", "a", "test";
@@ -7006,24 +7281,28 @@ Example:
---------------------------------------
-*sprintf(<format>[,param[,param[,...]]]) [Mirei]
+*sprintf(<format>[,param[,param[,...]]])
-C style sprintf. The resulting string is returned same as in PHP. All C format
-specifiers are supported except %n. More info: sprintf @ www.cplusplus.com.
-The number of params is only limited by rA's script engine.
+C style sprintf. The resulting string is returned same as in PHP. All C
+format specifiers are supported except %n. For more info check sprintf
+function at www.cplusplus.com
+Number of params is only limited by Hercules' script engine.
Example:
.@format$ = 'The %s contains %d monkeys';
- dispbottom(sprintf(.@format$, "zoo", 5)); //prints "The zoo contains 5 monkeys"
- dispbottom(sprintf(.@format$, "barrel", 82)); //prints "The barrel contains 82 monkeys"
+ dispbottom(sprintf(.@format$, "zoo", 5));
+ //prints "The zoo contains 5 monkeys"
+
+ dispbottom(sprintf(.@format$, "barrel", 82));
+ //prints "The barrel contains 82 monkeys"
---------------------------------------
-*sscanf(<string>,<format>[,param[,param[,...]]]) [Mirei]
+*sscanf(<string>,<format>[,param[,param[,...]]])
C style sscanf. All C format specifiers are supported.
-More info: sscanf @ www.cplusplus.com. The number of params is only limited
-by rA's script engine.
+More info: sscanf @ www.cplusplus.com. The number of params is only
+limited by Hercules' script engine.
Example:
sscanf("This is a test: 42 foobar", "This is a test: %d %s", .@num, .@str$);
@@ -7047,9 +7326,9 @@ Example:
*replacestr(<input>, <search>, <replace>{, <usecase>{, <count>}})
-Replaces all instances of a search string in the input with the specified
-replacement string. By default is case sensitive unless <usecase> is set
-to 0. If specified it will only replace as many instances as specified
+Replaces all instances of a search string in the input with the specified
+replacement string. By default is case sensitive unless <usecase> is set
+to 0. If specified it will only replace as many instances as specified
in the count parameter.
Example:
@@ -7061,7 +7340,7 @@ Example:
*countstr(<input>, <search>{, <usecase>})
-Counts all instances of a search string in the input. By default is case
+Counts all instances of a search string in the input. By default is case
sensitive unless <usecase> is set to 0.
Example:
@@ -7072,10 +7351,9 @@ Example:
*setfont <font>;
-This command sets the current RO client interface font to one of the
-fonts stored in data\*.eot by using an ID of the font. When the ID
-of the currently used font is used, default interface font is used
-again.
+This command sets the current RO client interface font to one of the fonts
+stored in data\*.eot by using an ID of the font. When the ID of the
+currently used font is used, default interface font is used again.
0 - Default
1 - RixLoveangel
@@ -7092,22 +7370,22 @@ again.
*showdigit <value>{,<type>};
-Displays given numeric 'value' in large digital clock font on top of
-the screen. The optional parameter 'type' specifies visual aspects
-of the "clock" and can be one of the following values:
+Displays given numeric 'value' in large digital clock font on top of the
+screen. The optional parameter 'type' specifies visual aspects of the
+"clock" and can be one of the following values:
0 - Displays the value for 5 seconds (default).
1 - Incremental counter (1 tick/second).
- 2 - Decremental counter (1 tick/second). Does not stop at zero,
- but overflows.
- 3 - Decremental counter (1 tick/second). Two digits only, stops
- at zero.
+ 2 - Decremental counter (1 tick/second). Does not stop at zero, but
+ overflows.
+ 3 - Decremental counter (1 tick/second). Two digits only, stops at
+ zero.
-For type 1 and 2 the start value is set by using negative number of
-the one intended to set (ex. -10 starts the counter at 10 seconds).
-Except for type 3 the value is interpreted as seconds and formatted
-as time in days, hours, minutes and seconds. Note, that the official
-script command does not have the optional parameter.
+For type 1 and 2 the start value is set by using negative number of the
+one intended to set (ex. -10 starts the counter at 10 seconds). Except for
+type 3 the value is interpreted as seconds and formatted as time in days,
+hours, minutes and seconds. Note, that the official script command does
+not have the optional parameter.
// displays 23:59:59 for 5 seconds
showdigit 86399;
@@ -7119,43 +7397,44 @@ script command does not have the optional parameter.
* The Pet AI commands
-These commands will only work if the invoking character has a pet, and are meant
-to be executed from pet scripts. They will modify the pet AI decision-making for
-the current pet of the invoking character, and will NOT have any independent
-effect by themselves, which is why only one of them each may be in effect at any
-time for a specific pet. A pet may have 'petloot', 'petskillbonus',
-'petskillattack' OR 'petpetskillattack2' and 'petskillsupport' OR 'petheal' at
-the same time. 'petheal' is deprecated and is no longer used in the default pet
-scripts.
+These commands will only work if the invoking character has a pet, and are
+meant to be executed from pet scripts. They will modify the pet AI
+decision-making for the current pet of the invoking character, and will
+NOT have any independent effect by themselves, which is why only one of
+them each may be in effect at any time for a specific pet. A pet may
+have 'petloot', 'petskillbonus', 'petskillattack' OR 'petpetskillattack2'
+and 'petskillsupport' OR 'petheal' at the same time. 'petheal' is
+deprecated and is no longer used in the default pet scripts.
*petskillbonus <bonus type>,<value>,<duration>,<delay>;
-This command will make the pet give a bonus to the owner's stat (bonus type -
-bInt,bVit,bDex,bAgi,bLuk,bStr,bSpeedRate - for a full list, see the values
-starting with 'b' in 'db/const.txt')
+This command will make the pet give a bonus to the owner's stat (bonus
+type - bInt,bVit,bDex,bAgi,bLuk,bStr,bSpeedRate - for a full list, see the
+values starting with 'b' in 'db/const.txt').
*petrecovery <status type>,<delay>;
-This command will make the pet cure a specified status condition. The curing
-actions will occur once every Delay seconds. For a full list of status
-conditions that can be cured, see the list of 'SC_' status condition constants
-in 'db/const.txt'
+This command will make the pet cure a specified status condition. The
+curing actions will occur once every <delay> seconds. For a full list of
+status conditions that can be cured, see the list of 'SC_' status
+condition constants in 'db/const.txt'
*petloot <max items>;
-This command will turn on pet looting, with a maximum number of items to loot
-specified. Pet will store items and return them when the maximum is reached or
-when pet performance is activated.
+This command will turn on pet looting, with a maximum number of items to
+loot specified. Pet will store items and return them when the maximum is
+reached or when pet performance is activated.
*petskillsupport <skill id>,<skill level>,<delay>,<percent hp>,<percent sp>;
*petskillsupport "<skill name>",<skill level>,<delay>,<percent hp>,<percent sp>;
*petheal <level>,<delay>,<percent hp>,<percent sp>;
-This will make the pet use a specified support skill on the owner whenever the
-HP and SP are below the given percent values, with a specified delay time
-between activations. The skill numbers are as per 'db/(pre-)re/skill_db.txt'.
-'petheal' works the same as 'petskillsupport' but has the skill ID hard-coded to
-28 (Heal). This command is deprecated.
+This will make the pet use a specified support skill on the owner whenever
+the HP and SP are below the given percent values, with a specified delay
+time between activations. The skill numbers are as per
+'db/(pre-)re/skill_db.txt'.
+'petheal' works the same as 'petskillsupport' but has the skill ID
+hard-coded to 28 (Heal). This command is deprecated.
It's not quite certain who's stats will be used for the skills cast, the
character's or the pets. Probably, Skotlex can answer that question.
@@ -7164,30 +7443,31 @@ character's or the pets. Probably, Skotlex can answer that question.
*petskillattack2 <skill id>,<damage>,<number of attacks>,<rate>,<bonusrate>;
*petskillattack2 "<skill name>",<damage>,<number of attacks>,<rate>,<bonusrate>;
-These two commands will make the pet cast an attack skill on the enemy the pet's
-owner is currently fighting. Skill IDs and levels are as per 'petskillsupport'.
-'petskillattack2' will make the pet cast the skill with a fixed amount of damage
-inflicted and the specified number of attacks.
-
-All commands with delays and durations will only make the behavior active for
-the specified duration of seconds, with a delay of the specified number of
-seconds between activations. Rates are a chance of the effect occurring and are
-given in percent. 'bonusrate' is added to the normal rate if the pet intimacy is
-at the maximum possible.
-
-The behavior modified with the above mentioned commands will only be exhibited if
-the pet is loyal and appropriate configuration options are set in
-'battle.conf'.
-
-Pet scripts in the database normally run whenever a pet of that type hatches
-from the egg. Other commands usable in item scripts (see 'bonus') will also
-happily run from pet scripts. Apparently, the pet-specific commands will also
-work in NPC scripts and modify the behavior of the current pet up until the pet
-is hatched again. (Which will also occur when the character is logged in again
-with the pet still out of the egg.) It is not certain for how long the effect of
-such command running from an NPC script will eventually persist, but apparently,
-it is possible to usefully employ them in usable item scripts to create pet
-buffing items.
+These two commands will make the pet cast an attack skill on the enemy the
+pet's owner is currently fighting. Skill IDs and levels are as per
+'petskillsupport'.
+'petskillattack2' will make the pet cast the skill with a fixed amount of
+damage inflicted and the specified number of attacks.
+
+All commands with delays and durations will only make the behavior active
+for the specified duration of seconds, with a delay of the specified
+number of seconds between activations. Rates are a chance of the effect
+occurring and are given in percent. 'bonusrate' is added to the normal
+rate if the pet intimacy is at the maximum possible.
+
+The behavior modified with the above mentioned commands will only be
+exhibited if the pet is loyal and appropriate configuration options are
+set in 'battle.conf'.
+
+Pet scripts in the database normally run whenever a pet of that type
+hatches from the egg. Other commands usable in item scripts (see 'bonus')
+will also happily run from pet scripts. Apparently, the pet-specific
+commands will also work in NPC scripts and modify the behavior of the
+current pet up until the pet is hatched again. (Which will also occur when
+the character is logged in again with the pet still out of the egg.) It is
+not certain for how long the effect of such command running from an NPC
+script will eventually persist, but apparently, it is possible to usefully
+employ them in usable item scripts to create pet buffing items.
Nobody tried this before, so you're essentially on your own here.
@@ -7196,9 +7476,9 @@ Nobody tried this before, so you're essentially on your own here.
*bpet;
This command opens up a pet hatching window on the client connected to the
-invoking character. It is used in item script for the pet incubators and will
-let the player hatch an owned egg. If the character has no eggs, it will just
-open up an empty incubator window.
+invoking character. It is used in item script for the pet incubators and
+will let the player hatch an owned egg. If the character has no eggs, it
+will just open up an empty incubator window.
This is still usable outside item scripts.
---------------------------------------
@@ -7207,15 +7487,15 @@ This is still usable outside item scripts.
This command will create a pet egg and put it in the invoking character's
inventory. The kind of pet is specified by pet ID numbers listed in
-'db/pet_db.txt'. The egg is created exactly as if the character just successfully
-caught a pet in the normal way.
+'db/pet_db.txt'. The egg is created exactly as if the character just
+successfully caught a pet in the normal way.
// This will make you a poring:
makepet 1002;
-Notice that you absolutely have to create pet eggs with this command. If you try
-to give a pet egg with 'getitem', pet data will not be created by the char
-server and the egg will disappear when anyone tries to hatch it.
+Notice that you absolutely have to create pet eggs with this command. If
+you try to give a pet egg with 'getitem', pet data will not be created by
+the char server and the egg will disappear when anyone tries to hatch it.
---------------------------------------
@@ -7229,14 +7509,16 @@ current invoking character.
*setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>;
Each map cell has several 'flags' that specify the properties of that cell.
-These include terrain properties (walkability, shootability, presence of water),
-skills (basilica, land protector, ...) and other (NPC nearby, no vending, ...).
+These include terrain properties (walkability, shootability, presence of
+water), skills (basilica, land protector, ...) and other (NPC nearby, no
+vending, ...).
Each of these can be 'on' or 'off'. Together they define a cell's behavior.
-This command lets you alter these flags for all map cells in the specified
-(x1,y1)-(x2,y2) rectangle. The 'flag' can be 0 or 1 (0:clear flag, 1:set flag).
-The 'type' defines which flag to modify. Possible options include cell_walkable,
+This command lets you alter these flags for all map cells in the specified
+(x1,y1)-(x2,y2) rectangle.
+'type' defines which flag to modify. Possible options include cell_walkable,
cell_shootable, cell_basilica. For a full list, see const.txt.
+'flag' can be 0 or 1 (0:clear flag, 1:set flag).
Example:
@@ -7245,11 +7527,12 @@ Example:
setcell "arena",135,135,165,165,cell_walkable,0;
setcell "arena",140,140,160,160,cell_walkable,1;
-This will add a makeshift ring into the center of the map. The ring will be
-surrounded by a 5-cell wide 'gap' to prevent interference from outside, and
-the rest of the map will be marked as 'basilica', preventing observers from
-casting any offensive skills or fighting among themselves. Note that the wall
-will not be shown nor known client-side, which may cause movement problems.
+This will add a makeshift ring into the center of the map. The ring will
+be surrounded by a 5-cell wide 'gap' to prevent interference from outside,
+and the rest of the map will be marked as 'basilica', preventing observers
+from casting any offensive skills or fighting among themselves. Note that
+the wall will not be shown nor known client-side, which may cause movement
+problems.
Another example:
@@ -7268,17 +7551,20 @@ remove a nonwalkable row of cells after the barricade mobs.
*checkcell ("<map name>",<x>,<y>,<type>);
-This command will return 1 or 0, depending on whether the specified cell has
-the 'type' flag set or not. There are various types to check, all mimicking
-the server's cell_chk enumeration. The types can be found in db/const.txt.
+This command will return 1 or 0, depending on whether the specified cell
+has the 'type' flag set or not. There are various types to check, all
+mimicking the server's cell_chk enumeration. The types can be found in
+db/const.txt.
-The meaning of the individual types can be confusing, so here's an overview:
+The meaning of the individual types can be confusing, so here's an
+overview:
- cell_chkwall/water/cliff
these check directly for the 'terrain component' of the specified cell
- cell_chkpass/reach/nopass/noreach
- passable = not wall & not cliff, reachable = passable wrt. no-stacking mod
+ passable = not wall & not cliff, reachable = passable
+ wrt. no-stacking mod
- cell_chknpc/basilica/landprotector/novending/nochat
- these check for specific dynamic flags (their name indicates what they do)
+ these check for specific dynamic flags (name indicates what they do)
Example:
@@ -7305,16 +7591,17 @@ Example:
*setwall "<map name>",<x>,<y>,<size>,<dir>,<shootable>,"<name>";
*delwall "<name>";
-Creates an invisible wall, an array of "setcell" starting from x,y and doing a
-line of the given size in the given direction. The difference with setcell is
-this one update client part too to avoid the glitch problem. Directions are the
-same as NPC sprite facing directions: 0=north, 1=northwest, 2=west, etc.
+Creates an invisible wall, an array of "setcell" starting from x,y and
+doing a line of the given size in the given direction. The difference with
+setcell is this one update client part too to avoid the glitch problem.
+Directions are the same as NPC sprite facing directions: 0=north,
+1=northwest, 2=west, etc.
---------------------------------------
*readbook <book id>,<page>;
-This will open a book item at the specified page
+This will open a book item at the specified page.
---------------------------------------
@@ -7325,9 +7612,10 @@ This will open a book item at the specified page
*instance_create("<instance name>",<party id>);
-Create an instance using the name "<instance name>" for the Party of <party id>.
-Most instance_* commands are used in conjunction with this command and depend
-on the ID this command returns.
+Create an instance using the name "<instance name>" for the Party of
+<party id>.
+Most instance_* commands are used in conjunction with this command and
+depend on the ID this command returns.
Example:
// Store the Party ID of the invoking character.
@@ -7355,18 +7643,19 @@ 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.
+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_attachmap("<map name>",<instance id>{,<use base 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).
+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).
Returns the resulting map name on success or an empty string on failure.
@@ -7374,27 +7663,28 @@ Returns the resulting map name on success or an empty string on failure.
*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.
+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.
---------------------------------------
*instance_init <instance id>;
-Initializes the instance given by <instance id>. This copies all NPCs from the
-source maps to the instanced maps.
+Initializes the instance given by <instance id>. This copies all NPCs from
+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.
+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.
---------------------------------------
@@ -7406,30 +7696,31 @@ Attaches the current script to the instance given by <instance id>.
*instance_npcname("<npc name>"{,<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.
+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.
---------------------------------------
*has_instance("<map name>"{,<instance id>});
-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.
+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.
-Returns the name of the instanced map on success, otherwise an empty string.
+Returns name of the instanced map on success, otherwise an empty string.
---------------------------------------
*instance_id({<type>});
-Retrieves the instance id, depending on <type>. If type is not given, it defaults
-to 0.
+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.
@@ -7439,25 +7730,25 @@ Type:
*instance_warpall "<map name>",<x>,<y>{,<instance id>};
-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.
+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.
---------------------------------------
*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.
+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.
-Parameter <alive timeout> specifies the total amount of time the instance will
-exist. Parameter <idle timeout> specifies how long players have, when they are
-outside of the instance, until it is destroyed.
+Parameter <alive timeout> specifies the total amount of time the instance
+will exist. Parameter <idle timeout> specifies how long players have, when
+they are outside of the instance, until it is destroyed.
Both timeout values are in seconds.
@@ -7465,12 +7756,14 @@ Both timeout values are in seconds.
*instance_check_party(<party id>{,<amount>{,<min>{,<max>}}});
-This function checks if a party meets certain requirements, returning 1 if all
-conditions are met and 0 otherwise. It will only check online characters.
+This function checks if a party meets certain requirements, returning 1 if
+all conditions are met and 0 otherwise. It will only check online
+characters.
amount - number of online party members (default is 1).
min - minimum level of all characters in the party (default is 1).
-max - maximum level of all characters in the party (default is max level in conf).
+max - maximum level of all characters in the party (default is max
+ level in conf).
Example:
@@ -7498,7 +7791,8 @@ Place quest of <ID> in the users quest log, the state of which is "active".
*completequest <ID>;
-Change the state for the given quest <ID> to "complete" and remove from the users quest log.
+Change the state for the given quest <ID> to "complete" and remove from
+the users quest log.
---------------------------------------
@@ -7526,34 +7820,41 @@ If no additional argument supplied, return the state of the quest:
If parameter "PLAYTIME" is supplied:
-1 = Quest not started (not in quest log)
0 = the time limit has not yet been reached
- 1 = the time limit has not been reached but the quest is marked as complete
+ 1 = the time limit has not been reached but the quest is marked as
+ complete
2 = the time limit has been reached
If parameter "HUNTING" is supplied:
-1 = Quest not started (not in quest log)
- 0 = you haven't killed all of the target monsters and the time limit has not been reached.
- 1 = you haven't killed all of the target monsters but the time limit has been reached.
+ 0 = you haven't killed all of the target monsters and the time limit
+ has not been reached.
+ 1 = you haven't killed all of the target monsters but the time limit
+ has been reached.
2 = you've killed all of the target monsters
---------------------------------------
*showevent <state>, <color>;
-Show a colored mark in the mini-map like "viewpoint" and an emotion on top of a NPC.
-This is used to indicate that a NPC has a quest or an event to certain player/s.
+Show a colored mark in the mini-map like "viewpoint" and an emotion on top
+of a NPC. This is used to indicate that a NPC has a quest or an event to
+certain player/s.
state can be:
- 0 = disable ( Used to disable and remove the mark and the emotion from the NPC. )
- 1 = exclamation emotion ( Used to show an important quest event to certain player. )
- 2 = interrogation emotion ( Used to show an non-important quest event to certain player. )
- Other value may cause client crashes.
+ 0 = disable ( Used to disable and remove the mark and the emotion from
+ the NPC. )
+ 1 = exclamation emotion ( Used to show an important quest event to
+ certain player. )
+ 2 = interrogation emotion ( Used to show an non-important quest event
+ to certain player. )
+Other value may cause client crashes.
color can be:
0 = yellow "Quest"
1 = orange "Job"
2 = green "Event"
3 = an MVP flag
- other values show a transparent mark in the mini-map.
+Other values show a transparent mark in the mini-map.
----------------------------------------
@@ -7564,25 +7865,31 @@ color can be:
*waitingroom2bg_single(<battle group>,"<mapname>",<x>,<y>,"<npc name>");
-Adds the first waiting player from the chat room of given NPC to an
-existing battleground group and warps it to specified coordinates on
-given map.
+Adds the first waiting player from the chat room of given NPC to an
+existing battleground group and warps it to specified coordinates on given
+map.
---------------------------------------
*waitingroom2bg("<mapname>",<x>,<y>,"<On Quit Event>","<On Death Event>"{,"<npc name>"});
-<Mapname> and X Y coordinates refer to where the "respawn" base is, where the player group will respawn when they die.
-<On Quit Event> refers to an NPC label that attaches to the character and is run when they relog.
-<On Death Event> refers to an NPC label that attaches to the character and is run when they die. Can be "" for empty.
+<Mapname> and X Y coordinates refer to where the "respawn" base is, where
+the player group will respawn when they die.
+<On Quit Event> refers to an NPC label that attaches to the character and
+is run when they relog.
+<On Death Event> refers to an NPC label that attaches to the character and
+is run when they die. Can be "" for empty.
-Unlike the prior command, the latter will attach a GROUP in a waiting room to the battleground, and
-sets the array $@arenamembers[0] where 0 holds the IDs of the first group, and 1 holds the IDs of the second.
+Unlike the prior command, the latter will attach a GROUP in a waiting room
+to the battleground, and sets the array $@arenamembers[0] where 0 holds
+the IDs of the first group, and 1 holds the IDs of the second.
-If the option parameter is left out, the waiting room of the current NPC is used.
+If the option parameter is left out, the waiting room of the current NPC
+is used.
Example:
- // Battle Group will be referred to as $@KvM01BG_id1, and when they die, respawn at bat_c01,52,129.
+ // Battle Group will be referred to as $@KvM01BG_id1, and when they
+ // die, respawn at bat_c01,52,129.
set $@KvM01BG_id1, waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
end;
@@ -7590,7 +7897,8 @@ Example:
*bg_team_setxy <Battle Group ID>,<x>,<y>;
-Update the respawn point of the given battle group to x, y on the same map. The <Battle Group ID> can be retrieved using getcharid(4)
+Update the respawn point of the given battle group to x, y on the same
+map. The <Battle Group ID> can be retrieved using getcharid(4).
Example:
bg_team_setxy getcharid(4),56,212;
@@ -7617,7 +7925,8 @@ Example:
Similar to monster script command.
Spawn a monster with allegiance to the given battle group.
Does not allow for the summoning of multiple monsters.
-Monsters are similar to that in War of Emperium, in that the specified Battle group is considered friendly.
+Monsters are similar to that in War of Emperium, in that the specified
+Battle group is considered friendly.
Example:
// It can be used in two different ways.
@@ -7668,7 +7977,8 @@ As the name says, destroys the battle group created for that battle ground.
*areapercentheal "<mapname>",<x1>,<y1>,<x2>,<y2>,<hp>,<sp>;
-Not exactly limited to battleground use, this will restore HP/SP in a defined area at a percentage.
+Not exactly limited to battleground use, this will restore HP/SP in a
+defined area at a percentage.
Example:
areapercentheal "bat_a01",52,208,61,217,100,100;
@@ -7678,7 +7988,8 @@ Example:
*bg_get_data(<Battle Group>,<type>);
-Retrieves data related to given battle group. Type can be one of the following:
+Retrieves data related to given battle group. Type can be one of the
+following:
0 - Amount of players currently belonging to the group.
@@ -7686,8 +7997,8 @@ Retrieves data related to given battle group. Type can be one of the following:
*bg_getareausers(<battle group>,<map name>,<x0>,<y0>,<x1>,<y1>);
-Retrieves amount of players belonging to given battle group on given
-map within an specified rectangular area.
+Retrieves amount of players belonging to given battle group on given map
+within an specified rectangular area.
----------------------------------------
@@ -7695,7 +8006,7 @@ map within an specified rectangular area.
This command will force the update of the displayed scoreboard.
It is only usable when the map is defined as a Type 2 Battleground:
-mapflag <mapname> battleground 2
+mapflag%TAB%<mapname>%TAB%battleground%TAB%2
----------------------------------------
@@ -7706,22 +8017,21 @@ mapflag <mapname> battleground 2
*mercenary_create <class>,<contract time>;
-This command summons a mercenary of given class, for given amount of
-time in milliseconds. Typically used in item scripts of mercenary
-scrolls.
+This command summons a mercenary of given class, for given amount of time
+in milliseconds. Typically used in item scripts of mercenary scrolls.
----------------------------------------
*mercenary_heal <hp>,<sp>;
-This command works like 'heal', but affects the mercenary of the
-currently attached character.
+This command works like 'heal', but affects the mercenary of the currently
+attached character.
----------------------------------------
*mercenary_sc_start <type>,<tick>,<val1>;
-This command works like 'sc_start', but affects the mercenary of the
+This command works like 'sc_start', but affects the mercenary of the
currently attached character.
----------------------------------------
@@ -7729,7 +8039,7 @@ currently attached character.
*mercenary_get_calls(<guild>);
*mercenary_set_calls <guild>,<value>;
-Sets or gets the mercenary calls value for given guild for currently
+Sets or gets the mercenary calls value for given guild for currently
attached character. Guild can be one or the following constants:
ARCH_MERC_GUILD
@@ -7741,7 +8051,7 @@ attached character. Guild can be one or the following constants:
*mercenary_get_faith(<guild>);
*mercenary_set_faith <guild>,<value>;
-Sets or gets the mercenary faith value for given guild for currently
+Sets or gets the mercenary faith value for given guild for currently
attached character. Guild can be one or the following constants:
ARCH_MERC_GUILD
@@ -7752,10 +8062,10 @@ attached character. Guild can be one or the following constants:
*getmercinfo(<type>{,<char id>});
-Retrieves information about mercenary of the currently attached
-character. If char id is given, the information of that character is
-retrieved instead. Type specifies what information to retrieve and
-can be one of the following:
+Retrieves information about mercenary of the currently attached character.
+If char id is given, the information of that character is retrieved
+instead. Type specifies what information to retrieve and can be one of the
+following:
0 - Database ID
1 - Class
@@ -7770,6 +8080,3 @@ If the character does not have a mercenary, the command returns ""
for name and 0 for all other types.
----------------------------------------
-
-Whew.
-That's about all of them.
diff --git a/doc/whisper_sys.txt b/doc/whisper_sys.txt
index c5c042f4d..3c870b543 100644
--- a/doc/whisper_sys.txt
+++ b/doc/whisper_sys.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= NPC Whisper System
//===== By: ==================================================
//= lordalfa
diff --git a/doc/woe_time_explanation.txt b/doc/woe_time_explanation.txt
index 2b645118e..9f288eae7 100644
--- a/doc/woe_time_explanation.txt
+++ b/doc/woe_time_explanation.txt
@@ -1,4 +1,4 @@
-//===== Hercules Documentation ================================
+//===== Hercules Documentation ===============================
//= WoE Time Explanation
//===== By: ==================================================
//= erKURITA
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/breeder.txt b/npc/custom/breeder.txt
index bf7c34592..2bb3c6274 100644
--- a/npc/custom/breeder.txt
+++ b/npc/custom/breeder.txt
@@ -3,15 +3,16 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Description: =========================================
//= One-click automatic mount rentals.
+//= Replaced 'close' with 'end' [Streusel]
//============================================================
prontera,124,201,1 script Universal Rental NPC 726,{
if (ismounting()) {
message strcharinfo(0),"You must first remove your mount.";
- close; }
+ end; }
else if ((eaclass()&EAJ_THIRDMASK==EAJ_RANGER) && !countitem(6124)) {
if (!checkfalcon() && getskilllv("HT_FALCON") && !checkoption(Option_Wug) && !checkoption(Option_Wugrider)) {
if(select(" ~ Falcon: ~ Warg")==1) setfalcon;
@@ -30,7 +31,7 @@ prontera,124,201,1 script Universal Rental NPC 726,{
else if (!checkmadogear() && getskilllv("NC_MADOLICENCE")) setmadogear;
else {
message strcharinfo(0),"You do not meet requirements to rent.";
- close; }
+ end; }
specialeffect2 EF_TEIHIT3;
end;
}
@@ -45,4 +46,4 @@ prontera,124,201,1 script Universal Rental NPC 726,{
//= 1.3a Fixed a Typo Error. [Samuray22]
//= Thanks to ~AnnieRuru~.
//= 1.4 Optimized Script. No need for 50 million Labels. [Spre]
-//============================================================ \ No newline at end of file
+//============================================================
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/NydhoggsNest.txt b/npc/instances/NydhoggsNest.txt
index 0ad8149d4..2d48d0341 100644
--- a/npc/instances/NydhoggsNest.txt
+++ b/npc/instances/NydhoggsNest.txt
@@ -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;
diff --git a/conf/mapflag/battleground.txt b/npc/mapflag/battleground.txt
index f7404c139..736ce6215 100644
--- a/conf/mapflag/battleground.txt
+++ b/npc/mapflag/battleground.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Battleground map setting.
//===== By: ==================================================
//= Epoque
diff --git a/conf/mapflag/gvg.txt b/npc/mapflag/gvg.txt
index 055a1d733..0cd7a3219 100644
--- a/conf/mapflag/gvg.txt
+++ b/npc/mapflag/gvg.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Guild versus Guild mode.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/jail.txt b/npc/mapflag/jail.txt
index 0a8b00846..c2dd16688 100644
--- a/conf/mapflag/jail.txt
+++ b/npc/mapflag/jail.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Jail.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/night.txt b/npc/mapflag/night.txt
index c3e8a47fe..aa12815b3 100644
--- a/conf/mapflag/night.txt
+++ b/npc/mapflag/night.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Night mode.
//===== By: ==================================================
//= Skotlex
diff --git a/conf/mapflag/nightmare.txt b/npc/mapflag/nightmare.txt
index 106ee665a..22c08b263 100644
--- a/conf/mapflag/nightmare.txt
+++ b/npc/mapflag/nightmare.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Nightmare mode.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/nobranch.txt b/npc/mapflag/nobranch.txt
index 0c96bf896..5717fb166 100644
--- a/conf/mapflag/nobranch.txt
+++ b/npc/mapflag/nobranch.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable Dead Branch use.
//===== By: ==================================================
//= HerculesDev Team
diff --git a/conf/mapflag/noexp.txt b/npc/mapflag/noexp.txt
index 0b6fe20c6..0cc4279ca 100644
--- a/conf/mapflag/noexp.txt
+++ b/npc/mapflag/noexp.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable EXP gain.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/noicewall.txt b/npc/mapflag/noicewall.txt
index 5b6e6ad12..8711ea45d 100644
--- a/conf/mapflag/noicewall.txt
+++ b/npc/mapflag/noicewall.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable Ice Wall.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/noloot.txt b/npc/mapflag/noloot.txt
index 380dc506c..43089ed31 100644
--- a/conf/mapflag/noloot.txt
+++ b/npc/mapflag/noloot.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable monster drops.
//===== By: ==================================================
//= Epoque
diff --git a/conf/mapflag/nomemo.txt b/npc/mapflag/nomemo.txt
index f6628bf46..158982e2c 100644
--- a/conf/mapflag/nomemo.txt
+++ b/npc/mapflag/nomemo.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable Warp Portal memory.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/nopenalty.txt b/npc/mapflag/nopenalty.txt
index 083d86105..b29d4d4a7 100644
--- a/conf/mapflag/nopenalty.txt
+++ b/npc/mapflag/nopenalty.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable death penalty.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/nopvp.txt b/npc/mapflag/nopvp.txt
index 9f876c49b..4eb4831b8 100644
--- a/conf/mapflag/nopvp.txt
+++ b/npc/mapflag/nopvp.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable Player versus Player mode.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/noreturn.txt b/npc/mapflag/noreturn.txt
index 696d81460..d5b94f458 100644
--- a/conf/mapflag/noreturn.txt
+++ b/npc/mapflag/noreturn.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable return warp.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/nosave.txt b/npc/mapflag/nosave.txt
index 59a59fcae..1035d2a77 100644
--- a/conf/mapflag/nosave.txt
+++ b/npc/mapflag/nosave.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable auto-save.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/noskill.txt b/npc/mapflag/noskill.txt
index 81540b45a..ec66f27d3 100644
--- a/conf/mapflag/noskill.txt
+++ b/npc/mapflag/noskill.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable skill use.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/noteleport.txt b/npc/mapflag/noteleport.txt
index df25145d8..d969c5522 100644
--- a/conf/mapflag/noteleport.txt
+++ b/npc/mapflag/noteleport.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable teleportation.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/novending.txt b/npc/mapflag/novending.txt
index 5f7ef8e82..4205d9d6a 100644
--- a/conf/mapflag/novending.txt
+++ b/npc/mapflag/novending.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable vending.
//===== By: ==================================================
//= Epoque
diff --git a/conf/mapflag/nowarp.txt b/npc/mapflag/nowarp.txt
index cfeb938a2..304cebf2f 100644
--- a/conf/mapflag/nowarp.txt
+++ b/npc/mapflag/nowarp.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable warping.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/nowarpto.txt b/npc/mapflag/nowarpto.txt
index 2490b8e61..f54dc785f 100644
--- a/conf/mapflag/nowarpto.txt
+++ b/npc/mapflag/nowarpto.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Disable warpto.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/partylock.txt b/npc/mapflag/partylock.txt
index e8d7051f2..ba0014026 100644
--- a/conf/mapflag/partylock.txt
+++ b/npc/mapflag/partylock.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Party lock.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/pvp.txt b/npc/mapflag/pvp.txt
index 4e3ca5762..d72e45a98 100644
--- a/conf/mapflag/pvp.txt
+++ b/npc/mapflag/pvp.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Player versus Player mode.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/pvp_noguild.txt b/npc/mapflag/pvp_noguild.txt
index 166b65764..fe61a3097 100644
--- a/conf/mapflag/pvp_noguild.txt
+++ b/npc/mapflag/pvp_noguild.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Ignore guilds.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/pvp_noparty.txt b/npc/mapflag/pvp_noparty.txt
index bd5e866f6..569a46c2d 100644
--- a/conf/mapflag/pvp_noparty.txt
+++ b/npc/mapflag/pvp_noparty.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Ignore parties.
//===== By: ==================================================
//= Hercules Dev Team
diff --git a/conf/mapflag/reset.txt b/npc/mapflag/reset.txt
index 5354580b9..7af002f22 100644
--- a/conf/mapflag/reset.txt
+++ b/npc/mapflag/reset.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Enable Neuralizer use.
//===== By: ==================================================
//= Daegaladh
diff --git a/conf/mapflag/skillduration.txt b/npc/mapflag/skillduration.txt
index ca2f82a40..ca2f82a40 100644
--- a/conf/mapflag/skillduration.txt
+++ b/npc/mapflag/skillduration.txt
diff --git a/conf/mapflag/skillmodifier.txt b/npc/mapflag/skillmodifier.txt
index bd60806f7..bd60806f7 100644
--- a/conf/mapflag/skillmodifier.txt
+++ b/npc/mapflag/skillmodifier.txt
diff --git a/conf/mapflag/town.txt b/npc/mapflag/town.txt
index 319785524..46331818b 100644
--- a/conf/mapflag/town.txt
+++ b/npc/mapflag/town.txt
@@ -1,4 +1,4 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Mapflag: Town.
//===== By: ==================================================
//= Epoque
diff --git a/conf/mapflag/zone.txt b/npc/mapflag/zone.txt
index 62047effa..62047effa 100644
--- a/conf/mapflag/zone.txt
+++ b/npc/mapflag/zone.txt
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/pre-re/scripts_athena.conf b/npc/pre-re/scripts.conf
index 6a69ede0e..6a69ede0e 100644
--- a/npc/pre-re/scripts_athena.conf
+++ b/npc/pre-re/scripts.conf
diff --git a/npc/pre-re/scripts_main.conf b/npc/pre-re/scripts_main.conf
index e029447b5..db7ed1411 100644
--- a/npc/pre-re/scripts_main.conf
+++ b/npc/pre-re/scripts_main.conf
@@ -26,7 +26,7 @@ npc: npc/other/Global_Functions.txt
npc: npc/other/CashShop_Functions.txt
// ------------------- Common Script Files ----------------------
-import: npc/scripts_athena.conf
+import: npc/scripts.conf
import: npc/scripts_guild.conf
import: npc/scripts_jobs.conf
import: npc/scripts_mapflags.conf
@@ -34,7 +34,7 @@ import: npc/scripts_monsters.conf
import: npc/scripts_warps.conf
// ----------------- Pre-Renewal Script Files -------------------
-import: npc/pre-re/scripts_athena.conf
+import: npc/pre-re/scripts.conf
import: npc/pre-re/scripts_jobs.conf
import: npc/pre-re/scripts_monsters.conf
import: npc/pre-re/scripts_warps.conf
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 e5b3d1df0..d2ac40e80 100644
--- a/npc/re/cities/izlude.txt
+++ b/npc/re/cities/izlude.txt
@@ -1,30 +1,33 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Izlude Town Renewal
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
-//= rAthena SVN
+//= Hercules
//===== Description: =========================================
//= Izlude town NPCs.
//===== Additional Comments: =================================
//= 1.0 First Version. Still missing many new NPCs and their dialogues. [Masao]
//= 1.1 Added bullet NPC duplicates. [Euphy]
+//= 1.2 Added new NPCs, Captain Carew & coordinates [Streusel]
+//= 1.3 Added some NPC locations [Streusel]
//============================================================
izlude,197,205,1 duplicate(Sailor_izlude) Sailor#izlude 100
izlude,71,92,2 duplicate(Bonne_izlude) Bonne#izlude 90
izlude,172,215,4 duplicate(Charfri_izlude) Charfri#izlude 91
-izlude,127,175,4 duplicate(Cuskoal_izlude) Cuskoal#izlude 124
+izlude,174,164,3 duplicate(Cuskoal_izlude) Cuskoal#izlude 124
izlude,85,103,4 duplicate(Dega_izlude) Dega#izlude 84
-izlude,141,185,4 duplicate(Kylick_izlude) Kylick#izlude 97
+izlude,140,186,4 duplicate(Kylick_izlude) Kylick#izlude 97
izlude,56,156,2 duplicate(Red_izlude) Red#izlude 85
izlude,58,156,2 duplicate(Cebalis_izlude) Cebalis#izlude 98
izlude,165,156,2 duplicate(Soldier_izlude) Soldier#izlude 105
izlude,158,130,3 duplicate(bdt) Bullet Dealer Tony#iz 86
izlude,155,132,3 duplicate(mdk) Magazine Dealer Kenny 83
-
+izlude,198,213,4 duplicate(Captain_Carew) Captain Carew#izlude 873
+izlude_in,57,92,3 duplicate(Dorian) Dorian#izlude 878
izlude,147,131,6 script Blacksmith#izlude 726,{
end;
}
@@ -34,3 +37,62 @@ prt_fild08,350,219,4 script Guard#izlude 105,{
mes "Welcome to Izlude.";
close;
}
+
+izlude,136,160,0 script Traces of Fish#izlude 111,{
+ mes "There are signs of someone digging.";
+ close;
+}
+
+izlude,207,167,3 script Arena#izlude 858,{
+ mes "";
+ close;
+}
+
+izlude,45,94,3 script Milestone#izlude 858,{
+ mes "==== Information ====";
+ mes "";
+ mes "Access to Prontera Field.";
+ mes "Prontera in the North.";
+ mes "If you wish got to Prontera.";
+ close;
+}
+
+izlude,179,75,3 script Non-Process#izlude 858,{
+ mes "====End of Path====";
+ mes "";
+ mes "Airshop to Rachel";
+ mes "";
+ mes "Feel free to explore, however be reminded that you are a guest.";
+ mes "";
+ close;
+}
+
+izlude,141,251,1 script Full-Grown Red Plant#iz 1078,{
+ end;
+}
+
+izlude,102,150,1 script Sinchon Helper#izlude 71,{
+ end;
+}
+
+izlude,205,155,2 script Nain#izlude 102,{
+ mes "[Nine]";
+ mes "Swords, no matter how strong";
+ mes "they are once they strike you're";
+ mes "a dead man. And though that's creepy,";
+ mes "I just can't throw them away.";
+ close;
+}
+
+izlude,143,205,7 script Magpies Adventurer#iz-01 703,{
+ end;
+}
+
+
+izlude,146,205,7 script Magpies Adventurer#iz-02 706,{
+ end;
+}
+
+izlude,120,254,0 script Siege Monument#izlude 111,{
+ end;
+} \ No newline at end of file
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_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/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/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 5152fe102..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: =========================================
@@ -146,7 +146,7 @@ prontera,125,208,5 script Peco Peco Remover 105,{
// Magic Gear Renter
//============================================================
-prontera,163,178,4 script Magic Gear Master 105,{
+prontera,163,178,3 script Magic Gear Master 105,{
mes "[Magic Gear Master]";
if (Class == Job_Mechanic || Class == Job_Mechanic_T || Class == Job_Baby_Mechanic) {
mes "Welcome. Would you like to rent a Magic Gear?";
@@ -179,4 +179,4 @@ prontera,163,178,4 script Magic Gear Master 105,{
mes "How may I help you?";
mes "Magic Gears are only available for Mechanics.";
close;
-} \ No newline at end of file
+}
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/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_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_athena.conf b/npc/re/scripts.conf
index 47b2cb7e0..dfe698752 100644
--- a/npc/re/scripts_athena.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 ---------------------------
diff --git a/npc/re/scripts_main.conf b/npc/re/scripts_main.conf
index 2bca12324..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
@@ -26,7 +26,7 @@ npc: npc/other/Global_Functions.txt
npc: npc/other/CashShop_Functions.txt
// ------------------- Common Script Files ----------------------
-import: npc/scripts_athena.conf
+import: npc/scripts.conf
import: npc/scripts_guild.conf
import: npc/scripts_jobs.conf
import: npc/scripts_mapflags.conf
@@ -34,7 +34,7 @@ import: npc/scripts_monsters.conf
import: npc/scripts_warps.conf
// ------------------- Renewal Script Files ---------------------
-import: npc/re/scripts_athena.conf
+import: npc/re/scripts.conf
import: npc/re/scripts_jobs.conf
import: npc/re/scripts_monsters.conf
import: npc/re/scripts_warps.conf
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/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_athena.conf b/npc/scripts.conf
index c405aff88..65cfe53f5 100644
--- a/npc/scripts_athena.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_mapflags.conf b/npc/scripts_mapflags.conf
index 78adeba20..c0d2787f8 100644
--- a/npc/scripts_mapflags.conf
+++ b/npc/scripts_mapflags.conf
@@ -1,31 +1,31 @@
// --------------------------------------------------------------
// - Map Flags -
// --------------------------------------------------------------
-npc: conf/mapflag/nopvp.txt
-npc: conf/mapflag/gvg.txt
-npc: conf/mapflag/jail.txt
-npc: conf/mapflag/nightmare.txt
-npc: conf/mapflag/nobranch.txt
-npc: conf/mapflag/noexp.txt
-npc: conf/mapflag/noicewall.txt
-npc: conf/mapflag/noloot.txt
-npc: conf/mapflag/nomemo.txt
-npc: conf/mapflag/nopenalty.txt
-npc: conf/mapflag/nosave.txt
-npc: conf/mapflag/noteleport.txt
-npc: conf/mapflag/noreturn.txt
-npc: conf/mapflag/noskill.txt
-npc: conf/mapflag/nowarp.txt
-npc: conf/mapflag/nowarpto.txt
-npc: conf/mapflag/partylock.txt
-npc: conf/mapflag/pvp.txt
-npc: conf/mapflag/pvp_noparty.txt
-npc: conf/mapflag/pvp_noguild.txt
-npc: conf/mapflag/night.txt
-npc: conf/mapflag/zone.txt
-npc: conf/mapflag/battleground.txt
-npc: conf/mapflag/novending.txt
-npc: conf/mapflag/town.txt
-npc: conf/mapflag/reset.txt
-npc: conf/mapflag/skillmodifier.txt
-npc: conf/mapflag/skillduration.txt \ No newline at end of file
+npc: npc/mapflag/nopvp.txt
+npc: npc/mapflag/gvg.txt
+npc: npc/mapflag/jail.txt
+npc: npc/mapflag/nightmare.txt
+npc: npc/mapflag/nobranch.txt
+npc: npc/mapflag/noexp.txt
+npc: npc/mapflag/noicewall.txt
+npc: npc/mapflag/noloot.txt
+npc: npc/mapflag/nomemo.txt
+npc: npc/mapflag/nopenalty.txt
+npc: npc/mapflag/nosave.txt
+npc: npc/mapflag/noteleport.txt
+npc: npc/mapflag/noreturn.txt
+npc: npc/mapflag/noskill.txt
+npc: npc/mapflag/nowarp.txt
+npc: npc/mapflag/nowarpto.txt
+npc: npc/mapflag/partylock.txt
+npc: npc/mapflag/pvp.txt
+npc: npc/mapflag/pvp_noparty.txt
+npc: npc/mapflag/pvp_noguild.txt
+npc: npc/mapflag/night.txt
+npc: npc/mapflag/zone.txt
+npc: npc/mapflag/battleground.txt
+npc: npc/mapflag/novending.txt
+npc: npc/mapflag/town.txt
+npc: npc/mapflag/reset.txt
+npc: npc/mapflag/skillmodifier.txt
+npc: npc/mapflag/skillduration.txt \ No newline at end of file
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 dc5352137..97ad493b1 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1172,13 +1172,13 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
p->save_point.map = mapindex_name2id(save_map);
if( p->last_point.map == 0 ) {
- p->last_point.map = strdb_iget(mapindex_db, MAP_DEFAULT);
+ p->last_point.map = (unsigned short)strdb_iget(mapindex_db, MAP_DEFAULT);
p->last_point.x = MAP_DEFAULT_X;
p->last_point.y = MAP_DEFAULT_Y;
}
if( p->save_point.map == 0 ) {
- p->save_point.map = strdb_iget(mapindex_db, MAP_DEFAULT);
+ p->save_point.map = (unsigned short)strdb_iget(mapindex_db, MAP_DEFAULT);
p->save_point.x = MAP_DEFAULT_X;
p->save_point.y = MAP_DEFAULT_Y;
}
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index 731a8b578..bfe8bf8f8 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -281,6 +281,24 @@ typedef char bool;
//#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b)))
// Avoid "value computed is not used" warning and generates the same assembly code
#define swap(a,b) if (a != b) ((a ^= b), (b ^= a), (a ^= b))
+#if 0 //to be activated soon, more tests needed on how VS works with the macro above
+#ifdef WIN32
+#undef swap
+#define swap(a,b)__asm \
+{ \
+ __asm mov eax, dword ptr [a] \
+ __asm cmp eax, dword ptr [b] \
+ __asm je _ret \
+ __asm xor eax, dword ptr [b] \
+ __asm mov dword ptr [a], eax \
+ __asm xor eax, dword ptr [b] \
+ __asm mov dword ptr [b], eax \
+ __asm xor eax, dword ptr [a] \
+ __asm mov dword ptr [a], eax \
+ __asm _ret: \
+}
+#endif
+#endif
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
diff --git a/src/common/des.c b/src/common/des.c
index 917fc33e0..ed6d098dc 100644
--- a/src/common/des.c
+++ b/src/common/des.c
@@ -78,8 +78,8 @@ static void E(BIT64* src)
{
BIT64 tmp = {{0}};
-if( false )
-{// original
+#if 0
+ // original
static const uint8_t expand_table[48] = {
32, 1, 2, 3, 4, 5,
4, 5, 6, 7, 8, 9,
@@ -98,9 +98,8 @@ if( false )
if( src->b[j / 8 + 4] & mask[j % 8] )
tmp .b[i / 6 + 0] |= mask[i % 6];
}
-}
-else
-{// optimized
+#endif
+ // optimized
tmp.b[0] = ((src->b[7]<<5) | (src->b[4]>>3)) & 0x3f; // ..0 vutsr
tmp.b[1] = ((src->b[4]<<1) | (src->b[5]>>7)) & 0x3f; // ..srqpo n
tmp.b[2] = ((src->b[4]<<5) | (src->b[5]>>3)) & 0x3f; // ..o nmlkj
@@ -109,7 +108,6 @@ else
tmp.b[5] = ((src->b[6]<<1) | (src->b[7]>>7)) & 0x3f; // ..cba98 7
tmp.b[6] = ((src->b[6]<<5) | (src->b[7]>>3)) & 0x3f; // ..8 76543
tmp.b[7] = ((src->b[7]<<1) | (src->b[4]>>7)) & 0x3f; // ..43210 v
-}
*src = tmp;
}
diff --git a/src/common/grfio.c b/src/common/grfio.c
index bf66dba52..77b976926 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -171,7 +171,7 @@ static void grf_decode_full(unsigned char* buf, size_t len, int cycle)
scycle = 7;
// so decrypt/de-shuffle periodically
- j = -1; // 0, adjusted to fit the ++j step
+ j = (size_t)-1; // 0, adjusted to fit the ++j step
for( i = 20; i < nblocks; ++i )
{
if( i % dcycle == 0 )
@@ -408,7 +408,7 @@ void* grfio_reads(const char* fname, int* size)
declen = ftell(in);
fseek(in,0,SEEK_SET);
buf2 = (unsigned char *)aMalloc(declen+1); // +1 for resnametable zero-termination
- if(fread(buf2, 1, declen, in) != declen) ShowError("An error occured in fread grfio_reads, fname=%s \n",fname);
+ if(fread(buf2, 1, declen, in) != (size_t)declen) ShowError("An error occured in fread grfio_reads, fname=%s \n",fname);
fclose(in);
if( size )
@@ -430,7 +430,7 @@ void* grfio_reads(const char* fname, int* size)
int fsize = entry->srclen_aligned;
unsigned char *buf = (unsigned char *)aMalloc(fsize);
fseek(in, entry->srcpos, 0);
- if(fread(buf, 1, fsize, in) != fsize) ShowError("An error occured in fread in grfio_reads, grfname=%s\n",grfname);
+ if(fread(buf, 1, fsize, in) != (size_t)fsize) ShowError("An error occured in fread in grfio_reads, grfname=%s\n",grfname);
fclose(in);
buf2 = (unsigned char *)aMalloc(entry->declen+1); // +1 for resnametable zero-termination
@@ -526,7 +526,7 @@ static int grfio_entryread(const char* grfname, int gentry)
long list_size;
list_size = grf_size - ftell(fp);
grf_filelist = (unsigned char *) aMalloc(list_size);
- if(fread(grf_filelist,1,list_size,fp) != list_size) { ShowError("Couldn't read all grf_filelist element of %s \n", grfname); }
+ if(fread(grf_filelist,1,list_size,fp) != (size_t)list_size) { ShowError("Couldn't read all grf_filelist element of %s \n", grfname); }
fclose(fp);
entrys = getlong(grf_header+0x26) - getlong(grf_header+0x22) - 7;
@@ -559,7 +559,7 @@ static int grfio_entryread(const char* grfname, int gentry)
#ifdef GRFIO_LOCAL
aentry.gentry = -(gentry+1); // As Flag for making it a negative number carrying out the first time LocalFileCheck
#else
- aentry.gentry = gentry+1; // With no first time LocalFileCheck
+ aentry.gentry = (char)(gentry+1); // With no first time LocalFileCheck
#endif
filelist_modify(&aentry);
}
@@ -611,13 +611,13 @@ static int grfio_entryread(const char* grfname, int gentry)
aentry.srclen_aligned = getlong(grf_filelist+ofs2+4);
aentry.declen = getlong(grf_filelist+ofs2+8);
aentry.srcpos = getlong(grf_filelist+ofs2+13)+0x2e;
- aentry.type = type;
+ aentry.type = (char)type;
safestrncpy(aentry.fn, fname, sizeof(aentry.fn));
aentry.fnd = NULL;
#ifdef GRFIO_LOCAL
aentry.gentry = -(gentry+1); // As Flag for making it a negative number carrying out the first time LocalFileCheck
#else
- aentry.gentry = gentry+1; // With no first time LocalFileCheck
+ aentry.gentry = (char)(gentry+1); // With no first time LocalFileCheck
#endif
filelist_modify(&aentry);
}
diff --git a/src/common/malloc.c b/src/common/malloc.c
index e98ec770a..372991fbe 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -253,7 +253,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func )
p->unit_head.block = NULL;
p->unit_head.size = 0;
p->unit_head.file = file;
- p->unit_head.line = line;
+ p->unit_head.line = (unsigned short)line;
p->prev = NULL;
if (unit_head_large_first == NULL)
p->next = NULL;
@@ -327,7 +327,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func )
head->block = block;
head->file = file;
- head->line = line;
+ head->line = (unsigned short)line;
head->size = (unsigned short)size;
*(long*)((char*)head + sizeof(struct unit_head) - sizeof(long) + size) = 0xdeadbeaf;
return (char *)head + sizeof(struct unit_head) - sizeof(long);
@@ -426,7 +426,7 @@ void _mfree(void *ptr, const char *file, int line, const char *func )
#ifdef DEBUG_MEMMGR
memset(ptr, 0xfd, block->unit_size - sizeof(struct unit_head) + sizeof(long) );
head->file = file;
- head->line = line;
+ head->line = (unsigned short)line;
#endif
memmgr_assert( block->unit_used > 0 );
if(--block->unit_used == 0) {
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
index d35d9899c..43953a8e0 100644
--- a/src/common/mapindex.h
+++ b/src/common/mapindex.h
@@ -7,7 +7,7 @@
#include "../common/db.h"
-/* when a map index search fails, return results from what map? default:prontera */
+// When a map index search fails, return results from what map? default:prontera
#define MAP_DEFAULT "prontera"
#define MAP_DEFAULT_X 150
#define MAP_DEFAULT_Y 150
diff --git a/src/common/mmo.h b/src/common/mmo.h
index a86aba723..fd157377b 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -51,13 +51,14 @@
#define PACKETVER 20120418
#endif
-/// comment following line if your client is NOT ragexeRE (required because of conflicting packets in ragexe vs ragexeRE)
+// Comment the following line if your client is NOT ragexeRE (required because of conflicting packets in ragexe vs ragexeRE).
#define PACKETVER_RE
-//Remove/Comment this line to disable sc_data saving. [Skotlex]
+// Comment the following line to disable sc_data saving. [Skotlex]
#define ENABLE_SC_SAVING
-//Remove/Comment this line to disable server-side hot-key saving support [Skotlex]
-//Note that newer clients no longer save hotkeys in the registry!
+
+// Comment the following like to disable server-side hot-key saving support. [Skotlex]
+// Note that newer clients no longer save hotkeys in the registry!
#define HOTKEY_SAVING
#if PACKETVER < 20090603
@@ -83,10 +84,10 @@
#define MAX_FAME 1000000000
#define MAX_CART 100
#define MAX_SKILL 1477
-#define MAX_SKILL_ID 10015 //[Ind/Hercules] max used skill id
-#define GLOBAL_REG_NUM 256 // max permanent character variables per char
-#define ACCOUNT_REG_NUM 64 // max permanent local account variables per account
-#define ACCOUNT_REG2_NUM 16 // max permanent global account variables per account
+#define MAX_SKILL_ID 10015 // [Ind/Hercules] max used skill ID
+#define GLOBAL_REG_NUM 256 // Max permanent character variables per char
+#define ACCOUNT_REG_NUM 64 // Max permanent local account variables per account
+#define ACCOUNT_REG2_NUM 16 // Max permanent global account variables per account
//Should hold the max of GLOBAL/ACCOUNT/ACCOUNT2 (needed for some arrays that hold all three)
#define MAX_REG_NUM 256
#define DEFAULT_WALK_SPEED 150
@@ -95,16 +96,16 @@
#define MAX_STORAGE 600
#define MAX_GUILD_STORAGE 600
#define MAX_PARTY 12
-#define MAX_GUILD 16+10*6 // increased max guild members +6 per 1 extension levels [Lupus]
-#define MAX_GUILDPOSITION 20 // increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
+#define MAX_GUILD 16+10*6 // Increased max guild members +6 per 1 extension levels [Lupus]
+#define MAX_GUILDPOSITION 20 // Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
#define MAX_GUILDEXPULSION 32
#define MAX_GUILDALLIANCE 16
-#define MAX_GUILDSKILL 15 // increased max guild skills because of new skills [Sara-chan]
+#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_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]
+#define MAX_GUARDIANS 8 // Local max per castle. [Skotlex]
+#define MAX_QUEST_DB 2400 // 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]
// for produce
#define MIN_ATTRIBUTE 0
@@ -123,43 +124,43 @@
#define NAME_LENGTH (23 + 1)
//For item names, which tend to have much longer names.
#define ITEM_NAME_LENGTH 50
-//For Map Names, which the client considers to be 16 in length including the .gat extension
+//For Map Names, which the client considers to be 16 in length including the .gat extension.
#define MAP_NAME_LENGTH (11 + 1)
#define MAP_NAME_LENGTH_EXT (MAP_NAME_LENGTH + 4)
#define MAX_FRIENDS 40
#define MAX_MEMOPOINTS 3
-//Size of the fame list arrays.
+// Size of the fame list arrays.
#define MAX_FAME_LIST 10
-//Limits to avoid ID collision with other game objects
+// Limits to avoid ID collision with other game objects
#define START_ACCOUNT_NUM 2000000
#define END_ACCOUNT_NUM 100000000
#define START_CHAR_NUM 150000
-//Guilds
+// Guilds
#define MAX_GUILDMES1 60
#define MAX_GUILDMES2 120
-//Base Homun skill.
+// Base Homun skill.
#define HM_SKILLBASE 8001
#define MAX_HOMUNSKILL 43
-#define MAX_HOMUNCULUS_CLASS 52 //[orn], Increased to 60 from 16 to allow new Homun-S.
+#define MAX_HOMUNCULUS_CLASS 52 // [orn] Increased to 60 from 16 to allow new Homun-S.
#define HM_CLASS_BASE 6001
#define HM_CLASS_MAX (HM_CLASS_BASE+MAX_HOMUNCULUS_CLASS-1)
-//Mail System
+// Mail System
#define MAIL_MAX_INBOX 30
#define MAIL_TITLE_LENGTH 40
#define MAIL_BODY_LENGTH 200
-//Mercenary System
+// Mercenary System
#define MC_SKILLBASE 8201
#define MAX_MERCSKILL 40
#define MAX_MERCENARY_CLASS 61
-//Elemental System
+// Elemental System
#define MAX_ELEMENTALSKILL 42
#define EL_SKILLBASE 8401
#define MAX_ELESKILLTREE 3
@@ -185,7 +186,7 @@ enum item_types {
};
-//Questlog system [Kevin] [Inkfish]
+// Questlog system [Kevin] [Inkfish]
typedef enum quest_state { Q_INACTIVE, Q_ACTIVE, Q_COMPLETE } quest_state;
struct quest {
@@ -199,7 +200,7 @@ struct item {
int id;
short nameid;
short amount;
- unsigned short equip; // location(s) where item is equipped (using enum equip_pos for bitmasking)
+ unsigned short equip; // Location(s) where item is equipped (using enum equip_pos for bitmasking).
char identify;
char refine;
char attribute;
@@ -219,8 +220,8 @@ enum e_skill_flag
SKILL_FLAG_PERMANENT,
SKILL_FLAG_TEMPORARY,
SKILL_FLAG_PLAGIARIZED,
- SKILL_FLAG_REPLACED_LV_0, // temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0',
- SKILL_FLAG_PERM_GRANTED, // permanent, granted through someway e.g. script
+ SKILL_FLAG_REPLACED_LV_0, // Temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0',
+ SKILL_FLAG_PERM_GRANTED, // Permanent, granted through someway (e.g. script).
//...
};
@@ -233,7 +234,7 @@ enum e_mmo_charstatus_opt {
struct s_skill {
unsigned short id;
unsigned char lv;
- unsigned char flag; // see enum e_skill_flag
+ unsigned char flag; // See enum e_skill_flag
};
struct global_reg {
@@ -241,14 +242,14 @@ struct global_reg {
char value[256];
};
-//Holds array of global registries, used by the char server and converter.
+// Holds array of global registries, used by the char server and converter.
struct accreg {
int account_id, char_id;
int reg_num;
struct global_reg reg[MAX_REG_NUM];
};
-//For saving status changes across sessions. [Skotlex]
+// For saving status changes across sessions. [Skotlex]
struct status_change_data {
unsigned short type; //SC_type
long val1, val2, val3, val4, tick; //Remaining duration.
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 565dd0460..d3a7aafff 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -315,7 +315,7 @@ static bool account_db_sql_set_property(AccountDB* self, const char* key, const
safestrncpy(db->codepage, value, sizeof(db->codepage));
else
if( strcmpi(key, "case_sensitive") == 0 )
- db->case_sensitive = config_switch(value);
+ db->case_sensitive = (bool)config_switch(value);
else
if( strcmpi(key, "account_db") == 0 )
safestrncpy(db->account_db, value, sizeof(db->account_db));
@@ -549,7 +549,7 @@ static bool mmo_auth_fromsql(AccountDB_SQL* db, struct mmo_account* acc, int acc
SQL->GetData(sql_handle, 10, &data, NULL); safestrncpy(acc->lastlogin, data, sizeof(acc->lastlogin));
SQL->GetData(sql_handle, 11, &data, NULL); safestrncpy(acc->last_ip, data, sizeof(acc->last_ip));
SQL->GetData(sql_handle, 12, &data, NULL); safestrncpy(acc->birthdate, data, sizeof(acc->birthdate));
- SQL->GetData(sql_handle, 13, &data, NULL); acc->char_slots = atoi(data);
+ SQL->GetData(sql_handle, 13, &data, NULL); acc->char_slots = (uint8)atoi(data);
SQL->GetData(sql_handle, 14, &data, NULL); safestrncpy(acc->pincode, data, sizeof(acc->pincode));
SQL->GetData(sql_handle, 15, &data, NULL); acc->pincode_change = atol(data);
diff --git a/src/login/login.c b/src/login/login.c
index 8dd5ce20a..2bfb9c730 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -467,7 +467,7 @@ int parse_fromchar(int fd)
{
ShowStatus("set users %s : %d\n", server[id].name, users);
- server[id].users = users;
+ server[id].users = (uint16)users;
}
}
break;
@@ -1083,7 +1083,7 @@ int mmo_auth(struct login_session_data* sd, bool isServer) {
sd->login_id2 = rnd() + 1;
safestrncpy(sd->lastlogin, acc.lastlogin, sizeof(sd->lastlogin));
sd->sex = acc.sex;
- sd->group_id = acc.group_id;
+ sd->group_id = (uint8)acc.group_id;
// update account data
timestamp2string(acc.lastlogin, sizeof(acc.lastlogin), time(NULL), "%Y-%m-%d %H:%M:%S");
diff --git a/src/map/packets.h b/src/map/packets.h
index 92df54367..5d07f7f9e 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -2089,4 +2089,74 @@ packet(0x020d,-1);
// New Packets End
#endif
+//2013-05-15aRagexe (Shakto)
+#if PACKETVER >= 20130515
+ // Shuffle Start
+ packet(0x0369,7,clif->pActionRequest,2,6);
+ packet(0x083C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0437,5,clif->pWalkToXY,2);
+ packet(0x035F,6,clif->pTickSend,2);
+ packet(0x0362,5,clif->pChangeDir,2,4);
+ packet(0x08A1,6,clif->pTakeItem,2);
+ packet(0x0944,6,clif->pDropItem,2,4);
+ packet(0x0887,8,clif->pMoveToKafra,2,4);
+ packet(0x08AC,8,clif->pMoveFromKafra,2,4);
+ packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x096A,6,clif->pGetCharNameRequest,2);
+ packet(0x0368,6,clif->pSolveCharName,2);
+ packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0835,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0360,6,clif->pReqClickBuyingStore,2);
+ packet(0x0817,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x092D,41,clif->pPartyBookingRegisterReq,2,4);
+ //packet(0x08AA,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0963,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x0943,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0947,26,clif->pPartyInvite2,2);
+ //packet(0x0862,4); // CZ_GANGSI_RANK
+ packet(0x0962,26,clif->pFriendsListAdd,2);
+ packet(0x0931,5,clif->pHomMenu,2,4);
+ packet(0x093E,36,clif->pStoragePassword,0);
+ // Shuffle End
+#endif
+
+//2013-05-22Ragexe (Shakto)
+#if PACKETVER >= 20130522
+ // Shuffle Start
+ packet(0x08A2,7,clif->pActionRequest,2,6);
+ packet(0x095C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0360,5,clif->pWalkToXY,2);
+ packet(0x07EC,6,clif->pTickSend,2);
+ packet(0x0925,5,clif->pChangeDir,2,4);
+ packet(0x095E,6,clif->pTakeItem,2);
+ packet(0x089C,6,clif->pDropItem,2,4);
+ packet(0x08A3,8,clif->pMoveToKafra,2,4);
+ packet(0x087E,8,clif->pMoveFromKafra,2,4);
+ packet(0x0811,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0964,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x08A6,6,clif->pGetCharNameRequest,2);
+ packet(0x0369,6,clif->pSolveCharName,2);
+ packet(0x093E,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x08AA,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x095B,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0952,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0368,6,clif->pReqClickBuyingStore,2);
+ packet(0x086E,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0874,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x089B,41,clif->pPartyBookingRegisterReq,2,4);
+ //packet(0x0965,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x086A,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x08A9,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0950,26,clif->pPartyInvite2,2);
+ //packet(0x08AC,4); // CZ_GANGSI_RANK
+ packet(0x0362,26,clif->pFriendsListAdd,2);
+ packet(0x0926,5,clif->pHomMenu,2,4);
+ packet(0x088E,36,clif->pStoragePassword,0);
+ // Shuffle End
+#endif
+
#endif /* _PACKETS_H_ */
diff --git a/src/map/script.c b/src/map/script.c
index d42d3d3e3..07497d892 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -8435,6 +8435,7 @@ BUILDIN(monster)
const char* event = "";
unsigned int size = SZ_SMALL;
unsigned int ai = AI_NONE;
+ int mob_id;
struct map_session_data* sd;
int16 m;
@@ -8485,7 +8486,8 @@ BUILDIN(monster)
}
}
- mob_once_spawn(sd, m, x, y, str, class_, amount, event, size, ai);
+ mob_id = mob_once_spawn(sd, m, x, y, str, class_, amount, event, size, ai);
+ script_pushint(st, mob_id);
return true;
}
/*==========================================
@@ -8539,6 +8541,7 @@ BUILDIN(areamonster)
const char* event = "";
unsigned int size = SZ_SMALL;
unsigned int ai = AI_NONE;
+ int mob_id;
struct map_session_data* sd;
int16 m;
@@ -8578,7 +8581,9 @@ BUILDIN(areamonster)
}
}
- mob_once_spawn_area(sd, m, x0, y0, x1, y1, str, class_, amount, event, size, ai);
+ mob_id = mob_once_spawn_area(sd, m, x0, y0, x1, y1, str, class_, amount, event, size, ai);
+ script_pushint(st, mob_id);
+
return true;
}
/*==========================================
diff --git a/src/map/skill.h b/src/map/skill.h
index 553dabd6d..c585bbb3a 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -81,14 +81,14 @@ enum e_skill_nk {
//Constants to identify a skill's inf2 value.
enum e_skill_inf2 {
INF2_QUEST_SKILL = 0x0001,
- INF2_NPC_SKILL = 0x0002, //NPC skills are those that players can't have in their skill tree.
+ INF2_NPC_SKILL = 0x0002, // NPC skills are those that players can't have in their skill tree.
INF2_WEDDING_SKILL = 0x0004,
INF2_SPIRIT_SKILL = 0x0008,
INF2_GUILD_SKILL = 0x0010,
INF2_SONG_DANCE = 0x0020,
INF2_ENSEMBLE_SKILL = 0x0040,
INF2_TRAP = 0x0080,
- INF2_TARGET_SELF = 0x0100, //Refers to ground placed skills that will target the caster as well (like Grandcross)
+ INF2_TARGET_SELF = 0x0100, // Refers to ground placed skills that will target the caster as well (like Grandcross)
INF2_NO_TARGET_SELF = 0x0200,
INF2_PARTY_ONLY = 0x0400,
INF2_GUILD_ONLY = 0x0800,
@@ -107,19 +107,19 @@ enum e_skill_display {
};
enum {
- UF_DEFNOTENEMY = 0x0001, // If 'defunit_not_enemy' is set, the target is changed to 'friend'
- UF_NOREITERATION = 0x0002, // Spell cannot be stacked
- UF_NOFOOTSET = 0x0004, // Spell cannot be cast near/on targets
- UF_NOOVERLAP = 0x0008, // Spell effects do not overlap
- UF_PATHCHECK = 0x0010, // Only cells with a shootable path will be placed
- UF_NOPC = 0x0020, // May not target players
- UF_NOMOB = 0x0040, // May not target mobs
- UF_SKILL = 0x0080, // May target skills
- UF_DANCE = 0x0100, // Dance
- UF_ENSEMBLE = 0x0200, // Duet
- UF_SONG = 0x0400, // Song
- UF_DUALMODE = 0x0800, // Spells should trigger both ontimer and onplace/onout/onleft effects.
- UF_RANGEDSINGLEUNIT = 0x2000 // hack for ranged layout, only display center
+ UF_DEFNOTENEMY = 0x0001, // If 'defunit_not_enemy' is set, the target is changed to 'friend'
+ UF_NOREITERATION = 0x0002, // Spell cannot be stacked
+ UF_NOFOOTSET = 0x0004, // Spell cannot be cast near/on targets
+ UF_NOOVERLAP = 0x0008, // Spell effects do not overlap
+ UF_PATHCHECK = 0x0010, // Only cells with a shootable path will be placed
+ UF_NOPC = 0x0020, // May not target players
+ UF_NOMOB = 0x0040, // May not target mobs
+ UF_SKILL = 0x0080, // May target skills
+ UF_DANCE = 0x0100, // Dance
+ UF_ENSEMBLE = 0x0200, // Duet
+ UF_SONG = 0x0400, // Song
+ UF_DUALMODE = 0x0800, // Spells should trigger both ontimer and onplace/onout/onleft effects.
+ UF_RANGEDSINGLEUNIT = 0x2000 // Hack for ranged layout, only display center
};
//Returns the cast type of the skill: ground cast, castend damage, castend no damage