summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-19 08:47:00 -0300
committershennetsind <ind@henn.et>2013-06-19 08:47:00 -0300
commit75c34fa8b87126aaf2b998ef429efe253ce5d105 (patch)
tree8e0d1ccd07905b7c6212ef68e2d270b5edba9d83
parent1edc31980be653e6482e4920862ac5d6ab0dd916 (diff)
parentbd95eccf047bda9d72abcea0724ad34b31131ab0 (diff)
downloadhercules-75c34fa8b87126aaf2b998ef429efe253ce5d105.tar.gz
hercules-75c34fa8b87126aaf2b998ef429efe253ce5d105.tar.bz2
hercules-75c34fa8b87126aaf2b998ef429efe253ce5d105.tar.xz
hercules-75c34fa8b87126aaf2b998ef429efe253ce5d105.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
-rw-r--r--conf/battle/battle.conf2
-rw-r--r--conf/battle/drops.conf4
-rw-r--r--conf/battle/homunc.conf2
-rw-r--r--conf/battle/misc.conf2
-rw-r--r--conf/battle/monster.conf12
-rw-r--r--conf/battle/party.conf2
-rw-r--r--conf/battle/skill.conf14
-rw-r--r--conf/help.txt4
-rw-r--r--conf/inter-server.conf2
-rw-r--r--conf/login-server.conf2
-rw-r--r--conf/logs.conf4
-rw-r--r--conf/map-server.conf2
-rw-r--r--conf/messages.conf2
-rw-r--r--conf/plugins.conf2
-rw-r--r--db/castle_db.txt36
-rw-r--r--db/const.txt13
-rw-r--r--db/quest_db.txt3
-rw-r--r--db/re/item_db.txt20
-rw-r--r--db/sc_config.txt799
-rw-r--r--doc/item_bonus.txt4
-rw-r--r--doc/script_commands.txt1438
-rw-r--r--npc/mobs/citycleaners.txt2
-rw-r--r--npc/re/guild/invest_main.txt1678
-rw-r--r--npc/re/guild/invest_npc.txt66
-rw-r--r--npc/re/instances/HazyForest.txt16
-rw-r--r--npc/re/mobs/dungeons/gld_dun.txt52
-rw-r--r--npc/re/mobs/dungeons/gld_re.txt100
-rw-r--r--npc/re/scripts_monsters.conf2
-rw-r--r--npc/re/warps/guildcastles.txt43
-rw-r--r--sql-files/tools/convert_engine_innodb.sql5
-rw-r--r--sql-files/tools/convert_engine_myisam.sql5
-rw-r--r--src/map/battle.c28
-rw-r--r--src/map/clif.c15
-rw-r--r--src/map/map.c2
-rw-r--r--src/map/pc.c9
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/script.c6
-rw-r--r--src/map/skill.c19
-rw-r--r--src/map/status.c18
-rw-r--r--src/map/status.h2
-rw-r--r--src/map/trade.h2
-rwxr-xr-xtools/check-doc8
42 files changed, 3163 insertions, 1286 deletions
diff --git a/conf/battle/battle.conf b/conf/battle/battle.conf
index 94f80a2a6..70062a16e 100644
--- a/conf/battle/battle.conf
+++ b/conf/battle/battle.conf
@@ -94,7 +94,7 @@ vit_penalty_num: 5
// Use alternate method of DEF calculation for physical attacks.
// With 0, disabled (use normal def% reduction with further def2 reduction)
-// At 1 or more defense is substraction of (DEF* value).
+// At 1 or more defense is subtraction of (DEF* value).
// eg: 10 + 50 def becomes 0 + (10*type + 50)
weapon_defense_type: 0
diff --git a/conf/battle/drops.conf b/conf/battle/drops.conf
index 3704b9a0e..9006cfeb1 100644
--- a/conf/battle/drops.conf
+++ b/conf/battle/drops.conf
@@ -7,10 +7,10 @@
// Note 2: Value is in percents (100 means 100%)
//--------------------------------------------------------------
-// If an item is dropped, does it go stright into the users inventory? (Note 1)
+// If an item is dropped, does it go straight into the users inventory? (Note 1)
item_auto_get: no
-// How long does it take for an item to disappear from the floor after it is dropped? (in miliseconds)
+// How long does it take for an item to disappear from the floor after it is dropped? (in milliseconds)
flooritem_lifetime: 60000
// Grace time during which only the person who did the most damage to a monster can get the item? (in milliseconds)
diff --git a/conf/battle/homunc.conf b/conf/battle/homunc.conf
index fb34792ce..5e1b1c9d2 100644
--- a/conf/battle/homunc.conf
+++ b/conf/battle/homunc.conf
@@ -35,7 +35,7 @@ homunculus_show_growth: yes
// Does autoloot work, when a monster is killed by homunculus only?
homunculus_autoloot: yes
-// Should homunculii Vaporize when Master dies?
+// Should homunculi Vaporize when Master dies?
homunculus_auto_vapor: yes
// Max level for regular Homunculus
diff --git a/conf/battle/misc.conf b/conf/battle/misc.conf
index 32b9c511e..9814a2140 100644
--- a/conf/battle/misc.conf
+++ b/conf/battle/misc.conf
@@ -85,7 +85,7 @@ duel_only_on_same_map: no
// Cell Stack Limit support (see src/map/map.h)
cell_stack_limit: 1
-// Allow autrade only in map with autotrade flag?
+// Allow autotrade only in map with autotrade flag?
// Set this to "no" will allow autotrade where no "autotrade" mapflag is set
// Set this to "yes" to only allow autotrade on maps with "autotrade" mapflag
at_mapflag: no
diff --git a/conf/battle/monster.conf b/conf/battle/monster.conf
index 51136fbe0..50d661087 100644
--- a/conf/battle/monster.conf
+++ b/conf/battle/monster.conf
@@ -30,13 +30,13 @@ monster_max_aspd: 199
// (distance player/mob < 3), otherwise mobs may change target and chase
// ranged attackers. This flag also overrides the 'provoke' target.
// 0x008: If set, when a mob loses track of their target, they stop walking
-// inmediately. Otherwise, they continue to their last target tile. When
+// immediately. Otherwise, they continue to their last target tile. When
// set mobs also scatter as soon as they lose their target. Use this mode
// to make it much harder to mob-train by hiding and collecting them on a
// single spot (ie: GrimTooth training)
// 0x010: If set, mob skills defined for friends will also trigger on themselves.
// 0x020: When set, the monster ai is executed for all monsters in maps that
-// have players on them, instead of only for mobs who are in the vecinity
+// have players on them, instead of only for mobs who are in the vicinity
// of players.
// 0x040: When set, when the mob's target changes map, the mob will walk towards
// any npc-warps in it's sight of view (use with mob_warp below)
@@ -60,7 +60,7 @@ monster_ai: 0
mob_warp: 0
// If these are set above 0, they define the time (in ms) during which monsters
-// will have their 'AI' active after all players have left their vecinity.
+// will have their 'AI' active after all players have left their vicinity.
mob_active_time: 0
boss_active_time: 0
@@ -105,7 +105,7 @@ mob_skill_delay: 100
mob_count_rate: 100
// Respawn rate of monsters on a map. 50 would make mobs respawn twice as fast (half delay time) (Note 2)
-//Note: This does not affects mobs with inmediate respawn (most normal mobs)
+//Note: This does not affects mobs with immediate respawn (most normal mobs)
mob_spawn_delay: 100
plant_spawn_delay: 100
boss_spawn_delay: 100
@@ -158,7 +158,7 @@ mob_changetarget_byskill: no
monster_class_change_full_recover: yes
// Display some mob info next to their name? (add as needed)
-// (does not works on guardian or emperium)
+// (does not works on guardian or Emperium)
// 1: Display mob HP (Hp/MaxHp format)
// 2: Display mob HP (Percent of full life format)
// 4: Display mob's level
@@ -189,7 +189,7 @@ mob_remove_delay: 300000
// NOTE: This affects who gains the Castle when the Emperium is broken.
mob_npc_event_type: 1
-// Time in milliseconds to actitave protection against Kill Steal
+// Time in milliseconds to activate protection against Kill Steal
// Set to 0 to disable it.
// If this is activated and a player is using @noks, damage from others players (KS) not in the party
// will be reduced to 0.
diff --git a/conf/battle/party.conf b/conf/battle/party.conf
index 7339b2e3c..14d5f47c8 100644
--- a/conf/battle/party.conf
+++ b/conf/battle/party.conf
@@ -44,7 +44,7 @@ party_item_share_type: 0
// A character's idle status is reset upon item use/skill use/attack (auto attack counts too)/movement.
idle_no_share: no
-// Give additional experience bonus per party-member involved on even-share parties (excluding youself)?
+// Give additional experience bonus per party-member involved on even-share parties (excluding yourself)?
// ex. If set to 10, an even-share party of 5 people will receive +40% exp (4 members * 10% exp):
// 140% party experience in total, so each member receives 140%/5 = 28% exp (instead of 20%).
party_even_share_bonus: 0
diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf
index df419b262..bc107f3d7 100644
--- a/conf/battle/skill.conf
+++ b/conf/battle/skill.conf
@@ -20,7 +20,7 @@ delay_rate: 100
delay_dependon_dex: no
delay_dependon_agi: no
-// Minimum allowed delay for ANY skills after casting (in miliseconds) (Note 1)
+// Minimum allowed delay for ANY skills after casting (in milliseconds) (Note 1)
// Note: Setting this to anything above 0 can stop speedhacks.
min_skill_delay_limit: 100
@@ -91,7 +91,7 @@ defunit_not_enemy: no
// Do skills do at least 'hits' damage when they don't miss/are blocked?
//(for example, will firebolts always do "number of bolts" damage versus plants?)
-//Values (add as appropiate): 1 for weapon-based attacks, 2 for magic attacks, 4 for misc attacks.
+//Values (add as appropriate): 1 for weapon-based attacks, 2 for magic attacks, 4 for misc attacks.
skill_min_damage: 6
// The delay rate of monk's combo (Note 2)
@@ -128,7 +128,7 @@ traps_setting: 0
summon_flora_setting: 3
// Whether placed down skills will check walls (Note 1)
-// (Makes it so that Storm Gust/Lord of Vermillion/etc when casted next to a wall, won't hit on the other side)
+// (Makes it so that Storm Gust/Lord of Vermillion/etc when cast next to a wall, won't hit on the other side)
skill_wall_check: yes
// When cloaking, Whether the wall is checked or not. (Note 1)
@@ -168,7 +168,7 @@ sense_type: 1
// 1 = Athena style (multiple consecutive attacks)
finger_offensive_type: 0
-// Grandcross Settings (Dont mess with these)
+// Grandcross Settings (Don't mess with these)
// If set to no, hit interval is increased based on the amount of mobs standing on the same cell
// (means that when there's stacked mobs in the same cell, they won't receive all hits)
gx_allhit: no
@@ -212,7 +212,7 @@ berserk_cancels_buffs: no
max_heal: 9999
max_heal_lv: 11
-// Emergency Recall Guild Skill setting (add as appropiate).
+// Emergency Recall Guild Skill setting (add as appropriate).
// Note that for the skill to be usable at all,
// you need at least one of 1/2 and 4/8
// 1: Skill is usable outside of woe.
@@ -223,7 +223,7 @@ max_heal_lv: 11
// (it will work on GVG castles even if they are set to nowarpto, though)
emergency_call: 11
-// Guild Aura Skills setting (add as appropiate).
+// Guild Aura Skills setting (add as appropriate).
// (This affects GD_LEADERSHIP, GD_GLORYWOUNDS, GD_SOULCOLD and GD_HAWKEYES)
// Note that for the skill to be usable at all,
// you need at least one of 1/2 and 4/8
@@ -258,7 +258,7 @@ sg_angel_skill_ratio: 10
skill_add_heal_rate: 7
// Whether the damage of EarthQuake with a single target on screen is able to be reflected.
-// Note: On offcial server, EQ is reflectable when there is only one target on the screen,
+// Note: On official server, EQ is reflectable when there is only one target on the screen,
// which might be an exploit to hunt the MVPs.
eq_single_target_reflectable: yes
diff --git a/conf/help.txt b/conf/help.txt
index 16e7c2981..18630bf59 100644
--- a/conf/help.txt
+++ b/conf/help.txt
@@ -32,7 +32,7 @@ mobsearch: "Params: <monster name|ID>\n" "Shows the location of a certain mob on
who: "Params: [<name>]\n" "Shows a list of online players and their party and guild."
who2: "Params: [<name>]\n" "Shows a list of online players and their job."
who3: "Params: [<name>]\n" "Shows a list of online players and their location."
-whomap: "@whomap/@whomap2/@whomap3 [map] - like @who/@who2/@who3 but only for specifical map."
+whomap: "@whomap/@whomap2/@whomap3 [map] - like @who/@who2/@who3 but only for specified map."
whogm: "Params: [match_text] - Like @who+@who2+who3, but only for GM."
guildspy: "Params: <guild name|id> - You will receive all messages of the guild channel (Chat logging must be enabled)"
partyspy: "@partyspy <party name|id> - You will receive all messages of the party channel (Chat logging must be enabled)"
@@ -221,7 +221,7 @@ request: "Params: <message>\n" "Sends a message to all connected GMs (via the gm
sound: "Params: <path to file in data folder or GRF file>\n" "Plays a sound from the data folder or GRF file located on the client."
clone: "Params: <charname>\n" "Spawns a supportive clone of the given player."
slaveclone: "Params: <charname>\n" "Spawns a supportive clone of the given player that follows the creator around."
-evilclone: "Params: <charname>\n" "Spawns an agressive clone of the given player."
+evilclone: "Params: <charname>\n" "Spawns an aggressive clone of the given player."
changesex: "Changes your gender."
duel: "Starts a duel."
invite: "Invites a player to a duel."
diff --git a/conf/inter-server.conf b/conf/inter-server.conf
index 0e9808077..3cf5211df 100644
--- a/conf/inter-server.conf
+++ b/conf/inter-server.conf
@@ -24,7 +24,7 @@ party_share_level: 15
// and you have localhost, switch it to 127.0.0.1
// Global SQL settings
-// overriden by local settings when the hostname is defined there
+// overridden by local settings when the hostname is defined there
// (currently only the login-server reads/obeys these settings)
sql.db_hostname: 127.0.0.1
sql.db_port: 3306
diff --git a/conf/login-server.conf b/conf/login-server.conf
index 8f2fa1bf1..fd1ef45f5 100644
--- a/conf/login-server.conf
+++ b/conf/login-server.conf
@@ -25,7 +25,7 @@ login_port: 6900
//If redirected output contains escape sequences (color codes)
stdout_with_ansisequence: no
-//Makes server output more silent by ommitting certain types of messages:
+//Makes server output more silent by omitting certain types of messages:
//1: Hide Information messages
//2: Hide Status messages
//4: Hide Notice Messages
diff --git a/conf/logs.conf b/conf/logs.conf
index 2aeb1b52e..f036cbccf 100644
--- a/conf/logs.conf
+++ b/conf/logs.conf
@@ -25,7 +25,7 @@
// 0x02000 - (E) Log mail system transactions.
// 0x04000 - (I) Log auction system transactions.
// 0x08000 - (B) Log buying store transactions
-// 0x10000 - (X) Log all other transcations (rentals expiring/inserting cards/items removed by item_check/
+// 0x10000 - (X) Log all other transactions (rentals expiring/inserting cards/items removed by item_check/
// rings deleted by divorce/pet egg (un)hatching/pet armor (un)equipping/Weapon Refine skill/Remove Trap skill)
// Example: Log trades+vending+script items+created items: 1+2+32+1024 = 1059
// Please note that moving items from inventory to cart and back is not logged by design.
@@ -77,7 +77,7 @@ log_branch: no
// Track Zeny Changes
// Filter settings
-// 0 - don't log; 1 - log any zeny changes; 2.....1000000 - minimal absolut logging zeny value
+// 0 - don't log; 1 - log any zeny changes; 2.....1000000 - minimal absolute logging zeny value
log_zeny: 0
// Log MVP Monster Drops (Note 1)
diff --git a/conf/map-server.conf b/conf/map-server.conf
index 446bb0d0e..fb4614ca3 100644
--- a/conf/map-server.conf
+++ b/conf/map-server.conf
@@ -55,7 +55,7 @@ stdout_with_ansisequence: no
//Messages logged by this overrides console_silent setting
console_msg_log: 0
-//Makes server output more silent by ommitting certain types of messages:
+//Makes server output more silent by omitting certain types of messages:
//1: Hide Information messages
//2: Hide Status messages
//4: Hide Notice Messages
diff --git a/conf/messages.conf b/conf/messages.conf
index e2886a57d..d9472952d 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -828,7 +828,7 @@
1031: Please enter part of an item name (usage: @idsearch <part_of_item_name>).
// @recallall / @guildrecall / @partyrecall
-1032: You are not authorized to warp somenone to your current map.
+1032: You are not authorized to warp someone to your current map.
1033: Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
// @guildrecall
diff --git a/conf/plugins.conf b/conf/plugins.conf
index 264592fa9..58ecb7144 100644
--- a/conf/plugins.conf
+++ b/conf/plugins.conf
@@ -14,7 +14,7 @@
//== Description =====================================
//The plugin system allows you to create customized scripts
//outside of the source. These scripts won't conflict with any
-//future source updates - think about it as a /conf/import/ version of the source.
+//future source updates - think of it as a /conf/import/ for the source.
//====================================================
/* --------------- Format ---------------
diff --git a/db/castle_db.txt b/db/castle_db.txt
index 4e0f2e880..45a1443d5 100644
--- a/db/castle_db.txt
+++ b/db/castle_db.txt
@@ -3,33 +3,33 @@
// Structure of Database:
// CastleID,MapName,CastleName,OnGuildBreakEventName,Flag
//
-// 01. CastleID Unique ID of the castle. Must remain unique across all map-servers.
-// 02. MapName Map name to be considered as the castle map.
-// 03. CastleName Name of the castle (used by scripts and guardian name tags).
-// 04. OnGuildBreakEventName NPC unique name to invoke ::OnGuildBreak on, when a occupied
-// castle is abandoned during guild break.
-// 05. Flag Switch flag (reserved as of athena-dev mod0796~0801, not used by server).
+// 01. CastleID Unique ID of the castle. Must remain unique across all map-servers.
+// 02. MapName Map name to be considered as the castle map.
+// 03. CastleName Name of the castle (used by scripts and guardian name tags).
+// 04. OnGuildBreakEventName NPC unique name to invoke ::OnGuildBreak on, when a occupied
+// castle is abandoned during guild break.
+// 05. Flag Switch flag (reserved as of athena-dev mod0796~0801, not used by server).
0,aldeg_cas01,Neuschwanstein,Agit#aldeg_cas01,1 // kRO : Noisyubantian
1,aldeg_cas02,Hohenschwangau,Agit#aldeg_cas02,1 // kRO : Hohensyubangawoo
2,aldeg_cas03,Nuernberg,Agit#aldeg_cas03,1 // kRO : Nyirenverk
3,aldeg_cas04,Wuerzburg,Agit#aldeg_cas04,1 // kRO : Byirtsburi
-4,aldeg_cas05,Rothenburg,Agit#aldeg_cas05,1 // kRO : Rotenburk
+4,aldeg_cas05,Rothenburg,Agit#aldeg_cas05,1 // kRO : Rotenburk
5,gefg_cas01,Repherion,Agit#gefg_cas01,1 // kRO : Reprion
-6,gefg_cas02,Eeyolbriggar,Agit#gefg_cas02,1 // kRO : Yolbriger
-7,gefg_cas03,Yesnelph,Agit#gefg_cas03,1 // kRO : Isinlife
-8,gefg_cas04,Bergel,Agit#gefg_cas04,1 // kRO : Berigel
-9,gefg_cas05,Mersetzdeitz,Agit#gefg_cas05,1 // kRO : Melsedetsu
+6,gefg_cas02,Eeyolbriggar,Agit#gefg_cas02,1 // kRO : Yolbriger
+7,gefg_cas03,Yesnelph,Agit#gefg_cas03,1 // kRO : Isinlife
+8,gefg_cas04,Bergel,Agit#gefg_cas04,1 // kRO : Berigel
+9,gefg_cas05,Mersetzdeitz,Agit#gefg_cas05,1 // kRO : Melsedetsu
10,payg_cas01,Bright Arbor,Agit#payg_cas01,1 // kRO : Mingting
11,payg_cas02,Scarlet Palace,Agit#payg_cas02,1 // kRO : Tiantan
-12,payg_cas03,Holy Shadow,Agit#payg_cas03,1 // kRO : Fuying
+12,payg_cas03,Holy Shadow,Agit#payg_cas03,1 // kRO : Fuying
13,payg_cas04,Sacred Altar,Agit#payg_cas04,1 // kRO : Honglou
14,payg_cas05,Bamboo Grove Hill,Agit#payg_cas05,1 // kRO : Zhulinxian
15,prtg_cas01,Kriemhild,Agit#prtg_cas01,1 // kRO : Creamhilt
16,prtg_cas02,Swanhild,Agit#prtg_cas02,1 // kRO : Sbanhealt
17,prtg_cas03,Fadhgridh,Agit#prtg_cas03,1 // kRO : Lazrigees
-18,prtg_cas04,Skoegul,Agit#prtg_cas04,1 // kRO : Squagul
-19,prtg_cas05,Gondul,Agit#prtg_cas05,1 // kRO : Guindull
+18,prtg_cas04,Skoegul,Agit#prtg_cas04,1 // kRO : Squagul
+19,prtg_cas05,Gondul,Agit#prtg_cas05,1 // kRO : Guindull
20,nguild_alde,Earth,Agit_N01,2
21,nguild_gef,Air,Agit_N02,2
22,nguild_pay,Water,Agit_N03,2
@@ -38,9 +38,9 @@
25,schg_cas02,Andlangr,Manager#schg_cas02,1 // kRO : Andlangr
26,schg_cas03,Viblainn,Manager#schg_cas03,1 // kRO : Viblainn
27,schg_cas04,Hljod,Manager#schg_cas04,1 // kRO : Hljod
-28,schg_cas05,Skidbladnir,Manager#schg_cas05,1 // kRO : Skidbladnir
+28,schg_cas05,Skidbladnir,Manager#schg_cas05,1 // kRO : Skidbladnir
29,arug_cas01,Mardol,Manager#arug_cas01,1 // kRO : Mardol
-30,arug_cas02,Cyr,Manager#arug_cas02,1 // kRO : Cyr
-31,arug_cas03,Horn,Manager#arug_cas03,1 // kRO : Horn
-32,arug_cas04,Gefn,Manager#arug_cas04,1 // kRO : Gefn
+30,arug_cas02,Cyr,Manager#arug_cas02,1 // kRO : Cyr
+31,arug_cas03,Horn,Manager#arug_cas03,1 // kRO : Horn
+32,arug_cas04,Gefn,Manager#arug_cas04,1 // kRO : Gefn
33,arug_cas05,Bandis,Manager#arug_cas05,1 // kRO : Bandis
diff --git a/db/const.txt b/db/const.txt
index cef0593e1..a5e52cb38 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -6,13 +6,13 @@
// Alternatively:
// Identifier,Value[,Type]
//
-// 01. Identifier Unique name for the constant, must not have same name as script commands, functions or variables.
-// 02. Value Value assigned to the constant. This value cannot be changed during the runtime of the server.
-// 03. Type Specifies whether the identifier is a constant (0) or a parameter (1) (optional, defaults to 0).
+// 01. Identifier Unique name for the constant, must not have same name as script commands, functions or variables.
+// 02. Value Value assigned to the constant. This value cannot be changed during the runtime of the server.
+// 03. Type Specifies whether the identifier is a constant (0) or a parameter (1) (optional, defaults to 0).
//
-// NOTE: Parameters are special in that they retrieve certain runtime values depending on the specified ID
-// in field Value. Depending on the implementation values assigned by scripts to parameters will affect
-// runtime values, such as Zeny, as well (see pc_readparam/pc_setparam).
+// NOTE: Parameters are special in that they retrieve certain runtime values depending on the specified ID
+// in field Value. Depending on the implementation values assigned by scripts to parameters will affect
+// runtime values, such as Zeny, as well (see pc_readparam/pc_setparam).
Job_Novice 0
Job_Swordman 1
@@ -1289,6 +1289,7 @@ SC_KINGS_GRACE 557
SC_TELEKINESIS_INTENSE 558
SC_OFFERTORIUM 559
SC_FRIGG_SONG 560
+SC_MONSTER_TRANSFORM 563
e_gasp 0
e_what 1
diff --git a/db/quest_db.txt b/db/quest_db.txt
index 025a9e6ec..6b4108ad6 100644
--- a/db/quest_db.txt
+++ b/db/quest_db.txt
@@ -997,6 +997,9 @@
7345,0,0,0,0,0,0,0,"List of Errands"
7346,0,0,0,0,0,0,0,"List of Errands"
+// Hall of Abyss
+7349,1800,0,0,0,0,0,0,"Vote"
+
// Port Malaya
7350,0,0,0,0,0,0,0,"Cautious Village"
7351,0,0,0,0,0,0,0,"Better than My Old Button"
diff --git a/db/re/item_db.txt b/db/re/item_db.txt
index 94a988e12..7696af4cb 100644
--- a/db/re/item_db.txt
+++ b/db/re/item_db.txt
@@ -5899,6 +5899,14 @@
12646,Fried_Octopus_Legs,Fried Octopus Legs,2,20,,30,,,,,,,,,,,,,{},{},{}
12647,Sea_Ink,Sea Ink,2,20,,30,,,,,,,,,,,,,{},{},{}
//
+12658,Transformation_Scroll(Deviruchi),Transformation Scroll(Deviruchi),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1109,0,0,0; },{},{}
+12659,Transformation_Scroll(Raydric),Transformation Scroll(Raydric),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1276,0,0,0; },{},{}
+12660,Transformation_Scroll(Mavka),Transformation Scroll(Mavka),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1884,0,0,0; },{},{}
+12661,Transformation_Scroll(Marduk),Transformation Scroll(Marduk),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1140,0,0,0; },{},{}
+12662,Transformation_Scroll(Banshee),Transformation Scroll(Banshee),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1867,0,0,0; },{},{}
+12663,Transformation_Scroll(Poring),Transformation Scroll(Poring),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1002,0,0,0; },{},{}
+12664,Transformation_Scroll(Golem),Transformation Scroll(Golem),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1040,0,0,0; },{},{}
+//
12699,Tikbalang_Belt,Tikbalang Belt,2,20,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ pet 2313; },{},{}
12700,Upside_Down_Shirt,Upside Down Shirt,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ warp "malaya",242,211; },{},{}
12701,Old_Blue_Box_F,Old Blue Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
@@ -7586,13 +7594,13 @@
17030,St_Pat_Hat_box,St Pat Hat box,18,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 18565,1; },{},{}
17035,Energetic_Pisces_Scroll,Energetic Pisces Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17036,Energetic_Pisces_Box,Energetic Pisces Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-17037,Trans_Box_Devi,Trans Box Devi,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-17038,Trans_Box_Ray_Arch,Trans Box Ray Arch,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-17039,Trans_Box_Mavka,Trans Box Mavka,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-17040,Trans_Box_Marduk,Trans Box Marduk,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-17041,Trans_Box_Banshee,Trans Box Banshee,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+17037,Trans_Box_Devi,Trans Box Devi,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12658,10; },{},{}
+17038,Trans_Box_Ray_Arch,Trans Box Ray Arch,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12659,10; },{},{}
+17039,Trans_Box_Mavka,Trans Box Mavka,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12660,10; },{},{}
+17040,Trans_Box_Marduk,Trans Box Marduk,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12661,10; },{},{}
+17041,Trans_Box_Banshee,Trans Box Banshee,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12662,10; },{},{}
17042,Trans_Box_Poring,Trans Box Poring,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12663,10; },{},{}
-17043,Trans_Box_Golem,Trans Box Golem,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+17043,Trans_Box_Golem,Trans Box Golem,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12664,10; },{},{}
17050,Aries_Scroll,Aries Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17051,Aries_Scroll_Box,Aries Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
17052,Holy_Mom_Blaze_Box,Holy Mom Blaze Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6472,1; },{},{}
diff --git a/db/sc_config.txt b/db/sc_config.txt
index 2da6f3147..06de0bdf6 100644
--- a/db/sc_config.txt
+++ b/db/sc_config.txt
@@ -3,405 +3,408 @@
// Structure of Database:
// SC_NAME, flag
//
-// flag 0x1 - SC cannot be removed by death.
-// 0x2 - SC cannot be saved.
-// 0x4 - SC cannot be reset by dispell.
-// 0x8 - SC cannot be reset by clearance.
-// 0x10 - SC considered as buff and be removed by Hermode and etc.
-// 0x20 - SC considered as debuff and be removed by Gospel and etc.
-// 0x40 - SC cannot be reset when MADO Gear is taken off.
+// flag 1 - SC cannot be removed by death.
+// 2 - SC cannot be saved.
+// 4 - SC cannot be reset by dispell.
+// 8 - SC cannot be reset by clearance.
+// 16 - SC considered as buff and be removed by Hermode and etc.
+// 32 - SC considered as debuff and be removed by Gospel and etc.
+// 64 - SC cannot be reset when MADO Gear is taken off.
+//Example:
+//SC_ENDURE, 21 //SC_ENDURE: cannot be removed by death and dispell and cosidered as buff. (16 + 4 + 1 = 21)
-SC_PROVOKE, 0x20
-SC_ENDURE, 0x15
-SC_TWOHANDQUICKEN, 0x18
-SC_CONCENTRATION, 0x10
-SC_ENCHANTPOISON, 0x10
-SC_POISONREACT, 0x10
-SC_QUAGMIRE, 0x2A
-SC_ANGELUS, 0x10
-SC_BLESSING, 0x50
-SC_INC_AGI, 0x50
-SC_DEC_AGI, 0x22
-SC_SLOWPOISON, 0x18
-SC_IMPOSITIO, 0x10
-SC_SUFFRAGIUM, 0x10
-SC_ASPERSIO, 0x50
-SC_BENEDICTIO, 0x1A
-SC_KYRIE, 0x10
-SC_MAGNIFICAT, 0x12
-SC_GLORIA, 0x10
-SC_LEXAETERNA, 0x12
-SC_ADRENALINE, 0x10
-SC_WEAPONPERFECT, 0x10
-SC_OVERTHRUST, 0x10
-SC_MAXIMIZEPOWER, 0x10
-SC_TRICKDEAD, 0x1A
-SC_SHOUT, 0x10
-SC_ENERGYCOAT, 0x10
-SC_ATTHASTE_POTION1, 0x18
-SC_ATTHASTE_POTION2, 0x18
-SC_ATTHASTE_POTION3, 0x10
-//SC_MOVHASTE_POTION, 0x1A
-//SC_POSTDELAY, 0x1D
-SC_BARRIER, 0x10
-SC_NOEQUIPWEAPON, 0x1E
-SC_NOEQUIPSHIELD, 0x1E
-SC_NOEQUIPARMOR, 0x1E
-SC_NOEQUIPHELM, 0x1E
-SC_PROTECTWEAPON, 0x1C
-SC_PROTECTSHIELD, 0x1C
-SC_PROTECTARMOR, 0x1C
-SC_PROTECTHELM, 0x1C
-SC_AUTOGUARD, 0x18
-SC_REFLECTSHIELD, 0x18
-SC_DEVOTION, 0x12
-SC_PROVIDENCE, 0x12
-SC_DEFENDER, 0x10
-SC_MAGICROD, 0x1A
-//SC_WEAPONPROPERTY, 0x18
-SC_AUTOSPELL, 0x15
-//SC_SPECIALZONE, 0x1A
-//SC_MASK, 0x1A
-SC_SPEARQUICKEN, 0x10
-SC_BLADESTOP, 0x1A
-SC_EXPLOSIONSPIRITS, 0x1A
-SC_STEELBODY, 0x12
-SC_PROPERTYFIRE, 0x1D
-SC_PROPERTYWATER, 0x1D
-SC_PROPERTYWIND, 0x1D
-SC_PROPERTYGROUND, 0x1D
-SC_STOP, 0x1A
-SC_PROPERTYUNDEAD, 0x1A
-//SC_STATUSONE, 0x1A
-SC_AURABLADE, 0x12
-SC_PARRYING, 0x1A
-SC_LKCONCENTRATION, 0x12
-SC_TENSIONRELAX, 0x1A
-SC_BERSERK, 0x12
-SC_SACRIFICE, 0x1A
-SC_GOSPEL, 0x22
-SC_ASSUMPTIO, 0x10
-SC_BASILICA, 0x1A
-//SC_GROUNDMAGIC, 0x1A //is divided to SC_VOLCANO, 0xSC_DELUGE, 0xSC_VIOLENTGALE
-SC_VOLCANO, 0x1A
-SC_DELUGE, 0x1A
-SC_VIOLENTGALE, 0x1A
-SC_MAGICPOWER, 0x12
-SC_EDP, 0x17
-SC_TRUESIGHT, 0x12
-SC_WINDWALK, 0x12
-SC_MELTDOWN, 0x17
-SC_CARTBOOST, 0x17
-SC_BLOODING, 0x1A
-SC_JOINTBEAT, 0x2A
-SC_MINDBREAKER, 0x12
-SC_MEMORIZE, 0x12
-SC_FOGWALL, 0x1A
-SC_SPIDERWEB, 0x2F
-//SC_SUB_WEAPONPROPERTY, 0x17
-SC_RUN, 0x1A
-SC_STRUP, 0x1A
-SC_PROPERTYDARK, 0x1A
-SC_ADRENALINE2, 0x12
-SC_PROPERTYTELEKINESIS, 0x1A
-SC_SOULLINK, 0x1A
-SC_PLUSATTACKPOWER, 0x58
-SC_PLUSMAGICPOWER, 0x58
-SC_KAITE, 0x1A
-SC_KAAHI, 0x1A
-SC_KAUPE, 0x1A
-SC_ONEHANDQUICKEN, 0x1A
-//SC_GDSKILL_POSTDELAY, 0x1D
-SC_PRESERVE, 0x12
-SC_CHASEWALK2, 0x1A
-//SC_MOVESLOW_POTION, 0x1A
-SC_DOUBLECASTING, 0x1A
-SC_GRAVITATION, 0x1A
-SC_OVERTHRUSTMAX, 0x12
-SC_TAROTCARD, 0x2A
-SC_CR_SHRINK, 0x17
-SC_WZ_SIGHTBLASTER, 0x17
-SC_RG_CCONFINE_M, 0x1F
-SC_RG_CCONFINE_S, 0x1F
-SC_NJ_UTSUSEMI, 0x1A
-SC_NJ_BUNSINJYUTSU, 0x1A
-SC_NJ_SUITON, 0x2F
-//SC_MENTAL, 0x1A
-//SC_EXPMEMORY, 0x1A
-//SC_PERFORMANCE, 0x1A
-//SC_GAIN, 0x1A
-//SC_DRIFT, 0x1A
-//SC_WALLSHIFT, 0x1A
-//SC_REINCARNATION, 0x1A
-//SC_DENERGY, 0x1A
-//SC_DAURA, 0x1A
-//SC_DFREEZER, 0x1A
-//SC_DPUNISH, 0x1A
-//SC_DBARRIER, 0x1A
-//SC_DWARNING, 0x1A
-//SC_MOUSEWHEEL, 0x1E
-//SC_DACCEL, 0x1A
-//SC_DBLOCK, 0x1A
-SC_FOOD_STR, 0x1C
-SC_FOOD_AGI, 0x1C
-SC_FOOD_VIT, 0x1C
-SC_FOOD_DEX, 0x1C
-SC_FOOD_INT, 0x1C
-SC_FOOD_LUK, 0x1C
-SC_FOOD_BASICAVOIDANCE, 0x58
-SC_FOOD_BASICHIT, 0x58
-//SC_FOOD_CRITICALSUCCESSVALUE, 0x18
-SC_CASH_PLUSEXP, 0x1D
-SC_CASH_DEATHPENALTY, 0x1D
-SC_CASH_RECEIVEITEM, 0x1D
-SC_CASH_BOSS_ALARM, 0x1E
-//SC_DA_ENERGY, 0x1A
-//SC_DA_FIRSTSLOT, 0x1A
-//SC_DA_HEADDEF, 0x1A
-//SC_DA_SPACE, 0x1E
-//SC_DA_ITEMREBUILD, 0x1E
-//SC_DA_ILLUSION, 0x1A
-//SC_DA_EARPLUG, 0x1E
-//SC_DA_CONTRACT, 0x1D
-//SC_DA_BLACK, 0x1E
-//SC_DA_MAGICCART, 0x1A
-//SC_CRYSTAL, 0x1E
-//SC_DA_REBUILD, 0x1D
-//SC_DA_EDARKNESS, 0x1A
-//SC_DA_EGUARDIAN, 0x1A
-//SC_DA_TIMEOUT, 0x1A
-SC_FOOD_STR_CASH, 0x1D
-SC_FOOD_AGI_CASH, 0x1D
-SC_FOOD_VIT_CASH, 0x1D
-SC_FOOD_DEX_CASH, 0x1D
-SC_FOOD_INT_CASH, 0x1D
-SC_FOOD_LUK_CASH, 0x1D
-SC_MER_FLEE, 0x1C
-SC_MER_ATK, 0x1C
-SC_MER_HP, 0x1C
-SC_MER_SP, 0x1C
-SC_MER_HIT, 0x1C
-SC_SLOWCAST, 0x1F
-SC_CRITICALWOUND, 0x17
-SC_MOVHASTE_HORSE, 0x1F
-SC_PROTECT_DEF, 0x1C
-SC_PROTECT_MDEF, 0x1C
-SC_HEALPLUS, 0x5C
-SC_S_LIFEPOTION, 0x5C
-SC_L_LIFEPOTION, 0x5C
-SC_CRITICALPERCENT, 0x5C
-SC_PLUSAVOIDVALUE, 0x5C
-//SC_ATKER_ASPD, 0x1C
-//SC_TARGET_ASPD, 0x5C
-//SC_ATKER_MOVESPEED, 0x1C
-SC_ATKER_BLOOD, 0x1C
-SC_TARGET_BLOOD, 0x1E
-SC_ARMOR_PROPERTY, 0x1D
-//SC_REUSE_LIMIT_A, 0x1D
-SC_HELLPOWER, 0x1D
-//SC_STEAMPACK, 0x5C
-//SC_REUSE_LIMIT_B, 0x1D
-//SC_REUSE_LIMIT_C, 0x1D
-//SC_REUSE_LIMIT_D, 0x1D
-//SC_REUSE_LIMIT_E, 0x1D
-//SC_REUSE_LIMIT_F, 0x1D
-SC_CASH_PLUSONLYJOBEXP, 0x1D
-SC_PARTYFLEE, 0x18
-//SC_ANGEL_PROTECT, 0x18
-//SC_ENDURE_MDEF, 0x15
-SC_ENCHANTBLADE, 0x10
-SC_DEATHBOUND, 0x1E
-SC_REFRESH, 0x16
-SC_GIANTGROWTH, 0x14
-SC_STONEHARDSKIN, 0x17
-SC_VITALITYACTIVATION, 0x14
-SC_FIGHTINGSPIRIT, 0x14
-SC_ABUNDANCE, 0x14
-//SC_REUSE_MILLENNIUMSHIELD, 0x1D
-//SC_REUSE_CRUSHSTRIKE, 0x1D
-//SC_REUSE_REFRESH, 0x1D
-//SC_REUSE_STORMBLAST, 0x1D
-SC_EPICLESIS, 0x1D
-SC_ORATIO, 0x14
-SC_LAUDAAGNUS, 0x14
-SC_LAUDARAMUS, 0x14
-SC_CLOAKINGEXCEED, 0x1E
-SC_HALLUCINATIONWALK, 0x1C
-SC_HALLUCINATIONWALK_POSTDELAY, 0x1F
-SC_RENOVATIO, 0x14
-SC_WEAPONBLOCKING, 0x1C
-//SC_WEAPONBLOCKING_POSTDELAY, 0x1F
-SC_ROLLINGCUTTER, 0x1E
-SC_EXPIATIO, 0x14
-SC_POISONINGWEAPON, 0x1C
-SC_TOXIN, 0x14
-SC_PARALYSE, 0x14
-SC_VENOMBLEED, 0x14
-SC_MAGICMUSHROOM, 0x14
-SC_DEATHHURT, 0x14
-SC_PYREXIA, 0x14
-SC_OBLIVIONCURSE, 0x14
-SC_LEECHESEND, 0x14
-SC_DUPLELIGHT, 0x14
-SC_FEARBREEZE, 0x1C
-SC_ELECTRICSHOCKER, 0x1E
-SC_MARSHOFABYSS, 0x14
-SC_RECOGNIZEDSPELL, 0x14
-//SC_WUGRIDER, 0x1D
-SC_WUGDASH, 0x1E
-SC_WUGBITE, 0x1E
-SC_CAMOUFLAGE, 0x1E
-SC_ACCELERATION, 0x1C
-SC_HOVERING, 0x1C
-SC_SUMMON1, 0x18
-SC_SUMMON2, 0x18
-SC_SUMMON3, 0x18
-SC_SUMMON4, 0x18
-SC_SUMMON5, 0x18
-//SC_MVPCARD_TAOGUNKA, 0x1C
-//SC_MVPCARD_MISTRESS, 0x1C
-//SC_MVPCARD_ORCHERO, 0x1C
-//SC_MVPCARD_ORCLORD, 0x1C
-SC_OVERHEAT_LIMITPOINT, 0x1C
-SC_OVERHEAT, 0x1C
-SC_SHAPESHIFT, 0x1C
-SC_INFRAREDSCAN, 0x1C
-SC_MAGNETICFIELD, 0x1E
-SC_NEUTRALBARRIER, 0x1E
-SC_NEUTRALBARRIER_MASTER, 0x1E
-SC_STEALTHFIELD_MASTER, 0x1E
-SC_MANU_ATK, 0x1C
-SC_MANU_DEF, 0x1C
-SC_SPL_ATK, 0x1C
-SC_SPL_DEF, 0x1C
-SC__REPRODUCE, 0x1C
-SC_MANU_MATK, 0x1C
-SC_SPL_MATK, 0x1C
-//SC_STR_SCROLL, 0x1D
-//SC_INT_SCROLL, 0x1D
-SC_FORCEOFVANGUARD, 0x1C
-//SC_BUCHEDENOEL, 0x1C
-SC__AUTOSHADOWSPELL, 0x10
-SC__SHADOWFORM, 0x1E
-SC_RAID, 0x1C
-SC_SHIELDSPELL_DEF, 0x10
-SC_SHIELDSPELL_MDEF, 0x10
-SC_SHIELDSPELL_REF, 0x10
-SC__BODYPAINT, 0x14
-SC_EXEEDBREAK, 0x1C
-SC_ADORAMUS, 0x10
-SC_PRESTIGE, 0x10
-SC__INVISIBILITY, 0x1E
-SC__DEADLYINFECT, 0x14
-SC_BANDING, 0x1C
-SC_BANDING_DEFENCE, 0x1C
-SC_EARTHDRIVE, 0x14
-SC_INSPIRATION, 0x1C
-SC__ENERVATION, 0x10
-SC__GROOMY, 0x10
-SC_RAISINGDRAGON, 0x1E
-SC__IGNORANCE, 0x10
-SC__LAZINESS, 0x10
-SC_LIGHTNINGWALK, 0x1C
-//SC_ACARAJE, 0x18
-SC__UNLUCKY, 0x10
-SC_CURSEDCIRCLE_ATKER, 0x1C
-SC_CURSEDCIRCLE_TARGET, 0x1C
-SC__WEAKNESS, 0x10
-SC_CRESCENTELBOW, 0x1C
-//SC_NOEQUIPACCESSARY, 0x1E
-SC__STRIPACCESSARY, 0x1C
-SC__MANHOLE, 0x5E
-//SC_POPECOOKIE, 0x1C
-SC__BLOODYLUST, 0x20
-SC_SWING, 0x1C
-SC_SYMPHONY_LOVE, 0x1C
-SC_PROPERTYWALK, 0x12
-SC_SPELLFIST, 0x10
-SC_NETHERWORLD, 0x10
-SC_SIREN, 0x10
-SC_DEEP_SLEEP, 0x22
-SC_SIRCLEOFNATURE, 0x10
-SC_GLOOMYDAY, 0x10
-SC_GLOOMYDAY_SK, 0x10
-SC_SONG_OF_MANA, 0x10
-SC_DANCE_WITH_WUG, 0x10
-SC_RUSH_WINDMILL, 0x1C
-SC_ECHOSONG, 0x1C
-SC_HARMONIZE, 0x10
-SC_MOONLIT_SERENADE, 0x1C
-SC_SATURDAY_NIGHT_FEVER, 0x10
-SC_SITDOWN_FORCE, 0x1C
-SC_ANALYZE, 0x1C
-SC_LERADS_DEW, 0x1C
-SC_MELODYOFSINK, 0x1C
-SC_BEYOND_OF_WARCRY, 0x1C
-SC_UNLIMITED_HUMMING_VOICE, 0x1C
-SC_WARMER, 0x2
-SC_VENOMIMPRESS, 0x4
-SC_FROSTMISTY, 0x20
-//SC_ASSUMPTIO2, 0x10
-//SC_GN_TRAINING_SWORD, 0x1F
-//SC_GN_REMODELING_CART, 0x1F
-SC_STOMACHACHE, 0x20
-SC_MYSTERIOUS_POWDER, 0x20
-//SC_ELEMENTAL_AGGRESSIVE, 0x2
-//SC_ELEMENTAL_WAIT, 0x2
-//SC_ELEMENTAL_PASSIVE, 0x2
-//SC_ELEMENTAL_DEFENSIVE, 0x2
-SC_WATER_BARRIER, 0x2
-SC_ZEPHYR, 0x2
-SC_POWER_OF_GAIA, 0x2
-SC_FIRE_INSIGNIA, 0x2
-SC_WATER_INSIGNIA, 0x2
-SC_WIND_INSIGNIA, 0x2
-SC_EARTH_INSIGNIA, 0x2
-//SC_MORA_BUFF, 0x2
-//SC_REUSE_LIMIT_G, 0x1D
-//SC_REUSE_LIMIT_H, 0x1D
-SC_NEEDLE_OF_PARALYZE, 0x1
-SC_PAIN_KILLER, 0x1
-//SC_G_LIFEPOTION, 0x44
-//SC_VITALIZE_POTION, 0x4
-SC_LIGHT_OF_REGENE, 0x1
-//SC_SONIC_CLAW_POSTDELAY, 0x2
-//SC_SILVERVEIN_RUSH_POSTDELAY, 0x2
-//SC_MIDNIGHT_FRENZY_POSTDELAY, 0x2
-//SC_TINDER_BREAKER, 0x2
-//SC_TINDER_BREAKER_POSTDELAY, 0x2
-//SC_CBC, 0x2
-//SC_CBC_POSTDELAY, 0x2
-//SC_EQC, 0x2
-//SC_MAGIC_CANDY, 0x5C
-//SC_ALL_RIDING_REUSE_LIMIT, 0x1
-//SC_HANDICAPSTATE_DEEP_SLEEP, 0x50
+SC_PROVOKE, 32
+SC_ENDURE, 21
+SC_TWOHANDQUICKEN, 24
+SC_CONCENTRATION, 16
+SC_ENCHANTPOISON, 16
+SC_POISONREACT, 16
+SC_QUAGMIRE, 42
+SC_ANGELUS, 16
+SC_BLESSING, 80
+SC_INC_AGI, 80
+SC_DEC_AGI, 34
+SC_SLOWPOISON, 24
+SC_IMPOSITIO, 16
+SC_SUFFRAGIUM, 16
+SC_ASPERSIO, 80
+SC_BENEDICTIO, 26
+SC_KYRIE, 16
+SC_MAGNIFICAT, 18
+SC_GLORIA, 16
+SC_LEXAETERNA, 18
+SC_ADRENALINE, 16
+SC_WEAPONPERFECT, 16
+SC_OVERTHRUST, 16
+SC_MAXIMIZEPOWER, 16
+SC_TRICKDEAD, 26
+SC_SHOUT, 16
+SC_ENERGYCOAT, 16
+SC_ATTHASTE_POTION1, 24
+SC_ATTHASTE_POTION2, 24
+SC_ATTHASTE_POTION3, 16
+//SC_MOVHASTE_POTION, 26
+//SC_POSTDELAY, 29
+SC_BARRIER, 16
+SC_NOEQUIPWEAPON, 30
+SC_NOEQUIPSHIELD, 30
+SC_NOEQUIPARMOR, 30
+SC_NOEQUIPHELM, 30
+SC_PROTECTWEAPON, 28
+SC_PROTECTSHIELD, 28
+SC_PROTECTARMOR, 28
+SC_PROTECTHELM, 28
+SC_AUTOGUARD, 24
+SC_REFLECTSHIELD, 24
+SC_DEVOTION, 18
+SC_PROVIDENCE, 18
+SC_DEFENDER, 16
+SC_MAGICROD, 26
+//SC_WEAPONPROPERTY, 24
+SC_AUTOSPELL, 21
+//SC_SPECIALZONE, 26
+//SC_MASK, 26
+SC_SPEARQUICKEN, 16
+SC_BLADESTOP, 26
+SC_EXPLOSIONSPIRITS, 26
+SC_STEELBODY, 18
+SC_PROPERTYFIRE, 29
+SC_PROPERTYWATER, 29
+SC_PROPERTYWIND, 29
+SC_PROPERTYGROUND, 29
+SC_STOP, 26
+SC_PROPERTYUNDEAD, 26
+//SC_STATUSONE, 26
+SC_AURABLADE, 18
+SC_PARRYING, 26
+SC_LKCONCENTRATION, 18
+SC_TENSIONRELAX, 26
+SC_BERSERK, 18
+SC_SACRIFICE, 26
+SC_GOSPEL, 34
+SC_ASSUMPTIO, 16
+SC_BASILICA, 26
+//SC_GROUNDMAGIC, 26 //is divided to SC_VOLCANO, 0xSC_DELUGE, 0xSC_VIOLENTGALE
+SC_VOLCANO, 26
+SC_DELUGE, 26
+SC_VIOLENTGALE, 26
+SC_MAGICPOWER, 18
+SC_EDP, 23
+SC_TRUESIGHT, 18
+SC_WINDWALK, 18
+SC_MELTDOWN, 23
+SC_CARTBOOST, 23
+SC_BLOODING, 26
+SC_JOINTBEAT, 42
+SC_MINDBREAKER, 18
+SC_MEMORIZE, 18
+SC_FOGWALL, 26
+SC_SPIDERWEB, 47
+//SC_SUB_WEAPONPROPERTY, 23
+SC_RUN, 26
+SC_STRUP, 26
+SC_PROPERTYDARK, 26
+SC_ADRENALINE2, 18
+SC_PROPERTYTELEKINESIS, 26
+SC_SOULLINK, 26
+SC_PLUSATTACKPOWER, 88
+SC_PLUSMAGICPOWER, 88
+SC_KAITE, 26
+SC_KAAHI, 26
+SC_KAUPE, 26
+SC_ONEHANDQUICKEN, 26
+//SC_GDSKILL_POSTDELAY, 29
+SC_PRESERVE, 18
+SC_CHASEWALK2, 26
+//SC_MOVESLOW_POTION, 26
+SC_DOUBLECASTING, 26
+SC_GRAVITATION, 26
+SC_OVERTHRUSTMAX, 18
+SC_TAROTCARD, 42
+SC_CR_SHRINK, 23
+SC_WZ_SIGHTBLASTER, 23
+SC_RG_CCONFINE_M, 31
+SC_RG_CCONFINE_S, 31
+SC_NJ_UTSUSEMI, 26
+SC_NJ_BUNSINJYUTSU, 26
+SC_NJ_SUITON, 47
+//SC_MENTAL, 26
+//SC_EXPMEMORY, 26
+//SC_PERFORMANCE, 26
+//SC_GAIN, 26
+//SC_DRIFT, 26
+//SC_WALLSHIFT, 26
+//SC_REINCARNATION, 26
+//SC_DENERGY, 26
+//SC_DAURA, 26
+//SC_DFREEZER, 26
+//SC_DPUNISH, 26
+//SC_DBARRIER, 26
+//SC_DWARNING, 26
+//SC_MOUSEWHEEL, 30
+//SC_DACCEL, 26
+//SC_DBLOCK, 26
+SC_FOOD_STR, 28
+SC_FOOD_AGI, 28
+SC_FOOD_VIT, 28
+SC_FOOD_DEX, 28
+SC_FOOD_INT, 28
+SC_FOOD_LUK, 28
+SC_FOOD_BASICAVOIDANCE, 88
+SC_FOOD_BASICHIT, 88
+//SC_FOOD_CRITICALSUCCESSVALUE, 24
+SC_CASH_PLUSEXP, 29
+SC_CASH_DEATHPENALTY, 29
+SC_CASH_RECEIVEITEM, 29
+SC_CASH_BOSS_ALARM, 30
+//SC_DA_ENERGY, 26
+//SC_DA_FIRSTSLOT, 26
+//SC_DA_HEADDEF, 26
+//SC_DA_SPACE, 30
+//SC_DA_ITEMREBUILD, 30
+//SC_DA_ILLUSION, 26
+//SC_DA_EARPLUG, 30
+//SC_DA_CONTRACT, 29
+//SC_DA_BLACK, 30
+//SC_DA_MAGICCART, 26
+//SC_CRYSTAL, 30
+//SC_DA_REBUILD, 29
+//SC_DA_EDARKNESS, 26
+//SC_DA_EGUARDIAN, 26
+//SC_DA_TIMEOUT, 26
+SC_FOOD_STR_CASH, 29
+SC_FOOD_AGI_CASH, 29
+SC_FOOD_VIT_CASH, 29
+SC_FOOD_DEX_CASH, 29
+SC_FOOD_INT_CASH, 29
+SC_FOOD_LUK_CASH, 29
+SC_MER_FLEE, 28
+SC_MER_ATK, 28
+SC_MER_HP, 28
+SC_MER_SP, 28
+SC_MER_HIT, 28
+SC_SLOWCAST, 31
+SC_CRITICALWOUND, 23
+SC_MOVHASTE_HORSE, 31
+SC_PROTECT_DEF, 28
+SC_PROTECT_MDEF, 28
+SC_HEALPLUS, 92
+SC_S_LIFEPOTION, 92
+SC_L_LIFEPOTION, 92
+SC_CRITICALPERCENT, 92
+SC_PLUSAVOIDVALUE, 92
+//SC_ATKER_ASPD, 28
+//SC_TARGET_ASPD, 92
+//SC_ATKER_MOVESPEED, 28
+SC_ATKER_BLOOD, 28
+SC_TARGET_BLOOD, 30
+SC_ARMOR_PROPERTY, 29
+//SC_REUSE_LIMIT_A, 29
+SC_HELLPOWER, 29
+//SC_STEAMPACK, 92
+//SC_REUSE_LIMIT_B, 29
+//SC_REUSE_LIMIT_C, 29
+//SC_REUSE_LIMIT_D, 29
+//SC_REUSE_LIMIT_E, 29
+//SC_REUSE_LIMIT_F, 29
+SC_CASH_PLUSONLYJOBEXP, 29
+SC_PARTYFLEE, 24
+//SC_ANGEL_PROTECT, 24
+//SC_ENDURE_MDEF, 21
+SC_ENCHANTBLADE, 16
+SC_DEATHBOUND, 30
+SC_REFRESH, 22
+SC_GIANTGROWTH, 20
+SC_STONEHARDSKIN, 23
+SC_VITALITYACTIVATION, 20
+SC_FIGHTINGSPIRIT, 20
+SC_ABUNDANCE, 20
+//SC_REUSE_MILLENNIUMSHIELD, 29
+//SC_REUSE_CRUSHSTRIKE, 29
+//SC_REUSE_REFRESH, 29
+//SC_REUSE_STORMBLAST, 29
+SC_EPICLESIS, 29
+SC_ORATIO, 20
+SC_LAUDAAGNUS, 20
+SC_LAUDARAMUS, 20
+SC_CLOAKINGEXCEED, 30
+SC_HALLUCINATIONWALK, 28
+SC_HALLUCINATIONWALK_POSTDELAY, 31
+SC_RENOVATIO, 20
+SC_WEAPONBLOCKING, 28
+//SC_WEAPONBLOCKING_POSTDELAY, 31
+SC_ROLLINGCUTTER, 30
+SC_EXPIATIO, 20
+SC_POISONINGWEAPON, 28
+SC_TOXIN, 20
+SC_PARALYSE, 20
+SC_VENOMBLEED, 20
+SC_MAGICMUSHROOM, 20
+SC_DEATHHURT, 20
+SC_PYREXIA, 20
+SC_OBLIVIONCURSE, 20
+SC_LEECHESEND, 20
+SC_DUPLELIGHT, 20
+SC_FEARBREEZE, 28
+SC_ELECTRICSHOCKER, 30
+SC_MARSHOFABYSS, 20
+SC_RECOGNIZEDSPELL, 20
+//SC_WUGRIDER, 29
+SC_WUGDASH, 30
+SC_WUGBITE, 30
+SC_CAMOUFLAGE, 30
+SC_ACCELERATION, 28
+SC_HOVERING, 28
+SC_SUMMON1, 24
+SC_SUMMON2, 24
+SC_SUMMON3, 24
+SC_SUMMON4, 24
+SC_SUMMON5, 24
+//SC_MVPCARD_TAOGUNKA, 28
+//SC_MVPCARD_MISTRESS, 28
+//SC_MVPCARD_ORCHERO, 28
+//SC_MVPCARD_ORCLORD, 28
+SC_OVERHEAT_LIMITPOINT, 28
+SC_OVERHEAT, 28
+SC_SHAPESHIFT, 28
+SC_INFRAREDSCAN, 28
+SC_MAGNETICFIELD, 30
+SC_NEUTRALBARRIER, 30
+SC_NEUTRALBARRIER_MASTER, 30
+SC_STEALTHFIELD_MASTER, 30
+SC_MANU_ATK, 28
+SC_MANU_DEF, 28
+SC_SPL_ATK, 28
+SC_SPL_DEF, 28
+SC__REPRODUCE, 28
+SC_MANU_MATK, 28
+SC_SPL_MATK, 28
+//SC_STR_SCROLL, 29
+//SC_INT_SCROLL, 29
+SC_FORCEOFVANGUARD, 28
+//SC_BUCHEDENOEL, 28
+SC__AUTOSHADOWSPELL, 16
+SC__SHADOWFORM, 30
+SC_RAID, 28
+SC_SHIELDSPELL_DEF, 16
+SC_SHIELDSPELL_MDEF, 16
+SC_SHIELDSPELL_REF, 16
+SC__BODYPAINT, 20
+SC_EXEEDBREAK, 28
+SC_ADORAMUS, 16
+SC_PRESTIGE, 16
+SC__INVISIBILITY, 30
+SC__DEADLYINFECT, 20
+SC_BANDING, 28
+SC_BANDING_DEFENCE, 28
+SC_EARTHDRIVE, 20
+SC_INSPIRATION, 28
+SC__ENERVATION, 16
+SC__GROOMY, 16
+SC_RAISINGDRAGON, 30
+SC__IGNORANCE, 16
+SC__LAZINESS, 16
+SC_LIGHTNINGWALK, 28
+//SC_ACARAJE, 24
+SC__UNLUCKY, 16
+SC_CURSEDCIRCLE_ATKER, 28
+SC_CURSEDCIRCLE_TARGET, 28
+SC__WEAKNESS, 16
+SC_CRESCENTELBOW, 28
+//SC_NOEQUIPACCESSARY, 30
+SC__STRIPACCESSARY, 28
+SC__MANHOLE, 94
+//SC_POPECOOKIE, 28
+SC__BLOODYLUST, 32
+SC_SWING, 28
+SC_SYMPHONY_LOVE, 28
+SC_PROPERTYWALK, 18
+SC_SPELLFIST, 16
+SC_NETHERWORLD, 16
+SC_SIREN, 16
+SC_DEEP_SLEEP, 34
+SC_SIRCLEOFNATURE, 16
+SC_GLOOMYDAY, 16
+SC_GLOOMYDAY_SK, 16
+SC_SONG_OF_MANA, 16
+SC_DANCE_WITH_WUG, 16
+SC_RUSH_WINDMILL, 28
+SC_ECHOSONG, 28
+SC_HARMONIZE, 16
+SC_MOONLIT_SERENADE, 28
+SC_SATURDAY_NIGHT_FEVER, 16
+SC_SITDOWN_FORCE, 28
+SC_ANALYZE, 28
+SC_LERADS_DEW, 28
+SC_MELODYOFSINK, 28
+SC_BEYOND_OF_WARCRY, 28
+SC_UNLIMITED_HUMMING_VOICE, 28
+SC_WARMER, 2
+SC_VENOMIMPRESS, 4
+SC_FROSTMISTY, 32
+//SC_ASSUMPTIO2, 16
+//SC_GN_TRAINING_SWORD, 31
+//SC_GN_REMODELING_CART, 31
+SC_STOMACHACHE, 32
+SC_MYSTERIOUS_POWDER, 32
+//SC_ELEMENTAL_AGGRESSIVE, 2
+//SC_ELEMENTAL_WAIT, 2
+//SC_ELEMENTAL_PASSIVE, 2
+//SC_ELEMENTAL_DEFENSIVE, 2
+SC_WATER_BARRIER, 2
+SC_ZEPHYR, 2
+SC_POWER_OF_GAIA, 2
+SC_FIRE_INSIGNIA, 2
+SC_WATER_INSIGNIA, 2
+SC_WIND_INSIGNIA, 2
+SC_EARTH_INSIGNIA, 2
+//SC_MORA_BUFF, 2
+//SC_REUSE_LIMIT_G, 29
+//SC_REUSE_LIMIT_H, 29
+SC_NEEDLE_OF_PARALYZE, 1
+SC_PAIN_KILLER, 1
+//SC_G_LIFEPOTION, 68
+//SC_VITALIZE_POTION, 4
+SC_LIGHT_OF_REGENE, 1
+//SC_SONIC_CLAW_POSTDELAY, 2
+//SC_SILVERVEIN_RUSH_POSTDELAY, 2
+//SC_MIDNIGHT_FRENZY_POSTDELAY, 2
+//SC_TINDER_BREAKER, 2
+//SC_TINDER_BREAKER_POSTDELAY, 2
+//SC_CBC, 2
+//SC_CBC_POSTDELAY, 2
+//SC_EQC, 2
+//SC_MAGIC_CANDY, 92
+//SC_ALL_RIDING_REUSE_LIMIT, 1
+//SC_HANDICAPSTATE_DEEP_SLEEP, 80
+SC_MONSTER_TRANSFORM, 12
-SC_FULL_THROTTLE, 0x12
-SC_REBOUND, 0x12
-SC_TELEKINESIS_INTENSE, 0x12
+SC_FULL_THROTTLE, 18
+SC_REBOUND, 18
+SC_TELEKINESIS_INTENSE,18
// Unremovable
-SC_WEIGHTOVER50, 0x4F
-SC_WEIGHTOVER90, 0x4F
-SC_XMAS, 0x4D
-SC_SUMMER, 0x4D
-SC_NOCHAT, 0x4D
-SC_FUSION, 0x4D
-SC_EARTHSCROLL, 0x4D
-SC_STORMKICK_READY, 0x4D
-SC_DOWNKICK_READY, 0x4D
-SC_COUNTERKICK_READY, 0x4D
-SC_TURNKICK_READY, 0x4D
-SC_DODGE_READY, 0x4D
-SC_JAILED, 0x4D
-SC_AUTOTRADE, 0x4D
-SC_WHISTLE, 0x4F
-SC_ASSNCROS, 0x4F
-SC_POEMBRAGI, 0x4F
-SC_APPLEIDUN, 0x4F
-SC_HUMMING, 0x4F
-SC_DONTFORGETME, 0x4F
-SC_FORTUNE, 0x4F
-SC_SERVICEFORYOU, 0x4F
-SC_INCHIT, 0x4D
-SC_PUSH_CART, 0x4D \ No newline at end of file
+SC_WEIGHTOVER50, 79
+SC_WEIGHTOVER90, 79
+SC_XMAS, 77
+SC_SUMMER, 77
+SC_NOCHAT, 77
+SC_FUSION, 77
+SC_EARTHSCROLL, 77
+SC_STORMKICK_READY, 77
+SC_DOWNKICK_READY, 77
+SC_COUNTERKICK_READY, 77
+SC_TURNKICK_READY, 77
+SC_DODGE_READY, 77
+SC_JAILED, 77
+SC_AUTOTRADE, 77
+SC_WHISTLE, 79
+SC_ASSNCROS, 79
+SC_POEMBRAGI, 79
+SC_APPLEIDUN, 79
+SC_HUMMING, 79
+SC_DONTFORGETME, 79
+SC_FORTUNE, 79
+SC_SERVICEFORYOU, 79
+SC_INCHIT, 77
+SC_PUSH_CART, 0x4D
diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt
index fce54b24e..ada0cf8ec 100644
--- a/doc/item_bonus.txt
+++ b/doc/item_bonus.txt
@@ -386,8 +386,8 @@ bonus2 bWeaponAtk,x,n; Adds n ATK when weapon of type x is equipped.
bonus2 bWeaponAtkRate,x,n; Adds n% damage to normal attacks when weapon of type x is equipped.
x: see doc/item_db.txt -> view -> weapons for possible values
bonus bDelayrate,n; Increases skill delay by n%.
-bonus3 bHPDrainRateRace,r,n,x; Adds a n/10% chance to receive x% of dealed damage as HP from a monster of race r with normal attack.
-bonus3 bSPDrainRateRace,r,n,x; Adds a n/10% chance to receive x% of dealed damage as SP from a monster of race r with normal attack.
+bonus3 bHPDrainRateRace,r,n,x; Adds a n/10% chance to receive x% of damage dealt as HP from a monster of race r with normal attack.
+bonus3 bSPDrainRateRace,r,n,x; Adds a n/10% chance to receive x% of damage dealt as SP from a monster of race r with normal attack.
bonus3 bAddEffOnSkill,s,x,n; Adds a n/100% chance to cause status change x on enemy when using skill s (supports skill names)
bonus4 bAddEffOnSkill,s,x,n,t; Adds a n/100% chance to cause status change x when using skill s (supports skill names)
t: ATF_SELF = causes status change to oneself
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 0441d385a..f6de42316 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -67,8 +67,7 @@ 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'
-(Please, don't use .gat suffix anymore. It's useless.)
+Wherever you refer to a map, use 'mapname' instead of 'mapname.gat'.
Script loading structure
@@ -780,7 +779,7 @@ Logical bitwise operators work only on numbers, and they are the following:
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
@@ -1793,93 +1792,93 @@ 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!";
+ if (strcharinfo(0)=="Daniel Jackson") mes "It is true, you are Daniel!";
More examples of using the 'if' command in the real world:
Example 1:
- set @var1,1;
- input @var2;
- if(@var1==@var2) goto L_Same;
- mes "Sorry that is wrong";
- close;
- L_Same:
- close;
+ set @var1,1;
+ input @var2;
+ if(@var1==@var2) goto L_Same;
+ mes "Sorry that is wrong";
+ close;
+ L_Same:
+ close;
Example 2:
-
- set @var1,1;
- input @var2;
- if(@var1!=@var2) mes "Sorry that is wrong";
- close;
+
+ set @var1,1;
+ input @var2;
+ if(@var1!=@var2) mes "Sorry that is wrong";
+ close;
(Notice examples 1 and 2 have the same effect.)
Example 3:
- set @var1,@var1+1;
- mes "[Forgetfull Man]";
- if (@var==1) mes "This is the first time you have talked to me";
- if (@var==2) mes "This is the second time you have talked to me";
- if (@var==3) mes "This is the third time you have talked to me";
- if (@var==4) mes "This is the forth time you have talked to me, but I think I am getting amnesia, I have forgotten about you";
- if (@var==4) set @var,0;
- close;
+ set @var1,@var1+1;
+ mes "[Forgetfull Man]";
+ if (@var==1) mes "This is the first time you have talked to me";
+ if (@var==2) mes "This is the second time you have talked to me";
+ if (@var==3) mes "This is the third time you have talked to me";
+ if (@var==4) mes "This is the forth time you have talked to me, but I think I am getting amnesia, I have forgotten about you";
+ if (@var==4) set @var,0;
+ close;
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.
- mes "Can you please bring me an apple?";
- close;
- L_GiveApple:
- mes "Oh an apple, I didn't want it, I just wanted to see one";
- close;
+ 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.
+ mes "Can you please bring me an apple?";
+ close;
+ L_GiveApple:
+ mes "Oh an apple, I didn't want it, I just wanted to see one";
+ close;
Example 5:
- mes "[Person Checker]";
- if($name$!=null) goto L_Check;
- mes "Please tell me someones name";
- next;
- input $name$;
- set $name2$,strcharinfo(0);
- mes "[Person Checker]";
- mes "Thank you";
- L_Check:
- if($name$==strcharinfo(0) ) goto L_SameName;
- mes "[Person Checker]";
- mes "You are not the person that " +$name2$+ " mentioned";
- L_End:
- set $name$,null;
- set $name2$,null;
- close;
- L_SameName:
- mes "[Person Checker]";
- mes "You are the person that " +$name2$+ " just mentioned";
- mes "nice to meet you";
- goto L_End;
+ mes "[Person Checker]";
+ if($name$!=null) goto L_Check;
+ mes "Please tell me someones name";
+ next;
+ input $name$;
+ set $name2$,strcharinfo(0);
+ mes "[Person Checker]";
+ mes "Thank you";
+ L_Check:
+ if($name$==strcharinfo(0) ) goto L_SameName;
+ mes "[Person Checker]";
+ mes "You are not the person that " +$name2$+ " mentioned";
+ L_End:
+ set $name$,null;
+ set $name2$,null;
+ close;
+ L_SameName:
+ mes "[Person Checker]";
+ mes "You are the person that " +$name2$+ " just mentioned";
+ mes "nice to meet you";
+ goto L_End;
See 'strcharinfo' for explanation of what this function does.
Example 6: Using complex conditions.
- mes "[Multi Checker]";
- if( (@queststarted==1) && (countitem(512)>=5) ) goto L_MultiCheck;
- // Only if the quest has been started AND You have 5 apples will it goto "L_MultiCheck"
- mes "Please get me 5 apples";
- set @queststarted,1;
- close;
- L_MultiCheck:
- mes "[Multi Checker]";
- mes "Well done you have started the quest of got me 5 apples";
- mes "Thank you";
- set @queststarted,0;
- delitem 512,5;
- close;
+ mes "[Multi Checker]";
+ if( (@queststarted==1) && (countitem(512)>=5) ) goto L_MultiCheck;
+ // Only if the quest has been started AND You have 5 apples will it goto "L_MultiCheck"
+ mes "Please get me 5 apples";
+ set @queststarted,1;
+ close;
+ L_MultiCheck:
+ mes "[Multi Checker]";
+ mes "Well done you have started the quest of got me 5 apples";
+ mes "Thank you";
+ set @queststarted,0;
+ delitem 512,5;
+ close;
With the Advanced scripting engine, we got nested if's. That is:
@@ -2042,7 +2041,7 @@ Example:
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.)
+ // etc.)
}
freeloop(0); // disable
@@ -2059,14 +2058,14 @@ Example:
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;
+ setarray @array[0], 100, 200, 300, 400, 500, 600;
First value is the index of the first element of the array to alter. For
example:
- setarray @array[0],200,200,200;
- setarray @array[1],300,150;
-
+ setarray @array[0],200,200,200;
+ setarray @array[1],300,150;
+
will produce:
@array[0]=200
@@ -2080,13 +2079,13 @@ will produce:
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
- cleararray @array[0],0,6;
- // This will make array element 0 change to 245
- cleararray @array[0],245,1;
- // This will make elements 1 and 2 change to 345
- cleararray @array[1],345,2;
+ setarray @array[0], 100, 200, 300, 400, 500, 600;
+ // This will make all 6 values 0
+ cleararray @array[0],0,6;
+ // This will make array element 0 change to 245
+ cleararray @array[0],245,1;
+ // This will make elements 1 and 2 change to 345
+ cleararray @array[1],345,2;
See 'setarray'.
@@ -2097,12 +2096,12 @@ See 'setarray'.
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[]
- copyarray @array2[0],@array[2],2;
-
- // Now, @array2[0] will be equal to @array[2] (300) and
- // @array2[1] will be equal to @array[3].
+ setarray @array[0], 100, 200, 300, 400, 500, 600;
+ // So we have made @array[]
+ copyarray @array2[0],@array[2],2;
+
+ // Now, @array2[0] will be equal to @array[2] (300) and
+ // @array2[1] will be equal to @array[3].
So using the examples above:
@array[0] = 100
@@ -2128,14 +2127,13 @@ and it will return a 0.
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.
- 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 will delete array element 0, and move all the other array
+ // elements up one place.
+ deletearray @array[0],1
- deletearray @array[1],3
+ // 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
---------------------------------------
@@ -2180,14 +2178,14 @@ array are not counted towards this number.
For example:
- setarray @array[0], 100, 200, 300, 400, 500, 600;
- set @arraysize,getarraysize(@array);
+ setarray @array[0], 100, 200, 300, 400, 500, 600;
+ set @arraysize,getarraysize(@array);
This will make @arraysize == 6. But if you try this:
- setarray @array[0], 100, 200, 300, 400, 500, 600, 0;
- set @arraysize,getarraysize(@array);
-
+ setarray @array[0], 100, 200, 300, 400, 500, 600, 0;
+ set @arraysize,getarraysize(@array);
+
@arraysize will still equal 6, even though you've set 7 values.
---------------------------------------
@@ -2197,15 +2195,15 @@ This will make @arraysize == 6. But if you try this:
This command retrieves the value of the element of given array at given
index. This is equivalent to using:
- <array name>[<index>]
+ <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.
Also useful when passing arrays to functions or accessing another npc's
arrays:
- getelementofarray(getarg(0),<index>)
- getelementofarray(getvariableofnpc(.var, "testNPC"),<index>)
+ getelementofarray(getarg(0),<index>)
+ getelementofarray(getvariableofnpc(.var, "testNPC"),<index>)
---------------------------------------
@@ -2226,20 +2224,20 @@ All of these also behave as variables, but don't expect to be able to just
Example 1:
- // Returns how many status points you haven't spent yet.
- mes "Unused status points: "+readparam(9);
+ // 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:
- mes "Unused status points: "+StatusPoint;
+ mes "Unused status points: "+StatusPoint;
Example 2:
You can also use this command to get stat values.
- if (readparam(bVit) > 77)
- mes "Only people with over 77 Vit are reading this!";
+ if (readparam(bVit) > 77)
+ mes "Only people with over 77 Vit are reading this!";
---------------------------------------
@@ -2278,7 +2276,7 @@ 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)
+ 0 - Unit ID (GID)
If an invalid type is given or the NPC does not exist, 0 is returned.
@@ -2291,7 +2289,7 @@ If an invalid type is given or the NPC does not exist, 0 is returned.
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();
+ if (getmotherid()) mes "Your mother's ID is: "+getmotherid();
---------------------------------------
@@ -2308,8 +2306,8 @@ 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 "You're married already!";
+ if (!getpartnerid()) mes "I'm not going to be your girlfriend!";
+ if (getpartnerid()) mes "You're married already!";
---------------------------------------
@@ -2320,9 +2318,9 @@ 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
- mes "You're in the '"+getpartyname($@var)+"' party, I know!";
+ // 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!";
---------------------------------------
@@ -2371,9 +2369,9 @@ Example 1: list party member names
// 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.
+ // 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;
@@ -2402,10 +2400,10 @@ Example 2: check party count (with a 'next' pause), before warping to event
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.
+ // 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";
@@ -2420,9 +2418,9 @@ Example 2: check party count (with a 'next' pause), before warping to event
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.
+ // 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 ) {
@@ -2529,33 +2527,33 @@ for either slot.
Can be used to check if you have something equipped, or if you haven't got
something equipped:
- if(getequipid(EQI_HEAD_TOP)==2234) goto L_WearingTiara;
- mes "Come back when you have a Tiara on";
- close;
- L_WearingTiara:
- mes "What a lovely Tiara you have on";
- close;
+ if(getequipid(EQI_HEAD_TOP)==2234) goto L_WearingTiara;
+ mes "Come back when you have a Tiara on";
+ close;
+ L_WearingTiara:
+ 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:
- 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.
- if ((countitem(2341) > 0) || (countitem(2432) > 0) goto L_InventoryLegionPlate;
- mes "I will lets you pass";
- close2;
- warp "place",50,50;
- end;
- L_EquipedLegionPlate:
- mes "You are wearing some Legion Plate Armor, please drop that in your stash before continuing";
- close;
- L_InventoryLegionPlate:
- mes "You have some Legion Plate Armor in your inventory, please drop that in your stash before continuing";
- close;
+ 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.
+ if ((countitem(2341) > 0) || (countitem(2432) > 0) goto L_InventoryLegionPlate;
+ mes "I will lets you pass";
+ close2;
+ warp "place",50,50;
+ end;
+ L_EquipedLegionPlate:
+ mes "You are wearing some Legion Plate Armor, please drop that in your stash before continuing";
+ close;
+ L_InventoryLegionPlate:
+ mes "You have some Legion Plate Armor in your inventory, please drop that in your stash before continuing";
+ close;
---------------------------------------
@@ -2568,10 +2566,10 @@ 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) != "" )
- mes "So you are wearing a "+getequipname(EQI_HEAD_TOP)+" on your head";
+ if( getequipname(EQI_HEAD_TOP) != "" )
+ mes "So you are wearing a "+getequipname(EQI_HEAD_TOP)+" on your head";
else
- mes "You are not wearing any head gear";
+ mes "You are not wearing any head gear";
---------------------------------------
@@ -2591,12 +2589,12 @@ 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;
- // They do, so let's print the name of the first broken item:
- mes "Oh, I see you have a broken "+getitemname(getbrokenid(1))+" here!";
- Skip:
- mes "You don't have anything broken, quit bothering me.";
+ // Let's see if they have anything broken:
+ if (getbrokenid(1)==0) goto Skip;
+ // They do, so let's print the name of the first broken item:
+ mes "Oh, I see you have a broken "+getitemname(getbrokenid(1))+" here!";
+ Skip:
+ mes "You don't have anything broken, quit bothering me.";
---------------------------------------
@@ -2606,14 +2604,14 @@ 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;
- mes "[Refiner]";
- mes "Do you want me to refine your dumb head?";
- close;
- L_equipped:
- mes "[Refiner]";
- mes "That's a fine hat you are wearing there...";
- close;
+ if (getequipisequiped(EQI_HEAD_TOP)) goto L_equipped;
+ mes "[Refiner]";
+ mes "Do you want me to refine your dumb head?";
+ close;
+ L_equipped:
+ mes "[Refiner]";
+ mes "That's a fine hat you are wearing there...";
+ close;
---------------------------------------
@@ -2623,14 +2621,14 @@ 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]";
- mes "I can't refine this hat!...";
- close;
- L_Refine:
- mes "[Refiner]";
- mes "Ok I can refine this";
- close;
+ if (getequipisenableref(EQI_HEAD_TOP)) goto L_Refine;
+ mes "[Refiner]";
+ mes "I can't refine this hat!...";
+ close;
+ L_Refine:
+ mes "[Refiner]";
+ mes "Ok I can refine this";
+ close;
---------------------------------------
@@ -2642,11 +2640,11 @@ 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:
- if(getequiprefinerycnt(EQI_HEAD_TOP) < 10) goto L_Refine_HeadGear;
- mes "Sorry, it's not possible to refine hats better than +10";
- close;
- L_Refine_HeadGear:
- mes "I will now upgrade your "+getequipname(EQI_HEAD_TOP);
+ if(getequiprefinerycnt(EQI_HEAD_TOP) < 10) goto L_Refine_HeadGear;
+ mes "Sorry, it's not possible to refine hats better than +10";
+ close;
+ L_Refine_HeadGear:
+ mes "I will now upgrade your "+getequipname(EQI_HEAD_TOP);
---------------------------------------
@@ -2666,28 +2664,28 @@ according to the database, 0 will be returned.
Examples:
// Right hand can only contain a weapon.
- switch (getequipweaponlv(EQI_HAND_R)) {
- case 1: mes "You are holding a lvl 1 weapon."; break;
- case 2: mes "You are holding a lvl 2 weapon."; break;
- case 3: mes "You are holding a lvl 3 weapon."; break;
- case 4: mes "You are holding a lvl 4 weapon."; break;
- case 5: mes "You are holding a lvl 5 weapon, hm, must be a custom design..."; break;
- default: mes "Seems you don't have a weapon on."; break;
- }
+ switch (getequipweaponlv(EQI_HAND_R)) {
+ case 1: mes "You are holding a lvl 1 weapon."; break;
+ case 2: mes "You are holding a lvl 2 weapon."; break;
+ case 3: mes "You are holding a lvl 3 weapon."; break;
+ case 4: mes "You are holding a lvl 4 weapon."; break;
+ case 5: mes "You are holding a lvl 5 weapon, hm, must be a custom design..."; break;
+ default: mes "Seems you don't have a weapon on."; break;
+ }
// Left hand can hold either a weapon or shield.
- if (getequipid(EQI_HAND_R) == 0) {
- mes "Seems you have nothing equipped here.";
- close;
- }
- switch (getequipweaponlv(EQI_HAND_L)) {
- case 0: mes "You are holding a shield, so it doesn't have a level."; break;
- case 1: mes "You are holding a lvl 1 weapon."; break;
- case 2: mes "You are holding a lvl 2 weapon."; break;
- case 3: mes "You are holding a lvl 3 weapon."; break;
- case 4: mes "You are holding a lvl 4 weapon."; break;
- case 5: mes "You are holding a lvl 5 weapon, hm, must be a custom design..."; break;
- }
+ if (getequipid(EQI_HAND_R) == 0) {
+ mes "Seems you have nothing equipped here.";
+ close;
+ }
+ switch (getequipweaponlv(EQI_HAND_L)) {
+ case 0: mes "You are holding a shield, so it doesn't have a level."; break;
+ case 1: mes "You are holding a lvl 1 weapon."; break;
+ case 2: mes "You are holding a lvl 2 weapon."; break;
+ case 3: mes "You are holding a lvl 3 weapon."; break;
+ case 4: mes "You are holding a lvl 4 weapon."; break;
+ case 5: mes "You are holding a lvl 5 weapon, hm, must be a custom design..."; break;
+ }
---------------------------------------
@@ -2705,7 +2703,7 @@ 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
- if (getequippercentrefinery(EQI_HAND_L)<=rand(100)) goto L_Fail;
+ if (getequippercentrefinery(EQI_HAND_L)<=rand(100)) goto L_Fail;
---------------------------------------
@@ -2774,7 +2772,7 @@ 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?";
+ if (cardscnt()==4) mes "So you've stuck four cards into that weapon, think you're cool now?";
---------------------------------------
@@ -2783,7 +2781,7 @@ 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.";
+ if (getrefine()==10) mes "Wow. That's a murder weapon.";
---------------------------------------
@@ -2864,14 +2862,14 @@ parameters given were not variables or the search was not successful.
Type is the type of object to search for:
- 0 - Character object
- 1 - NPC object
- 2 - Pet object
- 3 - Monster object
- 4 - Homunculus object
- 5 - Mercenary object
- 6 - Elemental object
-
+ 0 - Character object
+ 1 - NPC object
+ 2 - Pet object
+ 3 - Monster object
+ 4 - Homunculus object
+ 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.
@@ -2885,22 +2883,22 @@ string, it will NOT locate a pet by name.
What a mess. Example, a working and tested one now:
- prontera,164,301,3%TAB%script%TAB%Meh%TAB%730,{
- mes "My name is Meh. I'm here so that Nyah can find me.";
- close;
- }
-
- prontera,164,299,3%TAB%script%TAB%Nyah%TAB%730,{
- mes "My name is Nyah.";
- mes "I will now search for Meh all across the world!";
- if (getmapxy(@mapname$,@mapx,@mapy,1,"Meh")!=0) goto Notfound;
- mes "And I found him on map "+@mapname$+" at X:"+@mapx+" Y:"+@mapy+" !";
- close;
- Notfound:
- mes "I can't seem to find Meh anywhere!";
- close;
- }
-
+ prontera,164,301,3%TAB%script%TAB%Meh%TAB%730,{
+ mes "My name is Meh. I'm here so that Nyah can find me.";
+ close;
+ }
+
+ prontera,164,299,3%TAB%script%TAB%Nyah%TAB%730,{
+ mes "My name is Nyah.";
+ mes "I will now search for Meh all across the world!";
+ if (getmapxy(@mapname$,@mapx,@mapy,1,"Meh")!=0) goto Notfound;
+ mes "And I found him on map "+@mapname$+" at X:"+@mapx+" Y:"+@mapy+" !";
+ close;
+ Notfound:
+ mes "I can't seem to find Meh anywhere!";
+ close;
+ }
+
Notice that NPC objects disabled with 'disablenpc' will still be located.
---------------------------------------
@@ -2915,8 +2913,8 @@ 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.
- if (getgmlevel()) mes "What is your command, your godhood?";
- if (getgmlevel()) goto Wherever;
+ if (getgmlevel()) mes "What is your command, your godhood?";
+ if (getgmlevel()) goto Wherever;
---------------------------------------
@@ -2959,7 +2957,7 @@ This function returns specified information about the current system time.
It will only return numbers.
- if (gettime(4)==6) mes "It's a Saturday. I don't work on Saturdays.";
+ if (gettime(4)==6) mes "It's a Saturday. I don't work on Saturdays.";
---------------------------------------
@@ -2976,8 +2974,8 @@ Max length is the maximum length of a time string to generate.
The example given in Hercules sample scripts works like this:
- mes gettimestr("%Y-%m/%d %H:%M:%S",21);
-
+ mes gettimestr("%Y-%m/%d %H:%M:%S",21);
+
This will print a full date and time like 'YYYY-MM/DD HH:MM:SS'.
---------------------------------------
@@ -2989,10 +2987,10 @@ What it returns is specified by Type.
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.
- 8 - Count of all characters on the map of the NPC the script is
- running in.
+ 0 - Count of all characters on the map of the invoking character.
+ 1 - Count of all characters in the entire server.
+ 8 - Count of all characters on the map of the NPC the script is
+ running in.
---------------------------------------
@@ -3036,12 +3034,12 @@ You need to put a 'close' after that yourself.
This function returns a guild's name given an ID number. If there is no
such guild, "null" will be returned;
- // Would print whatever guild 10007 name is.
- mes "The guild "+GetGuildName(10007)+" are all nice people.";
+ // 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 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.
@@ -3054,24 +3052,24 @@ 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.
- mes getguildmaster(10007)+" runs "+getguildname(10007);
+ mes getguildmaster(10007)+" runs "+getguildname(10007);
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:
- set @GID,getcharid(2);
- if(@GID==0) goto L_NoGuild;
- if(strcharinfo(0)==getguildmaster(@GID)) goto L_GuildMaster;
- mes "Sorry you don't own the guild you are in";
- close;
- L_NoGuild:
- mes "Sorry you are not in a guild";
- close;
- L_GuildMaster:
- mes "Welcome guild master of "+GetGuildName(@GID);
- close;
+ set @GID,getcharid(2);
+ if(@GID==0) goto L_NoGuild;
+ if(strcharinfo(0)==getguildmaster(@GID)) goto L_GuildMaster;
+ mes "Sorry you don't own the guild you are in";
+ close;
+ L_NoGuild:
+ mes "Sorry you are not in a guild";
+ close;
+ L_GuildMaster:
+ mes "Welcome guild master of "+GetGuildName(@GID);
+ close;
---------------------------------------
@@ -3182,25 +3180,25 @@ enough.
Example 1:
- if (getskilllv(152)) goto L_HasSkillThrowStone;
- mes "You don't have Throw Stone";
- close;
- L_HasSkillThrowStone:
- mes "You have got the skill Throw Stone";
- close;
+ if (getskilllv(152)) goto L_HasSkillThrowStone;
+ mes "You don't have Throw Stone";
+ close;
+ L_HasSkillThrowStone:
+ mes "You have got the skill Throw Stone";
+ close;
Example 2:
- if (getskilllv(28) >= 5) goto L_HasSkillHeallvl5orMore;
- if (getskilllv(28) == 10) goto L_HasSkillHealMaxed;
- mes "You heal skill is below lvl 5";
- close;
- L_HasSkillHeallvl6orMore:
- mes "Your heal lvl is 5 or more";
- close;
- L_HasSkillHealMaxed:
- mes "Your heal lvl has been maxed";
- close;
+ if (getskilllv(28) >= 5) goto L_HasSkillHeallvl5orMore;
+ if (getskilllv(28) == 10) goto L_HasSkillHealMaxed;
+ mes "You heal skill is below lvl 5";
+ close;
+ L_HasSkillHeallvl6orMore:
+ mes "Your heal lvl is 5 or more";
+ close;
+ L_HasSkillHealMaxed:
+ mes "Your heal lvl has been maxed";
+ close;
---------------------------------------
@@ -3325,9 +3323,9 @@ Example:
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.
+ // 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;
@@ -3373,8 +3371,8 @@ 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;
-
+ 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_'.
@@ -3551,7 +3549,7 @@ 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.
- if (checkfalcon()) mes "But you already have a falcon!";
+ if (checkfalcon()) mes "But you already have a falcon!";
---------------------------------------
@@ -3568,7 +3566,7 @@ 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.
- if (checkriding()) mes "PLEASE leave your bird outside! No riding birds on the floor here!";
+ if (checkriding()) mes "PLEASE leave your bird outside! No riding birds on the floor here!";
---------------------------------------
@@ -3586,7 +3584,7 @@ If the character can mount a dragon, the <color> options are:
5 - Red Dragon
Note: the character must be a Rune Knight and have the skill
- RK_DRAGONTRAINING to gain a mount.
+ 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.
@@ -3611,7 +3609,7 @@ 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.)
+ wug, etc.)
The accompanying function will return 1 if the invoking character has a
cash mount and 0 if they don't.
@@ -3640,7 +3638,7 @@ Return values for 'checkvending' are
Examples:
//This will check if Aaron is vending, and if so, put a message in
- //front of the attached player saying Aaron is vending.
+ //front of the attached player saying Aaron is vending.
if (checkvending("Aaron"))
mes "Aaron is currently vending!";
@@ -3674,9 +3672,9 @@ 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.";
- if (isnight()!=1) mes "I only prowl in the night.";
+ // These two are equivalent:
+ if (isday()) mes "I only prowl in the night.";
+ if (isnight()!=1) mes "I only prowl in the night.";
---------------------------------------
@@ -3708,11 +3706,11 @@ 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)
- if (isequipped(4001,4005,4033,4196)) mes "Wow! You're wearing a full complement of possible poring cards!";
- // (Poring)
- if (isequipped(4001)) mes "A poring card is useful, don't you think?";
-
+ // (Poring,Santa Poring,Poporing,Marin)
+ if (isequipped(4001,4005,4033,4196)) mes "Wow! You're wearing a full complement of possible poring cards!";
+ // (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.
@@ -3724,7 +3722,7 @@ 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?";
+ if (isequippedcnt(4001,4005,4033,4196) == 4) mes "Finally got all four poring cards?";
---------------------------------------
@@ -3801,13 +3799,13 @@ chat window.
This command will take the invoking character to the specified map, and if
wanted, specified coordinates too, but these can be random.
- warp "place",50,55;
+ 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:
- warp "place",0,0;
+ 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
@@ -3829,19 +3827,19 @@ 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;
+ 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.
- areawarp "place",10,10,120,120,"place2",0,0;
+ 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 the
"place2" map.
- areawarp "place",10,10,120,120,"place2",150,150,200,200;
+ 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.
@@ -3860,15 +3858,15 @@ 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).
-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.
+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.
@@ -3881,38 +3879,38 @@ close2;
set @id,getcharid(1);
warpparty "prontera",150,100,@id;
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.
-
+
Example:
-
+
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>).
-
+
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)
-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).
+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).
Example:
-
+
warpguild "prontera",x,y,Guild_ID;
---------------------------------------
@@ -3936,7 +3934,7 @@ 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;
+ savepoint "place",350,75;
---------------------------------------
@@ -3945,9 +3943,9 @@ character respawn where no teleportation is otherwise possible.
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
- heal 300,300; // This will heal 300 HP and 300 SP
+ heal 30000,0; // This will heal 30,000 HP
+ heal 0,30000; // This will heal 30,000 SP
+ heal 300,300; // This will heal 300 HP and 300 SP
This command just alters the hit points and spell points of the invoking
character and produces no other output whatsoever.
@@ -3965,8 +3963,8 @@ omitted.
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;
+ // This will heal anything thing from 100 to 150 HP and no SP
+ itemheal rand(100,150),0;
---------------------------------------
@@ -3975,9 +3973,9 @@ give you a random amount of healing.
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
+ 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
@@ -3996,17 +3994,17 @@ currently connected to the server.
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
+ 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
'db/const.txt'.
- // This would change your player into a Swordman
- jobchange Job_Swordman;
- // This would change your player into a Swordman High
- jobchange Job_Swordman_High;
+ // This would change your player into a Swordman
+ jobchange Job_Swordman;
+ // 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
@@ -4137,18 +4135,18 @@ 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;
+ getexp 10000,5000;
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;
- set JobExp,JobExp+5000;
+ // These 2 combined has the same effect as the above command
+ set BaseExp,BaseExp+10000;
+ set JobExp,JobExp+5000;
You can also reduce the amount of experience points:
- set BaseExp,BaseExp-10000;
+ 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'
@@ -4166,19 +4164,19 @@ 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;
+ 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.
-
- setlook 7,1;
+ // 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;
Here are the possible look types:
-
+
0 - Base sprite
1 - Hairstyle
2 - Weapon
@@ -4224,9 +4222,9 @@ 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.
- pushpc DIR_EAST, 5;
+ // pushes the character 5 cells in 3 o'clock direction from it's
+ // current position.
+ pushpc DIR_EAST, 5;
---------------------------------------
@@ -4236,8 +4234,8 @@ 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!";
+ if ( get_version() >= 15000 )
+ mes "Welcome Hercules!";
---------------------------------------
\\
@@ -4256,8 +4254,8 @@ character inventory instead.
In the first and most commonly used version of this command, items are
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
+ 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
@@ -4303,12 +4301,12 @@ 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.
-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.
+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.
+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-card4 values are also used to store name information for named
items, as well as the elemental property of weapons and armor. You can
@@ -4323,64 +4321,64 @@ 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.
- // 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");
+ // 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.
- // 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;
+ set @charid,getcharid(0,"Adam");
- // If you're inscribing non-equipment, @card1 must be 254.
- // Arrows are also not equipment. :)
- set @card1,254;
-
- // For named equipment, card2 means the Star Crumbs and elemental
- // crystals used to make this equipment. For everything else, it's 0.
-
- set @card2,0;
-
- // Now, let's give the character who invoked the script some
- // Adam's Apples:
-
- getitem2 512,1,1,0,0,@card1,@card2,@card3,@card4;
+ // 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;
+
+ // If you're inscribing non-equipment, @card1 must be 254.
+ // Arrows are also not equipment. :)
+ set @card1,254;
+
+ // For named equipment, card2 means the Star Crumbs and elemental
+ // crystals used to make this equipment. For everything else, it's 0.
+
+ set @card2,0;
+
+ // Now, let's give the character who invoked the script some
+ // Adam's Apples:
+
+ getitem2 512,1,1,0,0,@card1,@card2,@card3,@card4;
This wasn't tested with all possible items, so I can't give any promises,
experiment first before relying on it.
To create equipment, continue this example it like this:
- // We've already have card3 and card4 loaded with correct
- // values so we'll just set up card1 and card2 with data
- // for an Ice Stiletto.
+ // We've already have card3 and card4 loaded with correct
+ // values so we'll just set up card1 and card2 with data
+ // for an Ice Stiletto.
- // If you're inscribing equipment, @card1 must be 255.
- set @card1,255;
-
- // That's the number of star crumbs in a weapon.
- set @sc,2;
-
- // That's the number of elemental property of the weapon.
- set @ele,1;
+ // If you're inscribing equipment, @card1 must be 255.
+ set @card1,255;
- // And that's the wacky formula that makes them into
- // a single number.
- set @card2,@ele+((@sc*5)<<8);
+ // That's the number of star crumbs in a weapon.
+ set @sc,2;
- // That will make us an Adam's +2 VVS Ice Stiletto:
-
- getitem2 1216,1,1,2,0,@card1,@card2,@card3,@card4;
+ // That's the number of elemental property of the weapon.
+ set @ele,1;
+
+ // And that's the wacky formula that makes them into
+ // a single number.
+ set @card2,@ele+((@sc*5)<<8);
+
+ // That will make us an Adam's +2 VVS Ice Stiletto:
+
+ 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:
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
@@ -4434,11 +4432,11 @@ Note: 'delitem' in an NPC script can still remove rental items.
This command will create an item lying around on a specified map in the
specified location.
- itemid - Found in 'db/(pre-)re/item_db.txt'
- amount - Amount you want produced
- map name - The map name
- X - The X coordinate
- Y - The Y coordinate.
+ itemid - Found in 'db/(pre-)re/item_db.txt'
+ amount - Amount you want produced
+ map name - The map name
+ 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
@@ -4479,8 +4477,8 @@ 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
+ 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
@@ -4507,9 +4505,9 @@ Check 'getitem2' to understand its expanded parameters.
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";
- close;
+ mes "[Item Checker]";
+ mes "Hmmm, it seems you have "+countitem(502)+" apples";
+ close;
Like 'getitem', this function will also accept an 'english name' from the
database as an argument.
@@ -4517,10 +4515,10 @@ database as an argument.
If you want to state the number at the end of a sentence, you can do it by
adding up strings:
- mes "[Item Checker]";
- mes "Hmmm, the total number of apples you are holding is "+countitem("APPLE");
- close;
-
+ mes "[Item Checker]";
+ mes "Hmmm, the total number of apples you are holding is "+countitem("APPLE");
+ close;
+
---------------------------------------
*countitem2(<item id>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>)
@@ -4826,8 +4824,8 @@ 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.
+ sign with yellow color, when the store is on same map as the
+ invoking player.
1 = Directly opens the shop, regardless of distance.
Example:
@@ -4851,10 +4849,10 @@ 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;
- openstorage;
- end;
+ mes "I will now open your stash for you";
+ close2;
+ openstorage;
+ end;
---------------------------------------
@@ -4863,10 +4861,10 @@ storage window, to avoid any disruption when both windows overlap.
This will open a character's Mail window on the client connected to the
invoking character.
- mes "Close this window to open your mail inbox.";
- close2;
- openmail;
- end;
+ mes "Close this window to open your mail inbox.";
+ close2;
+ openmail;
+ end;
---------------------------------------
@@ -4875,10 +4873,10 @@ 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;
- openauction;
- end;
+ mes "Close this window to open the Auction window.";
+ close2;
+ openauction;
+ end;
---------------------------------------
\\
@@ -4934,7 +4932,7 @@ possible maximum. The full list of guild skills is available in
// (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;
+ 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
@@ -5001,16 +4999,16 @@ Used in reset NPC's (duh!).
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;
+ // 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:
- // This will bless someone as if with Bless 10:
- sc_start 10,240000,10;
-
+ // 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
@@ -5073,16 +5071,16 @@ 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
- heal 2000,0;
- skilleffect 28,2000;
- // Blessing Level 10
- sc_start 10,240000,10;
- skilleffect 34,0;
- // Increase AGI Level 5
- sc_start 12,140000,5;
- skilleffect 29,0;
+ mes "Be blessed!";
+ // Heal of 2000 HP
+ heal 2000,0;
+ skilleffect 28,2000;
+ // Blessing Level 10
+ sc_start 10,240000,10;
+ skilleffect 34,0;
+ // Increase AGI Level 5
+ sc_start 12,140000,5;
+ skilleffect 29,0;
This will heal the character with 2000 HP, buff it with Blessing Lv 10 and
Increase AGI Lv 5, and display appropriate effects.
@@ -5155,7 +5153,7 @@ 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;
+ statusup bVit,-1;
---------------------------------------
@@ -5412,7 +5410,7 @@ the RID of the killing character.
3 = flora (Alchemist skill)
4 = zanzou (Kagerou/Oboro skill)
- monster "place",60,100,"Poring",1002,1,"NPCNAME::OnLabel";
+ 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. Both 'monster' and 'areamonster' return the GID of the monster
@@ -5420,19 +5418,19 @@ 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
+ // 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;
- }
+ // 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.
@@ -5442,29 +5440,29 @@ by x1/y1-x2/y2.
Simple monster killing script:
- <NPC object definition. Let's assume you called him NPCNAME.>
- mes "[Summon Man]";
- mes "Want to start the kill?";
- next;
- menu "Yes",L_Yes,"No",-;
- mes "[Summon Man]";
- mes "Come back later";
- close;
- L_Yes:
- monster "prontera",0,0,"Quest Poring",1002,10,"NPCNAME::OnPoringKilled";
- // By using 0,0 it will spawn them in a random place.
- mes "[Summon Man]";
- mes "Now go and kill all the Poring I summoned";
- // He summoned ten.
- close;
- OnPoringKilled:
- set $PoringKilled,$PoringKilled+1;
- if ($PoringKilled==10) goto L_AllDead;
- end;
- L_AllDead:
- announce "Summon Man: Well done all the poring are dead",3;
- set $PoringKilled,0;
- end;
+ <NPC object definition. Let's assume you called him NPCNAME.>
+ mes "[Summon Man]";
+ mes "Want to start the kill?";
+ next;
+ menu "Yes",L_Yes,"No",-;
+ mes "[Summon Man]";
+ mes "Come back later";
+ close;
+ L_Yes:
+ monster "prontera",0,0,"Quest Poring",1002,10,"NPCNAME::OnPoringKilled";
+ // By using 0,0 it will spawn them in a random place.
+ mes "[Summon Man]";
+ mes "Now go and kill all the Poring I summoned";
+ // He summoned ten.
+ close;
+ OnPoringKilled:
+ set $PoringKilled,$PoringKilled+1;
+ if ($PoringKilled==10) goto L_AllDead;
+ end;
+ L_AllDead:
+ announce "Summon Man: Well done all the poring are dead",3;
+ set $PoringKilled,0;
+ end;
For more examples see just about any official 2-1 or 2-2 job quest script.
@@ -5747,17 +5745,17 @@ 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";
- close;
- OnLabel:
- mes "This is what you will see if the doevent is activated";
- close;
- }
+ place,100,100,1%TAB%script%TAB%NPC%TAB%53,{
+ mes "This is what you will see when you click me";
+ close;
+ OnLabel:
+ mes "This is what you will see if the doevent is activated";
+ close;
+ }
- ....
+ ....
- doevent "NPC::OnLabel";
+ doevent "NPC::OnLabel";
---------------------------------------
@@ -5779,25 +5777,25 @@ 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";
- close2;
- set .@emote, rand(1,30);
- donpcevent "NPC2::OnEmote";
- OnEmote:
- emotion .@emote;
- end;
- }
-
- place,102,100,1%TAB%script%TAB%NPC2%TAB%53,{
- mes "Hey NPC copy what I do";
- close2;
- set .@emote, rand(1,30);
- donpcevent "NPC::OnEmote";
- OnEmote:
- emotion .@emote;
- end;
- }
+ place,100,100,1%TAB%script%TAB%NPC%TAB%53,{
+ mes "Hey NPC2 copy what I do";
+ close2;
+ set .@emote, rand(1,30);
+ donpcevent "NPC2::OnEmote";
+ OnEmote:
+ emotion .@emote;
+ end;
+ }
+
+ place,102,100,1%TAB%script%TAB%NPC2%TAB%53,{
+ mes "Hey NPC copy what I do";
+ close2;
+ set .@emote, rand(1,30);
+ donpcevent "NPC::OnEmote";
+ OnEmote:
+ emotion .@emote;
+ end;
+ }
Whichever of the both NPCs is talked to, both will show a random emotion
at the same time.
@@ -5821,9 +5819,9 @@ 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.
- npctalk "Hello "+strcharinfo(0)+", how are you?";
+ // This will make everyone in the area see the NPC greet the character
+ // who just invoked it.
+ npctalk "Hello "+strcharinfo(0)+", how are you?";
---------------------------------------
@@ -5875,16 +5873,16 @@ On5secs:
---------------------------------------
-*initnpctimer{ "<NPC name>" {, <Attach Flag>} } |
- { "<NPC name>" | <Attach Flag> };
-*stopnpctimer{ "<NPC name>" {, <Detach Flag>} } |
- { "<NPC name>" | <Detach Flag> };
-*startnpctimer{ "<NPC name>" {, <Attach Flag>} } |
- { "<NPC name>" | <Attach Flag> };
-*setnpctimer <tick>{,"<NPC name>"};
-*getnpctimer(<type of information>{,"<NPC name>"})
-*attachnpctimer {"<character name>"};
-*detachnpctimer {"<NPC name>"};
+*initnpctimer { "<NPC name>" {, <Attach Flag>} } |
+ { "<NPC name>" | <Attach Flag> };
+*stopnpctimer { "<NPC name>" {, <Detach Flag>} } |
+ { "<NPC name>" | <Detach Flag> };
+*startnpctimer { "<NPC name>" {, <Attach Flag>} } |
+ { "<NPC name>" | <Attach Flag> };
+*setnpctimer <tick>{,"<NPC name>"};
+*getnpctimer (<type of information>{,"<NPC name>"})
+*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
@@ -5930,80 +5928,80 @@ The 'setnpctimer' command will explicitly set the timer to a given tick.
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.
+ 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.
+ 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
- attachnpctimer;
- initnpctimer;
- npctalk "I cant talk right now, give me 10 seconds";
- end;
- OnTimer5000:
- npctalk "Ok 5 seconds more";
- end;
- OnTimer6000:
- npctalk "4";
- end;
- OnTimer7000:
- npctalk "3";
- end;
- OnTimer8000:
- npctalk "2";
- end;
- OnTimer9000:
- npctalk "1";
- end;
- OnTimer10000:
- stopnpctimer;
- mes "[Man]";
- mes "Ok we can talk now";
- detachnpctimer;
- // and remember attachnpctimer and detachnpctimer can only be used
- // while the NPC timer is not running!
- }
+ <NPC Header> {
+ // 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";
+ end;
+ OnTimer5000:
+ npctalk "Ok 5 seconds more";
+ end;
+ OnTimer6000:
+ npctalk "4";
+ end;
+ OnTimer7000:
+ npctalk "3";
+ end;
+ OnTimer8000:
+ npctalk "2";
+ end;
+ OnTimer9000:
+ npctalk "1";
+ end;
+ OnTimer10000:
+ stopnpctimer;
+ mes "[Man]";
+ mes "Ok we can talk now";
+ detachnpctimer;
+ // and remember attachnpctimer and detachnpctimer can only be used
+ // while the NPC timer is not running!
+ }
Example 2:
- OnTimer15000:
- npctalk "Another 15 seconds have passed.";
+ OnTimer15000:
+ npctalk "Another 15 seconds have passed.";
- // 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.
- 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.
- OnInit:
- initnpctimer;
- end;
+ // 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.
+ 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.
+ OnInit:
+ initnpctimer;
+ end;
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.
- close;
+ 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.
+ close;
Example 4:
- mes "[Man]";
- 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.
- end;
+ mes "[Man]";
+ 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.
+ end;
---------------------------------------
@@ -6021,11 +6019,11 @@ will not keep the rid, while sleep2 does.
Examples:
// 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.
+ // (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'.
+ //Cancels any running sleep timers on the NPC 'NPC'.
awake "NPC";
---------------------------------------
@@ -6049,7 +6047,7 @@ client and appears always green.
This command will broadcast a message to all or most players, similar to
@kami/@kamib GM commands.
- announce "This will be shown to everyone at all in yellow.",0;
+ 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.
@@ -6058,25 +6056,25 @@ 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_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.
+- 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.
+- 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.
@@ -6089,7 +6087,7 @@ 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;
+ 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).
@@ -6102,12 +6100,12 @@ 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.
- // 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 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.
- announce "This is my message just for you people here",bc_npc|bc_area;
+ // This will be shown on everyones screen that is in sight of the NPC.
+ announce "This is my message just for you people here",bc_npc|bc_area;
---------------------------------------
@@ -6127,7 +6125,7 @@ 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;
+ areaannounce "prt_church",0,0,350,350,"God's in his heaven, all right with the world",0;
---------------------------------------
@@ -6241,7 +6239,7 @@ 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.
- waitingroom "Hello World",0;
+ waitingroom "Hello World",0;
// 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
@@ -6249,7 +6247,7 @@ amount.
// accumulate. Once this happens, it will cause the NPC "Bouncer" run the
// label "OnStart".
- waitingroom "Disco - Waiting Room",8,"Bouncer::OnStart",7;
+ waitingroom "Disco - Waiting Room",8,"Bouncer::OnStart",7;
// 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
@@ -6257,7 +6255,7 @@ amount.
// 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;
+ 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.
@@ -6534,7 +6532,7 @@ which returns a guild id:
// This will change the emblem on the flag to that of the guild that owns
// "guildcastle"
- flagemblem GetCastleData("guildcastle",1);
+ flagemblem GetCastleData("guildcastle",1);
---------------------------------------
@@ -6614,7 +6612,7 @@ Example:
// This will move Bugga from to the coordinates 100,20 (if those
// coordinates are legit).
moveNPC "Bugga",100,20;
-
+
---------------------------------------
=====================
@@ -6627,8 +6625,8 @@ Example:
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!";
+ // Displays "NAME has clicked me!" in the map-server window.
+ debugmes strcharinfo(0)+" has clicked me!";
---------------------------------------
@@ -6681,23 +6679,23 @@ 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;
+ // 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;
This will create three points:
- viewpoint 1,30,40,1,0xFF0000;
- viewpoint 1,35,45,2,0xFF0000;
- viewpoint 1,40,50,3,0xFF0000;
+ viewpoint 1,30,40,1,0xFF0000;
+ viewpoint 1,35,45,2,0xFF0000;
+ viewpoint 1,40,50,3,0xFF0000;
And this is how you remove them:
- viewpoint 2,30,40,1,0xFF0000;
- viewpoint 2,35,45,2,0xFF0000;
- viewpoint 2,40,50,3,0xFF0000;
-
+ viewpoint 2,30,40,1,0xFF0000;
+ 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.
@@ -6709,11 +6707,11 @@ 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
- 2 - bottom right corner
- 3 - middle of screen in a movable window with an empty title bar
- 4 - middle of screen without the window header, but still movable
+ 0 - bottom left corner
+ 1 - bottom middle
+ 2 - bottom right corner
+ 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
@@ -6729,15 +6727,15 @@ 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;
+ // Displays the Comodo Kafra illustration in lower right corner.
+ cutin "kafra_07",2;
- // Typical way to end a script, which displayed an illustration during a
- // dialog with a player.
- mes "See you.";
- close2;
- cutin "",255;
- end;
+ // Typical way to end a script, which displayed an illustration during a
+ // dialog with a player.
+ mes "See you.";
+ close2;
+ cutin "",255;
+ end;
---------------------------------------
@@ -6842,10 +6840,10 @@ 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.
- input @player$;
- atcommand "@nuke "+@player$;
+ // 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.
@@ -6860,9 +6858,9 @@ GM level 99.
The commands can also run without an attached rid.
- // This would do the same as above, but now
- // it doesn't need a player attached by default.
- charcommand "#option 0 0 0 Roy";
+ // This would do the same as above, but now
+ // it doesn't need a player attached by default.
+ charcommand "#option 0 0 0 Roy";
---------------------------------------
@@ -6940,9 +6938,9 @@ 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.
- npcskill "AL_HEAL",10,99,60;
+ // Casts Level 10 Heal on the attached player, calculated with
+ // all stats 99 and base level 60.
+ npcskill "AL_HEAL",10,99,60;
---------------------------------------
@@ -7183,47 +7181,47 @@ The first letter is position 0.
Returns char at specified index. If index is out of range, returns an
empty string.
-
+
Example:
-
+
charat("This is a string", 10); //returns "s"
-
+
---------------------------------------
-
+
*setchar(<string>,<char>,<index>)
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:
setchar("Cat", "B", 0); //returns "Bat"
-
+
---------------------------------------
*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.
-
+
Example:
-
+
insertchar("laughter", "s", 0); //returns "slaughter"
-
+
---------------------------------------
*delchar(<string>,<index>)
Returns the original string with the char at the specified index removed.
If index is out of range, original string will be returned.
-
+
Example:
-
+
delchar("Diet", 3); //returns "Die"
-
+
---------------------------------------
*strtoupper(<string>)
@@ -7231,9 +7229,9 @@ Example:
Returns the specified string in it's uppercase/lowercase form.
All non-alpha characters will be preserved.
-
+
Example:
-
+
strtoupper("The duck is blue!!"); //returns "THE DUCK IS BLUE!!"
---------------------------------------
@@ -7246,21 +7244,21 @@ uppercase for 'charisupper' or lowercase for 'charislower'. Otherwise, 0.
Characters not of the alphabelt will return 0.
Example:
-
+
charisupper("Hercules", 0); //returns 1
-
+
---------------------------------------
*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
index, an empty string will be returned.
Example:
-
+
substr("foobar", 3, 5); //returns "bar"
-
+
---------------------------------------
*explode(<dest_array>,<string>,<delimiter>)
@@ -7272,7 +7270,7 @@ as a delimiter, the string will be placed in the array in its original
form, without any changes.
Example:
-
+
explode(.@my_array$, "Explode:Test:1965:red:PIE", ":");
//.@my_array$ contents will be...
//.@my_array$[0]: "Explode"
@@ -7288,7 +7286,7 @@ Example:
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";
implode(.@my_array$, " "); //returns "This is a test"
@@ -7305,11 +7303,11 @@ 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"
+ //prints "The zoo contains 5 monkeys"
+
+ dispbottom(sprintf(.@format$, "barrel", 82));
+ //prints "The barrel contains 82 monkeys"
- dispbottom(sprintf(.@format$, "barrel", 82));
- //prints "The barrel contains 82 monkeys"
-
---------------------------------------
*sscanf(<string>,<format>[,param[,param[,...]]])
@@ -7321,7 +7319,7 @@ limited by Hercules' script engine.
Example:
sscanf("This is a test: 42 foobar", "This is a test: %d %s", .@num, .@str$);
dispbottom(.@num + " " + .@str$); //prints "42 foobar"
-
+
---------------------------------------
*strpos(<haystack>,<needle>{,<offset>})
@@ -7335,7 +7333,7 @@ Example:
strpos("foobar", "bar", 0); //returns 3
strpos("foobarfoo", "foo", 0); //returns 0
strpos("foobarfoo", "foo", 1); //returns 6
-
+
---------------------------------------
*replacestr(<input>, <search>, <replace>{, <usecase>{, <count>}})
@@ -7349,7 +7347,7 @@ Example:
replacestr("testing tester", "test", "dash"); //returns "dashing dasher"
replacestr("Donkey", "don", "mon", 0); //returns "monkey"
replacestr("test test test test test", "yay", 0, 3); //returns "yay yay yay test test"
-
+
---------------------------------------
*countstr(<input>, <search>{, <usecase>})
@@ -7369,16 +7367,16 @@ 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
- 2 - RixSquirrel
- 3 - NHCgogo
- 4 - RixDiary
- 5 - RixMiniHeart
- 6 - RixFreshman
- 7 - RixKid
- 8 - RixMagic
- 9 - RixJJangu
+ 0 - Default
+ 1 - RixLoveangel
+ 2 - RixSquirrel
+ 3 - NHCgogo
+ 4 - RixDiary
+ 5 - RixMiniHeart
+ 6 - RixFreshman
+ 7 - RixKid
+ 8 - RixMagic
+ 9 - RixJJangu
---------------------------------------
@@ -7388,12 +7386,12 @@ 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.
+ 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.
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
@@ -7401,11 +7399,11 @@ 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;
+ // displays 23:59:59 for 5 seconds
+ showdigit 86399;
- // counter that starts at 60 and runs for 60 seconds
- showdigit 60,3;
+ // counter that starts at 60 and runs for 60 seconds
+ showdigit 60,3;
---------------------------------------
@@ -7504,8 +7502,8 @@ 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.
- // This will make you a poring:
- makepet 1002;
+ // 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
@@ -7821,21 +7819,21 @@ If no additional argument supplied, return the state of the quest:
0 = Quest has been given, but the state is "inactive"
1 = Quest has been given, and the state is "active"
2 = Quest completed
-
+
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
+ 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.
- 2 = you've killed all of the target monsters
+ -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.
+ 2 = you've killed all of the target monsters
---------------------------------------
@@ -7847,11 +7845,11 @@ certain player/s.
state can be:
0 = disable ( Used to disable and remove the mark and the emotion from
- the NPC. )
+ the NPC. )
1 = exclamation emotion ( Used to show an important quest event to
- certain player. )
+ certain player. )
2 = interrogation emotion ( Used to show an non-important quest event
- to certain player. )
+ to certain player. )
Other value may cause client crashes.
color can be:
@@ -7893,8 +7891,8 @@ 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;
@@ -7996,7 +7994,7 @@ Example:
Retrieves data related to given battle group. Type can be one of the
following:
- 0 - Amount of players currently belonging to the group.
+ 0 - Amount of players currently belonging to the group.
----------------------------------------
@@ -8047,9 +8045,9 @@ currently attached character.
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
- SPEAR_MERC_GUILD
- SWORD_MERC_GUILD
+ ARCH_MERC_GUILD
+ SPEAR_MERC_GUILD
+ SWORD_MERC_GUILD
----------------------------------------
@@ -8059,9 +8057,9 @@ attached character. Guild can be one or the following constants:
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
- SPEAR_MERC_GUILD
- SWORD_MERC_GUILD
+ ARCH_MERC_GUILD
+ SPEAR_MERC_GUILD
+ SWORD_MERC_GUILD
---------------------------------------
@@ -8072,14 +8070,14 @@ 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
- 2 - Name
- 3 - Faith value for this mercenary's guild, if any
- 4 - Calls value for this mercenary's guild, if any
- 5 - Kill count
- 6 - Remaining life time in msec
- 7 - Level
+ 0 - Database ID
+ 1 - Class
+ 2 - Name
+ 3 - Faith value for this mercenary's guild, if any
+ 4 - Calls value for this mercenary's guild, if any
+ 5 - Kill count
+ 6 - Remaining life time in msec
+ 7 - Level
If the character does not have a mercenary, the command returns ""
for name and 0 for all other types.
diff --git a/npc/mobs/citycleaners.txt b/npc/mobs/citycleaners.txt
index 876017fd4..749efed85 100644
--- a/npc/mobs/citycleaners.txt
+++ b/npc/mobs/citycleaners.txt
@@ -47,4 +47,4 @@ einbech,0,0,0,0 monster Tarou 1175,5,1800000,1500000,0
//==================================================
payon_in02,23,68,5,5 monster Thief Bug Egg 1048,7,1200000,600000,0
-job3_war01,19,33,5,5 monster Thief Bug Egg 1213,1,12,60,0
+job3_war01,19,33,5,5 monster Thief Bug Egg 1048,1,12,60,0
diff --git a/npc/re/guild/invest_main.txt b/npc/re/guild/invest_main.txt
new file mode 100644
index 000000000..e8c2a011a
--- /dev/null
+++ b/npc/re/guild/invest_main.txt
@@ -0,0 +1,1678 @@
+//===== rAthena Script =======================================
+//= Hall of Abyss - Core Scripts
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Expansion for War of Emperium FE.
+//= Invest in each realm to unlock new maps:
+//= - Guild Dungeon F2, total 20,000,000z.
+//= - Hall of Abyss, total 70,000,000z.
+//===== Additional Comments: =================================
+//= 1.0 First version. Missing official times. [Euphy]
+//============================================================
+
+// Global Variables
+//============================================================
+// Note: an asterisk (*) represents any realm (prt, pay, gef, alde).
+/*
+$2011_agit_invest
+-- 0: Inactive.
+-- 1: Investment in progress.
+-- 2: Investment results calculating.
+-- 4: Investment calculations complete (only when at least one $*_invest_result is 3).
+-- 11-21: Tie, revote required.
+
+$agit_result_notice
+-- 0: Inactive.
+-- 1-12: Interim statements (displaying $@vfund_*x) available.
+
+$agit_result_timer
+-- 0: Inactive.
+-- 0-59: Time elapsed during investment (in hours).
+
+$agit_revoting_timer
+-- 0: Inactive.
+-- 0-29: Time elapsed during revote (in minutes).
+-- 30: Revote closed.
+-- 31: Revote results calculating.
+
+$*_invest_result
+-- 0: No data.
+-- 1: Realm not connected.
+-- 2: Guild Dungeon F2 open.
+-- 3: Abyss Gate (Hall of Abyss and Gulid Dungeon F2) open.
+
+$fund_*[01-05]
+-- Investment units per guild castle.
+$fund_*_extra
+-- Investment units per realm.
+
+$@vfund_*[01-05]
+$@vfund_*_extra
+-- Investment units, used in interim statements only.
+*/
+
+// Investment Functions & Controller
+//============================================================
+// Note: The time in this section are almost entirely custom.
+
+- script #invest_timer -1,{
+OnClock0000: // Open investments on Wed (1 hour after WoE)
+ if (gettime(4) == 3 && !agitcheck()) {
+ set $2011_agit_invest,1;
+ donpcevent "#fund_master::OnInvest_start";
+ }
+ end;
+OnClock1200: // Close investments on Fri (60 hours after investments open)
+ if (gettime(4) == 5 && !agitcheck()) {
+ set $2011_agit_invest,2;
+ donpcevent "#fund_master::OnInvest_stop";
+ }
+ end;
+OnClock1235: // Open dungeons on Fri (at least 31 minutes after investments close)
+ if (gettime(4) == 5 && !agitcheck())
+ donpcevent "#fund_master::OnResult";
+ end;
+OnClock2000: // Close dungeons on Tues (1 hour before WoE)
+ if (gettime(4) == 2)
+ donpcevent "#fund_master::OnReset";
+ end;
+}
+
+function script F_Invest_Status {
+ set .@day, gettime(4);
+ set .@hour, gettime(3);
+ set .@minute, gettime(2);
+
+ // Inactive.
+ if (agitcheck())
+ return 0;
+
+ // Open for investments.
+ if (.@day >= 3 && (.@day < 5 || (.@day == 5 && .@hour <= 12)))
+ return 1;
+
+ // Investments closed, calculating results.
+ if (.@day == 5 && .@hour == 12 && .@minute < 35)
+ return 2;
+
+ // Calculations complete, dungeons open.
+ if ((.@day == 5 && (.@hour > 12 || (.@hour == 12 && .@minute >= 35))) || .@day > 5 ||
+ .@day < 2 || (.@day == 2 && .@hour < 20))
+ return 3;
+
+ // Dungeons closed.
+ return 0;
+}
+
+//callfunc "F_Invest_Abyss","<variable>","<NPC name>"{,"<addon message>"};
+function script F_Invest_Abyss {
+ mes "There are 2 ways to invest, by Zeny or the Investment Certificate given out by the Cat Paw Merchant Guild.";
+ mes "Which way would you like to make your investment?";
+ next;
+ switch(select("Invest with Zeny.:Invest with Investment Certificates.:Cancel")) {
+ case 1:
+ mes getarg(1);
+ mes "So you've decided to invest in Zeny.";
+ mes "Minimum investment unit is ^4d4dff10,000 Zeny^000000.";
+ mes "You can invest a maximum of 50 units which is ^4d4dff500,000 Zeny^000000.";
+ next;
+ switch(select("1 unit 10,000 Zeny:10 units 100,000 Zeny:50 units 500,000 Zeny:Another amount:Cancel")) {
+ case 1:
+ set .@units,1;
+ break;
+ case 2:
+ set .@units,10;
+ break;
+ case 3:
+ set .@units,50;
+ break;
+ case 4:
+ mes getarg(1);
+ mes "Please enter the amount you want to invest.";
+ mes "Please choose between 1 to 200.";
+ mes "Please enter 0 to cancel.";
+ next;
+ input .@units;
+ if (.@units < 0 || .@units > 200) {
+ mes getarg(1);
+ mes "You've exceeded the amount per investment.";
+ mes "Please try again.";
+ close;
+ } else if (.@units == 0) {
+ mes getarg(1);
+ mes "Canceled.";
+ close;
+ } else
+ break;
+ case 5:
+ mes getarg(1);
+ mes "Canceled.";
+ close;
+ }
+ set .@zeny, .@units * 10000;
+ if (Zeny < .@zeny) {
+ mes getarg(1);
+ mes "You do not have enough money.";
+ close;
+ }
+ mes getarg(1);
+ mes "You've invested "+.@units+" unit"+((.@units == 1)?"":"s")+" "+((.@units < 100)?.@units:insertchar(""+.@units,",",1))+"0,000 Zeny"+getarg(2,"")+".";
+ mes "Not much but this is a small gift. You can exchange it with items in Malangdo.";
+ set Zeny, Zeny-.@zeny;
+ setd getarg(0), getd(getarg(0)) + .@units;
+ getitem 6488,.@units; //Thanks_Invest_Ticket
+ close;
+ case 2:
+ mes getarg(1);
+ mes "Wow, you've brought Investment Certificates.";
+ mes "How many certificates will you submit?";
+ next;
+ switch(select("1 Investment Certificate:5 Investment Certificates:Another amount:Cancel")) {
+ case 1:
+ set .@tickets,1;
+ break;
+ case 2:
+ set .@tickets,5;
+ break;
+ case 3:
+ mes getarg(1);
+ mes "Please enter the number of Investment Certificates you want to submit.";
+ mes "Please choose between 1 to 20.";
+ mes "Please enter 0 to cancel.";
+ next;
+ input .@tickets;
+ if (.@tickets < 0 || .@tickets > 20) {
+ mes getarg(1);
+ mes "You've exceeded the amount per investment.";
+ mes "Please try again.";
+ close;
+ } else if (.@tickets == 0) {
+ mes getarg(1);
+ mes "Canceled.";
+ close;
+ } else
+ break;
+ case 4:
+ mes getarg(1);
+ mes "Canceled.";
+ close;
+ }
+ if (countitem(6489) < .@tickets) {
+ mes getarg(1);
+ mes "Looks like you have fewer Investment Certificates than you want to submit.";
+ close;
+ }
+ set .@units, .@tickets * 10;
+ mes getarg(1);
+ mes .@tickets+" Investment Certificate"+((.@tickets == 1)?" is":"s are")+" the same as an investment of "+.@units+" units ("+((.@units < 100)?.@units:insertchar(""+.@units,",",1))+"0,000z)"+getarg(2,"")+".";
+ mes "Not much but this is a small gift. You can exchange it with items in Malangdo.";
+ delitem 6489,.@tickets; //Cats_Invest_Certif
+ setd getarg(0), getd(getarg(0)) + .@units;
+ getitem 6488,.@units; //Thanks_Invest_Ticket
+ close;
+ case 3:
+ mes getarg(1);
+ mes "Canceled.";
+ close;
+ }
+}
+
+// Script Core
+//============================================================
+prt_gld,1,1,0 script #fund_master 844,{
+ end;
+OnInit:
+ set .@invest_status, callfunc("F_Invest_Status");
+ if (.@invest_status == 1) {
+ set $2011_agit_invest,1;
+ end;
+ }
+ if ((.@invest_status == 2 && $2011_agit_invest == 1) ||
+ (.@invest_status == 3 && ($2011_agit_invest == 1 || $2011_agit_invest == 2))) {
+ donpcevent "#fund_master::OnCalculate";
+ end;
+ }
+ end;
+OnCalculate_Election:
+ set .@force_vote,1;
+OnCalculate:
+ setarray .@cas$[0],"prt","pay","gef","alde";
+ for(set .@i,0; .@i<4; set .@i,.@i+1) {
+ // All funds per realm are summed.
+ set .@funds[.@i], getd("$fund_"+.@cas$[.@i]+"01")+getd("$fund_"+.@cas$[.@i]+"02")+getd("$fund_"+.@cas$[.@i]+"03")+getd("$fund_"+.@cas$[.@i]+"04")+getd("$fund_"+.@cas$[.@i]+"05")+getd("$fund_"+.@cas$[.@i]+"_extra");
+
+ // 70,000,000z opens Hall of Abyss and F2.
+ if (.@funds[.@i] >= 7000) {
+ setd "$"+.@cas$[.@i]+"_invest_result",3;
+ set .@total_7000,1;
+ }
+ // 20,000,000z opens F2 and a chance for Hall of Abyss.
+ else if (.@funds[.@i] >= 2000) {
+ setd "$"+.@cas$[.@i]+"_invest_result",2;
+ set .@total_2000,1;
+ }
+ // Anything below that opens nothing.
+ else
+ setd "$"+.@cas$[.@i]+"_invest_result",1;
+ }
+ // No further actions if 20,000,000z isn't reached.
+ if (!.@total_2000)
+ end;
+ // No further actions if any realm hits 70,000,000z.
+ if (.@total_7000) {
+ set $2011_agit_invest,4;
+ end;
+ }
+ // Otherwise, highest investment above 20,000,000z opens Hall of Abyss.
+ set .@max, .@funds[0];
+ for(set .@i,1; .@i<4; set .@i,.@i+1) {
+ if (.@funds[.@i] > .@max) {
+ set .@max, .@funds[.@i];
+ set .@ele, .@i;
+ deletearray .@rand$[0], getarraysize(.@rand$);
+ } else if (.@funds[.@i] == .@max && .@funds[.@i] >= 2000) {
+ if (!getarraysize(.@rand$))
+ set .@rand$[0], .@cas$[.@ele];
+ set .@rand$[getarraysize(.@rand$)], .@cas$[.@i];
+ }
+ }
+ if (.@max < 2000)
+ end;
+ if (getarraysize(.@rand$)) {
+
+ // Tie: declare a random winner.
+ if (!.@force_vote) {
+ set .@i, rand(getarraysize(.@rand$));
+ setd "$"+.@rand$[.@i]+"_invest_result",3;
+ set $2011_agit_invest,4;
+ end;
+ }
+
+ // Tie: initiate a 30-minute election.
+ set .@str$, implode(.@rand$,"|");
+ for(set .@i,0; .@i<4; set .@i,.@i+1) {
+ if (compare(.@str$,.@cas$[.@i]))
+ set .@election, .@election | (1<<.@i);
+ }
+ switch(.@election) {
+ case 3: set $2011_agit_invest,11; break; //Prontera|Payon
+ case 9: set $2011_agit_invest,12; break; //Prontera|Al De Baran
+ case 5: set $2011_agit_invest,13; break; //Prontera|Geffen
+ case 10: set $2011_agit_invest,14; break; //Al De Baran|Payon
+ case 6: set $2011_agit_invest,15; break; //Geffen|Payon
+ case 12: set $2011_agit_invest,16; break; //Al De Baran|Geffen
+ case 11: set $2011_agit_invest,17; break; //Prontera|Payon|Al De Baran
+ case 7: set $2011_agit_invest,18; break; //Prontera|Payon|Geffen
+ case 13: set $2011_agit_invest,19; break; //Prontera|Al De Baran|Geffen
+ case 14: set $2011_agit_invest,20; break; //Al De Baran|Payon|Geffen
+ case 15: set $2011_agit_invest,21; break; //Prontera|Payon|Al De Baran|Geffen
+ }
+ if ($2011_agit_invest >= 11)
+ donpcevent "Revoting Manager#Invest1::OnStart";
+ end;
+ } else {
+ setd "$"+.@cas$[.@ele]+"_invest_result",3;
+ set $2011_agit_invest,4;
+ end;
+ }
+ end;
+OnInvest_start:
+ announce "From now on, we are going to start the investments to connect the 'Abyss Gate' in the WOE areas: Valkyrie Realm, Greenwood Lake, Luina, Britoniah.",bc_all,0xFF0000; //FW_NORMAL 10
+ set $fund_prt01,0;
+ set $fund_prt02,0;
+ set $fund_prt03,0;
+ set $fund_prt04,0;
+ set $fund_prt05,0;
+ set $fund_pay01,0;
+ set $fund_pay02,0;
+ set $fund_pay03,0;
+ set $fund_pay04,0;
+ set $fund_pay05,0;
+ set $fund_gef01,0;
+ set $fund_gef02,0;
+ set $fund_gef03,0;
+ set $fund_gef04,0;
+ set $fund_gef05,0;
+ set $fund_alde01,0;
+ set $fund_alde02,0;
+ set $fund_alde03,0;
+ set $fund_alde04,0;
+ set $fund_alde05,0;
+ donpcevent "Investment_total#fund00::OnEnable";
+ end;
+OnInvest_stop:
+ announce "We've finished the investments to connect the 'Abyss Gate'.",bc_all,0xFF0000; //FW_NORMAL 10
+ donpcevent "Investment_total#fund00::OnReset";
+ donpcevent "#fund_master::OnCalculate_Election";
+ end;
+OnResult:
+ announce "We've got the results of the investments for the 'Abyss Gate'. You can check through the Investment Status Board in each WOE area.",bc_all,0xFF0000; //FW_NORMAL 10
+ if ($2011_agit_invest == 4) {
+ set $fund_prt01,0;
+ set $fund_prt02,0;
+ set $fund_prt03,0;
+ set $fund_prt04,0;
+ set $fund_prt05,0;
+ set $fund_prt_extra,0;
+ set $fund_pay01,0;
+ set $fund_pay02,0;
+ set $fund_pay03,0;
+ set $fund_pay04,0;
+ set $fund_pay05,0;
+ set $fund_pay_extra,0;
+ set $fund_gef01,0;
+ set $fund_gef02,0;
+ set $fund_gef03,0;
+ set $fund_gef04,0;
+ set $fund_gef05,0;
+ set $fund_gef_extra,0;
+ set $fund_alde01,0;
+ set $fund_alde02,0;
+ set $fund_alde03,0;
+ set $fund_alde04,0;
+ set $fund_alde05,0;
+ set $fund_alde_extra,0;
+ } else if ($2011_agit_invest == 2)
+ donpcevent "#fund_master::OnCalculate";
+ end;
+OnReset:
+ set $2011_agit_invest,0;
+ donpcevent "Investment_total#fund00::OnReset";
+ end;
+}
+
+prt_gld,2,2,0 script Investment_total#fund00 844,{
+/*
+ mes "Is this not working properly?";
+ next;
+ input .@input;
+ if (.@input == 1854) {
+ mes "If you think the investment timer is dead, please adjust the timer.";
+ next;
+ switch(select("Turn on the timer:Cancel")) {
+ case 1:
+ donpcevent "Investment_total#fund00::OnTimerReset";
+ mes "You've turned on the timer.";
+ close;
+ case 2:
+ mes "Canceled.";
+ close;
+ }
+ } else {
+ mes "I don't need to adjust anything now.";
+ close;
+ }
+*/
+ end;
+OnInit:
+ if (callfunc("F_Invest_Status") == 1) {
+ initnpctimer;
+ donpcevent "Investment_total#fund00::OnVarInit";
+ } else {
+ set $agit_result_timer,0;
+ set $agit_result_notice,0;
+ }
+ end;
+OnVarInit:
+ setarray .@cas$[0],"prt","pay","gef","alde";
+ for(set .@i,0; .@i<4; set .@i,.@i+1) {
+ setd "$@vfund_"+.@cas$[.@i]+"01", getd("$fund_"+.@cas$[.@i]+"01");
+ setd "$@vfund_"+.@cas$[.@i]+"02", getd("$fund_"+.@cas$[.@i]+"02");
+ setd "$@vfund_"+.@cas$[.@i]+"03", getd("$fund_"+.@cas$[.@i]+"03");
+ setd "$@vfund_"+.@cas$[.@i]+"04", getd("$fund_"+.@cas$[.@i]+"04");
+ setd "$@vfund_"+.@cas$[.@i]+"05", getd("$fund_"+.@cas$[.@i]+"05");
+ setd "$@vfund_"+.@cas$[.@i]+"_extra", getd("$fund_"+.@cas$[.@i]+"_extra");
+ }
+ end;
+OnEnable:
+ set $agit_result_timer,0;
+ set $agit_result_notice,0;
+ initnpctimer;
+ end;
+OnReset:
+ set $agit_result_timer,0;
+ set $agit_result_notice,0;
+ stopnpctimer;
+ end;
+OnTimerReset:
+ initnpctimer;
+ end;
+OnTimer3600000:
+ if (callfunc("F_Invest_Status") == 1) {
+ if ($agit_result_timer < 59) {
+ set $agit_result_timer, $agit_result_timer+1;
+
+ // Trigger on multiples of 5 up to 55, and 58.
+ if ($agit_result_timer % 10 == 5 || $agit_result_timer % 10 == 0 || $agit_result_timer == 58) {
+ set $agit_result_notice, $agit_result_notice+1;
+ donpcevent "Investment_total#fund00::OnVarInit";
+ announce "No. "+$agit_result_notice+" Interim statement is now available. You can check through the Investment Status Board in each WOE area.",bc_all,0xFF0000; //FW_NORMAL 10
+ }
+
+ donpcevent "Investment_total#fund00::OnTimerReset";
+ } else
+ stopnpctimer;
+ end;
+ } else {
+ donpcevent "Investment_total#fund00::OnReset";
+ end;
+ }
+}
+
+prt_gld,164,98,3 script Revoting Manager#Invest1 421,{
+ mes "[Revoting Manager]";
+ mes "We are not accepting additional votes.";
+ mes "Please wait for our results announcement.";
+ close;
+OnInit:
+ set .@invest_status, callfunc("F_Invest_Status");
+ if (.@invest_status == 2 && $2011_agit_invest >= 11 && $agit_revoting_timer < 30) {
+ donpcevent "Revoting Manager#Invest2::OnEnable";
+ initnpctimer;
+ } else if (.@invest_status == 3 && $2011_agit_invest >= 11)
+ donpcevent "Revoting Manager#Invest1::OnCalculate";
+ donpcevent "Revoting Manager#Invest1::OnDisable";
+ end;
+OnCalculate:
+ switch($2011_agit_invest) {
+ case 11: setarray.@cas$[0],"prt","pay"; break;
+ case 12: setarray.@cas$[0],"prt","alde"; break;
+ case 13: setarray.@cas$[0],"prt","gef"; break;
+ case 14: setarray.@cas$[0],"alde","pay"; break;
+ case 15: setarray.@cas$[0],"gef","pay"; break;
+ case 16: setarray.@cas$[0],"alde","gef"; break;
+ case 17: setarray.@cas$[0],"prt","pay","alde"; break;
+ case 18: setarray.@cas$[0],"prt","pay","gef"; break;
+ case 19: setarray.@cas$[0],"prt","alde","gef"; break;
+ case 20: setarray.@cas$[0],"alde","pay","gef"; break;
+ case 21: setarray.@cas$[0],"prt","pay","alde","gef"; break;
+ default: end;
+ }
+ set .@max, getd("$fund_"+.@cas$[0]+"_extra");
+ for(set .@i,1; .@i<getarraysize(.@cas$); set .@i,.@i+1) {
+ set .@funds, getd("$fund_"+.@cas$[.@i]+"_extra");
+ if (.@funds > .@max) {
+ set .@max, .@funds;
+ set .@ele, .@i;
+ deletearray .@rand$[0], getarraysize(.@rand$);
+ } else if (.@funds == .@max) {
+ if (!getarraysize(.@rand$))
+ set .@rand$[0], .@cas$[.@ele];
+ set .@rand$[getarraysize(.@rand$)], .@cas$[.@i];
+ }
+ }
+ if (getarraysize(.@rand$)) {
+ set .@i, rand(getarraysize(.@rand$));
+ setd "$"+.@rand$[.@i]+"_invest_result",3;
+ } else
+ setd "$"+.@cas$[.@ele]+"_invest_result",3;
+ set $2011_agit_invest,4;
+ set $agit_revoting_timer,0;
+ end;
+OnEnable:
+ enablenpc "Revoting Manager#Invest1";
+ end;
+OnDisable:
+ disablenpc "Revoting Manager#Invest1";
+ end;
+OnStart:
+ initnpctimer;
+ donpcevent "Revoting Manager#Invest2::OnNotice_on";
+ end;
+OnEnd:
+ stopnpctimer;
+ disablenpc "Revoting Manager#Invest1";
+ end;
+OnTimerReset:
+ initnpctimer;
+ end;
+OnTimer60000:
+ set .@revote, $agit_revoting_timer;
+ if (.@revote < 30) {
+ set $agit_revoting_timer, $agit_revoting_timer+1;
+ donpcevent "Revoting Manager#Invest1::OnTimerReset";
+ } else if (.@revote == 30) {
+ announce "Cat Paw Merchant Guild: Now we are going to close the additional vote. We will announce the results soon.",bc_all,0xFF0000; //FW_NORMAL 10
+ donpcevent "Revoting Manager#Invest2::OnDisable";
+ donpcevent "Revoting Manager#Invest1::OnEnable";
+ set $agit_revoting_timer, $agit_revoting_timer+1;
+ donpcevent "Revoting Manager#Invest1::OnTimerReset";
+ } else if (.@revote == 31) {
+ donpcevent "Revoting Manager#Invest1::OnCalculate";
+ donpcevent "Revoting Manager#Invest1::OnDisable";
+ stopnpctimer;
+ end;
+ } else {
+ donpcevent "Revoting Manager#Invest1::OnDisable";
+ stopnpctimer;
+ }
+ end;
+}
+
+prt_gld,164,98,3 script Revoting Manager#Invest2 421,{
+ set .@invest, $2011_agit_invest;
+ if (.@invest < 11) {
+ mes "[Revoting Manager]";
+ mes "No! This is not the time to take a revote.";
+ close2;
+ disablenpc "Revoting Manager#Invest2";
+ end;
+ }
+ set .@playtime, checkquest(7349,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "[Revoting Manager]";
+ mes "You've already participated in the vote.";
+ mes "Please relax and wait for the results.";
+ close;
+ } else if (.@playtime == 2)
+ erasequest 7349;
+ mes "[Revoting Manager]";
+ mes "Would you like to participate in the vote for choosing where to connect the 'Abyss Gate'?";
+ next;
+ if(select("Participate in the vote.:Skip for now.") == 2) {
+ mes "[Revoting Manager]";
+ mes "You've canceled the vote.";
+ close;
+ }
+ mes "[Revoting Manager]";
+ mes "You can vote once and won't need to invest for your choice.";
+ mes "Plesae choose one WOE area.";
+ next;
+
+ // Create menu.
+ explode(.@candidates$, callsub(OnGetCandidates, .@invest),"|");
+ for(set .@i,0; .@i<getarraysize(.@candidates$); set .@i,.@i+1) {
+ if (.@candidates$[.@i] == "alde")
+ set .@menu$[.@i],"Luina";
+ else if (.@candidates$[.@i] == "gef")
+ set .@menu$[.@i],"Britoniah";
+ else if (.@candidates$[.@i] == "pay")
+ set .@menu$[.@i],"Greenwood Lake";
+ else if (.@candidates$[.@i] == "prt")
+ set .@menu$[.@i],"Valkyrie Realm";
+ }
+ set .@vote, select(implode(.@menu$,":"))-1;
+
+ mes "[Revoting Manager]";
+ mes "You've voted for "+.@menu$[.@vote]+".";
+ mes "Thanks for voting.";
+ setquest 7349;
+ setd "$fund_"+.@candidates$[.@vote]+"_extra", getd("$fund_"+.@candidates$[.@vote]+"_extra") + 1;
+ close;
+OnGetCandidates:
+ switch(getarg(0)) {
+ case 11: return "prt|pay";
+ case 12: return "prt|alde";
+ case 13: return "prt|gef";
+ case 14: return "alde|pay";
+ case 15: return "gef|pay";
+ case 16: return "alde|gef";
+ case 17: return "prt|pay|alde";
+ case 18: return "prt|pay|gef";
+ case 19: return "prt|alde|gef";
+ case 20: return "alde|pay|gef";
+ case 21: return "prt|pay|alde|gef";
+ }
+ return "";
+OnInit:
+ disablenpc "Revoting Manager#Invest2";
+ end;
+OnEnable:
+ enablenpc "Revoting Manager#Invest2";
+ end;
+OnDisable:
+ disablenpc "Revoting Manager#Invest2";
+ stopnpctimer;
+ end;
+OnNotice_on:
+ initnpctimer;
+ end;
+OnTimer5000:
+ announce "Cat Paw Merchant Guild: As no WOE area has reached the maximum investment level to connect the 'Abyss Gate'...",bc_all,0xFF0000; //FW_NORMAL 10
+ end;
+OnTimer8000:
+ announce "Cat Paw Merchant Guild: We were about to connect the 'Abyss Gate' to the WOE area which invested most.",bc_all,0xFF0000; //FW_NORMAL 10
+ end;
+OnTimer11000:
+ announce "Cat Paw Merchant Guild: However, there were areas which invested the same amount. So we will put them to a vote.",bc_all,0xFF0000; //FW_NORMAL 10
+ end;
+OnTimer14000:
+ announce "Cat Paw Merchant Guild: Additional votes will be available for 30 minutes. You can vote in Valkyrie Realm.",bc_all,0xFF0000; //FW_NORMAL 10
+ end;
+OnTimer20000:
+ explode(.@candidates$, callsub(OnGetCandidates, $2011_agit_invest),"|");
+ for(set .@i,0; .@i<getarraysize(.@candidates$); set .@i,.@i+1) {
+ if (.@candidates$[.@i] == "alde")
+ set .@choices$[.@i],"Luina";
+ else if (.@candidates$[.@i] == "gef")
+ set .@choices$[.@i],"Britoniah";
+ else if (.@candidates$[.@i] == "pay")
+ set .@choices$[.@i],"Greenwood Lake";
+ else if (.@candidates$[.@i] == "prt")
+ set .@choices$[.@i],"Valkyrie Realm";
+ }
+ announce "Cat Paw Merchant Guild: The candidates for the additional vote are... "+implode(.@choices$," vs. ")+".",bc_all,0xFF0000; //FW_NORMAL 10
+ set $fund_prt_extra,0;
+ set $fund_pay_extra,0;
+ set $fund_gef_extra,0;
+ set $fund_alde_extra,0;
+ set $agit_revoting_timer,0;
+ donpcevent "Revoting Manager#Invest2::OnEnable";
+ stopnpctimer;
+ end;
+}
+
+/*
+prtg_cas01,2,2,0 script Abrai 55,{
+ mes "I should quit my steward job.";
+ close;
+OnAgitInvest:
+ switch(callfunc("F_Invest_Status")) {
+ case 0:
+ set $2011_agit_invest,0;
+ donpcevent "#fund_master::OnReset";
+ break;
+ case 1:
+ set $2011_agit_invest,1;
+ donpcevent "#fund_master::OnInvest_start";
+ break;
+ case 2:
+ set $2011_agit_invest,2;
+ donpcevent "#fund_master::OnInvest_stop";
+ break;
+ case 3:
+ donpcevent "#fund_master::OnResult";
+ break;
+ }
+ end;
+}
+*/
+
+// Realms - Merchant Guilds, Gate Managers, Status Boards
+//============================================================
+- script Cat Paw Merchant Guild -1,{
+
+ if (compare(strnpcinfo(4),"alde")) {
+ set .@npc$,"alde";
+ set .@name$,"Megrez";
+ set .@realm$,"Luina";
+ set .@intro$,"Luina Branch Manager in Al De Baran";
+ } else if (compare(strnpcinfo(4),"gef")) {
+ set .@npc$,"gef";
+ set .@name$,"Meraq";
+ set .@realm$,"Britoniah";
+ set .@intro$,"Britoniah Branch Manager";
+ } else if (compare(strnpcinfo(4),"pay")) {
+ set .@npc$,"pay";
+ set .@name$,"Phecda";
+ set .@realm$,"Greenwood Lake";
+ set .@intro$,"Payon Greenwood Lake Branch Manager";
+ } else if (compare(strnpcinfo(4),"prt")) {
+ set .@npc$,"prt";
+ set .@name$,"Dubae";
+ set .@realm$,"Valkyrie Realm";
+ set .@intro$,"Prontera Valkyrie Realm Branch Manager";
+ }
+ set .@n$,"["+.@name$+"]";
+
+ mes .@n$;
+ mes "I'm "+.@name$+", the "+.@intro$+" of the Cat Paw Merchant Guild.";
+ mes "I consult about investments for the Abyss Gate development.";
+ mes "How may I help you?";
+ next;
+ switch(select("What is the Abyss Gate?:Investing in the gate development?:I want to invest in this area.:Cancel")) {
+ case 1:
+ mes .@n$;
+ mes "It is only called the Abyss Gate for convenience but it's simply a ^4d4dffgap to another dimension^000000.";
+ next;
+ mes .@n$;
+ mes "More of these gaps are found here and there after Morocc created the Crack of Dimension.";
+ mes "I personally think that the Abyss Gate found recently is part of the past or even from the future.";
+ next;
+ mes .@n$;
+ mes "It is said that the Abyss Gate forcefully connects to another dimension beyond our world.";
+ mes "Probably because there are those that follow the Emperium's power.";
+ next;
+ mes .@n$;
+ mes "There are a total of 4 Abyss Gates found so far. They all connect to the Agit region overflowing with the Emperium's force.";
+ next;
+ mes .@n$;
+ mes "We named each by dimension beyond the gap.";
+ mes "^4d4dffWay of the Warrior, Hill of the Dead, Winds of the Ancient, and the Hero's Tears.^000000";
+ mes "And all these four gaps are called the ^4d4dffAbyss Gate^000000.";
+ next;
+ mes .@n$;
+ mes "The gap may lead to the past, future or even an unknown world.";
+ mes "The power the Abyss Gate holds is both fearful but sweet";
+ next;
+ mes .@n$;
+ mes "Are you also interested in exploring the Abyss Gate?";
+ mes "Ha ha. You'll need to go through several steps before exploring.";
+ next;
+ mes .@n$;
+ mes "If you are interested,";
+ mes "will you take the time to sit down and talk about investing in maintaining the Abyss Gate?";
+ close;
+ case 2:
+ mes .@n$;
+ mes "Are you curious about investing in the Gate development?";
+ mes "What do you want to know about?";
+ next;
+ switch(select("About the Gate?:About investments?:How to invest?:Benefits from investing?")) {
+ case 1:
+ mes .@n$;
+ mes "The Gate is what it is named after, a door.";
+ mes "A dimensional passageway that connects here to there.";
+ next;
+ mes .@n$;
+ mes "The Abyss Gate was created as a very unstable path from beyond the dimensional gap,";
+ mes "therefore traveling through the Gate will need an artificial dimension connection.";
+ next;
+ mes .@n$;
+ mes "Humans are far from having the advanced technology that's needed";
+ mes "but our Cat Paw Merchant Guild holds the high technology to use the Crack of Dimension.";
+ next;
+ mes .@n$;
+ mes "So we made a proposal.";
+ mes "With the promise of support the Cat Paw Merchant Guild and paying for the immense expense for maintaining the connection with the Gate,";
+ mes "we will make the connection to the Crack of Dimension.";
+ next;
+ mes .@n$;
+ mes "Of course working on the Crack of Dimension is no easy job and it does come with risks.";
+ mes "There are cases where people go missing from traveling between.";
+ next;
+ mes .@n$;
+ mes "The best maintaining duration is about 4 days";
+ mes "You invest in us and we create the door that connects to the dimensional gap.";
+ next;
+ mes .@n$;
+ mes "Doesn't this sound like the perfect win-win proposal?";
+ close;
+ case 2:
+ mes .@n$;
+ mes "Forcing through the unstable dimensional gap and creating a passageway is very dangerous.";
+ mes "Not to mention the huge resources needed.";
+ next;
+ mes .@n$;
+ mes "If you take care of the charges and also the danger pay by investing in the Cat Paw Merchant Guild,";
+ mes "we'll create and maintain the gate regardless of the risks.";
+ next;
+ mes .@n$;
+ mes "But then of course the money involved for the gate costs will be extreme.";
+ mes "It will be easy if you can find investors to share the amount.";
+ next;
+ mes .@n$;
+ mes "There is a basic charge to start connecting the gate.";
+ mes "Results depend on the how much investment money is collected.";
+ next;
+ mes .@n$;
+ mes "The Abyss Gate exists in each Agit region.";
+ mes "Can you imagine how much money and sacrifice our guild will have to go through to develop in all areas?";
+ next;
+ mes .@n$;
+ mes "This explains the regional competition in investments.";
+ mes "If not enough gate maintenance costs are collected then it is obvious the region with the most investments will receive the benefits";
+ next;
+ mes .@n$;
+ mes "If ^4d4dffthe Abyss Gate is successfully connected then the dungeon of the hideout area";
+ mes "will be open to others instead of being guild exclusive^000000 which will be very attractive for investment.";
+ next;
+ mes .@n$;
+ mes "But then again, this is only for when the gate is connected.";
+ close;
+ case 3:
+ mes .@n$;
+ mes "It's simple.";
+ mes "Visit the branch manager of the ^4d4dffregion you want to invest in during the investment duration^000000 and make your investment.";
+ next;
+ mes .@n$;
+ mes "We usually receive ^4d4dffthe common currency here, Zeny^000000.";
+ mes "But since we're talking about supporting our Cat Paw Merchant Guild, you can also invest with items in demand in Malangdo.";
+ next;
+ mes .@n$;
+ mes "Provide the items in need to Namis in Malangdo who is in charge of general affairs in our guild.";
+ mes "Bring back your Investment Certificate to add it to the investment tribute.";
+ next;
+ mes .@n$;
+ mes "You must visit and invest at the region you want in order for your investment to be counted as a tribute.";
+ close;
+ case 4:
+ mes .@n$;
+ mes "The Abyss Gate is basically contracting and connecting with the castle that owns the Agit;";
+ mes "therefore, we will provide all we have once the costs for connecting and maintaining the gate are sufficient.";
+ next;
+ mes .@n$;
+ mes "In terms of the minimum and maximum costs for the whole work,";
+ mes "if the collected investment ^4d4dffexceeds the minimum costs^000000, we can connect you to the ^4d4dffdeepest layer of an unknown guild dungeon^000000.";
+ next;
+ mes .@n$;
+ mes "If investments exceed the maximum costs, that region will be connected to the";
+ mes "^4d4dffAbyss Gate^000000 regardless of the investment rank which includes the deepest layer of the guild dungeon.";
+ next;
+ mes .@n$;
+ mes "^ff0000If there is no Agit region that reached the maximum investment, then the region with the";
+ mes "highest investment participation will get the Abyss Gate connected with the investment collected from all regions.^000000";
+ next;
+ mes .@n$;
+ mes "Once the Abyss Gate is connected, the deepest layer (2F) of the guild dungeon";
+ mes "will be open to all adventurers that participated in the regional investment.";
+ next;
+ mes .@n$;
+ mes "Visits to the dungeon will be counted for the next investment for the Agit region";
+ mes "so being in good terms with the guild that claims the Agit castle will be a bonus.";
+ next;
+ mes .@n$;
+ mes "By the way, it isn't easy to maintain the connection with the Abyss Gate and investments and reconnection is needed weekly";
+ mes "so please continue your support and investment if you want the power of the unknown.";
+ close;
+ }
+ case 3:
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 1000) {
+ mes "- Currently you're carrying -";
+ mes "- too many items with you. -";
+ mes "- Please try again after you -";
+ mes "- lose some weight. -";
+ close;
+ }
+ if (countitem(6488) >= 4800) {
+ mes .@n$;
+ mes "You have too many Thank You Tickets to receive any more.";
+ mes "Cannot give you any more tickets. Please use your ticket and come back.";
+ mes "The ticket can be exchanged with various items in Malangdo.";
+ close;
+ }
+ if (callfunc("F_Invest_Status") != 1) {
+ mes .@n$;
+ mes "We do not receive investments now.";
+ mes "Please come back during the investment duration.";
+ close;
+ }
+ set .@guild, getcharid(2);
+ for(set .@i,1; .@i<=5; set .@i,.@i+1) {
+ set .@castle_name$[.@i], getcastlename(.@npc$+"g_cas0"+.@i);
+ set .@owner_id[.@i], getcastledata(.@npc$+"g_cas0"+.@i,1);
+ set .@owner_name$[.@i], getguildname(.@owner_id[.@i]);
+ if (.@guild == .@owner_id[.@i]) {
+ set .@menu$, .@menu$+.@castle_name$[.@i]+" ["+.@owner_name$[.@i]+"] Guild:";
+ set .@castles_owned, .@castles_owned | (1<<.@i);
+ } else
+ set .@menu$, .@menu$+"^aaaaaaNot the guild that claimed "+.@castle_name$[.@i]+"^000000:";
+ }
+ mes .@n$;
+ mes "Would you like to invest in the ^4d4dff"+.@realm$+"^000000 region?";
+ mes "If there is a castle occupied already, you will invest in the castle and the guild that is occupying it.";
+ next;
+ if (.@castles_owned) {
+ set .@i, select(.@menu$+"Cancel");
+ if (.@i == 6) {
+ mes .@n$;
+ mes "Canceled.";
+ close;
+ }
+ if (.@guild != .@owner_id[.@i]) {
+ mes .@n$;
+ mes "The guild that is occupying "+.@castle_name$[.@i]+" is "+.@owner_name$[.@i]+".";
+ mes "Doesn't look like your guild.";
+ close;
+ }
+ mes .@n$;
+ mes "Invest under "+.@castle_name$[.@i]+"'s"+.@owner_name$[.@i]+" guild name.";
+ callfunc "F_Invest_Abyss","$fund_"+.@npc$+"0"+.@i,.@n$;
+ end;
+ } else {
+ mes .@n$;
+ callfunc "F_Invest_Abyss","$fund_"+.@npc$+"_extra",.@n$," for "+.@realm$;
+ end;
+ }
+ case 4:
+ mes .@n$;
+ mes "Is that so?";
+ mes "Please come back whenever you are interested in investing in the Abyss Gate development.";
+ close;
+ }
+}
+
+- script Gate Manager#realm -1,{
+
+ if (compare(strnpcinfo(4),"alde")) {
+ set .@npc$,"alde";
+ set .@name$,"Alkor";
+ set .@gate$,"Hero's Tears";
+ set .@realm$,"Luina";
+ } else if (compare(strnpcinfo(4),"gef")) {
+ set .@npc$,"gef";
+ set .@name$,"Mizar";
+ set .@gate$,"Hill of the Dead";
+ set .@realm$,"Britoniah";
+ } else if (compare(strnpcinfo(4),"pay")) {
+ set .@npc$,"pay";
+ set .@name$,"Alkaid";
+ set .@gate$,"Winds of the Ancient";
+ set .@realm$,"Greenwood Lake";
+ } else if (compare(strnpcinfo(4),"prt")) {
+ set .@npc$,"prt";
+ set .@name$,"Arios";
+ set .@gate$,"Way of the Warrior";
+ set .@realm$,"Valkyrie Realm";
+ }
+ set .@n$,"["+.@name$+"]";
+
+ if (callfunc("F_Invest_Status") != 3) {
+ mes .@n$;
+ mes "There are currently no connected dungeon gates.";
+ close;
+ }
+ set .@status, getd("$"+.@npc$+"_invest_result");
+ if (.@status == 3) {
+ mes .@n$;
+ mes "We've successfully connected the Abyss Gate ["+.@gate$+"] with the help from your investment.";
+ mes "The Agit dungeon will be open to everyone with a small entrance fee in "+.@realm$+".";
+ next;
+ mes .@n$;
+ mes "Please visit as often as possible since the entrance fee is saved as an investment for the region.";
+ mes "Do you want to enter the Agit dungeon?";
+ next;
+ set .@i, select(.@realm$+" Dungeon 1F - 10000z:"+.@realm$+" Dungeon 2F - 10000z:Cancel");
+ if (.@i == 3) {
+ mes .@n$;
+ mes "Canceled.";
+ close;
+ }
+ if (Zeny < 10000) {
+ mes .@n$;
+ mes "I'm collecting a small entrance fee.";
+ mes "Your contribution will be saved for the next investment.";
+ mes "Entrance fee is 10000z.";
+ close;
+ }
+ mes .@n$;
+ mes "I'm sending you to the "+.@realm$+" Agit Dungeon "+.@i+"F.";
+ set Zeny, Zeny-10000;
+ setd "$fund_"+.@npc$+"_extra", getd("$fund_"+.@npc$+"_extra") + 1;
+ close2;
+ if (compare(strnpcinfo(2),"alde"))
+ warp "gld_dun02"+((.@i == 2)?"_2":""),32,122;
+ else if (compare(strnpcinfo(2),"gef"))
+ warp "gld_dun04"+((.@i == 2)?"_2":""),39,258;
+ else if (compare(strnpcinfo(2),"pay"))
+ warp "gld_dun01"+((.@i == 2)?"_2":""),186,165;
+ else if (compare(strnpcinfo(2),"prt"))
+ warp "gld_dun03"+((.@i == 2)?"_2":""),164,268;
+ end;
+ } else if (.@status == 2) {
+ mes .@n$;
+ mes "The "+.@realm$+" Agit Dungeon 2F is now available but since it is not connected with the Abyss Gate,";
+ mes "the Agit dungeon is only accessible to the Agit guild.";
+ close;
+ } else {
+ mes .@n$;
+ mes .@realm$+" was not chosen to be connected with a gate this time.";
+ mes "Please wait for the next investment duration.";
+ close;
+ }
+ end;
+}
+
+- script Investment Status Board -1,{
+ set .@invest_status, callfunc("F_Invest_Status");
+ if (.@invest_status == 1) {
+ if (compare(strnpcinfo(4),"alde")) {
+ set .@npc$,"alde";
+ set .@realm$,"Luina";
+ } else if (compare(strnpcinfo(4),"gef")) {
+ set .@npc$,"gef";
+ set .@realm$,"Britoniah";
+ } else if (compare(strnpcinfo(4),"pay")) {
+ set .@npc$,"pay";
+ set .@realm$,"Greenwood Lake";
+ } else if (compare(strnpcinfo(4),"prt")) {
+ set .@npc$,"prt";
+ set .@realm$,"Valkyrie Realm";
+ }
+ set .@notice, $agit_result_notice;
+ if (.@notice < 1 || .@notice > 12) {
+ mes "There are currently no investment sums available.";
+ close;
+ } else if (.@notice == 1)
+ set .@str$,"1st";
+ else if (.@notice == 2)
+ set .@str$,"2nd";
+ else if (.@notice == 3)
+ set .@str$,"3rd";
+ else
+ set .@str$,.@notice+"th";
+ mes .@str$+" total (unit in 10,000z)";
+ for(set .@i,1; .@i<=5; set .@i,.@i+1) {
+ set .@map$, .@npc$+"g_cas0"+.@i;
+ set .@fund[.@i], getd("$@vfund_"+.@npc$+"0"+.@i);
+ mes getcastlename(.@map$)+" "+getguildname(getcastledata(.@map$,1))+" Guild: "+.@fund[.@i];
+ }
+ set .@fund[0], getd("$@vfund_"+.@npc$+"_extra");
+ mes .@realm$+" normal: "+.@fund[0];
+ mes .@realm$+" Investment Grand Total: "+(.@fund[0]+.@fund[1]+.@fund[2]+.@fund[3]+.@fund[4]+.@fund[5]);
+ close;
+ } else if (.@invest_status == 2) {
+ mes "!- Notice -!";
+ mes "No sums are available because the total investment amount is currently being calculated.";
+ mes "Please wait for the announcement of the results.";
+ close;
+ } else if (.@invest_status == 3) {
+ setarray .@invest_result[0], $prt_invest_result,$pay_invest_result,$gef_invest_result,$alde_invest_result;
+ setarray .@invest_region$[0], "Valkyrie Realm", "Greenwood Lake", "Britoniah", "Luina";
+ mes "!- Investment Results of All Agit Regions -!";
+ for(set .@i,0; .@i<4; set .@i,.@i+1) {
+ if (.@invest_result[.@i] == 1)
+ mes "^aaaaaa["+.@invest_region$[.@i]+"] below minimum^000000";
+ else if (.@invest_result[.@i] == 2) {
+ mes "["+.@invest_region$[.@i]+"] minimum achieved";
+ mes "-> Guild Dungeon Deepest Layer (2F) available";
+ } else if (.@invest_result[.@i] == 3) {
+ mes "^4d4dff["+.@invest_region$[.@i]+"] maximum achieved^000000";
+ mes "-> Abyss Gate available";
+ } else
+ mes "No data for ["+.@invest_region$[.@i]+"].";
+ }
+ close;
+ } else {
+ mes "!- Notice -!";
+ mes "No investment information will be announced now.";
+ close;
+ }
+}
+
+// Inside Castles - Gate Managers
+//============================================================
+- script Gate Manager#castle -1,{
+
+ set .@id, atoi(charat(strnpcinfo(2),getstrlen(strnpcinfo(2))-1));
+ if (compare(strnpcinfo(2),"alde")) {
+ set .@npc$,"alde";
+ set .@realm$,"Luina";
+ } else if (compare(strnpcinfo(2),"gef")) {
+ set .@npc$,"gef";
+ set .@realm$,"Britoniah";
+ } else if (compare(strnpcinfo(2),"pay")) {
+ set .@npc$,"pay";
+ set .@realm$,"Greenwood Lake";
+ } else if (compare(strnpcinfo(2),"prt")) {
+ set .@npc$,"prt";
+ set .@realm$,"Valkyrie Realm";
+ }
+
+ set .@GID, getcastledata(strnpcinfo(4),1);
+ if (getcharid(2) != .@GID) {
+ mes "[Gate Manager]";
+ mes "You don't seem to be the member of guild owning this castle.";
+ mes "If you need any help, please visit any of our guild members at "+.@realm$+" Square.";
+ close;
+ }
+ mes "[Gate Manager]";
+ mes "Hello, I am the Gate Manager from Cat Paw Merchant Guild warp department.";
+ mes "How may I help you today?";
+ next;
+ switch(select("Invest for gate connection:Deepest Layer Dungeon Access:Abyss Gate Access:Cancel")) {
+ case 1:
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 1000) {
+ mes "[Gate Manager]";
+ mes "You have too many items to receive the Thank You Ticket as a small gift for your investment.";
+ mes "Please come back after making room in your inventory.";
+ close;
+ }
+ if (countitem(6488) >= 4800) {
+ mes "[Gate Manager]";
+ mes "You have too many Thank You Tickets to receive any more.";
+ mes "Cannot give you any more tickets. Please use your ticket and come back.";
+ mes "The ticket can be exchanged with various items in Malangdo.";
+ close;
+ }
+ if (callfunc("F_Invest_Status") != 1) {
+ mes "[Gate Manager]";
+ mes "We do not receive investments now.";
+ mes "Please come back during the investment duration.";
+ close;
+ }
+ if (getcharid(2) != .@GID) {
+ mes "[Gate Manager]";
+ mes "You don't seem to be the member of the guild owning this castle.";
+ mes "Please use the normal investment from "+.@realm$+" Square.";
+ close;
+ }
+ mes "[Gate Manager]";
+ mes "Proceed investing under your guild name.";
+ callfunc "F_Invest_Abyss","$fund_"+.@npc$+"0"+.@id,"[Gate Manager]";
+ end;
+ case 2:
+ callsub L_Enter,1,.@realm$;
+ mes "[Gate Manager]";
+ mes "You are interested in exploring the "+.@realm$+" Guild Dungeon Deepest Layer (2F).";
+ mes "Let me guide you. Good luck.";
+ close2;
+ if (compare(strnpcinfo(2),"alde")) {
+ switch(.@id) {
+ case 1: warp "gld_dun02_2",32,122; end;
+ case 2: warp "gld_dun02_2",79,30; end;
+ case 3: warp "gld_dun02_2",165,38; end;
+ case 4: warp "gld_dun02_2",160,148; end;
+ case 5: warp "gld_dun02_2",103,169; end;
+ }
+ } else if (compare(strnpcinfo(2),"gef")) {
+ switch(.@id) {
+ case 1: warp "gld_dun04_2",39,258; end;
+ case 2: warp "gld_dun04_2",125,270; end;
+ case 3: warp "gld_dun04_2",268,251; end;
+ case 4: warp "gld_dun04_2",268,108; end;
+ case 5: warp "gld_dun04_2",230,35; end;
+ }
+ } else if (compare(strnpcinfo(2),"pay")) {
+ switch(.@id) {
+ case 1: warp "gld_dun01_2",186,165; end;
+ case 2: warp "gld_dun01_2",54,165; end;
+ case 3: warp "gld_dun01_2",54,39; end;
+ case 4: warp "gld_dun01_2",186,39; end;
+ case 5: warp "gld_dun01_2",223,202; end;
+ }
+ } else if (compare(strnpcinfo(2),"prt")) {
+ switch(.@id) {
+ case 1: warp "gld_dun03_2",28,251; end;
+ case 2: warp "gld_dun03_2",164,268; end;
+ case 3: warp "gld_dun03_2",164,179; end;
+ case 4: warp "gld_dun03_2",268,203; end;
+ case 5: warp "gld_dun03_2",199,28; end;
+ }
+ }
+ end;
+ case 3:
+ callsub L_Enter,2,.@realm$;
+ mes "[Gate Manager]";
+ mes "Let me guide you to the Abyss Gap connected with "+.@realm$+", the Abyss Gate 'Way of the Warrior'.";
+ close2;
+ if (compare(strnpcinfo(2),"alde")) {
+ switch(.@id) {
+ case 1: warp "gld2_ald",175,41; end;
+ case 2: warp "gld2_ald",77,64; end;
+ case 3: warp "gld2_ald",46,127; end;
+ case 4: warp "gld2_ald",104,246; end;
+ case 5: warp "gld2_ald",241,156; end;
+ }
+ } else if (compare(strnpcinfo(2),"gef")) {
+ switch(.@id) {
+ case 1: warp "gld2_gef",28,199; end;
+ case 2: warp "gld2_gef",217,46; end;
+ case 3: warp "gld2_gef",171,195; end;
+ case 4: warp "gld2_gef",30,67; end;
+ case 5: warp "gld2_gef",115,40; end;
+ }
+ } else if (compare(strnpcinfo(2),"pay")) {
+ switch(.@id) {
+ case 1: warp "gld2_pay",33,112; end;
+ case 2: warp "gld2_pay",119,27; end;
+ case 3: warp "gld2_pay",205,111; end;
+ case 4: warp "gld2_pay",175,221; end;
+ case 5: warp "gld2_pay",61,221; end;
+ }
+ } else if (compare(strnpcinfo(2),"prt")) {
+ switch(.@id) {
+ case 1: warp "gld2_prt",10,27; end;
+ case 2: warp "gld2_prt",14,247; end;
+ case 3: warp "gld2_prt",259,236; end;
+ case 4: warp "gld2_prt",226,25; end;
+ case 5: warp "gld2_prt",97,11; end;
+ }
+ }
+ end;
+ case 4:
+ mes "[Gate Manager]";
+ mes "Canceled.";
+ close;
+ }
+ end;
+
+L_Enter:
+ set .@invest_status, callfunc("F_Invest_Status");
+ if (.@invest_status == 3) {
+ set .@status, getd("$"+.@npc$+"_invest_result");
+ if ((getarg(0) == 1 && .@status == 2) || .@status == 3)
+ return;
+ else {
+ mes "[Gate Manager]";
+ mes getarg(1)+" was not chosen to be connected with a gate this time.";
+ mes "Please wait for the next investment duration.";
+ close;
+ }
+ } else if (.@invest_status < 3) {
+ mes "[Gate Manager]";
+ mes "There are currently no connected dungeon gates.";
+ mes "A gate will be connected as soon as the investment results are available.";
+ mes "Please wait.";
+ close;
+ } else {
+ mes "[Gate Manager]";
+ mes "The gate will disappear soon.";
+ mes "The dungeon is no longer accessible.";
+ mes "Please try again next time.";
+ close;
+ }
+}
+
+// Item Investments
+//============================================================
+malangdo,218,126,4 script Cat Paw Merchants Notice 857,{
+ mes "<< Cat Paw Merchants Notice >>";
+ mes "'^C379CEInvest Unused Items for Prizes!^000000'";
+ next;
+ switch(select("Read Notice:Check Event 1:Check Event 2")) {
+ case 1:
+ mes "- Notice -";
+ mes "Hello all Cat Paw Merchants customers! With your love, we Cat Paw Merchants are growing every day. All executives and staff members promise to do our best to further our frontier and development.";
+ next;
+ mes "- Event Notice! -";
+ mes " An Event called '^C379CEInvest Unused Items for Prizes!^000000' is under way, where you could exchange unused items in your storage for Investment Certificate of the Cat Paw Merchants.";
+ next;
+ mes "Exchangeable items will be announced on a separate sheet. Thank you for your time.";
+ mes "- From all the employees of Cat Paw Merchants -";
+ next;
+ mes "There is a small warning at the bottom.";
+ mes " ";
+ mes "^FF0000This event could be changed or repealed due to the Merchants' situation.^000000";
+ close;
+ case 2:
+ mes "'^C379CEInvest Unused Items for Prizes!^000000'";
+ mes "There are details of Event 1.";
+ next;
+ setarray .@event1$[0],
+ "Wings of the Insect Queen","Crown of the Fly King","I hear Dragon Scales are tough 01","The Meaning of the Mother's Nightmare",
+ "To refine ore","Hekekek Orcs, Orcs!!","Study of Yin-Yang","Secrets of the Pyramid King","Tick-tock the time goes",
+ "Planting trees on Mellow Island","Ancient language research","Weapons made of sharp teeth","Toy boss doll 01",
+ "A tiger is just a cat after all","The shattered spear and shield?","Toy boss doll 02","Best in summer! Cold scales",
+ "Piece of Thanatos' armor","I hear Dragon Scales are tough 02","The identity of the creepy eye","If only I could see!";
+ set .@menu$, "Quit:"+implode(.@event1$[0],":");
+ while(1) {
+ set .@i, select(.@menu$)-1;
+ switch(.@i) {
+ case 0: close;
+ case 1: set .@str$,"2 Pieces of Queen's Wing"; break;
+ case 2: set .@str$,"2 Broken Crowns"; break;
+ case 3: set .@str$,"2 Fire Dragon Scales"; break;
+ case 4: set .@str$,"3 Mother's Nightmares"; break;
+ case 5: set .@str$,"5 Gemstones"; break;
+ case 6: set .@str$,"5 Heroic Emblems"; break;
+ case 7: set .@str$,"3 Taeguk Plates"; break;
+ case 8: set .@str$,"3 Broken Pharaoh Symbols and 3 Tutankhamen's Masks"; break;
+ case 9: set .@str$,"2 Pocket Watches"; break;
+ case 10: set .@str$,"3 Young Twigs"; break;
+ case 11: set .@str$,"5 Rossata Pieces"; break;
+ case 12: set .@str$,"5 Fangs of Garm"; break;
+ case 13: set .@str$,"3 Baphomet Dolls"; break;
+ case 14: set .@str$,"1 Tiger's Footskin and 5 Tiger Skins"; break;
+ case 15: set .@str$,"3 Broken Shield Pieces and 3 Shining Spear Blades"; break;
+ case 16: set .@str$,"3 Osiris Dolls"; break;
+ case 17: set .@str$,"1 Ice Scale"; break;
+ case 18: set .@str$,"1 Skeletal Armor Piece"; break;
+ case 19: set .@str$,"1 Darkred Scale Piece"; break;
+ case 20: set .@str$,"2 Wills of Red Darkness"; break;
+ case 21: set .@str$,"2 Foolishness of the Blind"; break;
+ }
+ mes "["+.@event1$[.@i-1]+"]";
+ mes .@str$+" for one Cat Paw Merchants Investment Certificate.";
+ next;
+ }
+ case 3:
+ mes "Look out for the next '^C379CEInvest Unused Items for Prizes!^000000' Event 2!! Coming up real soon!";
+ close;
+ }
+}
+
+malangdo,218,123,1 script Namis#invest 545,4,4,{
+ if (checkweight(1201,1) == 0 || MaxWeight - Weight < 1000) {
+ mes "- Currently you're carrying -";
+ mes "- too many items with you. -";
+ mes "- Please try again after you -";
+ mes "- lose some weight. -";
+ close;
+ }
+ emotion e_omg;
+ emotion e_an;
+ emotion e_ag;
+ mes "[Namis]";
+ mes "Purr-Purr-Purrr-Purrrr-Pur~ Meow!!";
+ mes "Wh-- What? How rude. You scared me.";
+ next;
+ switch(select("What do you need? I'll invest!:What's the purpose of this event?:Were you asleep?")) {
+ case 1:
+ break;
+ case 2:
+ mes "[Namis]";
+ mes "So, another pushover in contract with the Cat Paw Merchants?";
+ next;
+ select("Huh? What! You calling me a pushover?");
+ mes "[Namis]";
+ mes "I'll say this just once, so you listen good!";
+ mes "We, the Cat Paw Merchants have planned an event for loyal workers like yourself.";
+ next;
+ mes "[Namis]";
+ mes "Run along to your storage and bring back rotting antiques to us and we'll exchange them for the oh-so valuable 'Cat Paw Merchants Investment Certificate'.";
+ next;
+ mes "[Namis]";
+ mes "It will be wise for you to do so because the Cat Paw Merchants are doing this at a loss!";
+ next;
+ mes "[Namis]";
+ mes "Details are on the notice.";
+ close;
+ case 3:
+ mes "[Namis]";
+ mes "Hick- Slurp-";
+ mes "Remember, human! There's no other cat who works as hard as I do.";
+ close;
+ }
+ mes "[Namis]";
+ mes "You must be here to participate in the '^C379CEInvest Unused Items for Prizes!^000000' event of the Cat Paw Merchants.";
+ next;
+ mes "[Namis]";
+ mes "So, which event do you wish to participate in?";
+ next;
+ switch(select("Not interested:Event 1 Items:Event 2 Items")) {
+ case 1:
+ mes "[Namis]";
+ mes "Don't you mess with a busy cat!";
+ close;
+ case 2:
+ mes "[Namis]";
+ mes "So you're in for Event 1.";
+ mes "Choose from the shown list.";
+ next;
+ setarray .@event1$[0],
+ "Wings of the Insect Queen","Crown of the Fly King","I hear Dragon Scales are tough 01","The Meaning of the Mother's Nightmare",
+ "To refine ore","Hekekek Orcs, Orcs!!","Study of Yin-Yang","Secrets of the Pyramid King","Tick-tock the time goes",
+ "Planting trees on Mellow Island","Ancient language research","Weapons made of sharp teeth","Toy boss doll 01",
+ "A tiger is just a cat after all","The shattered spear and shield?","Toy boss doll 02","Best in summer! Cold scales",
+ "Piece of Thanatos' armor","I hear Dragon Scales are tough 02","The identity of the creepy eye","If only I could see!";
+ set .@i, select(implode(.@event1$[0],":"))-1;
+ switch(.@i+1) {
+ case 1: callsub L_Check,"2 Pieces of Queen's Wing",6326,2,"Wings of the Insect Queen? What a pitiful name. I would've given some cool names!",.@event1$[.@i];
+ case 2: callsub L_Check,"2 Broken Crowns",7754,2,"For crying out loud! Those cats working on these events must be playing around. Can't they think of a better name?",.@event1$[.@i];
+ case 3: callsub L_Check,"2 Fire Dragon Scales",7451,2,"Dragon scales? Well... I guess they are tough. But what are they going to use them for?",.@event1$[.@i];
+ case 4: callsub L_Check,"3 Mother's Nightmares",7020,3,"Even though I don't have the authority to find out, I wonder what they're doing with the collected items?",.@event1$[.@i];
+ case 5: callsub L_Check,"5 Gemstones",7300,5,"Something useful for a change. The ore will end up as nice pieces of jewelry.",.@event1$[.@i];
+ case 6: callsub L_Check,"5 Heroic Emblems",968,5,"Good, good. This is the kind of name I wanted!",.@event1$[.@i];
+ case 7: callsub L_Check,"3 Taeguk Plates",7169,3,"Taking in something like this, maybe they're up to something dangerous.",.@event1$[.@i];
+ case 8: callsub L_Check,"3 Broken Pharaoh Symbols and 3 Tutankhamen's Masks",7113,3,"I hear the pyramids are in Morroc, but I've never been there. Some humans call it Morco.",.@event1$[.@i],7114,3;
+ case 9: callsub L_Check,"2 Pocket Watches",7513,2,"Those lazy merchants, why do they need pocket watches they don't even use?",.@event1$[.@i];
+ case 10: callsub L_Check,"3 Young Twigs",7018,3,"Mellow Island has a climate like with where we cats used to live. But the trees die out sometimes due to it being an island.",.@event1$[.@i];
+ case 11: callsub L_Check,"5 Rossata Pieces",7211,5,"I guess they collect these because humans have them, but what's the use of researching ancient languages?",.@event1$[.@i];
+ case 12: callsub L_Check,"5 Fangs of Garm",7036,5,"Weak humans need sharp weapons, but cats already have nice and sharp claws, so why are we collecting these!!",.@event1$[.@i];
+ case 13: callsub L_Check,"3 Baphomet Dolls",750,3,"Baphomet dolls are great for playing around with.",.@event1$[.@i];
+ case 14: callsub L_Check,"1 Tiger's Footskin and 5 Tiger Skins",1030,1,"Did you know that tigers are cats too? Therefore, cats are better than tigers.",.@event1$[.@i],1029,5;
+ case 15: callsub L_Check,"3 Broken Shield Pieces and 3 Shining Spear Blades",7108,3,"I don't know what they want with these.",.@event1$[.@i],7109,3;
+ case 16: callsub L_Check,"3 Osiris Dolls",751,3,"Shame~ I never got to play with an Osiris doll.",.@event1$[.@i];
+ case 17: callsub L_Check,"1 Ice Scale",7562,1,"Mellow Island is a fabulous place to live. But the ships are too hot.",.@event1$[.@i];
+ case 18: callsub L_Check,"1 Skeletal Armor Piece",7450,1,"Ewww... Why would they collect something so creepy?",.@event1$[.@i];
+ case 19: callsub L_Check,"1 Darkred Scale Piece",6091,1,"Dragon scales? Well... I guess they are tough. But what are they going to use them for?",.@event1$[.@i];
+ case 20: callsub L_Check,"2 Wills of Red Darkness",7566,2,"Interesting! Does it scream or something when I poke it in the eye?",.@event1$[.@i];
+ case 21: callsub L_Check,"2 Foolishness of the Blind",7021,2,"This blind man is foolish in not knowing that gathering 300 cats cures blindness...",.@event1$[.@i];
+ }
+ case 3:
+ mes "[Namis]";
+ mes "Participate in Event 2?";
+ mes "It is not yet in motion. Wait for it!";
+ close;
+ }
+ end;
+L_Check:
+ set .@args, getargcount();
+ if (.@args > 5) {
+ if (countitem(getarg(5)) < getarg(6))
+ set .@items,1; //incomplete
+ else
+ set .@items,2; //complete
+ }
+ if (countitem(getarg(1)) < getarg(2) || .@items == 1) {
+ mes "[Namis]";
+ mes "You don't have the items?";
+ mes getarg(0)+" exchange for one Cat Paw Merchants Investment Certificate.";
+ next;
+ mes "[Namis]";
+ mes "Don't bother me and look up the details on the board over there!";
+ close;
+ }
+ mes "[Namis]";
+ mes "'^8E5601"+getarg(4)+" Event^000000'";
+ mes "Seems to be the right items.";
+ mes getarg(3);
+ mes "Oh! Almost forgot. Will you invest?";
+ next;
+ if(select("Invest:Don't Invest") == 2) {
+ mes "[Namis]";
+ mes "Don't you mess with a busy cat!";
+ close;
+ }
+ delitem getarg(1),getarg(2);
+ if (.@items == 2)
+ delitem getarg(5),getarg(6);
+ getitem 6489,1; //Cats_Invest_Certif
+ mes "[Namis]";
+ mes "Here's your Certificate. Always be grateful to the Merchants for these events!";
+ close;
+OnTouch:
+ if (rand(2))
+ emotion e_yawn;
+ else
+ specialeffect EF_SLEEPATTACK;
+ end;
+}
+
+// Investment Rewards
+//============================================================
+malangdo,215,119,4 script Thanks Ticket Machine 564,{
+ if (MaxWeight - Weight < 4500 || checkweight(1201,1) == 0) {
+ mes "- Currently you're carrying -";
+ mes "- too many items with you. -";
+ mes "- Please try again after you -";
+ mes "- lose some weight. -";
+ close;
+ }
+ mes "[Vending Machine Notice]";
+ mes "^6815EA1. Don't kick the machine please. @_@";
+ mes "2. You can only insert Invest Thanks Ticket.";
+ mes "3. About the Jelly Box, if you open it, it gives you a random item.";
+ mes "4. Hope you enjoy~^000000";
+ mes "- Mr. Cat, the Machine Owner -";
+ next;
+ switch(select("Finish:Purchase:Red Paw Jelly Bag (5 Tickets):Black Paw Jelly Bag (50 Tickets)")) {
+ case 1:
+ close;
+ case 2:
+ mes "The Vending Machine is selling items in the following list.";
+ next;
+ switch(select("Finish:1 Siege Arrow Quiver A (2 Tickets):1 Siege Arrow Quiver S (2 Tickets):30 White Potion (12 Tickets):30 White Slim Potion (14 Tickets):10 Dark Water (20 Tickets):20 Siege_Violet_Potion (30 Tickets):10 Coldproof Potion (30 Tickets):10 Thunderproof Potion (30 Tickets):10 Earthproof Potion (30 Tickets):10 Fireproof Potion (30 Tickets):10 Elemental Converter[Fire] (30 Tickets)")) {
+ case 1: close;
+ case 2: callsub L_Purchase,2,12678,1; //Siege_Arrow_Quiver_A
+ case 3: callsub L_Purchase,2,12677,1; //Siege_Arrow_Quiver_S
+ case 4: callsub L_Purchase,12,504,30; //White_Potion
+ case 5: callsub L_Purchase,14,547,30; //White_Slim_Potion
+ case 6: callsub L_Purchase,20,12020,10; //Water_Of_Darkness
+ case 7: callsub L_Purchase,30,11547,20; //Woe_Violet_Potion
+ case 8: callsub L_Purchase,30,12119,10; //Resist_Water
+ case 9: callsub L_Purchase,30,12121,10; //Resist_Wind
+ case 10: callsub L_Purchase,30,12120,10; //Resist_Earth
+ case 11: callsub L_Purchase,30,12118,10; //Resist_Fire
+ case 12: callsub L_Purchase,30,12114,10,"Elemental Converter[Fire]"; //Elemental_Fire
+ case 13: callsub L_Purchase,30,12115,10,"Elemental Converter[Water]"; //Elemental_Water
+ case 14: callsub L_Purchase,30,12117,10,"Elemental Converter[Wind]"; //Elemental_Wind
+ case 15: callsub L_Purchase,30,12116,10,"Elemental Converter[Earth]"; //Elemental_Earth
+ }
+ end;
+ case 3:
+ mes "Red Paw Jelly Bag Button chosen. Need to insert 5 ^FF0000Invest Thanks Ticket^000000 and a random item will appear.";
+ next;
+ if (countitem(6488) < 5) {
+ mes "You don't have enough ^FF0000Invest Thanks Ticket^000000 to proceed.";
+ close;
+ }
+ delitem 6488,5; //Thanks_Invest_Ticket
+ set .@i, rand(1,10000);
+ if (.@i <= 100) callsub L_Bag,12531,1; //White_Potion_Box
+ else if (.@i <= 200) callsub L_Bag,12549,1; //White_Slim_Pot_Box2
+ else if (.@i <= 250) callsub L_Bag,11549,10; //Woe_Blue_Potion
+ else if (.@i <= 660) callsub L_Bag,617,1; //Old_Violet_Box
+ else if (.@i <= 710) callsub L_Bag,12532,1; //Royal_Jelly_Box2
+ else if (.@i <= 760) callsub L_Bag,12533,1; //Blue_Herb_Box2
+ else if (.@i <= 810) callsub L_Bag,505,5; //Blue_Potion
+ else if (.@i <= 1110) callsub L_Bag,644,1; //Gift_Box
+ else if (.@i <= 1120) callsub L_Bag,607,1; //Yggdrasilberry
+ else if (.@i <= 1130) callsub L_Bag,608,2; //Seed_Of_Yggdrasil
+ else if (.@i <= 1140) callsub L_Bag,12292,5; //Unripe_Fruit
+ else if (.@i <= 1150) callsub L_Bag,12293,5; //Dried_Yggdrasilberry
+ else if (.@i <= 1250) callsub L_Bag,12679,1; //Sg_White_Potion_Box
+ else if (.@i <= 1471) callsub L_Bag,603,1; //Old_Blue_Box
+ else if (.@i <= 1571) callsub L_Bag,12550,1,"Poison Bottle Box(30)"; //Poison_Bottle_Box2
+ else if (.@i <= 1671) callsub L_Bag,12020,10; //Water_Of_Darkness
+ else if (.@i <= 1871) callsub L_Bag,12030,5; //Box_Of_Grudge
+ else if (.@i <= 2071) callsub L_Bag,12031,5; //Sleepy_Box
+ else if (.@i <= 2371) callsub L_Bag,12033,2; //Box_Of_Sunlight
+ else if (.@i <= 2571) callsub L_Bag,12114,5,"Elemental Converter[Fire]"; //Elemental_Fire
+ else if (.@i <= 2771) callsub L_Bag,12115,5,"Elemental Converter[Water]"; //Elemental_Water
+ else if (.@i <= 2971) callsub L_Bag,12117,5,"Elemental Converter[Wind]"; //Elemental_Wind
+ else if (.@i <= 3171) callsub L_Bag,12116,5,"Elemental Converter[Earth]"; //Elemental_Earth
+ else if (.@i <= 3271) callsub L_Bag,12680,1; //Sg_Blue_Potion_Box
+ else if (.@i <= 3471) callsub L_Bag,12118,5; //Resist_Fire
+ else if (.@i <= 3671) callsub L_Bag,12119,5; //Resist_Water
+ else if (.@i <= 3871) callsub L_Bag,12121,5; //Resist_Wind
+ else if (.@i <= 4071) callsub L_Bag,12120,5; //Resist_Earth
+ else if (.@i <= 4271) callsub L_Bag,929,20; //Immortal_Heart
+ else if (.@i <= 4471) callsub L_Bag,1059,20; //Transparent_Cloth
+ else if (.@i <= 4671) callsub L_Bag,905,20; //Stem
+ else if (.@i <= 4871) callsub L_Bag,606,10; //Aloebera
+ else if (.@i <= 5071) callsub L_Bag,609,10; //Amulet
+ else if (.@i <= 5271) callsub L_Bag,710,2; //Illusion_Flower
+ else if (.@i <= 5471) callsub L_Bag,576,20; //Prickly_Fruit
+ else if (.@i <= 5671) callsub L_Bag,621,10; //Bitter_Herb
+ else if (.@i <= 5871) callsub L_Bag,709,10; //Izidor
+ else if (.@i <= 6071) callsub L_Bag,605,10; //Anodyne
+ else if (.@i <= 6171) callsub L_Bag,11548,10; //Woe_White_Potion
+ else if (.@i <= 6371) callsub L_Bag,706,10; //Four_Leaf_Clover
+ else if (.@i <= 6571) callsub L_Bag,521,10; //Leaflet_Of_Aloe
+ else if (.@i <= 6771) callsub L_Bag,707,10; //Singing_Plant
+ else if (.@i <= 6971) callsub L_Bag,610,10; //Leaf_Of_Yggdrasil
+ else if (.@i <= 7021) callsub L_Bag,12676,1; //Sg_Violet_Potion_Box
+ else if (.@i <= 7171) callsub L_Bag,6249,10; //Savage_Meat
+ else if (.@i <= 7321) callsub L_Bag,6252,10; //Wolf_Blood
+ else if (.@i <= 7471) callsub L_Bag,6254,10; //Beef_Head_Meat
+ else if (.@i <= 7621) callsub L_Bag,6253,10; //Cold_Ice
+ else if (.@i <= 7771) callsub L_Bag,6256,10; //Ice_Fragment
+ else if (.@i <= 7921) callsub L_Bag,6257,10; //Ice_Crystal
+ else if (.@i <= 8071) callsub L_Bag,6260,10; //Petti_Tail
+ else if (.@i <= 8309) callsub L_Bag,7932,20; //Poison_Herb_Nerium
+ else if (.@i <= 8547) callsub L_Bag,7933,20; //Poison_Herb_Rantana
+ else if (.@i <= 8785) callsub L_Bag,7934,20; //Poison_Herb_Makulata
+ else if (.@i <= 9023) callsub L_Bag,7935,20; //Poison_Herb_Seratum
+ else if (.@i <= 9261) callsub L_Bag,7936,20; //Poison_Herb_Scopolia
+ else if (.@i <= 9499) callsub L_Bag,7937,20; //Poison_Herb_Amoena
+ else if (.@i <= 9699) callsub L_Bag,6217,20; //Mandragora_Flowerpot
+ else callsub L_Bag,12016,10; //Speed_Up_Potion
+ end;
+ case 4:
+ mes "Black Paw Jelly Bag Button chosen. Need to insert 50 ^FF0000Invest Thanks Ticket^000000 and a random item will appear.";
+ next;
+ if (countitem(6488) < 50) {
+ mes "You don't have enough ^FF0000Invest Thanks Ticket^000000 to proceed.";
+ close;
+ }
+ delitem 6488,50; //Thanks_Invest_Ticket
+ set .@i, rand(1,10000);
+ if (.@i <= 100) callsub L_Bag,12531,1; //White_Potion_Box
+ else if (.@i <= 200) callsub L_Bag,12549,1; //White_Slim_Pot_Box2
+ else if (.@i <= 250) callsub L_Bag,11549,20; //Woe_Blue_Potion
+ else if (.@i <= 450) callsub L_Bag,617,1; //Old_Violet_Box
+ else if (.@i <= 500) callsub L_Bag,12532,1; //Royal_Jelly_Box2
+ else if (.@i <= 550) callsub L_Bag,12533,1; //Blue_Herb_Box2
+ else if (.@i <= 600) callsub L_Bag,505,10; //Blue_Potion
+ else if (.@i <= 800) callsub L_Bag,644,1; //Gift_Box
+ else if (.@i <= 810) callsub L_Bag,607,2; //Yggdrasilberry
+ else if (.@i <= 820) callsub L_Bag,608,3; //Seed_Of_Yggdrasil
+ else if (.@i <= 830) callsub L_Bag,12292,10; //Unripe_Fruit
+ else if (.@i <= 840) callsub L_Bag,12293,10; //Dried_Yggdrasilberry
+ else if (.@i <= 940) callsub L_Bag,12679,1; //Sg_White_Potion_Box
+ else if (.@i <= 1140) callsub L_Bag,603,1; //Old_Blue_Box
+ else if (.@i <= 1240) callsub L_Bag,12550,1,"Poison Bottle Box(30)"; //Poison_Bottle_Box2
+ else if (.@i <= 1340) callsub L_Bag,12020,20; //Water_Of_Darkness
+ else if (.@i <= 1440) callsub L_Bag,12030,10; //Box_Of_Grudge
+ else if (.@i <= 1540) callsub L_Bag,12031,10; //Sleepy_Box
+ else if (.@i <= 1690) callsub L_Bag,12033,4; //Box_Of_Sunlight
+ else if (.@i <= 1790) callsub L_Bag,12114,10,"Elemental Converter[Fire]"; //Elemental_Fire
+ else if (.@i <= 1890) callsub L_Bag,12115,10,"Elemental Converter[Water]"; //Elemental_Water
+ else if (.@i <= 1990) callsub L_Bag,12117,10,"Elemental Converter[Wind]"; //Elemental_Wind
+ else if (.@i <= 2090) callsub L_Bag,12116,10,"Elemental Converter[Earth]"; //Elemental_Earth
+ else if (.@i <= 2190) callsub L_Bag,12680,1; //Sg_Blue_Potion_Box
+ else if (.@i <= 2290) callsub L_Bag,12118,10; //Resist_Fire
+ else if (.@i <= 2390) callsub L_Bag,12119,10; //Resist_Water
+ else if (.@i <= 2490) callsub L_Bag,12121,10; //Resist_Wind
+ else if (.@i <= 2590) callsub L_Bag,12120,10; //Resist_Earth
+ else if (.@i <= 2690) callsub L_Bag,929,40; //Immortal_Heart
+ else if (.@i <= 2790) callsub L_Bag,1059,40; //Transparent_Cloth
+ else if (.@i <= 2890) callsub L_Bag,905,40; //Stem
+ else if (.@i <= 2990) callsub L_Bag,606,20; //Aloebera
+ else if (.@i <= 3090) callsub L_Bag,609,20; //Amulet
+ else if (.@i <= 3190) callsub L_Bag,710,4; //Illusion_Flower
+ else if (.@i <= 3290) callsub L_Bag,576,40; //Prickly_Fruit
+ else if (.@i <= 3390) callsub L_Bag,621,20; //Bitter_Herb
+ else if (.@i <= 3490) callsub L_Bag,709,20; //Izidor
+ else if (.@i <= 3590) callsub L_Bag,605,20; //Anodyne
+ else if (.@i <= 3690) callsub L_Bag,11548,20; //Woe_White_Potion
+ else if (.@i <= 3790) callsub L_Bag,706,20; //Four_Leaf_Clover
+ else if (.@i <= 3890) callsub L_Bag,521,20; //Leaflet_Of_Aloe
+ else if (.@i <= 3990) callsub L_Bag,707,20; //Singing_Plant
+ else if (.@i <= 4090) callsub L_Bag,610,20; //Leaf_Of_Yggdrasil
+ else if (.@i <= 4140) callsub L_Bag,12676,1; //Sg_Violet_Potion_Box
+ else if (.@i <= 4240) callsub L_Bag,6249,20; //Savage_Meat
+ else if (.@i <= 4340) callsub L_Bag,6252,20; //Wolf_Blood
+ else if (.@i <= 4440) callsub L_Bag,6254,20; //Beef_Head_Meat
+ else if (.@i <= 4540) callsub L_Bag,6253,20; //Cold_Ice
+ else if (.@i <= 4640) callsub L_Bag,6256,20; //Ice_Fragment
+ else if (.@i <= 4740) callsub L_Bag,6257,20; //Ice_Crystal
+ else if (.@i <= 4840) callsub L_Bag,6260,20; //Petti_Tail
+ else if (.@i <= 4940) callsub L_Bag,7932,40; //Poison_Herb_Nerium
+ else if (.@i <= 5040) callsub L_Bag,7933,40; //Poison_Herb_Rantana
+ else if (.@i <= 5140) callsub L_Bag,7934,40; //Poison_Herb_Makulata
+ else if (.@i <= 5240) callsub L_Bag,7935,40; //Poison_Herb_Seratum
+ else if (.@i <= 5340) callsub L_Bag,7936,40; //Poison_Herb_Scopolia
+ else if (.@i <= 5440) callsub L_Bag,7937,40; //Poison_Herb_Amoena
+ else if (.@i <= 5540) callsub L_Bag,6217,40; //Mandragora_Flowerpot
+ else if (.@i <= 6000) callsub L_Bag,12016,20; //Speed_Up_Potion
+ else if (.@i <= 6500) callsub L_Bag,2483,1; //Siege_Greave
+ else if (.@i <= 7000) callsub L_Bag,2484,1; //Siege_Boots
+ else if (.@i <= 7500) callsub L_Bag,2485,1; //Siege_Shoes
+ else if (.@i <= 8000) callsub L_Bag,2586,1; //Siege_Manteau
+ else if (.@i <= 8500) callsub L_Bag,2587,1; //Siege_Muffler
+ else if (.@i <= 9000) callsub L_Bag,15046,1; //Siege_Plate
+ else if (.@i <= 9500) callsub L_Bag,15047,1; //Siege_Suits
+ else callsub L_Bag,15048,1; //Siege_Robe
+ end;
+ }
+ end;
+
+//callsub L_Purchase,<ticket cost>,<reward ID>,<reward amount>{,<reward name>};
+L_Purchase:
+ if (countitem(6488) < getarg(0)) {
+ mes "You don't have enough ^FF0000Invest Thanks Ticket^000000 to proceed.";
+ close;
+ }
+ delitem 6488,getarg(0); //Thanks_Invest_Ticket
+ getitem getarg(1),getarg(2);
+ mes "- Done! -";
+ next;
+ mes "The item ^0000FF"+((getargcount() > 3)?getarg(3,""):getitemname(getarg(1)))+"^000000 has been obtained.";
+ close;
+
+//callsub L_Bag,<reward ID>,<reward amount>{,<reward name>};
+L_Bag:
+ getitem getarg(0),getarg(1);
+ mes "- Done! -";
+ next;
+ mes "The item ^0000FF"+((getargcount() > 2)?getarg(2,""):getitemname(getarg(0)))+"^000000 has been obtained.";
+ close;
+}
diff --git a/npc/re/guild/invest_npc.txt b/npc/re/guild/invest_npc.txt
new file mode 100644
index 000000000..3c6c45ee5
--- /dev/null
+++ b/npc/re/guild/invest_npc.txt
@@ -0,0 +1,66 @@
+//===== rAthena Script =======================================
+//= Hall of Abyss - NPC Duplicates
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Expansion for War of Emperium FE.
+//= Invest in each realm to unlock new maps:
+//= - Guild Dungeon F2, total 20,000,000z.
+//= - Hall of Abyss, total 70,000,000z.
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy]
+//============================================================
+
+// Realms - Merchant Guilds, Gate Managers, Status Boards
+//============================================================
+alde_gld,186,157,3 duplicate(Cat Paw Merchant Guild) Cat Paw Merchant Megrez 549
+alde_gld,191,164,3 duplicate(Gate Manager#realm) Gate Manager#alde_f00 421
+alde_gld,188,158,3 duplicate(Investment Status Board) Investment Status Board::InvestStatus_Alde 857
+
+gef_fild13,187,208,3 duplicate(Cat Paw Merchant Guild) Cat Paw Merchant Meraq 549
+gef_fild13,189,206,3 duplicate(Gate Manager#realm) Gate Manager#gef_f00 421
+gef_fild13,190,209,3 duplicate(Investment Status Board) Investment Status Board::InvestStatus_Gef 857
+
+pay_gld,203,189,3 duplicate(Cat Paw Merchant Guild) Cat Paw Merchant Phecda 549
+pay_gld,206,189,3 duplicate(Gate Manager#realm) Gate Manager#pay_f00 421
+pay_gld,200,189,5 duplicate(Investment Status Board) Investment Status Board::InvestStatus_Pay 857
+
+prt_gld,158,96,5 duplicate(Cat Paw Merchant Guild) Cat Paw Merchant Dubae 549
+prt_gld,161,96,3 duplicate(Gate Manager#realm) Gate Manager#prt_f00 421
+prt_gld,163,99,3 duplicate(Investment Status Board) Investment Status Board::InvestStatus_Prt 857
+
+// Inside Castles - Gate Managers
+//============================================================
+aldeg_cas01,85,105,4 duplicate(Gate Manager#castle) Gate Manager#alde_f01 421
+aldeg_cas02,124,49,3 duplicate(Gate Manager#castle) Gate Manager#alde_f02 421
+aldeg_cas03,121,75,3 duplicate(Gate Manager#castle) Gate Manager#alde_f03 421
+aldeg_cas04,25,67,7 duplicate(Gate Manager#castle) Gate Manager#alde_f04 421
+aldeg_cas05,54,200,3 duplicate(Gate Manager#castle) Gate Manager#alde_f05 421
+
+gefg_cas01,39,49,4 duplicate(Gate Manager#castle) Gate Manager#gef_f01 421
+gefg_cas02,10,65,4 duplicate(Gate Manager#castle) Gate Manager#gef_f02 421
+gefg_cas03,100,87,4 duplicate(Gate Manager#castle) Gate Manager#gef_f03 421
+gefg_cas04,35,44,3 duplicate(Gate Manager#castle) Gate Manager#gef_f04 421
+gefg_cas05,84,46,3 duplicate(Gate Manager#castle) Gate Manager#gef_f05 421
+
+payg_cas01,129,59,3 duplicate(Gate Manager#castle) Gate Manager#pay_f01 421
+payg_cas02,27,277,3 duplicate(Gate Manager#castle) Gate Manager#pay_f02 421
+payg_cas03,51,266,3 duplicate(Gate Manager#castle) Gate Manager#pay_f03 421
+payg_cas04,39,264,4 duplicate(Gate Manager#castle) Gate Manager#pay_f04 421
+payg_cas05,272,252,4 duplicate(Gate Manager#castle) Gate Manager#pay_f05 421
+
+prtg_cas01,114,178,3 duplicate(Gate Manager#castle) Gate Manager#prt_f01 421
+prtg_cas02,89,63,5 duplicate(Gate Manager#castle) Gate Manager#prt_f02 421
+prtg_cas03,72,109,3 duplicate(Gate Manager#castle) Gate Manager#prt_f03 421
+prtg_cas04,29,263,4 duplicate(Gate Manager#castle) Gate Manager#prt_f04 421
+prtg_cas05,24,23,4 duplicate(Gate Manager#castle) Gate Manager#prt_f05 421
+
+// iRO NPC Locations
+//============================================================
+//prt_gld,148,253,4 duplicate(Cat Paw Merchants Notice) Cat Paw Merchants Notice::CatPawNotice_iRO 857
+//prt_gld,145,255,6 duplicate(Namis#invest) Namis::Namis_iRO 545,4,4
+//prt_gld,165,50,4 duplicate(Thanks Ticket Machine) Thanks Ticket Machine::ThanksMachine_iRO 564
diff --git a/npc/re/instances/HazyForest.txt b/npc/re/instances/HazyForest.txt
index cb65f11d7..cecdadd20 100644
--- a/npc/re/instances/HazyForest.txt
+++ b/npc/re/instances/HazyForest.txt
@@ -1,18 +1,18 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Hazy Forest
-//===== By: ==================================================
+//===== By: ==================================================
//= Euphy
-//===== Current Version: =====================================
+//===== Current Version: =====================================
//= 1.0
-//===== Compatible With: =====================================
-//= rAthena SVN
-//===== Description: =========================================
+//===== Compatible With: =====================================
+//= Hercules
+//===== Description: =========================================
//= [Official Conversion]
//= Cross through the Hazy Forest to reach the Bifrost.
//= Contains the Wandering Guardian quest.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First version. [Euphy]
-//============================================================
+//============================================================
// Instance Creation
//============================================================
diff --git a/npc/re/mobs/dungeons/gld_dun.txt b/npc/re/mobs/dungeons/gld_dun.txt
deleted file mode 100644
index 7ac2d9f9f..000000000
--- a/npc/re/mobs/dungeons/gld_dun.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//===== Hercules Script ======================================
-//= Guild Dungeons Monster Spawn Script
-//===== By: ==================================================
-//= Athena (1.0)
-//===== Current Version: =====================================
-//= 1.3
-//===== Compatible With: =====================================
-//= Hercules
-//===== Additional Comments: =================================
-//= 1.2 Official kRO 10.1 spawns [Playtester]
-//= 1.3 Corrected MVP spawn variance. [Gepard]
-//============================================================
-
-//==================================================
-// gld_dun01 - Guild Dungeon
-//==================================================
-gld_dun01,0,0,0,0 monster Am Mut 1301,20,5000,0,0
-gld_dun01,0,0,0,0 monster Skeleton General 1290,10,5000,0,0
-gld_dun01,0,0,0,0 monster Gajomart 1309,10,5000,0,0
-gld_dun01,0,0,0,0 monster Cat o' Nine Tails 1307,3,1200000,0,0
-gld_dun01,0,0,0,0 monster Vagabond Wolf 1092,1,14400000,7200000,1
-gld_dun01,0,0,0,0 boss_monster Eddga 1115,1,28800000,600000,1
-
-//==================================================
-// gld_dun02 - Guild Dungeon
-//==================================================
-gld_dun02,0,0,0,0 monster Giant Hornet 1303,10,120000,60000,0
-gld_dun02,0,0,0,0 monster Giant Spider 1304,10,240000,120000,0
-gld_dun02,0,0,0,0 monster Ancient Worm 1305,7,120000,60000,0
-gld_dun02,0,0,0,0 monster Killer Mantis 1294,5,120000,60000,0
-gld_dun02,0,0,0,0 monster Owl Baron 1295,1,5000,0,0
-gld_dun02,0,0,0,0 boss_monster Doppelganger 1046,1,28800000,600000,1
-
-//==================================================
-// gld_dun03 - Guild Dungeon
-//==================================================
-gld_dun03,0,0,0,0 monster Caterpillar 1300,20,5000,0,0
-gld_dun03,0,0,0,0 monster Creamy Fear 1293,20,5000,0,0
-gld_dun03,0,0,0,0 monster Leib Olmai 1306,20,5000,0,0
-gld_dun03,0,0,0,0 monster Gullinbursti 1311,10,5000,0,0
-gld_dun03,0,0,0,0 monster Maya Purple 1289,3,1200000,600000,0
-gld_dun03,0,0,0,0 boss_monster Maya 1147,1,28800000,600000,1
-
-//==================================================
-// gld_dun04 - Guild Dungeon
-//==================================================
-gld_dun04,0,0,0,0 monster Zombie Master 1298,29,5000,0,0
-gld_dun04,0,0,0,0 monster Wraith Dead 1291,27,5000,0,0
-gld_dun04,0,0,0,0 monster Mini Demon 1292,3,5000,0,0
-gld_dun04,0,0,0,0 monster Dark Illusion 1302,1,1200000,0,0
-gld_dun04,0,0,0,0 monster Ghostring 1120,1,14400000,7200000,1
-gld_dun04,0,0,0,0 boss_monster Dark Lord 1272,1,28800000,600000,1
diff --git a/npc/re/mobs/dungeons/gld_re.txt b/npc/re/mobs/dungeons/gld_re.txt
new file mode 100644
index 000000000..1280755a7
--- /dev/null
+++ b/npc/re/mobs/dungeons/gld_re.txt
@@ -0,0 +1,100 @@
+//===== Hercules Script ======================================
+//= Renewal Guild Monster Spawn Script
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= Hercules
+//===== Additional Comments: =================================
+//= 1.0 First version, Hall of Abyss update. [Euphy]
+//============================================================
+
+//==================================================
+// Baldur - gld_dun01, gld_dun01_2, gld2_pay
+//==================================================
+gld_dun01,0,0,0,0 monster Gullinbursti 1311,30,5000,0,0
+gld_dun01,0,0,0,0 monster Leib Olmai 1306,55,5000,0,0
+gld_dun01,0,0,0,0 monster Cat O' Nine Tails 1307,3,1200000,0,0
+gld_dun01,0,0,0,0 boss_monster Moonlight Flower 1150,1,28800000,600000,1
+
+gld_dun01_2,0,0,0,0 monster Skeleton General 1290,50,5000,0,0
+gld_dun01_2,0,0,0,0 monster Am Mut 1301,15,5000,0,0
+gld_dun01_2,0,0,0,0 monster Gajomart 1309,20,5000,0,0
+gld_dun01_2,0,0,0,0 boss_monster Eddga 1115,1,28800000,600000,1
+
+gld2_pay,0,0,0,0 monster Skeleton General 1290,60,5000,0,0
+gld2_pay,0,0,0,0 monster Am Mut 1301,25,5000,0,0
+gld2_pay,0,0,0,0 monster Gajomart 1309,30,5000,0,0
+gld2_pay,0,0,0,0 boss_monster General Daehyun 2253,1,28800000,600000,1
+gld2_pay,0,0,0,0 monster Samurai Soheon 2254,1,1800000,600000,1
+
+//==================================================
+// Luina - gld_dun02, gld_dun02_2, gld2_ald
+//==================================================
+gld_dun02,0,0,0,0 monster Giant Hornet 1303,30,5000,0,0
+gld_dun02,0,0,0,0 monster Ancient Worm 1305,25,5000,0,0
+gld_dun02,0,0,0,0 monster Giant Spider 1304,15,5000,0,0
+gld_dun02,0,0,0,0 boss_monster Mistress 1059,1,28800000,600000,1
+
+gld_dun02_2,0,0,0,0 monster Killer Mantis 1294,30,5000,0,0
+gld_dun02_2,0,0,0,0 monster Angra Mantis 2133,40,5000,0,0
+gld_dun02_2,0,0,0,0 monster Maya Purple 1289,3,1200000,600000,0
+gld_dun02_2,0,0,0,0 boss_monster Maya 1147,1,28800000,600000,1
+
+gld2_ald,0,0,0,0 monster Killer Mantis 1294,60,5000,0,0
+gld2_ald,0,0,0,0 monster Angra Mantis 2133,70,5000,0,0
+gld2_ald,0,0,0,0 monster Maya Purple 1289,3,1200000,0,0
+gld2_ald,0,0,0,0 boss_monster Gioia 2251,1,28800000,600000,1
+gld2_ald,0,0,0,0 monster Elvira 2252,1,1800000,600000,1
+
+//==================================================
+// Valkyrie - gld_dun03, gld_dun03_02, gld2_prt
+//==================================================
+gld_dun03,0,0,0,0 monster Caterpillar 1300,35,5000,0,0
+gld_dun03,0,0,0,0 monster Creamy Fear 1293,35,5000,0,0
+gld_dun03,0,0,0,0 boss_monster Baphomet 1039,1,28800000,600000,1
+
+gld_dun03_2,0,0,0,0 monster Dark Axe Kobold 2284,13,5000,0,0
+gld_dun03_2,0,0,0,0 monster Dark Hammer Kobold 2285,23,5000,0,0
+gld_dun03_2,0,0,0,0 monster Dark Mace Kobold 2286,23,5000,0,0
+gld_dun03_2,0,0,0,0 monster Dark Kobold Archer 2287,23,5000,0,0
+gld_dun03_2,0,0,0,0 monster Kobold Leader 1296,1,14400000,7200000,1
+gld_dun03_2,0,0,0,0 boss_monster Atroce 1785,1,28800000,600000,1
+
+gld2_prt,0,0,0,0 monster Dark Axe Kobold 2284,25,5000,0,0
+gld2_prt,0,0,0,0 monster Dark Hammer Kobold 2285,35,5000,0,0
+gld2_prt,0,0,0,0 monster Dark Mace Kobold 2286,35,5000,0,0
+gld2_prt,0,0,0,0 monster Dark Kobold Archer 2287,35,5000,0,0
+gld2_prt,0,0,0,0 boss_monster Angry Student Pyuriel 2249,1,28800000,600000,1
+gld2_prt,0,0,0,0 monster Warrior Laura 2250,1,1800000,600000,1
+
+//==================================================
+// Britoniah - gld_dun04, gld_dun04_02, gld2_gef
+//==================================================
+gld_dun04,0,0,0,0 monster Mini Demon 1292,10,5000,0,0
+gld_dun04,0,0,0,0 monster Zombie Master 1298,55,5000,0,0
+gld_dun04,0,0,0,0 monster Wraith Dead 1291,25,5000,0,0
+gld_dun04,0,0,0,0 monster Ghostring 1120,1,14400000,7200000,1
+gld_dun04,0,0,0,0 boss_monster Doppelganger 1046,1,28800000,600000,1
+
+gld_dun04_2,0,0,0,0 monster Dark Frame 2282,15,5000,0,0
+gld_dun04_2,0,0,0,0 monster Dark Priest 2283,15,5000,0,0
+gld_dun04_2,0,0,0,0 monster Dark Shadow 2281,45,5000,0,0
+gld_dun04_2,0,0,0,0 monster Dark Illusion 1302,1,1200000,0,0
+gld_dun04_2,0,0,0,0 boss_monster Dark Lord 1272,1,28800000,600000,1
+
+gld2_gef,0,0,0,0 monster Dark Frame 2282,20,5000,0,0
+gld2_gef,0,0,0,0 monster Dark Priest 2283,20,5000,0,0
+gld2_gef,0,0,0,0 monster Dark Shadow 2281,80,5000,0,0
+gld2_gef,0,0,0,0 monster Dark Illusion 1302,1,1200000,0,0
+gld2_gef,0,0,0,0 boss_monster Dark Guardian Kades 2255,1,28800000,600000,1
+gld2_gef,0,0,0,0 monster Rudo 2256,1,1800000,600000,1
+
+//==================================================
+// Treasure Chests
+//==================================================
+gld2_pay,0,0,0,0 monster Treasure Chest 2288,5,5000,0,0
+gld2_ald,0,0,0,0 monster Treasure Chest 2288,5,5000,0,0
+gld2_prt,0,0,0,0 monster Treasure Chest 2288,5,5000,0,0
+gld2_gef,0,0,0,0 monster Treasure Chest 2288,5,5000,0,0
diff --git a/npc/re/scripts_monsters.conf b/npc/re/scripts_monsters.conf
index 25811f8b3..46ab419d8 100644
--- a/npc/re/scripts_monsters.conf
+++ b/npc/re/scripts_monsters.conf
@@ -18,7 +18,7 @@ npc: npc/re/mobs/dungeons/ein_dun.txt
npc: npc/re/mobs/dungeons/gef_dun.txt
npc: npc/re/mobs/dungeons/gefenia.txt
npc: npc/re/mobs/dungeons/glastheim.txt
-npc: npc/re/mobs/dungeons/gld_dun.txt
+npc: npc/re/mobs/dungeons/gld_re.txt
npc: npc/re/mobs/dungeons/gld_dunSE.txt
npc: npc/re/mobs/dungeons/gon_dun.txt
npc: npc/re/mobs/dungeons/ice_dun.txt
diff --git a/npc/re/warps/guildcastles.txt b/npc/re/warps/guildcastles.txt
new file mode 100644
index 000000000..d8eab7cea
--- /dev/null
+++ b/npc/re/warps/guildcastles.txt
@@ -0,0 +1,43 @@
+//===== rAthena Script =======================================
+//= Guild Castles Warp Script
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Warp Points for Renewal Guild Castles
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy]
+//============================================================
+
+// Hall of Abyss
+//============================================================
+gld2_prt,10,22,0 warp dun2prt_to_gld 1,1,prt_gld,252,247
+gld2_prt,14,252,0 warp dun2prt_to_gld#2 1,1,prt_gld,63,66
+gld2_prt,266,236,0 warp dun2prt_to_gld#3 1,1,prt_gld,252,247
+gld2_prt,226,21,0 warp dun2prt_to_gld#4 1,1,prt_gld,63,66
+gld2_prt,103,11,0 warp dun2prt_to_gld#5 1,1,prt_gld,252,247
+gld_dun03_2,238,274,0 warp gdun03a_prtg#abyss 1,1,prt_gld,252,247
+gld_dun03_2,42,30,0 warp gdun03b_prtg#abyss 1,1,prt_gld,63,66
+gld2_pay,33,105,0 warp dun2pay_to_gld 1,1,pay_gld,53,141
+gld2_pay,119,21,0 warp dun2pay_to_gld#2 1,1,pay_gld,53,141
+gld2_pay,205,105,0 warp dun2pay_to_gld#3 1,1,pay_gld,53,141
+gld2_pay,175,215,0 warp dun2pay_to_gld#4 1,1,pay_gld,53,141
+gld2_pay,61,215,0 warp dun2pay_to_gld#5 1,1,pay_gld,53,141
+gld_dun01_2,119,14,0 warp gdun01_payg#abyss 1,1,pay_gld,53,141
+gld2_gef,28,205,0 warp dun2gef_to_gld 1,1,gef_fild13,42,331
+gld2_gef,221,145,0 warp dun2gef_to_gld#2 1,1,gef_fild13,373,62
+gld2_gef,175,198,0 warp dun2gef_to_gld#3 1,1,gef_fild13,42,331
+gld2_gef,25,68,0 warp dun2gef_to_gld#4 1,1,gef_fild13,373,62
+gld2_gef,111,35,0 warp dun2gef_to_gld#5 1,1,gef_fild13,42,331
+gld_dun04_2,37,230,0 warp gdun04_g13a#abyss 1,1,gef_fild13,42,331
+gld_dun04_2,110,20,0 warp gdun04_g13b#abyss 1,1,gef_fild13,373,62
+gld2_ald,172,46,0 warp dun2gef_to_gld#6 1,1,alde_gld,242,121
+gld2_ald,77,58,0 warp dun2gef_to_gld#7 1,1,alde_gld,229,185
+gld2_ald,46,122,0 warp dun2gef_to_gld#8 1,1,alde_gld,242,121
+gld2_ald,104,250,0 warp dun2gef_to_gld#9 1,1,alde_gld,229,185
+gld2_ald,247,156,0 warp dun2gef_to_gld#10 1,1,alde_gld,242,121
+gld_dun02_2,20,160,0 warp gdun02a_aldega#abyss 1,1,alde_gld,229,185
+gld_dun02_2,180,112,0 warp gdun02b_aldegb#abyss 1,1,alde_gld,242,121
diff --git a/sql-files/tools/convert_engine_innodb.sql b/sql-files/tools/convert_engine_innodb.sql
index fcb240bb1..5d74b9309 100644
--- a/sql-files/tools/convert_engine_innodb.sql
+++ b/sql-files/tools/convert_engine_innodb.sql
@@ -1,11 +1,12 @@
--
--- rAthena Database Converter ( MyISAM -> InnoDB )
+-- Hercules Database Converter ( MyISAM -> InnoDB )
--
ALTER TABLE `auction` ENGINE = InnoDB;
ALTER TABLE `cart_inventory` ENGINE = InnoDB;
ALTER TABLE `char` ENGINE = InnoDB;
ALTER TABLE `charlog` ENGINE = InnoDB;
+ALTER TABLE `elemental` ENGINE = InnoDB;
ALTER TABLE `friends` ENGINE = InnoDB;
ALTER TABLE `global_reg_value` ENGINE = InnoDB;
ALTER TABLE `guild` ENGINE = InnoDB;
@@ -19,6 +20,7 @@ ALTER TABLE `guild_storage` ENGINE = InnoDB;
ALTER TABLE `homunculus` ENGINE = InnoDB;
ALTER TABLE `hotkey` ENGINE = InnoDB;
ALTER TABLE `interlog` ENGINE = InnoDB;
+ALTER TABLE `intereg` ENGINE = InnoDB;
ALTER TABLE `inventory` ENGINE = InnoDB;
ALTER TABLE `ipbanlist` ENGINE = InnoDB;
#ALTER TABLE `item_db` ENGINE = InnoDB;
@@ -38,5 +40,6 @@ ALTER TABLE `ragsrvinfo` ENGINE = InnoDB;
ALTER TABLE `sc_data` ENGINE = InnoDB;
ALTER TABLE `skill` ENGINE = InnoDB;
ALTER TABLE `skill_homunculus` ENGINE = InnoDB;
+ALTER TABLE `sql_updates` ENGINE = InnoDB;
ALTER TABLE `sstatus` ENGINE = InnoDB;
ALTER TABLE `storage` ENGINE = InnoDB;
diff --git a/sql-files/tools/convert_engine_myisam.sql b/sql-files/tools/convert_engine_myisam.sql
index 5af878f65..a05163f85 100644
--- a/sql-files/tools/convert_engine_myisam.sql
+++ b/sql-files/tools/convert_engine_myisam.sql
@@ -1,11 +1,12 @@
--
--- rAthena Database Converter ( InnoDB -> MyISAM )
+-- Hercules Database Converter ( InnoDB -> MyISAM )
--
ALTER TABLE `auction` ENGINE = MyISAM;
ALTER TABLE `cart_inventory` ENGINE = MyISAM;
ALTER TABLE `char` ENGINE = MyISAM;
ALTER TABLE `charlog` ENGINE = MyISAM;
+ALTER TABLE `elemental` ENGINE = MyISAM;
ALTER TABLE `friends` ENGINE = MyISAM;
ALTER TABLE `global_reg_value` ENGINE = MyISAM;
ALTER TABLE `guild` ENGINE = MyISAM;
@@ -19,6 +20,7 @@ ALTER TABLE `guild_storage` ENGINE = MyISAM;
ALTER TABLE `homunculus` ENGINE = MyISAM;
ALTER TABLE `hotkey` ENGINE = MyISAM;
ALTER TABLE `interlog` ENGINE = MyISAM;
+ALTER TABLE `intereg` ENGINE = MyISAM;
ALTER TABLE `inventory` ENGINE = MyISAM;
ALTER TABLE `ipbanlist` ENGINE = MyISAM;
#ALTER TABLE `item_db` ENGINE = MyISAM;
@@ -38,5 +40,6 @@ ALTER TABLE `ragsrvinfo` ENGINE = MyISAM;
ALTER TABLE `sc_data` ENGINE = MyISAM;
ALTER TABLE `skill` ENGINE = MyISAM;
ALTER TABLE `skill_homunculus` ENGINE = MyISAM;
+ALTER TABLE `sql_updates` ENGINE = MyISAM;
ALTER TABLE `sstatus` ENGINE = MyISAM;
ALTER TABLE `storage` ENGINE = MyISAM;
diff --git a/src/map/battle.c b/src/map/battle.c
index 31fe502f6..ace947aca 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -753,8 +753,8 @@ int battle_calc_masteryfix(struct block_list *src, struct block_list *target, ui
int ratio = sd->status.base_level + status_get_dex(src) + status_get_luk(src);
if ( i == 2 ) ratio += status_get_str(src); //Star Anger
if (skill < 4 )
- ratio /= 12 - 3 * skill;
- damage += damage * ratio;
+ ratio /= (12 - 3 * skill);
+ damage += damage * ratio / 100;
}
if( sc ){
@@ -4345,15 +4345,11 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
wd.damage = sstatus->max_hp* 9/100;
wd.damage2 = 0;
break;
-
-#ifdef RENEWAL
- case MO_EXTREMITYFIST: // [malufett]
- wd.damage = battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_R, (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|8, wd.flag);
- // first value is still not confirm.
- wd.damage = status_get_sp(src) + 10 * status_get_sp(src) * wd.damage / 100 + 8 * wd.damage;
- flag.tdef = 1;
- break;
case NJ_ISSEN: // [malufett]
+#ifndef RENEWAL
+ wd.damage = 40*sstatus->str +skill_lv*(sstatus->hp/10 + 35);
+ wd.damage2 = 0;
+#else
{
short totaldef = status_get_total_def(target);
i = 0;
@@ -4367,12 +4363,14 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_RATE(50);
flag.idef = 1;
}
-#else
-
- wd.damage = 40*sstatus->str +skill_lv*(sstatus->hp/10 + 35);
- wd.damage2 = 0;
-#endif
break;
+ case MO_EXTREMITYFIST: // [malufett]
+ wd.damage = battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_R, (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|8, wd.flag);
+ // first value is still not confirm.
+ wd.damage = status_get_sp(src) + 10 * status_get_sp(src) * wd.damage / 100 + 8 * wd.damage;
+ flag.tdef = 1;
+#endif
+ break;
#ifndef RENEWAL
case LK_SPIRALPIERCE:
case ML_SPIRALPIERCE:
diff --git a/src/map/clif.c b/src/map/clif.c
index 0c2d16a4d..840aad1f4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5964,12 +5964,13 @@ void clif_wis_message(int fd, const char* nick, const char* mes, int mes_len)
safestrncpy((char*)WFIFOP(fd,28), mes, mes_len);
WFIFOSET(fd,WFIFOW(fd,2));
#else
+ struct map_session_data *ssd = iMap->nick2sd(nick);
+
WFIFOHEAD(fd, mes_len + NAME_LENGTH + 8);
WFIFOW(fd,0) = 0x97;
WFIFOW(fd,2) = mes_len + NAME_LENGTH + 8;
safestrncpy((char*)WFIFOP(fd,4), nick, NAME_LENGTH);
- WFIFOL(fd,28) = 0; // isAdmin; if nonzero, also displays text above char
- // TODO: WFIFOL(fd,28) = pc->get_group_level(ssd);
+ WFIFOL(fd,28) = (pc->get_group_level(ssd) == 99) ? 1 : 0; // isAdmin; if nonzero, also displays text above char
safestrncpy((char*)WFIFOP(fd,32), mes, mes_len);
WFIFOSET(fd,WFIFOW(fd,2));
#endif
@@ -9756,7 +9757,7 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd)
if( iTimer->gettick() < sd->progressbar.timeout && sd->st )
sd->st->state = END;
- sd->progressbar.npc_id = sd->progressbar.timeout = 0;
+ sd->state.workinprogress = sd->progressbar.npc_id = sd->progressbar.timeout = 0;
npc_scriptcont(sd, npc_id, false);
}
@@ -9776,8 +9777,8 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
if (sd->sc.opt1 && ( sd->sc.opt1 == OPT1_STONEWAIT || sd->sc.opt1 == OPT1_BURNING ))
; //You CAN walk on this OPT1 value.
- else if( sd->progressbar.npc_id )
- clif->progressbar_abort(sd);
+ /*else if( sd->progressbar.npc_id )
+ clif->progressbar_abort(sd);*/
else if (pc_cant_act(sd))
return;
@@ -10572,7 +10573,7 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd)
if (pc_isdead(sd))
break;
- if ( pc_cant_act2(sd) )
+ if ( pc_cant_act2(sd) || sd->state.vending )
break;
if (sd->sc.count && (
@@ -10794,7 +10795,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
#endif
return;
}
- if ( pc_cant_act2(sd) || !(bl = iMap->id2bl(RFIFOL(fd,2))) )
+ if ( pc_cant_act2(sd) || !(bl = iMap->id2bl(RFIFOL(fd,2))) || sd->state.vending )
return;
switch (bl->type) {
diff --git a/src/map/map.c b/src/map/map.c
index d74263d1a..5f86286e9 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -5246,6 +5246,7 @@ void map_hp_symbols(void) {
HPM->share(vending,"vending");
HPM->share(pc,"pc");
HPM->share(party,"party");
+ HPM->share(trade,"trade");
HPM->share(iMap,"iMap");
/* partial */
HPM->share(mapit,"mapit");
@@ -5278,6 +5279,7 @@ void load_defaults(void) {
vending_defaults();
pc_defaults();
party_defaults();
+ trade_defaults();
}
int do_init(int argc, char *argv[])
{
diff --git a/src/map/pc.c b/src/map/pc.c
index ef70aad97..b7644f2fb 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4255,7 +4255,7 @@ int pc_useitem(struct map_session_data *sd,int n)
nullpo_ret(sd);
- if( sd->npc_id ){
+ if( sd->npc_id || sd->state.workinprogress&1 ){
/* TODO: add to clif->messages enum */
#ifdef RENEWAL
clif->msg(sd, 0x783); // TODO look for the client date that has this message.
@@ -4295,8 +4295,8 @@ int pc_useitem(struct map_session_data *sd,int n)
return 0;
/* Items with delayed consume are not meant to work while in mounts except reins of mount(12622) */
- if( sd->inventory_data[n]->flag.delay_consume ) {
- if( nameid != ITEMID_REINS_OF_MOUNT && sd->sc.data[SC_ALL_RIDING] )
+ if( sd->inventory_data[n]->flag.delay_consume && nameid != ITEMID_REINS_OF_MOUNT ) {
+ if( sd->sc.data[SC_ALL_RIDING] )
return 0;
else if( pc_issit(sd) )
return 0;
@@ -4323,7 +4323,8 @@ int pc_useitem(struct map_session_data *sd,int n)
} else {// not yet used item (all slots are initially empty)
sd->item_delay[i].nameid = nameid;
}
- sd->item_delay[i].tick = tick + sd->inventory_data[n]->delay;
+ if( !(nameid == ITEMID_REINS_OF_MOUNT && sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR)) )
+ sd->item_delay[i].tick = tick + sd->inventory_data[n]->delay;
} else {// should not happen
ShowError("pc_useitem: Exceeded item delay array capacity! (nameid=%d, char_id=%d)\n", nameid, sd->status.char_id);
}
diff --git a/src/map/pc.h b/src/map/pc.h
index 5c585af1c..43d5d40c7 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -603,7 +603,7 @@ enum equip_pos {
#define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
/* equals pc_cant_act except it doesn't check for chat rooms */
-#define pc_cant_act2(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
+#define pc_cant_act2(sd) ( (sd)->npc_id || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
#define pc_setdir(sd,b,h) ( (sd)->ud.dir = (b) ,(sd)->head_dir = (h) )
#define pc_setchatid(sd,n) ( (sd)->chatID = n )
diff --git a/src/map/script.c b/src/map/script.c
index 15870aaa7..682faa42b 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -16312,6 +16312,7 @@ BUILDIN(progressbar)
sd->progressbar.npc_id = st->oid;
sd->progressbar.timeout = iTimer->gettick() + second*1000;
+ sd->state.workinprogress = 3;
clif->progressbar(sd, strtol(color, (char **)NULL, 0), second);
return true;
@@ -16520,9 +16521,10 @@ BUILDIN(setmounting) {
TBL_PC* sd;
if( (sd = script_rid2sd(st)) == NULL )
return true;
- if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) )
+ if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) ){
+ clif->msgtable(sd->fd, 0X78b);
script_pushint(st,0);//can't mount with one of these
- else {
+ }else {
if( sd->sc.data[SC_ALL_RIDING] )
status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER);
else
diff --git a/src/map/skill.c b/src/map/skill.c
index 5a10038d8..685fec353 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2395,6 +2395,10 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
//Can't attack nor use items until skill's delay expires. [Skotlex]
sd->ud.attackabletime = sd->canuseitem_tick = sd->ud.canact_tick;
break;
+ case TK_DODGE:
+ if( pc->checkskill(sd, TK_JUMPKICK) > 0 )
+ flag = 1;
+ break;
case SR_DRAGONCOMBO:
if( pc->checkskill(sd, SR_FALLENEMPIRE) > 0 )
flag = 1;
@@ -3761,7 +3765,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
int sflag = skill_area_temp[0] & 0xFFF, heal;
if( flag&SD_LEVEL )
sflag |= SD_LEVEL; // -1 will be used in packets instead of the skill level
- if( skill_area_temp[1] != bl->id && !(skill->get_inf2(skill_id)&INF2_NPC_SKILL) )
+ if( (skill_area_temp[1] != bl->id && !(skill->get_inf2(skill_id)&INF2_NPC_SKILL)) || flag&SD_ANIMATION )
sflag |= SD_ANIMATION; // original target gets no animation (as well as all NPC skills)
heal = skill->attack(skill->get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, sflag);
@@ -3776,6 +3780,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
case GN_CARTCANNON:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
break;
+ case SR_TIGERCANNON:
+ flag |= SD_ANIMATION;
case LG_MOONSLASHER:
clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
break;
@@ -7965,12 +7971,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
for(i = 0; i < SC_MAX; i++)
{
- if( SC_COMMON_MAX > i ){
- if ( !tsc->data[i] || !status_get_sc_type(i) )
- continue;
+ if ( !tsc->data[i] )
+ continue;
+ if( SC_COMMON_MAX > i )
if ( status_get_sc_type(i)&SC_NO_CLEARANCE )
continue;
- }
switch (i) {
case SC_ASSUMPTIO:
if( bl->type == BL_MOB )
@@ -8551,7 +8556,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case SR_FLASHCOMBO:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
for(i = SR_FLASHCOMBO_ATK_STEP1; i <= SR_FLASHCOMBO_ATK_STEP4; i++)
- skill->addtimerskill(src, tick + 600 * (i - SR_FLASHCOMBO_ATK_STEP1), bl->id, 0, 0, i, skill_lv, BF_WEAPON, flag|SD_LEVEL);
+ skill->addtimerskill(src, tick + 500 * (i - SR_FLASHCOMBO_ATK_STEP1), bl->id, 0, 0, i, skill_lv, BF_WEAPON, flag|SD_LEVEL);
break;
case WA_SWING_DANCE:
case WA_MOONLIT_SERENADE:
@@ -13101,12 +13106,14 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
case TK_STORMKICK:
case TK_DOWNKICK:
case TK_COUNTER:
+ case TK_JUMPKICK:
case HT_POWER:
case GC_COUNTERSLASH:
case GC_WEAPONCRUSH:
case SR_FALLENEMPIRE:
case SR_DRAGONCOMBO:
case SR_TIGERCANNON:
+ case SR_GATEOFHELL:
break;
default: return 0;
}
diff --git a/src/map/status.c b/src/map/status.c
index 8363b8021..55b79fff7 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -915,6 +915,7 @@ void initChangeTables(void) {
StatusIconChangeTable[SC_PUSH_CART] = SI_ON_PUSH_CART;
StatusIconChangeTable[SC_REBOUND] = SI_REBOUND;
StatusIconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
+ StatusIconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
//Other SC which are not necessarily associated to skills.
StatusChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
@@ -1022,6 +1023,7 @@ void initChangeTables(void) {
StatusDisplayType[SC_BLOOD_SUCKER] = true;
StatusDisplayType[SC__SHADOWFORM] = true;
StatusDisplayType[SC__MANHOLE] = true;
+ StatusDisplayType[SC_MONSTER_TRANSFORM] = true;
#ifdef RENEWAL_EDP
// renewal EDP increases your weapon atk
@@ -2500,7 +2502,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
#ifdef RENEWAL
wa->matk += sd->inventory_data[index]->matk;
wa->wlv = wlv;
- if( r ) // renewal magic attack refine bonus
+ if( r && sd->weapontype1 != W_BOW ) // renewal magic attack refine bonus
wa->matk += refine_info[wlv].bonus[r-1] / 100;
#endif
@@ -8327,10 +8329,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
break;
case SC_BLOOD_SUCKER:
{
- struct block_list *src = iMap->id2bl(sce->val2);
+ struct block_list *src = iMap->id2bl(val2);
val3 = 1;
if(src)
- val3 = 200 + 100 * sce->val1 + status_get_int(src);
+ val3 = 200 + 100 * val1 + status_get_int(src);
val4 = tick / 1000;
tick_time = 1000; // [GodLesZ] tick time
}
@@ -8712,6 +8714,11 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick_time = 10000;
val4 = tick / tick_time;
break;
+ case SC_MONSTER_TRANSFORM:
+ if( !mobdb_checkid(val1) )
+ val1 = 1002; // default poring
+ val_flag |= 1;
+ break;
default:
if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 )
{ //Status change with no calc, no icon, and no skill associated...?
@@ -8739,8 +8746,12 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_SUMMON3:
case SC_SUMMON4:
case SC_SUMMON5:
+ case SC_MONSTER_TRANSFORM:
val_flag |= 1;
break;
+ case SC_KYOUGAKU:
+ clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
+ break;
}
}
@@ -9646,7 +9657,6 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
break;
case SC_KYOUGAKU:
- clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_KYOUGAKU);
clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_ACTIVE_MONSTER_TRANSFORM);
break;
case SC_CLAIRVOYANCE:
diff --git a/src/map/status.h b/src/map/status.h
index 617cd9572..fbce95f17 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -671,6 +671,8 @@ typedef enum sc_type {
SC_ALL_RIDING,
SC_HANBOK,
+ SC_MONSTER_TRANSFORM,
+
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;
diff --git a/src/map/trade.h b/src/map/trade.h
index 6bcefdb96..f66c70525 100644
--- a/src/map/trade.h
+++ b/src/map/trade.h
@@ -20,6 +20,6 @@ struct trade_interface {
} trade_s;
struct trade_interface *trade;
-void trade_interface(void);
+void trade_defaults(void);
#endif /* _TRADE_H_ */
diff --git a/tools/check-doc b/tools/check-doc
index 4a5dccc88..4b283fcea 100755
--- a/tools/check-doc
+++ b/tools/check-doc
@@ -3,26 +3,26 @@
# modified by lighta
case $1 in
- 'script')
+ 'script')
#find which script commands are missing from doc/script_commands.txt
echo "Missing script documentation for function :"
awk '/BUILDIN_DEF\(.*\),/ {b=match($0,"BUILDIN_DEF(.*),");c=match($0,",");print substr($0,b+12,c-b-12);}' ../src/map/script.c | xargs -I{} sh -c '! grep -Lq {} ../doc/script_commands.txt && echo {}'
awk '/BUILDIN_DEF2\(.*\),/ {b=match($0,"BUILDIN_DEF2(.*),");c=match($0,",");d=match($0 ,"\",\"");print substr($0,c+2,d-c-2);}' ../src/map/script.c | xargs -I{} sh -c '! grep -Lq {} ../doc/script_commands.txt && echo {}'
;;
- 'atc')
+ 'atc')
#find which atcommands are missing from doc/atcommands.txt
echo "Missing atcommand documentation for function :"
awk '/ACMD_DEF\(.*\),/ {b=match($0,"ACMD_DEF(.*),");c=match($0,",");print substr($0,b+9,c-b-10);}' ../src/map/atcommand.c | xargs -I{} sh -c '! grep -Lq {} ../doc/atcommands.txt && echo {}'
awk '/ACMD_DEF2\(.*\),/ {b=match($0,"ACMD_DEF2(.*),");c=match($0,",");print substr($0,b+10,c-b-10);}' ../src/map/atcommand.c | xargs -I{} sh -c '! grep -Lq {} ../doc/atcommands.txt && echo {}'
;;
- 'both')
+ 'both')
$0 script
$0 atc
;;
*)
- echo "Usage: check-doc { script | atc | both }"
+ echo "Usage: check-doc { script | atc | both }"
;;
esac