summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md56
-rw-r--r--db/constants.conf2
-rw-r--r--db/pre-re/skill_db.conf18
-rw-r--r--db/re/skill_db.conf18
-rw-r--r--doc/constants.md22
-rw-r--r--doc/sample/getiteminfo.txt21
-rw-r--r--doc/sample/npc_test_setitemx.txt11
-rw-r--r--doc/script_commands.txt52
-rw-r--r--npc/custom/item_signer.txt2
-rw-r--r--npc/custom/itembind.txt12
-rw-r--r--npc/custom/quests/quest_shop.txt8
-rw-r--r--npc/instances/EndlessTower.txt2260
-rw-r--r--npc/instances/OrcsMemory.txt726
-rw-r--r--npc/instances/SealedShrine.txt1879
-rw-r--r--npc/merchants/socket_enchant.txt9
-rw-r--r--npc/merchants/socket_enchant2.txt4
-rw-r--r--npc/other/Global_Functions.txt158
-rw-r--r--npc/other/monster_race.txt2
-rw-r--r--npc/quests/cooking_quest.txt4
-rw-r--r--npc/re/merchants/coin_exchange.txt2
-rw-r--r--npc/re/merchants/enchan_mal.txt42
-rw-r--r--npc/re/quests/eden/eden_tutorial.txt6
-rw-r--r--npc/re/quests/quests_dewata.txt2
-rw-r--r--src/char/char.c309
-rw-r--r--src/char/int_homun.c6
-rw-r--r--src/char/int_quest.c14
-rw-r--r--src/char/int_rodex.c185
-rw-r--r--src/char/int_storage.c26
-rw-r--r--src/common/HPMDataCheck.h1
-rw-r--r--src/common/mmo.h10
-rw-r--r--src/common/sql.c99
-rw-r--r--src/common/sql.h2
-rw-r--r--src/login/account_sql.c34
-rw-r--r--src/map/atcommand.c17
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/chrif.c6
-rw-r--r--src/map/clif.c70
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/elemental.c2
-rw-r--r--src/map/homunculus.h2
-rw-r--r--src/map/mapreg_sql.c6
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/mercenary.h2
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/npc.c23
-rw-r--r--src/map/npc.h3
-rw-r--r--src/map/packets_struct.h13
-rw-r--r--src/map/pc.c50
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/script.c218
-rw-r--r--src/map/script.h27
-rw-r--r--src/map/skill.c810
-rw-r--r--src/map/skill.h108
-rw-r--r--src/map/status.c16
-rw-r--r--src/map/status.h2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc198
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc28
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc7
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc462
59 files changed, 4568 insertions, 3512 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b1745233..11ab87e63 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,7 +9,56 @@ and this project does not adhere to [Semantic Versioning](http://semver.org/spec
If you are reading this in a text editor, simply ignore this section
-->
-## [v2017.10.22-1] `October 22 2017` `PATCH 1`
+## [v2017.11.19+2] `November 28 2017` `PATCH 2`
+### Fixed
+- Fixed an item loading failure in RODEX. (#1917, issue #1912)
+- Fixed invisible NPCs (such as `FAKE_NPC`) being displayed as novices. (#1918, issue #1916)
+
+## [v2017.11.19+1] `November 24 2017` `PATCH 1`
+### Fixed
+- Suppressed assertions in the Skill DB accessors when called with `skill_id = 0` (normal attacks). (#1910, issue #1909)
+
+## [v2017.11.19] `November 19 2017`
+### Added
+- Added several missing members to the login interface. (Part of #1891)
+- Added support for colored character server population counter in the service selection list. Configurable through `users_count` in login-server.conf. (#1891)
+- Added top-level command `miniboss_monster` to label monsters as minibosses, and to send them as such to the client. (part of #1889)
+- Added support for 2017-10-25 - 2017-11-01 clients. (#1889)
+- Added support to display NPCs with player classes, including equipment and styles (best with clients starting from 20170726). This extends `getunitdata()` and `setunitdata()` with support for `UDT_SEX`, `UDT_HAIRSTYLE`, `UDT_HAIRCOLOR`, `UDT_HEADBOTTOM`, `UDT_HEADMIDDLE`, `UDT_HEADTOP`, `UDT_CLOTHCOLOR`, `UDT_SHIELD`, `UDT_WEAPON`, `UDT_ROBE`, `UDT_BODY2`. (#1893)
+- Added type constants for the `getiteminfo()` and `setiteminfo()` script commands. Existing third party code must be updated to use the new constants (see the pull request description and the command documentation for details). (#1902)
+- Added global function `F_GetAmmoType()`, counterpart to `F_GetWeaponType()` for ammunitions. Both functions have now been updated to only check the subtype if the item type is correct (`IT_AMMO` and `IT_WEAPON` respectively). (part of #1902)
+- Added support for the Skill Scale packet, available in client versions 20151223 and newer. (#1903)
+
+### Changed
+- Applied script standardization to the Octopus Cave instance script. (#1882)
+- Applied script standardization to the Ghost Palace instance script. (#1879)
+- Applied script standardization to the Sara's Memory instance script. (#1884)
+- Extended the script command `setequipoption()` with the possibility to remove item options from an equipment piece. (#1865)
+- Updated the `QTYPE_*` constants (`questinfo()`, `showevent()`) to support the new 2017 client icons. (#1894)
+- Applied script standardization to the Orc's Memory instance script. (#1872)
+- Applied script standardization to the Sealed Shrine instance script. (#1873)
+- Extended the global function `F_GetArmorType()` to support costumes and shadow equipment. (#1836)
+- Extended the script commands `has_instance()` and `has_instance2()` with suport to search instances of type `IOT_NONE`. (#1397)
+- Applied script standardization and improvements to the Endless Tower instance script. (#1862)
+- Cleared some confusion between skill IDs and indexes through the codebase. Rewritten Skill DB accessors in a safer, more readable way. (part of #1896)
+
+### Deprecated
+- The use of numeric type constants with `getiteminfo()` and `setiteminfo()` is deprecated. For technical reasons, no deprecation notice is displayed. (part of #1902)
+
+### Removed
+- The `MAX_SKILL` constant has been removed, in favor of the more clear `MAX_SKILL_DB`, to be used in all places that use the compacted Skill DB array. For use with the non-compacted clientside Skill IDs, the `MAX_SKILL_ID` constant is still available. (part of #1896)
+
+### Fixed
+- Fixed compilation warnings when compiling with gcc-7. (#1887)
+- Fixed the display flag for monsters labeled as `boss_monster` to be that of MVP monsters instead of miniboss monsters. (part of #1889)
+- Fixed a subtle error in case `skill->unit_group_newid` overflows, causing certain skill unit entries to get stuck and never get deleted correctly. This can manifest itself with some monster spawns becoming immune to certain AoE spells having the `UF_NOOVERLAP` flag (Storm Gust, Lord of Vermillion, etc). (#1896)
+- Implemented MATK support in the `getiteminfo()` and `setiteminfo()`. This functionality was previously advertised as availble in the command documentation, but was not implemented. (part of #1902)
+- Restored View Sprite support in the `getiteminfo()` and `setiteminfo()`. This functionality was lost with #1828. (part of #1902, issue #1895)
+- Reimplemented the global function `F_GetArmorType()` to reflect the fact that `ITEMINFO_LOC` returns a bitmask. The function now handles multi-slot headgears and other uncommon cases better. (part of #1902)
+- Corrected some incorrect data types passed to the SQL `StmtBind` functions, causing query errors and data loss. Said functions will now have a runtime assertion to ensure the right data type is passed. Third party code needs to be updated to reflect this stricter requirement. (#1901, issue #1531)
+- Corrected some RODEX related queries in case `MAX_SLOTS` or `MAX_ITEM_OPTIONS` are set to custom values. (part of #1901)
+
+## [v2017.10.22+1] `October 22 2017` `PATCH 1`
### Fixed
- Fixed a wrong null pointer check in `logmes()`, which caused the command to never log and instead print debug information.
@@ -36,5 +85,8 @@ If you are reading this in a text editor, simply ignore this section
- New versioning scheme and project changelogs/release notes (#1853)
[Unreleased]: https://github.com/HerculesWS/Hercules/compare/stable...master
-[v2017.10.22-1]: https://github.com/HerculesWS/Hercules/compare/v2017.10.22...v2017.10.22-1
+[v2017.11.19+2]: https://github.com/HerculesWS/Hercules/compare/v2017.11.19+1...v2017.11.19+2
+[v2017.11.19+1]: https://github.com/HerculesWS/Hercules/compare/v2017.11.19...v2017.11.19+1
+[v2017.11.19]: https://github.com/HerculesWS/Hercules/compare/v2017.10.22+1...v2017.11.19
+[v2017.10.22+1]: https://github.com/HerculesWS/Hercules/compare/v2017.10.22...v2017.10.22+1
[v2017.10.22]: https://github.com/HerculesWS/Hercules/compare/6b1fe2d...v2017.10.22
diff --git a/db/constants.conf b/db/constants.conf
index 921acbeaf..eda877671 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -3870,4 +3870,6 @@ constants_db: {
UDT_LIFETIME: 52
UDT_MERC_KILLCOUNT: 53
UDT_STATADD: 54
+ UDT_ROBE: 55
+ UDT_BODY2: 56
}
diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf
index 80527b4f6..06c06dd16 100644
--- a/db/pre-re/skill_db.conf
+++ b/db/pre-re/skill_db.conf
@@ -73,6 +73,7 @@
Works like skill SA_FREECAST, allow move and attack with reduced speed.
FreeCastNormal: true/false (boolean, defaults to false)
Works like FreeCastReduced, but not reduce speed.
+ ShowSkillScale: true/false (boolean, defaults to false)
}
AttackType: "Attack Type" (string, defaults to "None")
Types: "None", "Weapon", "Magic" or "Misc"
@@ -16551,6 +16552,7 @@ skill_db: (
SkillInfo: {
NPC: true
IgnoreLandProtector: true
+ ShowSkillScale: true
}
AttackType: "Weapon"
DamageType: {
@@ -16698,6 +16700,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -16758,6 +16761,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Weapon"
DamageType: {
@@ -16777,6 +16781,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Weapon"
DamageType: {
@@ -16797,6 +16802,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -16828,6 +16834,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -16859,6 +16866,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -16890,6 +16898,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -16921,6 +16930,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -16952,6 +16962,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -16983,6 +16994,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Magic"
Element: "Ele_Fire"
@@ -17006,6 +17018,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Magic"
Element: "Ele_Dark"
@@ -17069,6 +17082,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17174,6 +17188,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17205,6 +17220,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17236,6 +17252,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Weapon"
DamageType: {
@@ -17265,6 +17282,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index 2a59785fa..815442fd9 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -73,6 +73,7 @@
Works like skill SA_FREECAST, allow move and attack with reduced speed.
FreeCastNormal: true/false (boolean, defaults to false)
Works like FreeCastReduced, but not reduce speed.
+ ShowSkillScale: true/false (boolean, defaults to false)
}
AttackType: "Attack Type" (string, defaults to "None")
Types: "None", "Weapon", "Magic" or "Misc"
@@ -17009,6 +17010,7 @@ skill_db: (
SkillInfo: {
NPC: true
IgnoreLandProtector: true
+ ShowSkillScale: true
}
AttackType: "Weapon"
DamageType: {
@@ -17156,6 +17158,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17216,6 +17219,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Weapon"
DamageType: {
@@ -17235,6 +17239,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Weapon"
DamageType: {
@@ -17255,6 +17260,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17286,6 +17292,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17317,6 +17324,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17348,6 +17356,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17379,6 +17388,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17410,6 +17420,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17441,6 +17452,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Magic"
Element: "Ele_Fire"
@@ -17464,6 +17476,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Magic"
Element: "Ele_Dark"
@@ -17527,6 +17540,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17632,6 +17646,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17663,6 +17678,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
@@ -17694,6 +17710,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
AttackType: "Weapon"
DamageType: {
@@ -17723,6 +17740,7 @@ skill_db: (
}
SkillInfo: {
NPC: true
+ ShowSkillScale: true
}
DamageType: {
NoDamage: true
diff --git a/doc/constants.md b/doc/constants.md
index 828ece36a..7a9e6ea18 100644
--- a/doc/constants.md
+++ b/doc/constants.md
@@ -3787,6 +3787,8 @@
- `UDT_LIFETIME`: 52
- `UDT_MERC_KILLCOUNT`: 53
- `UDT_STATADD`: 54
+- `UDT_ROBE`: 55
+- `UDT_BODY2`: 56
## Hardcoded Constants (source)
@@ -4078,6 +4080,26 @@
- `MAPINFO_SIZE_Y`: 3
- `MAPINFO_ZONE`: 4
+### set/getiteminfo options
+
+- `ITEMINFO_BUYPRICE`: 0
+- `ITEMINFO_SELLPRICE`: 1
+- `ITEMINFO_TYPE`: 2
+- `ITEMINFO_MAXCHANCE`: 3
+- `ITEMINFO_SEX`: 4
+- `ITEMINFO_LOC`: 5
+- `ITEMINFO_WEIGHT`: 6
+- `ITEMINFO_ATK`: 7
+- `ITEMINFO_DEF`: 8
+- `ITEMINFO_RANGE`: 9
+- `ITEMINFO_SLOTS`: 10
+- `ITEMINFO_SUBTYPE`: 11
+- `ITEMINFO_ELV`: 12
+- `ITEMINFO_WLV`: 13
+- `ITEMINFO_VIEWID`: 14
+- `ITEMINFO_MATK`: 15
+- `ITEMINFO_VIEWSPRITE`: 16
+
### Renewal
- `RENEWAL`: 1
diff --git a/doc/sample/getiteminfo.txt b/doc/sample/getiteminfo.txt
index 89f9a66b5..57407c072 100644
--- a/doc/sample/getiteminfo.txt
+++ b/doc/sample/getiteminfo.txt
@@ -16,8 +16,23 @@ prontera,156,179,6 script test_getiteminfo 4_F_KAFRA1,{
// ^nItemID^XXXX -> Item Name
mes "Item ID: "+.@value+" ^nItemID^"+.@value;
- mes "Current item info:";
- for (.@id = 0; .@id < 14; ++.@id)
- mes " getiteminfo("+.@value+","+.@id+") = "+getiteminfo(.@value,.@id);
+ mes("Current item info:");
+ mesf("Buy Price: %d", getiteminfo(.@value, ITEMINFO_BUYPRICE));
+ mesf("Sell Price: %d", getiteminfo(.@value, ITEMINFO_SELLPRICE));
+ mesf("Type: %d", getiteminfo(.@value, ITEMINFO_TYPE));
+ mesf("Max drop chance: %d.%02d", getiteminfo(.@value, ITEMINFO_MAXCHANCE) / 100, getiteminfo(.@value, ITEMINFO_MAXCHANCE) % 100);
+ mesf("Sex: %d", getiteminfo(.@value, ITEMINFO_SEX));
+ mesf("Equip location: %d", getiteminfo(.@value, ITEMINFO_LOC));
+ mesf("Weight: %d.%d", getiteminfo(.@value, ITEMINFO_WEIGHT) / 10, getiteminfo(.@value, ITEMINFO_WEIGHT) % 10);
+ mesf("Attack: %d", getiteminfo(.@value, ITEMINFO_ATK));
+ mesf("Defense: %d", getiteminfo(.@value, ITEMINFO_DEF));
+ mesf("Range: %d", getiteminfo(.@value, ITEMINFO_RANGE));
+ mesf("Slots: %d", getiteminfo(.@value, ITEMINFO_SLOTS));
+ mesf("Subtype: %d", getiteminfo(.@value, ITEMINFO_SUBTYPE));
+ mesf("Equip Level: %d", getiteminfo(.@value, ITEMINFO_ELV));
+ mesf("Weapon Level: %d", getiteminfo(.@value, ITEMINFO_WLV));
+ mesf("View ID: %d", getiteminfo(.@value, ITEMINFO_VIEWID));
+ mesf("MATK: %d", getiteminfo(.@value, ITEMINFO_MATK));
+ mesf("View Sprite: %d", getiteminfo(.@value, ITEMINFO_VIEWSPRITE));
close;
}
diff --git a/doc/sample/npc_test_setitemx.txt b/doc/sample/npc_test_setitemx.txt
index a06f0dc9f..519cfa363 100644
--- a/doc/sample/npc_test_setitemx.txt
+++ b/doc/sample/npc_test_setitemx.txt
@@ -14,15 +14,14 @@ prontera,164,161,5 script Lupus WOLF,{
switch (select("Make Knife[3] Edible", "Make Apple Equippable", "Edible Knife = Full SP", "Knife = Weapon + 3 Notes")) {
case 1:
mes "Ok. We made Knife[3] edible.";
- setiteminfo(Knife, 2, IT_HEALING); //type = 0 : potion
+ setiteminfo(Knife, ITEIMINFO_TYPE, IT_HEALING);
setitemscript(Knife, "{dispbottom \"* You used Knife[3]\";}");
break;
case 2:
mes "Ok. We made Apple equippable.";
- setiteminfo(Apple, 2, IT_ARMOR); //item type -> headgear (type = 5 -> IT_ARMOR)
- setiteminfo(Apple, 5, 512); //where to equip to (equip = 512)
- setiteminfo(Apple, 11, 256); //set as headgear location (loc = 256)
- setiteminfo(Apple, 14, 85); //set Headgear Sprite ID (view id = 85)
+ setiteminfo(Apple, ITEMINFO_TYPE, IT_ARMOR);
+ setiteminfo(Apple, ITEMINFO_LOC, EQP_HEAD_MID); //where to equip to (equip = 512)
+ setiteminfo(Apple, ITEMINFO_VIEWID, 85); //set Headgear Sprite ID (view id = 85)
setitemscript(Apple, "{dispbottom \"* Other item's changed\";}", 0);
setitemscript(Apple, "{dispbottom \"* Equipped\";}", 1);
setitemscript(Apple, "{dispbottom \"* Unequipped\";}", 2);
@@ -34,7 +33,7 @@ prontera,164,161,5 script Lupus WOLF,{
break;
case 4:
mes "Ok. We made Knife a weapon, but added 3 notes.";
- setiteminfo(Knife, 2, IT_WEAPON); //type = 4 -> IT_WEAPON
+ setiteminfo(Knife, ITEIMINFO_TYPE, IT_WEAPON);
setitemscript(Knife, "{dispbottom \"* 1 Used\";}", 0);
setitemscript(Knife, "{dispbottom \"* 2 Equipped\";}", 1);
setitemscript(Knife, "{dispbottom \"* 3 Unequipped\";}", 2);
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 940302982..465804061 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3176,23 +3176,43 @@ Example:
---------------------------------------
*getiteminfo(<item ID>, <type>)
+*setiteminfo(<item ID>, <type>, <value>)
This function will look up the item with the specified ID number in the
database and return the info set by TYPE argument.
It will return -1 if there is no such item.
Valid types are:
- 0 - Buy Price; 1 - Sell Price; 2 - Item Type;
- 3 - maxchance (Max drop chance of this item e.g. 1 = 0.01% , etc..
+
+ ITEMINFO_BUYPRICE - Buy Price
+ ITEMINFO_SELLPRICE - Sell Price
+ ITEMINFO_TYPE - Item Type
+ ITEMINFO_MAXCHANCE - Max drop chance of this item e.g. 1 = 0.01% , etc..
if = 0, then monsters don't drop it at all (rare or a quest item)
if = 10000, then this item is sold in NPC shops only
- 4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range;
- 10 - slot; 11 - subtype; 12 - elv; 13 - wlv; 14 - view id
-
- If RENEWAL is defined, 15 - matk
+ ITEMINFO_SEX - Sex
+ ITEMINFO_LOC - Equip location
+ ITEMINFO_WEIGHT - Weight (note: 1/10 of unit)
+ ITEMINFO_ATK - Attack
+ ITEMINFO_DEF - Defense
+ ITEMINFO_RANGE - Range
+ ITEMINFO_SLOTS - Slots
+ ITEMINFO_SUBTYPE - Item subtype
+ ITEMINFO_ELV - Equip min. level
+ ITEMINFO_WLV - Weapon level
+ ITEMINFO_VIEWID - View ID ("Sprite" field in the Item DB)
+ ITEMINFO_MATK - MATK (only relevant if RENEWAL is set)
+ ITEMINFO_VIEWSPRITE - View Sprite ("ViewSprite" field in the Item DB)
Check sample in doc/sample/getiteminfo.txt
+The setiteminfo function will, instead, set the item's parameters. It returns
+the new value on success, or -1 on failure (item_id not found).
+
+Example:
+
+ setiteminfo(Stone, ITEMINFO_WEIGHT, 9990); // Stone now weighs 999.0
+
---------------------------------------
*getequipisenableopt(<equipment slot>)
@@ -8296,26 +8316,6 @@ Example:
---------------------------------------
-*setiteminfo(<item id>, <type>, <value>)
-
-This function will set some value of an item.
-Returns the new value on success, or -1 on fail (item_id not found or
-invalid type).
-
-Valid types are:
- 0 - Buy Price; 1 - Sell Price; 2 - Item Type;
- 3 - maxchance (Max drop chance of this item e.g. 1 = 0.01% , etc..
- if = 0, then monsters don't drop it at all (rare or a quest item)
- if = 10000, then this item is sold in NPC shops only
- 4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range;
- 10 - slot; 11 - subtype; 12 - elv; 13 - wlv; 14 - view id
-
-Example:
-
-setiteminfo Stone, 6, 9990; // Stone now weighs 999.0
-
----------------------------------------
-
*setitemscript(<item id>, <"{ new item script }">{, <type>})
Set a new script bonus to the Item. Very useful for game events.
diff --git a/npc/custom/item_signer.txt b/npc/custom/item_signer.txt
index a0097bb55..6c12926e5 100644
--- a/npc/custom/item_signer.txt
+++ b/npc/custom/item_signer.txt
@@ -78,7 +78,7 @@ prt_in,24,61,7 script Perchik 1_M_01,{
emotion e_hmm;
close;
}
- if (getiteminfo(.@id,10)) {
+ if (getiteminfo(.@id, ITEMINFO_SLOTS) > 0) {
mes "Sorry, I don't sign slotted items.";
emotion e_sry;
close;
diff --git a/npc/custom/itembind.txt b/npc/custom/itembind.txt
index 8c51ad24d..7d95afdfc 100644
--- a/npc/custom/itembind.txt
+++ b/npc/custom/itembind.txt
@@ -35,14 +35,10 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{
//Allows equipment (default) or non-rental item
if (@inventorylist_bound[.@i] || @inventorylist_expire[.@i])
continue;
- if (((.allowbind & 1) && (getiteminfo(@inventorylist_id[.@i], 2) == IT_WEAPON || getiteminfo(@inventorylist_id[.@i], 2) == IT_ARMOR)) ||
- ((.allowbind & 2) &&
- (getiteminfo(@inventorylist_id[.@i], 2) == IT_HEALING || getiteminfo(@inventorylist_id[.@i], 2) == IT_USABLE ||
- getiteminfo(@inventorylist_id[.@i], 2) == IT_DELAYCONSUME || getiteminfo(@inventorylist_id[.@i], 2) == IT_CASH)) ||
- ((.allowbind & 4) &&
- (getiteminfo(@inventorylist_id[.@i], 2) == IT_ETC || getiteminfo(@inventorylist_id[.@i], 2) == IT_CARD ||
- getiteminfo(@inventorylist_id[.@i], 2) == IT_PETEGG || getiteminfo(@inventorylist_id[.@i], 2) == IT_PETARMOR ||
- getiteminfo(@inventorylist_id[.@i], 2) == IT_AMMO))
+ .@itemtype = getiteminfo(@inventorylist_id[.@i], ITEMINFO_TYPE);
+ if (((.allowbind & 1) != 0 && (.@itemtype == IT_WEAPON || .@itemtype == IT_ARMOR))
+ || ((.allowbind & 2) != 0 && (.@itemtype == IT_HEALING || .@itemtype == IT_USABLE || .@itemtype == IT_DELAYCONSUME || .@itemtype == IT_CASH))
+ || ((.allowbind & 4) != 0 && (.@itemtype == IT_ETC || .@itemtype == IT_CARD || .@itemtype == IT_PETEGG || .@itemtype == IT_PETARMOR || .@itemtype == IT_AMMO))
) {
set .@bindlist$, .@bindlist$ + ":" + getitemname(@inventorylist_id[.@i]) + " - " + @inventorylist_id[.@i];
set .@bindlist[.@j],.@i;
diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt
index 6805220f7..739b53c02 100644
--- a/npc/custom/quests/quest_shop.txt
+++ b/npc/custom/quests/quest_shop.txt
@@ -121,8 +121,8 @@ OnBuyItem:
if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000";
next;
- setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11);
- if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192)))
+ setarray @qe[1], getiteminfo(.@q[0], ITEMINFO_LOC), getiteminfo(.@q[0], ITEMINFO_VIEWSPRITE);
+ if (@qe[2] > 0 && ((@qe[1] & EQP_HEAD_LOW) || (@qe[1] & EQP_HEAD_TOP) || (@qe[1] & EQP_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_TOP) || (@qe[1] & EQP_COSTUME_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_LOW) || (@qe[1] & EQP_GARMENT) || (@qe[1] & EQP_COSTUME_GARMENT)))
set .@preview,1;
addtimer 1000, strnpcinfo(NPC_NAME)+"::OnEnd";
while(1) {
@@ -135,7 +135,7 @@ OnBuyItem:
}
if (!checkweight(.@q[0],.@q[2])) {
mes "[Quest Shop]";
- mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
+ mes "^FF0000You need "+(((.@q[2] * getiteminfo(.@q[0], ITEMINFO_WEIGHT)) + Weight - MaxWeight) / 10)+" additional weight capacity to complete this trade.^000000";
close;
}
if (.@q[4]) Zeny -= (.@q[4]*.@q[1]);
@@ -198,7 +198,7 @@ function Slot {
set .@s$,getitemname(getarg(0));
switch(.ShowSlot) {
case 1: if (!getitemslots(getarg(0))) return .@s$;
- case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]";
+ case 2: if (getiteminfo(getarg(0), ITEMINFO_TYPE) == IT_WEAPON || getiteminfo(getarg(0), ITEMINFO_TYPE) == IT_ARMOR) return .@s$+" ["+getitemslots(getarg(0))+"]";
default: return .@s$;
}
}
diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt
index f94bc177a..dc60ce766 100644
--- a/npc/instances/EndlessTower.txt
+++ b/npc/instances/EndlessTower.txt
@@ -37,164 +37,163 @@
//=========================================================================
alberta,214,77,6 script Captain Janssen 4_M_SEAMAN,{
- if (checkweight(Knife,1) == 0) {
- mes "^008800Wait here!!";
- mes "You're carrying too much stuff. Why don't you put some of it away, and then come back.^000000";
- close;
+ if (checkweight(Knife, 1) == 0) {
+ mes("^008800Wait here!!");
+ mes("You're carrying too much stuff. Why don't you put some of it away, and then come back.^000000");
+ close();
}
if (BaseLevel < 50) {
- mes "[Captain Janssen]";
- mes "Sigh... I don't know if I can ever go back to sailing the sea...";
- close;
+ mes("[Captain Janssen]");
+ mes("Sigh... I don't know if I can ever go back to sailing the sea...");
+ close();
}
.@name$ = strcharinfo(PC_NAME);
if (in_102tower == 1) {
- mes "^0000ffLooking incredibly excited, the old man ran into the marine shop hurriedly ordering goods. You don't have anything better to do, so you decide to ask him why he is in such a rush.^000000";
- next;
- mes "^0000ffThe old man, after finishing his orders, walks towards you.^000000";
- next;
- mes "[Captain Janssen]";
- mes "I was touched when you accepted a request from me, a stranger, so easily. You must truly be one of those good, heroic adventurers. Are you interested in setting out on an ocean voyage?";
- next;
- mes "["+.@name$+"]";
- mes "I've sailed a few times... But now that I think about it, I've never gone across the continent.";
- next;
- mes "[Captain Janssen]";
- mes "No, that's good enough. I may just have one small fishing vessel, but I used to be a captain that commanded a fleet.";
- next;
- mes "[Captain Janssen]";
- mes "As you may know after a few sea voyages, not many people have gone across the ocean beyond the continent. I too have failed to conquer the ocean.";
- next;
- mes "^0000ffMr. Janssen talked about his perilous ocean journeys for quite a while. You have enough time on your hands, so you sit down, quietly listening to his story.^000000";
- next;
- mes "^0000ffAt least half of his story sounded grossly exaggerated, but something caught your ear: he insists that a humongous tower exists on the ocean, and that it's so tall, it scrapes across the sky.^000000";
+ mes("^0000ffLooking incredibly excited, the old man ran into the marine shop hurriedly ordering goods. You don't have anything better to do, so you decide to ask him why he is in such a rush.^000000");
+ next();
+ mes("^0000ffThe old man, after finishing his orders, walks towards you.^000000");
+ next();
+ mes("[Captain Janssen]");
+ mes("I was touched when you accepted a request from me, a stranger, so easily. You must truly be one of those good, heroic adventurers. Are you interested in setting out on an ocean voyage?");
+ next();
+ mesf("[%s]", .@name$);
+ mes("I've sailed a few times... But now that I think about it, I've never gone across the continent.");
+ next();
+ mes("[Captain Janssen]");
+ mes("No, that's good enough. I may just have one small fishing vessel, but I used to be a captain that commanded a fleet.");
+ next();
+ mes("[Captain Janssen]");
+ mes("As you may know after a few sea voyages, not many people have gone across the ocean beyond the continent. I too have failed to conquer the ocean.");
+ next();
+ mes("^0000ffMr. Janssen talked about his perilous ocean journeys for quite a while. You have enough time on your hands, so you sit down, quietly listening to his story.^000000");
+ next();
+ mes("^0000ffAt least half of his story sounded grossly exaggerated, but something caught your ear: he insists that a humongous tower exists on the ocean, and that it's so tall, it scrapes across the sky.^000000");
in_102tower = 2;
- close;
+ close();
} else if (in_102tower == 2) {
- mes "[Captain Janssen]";
- mes "So all I could do was cast anchor at that humongous tower after my fleet was wrecked. At first, we were only going to stay there until the rainstorm was over, but it didn't end as soon as we had hoped.";
- next;
- mes "[Captain Janssen]";
- mes "My crew was starving, and a few of them walked into the tower in order to find food... They never came back.";
- next;
- mes "["+.@name$+"]";
- mes "Why didn't you go in there with them?";
- next;
- mes "[Captain Janssen]";
- mes "My instincts told me that tower was dangerous. I was curious, but I wasn't going to risk my life. We waited for them to come back for 7 days until the rainstorm was finally over, but no one returned.";
- next;
- mes "[Captain Janssen]";
- mes "In our desperation to survive, we abandoned all our goods, and left the tower only with a little bit of the water and edible plants we'd found around the tower. When we finally reached land, I was the only one alive...";
- next;
- mes "^0000ffYou could imagine the heartwretching scene of the dying fleet on their last voyage, even if he didn't explain it any further. A look of somber regret swept over his face as he remained silent a while, and then he said:^000000";
- next;
- mes "[Captain Janssen]";
- mes "I have something I must do before I die. I must retrieve the remains of my crew that died in the tower, and give them a proper burial.";
- next;
- mes "[Captain Janssen]";
- mes "I feel so lucky to meet a warm-hearted adventurer like you. With the money you've given me, I can finally go sailing to the tower again.";
- next;
- mes "["+.@name$+"]";
- mes "How about hiring me as your first mate?";
- next;
- mes "[Captain Janssen]";
- mes "Thank you, but it is an extremely dangerous place. I have my duty to fulfill, but you don't have any obligation to me or them. I don't wish to sacrifice someone as young as you to such a dangerous place.";
- next;
- mes "["+.@name$+"]";
- mes "No...";
- mes ".";
- mes ".";
- mes "As an adventurer, there's my obligation to those in need. I'm also very curious about that place...";
- next;
- mes "[Captain Janssen]";
- mes "I was going to leave right away, but since you've joined me, I should give you time to prepare. I'll be waiting here until you're ready to go.";
- next;
- mes "[Captain Janssen]";
- mes "...Okay then...";
- mes "Welcome aboard, first mate.";
+ mes("[Captain Janssen]");
+ mes("So all I could do was cast anchor at that humongous tower after my fleet was wrecked. At first, we were only going to stay there until the rainstorm was over, but it didn't end as soon as we had hoped.");
+ next();
+ mes("[Captain Janssen]");
+ mes("My crew was starving, and a few of them walked into the tower in order to find food... They never came back.");
+ next();
+ mesf("[%s]", .@name$);
+ mes("Why didn't you go in there with them?");
+ next();
+ mes("[Captain Janssen]");
+ mes("My instincts told me that tower was dangerous. I was curious, but I wasn't going to risk my life. We waited for them to come back for 7 days until the rainstorm was finally over, but no one returned.");
+ next();
+ mes("[Captain Janssen]");
+ mes("In our desperation to survive, we abandoned all our goods, and left the tower only with a little bit of the water and edible plants we'd found around the tower. When we finally reached land, I was the only one alive...");
+ next();
+ mes("^0000ffYou could imagine the heartwretching scene of the dying fleet on their last voyage, even if he didn't explain it any further. A look of somber regret swept over his face as he remained silent a while, and then he said:^000000");
+ next();
+ mes("[Captain Janssen]");
+ mes("I have something I must do before I die. I must retrieve the remains of my crew that died in the tower, and give them a proper burial.");
+ next();
+ mes("[Captain Janssen]");
+ mes("I feel so lucky to meet a warm-hearted adventurer like you. With the money you've given me, I can finally go sailing to the tower again.");
+ next();
+ mesf("[%s]", .@name$);
+ mes("How about hiring me as your first mate?");
+ next();
+ mes("[Captain Janssen]");
+ mes("Thank you, but it is an extremely dangerous place. I have my duty to fulfill, but you don't have any obligation to me or them. I don't wish to sacrifice someone as young as you to such a dangerous place.");
+ next();
+ mesf("[%s]", .@name$);
+ mes("No...");
+ mes(".");
+ mes(".");
+ mes("As an adventurer, there's my obligation to those in need. I'm also very curious about that place...");
+ next();
+ mes("[Captain Janssen]");
+ mes("I was going to leave right away, but since you've joined me, I should give you time to prepare. I'll be waiting here until you're ready to go.");
+ next();
+ mes("[Captain Janssen]");
+ mes("...Okay then...");
+ mes("Welcome aboard, first mate.");
in_102tower = 3;
- close;
+ close();
} else if (in_102tower == 3) {
- mes "[Captain Janssen]";
- mes "Shall we leave now?";
- next;
- switch(select("Yes, let's go!", "No, I'm not quite ready...")) {
+ mes("[Captain Janssen]");
+ mes("Shall we leave now?");
+ next();
+ switch (select("Yes, let's go!", "No, I'm not quite ready...")) {
case 1:
- mes "[Captain Janssen]";
- mes "Then pull up the anchor, first mate!";
- close2;
+ mes("[Captain Janssen]");
+ mes("Then pull up the anchor, first mate!");
+ close2();
in_102tower = 4;
- warp "e_tower",70,114;
+ warp("e_tower", 70, 114);
end;
case 2:
- mes "[Captain Janssen]";
- mes "Sure, no problem. Come back when you're ready.";
- close;
+ mes("[Captain Janssen]");
+ mes("Sure, no problem. Come back when you're ready.");
+ close();
}
} else if (in_102tower > 3) {
- mes "[Captain Janssen]";
- mes "Well, to travel the ocean again, we need to restock on goods. If you give me 10,000 Zeny, I'll take care of the rest.";
- next;
- switch(select("I'll come back later.", "Let's go, now!")) {
+ mes("[Captain Janssen]");
+ mes("Well, to travel the ocean again, we need to restock on goods. If you give me 10,000 Zeny, I'll take care of the rest.");
+ next();
+ switch (select("I'll come back later.", "Let's go, now!")) {
case 1:
- mes "["+.@name$+"]";
- mes "I'm sorry, but I don't have that much money. I'll come back when I save enough.";
- next;
- mes "[Captain Janssen]";
- mes "Sure, no problem. I'll be waiting for your return.";
- close;
+ mesf("[%s]", .@name$);
+ mes("I'm sorry, but I don't have that much money. I'll come back when I save enough.");
+ next();
+ mes("[Captain Janssen]");
+ mes("Sure, no problem. I'll be waiting for your return.");
+ close();
case 2:
if (Zeny < 10000) {
- mes "[Captain Janssen]";
- mes "I'm sorry, but you don't have enough money. I need at least 10,000 Zeny to restock our supplies...";
- close;
- }
- else {
- mes "[Captain Janssen]";
- mes "Excellent! Now we're good to go. Let's pull up the anchor again!";
+ mes("[Captain Janssen]");
+ mes("I'm sorry, but you don't have enough money. I need at least 10,000 Zeny to restock our supplies...");
+ close();
+ } else {
+ mes("[Captain Janssen]");
+ mes("Excellent! Now we're good to go. Let's pull up the anchor again!");
Zeny -= 10000;
- close2;
- warp "e_tower",70,114;
+ close2();
+ warp("e_tower", 70, 114);
end;
}
}
} else {
- mes "[Captain Janssen]";
- mes "Excuse me, are you an adventurer?";
- next;
- mes "[Captain Janssen]";
- mes "I'm sorry to ask you this, especially when this is the first time we've ever met, but can you do me a favor? I'll make it short.";
- next;
- mes "[Captain Janssen]";
- mes "Can you donate ^0000ff10,000 Zeny^000000 to me? It's for a cause that's important to me...";
- next;
- switch(select("No!", "Sure thing.")) {
+ mes("[Captain Janssen]");
+ mes("Excuse me, are you an adventurer?");
+ next();
+ mes("[Captain Janssen]");
+ mes("I'm sorry to ask you this, especially when this is the first time we've ever met, but can you do me a favor? I'll make it short.");
+ next();
+ mes("[Captain Janssen]");
+ mes("Can you donate ^0000ff10,000 Zeny^000000 to me? It's for a cause that's important to me...");
+ next();
+ switch (select("No!", "Sure thing.")) {
case 1:
- mes "["+.@name$+"]";
- mes "I'm sorry, but you've got the wrong person to ask that.";
- next;
- mes "[Captain Janssen]";
- mes "I see... Sorry to bother you. I understand it was too rude to ask something like that to begin with.";
- close;
+ mesf("[%s]", .@name$);
+ mes("I'm sorry, but you've got the wrong person to ask that.");
+ next();
+ mes("[Captain Janssen]");
+ mes("I see... Sorry to bother you. I understand it was too rude to ask something like that to begin with.");
+ close();
case 2:
- mes "[Captain Janssen]";
- mes "Huh? Are you sure that you don't mind giving me that much money? Wow, thank you so much!";
- next;
+ mes("[Captain Janssen]");
+ mes("Huh? Are you sure that you don't mind giving me that much money? Wow, thank you so much!");
+ next();
if (Zeny < 10000) {
- mes "[Captain Janssen]";
- mes "...I'm sorry, but I don't think you have 10,000 Zeny. Thank you for your kindness, but I need more than that.";
- close;
+ mes("[Captain Janssen]");
+ mes("...I'm sorry, but I don't think you have 10,000 Zeny. Thank you for your kindness, but I need more than that.");
+ close();
} else {
- mes "["+.@name$+"]";
- mes "I don't know why you'd need so much money, but here. You can take it.";
- next;
- mes "^0000ffYou have donated 10,000 Zeny to Captain Janssen^000000.";
- next;
- mes "[Captain Janssen]";
- mes "Thank you so much! Now I can stock up on food and materials for my ship. You're kind, very kind!";
+ mesf("[%s]", .@name$);
+ mes("I don't know why you'd need so much money, but here. You can take it.");
+ next();
+ mes("^0000ffYou have donated 10,000 Zeny to Captain Janssen^000000.");
+ next();
+ mes("[Captain Janssen]");
+ mes("Thank you so much! Now I can stock up on food and materials for my ship. You're kind, very kind!");
Zeny -= 10000;
in_102tower = 1;
- close;
+ close();
}
}
}
@@ -204,116 +203,119 @@ e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
.@party_id = getcharid(CHAR_ID_PARTY);
.@p_name$ = getpartyname(.@party_id);
- .@md_name$ = "Endless Tower";
+ .@md_name$ = _("Endless Tower");
- .@etower_timer = questprogress(60200,PLAYTIME); // 1 week
- .@etower_timer2 = questprogress(60201,PLAYTIME); // 4 hours
+ .@etower_timer = questprogress(60200, PLAYTIME); // 1 week
+ .@etower_timer2 = questprogress(60201, PLAYTIME); // 4 hours
- if (!instance_check_party(.@party_id,2)) {
- mes "Make or join a party with more than 1 member and try again.";
- close;
+ if (!instance_check_party(.@party_id, 2)) {
+ mes("Make or join a party with more than 1 member and try again.");
+ close();
}
if (!.@etower_timer) {
- if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2)) {
- mes "Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?";
- next;
- switch(select("Generate dungeon "+.@md_name$, "Enter the dungeon", "Return to Alberta", "Cancel")) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id, 2)) {
+ mes("Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?");
+ next();
+ .@str$ = sprintf(_$("Generate Dungeon %s"), .@md_name$);
+ switch (select(.@str$, "Enter the Dungeon", "Return to Alberta", "Cancel")) {
case 1:
- .@instance = instance_create(.@md_name$,.@party_id);
+ .@instance = instance_create(.@md_name$, .@party_id);
if (.@instance < 0) {
- mes "Party Name: "+.@p_name$;
- mes "Party Leader: "+strcharinfo(PC_NAME);
- mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
- close;
+ mesf("Party Name: %s", .@p_name$);
+ mesf("Party Leader: %s", strcharinfo(PC_NAME));
+ mesf("^0000ff%s ^000000- Reservation Failed!", .@md_name$);
+ close();
}
- mes "^0000ff"+.@md_name$+"^000000 - Try to reserve";
- mes "After making a reservation, you have to talk to NPC behind and select the menu 'Enter the Dungeon' to enter the dungeon.";
+ mesf("^0000ff%s^000000 - Try to reserve", .@md_name$);
+ mes("After making a reservation, you have to talk to NPC behind and select the menu 'Enter the Dungeon' to enter the dungeon.");
for (.@i = 1; .@i <= 6; ++.@i) {
- if( instance_attachmap(.@i + "@tower", .@instance) == "" ) {
- mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
+ if (instance_attachmap(.@i + "@tower", .@instance) == "") {
+ mesf("^0000ff%s ^000000- Reservation Failed!", .@md_name$);
instance_destroy(.@instance);
- close;
+ close();
}
}
- instance_set_timeout 14400,300,.@instance;
+ instance_set_timeout(14400, 300, .@instance);
instance_init(.@instance);
- close;
+ close();
case 2:
- callsub L_Enter,0,1,.@md_name$,.@p_name$;
+ callsub(L_Enter, 0, 1, .@md_name$, .@p_name$);
case 3:
- mes "I will move you to Alberta.";
- close2;
- warp "alberta",223,36;
+ mes("I will move you to Alberta.");
+ close2();
+ warp("alberta", 223, 36);
end;
case 4:
- close;
+ close();
}
}
- switch(select("Enter the "+.@md_name$, "Return to Alberta", "Cancel")) {
+ mes("If you have the dungeon generated already, you can enter it.");
+ next();
+ switch (select("Enter the Dungeon", "Return to Alberta", "Cancel")) {
case 1:
- callsub L_Enter,1,1,.@md_name$,.@p_name$;
+ callsub(L_Enter, 1, 1, .@md_name$, .@p_name$);
case 2:
- mes "I will move you to Alberta.";
- close2;
- warp "alberta",223,36;
+ mes("I will move you to Alberta.");
+ close2();
+ warp("alberta", 223, 36);
end;
case 3:
end;
}
} else if (.@etower_timer == 1 && .@etower_timer2 == 2) {
- .@dun_lim_time = etower_timer+604800; // 1 week
- .@dun_lim_time2 = etower_timer+14400; // 4 hours
+ .@dun_lim_time = etower_timer + 604800; // 1 week
+ .@dun_lim_time2 = etower_timer + 14400; // 4 hours
.@dun_cur_time = gettimetick(2);
- .@dun_ent_t = (.@dun_lim_time - .@dun_cur_time);
- .@dun_h = (.@dun_ent_t / 3600);
+ .@dun_ent_t = .@dun_lim_time - .@dun_cur_time;
+ .@dun_h = .@dun_ent_t / 3600;
.@dun_m = (.@dun_ent_t - (.@dun_h * 3600)) / 60;
.@dun_s = .@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
- mes "Due to the tower's aftereffects, you cannot enter the dungeon right now, " + .@dun_h + "hours " + .@dun_m + "minutes " + .@dun_s + "seconds left to enter the next dungeon.";
- next;
- mes "It is dangerous here. Let me move you to Alberta.";
- close2;
- warp "alberta",223,36;
+ mesf("Due to the tower's aftereffects, you cannot enter the dungeon right now, %d hours %d minutes %d seconds left to enter the next dungeon.", .@dun_h, .@dun_m, .@dun_s);
+ next();
+ mes("It is dangerous here. Let me move you to Alberta.");
+ close2();
+ warp("alberta", 223, 36);
end;
} else if (.@etower_timer == 1) {
- mes "If you have the dungeon generated already, you can enter it. ";
- next;
- switch(select("Enter the "+.@md_name$, "Return to Alberta", "Cancel")) {
+ mes("If you have the dungeon generated already, you can enter it.");
+ next();
+ switch (select("Enter the Dungeon", "Return to Alberta", "Cancel")) {
case 1:
- callsub L_Enter,0,0,.@md_name$,.@p_name$;
+ callsub(L_Enter, 0, 0, .@md_name$, .@p_name$);
case 2:
- mes "I will move you to Alberta.";
- close2;
- warp "alberta",223,36;
+ mes("I will move you to Alberta.");
+ close2();
+ warp("alberta", 223, 36);
end;
case 3:
break;
}
- close;
+ close();
} else {
etower_timer = 0;
- erasequest 60200;
- erasequest 60201;
- mes "^0000ffThe records and after effects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000";
- close;
+ erasequest(60200);
+ erasequest(60201);
+ mes("^0000ffThe records and after effects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000");
+ close();
}
L_Enter:
if (has_instance("1@tower") == "") {
- mes "The memorial dungeon " +getarg(2)+ " does not exist.";
- mes "The party leader did not generate the dungeon yet.";
- close;
+ mesf("The memorial dungeon %s does not exist.", getarg(2));
+ mes("The party leader did not generate the dungeon yet.");
+ close();
} else {
- mapannounce "e_tower", strcharinfo(PC_NAME)+" of the party, " +getarg(3)+", is entering the dungeon, Endless Tower.",bc_map,"0x00ff99",FW_NORMAL,12;
+ mapannounce("e_tower", sprintf(_$("%s of the party, %s, is entering the dungeon, Endless Tower."), strcharinfo(PC_NAME), getarg(3)), bc_map, C_SPRINGGREEN, FW_NORMAL, 12);
if (getarg(1)) {
etower_timer = gettimetick(2);
- setquest 60200;
- setquest 60201;
+ setquest(60200);
+ setquest(60201);
}
- warp "1@tower",52,354;
+ warp("1@tower", 52, 354);
if (getarg(0) == 0)
- close;
+ close();
else
end;
}
@@ -322,75 +324,75 @@ L_Enter:
e_tower,30,30,2 script Huge Vortex CLEAR_NPC,2,2,{
end;
OnTouch:
- mapannounce "e_tower","[ " + strcharinfo(PC_NAME) + " ], seems to be engulfed by a huge vortex",bc_map,"0x00ff99",FW_NORMAL,12;
- warp "alberta",223,36;
+ mapannounce("e_tower", sprintf(_$("[ %s ], seems to be engulfed by a huge vortex"), strcharinfo(PC_NAME)), bc_map, C_SPRINGGREEN, FW_NORMAL, 12);
+ warp("alberta", 223, 36);
end;
}
// Original name: "#102Administrator Mode104"
e_tower,1,1,2 script #102Administrator Mode CLEAR_NPC,{
- callfunc "F_GM_NPC";
- mes "Please enter the password";
- .@i = callfunc("F_GM_NPC","dmc2008",1);
- next;
+ callfunc("F_GM_NPC");
+ mes("Please enter the password.");
+ .@i = callfunc("F_GM_NPC", "dmc2008", 1);
+ next();
if (.@i == 1) {
- switch(select("Generate Purification Stone", "Remove Purification Stone", "Cancel")) {
+ switch (select("Generate Purification Stone", "Remove Purification Stone", "Cancel")) {
case 1:
- mes "Create the Purification Stone that stays for 30 minutes.";
- donpcevent "Purification Stone#et1::OnEnable";
+ mes("Create the Purification Stone that stays for 30 minutes.");
+ donpcevent("Purification Stone#et1::OnEnable");
break;
case 2:
- mes "Destroy the Purification Stone immediately";
- donpcevent "Purification Stone#et1::OnDisable";
+ mes("Destroy the Purification Stone immediately");
+ donpcevent("Purification Stone#et1::OnDisable");
break;
case 3:
- mes "You have canceled it.";
+ mes("You have canceled it.");
break;
}
- close;
+ close();
} else {
- mes "Enter the password exactly.";
- close;
+ mes("Enter the password exactly.");
+ close();
}
}
e_tower,69,117,4 script Purification Stone#et1 2_MONEMUS,{
etower_timer = 0;
- mes "^0000ffThe records and aftereffects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000";
- close;
+ mes("^0000ffThe records and aftereffects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000");
+ close();
OnInit:
- disablenpc "Purification Stone#et1";
+ disablenpc("Purification Stone#et1");
end;
OnEnable:
- initnpctimer;
+ initnpctimer();
end;
OnDisable:
- stopnpctimer;
- disablenpc "Purification Stone#et1";
+ stopnpctimer();
+ disablenpc("Purification Stone#et1");
end;
OnTimer1000:
- enablenpc "Purification Stone#et1";
+ enablenpc("Purification Stone#et1");
end;
OnTimer1740000:
- mapannounce "e_tower", "The Purification Stone will be destroyed in one minute.",bc_map,"0x00ff99";
+ mapannounce("e_tower", _("The Purification Stone will be destroyed in one minute."), bc_map, C_SPRINGGREEN);
end;
OnTimer1800000:
- disablenpc "Purification Stone#et1";
+ disablenpc("Purification Stone#et1");
end;
}
e_tower,151,185,4 script Purification Stone#et2 CLEAR_NPC,{
- callfunc "F_GM_NPC";
+ callfunc("F_GM_NPC");
etower_timer = 0;
- mes "^0000ffThe records and aftereffects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000";
- close2;
- warp "e_tower",75,108;
+ mes("^0000ffThe records and aftereffects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000");
+ close2();
+ warp("e_tower", 75, 108);
end;
}
@@ -401,677 +403,677 @@ function script F_Tower_Monster {
.@map$ = getarg(1);
.@label$ = getarg(2);
- switch(.@level) {
+ switch (.@level) {
case 1:
- areamonster .@map$,7,351,17,387,"Metaling",1613,15,.@label$;
- areamonster .@map$,7,351,17,387,"Marin",1242,5,.@label$;
- areamonster .@map$,7,351,17,387,"Poporing",1031,5,.@label$;
- areamonster .@map$,7,351,17,387,"Drops",1113,5,.@label$;
- areamonster .@map$,7,351,17,387,"Mastering",1090,1,.@label$;
- areamonster .@map$,7,351,17,387,"Poring",1002,5,.@label$;
+ areamonster(.@map$, 7, 351, 17, 387, _("Metaling"), METALING, 15, .@label$);
+ areamonster(.@map$, 7, 351, 17, 387, _("Marin"), MARIN, 5, .@label$);
+ areamonster(.@map$, 7, 351, 17, 387, _("Poporing"), POPORING, 5, .@label$);
+ areamonster(.@map$, 7, 351, 17, 387, _("Drops"), DROPS, 5, .@label$);
+ areamonster(.@map$, 7, 351, 17, 387, _("Mastering"), MASTERING, 1, .@label$);
+ areamonster(.@map$, 7, 351, 17, 387, _("Poring"), PORING, 5, .@label$);
break;
case 2:
- areamonster .@map$,93,351,103,387,"Desert Wolf",1106,20,.@label$;
- areamonster .@map$,93,351,103,387,"Vagabond Wolf",1092,1,.@label$;
- areamonster .@map$,93,351,103,387,"Baby Desert Wolf",1107,10,.@label$;
+ areamonster(.@map$, 93, 351, 103, 387, _("Desert Wolf"), DESERT_WOLF, 20, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Vagabond Wolf"), VAGABOND_WOLF, 1, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Baby Desert Wolf"), DESERT_WOLF_B, 10, .@label$);
break;
case 3:
- areamonster .@map$,181,351,191,387,"Archer Skeleton",1016,5,.@label$;
- areamonster .@map$,181,351,191,387,"Skel Worker",1169,5,.@label$;
- areamonster .@map$,181,351,191,387,"Soldier Skeleton",1028,5,.@label$;
- areamonster .@map$,181,351,191,387,"Orc Skeleton",1152,5,.@label$;
- areamonster .@map$,181,351,191,387,"Pirate Skeleton",1071,5,.@label$;
- areamonster .@map$,181,351,191,387,"Skeleton",1076,5,.@label$;
+ areamonster(.@map$, 181, 351, 191, 387, _("Archer Skeleton"), ARCHER_SKELETON, 5, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Skel Worker"), SKEL_WORKER, 5, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Soldier Skeleton"), SOLDIER_SKELETON, 5, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Orc Skeleton"), ORC_SKELETON, 5, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Pirate Skeleton"), PIRATE_SKEL, 5, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Skeleton"), SKELETON, 5, .@label$);
break;
case 4:
- areamonster .@map$,267,351,277,387,"Argiope",1099,15,.@label$;
- areamonster .@map$,267,351,277,387,"Mantis",1139,5,.@label$;
- areamonster .@map$,267,351,277,387,"Argos",1100,5,.@label$;
- areamonster .@map$,267,351,277,387,"Vocal",1088,1,.@label$;
- areamonster .@map$,267,351,277,387,"Rocker",1052,5,.@label$;
- areamonster .@map$,267,351,277,387,"Hornet",1004,5,.@label$;
+ areamonster(.@map$, 267, 351, 277, 387, _("Argiope"), ARGIOPE, 15, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Mantis"), MANTIS, 5, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Argos"), ARGOS, 5, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Vocal"), VOCAL, 1, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Rocker"), ROCKER, 5, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Hornet"), HORNET, 5, .@label$);
break;
case 5:
- areamonster .@map$,352,351,362,387,"Golden Thief Bug",1086,1,.@label$;
- areamonster .@map$,352,351,362,387,"Thief Bug Male",1054,15,.@label$;
- areamonster .@map$,352,351,362,387,"Thief Bug Female",1053,15,.@label$;
- areamonster .@map$,352,351,362,387,"Thief Bug",1051,15,.@label$;
- areamonster .@map$,352,351,362,387,"Thief Bug Egg",1048,5,.@label$;
+ areamonster(.@map$, 352, 351, 362, 387, _("Golden Thief Bug"), GOLDEN_BUG, 1, .@label$);
+ areamonster(.@map$, 352, 351, 362, 387, _("Thief Bug Male"), THIEF_BUG__, 15, .@label$);
+ areamonster(.@map$, 352, 351, 362, 387, _("Thief Bug Female"), THIEF_BUG_, 15, .@label$);
+ areamonster(.@map$, 352, 351, 362, 387, _("Thief Bug"), THIEF_BUG, 15, .@label$);
+ areamonster(.@map$, 352, 351, 362, 387, _("Thief Bug Egg"), THIEF_BUG_EGG, 5, .@label$);
break;
case 6:
- areamonster .@map$,9,267,19,303,"Dragon Egg",1721,5,.@label$;
- areamonster .@map$,9,267,19,303,"Thief Bug Egg",1048,5,.@label$;
- areamonster .@map$,9,267,19,303,"Ant Egg",1097,5,.@label$;
- areamonster .@map$,9,267,19,303,"Pupa",1008,5,.@label$;
+ areamonster(.@map$, 9, 267, 19, 303, _("Dragon Egg"), DRAGON_EGG, 5, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Thief Bug Egg"), THIEF_BUG_EGG, 5, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Ant Egg"), ANT_EGG, 5, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Pupa"), PUPA, 5, .@label$);
break;
case 7:
- areamonster .@map$,93,267,103,303,"Explosion",1383,15,.@label$;
- areamonster .@map$,93,267,103,303,"Drainliar",1111,15,.@label$;
- areamonster .@map$,93,267,103,303,"Anopheles",1627,15,.@label$;
- areamonster .@map$,93,267,103,303,"Farmiliar",1005,15,.@label$;
+ areamonster(.@map$, 93, 267, 103, 303, _("Explosion"), EXPLOSION, 15, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Drainliar"), DRAINLIAR, 15, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Anopheles"), ANOPHELES, 15, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Farmiliar"), FARMILIAR, 15, .@label$);
break;
case 8:
- areamonster .@map$,181,267,191,303,"Firelock Soldier",1403,15,.@label$;
- areamonster .@map$,181,267,191,303,"Cruiser",1248,15,.@label$;
+ areamonster(.@map$, 181, 267, 191, 303, _("Firelock Soldier"), ANTIQUE_FIRELOCK, 15, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Cruiser"), CRUISER, 15, .@label$);
break;
case 9:
- areamonster .@map$,267,267,277,303,"Obsidian",1615,15,.@label$;
- areamonster .@map$,267,267,277,303,"Golem",1040,15,.@label$;
- areamonster .@map$,267,267,277,303,"Stapo",1784,10,.@label$;
+ areamonster(.@map$, 267, 267, 277, 303, _("Obsidian"), OBSIDIAN, 15, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Golem"), GOLEM, 15, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Stapo"), STAPO, 10, .@label$);
break;
case 10:
- areamonster .@map$,352,267,362,303,"Mistress",1059,1,.@label$;
- areamonster .@map$,352,267,362,303,"Giant Hornet",1303,25,.@label$;
- areamonster .@map$,352,267,362,303,"Hornet",1004,20,.@label$;
+ areamonster(.@map$, 352, 267, 362, 303, _("Mistress"), MISTRESS, 1, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Giant Hornet"), GIANT_HONET, 25, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Hornet"), HORNET, 20, .@label$);
break;
case 11:
- areamonster .@map$,9,180,19,216,"Dryad",1493,15,.@label$;
- areamonster .@map$,9,180,19,216,"Parasite",1500,15,.@label$;
- areamonster .@map$,9,180,19,216,"Hermit Plant",1413,15,.@label$;
- areamonster .@map$,9,180,19,216,"Rafflesia",1162,5,.@label$;
+ areamonster(.@map$, 9, 180, 19, 216, _("Dryad"), DRYAD, 15, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Parasite"), PARASITE, 15, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Hermit Plant"), WILD_GINSENG, 15, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Rafflesia"), RAFFLESIA, 5, .@label$);
break;
case 12:
- areamonster .@map$,93,180,103,216,"Demon Pungus",1378,25,.@label$;
- areamonster .@map$,93,180,103,216,"Punk",1199,25,.@label$;
+ areamonster(.@map$, 93, 180, 103, 216, _("Demon Pungus"), DEMON_PUNGUS, 25, .@label$);
+ areamonster(.@map$, 93, 180, 103, 216, _("Punk"), PUNK, 25, .@label$);
break;
case 13:
- areamonster .@map$,181,180,191,216,"Yao Yun",1512,15,.@label$;
- areamonster .@map$,181,180,191,216,"Bongunn",1188,15,.@label$;
- areamonster .@map$,181,180,191,216,"Munak",1026,10,.@label$;
+ areamonster(.@map$, 181, 180, 191, 216, _("Yao Yun"), HYEGUN, 15, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Bongunn"), BON_GUN, 15, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Munak"), MUNAK, 10, .@label$);
break;
case 14:
- areamonster .@map$,267,180,277,216,"High Orc",1213,15,.@label$;
- areamonster .@map$,267,180,277,216,"Orc Archer",1189,10,.@label$;
- areamonster .@map$,267,180,277,216,"Orc Lady",1273,10,.@label$;
- areamonster .@map$,267,180,277,216,"Orc Warrior",1023,5,.@label$;
- areamonster .@map$,267,180,277,216,"Orc Baby",1686,5,.@label$;
+ areamonster(.@map$, 267, 180, 277, 216, _("High Orc"), HIGH_ORC, 15, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Orc Archer"), ORC_ARCHER, 10, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Orc Lady"), ORC_LADY, 10, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Orc Warrior"), ORK_WARRIOR, 5, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Orc Baby"), ORC_BABY, 5, .@label$);
break;
case 15:
- areamonster .@map$,352,180,362,216,"Maya",1147,1,.@label$;
- areamonster .@map$,352,180,362,216,"Phreeoni",1159,1,.@label$;
- areamonster .@map$,352,180,362,216,"Deniro",1105,15,.@label$;
- areamonster .@map$,352,180,362,216,"Pierre",1160,15,.@label$;
- areamonster .@map$,352,180,362,216,"Andre",1095,15,.@label$;
- areamonster .@map$,352,180,362,216,"Ant Egg",1097,5,.@label$;
+ areamonster(.@map$, 352, 180, 362, 216, _("Maya"), MAYA, 1, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Phreeoni"), PHREEONI, 1, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Deniro"), DENIRO, 15, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Pierre"), PIERE, 15, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Andre"), ANDRE, 15, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Ant Egg"), ANT_EGG, 5, .@label$);
break;
case 16:
- areamonster .@map$,9,96,19,132,"Raydric Archer",1276,10,.@label$;
- areamonster .@map$,9,96,19,132,"Orc Archer",1189,10,.@label$;
- areamonster .@map$,9,96,19,132,"Gargoyle",1253,10,.@label$;
- areamonster .@map$,9,96,19,132,"Archer Skeleton",1016,10,.@label$;
+ areamonster(.@map$, 9, 96, 19, 132, _("Raydric Archer"), RAYDRIC_ARCHER, 10, .@label$);
+ areamonster(.@map$, 9, 96, 19, 132, _("Orc Archer"), ORC_ARCHER, 10, .@label$);
+ areamonster(.@map$, 9, 96, 19, 132, _("Gargoyle"), GARGOYLE, 10, .@label$);
+ areamonster(.@map$, 9, 96, 19, 132, _("Archer Skeleton"), ARCHER_SKELETON, 10, .@label$);
break;
case 17:
- areamonster .@map$,93,96,103,132,"Merman",1264,10,.@label$;
- areamonster .@map$,93,96,103,132,"Baphomet Jr.",1101,10,.@label$;
- areamonster .@map$,93,96,103,132,"Strouf",1065,15,.@label$;
- areamonster .@map$,93,96,103,132,"Hill Wind",1629,5,.@label$;
+ areamonster(.@map$, 93, 96, 103, 132, _("Merman"), MERMAN, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Baphomet Jr."), BAPHOMET_, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Strouf"), STROUF, 15, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Hill Wind"), HILL_WIND, 5, .@label$);
break;
case 18:
- areamonster .@map$,181,96,191,132,"Cramp",1209,25,.@label$;
- areamonster .@map$,181,96,191,132,"Tarou",1175,15,.@label$;
+ areamonster(.@map$, 181, 96, 191, 132, _("Cramp"), CRAMP, 25, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Tarou"), TAROU, 15, .@label$);
break;
case 19:
- areamonster .@map$,267,96,277,132,"Deviace",1108,10,.@label$;
- areamonster .@map$,267,96,277,132,"Megalodon",1064,10,.@label$;
- areamonster .@map$,267,96,277,132,"Swordfish",1069,10,.@label$;
- areamonster .@map$,267,96,277,132,"Phen",1158,10,.@label$;
+ areamonster(.@map$, 267, 96, 277, 132, _("Deviace"), DEVIACE, 10, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Megalodon"), MEGALODON, 10, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Swordfish"), SWORD_FISH, 10, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Phen"), PHEN, 10, .@label$);
break;
case 20:
- areamonster .@map$,352,96,362,132,"Drake",1112,1,.@label$;
- areamonster .@map$,352,96,362,132,"Pirate Skeleton",1071,50,.@label$;
+ areamonster(.@map$, 352, 96, 362, 132, _("Drake"), DRAKE, 1, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Pirate Skeleton"), PIRATE_SKEL, 50, .@label$);
break;
case 21:
- areamonster .@map$,9,9,19,45,"Plasma",1693,10,.@label$;
- areamonster .@map$,9,9,19,45,"Plasma",1696,10,.@label$;
- areamonster .@map$,9,9,19,45,"Plasma",1695,5,.@label$;
- areamonster .@map$,9,9,19,45,"Plasma",1697,5,.@label$;
- areamonster .@map$,9,9,19,45,"Plasma",1694,5,.@label$;
+ areamonster(.@map$, 9, 9, 19, 45, _("Plasma"), PLASMA_Y, 10, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Plasma"), PLASMA_P, 10, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Plasma"), PLASMA_G, 5, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Plasma"), PLASMA_B, 5, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Plasma"), PLASMA_R, 5, .@label$);
break;
case 22:
- areamonster .@map$,93,9,103,45,"Muscipular",1780,15,.@label$;
- areamonster .@map$,93,9,103,45,"Drosera",1781,15,.@label$;
- areamonster .@map$,93,9,103,45,"Flora",1118,15,.@label$;
- areamonster .@map$,93,9,103,45,"Hydra",1068,15,.@label$;
- areamonster .@map$,93,9,103,45,"Mandragora",1020,10,.@label$;
- areamonster .@map$,93,9,103,45,"Rafflesia",1162,10,.@label$;
+ areamonster(.@map$, 93, 9, 103, 45, _("Muscipular"), MUSCIPULAR, 15, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Drosera"), DROSERA, 15, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Flora"), FLORA, 15, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Hydra"), HYDRA, 15, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Mandragora"), MANDRAGORA, 10, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Rafflesia"), RAFFLESIA, 10, .@label$);
break;
case 23:
- areamonster .@map$,181,9,191,45,"Penomena",1216,15,.@label$;
- areamonster .@map$,181,9,191,45,"Obeaune",1044,10,.@label$;
- areamonster .@map$,181,9,191,45,"Marse",1144,10,.@label$;
- areamonster .@map$,181,9,191,45,"Swordfish",1069,10,.@label$;
- areamonster .@map$,181,9,191,45,"Hydra",1068,5,.@label$;
+ areamonster(.@map$, 181, 9, 191, 45, _("Penomena"), PENOMENA, 15, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Obeaune"), OBEAUNE, 10, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Marse"), MARSE, 10, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Swordfish"), SWORD_FISH, 10, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Hydra"), HYDRA, 5, .@label$);
break;
case 24:
- areamonster .@map$,267,9,277,45,"Joker",1131,15,.@label$;
- areamonster .@map$,267,9,277,45,"Carat",1267,15,.@label$;
- areamonster .@map$,267,9,277,45,"Jakk",1130,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Joker"), JOKER, 15, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Carat"), CARAT, 15, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Jakk"), JAKK, 10, .@label$);
break;
case 25:
- areamonster .@map$,352,9,362,45,"Cat o' Nine Tails",1307,15,.@label$;
- areamonster .@map$,352,9,362,45,"Moonlight",1150,1,.@label$;
- areamonster .@map$,352,9,362,45,"Nine Tail",1180,15,.@label$;
+ areamonster(.@map$, 352, 9, 362, 45, _("Cat o' Nine Tails"), CAT_O_NINE_TAIL, 15, .@label$);
+ areamonster(.@map$, 352, 9, 362, 45, _("Moonlight"), MOONLIGHT, 1, .@label$);
+ areamonster(.@map$, 352, 9, 362, 45, _("Nine Tail"), NINE_TAIL, 15, .@label$);
break;
case 26:
- areamonster .@map$,9,351,19,387,"Gibbet",1503,10,.@label$;
- areamonster .@map$,9,351,19,387,"Enchanted Peach Tree",1410,10,.@label$;
- areamonster .@map$,9,351,19,387,"Wooden Golem",1497,10,.@label$;
- areamonster .@map$,9,351,19,387,"Stone Shooter",1495,10,.@label$;
- areamonster .@map$,9,351,19,387,"Elder Willow",1033,5,.@label$;
+ areamonster(.@map$, 9, 351, 19, 387, _("Gibbet"), GIBBET, 10, .@label$);
+ areamonster(.@map$, 9, 351, 19, 387, _("Enchanted Peach Tree"), LIVE_PEACH_TREE, 10, .@label$);
+ areamonster(.@map$, 9, 351, 19, 387, _("Wooden Golem"), WOODEN_GOLEM, 10, .@label$);
+ areamonster(.@map$, 9, 351, 19, 387, _("Stone Shooter"), STONE_SHOOTER, 10, .@label$);
+ areamonster(.@map$, 9, 351, 19, 387, _("Elder Willow"), ELDER_WILOW, 5, .@label$);
break;
case 27:
- areamonster .@map$,93,351,103,387,"Goblin Archer",1258,10,.@label$;
- areamonster .@map$,93,351,103,387,"Goblin",1122,10,.@label$;
- areamonster .@map$,93,351,103,387,"Goblin",1123,5,.@label$;
- areamonster .@map$,93,351,103,387,"Goblin",1124,5,.@label$;
- areamonster .@map$,93,351,103,387,"Gobin",1125,5,.@label$;
- areamonster .@map$,93,351,103,387,"Goblin",1126,5,.@label$;
+ areamonster(.@map$, 93, 351, 103, 387, _("Goblin Archer"), GOBLIN_ARCHER, 10, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Goblin"), GOBLIN_1, 10, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Goblin"), GOBLIN_2, 5, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Goblin"), GOBLIN_3, 5, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Gobin"), GOBLIN_4, 5, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Goblin"), GOBLIN_5, 5, .@label$);
break;
case 28:
- areamonster .@map$,181,351,191,387,"Arclouse",1194,30,.@label$;
- areamonster .@map$,181,351,191,387,"Neraid",1255,15,.@label$;
- areamonster .@map$,181,351,191,387,"Pest",1256,15,.@label$;
- areamonster .@map$,181,351,191,387,"Kukre",1070,10,.@label$;
+ areamonster(.@map$, 181, 351, 191, 387, _("Arclouse"), ARCLOUSE, 30, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Neraid"), NERAID, 15, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Pest"), PEST, 15, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Kukre"), KUKRE, 10, .@label$);
break;
case 29:
- areamonster .@map$,267,351,277,387,"Dark Frame",1260,10,.@label$;
- areamonster .@map$,267,351,277,387,"The Paper",1375,10,.@label$;
- areamonster .@map$,267,351,277,387,"Hylozoist",1510,10,.@label$;
- areamonster .@map$,267,351,277,387,"Quve",1508,5,.@label$;
- areamonster .@map$,267,351,277,387,"Lude",1509,5,.@label$;
- areamonster .@map$,267,351,277,387,"Whisper",1179,10,.@label$;
+ areamonster(.@map$, 267, 351, 277, 387, _("Dark Frame"), DARK_FRAME, 10, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("The Paper"), THE_PAPER, 10, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Hylozoist"), HYLOZOIST, 10, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Quve"), QUVE, 5, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Lude"), LUDE, 5, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Whisper"), WHISPER, 10, .@label$);
break;
case 30:
- areamonster .@map$,352,351,362,387,"White Lady",1630,1,.@label$;
- areamonster .@map$,352,351,362,387,"Evil Nymph",1416,30,.@label$;
+ areamonster(.@map$, 352, 351, 362, 387, _("White Lady"), BACSOJIN_, 1, .@label$);
+ areamonster(.@map$, 352, 351, 362, 387, _("Evil Nymph"), WICKED_NYMPH, 30, .@label$);
break;
case 31:
- areamonster .@map$,9,267,19,303,"Gig",1387,20,.@label$;
- areamonster .@map$,9,267,19,303,"Iron Fist",1212,15,.@label$;
- areamonster .@map$,9,267,19,303,"Argiope",1099,10,.@label$;
- areamonster .@map$,9,267,19,303,"Scorpion",1001,5,.@label$;
+ areamonster(.@map$, 9, 267, 19, 303, _("Gig"), GIG, 20, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Iron Fist"), IRON_FIST, 15, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Argiope"), ARGIOPE, 10, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Scorpion"), SCORPION, 5, .@label$);
break;
case 32:
- areamonster .@map$,93,267,103,303,"Goblin Leader",1299,1,.@label$;
- areamonster .@map$,93,267,103,303,"Goblin Archer",1258,10,.@label$;
- areamonster .@map$,93,267,103,303,"Goblin",1122,10,.@label$;
- areamonster .@map$,93,267,103,303,"Goblin",1123,5,.@label$;
- areamonster .@map$,93,267,103,303,"Goblin",1124,5,.@label$;
- areamonster .@map$,93,267,103,303,"Goblin",1125,5,.@label$;
- areamonster .@map$,93,267,103,303,"Goblin",1126,5,.@label$;
+ areamonster(.@map$, 93, 267, 103, 303, _("Goblin Leader"), GOBLIN_LEADER, 1, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Goblin Archer"), GOBLIN_ARCHER, 10, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Goblin"), GOBLIN_1, 10, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Goblin"), GOBLIN_2, 5, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Goblin"), GOBLIN_3, 5, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Goblin"), GOBLIN_4, 5, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Goblin"), GOBLIN_5, 5, .@label$);
break;
case 33:
- areamonster .@map$,181,267,191,303,"Kobold Leader",1296,1,.@label$;
- areamonster .@map$,181,267,191,303,"Kobold",1133,15,.@label$;
- areamonster .@map$,181,267,191,303,"Kobold_Archer",1282,15,.@label$;
- areamonster .@map$,181,267,191,303,"Kobold",1134,10,.@label$;
- areamonster .@map$,181,267,191,303,"Kobold",1135,5,.@label$;
+ areamonster(.@map$, 181, 267, 191, 303, _("Kobold Leader"), KOBOLD_LEADER, 1, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Kobold"), KOBOLD_1, 15, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Kobold_Archer"), KOBOLD_ARCHER, 15, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Kobold"), KOBOLD_2, 10, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Kobold"), KOBOLD_3, 5, .@label$);
break;
case 34:
- areamonster .@map$,267,267,277,303,"Flame Skull",1869,20,.@label$;
- areamonster .@map$,267,267,277,303,"Whisper",1179,10,.@label$;
- areamonster .@map$,267,267,277,303,"Giant Whisper",1186,10,.@label$;
+ areamonster(.@map$, 267, 267, 277, 303, _("Flame Skull"), FLAME_SKULL, 20, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Whisper"), WHISPER, 10, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Giant Whisper"), WHISPER_BOSS, 10, .@label$);
break;
case 35:
- areamonster .@map$,352,267,362,303,"Turtle General",1312,1,.@label$;
- areamonster .@map$,352,267,362,303,"Freezer",1319,10,.@label$;
- areamonster .@map$,352,267,362,303,"Solider",1316,10,.@label$;
- areamonster .@map$,352,267,362,303,"Heater",1318,10,.@label$;
- areamonster .@map$,352,267,362,303,"Permeter",1314,10,.@label$;
+ areamonster(.@map$, 352, 267, 362, 303, _("Turtle General"), TURTLE_GENERAL, 1, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Freezer"), FREEZER, 10, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Solider"), SOLIDER, 10, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Heater"), HEATER, 10, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Permeter"), PERMETER, 10, .@label$);
break;
case 36:
- areamonster .@map$,9,180,19,216,"Anolian",1206,30,.@label$;
- areamonster .@map$,9,180,19,216,"Grove",1687,10,.@label$;
- areamonster .@map$,9,180,19,216,"Alligator",1271,10,.@label$;
+ areamonster(.@map$, 9, 180, 19, 216, _("Anolian"), ANOLIAN, 30, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Grove"), GREEN_IGUANA, 10, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Alligator"), ALLIGATOR, 10, .@label$);
break;
case 37:
- areamonster .@map$,93,180,103,216,"Clock Tower Manager",1270,10,.@label$;
- areamonster .@map$,93,180,103,216,"Clock",1269,10,.@label$;
- areamonster .@map$,93,180,103,216,"Alarm",1193,30,.@label$;
+ areamonster(.@map$, 93, 180, 103, 216, _("Clock Tower Manager"), C_TOWER_MANAGER, 10, .@label$);
+ areamonster(.@map$, 93, 180, 103, 216, _("Clock"), CLOCK, 10, .@label$);
+ areamonster(.@map$, 93, 180, 103, 216, _("Alarm"), ALARM, 30, .@label$);
break;
case 38:
- areamonster .@map$,181,180,191,216,"Death Word",1698,25,.@label$;
- areamonster .@map$,181,180,191,216,"Rideword",1195,25,.@label$;
+ areamonster(.@map$, 181, 180, 191, 216, _("Death Word"), DEATHWORD, 25, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Rideword"), RIDEWORD, 25, .@label$);
break;
case 39:
- areamonster .@map$,267,180,277,216,"Evil Nymph",1416,10,.@label$;
- areamonster .@map$,267,180,277,216,"Mao Gui",1513,10,.@label$;
- areamonster .@map$,267,180,277,216,"Taoist Hermit",1412,10,.@label$;
- areamonster .@map$,267,180,277,216,"Zhu Po Long",1514,10,.@label$;
- areamonster .@map$,267,180,277,216,"Jin Guai",1517,5,.@label$;
+ areamonster(.@map$, 267, 180, 277, 216, _("Evil Nymph"), WICKED_NYMPH, 10, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Mao Gui"), CIVIL_SERVANT, 10, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Taoist Hermit"), EVIL_CLOUD_HERMIT, 10, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Zhu Po Long"), DANCING_DRAGON, 10, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Jin Guai"), LI_ME_MANG_RYANG, 5, .@label$);
break;
case 40:
- areamonster .@map$,352,180,362,216,"Samurai Specter",1492,1,.@label$;
- areamonster .@map$,352,180,362,216,"Shinobi",1401,10,.@label$;
- areamonster .@map$,352,180,362,216,"Tengu",1405,10,.@label$;
- areamonster .@map$,352,180,362,216,"Firelock Soldier",1403,5,.@label$;
- areamonster .@map$,352,180,362,216,"Miyabi Doll",1404,10,.@label$;
- areamonster .@map$,352,180,362,216,"Karakasa",1400,5,.@label$;
+ areamonster(.@map$, 352, 180, 362, 216, _("Samurai Specter"), INCANTATION_SAMURAI, 1, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Shinobi"), SHINOBI, 10, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Tengu"), TENGU, 10, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Firelock Soldier"), ANTIQUE_FIRELOCK, 5, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Miyabi Doll"), MIYABI_NINGYO, 10, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Karakasa"), KARAKASA, 5, .@label$);
break;
case 41:
- areamonster .@map$,9,96,19,132,"Kraben",1587,50,.@label$;
+ areamonster(.@map$, 9, 96, 19, 132, _("Kraben"), KRABEN, 50, .@label$);
break;
case 42:
- areamonster .@map$,93,96,103,132,"Sleeper",1386,20,.@label$;
- areamonster .@map$,93,96,103,132,"Sting",1207,10,.@label$;
- areamonster .@map$,93,96,103,132,"Mi Gao",1516,10,.@label$;
- areamonster .@map$,93,96,103,132,"Sandman",1165,5,.@label$;
- areamonster .@map$,93,96,103,132,"Hode",1127,5,.@label$;
+ areamonster(.@map$, 93, 96, 103, 132, _("Sleeper"), SLEEPER, 20, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Sting"), STING, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Mi Gao"), INCREASE_SOIL, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Sandman"), SAND_MAN, 5, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Hode"), HODE, 5, .@label$);
break;
case 43:
- areamonster .@map$,181,96,191,132,"Medusa",1148,10,.@label$;
- areamonster .@map$,181,96,191,132,"Sidewinder",1037,40,.@label$;
- areamonster .@map$,181,96,191,132,"Anacondaq",1030,5,.@label$;
- areamonster .@map$,181,96,191,132,"Boa",1025,5,.@label$;
+ areamonster(.@map$, 181, 96, 191, 132, _("Medusa"), MEDUSA, 10, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Sidewinder"), SIDE_WINDER, 40, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Anacondaq"), ANACONDAQ, 5, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Boa"), SNAKE, 5, .@label$);
break;
case 44:
- areamonster .@map$,267,96,277,132,"Hatii Baby",1515,20,.@label$;
- areamonster .@map$,267,96,277,132,"Baphomet Jr.",1101,20,.@label$;
- areamonster .@map$,267,96,277,132,"Orc Baby",1686,1,.@label$;
- areamonster .@map$,267,96,277,132,"Baby Desert Wolf",1107,10,.@label$;
- areamonster .@map$,267,96,277,132,"Savage Babe",1167,10,.@label$;
+ areamonster(.@map$, 267, 96, 277, 132, _("Hatii Baby"), GARM_BABY, 20, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Baphomet Jr."), BAPHOMET_, 20, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Orc Baby"), ORC_BABY, 1, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Baby Desert Wolf"), DESERT_WOLF_B, 10, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Savage Babe"), SAVAGE_BABE, 10, .@label$);
break;
case 45:
- areamonster .@map$,352,96,362,132,"Osiris",1038,1,.@label$;
- areamonster .@map$,352,96,362,132,"Ancient Mummy",1297,15,.@label$;
- areamonster .@map$,352,96,362,132,"Verit",1032,15,.@label$;
- areamonster .@map$,352,96,362,132,"Mummy",1041,20,.@label$;
+ areamonster(.@map$, 352, 96, 362, 132, _("Osiris"), OSIRIS, 1, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Ancient Mummy"), ANCIENT_MUMMY, 15, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Verit"), VERIT, 15, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Mummy"), MUMMY, 20, .@label$);
break;
case 46:
- areamonster .@map$,9,9,19,45,"Seeker",1774,20,.@label$;
- areamonster .@map$,9,9,19,45,"Beholder",1633,20,.@label$;
+ areamonster(.@map$, 9, 9, 19, 45, _("Seeker"), SEEKER, 20, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Beholder"), BEHOLDER, 20, .@label$);
break;
case 47:
- areamonster .@map$,93,9,103,45,"Deleter",1384,20,.@label$;
- areamonster .@map$,93,9,103,45,"Deleter",1385,10,.@label$;
- areamonster .@map$,93,9,103,45,"Petite",1156,10,.@label$;
- areamonster .@map$,93,9,103,45,"Petite",1155,10,.@label$;
+ areamonster(.@map$, 93, 9, 103, 45, _("Deleter"), DELETER, 20, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Deleter"), DELETER_, 10, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Petite"), PETIT_, 10, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Petite"), PETIT, 10, .@label$);
break;
case 48:
- areamonster .@map$,181,9,191,45,"Ancient Worm",1305,10,.@label$;
- areamonster .@map$,181,9,191,45,"Ancient Mummy",1297,10,.@label$;
- areamonster .@map$,181,9,191,45,"Ancient Mimic",1699,10,.@label$;
+ areamonster(.@map$, 181, 9, 191, 45, _("Ancient Worm"), ANCIENT_WORM, 10, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Ancient Mummy"), ANCIENT_MUMMY, 10, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Ancient Mimic"), ANCIENT_MIMIC, 10, .@label$);
break;
case 49:
- areamonster .@map$,267,9,277,45,"Grizzly",1381,20,.@label$;
- areamonster .@map$,267,9,277,45,"Leib Olmai",1306,7,.@label$;
- areamonster .@map$,267,9,277,45,"Zipper Bear",1417,5,.@label$;
- areamonster .@map$,267,9,277,45,"Sasquatch",1243,5,.@label$;
- areamonster .@map$,267,9,277,45,"Bigfoot",1060,5,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Grizzly"), GRIZZLY, 20, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Leib Olmai"), LEIB_OLMAI, 7, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Zipper Bear"), ZIPPER_BEAR, 5, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Sasquatch"), SASQUATCH, 5, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Bigfoot"), BIGFOOT, 5, .@label$);
break;
case 50:
- areamonster .@map$,352,9,362,45,"Pharaoh",1157,1,.@label$;
- areamonster .@map$,352,9,362,45,"Amon Ra",1511,1,.@label$;
- areamonster .@map$,352,9,362,45,"Anubis",1098,10,.@label$;
- areamonster .@map$,352,9,362,45,"Marduk",1140,10,.@label$;
- areamonster .@map$,352,9,362,45,"Matyr",1146,10,.@label$;
+ areamonster(.@map$, 352, 9, 362, 45, _("Pharaoh"), PHARAOH, 1, .@label$);
+ areamonster(.@map$, 352, 9, 362, 45, _("Amon Ra"), AMON_RA, 1, .@label$);
+ areamonster(.@map$, 352, 9, 362, 45, _("Anubis"), ANUBIS, 10, .@label$);
+ areamonster(.@map$, 352, 9, 362, 45, _("Marduk"), MARDUK, 10, .@label$);
+ areamonster(.@map$, 352, 9, 362, 45, _("Matyr"), MATYR, 10, .@label$);
break;
case 51:
- areamonster .@map$,9,351,19,387,"Mini Demon",1292,20,.@label$;
- areamonster .@map$,9,351,19,387,"Diabolic",1382,20,.@label$;
- areamonster .@map$,9,351,19,387,"Deviruchi",1109,10,.@label$;
+ areamonster(.@map$, 9, 351, 19, 387, _("Mini Demon"), MINI_DEMON, 20, .@label$);
+ areamonster(.@map$, 9, 351, 19, 387, _("Diabolic"), DIABOLIC, 20, .@label$);
+ areamonster(.@map$, 9, 351, 19, 387, _("Deviruchi"), DEVIRUCHI, 10, .@label$);
break;
case 52:
- areamonster .@map$,93,351,103,387,"Harpy",1376,20,.@label$;
- areamonster .@map$,93,351,103,387,"Grand Peco",1369,10,.@label$;
- areamonster .@map$,93,351,103,387,"Bloody Butterfly",1408,10,.@label$;
- areamonster .@map$,93,351,103,387,"Gargoyle",1253,10,.@label$;
- areamonster .@map$,93,351,103,387,"Hill Wind",1680,5,.@label$;
- areamonster .@map$,93,351,103,387,"Hill Wind",1629,5,.@label$;
+ areamonster(.@map$, 93, 351, 103, 387, _("Harpy"), HARPY, 20, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Grand Peco"), GRAND_PECO, 10, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Bloody Butterfly"), BLOOD_BUTTERFLY, 10, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Gargoyle"), GARGOYLE, 10, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Hill Wind"), HILL_WIND_1, 5, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Hill Wind"), HILL_WIND, 5, .@label$);
break;
case 53:
- areamonster .@map$,181,351,191,387,"Assaulter",1315,25,.@label$;
- areamonster .@map$,181,351,191,387,"Shinobi",1401,30,.@label$;
+ areamonster(.@map$, 181, 351, 191, 387, _("Assaulter"), ASSULTER, 25, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Shinobi"), SHINOBI, 30, .@label$);
break;
case 54:
- areamonster .@map$,267,351,277,387,"Chepet",1250,10,.@label$;
- areamonster .@map$,267,351,277,387,"Mariontte",1143,10,.@label$;
- areamonster .@map$,267,351,277,387,"Miyabi Doll",1404,10,.@label$;
+ areamonster(.@map$, 267, 351, 277, 387, _("Chepet"), CHEPET, 10, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Mariontte"), MARIONETTE, 10, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Miyabi Doll"), MIYABI_NINGYO, 10, .@label$);
break;
case 55:
- areamonster .@map$,352,351,362,387,"Medusa",1148,25,.@label$;
- areamonster .@map$,352,351,362,387,"Evil Snake Lord",1418,1,.@label$;
- areamonster .@map$,352,351,362,387,"Isis",1029,15,.@label$;
- areamonster .@map$,352,351,362,387,"Sidewinder",1037,15,.@label$;
+ areamonster(.@map$, 352, 351, 362, 387, _("Medusa"), MEDUSA, 25, .@label$);
+ areamonster(.@map$, 352, 351, 362, 387, _("Evil Snake Lord"), DARK_SNAKE_LORD, 1, .@label$);
+ areamonster(.@map$, 352, 351, 362, 387, _("Isis"), ISIS, 15, .@label$);
+ areamonster(.@map$, 352, 351, 362, 387, _("Sidewinder"), SIDE_WINDER, 15, .@label$);
break;
case 56:
- areamonster .@map$,9,267,19,303,"Freezer",1319,10,.@label$;
- areamonster .@map$,9,267,19,303,"Hatii Baby",1515,10,.@label$;
- areamonster .@map$,9,267,19,303,"Ice Titan",1777,15,.@label$;
- areamonster .@map$,9,267,19,303,"Snowier",1775,10,.@label$;
- areamonster .@map$,9,267,19,303,"Gazeti",1778,10,.@label$;
+ areamonster(.@map$, 9, 267, 19, 303, _("Freezer"), FREEZER, 10, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Hatii Baby"), GARM_BABY, 10, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Ice Titan"), ICE_TITAN, 15, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Snowier"), SNOWIER, 10, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Gazeti"), GAZETI, 10, .@label$);
break;
case 57:
- areamonster .@map$,93,267,103,303,"Arc Angeling",1388,1,.@label$;
- areamonster .@map$,93,267,103,303,"Deviling",1582,1,.@label$;
- areamonster .@map$,93,267,103,303,"Angeling",1096,1,.@label$;
- areamonster .@map$,93,267,103,303,"Ghostring",1120,1,.@label$;
- areamonster .@map$,93,267,103,303,"Mastering",1090,1,.@label$;
- areamonster .@map$,93,267,103,303,"Metaling",1613,25,.@label$;
- areamonster .@map$,93,267,103,303,"Marin",1242,5,.@label$;
- areamonster .@map$,93,267,103,303,"Poporing",1031,5,.@label$;
- areamonster .@map$,93,267,103,303,"Drops",1113,5,.@label$;
+ areamonster(.@map$, 93, 267, 103, 303, _("Arc Angeling"), ARCHANGELING, 1, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Deviling"), DEVILING, 1, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Angeling"), ANGELING, 1, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Ghostring"), GHOSTRING, 1, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Mastering"), MASTERING, 1, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Metaling"), METALING, 25, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Marin"), MARIN, 5, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Poporing"), POPORING, 5, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Drops"), DROPS, 5, .@label$);
break;
case 58:
- areamonster .@map$,181,267,191,303,"Phendark",1202,20,.@label$;
- areamonster .@map$,181,267,191,303,"Rybio",1201,10,.@label$;
- areamonster .@map$,181,267,191,303,"Zombie Prisoner",1197,10,.@label$;
- areamonster .@map$,181,267,191,303,"Skeleton Prisoner",1196,5,.@label$;
- areamonster .@map$,181,267,191,303,"Injustice",1257,5,.@label$;
+ areamonster(.@map$, 181, 267, 191, 303, _("Phendark"), PHENDARK, 20, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Rybio"), RYBIO, 10, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Zombie Prisoner"), ZOMBIE_PRISONER, 10, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Skeleton Prisoner"), SKEL_PRISONER, 5, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Injustice"), INJUSTICE, 5, .@label$);
break;
case 59:
- areamonster .@map$,267,267,277,303,"Ancient Mimic",1699,30,.@label$;
- areamonster .@map$,267,267,277,303,"Mimic",1191,20,.@label$;
- areamonster .@map$,267,267,277,303,"Mystcase",1249,10,.@label$;
+ areamonster(.@map$, 267, 267, 277, 303, _("Ancient Mimic"), ANCIENT_MIMIC, 30, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Mimic"), MIMIC, 20, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Mystcase"), MYSTCASE, 10, .@label$);
break;
case 60:
- areamonster .@map$,352,267,362,303,"Egnigem Cenia",1658,1,.@label$;
- areamonster .@map$,352,267,362,303,"Doppelganger",1046,1,.@label$;
- areamonster .@map$,352,267,362,303,"Armeyer Dinze",1654,10,.@label$;
- areamonster .@map$,352,267,362,303,"Wickebine Tres",1653,10,.@label$;
- areamonster .@map$,352,267,362,303,"Laurell Winder",1657,10,.@label$;
- areamonster .@map$,352,267,362,303,"Kavach Icarus",1656,10,.@label$;
- areamonster .@map$,352,267,362,303,"Errende Ebecee",1655,10,.@label$;
- areamonster .@map$,352,267,362,303,"Egnigem Cenia",1652,10,.@label$;
+ areamonster(.@map$, 352, 267, 362, 303, _("Egnigem Cenia"), B_YGNIZEM, 1, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Doppelganger"), DOPPELGANGER, 1, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Armeyer Dinze"), ARMAIA, 10, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Wickebine Tres"), WHIKEBAIN, 10, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Laurell Winder"), RAWREL, 10, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Kavach Icarus"), KAVAC, 10, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Errende Ebecee"), EREND, 10, .@label$);
+ areamonster(.@map$, 352, 267, 362, 303, _("Egnigem Cenia"), YGNIZEM, 10, .@label$);
break;
case 61:
- areamonster .@map$,9,180,19,216,"Agav",1769,10,.@label$;
- areamonster .@map$,9,180,19,216,"Echio",1770,10,.@label$;
- areamonster .@map$,9,180,19,216,"Isilla",1772,5,.@label$;
- areamonster .@map$,9,180,19,216,"Mobster",1313,10,.@label$;
- areamonster .@map$,9,180,19,216,"Pasana",1154,10,.@label$;
- areamonster .@map$,9,180,19,216,"Vanberk",1771,5,.@label$;
+ areamonster(.@map$, 9, 180, 19, 216, _("Agav"), AGAV, 10, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Echio"), ECHIO, 10, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Isilla"), ISILLA, 5, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Mobster"), MOBSTER, 10, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Pasana"), PASANA, 10, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Vanberk"), VANBERK, 5, .@label$);
break;
case 62:
- areamonster .@map$,93,180,103,216,"Wanderer",1208,35,.@label$;
+ areamonster(.@map$, 93, 180, 103, 216, _("Wanderer"), WANDER_MAN, 35, .@label$);
break;
case 63:
- areamonster .@map$,181,180,191,216,"Ragged Zombie",1865,20,.@label$;
- areamonster .@map$,181,180,191,216,"Zombie Master",1298,10,.@label$;
- areamonster .@map$,181,180,191,216,"Zombie Prisoner",1197,5,.@label$;
- areamonster .@map$,181,180,191,216,"Orc Zombie",1153,5,.@label$;
- areamonster .@map$,181,180,191,216,"Zombie",1015,5,.@label$;
+ areamonster(.@map$, 181, 180, 191, 216, _("Ragged Zombie"), RAGGED_ZOMBIE, 20, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Zombie Master"), ZOMBIE_MASTER, 10, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Zombie Prisoner"), ZOMBIE_PRISONER, 5, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Orc Zombie"), ORC_ZOMBIE, 5, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Zombie"), ZOMBIE, 5, .@label$);
break;
case 64:
- areamonster .@map$,267,180,277,216,"Ungoliant",1618,30,.@label$;
- areamonster .@map$,267,180,277,216,"Ancient Worm",1305,2,.@label$;
- areamonster .@map$,267,180,277,216,"Caterpillar",1300,2,.@label$;
- areamonster .@map$,267,180,277,216,"Creamy Fear",1293,2,.@label$;
- areamonster .@map$,267,180,277,216,"Killer Mantis",1294,2,.@label$;
- areamonster .@map$,267,180,277,216,"Giant Hornet",1303,2,.@label$;
+ areamonster(.@map$, 267, 180, 277, 216, _("Ungoliant"), UNGOLIANT, 30, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Ancient Worm"), ANCIENT_WORM, 2, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Caterpillar"), CATERPILLAR, 2, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Creamy Fear"), CREMY_FEAR, 2, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Killer Mantis"), KILLER_MANTIS, 2, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Giant Hornet"), GIANT_HONET, 2, .@label$);
break;
case 65:
- areamonster .@map$,352,180,362,216,"Atros",1785,1,.@label$;
- areamonster .@map$,352,180,362,216,"Galion",1783,20,.@label$;
+ areamonster(.@map$, 352, 180, 362, 216, _("Atros"), ATROCE, 1, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Galion"), GALION, 20, .@label$);
break;
case 66:
- areamonster .@map$,9,96,19,132,"Incubus",1374,20,.@label$;
- areamonster .@map$,9,96,19,132,"Aliot",1736,20,.@label$;
- areamonster .@map$,9,96,19,132,"Injustice",1257,10,.@label$;
+ areamonster(.@map$, 9, 96, 19, 132, _("Incubus"), INCUBUS, 20, .@label$);
+ areamonster(.@map$, 9, 96, 19, 132, _("Aliot"), ALIOT, 20, .@label$);
+ areamonster(.@map$, 9, 96, 19, 132, _("Injustice"), INJUSTICE, 10, .@label$);
break;
case 67:
- areamonster .@map$,93,96,103,132,"Acidus",1716,10,.@label$;
- areamonster .@map$,93,96,103,132,"Acidus",1713,10,.@label$;
- areamonster .@map$,93,96,103,132,"Deleter",1384,5,.@label$;
- areamonster .@map$,93,96,103,132,"Mutant Dragonoid",1262,10,.@label$;
- areamonster .@map$,93,96,103,132,"Petite",1156,5,.@label$;
+ areamonster(.@map$, 93, 96, 103, 132, _("Acidus"), ACIDUS_, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Acidus"), ACIDUS, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Deleter"), DELETER, 5, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Mutant Dragonoid"), MUTANT_DRAGON, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Petite"), PETIT_, 5, .@label$);
break;
case 68:
- areamonster .@map$,181,96,191,132,"Lava Golem",1366,10,.@label$;
- areamonster .@map$,181,96,191,132,"Stalactic Golem",1278,10,.@label$;
- areamonster .@map$,181,96,191,132,"Ice Titan",1777,10,.@label$;
- areamonster .@map$,181,96,191,132,"Wooden Golem",1497,5,.@label$;
- areamonster .@map$,181,96,191,132,"Golem",1040,5,.@label$;
+ areamonster(.@map$, 181, 96, 191, 132, _("Lava Golem"), LAVA_GOLEM, 10, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Stalactic Golem"), STALACTIC_GOLEM, 10, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Ice Titan"), ICE_TITAN, 10, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Wooden Golem"), WOODEN_GOLEM, 5, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Golem"), GOLEM, 5, .@label$);
break;
case 69:
- areamonster .@map$,267,96,277,132,"Dame of Sentinel",1700,20,.@label$;
- areamonster .@map$,267,96,277,132,"Mistress of Shelter",1701,10,.@label$;
- areamonster .@map$,267,96,277,132,"Baroness of Retribution",1702,10,.@label$;
- areamonster .@map$,267,96,277,132,"Lady Solace",1703,10,.@label$;
- areamonster .@map$,267,96,277,132,"False Angel",1371,10,.@label$;
+ areamonster(.@map$, 267, 96, 277, 132, _("Dame of Sentinel"), OBSERVATION, 20, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Mistress of Shelter"), SHELTER, 10, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Baroness of Retribution"), RETRIBUTION, 10, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Lady Solace"), SOLACE, 10, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("False Angel"), FAKE_ANGEL, 10, .@label$);
break;
case 70:
- areamonster .@map$,352,96,362,132,"Orc Hero",1087,1,.@label$;
- areamonster .@map$,352,96,362,132,"Orc Lord",1190,1,.@label$;
- areamonster .@map$,352,96,362,132,"Orc Baby",1686,20,.@label$;
+ areamonster(.@map$, 352, 96, 362, 132, _("Orc Hero"), ORK_HERO, 1, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Orc Lord"), ORC_LORD, 1, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Orc Baby"), ORC_BABY, 20, .@label$);
break;
case 71:
- areamonster .@map$,9,9,19,45,"Succubus",1370,20,.@label$;
- areamonster .@map$,9,9,19,45,"Nightmare Terror",1379,20,.@label$;
- areamonster .@map$,9,9,19,45,"Incubus",1374,20,.@label$;
- areamonster .@map$,9,9,19,45,"Nightmare",1061,5,.@label$;
+ areamonster(.@map$, 9, 9, 19, 45, _("Succubus"), SUCCUBUS, 20, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Nightmare Terror"), NIGHTMARE_TERROR, 20, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Incubus"), INCUBUS, 20, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Nightmare"), NIGHTMARE, 5, .@label$);
break;
case 72:
- areamonster .@map$,93,9,103,45,"Margaretha Sorin",1637,10,.@label$;
- areamonster .@map$,93,9,103,45,"Permeter",1314,10,.@label$;
- areamonster .@map$,93,9,103,45,"Errende Ebecee",1655,10,.@label$;
- areamonster .@map$,93,9,103,45,"Enchanted Peach Tree",1410,10,.@label$;
+ areamonster(.@map$, 93, 9, 103, 45, _("Margaretha Sorin"), MAGALETA, 10, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Permeter"), PERMETER, 10, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Errende Ebecee"), EREND, 10, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Enchanted Peach Tree"), LIVE_PEACH_TREE, 10, .@label$);
break;
case 73:
- areamonster .@map$,181,9,191,45,"Succubus",1370,10,.@label$;
- areamonster .@map$,181,9,191,45,"Loli Ruri",1505,20,.@label$;
- areamonster .@map$,181,9,191,45,"Aliza",1737,10,.@label$;
- areamonster .@map$,181,9,191,45,"Zealotus",1200,5,.@label$;
- areamonster .@map$,181,9,191,45,"Alice",1275,5,.@label$;
- areamonster .@map$,181,9,191,45,"Green Maiden",1519,10,.@label$;
+ areamonster(.@map$, 181, 9, 191, 45, _("Succubus"), SUCCUBUS, 10, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Loli Ruri"), LOLI_RURI, 20, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Aliza"), ALIZA, 10, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Zealotus"), ZHERLTHSH, 5, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Alice"), ALICE, 5, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Green Maiden"), CHUNG_E, 10, .@label$);
break;
case 74:
- areamonster .@map$,267,9,277,45,"Dimik",1671,6,.@label$;
- areamonster .@map$,267,9,277,45,"Dimik",1673,6,.@label$;
- areamonster .@map$,267,9,277,45,"Dimik",1672,6,.@label$;
- areamonster .@map$,267,9,277,45,"Venatu",1677,6,.@label$;
- areamonster .@map$,267,9,277,45,"Dimik",1670,6,.@label$;
- areamonster .@map$,267,9,277,45,"Archdam",1668,6,.@label$;
- areamonster .@map$,267,9,277,45,"Venatu",1678,6,.@label$;
- areamonster .@map$,267,9,277,45,"Venatu",1679,6,.@label$;
- areamonster .@map$,267,9,277,45,"Venatu",1676,6,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Dimik"), DIMIK_2, 6, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Dimik"), DIMIK_4, 6, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Dimik"), DIMIK_3, 6, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Venatu"), VENATU_2, 6, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Dimik"), DIMIK_1, 6, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Archdam"), ARCHDAM, 6, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Venatu"), VENATU_3, 6, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Venatu"), VENATU_4, 6, .@label$);
+ areamonster(.@map$, 267, 9, 277, 45, _("Venatu"), VENATU_1, 6, .@label$);
break;
case 75:
- areamonster .@map$,352,9,362,45,"Baphomet",1039,1,.@label$;
- areamonster .@map$,352,9,362,45,"Dark Lord",1272,1,.@label$;
- areamonster .@map$,352,9,362,45,"Baphomet Jr.",1101,20,.@label$;
- areamonster .@map$,352,9,362,45,"Dark Illusion",1302,10,.@label$;
+ areamonster(.@map$, 352, 9, 362, 45, _("Baphomet"), BAPHOMET, 1, .@label$);
+ areamonster(.@map$, 352, 9, 362, 45, _("Dark Lord"), DARK_LORD, 1, .@label$);
+ areamonster(.@map$, 352, 9, 362, 45, _("Baphomet Jr."), BAPHOMET_, 20, .@label$);
+ areamonster(.@map$, 352, 9, 362, 45, _("Dark Illusion"), DARK_ILLUSION, 10, .@label$);
break;
case 76:
- areamonster .@map$,9,351,19,387,"Abysmal Knight",1219,30,.@label$;
- areamonster .@map$,9,351,19,387,"Nightmare Terror",1379,20,.@label$;
- areamonster .@map$,9,351,19,387,"Nightmare",1061,10,.@label$;
+ areamonster(.@map$, 9, 351, 19, 387, _("Abysmal Knight"), KNIGHT_OF_ABYSS, 30, .@label$);
+ areamonster(.@map$, 9, 351, 19, 387, _("Nightmare Terror"), NIGHTMARE_TERROR, 20, .@label$);
+ areamonster(.@map$, 9, 351, 19, 387, _("Nightmare"), NIGHTMARE, 10, .@label$);
break;
case 77:
- areamonster .@map$,93,351,103,387,"Banshee",1867,30,.@label$;
- areamonster .@map$,93,351,103,387,"Wraith Dead",1291,10,.@label$;
- areamonster .@map$,93,351,103,387,"Evil Druid",1117,10,.@label$;
- areamonster .@map$,93,351,103,387,"Wraith",1192,10,.@label$;
- areamonster .@map$,93,351,103,387,"Wind Ghost",1263,10,.@label$;
+ areamonster(.@map$, 93, 351, 103, 387, _("Banshee"), BANSHEE, 30, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Wraith Dead"), WRAITH_DEAD, 10, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Evil Druid"), EVIL_DRUID, 10, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Wraith"), WRAITH, 10, .@label$);
+ areamonster(.@map$, 93, 351, 103, 387, _("Wind Ghost"), WIND_GHOST, 10, .@label$);
break;
case 78:
- areamonster .@map$,181,351,191,387,"Sword Master",1829,5,.@label$;
- areamonster .@map$,181,351,191,387,"Bloody Knight",1268,10,.@label$;
- areamonster .@map$,181,351,191,387,"Abysmal Knight",1219,5,.@label$;
- areamonster .@map$,181,351,191,387,"Dullahan",1504,10,.@label$;
- areamonster .@map$,181,351,191,387,"Raydric",1163,20,.@label$;
+ areamonster(.@map$, 181, 351, 191, 387, _("Sword Master"), SWORD_GUARDIAN, 5, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Bloody Knight"), BLOODY_KNIGHT, 10, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Abysmal Knight"), KNIGHT_OF_ABYSS, 5, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Dullahan"), DULLAHAN, 10, .@label$);
+ areamonster(.@map$, 181, 351, 191, 387, _("Raydric"), RAYDRIC, 20, .@label$);
break;
case 79:
- areamonster .@map$,267,351,277,387,"Hydro",1720,10,.@label$;
- areamonster .@map$,267,351,277,387,"Ferus",1714,10,.@label$;
- areamonster .@map$,267,351,277,387,"Ferus",1717,10,.@label$;
- areamonster .@map$,267,351,277,387,"Deleter",1385,5,.@label$;
- areamonster .@map$,267,351,277,387,"Petite",1155,5,.@label$;
+ areamonster(.@map$, 267, 351, 277, 387, _("Hydro"), HYDRO, 10, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Ferus"), FERUS, 10, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Ferus"), FERUS_, 10, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Deleter"), DELETER_, 5, .@label$);
+ areamonster(.@map$, 267, 351, 277, 387, _("Petite"), PETIT, 5, .@label$);
break;
case 80:
- areamonster .@map$,352,351,362,387,"Falling Bishop",1871,1,.@label$;
- areamonster .@map$,352,351,362,387,"Necromancer",1870,15,.@label$;
+ areamonster(.@map$, 352, 351, 362, 387, _("Falling Bishop"), FALLINGBISHOP, 1, .@label$);
+ areamonster(.@map$, 352, 351, 362, 387, _("Necromancer"), NECROMANCER, 15, .@label$);
break;
case 81:
- areamonster .@map$,9,267,19,303,"Mysteltainn",1203,20,.@label$;
- areamonster .@map$,9,267,19,303,"Ogretooth",1204,20,.@label$;
- areamonster .@map$,9,267,19,303,"Executioner",1205,20,.@label$;
+ areamonster(.@map$, 9, 267, 19, 303, _("Mysteltainn"), MYSTELTAINN, 20, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Ogretooth"), TIRFING, 20, .@label$);
+ areamonster(.@map$, 9, 267, 19, 303, _("Executioner"), EXECUTIONER, 20, .@label$);
break;
case 82:
- areamonster .@map$,93,267,103,303,"Bloody Knight",1268,10,.@label$;
- areamonster .@map$,93,267,103,303,"Agav",1769,10,.@label$;
- areamonster .@map$,93,267,103,303,"Bloody Murderer",1507,10,.@label$;
- areamonster .@map$,93,267,103,303,"Skogul",1752,10,.@label$;
- areamonster .@map$,93,267,103,303,"Injustice",1257,10,.@label$;
+ areamonster(.@map$, 93, 267, 103, 303, _("Bloody Knight"), BLOODY_KNIGHT, 10, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Agav"), AGAV, 10, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Bloody Murderer"), BLOODY_MURDERER, 10, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Skogul"), SKOGUL, 10, .@label$);
+ areamonster(.@map$, 93, 267, 103, 303, _("Injustice"), INJUSTICE, 10, .@label$);
break;
case 83:
- areamonster .@map$,181,267,191,303,"Skeggiold",1754,10,.@label$;
- areamonster .@map$,181,267,191,303,"Dark Illusion",1302,10,.@label$;
- areamonster .@map$,181,267,191,303,"Gryphon",1259,10,.@label$;
- areamonster .@map$,181,267,191,303,"Chimera",1283,10,.@label$;
+ areamonster(.@map$, 181, 267, 191, 303, _("Skeggiold"), SKEGGIOLD, 10, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Dark Illusion"), DARK_ILLUSION, 10, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Gryphon"), GRYPHON, 10, .@label$);
+ areamonster(.@map$, 181, 267, 191, 303, _("Chimera"), CHIMERA, 10, .@label$);
break;
case 84:
- areamonster .@map$,267,267,277,303,"Succubus",1370,10,.@label$;
- areamonster .@map$,267,267,277,303,"Dark Illusion",1302,20,.@label$;
- areamonster .@map$,267,267,277,303,"Owl Duke",1320,10,.@label$;
- areamonster .@map$,267,267,277,303,"Owl Baron",1295,10,.@label$;
- areamonster .@map$,267,267,277,303,"Incubus",1374,10,.@label$;
+ areamonster(.@map$, 267, 267, 277, 303, _("Succubus"), SUCCUBUS, 10, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Dark Illusion"), DARK_ILLUSION, 20, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Owl Duke"), OWL_DUKE, 10, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Owl Baron"), OWL_BARON, 10, .@label$);
+ areamonster(.@map$, 267, 267, 277, 303, _("Incubus"), INCUBUS, 10, .@label$);
break;
case 85:
- areamonster .@map$,352,267,362,303,"Ifrit",1832,1,.@label$;
+ areamonster(.@map$, 352, 267, 362, 303, _("Ifrit"), IFRIT, 1, .@label$);
break;
case 86:
- areamonster .@map$,9,180,19,216,"Hydro",1720,10,.@label$;
- areamonster .@map$,9,180,19,216,"Gryphon",1259,10,.@label$;
- areamonster .@map$,9,180,19,216,"Chimera",1283,10,.@label$;
- areamonster .@map$,9,180,19,216,"Majoruros",1310,10,.@label$;
+ areamonster(.@map$, 9, 180, 19, 216, _("Hydro"), HYDRO, 10, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Gryphon"), GRYPHON, 10, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Chimera"), CHIMERA, 10, .@label$);
+ areamonster(.@map$, 9, 180, 19, 216, _("Majoruros"), MAJORUROS, 10, .@label$);
break;
case 87:
- areamonster .@map$,93,180,103,216,"Salamander",1831,15,.@label$;
- areamonster .@map$,93,180,103,216,"Kasa",1833,20,.@label$;
- areamonster .@map$,93,180,103,216,"Lava Golem",1366,15,.@label$;
- areamonster .@map$,93,180,103,216,"Gajomart",1309,10,.@label$;
+ areamonster(.@map$, 93, 180, 103, 216, _("Salamander"), SALAMANDER, 15, .@label$);
+ areamonster(.@map$, 93, 180, 103, 216, _("Kasa"), KASA, 20, .@label$);
+ areamonster(.@map$, 93, 180, 103, 216, _("Lava Golem"), LAVA_GOLEM, 15, .@label$);
+ areamonster(.@map$, 93, 180, 103, 216, _("Gajomart"), GAJOMART, 10, .@label$);
break;
case 88:
- areamonster .@map$,181,180,191,216,"Necromancer",1870,15,.@label$;
- areamonster .@map$,181,180,191,216,"Anubis",1098,15,.@label$;
- areamonster .@map$,181,180,191,216,"Wraith Dead",1291,10,.@label$;
- areamonster .@map$,181,180,191,216,"Ancient Mummy",1297,10,.@label$;
- areamonster .@map$,181,180,191,216,"Khalitzburg",1132,10,.@label$;
+ areamonster(.@map$, 181, 180, 191, 216, _("Necromancer"), NECROMANCER, 15, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Anubis"), ANUBIS, 15, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Wraith Dead"), WRAITH_DEAD, 10, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Ancient Mummy"), ANCIENT_MUMMY, 10, .@label$);
+ areamonster(.@map$, 181, 180, 191, 216, _("Khalitzburg"), KHALITZBURG, 10, .@label$);
break;
case 89:
- areamonster .@map$,267,180,277,216,"Odium of Thanatos",1704,6,.@label$;
- areamonster .@map$,267,180,277,216,"Despero of Thanatos",1705,6,.@label$;
- areamonster .@map$,267,180,277,216,"Maero of Thanatos",1706,6,.@label$;
- areamonster .@map$,267,180,277,216,"Dolor of Thanatos",1707,6,.@label$;
+ areamonster(.@map$, 267, 180, 277, 216, _("Odium of Thanatos"), THA_ODIUM, 6, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Despero of Thanatos"), THA_DESPERO, 6, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Maero of Thanatos"), THA_MAERO, 6, .@label$);
+ areamonster(.@map$, 267, 180, 277, 216, _("Dolor of Thanatos"), THA_DOLOR, 6, .@label$);
break;
case 90:
- areamonster .@map$,352,180,362,216,"Valkyrie Randgris",1751,1,.@label$;
- areamonster .@map$,352,180,362,216,"Baroness of Retribution",1702,10,.@label$;
- areamonster .@map$,352,180,362,216,"Lady Solace",1703,10,.@label$;
- areamonster .@map$,352,180,362,216,"False Angel",1371,10,.@label$;
+ areamonster(.@map$, 352, 180, 362, 216, _("Valkyrie Randgris"), RANDGRIS, 1, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Baroness of Retribution"), RETRIBUTION, 10, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("Lady Solace"), SOLACE, 10, .@label$);
+ areamonster(.@map$, 352, 180, 362, 216, _("False Angel"), FAKE_ANGEL, 10, .@label$);
break;
case 91:
- areamonster .@map$,9,96,19,132,"Cecil Damon",1638,10,.@label$;
- areamonster .@map$,9,96,19,132,"Bow Master",1830,10,.@label$;
- areamonster .@map$,9,96,19,132,"Kavac",1656,30,.@label$;
+ areamonster(.@map$, 9, 96, 19, 132, _("Cecil Damon"), SHECIL, 10, .@label$);
+ areamonster(.@map$, 9, 96, 19, 132, _("Bow Master"), BOW_GUARDIAN, 10, .@label$);
+ areamonster(.@map$, 9, 96, 19, 132, _("Kavac"), KAVAC, 30, .@label$);
break;
case 92:
- areamonster .@map$,93,96,103,132,"Kathryne Keyron",1639,15,.@label$;
- areamonster .@map$,93,96,103,132,"Elder",1377,10,.@label$;
- areamonster .@map$,93,96,103,132,"Laurell Weinder",1657,10,.@label$;
- areamonster .@map$,93,96,103,132,"Wind Ghost",1263,10,.@label$;
- areamonster .@map$,93,96,103,132,"Marduk",1140,10,.@label$;
+ areamonster(.@map$, 93, 96, 103, 132, _("Kathryne Keyron"), KATRINN, 15, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Elder"), ELDER, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Laurell Weinder"), RAWREL, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Wind Ghost"), WIND_GHOST, 10, .@label$);
+ areamonster(.@map$, 93, 96, 103, 132, _("Marduk"), MARDUK, 10, .@label$);
break;
case 93:
- areamonster .@map$,181,96,191,132,"Seyren Windsor",1634,15,.@label$;
- areamonster .@map$,181,96,191,132,"Bloody Knight",1268,10,.@label$;
- areamonster .@map$,181,96,191,132,"Abysmal Knight",1219,10,.@label$;
- areamonster .@map$,181,96,191,132,"Wanderer",1208,10,.@label$;
+ areamonster(.@map$, 181, 96, 191, 132, _("Seyren Windsor"), SEYREN, 15, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Bloody Knight"), BLOODY_KNIGHT, 10, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Abysmal Knight"), KNIGHT_OF_ABYSS, 10, .@label$);
+ areamonster(.@map$, 181, 96, 191, 132, _("Wanderer"), WANDER_MAN, 10, .@label$);
break;
case 94:
- areamonster .@map$,267,96,277,132,"Sword Master",1829,15,.@label$;
- areamonster .@map$,267,96,277,132,"Bow Master",1830,15,.@label$;
+ areamonster(.@map$, 267, 96, 277, 132, _("Sword Master"), SWORD_GUARDIAN, 15, .@label$);
+ areamonster(.@map$, 267, 96, 277, 132, _("Bow Master"), BOW_GUARDIAN, 15, .@label$);
break;
case 95:
- areamonster .@map$,352,96,362,132,"Beelzebub",1873,1,.@label$;
- areamonster .@map$,352,96,362,132,"Hunter Fly",1035,30,.@label$;
- areamonster .@map$,352,96,362,132,"Steel Chonchon",1042,5,.@label$;
- areamonster .@map$,352,96,362,132,"Dragon FLy",1091,5,.@label$;
- areamonster .@map$,352,96,362,132,"Chonchon",1011,5,.@label$;
+ areamonster(.@map$, 352, 96, 362, 132, _("Beelzebub"), BEELZEBUB, 1, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Hunter Fly"), HUNTER_FLY, 30, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Steel Chonchon"), STEEL_CHONCHON, 5, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Dragon FLy"), DRAGON_FLY, 5, .@label$);
+ areamonster(.@map$, 352, 96, 362, 132, _("Chonchon"), CHONCHON, 5, .@label$);
break;
case 96:
- areamonster .@map$,9,9,19,45,"Valkyrie",1765,5,.@label$;
- areamonster .@map$,9,9,19,45,"Skeggiold",1755,10,.@label$;
- areamonster .@map$,9,9,19,45,"Skeggiold",1754,10,.@label$;
+ areamonster(.@map$, 9, 9, 19, 45, _("Valkyrie"), G_RANDGRIS, 5, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Skeggiold"), SKEGGIOLD_, 10, .@label$);
+ areamonster(.@map$, 9, 9, 19, 45, _("Skeggiold"), SKEGGIOLD, 10, .@label$);
break;
case 97:
- areamonster .@map$,93,9,103,45,"Incarnation of Morroc",1918,5,.@label$;
- areamonster .@map$,93,9,103,45,"Incarnation of Morroc",1919,5,.@label$;
- areamonster .@map$,93,9,103,45,"Incarnation of Morroc",1920,5,.@label$;
- areamonster .@map$,93,9,103,45,"Incarnation of Morroc",1921,5,.@label$;
+ areamonster(.@map$, 93, 9, 103, 45, _("Incarnation of Morroc"), MOROCC_1, 5, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Incarnation of Morroc"), MOROCC_2, 5, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Incarnation of Morroc"), MOROCC_3, 5, .@label$);
+ areamonster(.@map$, 93, 9, 103, 45, _("Incarnation of Morroc"), MOROCC_4, 5, .@label$);
break;
case 98:
- areamonster .@map$,181,9,191,45,"Kathryne Keyron",1639,2,.@label$;
- areamonster .@map$,181,9,191,45,"Seyren Windsor",1634,2,.@label$;
- areamonster .@map$,181,9,191,45,"Margaretha Sorin",1637,2,.@label$;
- areamonster .@map$,181,9,191,45,"Eremes Guile",1635,2,.@label$;
- areamonster .@map$,181,9,191,45,"Howard Alt-Eisen",1636,2,.@label$;
- areamonster .@map$,181,9,191,45,"Cecil Damon",1638,2,.@label$;
+ areamonster(.@map$, 181, 9, 191, 45, _("Kathryne Keyron"), KATRINN, 2, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Seyren Windsor"), SEYREN, 2, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Margaretha Sorin"), MAGALETA, 2, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Eremes Guile"), EREMES, 2, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Howard Alt-Eisen"), HARWORD, 2, .@label$);
+ areamonster(.@map$, 181, 9, 191, 45, _("Cecil Damon"), SHECIL, 2, .@label$);
break;
case 99:
- for(.@i = 1; .@i<=7; ++.@i) {
- .@mob_ran = rand(1,30);
+ for (.@i = 1; .@i <= 7; ++.@i) {
+ .@mob_ran = rand(1, 30);
if (.@mob_ran == 1)
- areamonster .@map$,267,9,277,45,"Kathryne Keyron",1639,2,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Kathryne Keyron"), KATRINN, 2, .@label$);
else if (.@mob_ran == 2)
- areamonster .@map$,267,9,277,45,"Seyren Windsor",1634,2,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Seyren Windsor"), SEYREN, 2, .@label$);
else if (.@mob_ran == 3)
- areamonster .@map$,267,9,277,45,"Margaretha Sorin",1637,2,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Margaretha Sorin"), MAGALETA, 2, .@label$);
else if (.@mob_ran == 4)
- areamonster .@map$,267,9,277,45,"Eremes Guile",1635,2,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Eremes Guile"), EREMES, 2, .@label$);
else if (.@mob_ran == 5)
- areamonster .@map$,267,9,277,45,"Howard Alt-Eisen",1636,2,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Howard Alt-Eisen"), HARWORD, 2, .@label$);
else if (.@mob_ran == 6)
- areamonster .@map$,267,9,277,45,"Cecil Damon",1638,2,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Cecil Damon"), SHECIL, 2, .@label$);
else if (.@mob_ran == 7)
- areamonster .@map$,267,9,277,45,"Incarnation of Morroc",1918,5,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Incarnation of Morroc"), MOROCC_1, 5, .@label$);
else if (.@mob_ran == 8)
- areamonster .@map$,267,9,277,45,"Incarnation of Morroc",1919,5,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Incarnation of Morroc"), MOROCC_2, 5, .@label$);
else if (.@mob_ran == 9)
- areamonster .@map$,267,9,277,45,"Incarnation of Morroc",1920,5,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Incarnation of Morroc"), MOROCC_3, 5, .@label$);
else if (.@mob_ran == 10)
- areamonster .@map$,267,9,277,45,"Incarnation of Morroc",1921,5,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Incarnation of Morroc"), MOROCC_4, 5, .@label$);
else if (.@mob_ran == 11)
- areamonster .@map$,267,9,277,45,"Valkyrie",1765,5,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Valkyrie"), G_RANDGRIS, 5, .@label$);
else if (.@mob_ran == 12)
- areamonster .@map$,267,9,277,45,"Skeggiold",1755,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Skeggiold"), SKEGGIOLD_, 10, .@label$);
else if (.@mob_ran == 13)
- areamonster .@map$,267,9,277,45,"Skeggiold",1754,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Skeggiold"), SKEGGIOLD, 10, .@label$);
else if (.@mob_ran == 14)
- areamonster .@map$,267,9,277,45,"Seyren Windsor",1634,15,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Seyren Windsor"), SEYREN, 15, .@label$);
else if (.@mob_ran == 15)
- areamonster .@map$,267,9,277,45,"Bloody Knight",1268,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Bloody Knight"), BLOODY_KNIGHT, 10, .@label$);
else if (.@mob_ran == 16)
- areamonster .@map$,267,9,277,45,"Abysmal Knight",1219,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Abysmal Knight"), KNIGHT_OF_ABYSS, 10, .@label$);
else if (.@mob_ran == 17)
- areamonster .@map$,267,9,277,45,"Wanderer",1208,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Wanderer"), WANDER_MAN, 10, .@label$);
else if (.@mob_ran == 18)
- areamonster .@map$,267,9,277,45,"Sword Master",1829,15,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Sword Master"), SWORD_GUARDIAN, 15, .@label$);
else if (.@mob_ran == 19)
- areamonster .@map$,267,9,277,45,"Bow Master",1830,15,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Bow Master"), BOW_GUARDIAN, 15, .@label$);
else if (.@mob_ran == 20)
- areamonster .@map$,267,9,277,45,"Kathryne Keyron",1639,15,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Kathryne Keyron"), KATRINN, 15, .@label$);
else if (.@mob_ran == 21)
- areamonster .@map$,267,9,277,45,"Elder",1377,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Elder"), ELDER, 10, .@label$);
else if (.@mob_ran == 22)
- areamonster .@map$,267,9,277,45,"Laurell Weinder",1657,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Laurell Weinder"), RAWREL, 10, .@label$);
else if (.@mob_ran == 23)
- areamonster .@map$,267,9,277,45,"Wind Ghost",1263,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Wind Ghost"), WIND_GHOST, 10, .@label$);
else if (.@mob_ran == 24)
- areamonster .@map$,267,9,277,45,"Marduk",1140,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Marduk"), MARDUK, 10, .@label$);
else if (.@mob_ran == 25)
- areamonster .@map$,267,9,277,45,"Cecil Damon",1638,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Cecil Damon"), SHECIL, 10, .@label$);
else if (.@mob_ran == 26)
- areamonster .@map$,267,9,277,45,"Bow Master",1830,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Bow Master"), BOW_GUARDIAN, 10, .@label$);
else if (.@mob_ran == 27)
- areamonster .@map$,267,9,277,45,"Kavach Icarus",1656,30,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Kavach Icarus"), KAVAC, 30, .@label$);
else if (.@mob_ran == 28)
- areamonster .@map$,267,9,277,45,"Baroness of Retribution",1702,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Baroness of Retribution"), RETRIBUTION, 10, .@label$);
else if (.@mob_ran == 29)
- areamonster .@map$,267,9,277,45,"Lady Solace",1703,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("Lady Solace"), SOLACE, 10, .@label$);
else
- areamonster .@map$,267,9,277,45,"False Angel",1371,10,.@label$;
+ areamonster(.@map$, 267, 9, 277, 45, _("False Angel"), FAKE_ANGEL, 10, .@label$);
}
break;
}
@@ -1080,139 +1082,60 @@ function script F_Tower_Monster {
function script F_Tower_Warp {
+ setarray(.@x[2], 136, 224, 310, 395, 52, 136, 224, 310, 395, // 2 - 10
+ 52, 136, 224, 310, 395, 52, 136, 224, 310, 395, // 11 - 20
+ 52, 136, 224, 310, 395, 0, 136, 224, 310, 395, // 21 - 30
+ 52, 136, 224, 310, 395, 52, 136, 224, 310, 395, // 31 - 40
+ 52, 136, 224, 310, 395, 52, 136, 224, 310, 395, // 41 - 50
+ 0, 136, 224, 310, 395, 52, 136, 224, 310, 395, // 51 - 60
+ 52, 136, 224, 310, 395, 52, 136, 224, 310, 395, // 61 - 70
+ 52, 136, 224, 310, 395, 0, 136, 224, 310, 395, // 71 - 80
+ 52, 136, 224, 310, 395, 52, 136, 224, 310, 395, // 81 - 90
+ 52, 136, 224, 310, 395, 52, 136, 224, 309); // 91 - 99
+ setarray(.@y[2], 354, 354, 354, 354, 270, 270, 270, 270, 270, // 2 - 10
+ 183, 183, 183, 183, 183, 99, 99, 99, 99, 99, // 11 - 20
+ 12, 12, 12, 12, 12, 0, 354, 354, 354, 354, // 21 - 30
+ 270, 270, 270, 270, 270, 183, 183, 183, 183, 183, // 31 - 40
+ 99, 99, 99, 99, 99, 12, 12, 12, 12, 12, // 41 - 50
+ 0, 354, 354, 354, 354, 270, 270, 270, 270, 270, // 51 - 60
+ 183, 183, 183, 183, 183, 99, 99, 99, 99, 99, // 61 - 70
+ 12, 12, 12, 12, 12, 0, 354, 354, 354, 354, // 71 - 80
+ 270, 270, 270, 270, 270, 183, 183, 183, 183, 183, // 81 - 90
+ 99, 99, 99, 99, 99, 12, 12, 12, 12); // 91 - 99
.@level = getarg(0);
.@map$ = getarg(1);
-
- switch(.@level) {
- case 2: warp .@map$,136,354; break;
- case 3: warp .@map$,224,354; break;
- case 4: warp .@map$,310,354; break;
- case 5: warp .@map$,395,354; break;
- case 6: warp .@map$,52,270; break;
- case 7: warp .@map$,136,270; break;
- case 8: warp .@map$,224,270; break;
- case 9: warp .@map$,310,270; break;
- case 10: warp .@map$,395,270; break;
- case 11: warp .@map$,52,183; break;
- case 12: warp .@map$,136,183; break;
- case 13: warp .@map$,224,183; break;
- case 14: warp .@map$,310,183; break;
- case 15: warp .@map$,395,183; break;
- case 16: warp .@map$,52,99; break;
- case 17: warp .@map$,136,99; break;
- case 18: warp .@map$,224,99; break;
- case 19: warp .@map$,310,99; break;
- case 20: warp .@map$,395,99; break;
- case 21: warp .@map$,52,12; break;
- case 22: warp .@map$,136,12; break;
- case 23: warp .@map$,224,12; break;
- case 24: warp .@map$,310,12; break;
- case 25: warp .@map$,395,12; break;
-
- case 27: warp .@map$,136,354; break;
- case 28: warp .@map$,224,354; break;
- case 29: warp .@map$,310,354; break;
- case 30: warp .@map$,395,354; break;
- case 31: warp .@map$,52,270; break;
- case 32: warp .@map$,136,270; break;
- case 33: warp .@map$,224,270; break;
- case 34: warp .@map$,310,270; break;
- case 35: warp .@map$,395,270; break;
- case 36: warp .@map$,52,183; break;
- case 37: warp .@map$,136,183; break;
- case 38: warp .@map$,224,183; break;
- case 39: warp .@map$,310,183; break;
- case 40: warp .@map$,395,183; break;
- case 41: warp .@map$,52,99; break;
- case 42: warp .@map$,136,99; break;
- case 43: warp .@map$,224,99; break;
- case 44: warp .@map$,310,99; break;
- case 45: warp .@map$,395,99; break;
- case 46: warp .@map$,52,12; break;
- case 47: warp .@map$,136,12; break;
- case 48: warp .@map$,224,12; break;
- case 49: warp .@map$,310,12; break;
- case 50: warp .@map$,395,12; break;
-
- case 52: warp .@map$,136,354; break;
- case 53: warp .@map$,224,354; break;
- case 54: warp .@map$,310,354; break;
- case 55: warp .@map$,395,354; break;
- case 56: warp .@map$,52,270; break;
- case 57: warp .@map$,136,270; break;
- case 58: warp .@map$,224,270; break;
- case 59: warp .@map$,310,270; break;
- case 60: warp .@map$,395,270; break;
- case 61: warp .@map$,52,183; break;
- case 62: warp .@map$,136,183; break;
- case 63: warp .@map$,224,183; break;
- case 64: warp .@map$,310,183; break;
- case 65: warp .@map$,395,183; break;
- case 66: warp .@map$,52,99; break;
- case 67: warp .@map$,136,99; break;
- case 68: warp .@map$,224,99; break;
- case 69: warp .@map$,310,99; break;
- case 70: warp .@map$,395,99; break;
- case 71: warp .@map$,52,12; break;
- case 72: warp .@map$,136,12; break;
- case 73: warp .@map$,224,12; break;
- case 74: warp .@map$,310,12; break;
- case 75: warp .@map$,395,12; break;
-
- case 77: warp .@map$,136,354; break;
- case 78: warp .@map$,224,354; break;
- case 79: warp .@map$,310,354; break;
- case 80: warp .@map$,395,354; break;
- case 81: warp .@map$,52,270; break;
- case 82: warp .@map$,136,270; break;
- case 83: warp .@map$,224,270; break;
- case 84: warp .@map$,310,270; break;
- case 85: warp .@map$,395,270; break;
- case 86: warp .@map$,52,183; break;
- case 87: warp .@map$,136,183; break;
- case 88: warp .@map$,224,183; break;
- case 89: warp .@map$,310,183; break;
- case 90: warp .@map$,395,183; break;
- case 91: warp .@map$,52,99; break;
- case 92: warp .@map$,136,99; break;
- case 93: warp .@map$,224,99; break;
- case 94: warp .@map$,310,99; break;
- case 95: warp .@map$,395,99; break;
- case 96: warp .@map$,52,12; break;
- case 97: warp .@map$,136,12; break;
- case 98: warp .@map$,224,12; break;
- case 99: warp .@map$,309,12; break;
- }
+ if (.@x[.@level] > 0 && .@y[.@level] > 0)
+ warp(.@map$, .@x[.@level], .@y[.@level]);
return;
}
//== Levels 1-25 ===========================================
1@tower,50,360,0 script Immortal Brazier# CLEAR_NPC,{
- mes "- A Message is Engraved on the Brazier -";
- mes "The one who scatters the ashes of the darkness in this place shall become one step closer to Nacht Sieger, the Hegemon King of the Darkness...";
- next;
+ mes("- A Message is Engraved on the Brazier -");
+ mes("The one who scatters the ashes of the darkness in this place shall become one step closer to Nacht Sieger, the Hegemon King of the Darkness...");
+ next();
- setarray .@level$[1],"26th","51st","76th";
- setarray .@map$[1],"2@tower","3@tower","4@tower";
+ setarray(.@level$[1], _("26th"), _("51st"), _("76th"));
+ setarray(.@map$[1], "2@tower", "3@tower", "4@tower");
.@i = select("26th Level", "51st Level", "76th Level");
if (countitem(Dark_Ashes) < .@i) {
- mes "-Warning-";
- mes "To warp to the "+.@level$[.@i]+" Level, you need "+.@i+" Ashes of the Darkness.";
- close;
+ mes("-Warning-");
+ mesf("To warp to the %s Level, you need %d Ashes of the Darkness.", .@level$[.@i], .@i);
+ close();
}
- delitem Dark_Ashes,.@i;
- mapannounce instance_mapname("1@tower"), strcharinfo(PC_NAME)+". You will be warped to the "+.@level$[.@i]+" Level.",bc_map,"0x00ff99";
- warp instance_mapname(.@map$[.@i]),52,354;
- close;
+ delitem(Dark_Ashes, .@i);
+ mapannounce(instance_mapname("1@tower"), sprintf(_$("%s. You will be warped to the %s Level."), strcharinfo(PC_NAME), .@level$[.@i]), bc_map, C_SPRINGGREEN);
+ warp(instance_mapname(.@map$[.@i]), 52, 354);
+ close();
OnInstanceInit:
- initnpctimer;
+ initnpctimer();
end;
OnTimer10000:
- mapannounce instance_mapname("1@tower"), "Notice : Taming a monster does not count towards defeating them.",bc_map,"0xff0000";
- stopnpctimer;
+ mapannounce(instance_mapname("1@tower"), _("Notice : Taming a monster does not count towards defeating them."), bc_map, C_RED);
+ stopnpctimer();
end;
}
@@ -1220,26 +1143,24 @@ OnTimer10000:
end;
OnInstanceInit:
- callfunc "F_Tower_Monster",
- 1,
- instance_mapname("1@tower"),
- instance_npcname("#1F Controller")+"::OnMyMobDead";
+ callfunc("F_Tower_Monster", 1, instance_mapname("1@tower"), instance_npcname("#1F Controller")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("1@tower");
- .@mob_dead_num = mobcount(.@map$,instance_npcname("#1F Controller")+"::OnMyMobDead");
+ .@mob_dead_num = mobcount(.@map$, instance_npcname("#1F Controller")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- initnpctimer;
+ initnpctimer();
//SetItemPartyInMap in_102floor 1
- } else
- mapannounce .@map$, "Remaining Monsters on the 1st Level - "+.@mob_dead_num,bc_map,"0x00ff99";
+ } else {
+ mapannounce(.@map$, sprintf(_$("Remaining Monsters on the 1st Level - %d"), .@mob_dead_num), bc_map, C_SPRINGGREEN);
+ }
end;
OnTimer5000:
- mapannounce instance_mapname("1@tower"), "All Monsters on the 1st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("1FGate102tower")+"::OnEnable";
- stopnpctimer;
+ mapannounce(instance_mapname("1@tower"), _("All Monsters on the 1st Level have been defeated."), bc_map, C_YELLOW);
+ donpcevent(instance_npcname("1FGate102tower")+"::OnEnable");
+ stopnpctimer();
end;
}
@@ -1247,49 +1168,50 @@ OnTimer5000:
end;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(NPC_NAME));
+ disablenpc(instance_npcname(strnpcinfo(NPC_NAME)));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(NPC_NAME));
- callfunc "F_Tower_Monster",
- atoi(replacestr(strnpcinfo(NPC_NAME),"FGate102tower","")) + 1,
- strnpcinfo(NPC_MAP),
- instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead";
+ enablenpc(instance_npcname(strnpcinfo(NPC_NAME)));
+ callfunc("F_Tower_Monster", atoi(replacestr(strnpcinfo(NPC_NAME), "FGate102tower", "")) + 1, strnpcinfo(NPC_MAP), instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead");
end;
OnTouch_:
- callfunc "F_Tower_Warp",
- atoi(replacestr(strnpcinfo(NPC_NAME),"FGate102tower","")) + 1,
- strnpcinfo(NPC_MAP);
+ callfunc("F_Tower_Warp", atoi(replacestr(strnpcinfo(NPC_NAME), "FGate102tower", "")) + 1, strnpcinfo(NPC_MAP));
end;
OnMyMobDead:
.@map$ = strnpcinfo(NPC_MAP);
- .@level = atoi(replacestr(strnpcinfo(NPC_NAME),"FGate102tower","")) + 1;
- .@mob_dead_num = mobcount(.@map$,instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead");
+ .@level = atoi(replacestr(strnpcinfo(NPC_NAME), "FGate102tower", "")) + 1;
+ .@mob_dead_num = mobcount(.@map$, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- initnpctimer;
+ initnpctimer();
//SetItemPartyInMap in_102floor .@level
} else
- mapannounce .@map$, "Remaining Monsters on the "+callsub(L_Display,.@level)+" Level - "+.@mob_dead_num,bc_map,"0x00ff99";
+ mapannounce(.@map$, sprintf(_$("Remaining Monsters on the %s Level - %d"), callsub(L_Display, .@level), .@mob_dead_num), bc_map, C_SPRINGGREEN);
end;
OnTimer5000:
- .@level = atoi(replacestr(strnpcinfo(NPC_NAME),"FGate102tower","")) + 1;
- mapannounce strnpcinfo(NPC_MAP), "All Monsters on the "+callsub(L_Display,.@level)+" Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname(.@level+"FGate102tower")+"::OnEnable";
- stopnpctimer;
+ .@level = atoi(replacestr(strnpcinfo(NPC_NAME), "FGate102tower", "")) + 1;
+ mapannounce(strnpcinfo(NPC_MAP), sprintf(_$("All Monsters on the %s Level have been defeated."), callsub(L_Display, .@level)), bc_map, C_YELLOW);
+ donpcevent(instance_npcname(.@level+"FGate102tower")+"::OnEnable");
+ stopnpctimer();
end;
L_Display:
// Display level properly.
.@mod = getarg(0) % 10;
- if (.@mod == 1 && getarg(0) != 11) return getarg(0)+"st";
- else if (.@mod == 2 && getarg(0) != 12) return getarg(0)+"nd";
- else if (.@mod == 3 && getarg(0) != 13) return getarg(0)+"rd";
- else return getarg(0)+"th";
+ if (.@mod == 1 && getarg(0) != 11)
+ return sprintf(_$("%dst"), getarg(0));
+ else if (.@mod == 2 && getarg(0) != 12)
+ return sprintf(_$("%dnd"), getarg(0));
+ else if (.@mod == 3 && getarg(0) != 13)
+ return sprintf(_$("%drd"), getarg(0));
+ else
+ return sprintf(_$("%dth"), getarg(0));
+ end;
}
+
1@tower,96,393,0 duplicate(1FGate102tower) 2FGate102tower WARPNPC,2,2
1@tower,184,393,0 duplicate(1FGate102tower) 3FGate102tower WARPNPC,2,2
1@tower,270,393,0 duplicate(1FGate102tower) 4FGate102tower WARPNPC,2,2
@@ -1318,23 +1240,23 @@ L_Display:
end;
OnInstanceInit:
- disablenpc instance_npcname("25FGate102tower");
+ disablenpc(instance_npcname("25FGate102tower"));
end;
OnEnable:
- enablenpc instance_npcname("25FGate102tower");
- initnpctimer;
+ enablenpc(instance_npcname("25FGate102tower"));
+ initnpctimer();
end;
OnTouch_:
- getitem Dark_Ashes,1;
- warp instance_mapname("2@tower"),52,354;
+ getitem(Dark_Ashes, 1);
+ warp(instance_mapname("2@tower"), 52, 354);
end;
OnTimer120000:
- disablenpc instance_npcname("25FGate102tower");
- donpcevent instance_npcname("25FGate102tower-2")+"::OnEnable";
- stopnpctimer;
+ disablenpc(instance_npcname("25FGate102tower"));
+ donpcevent(instance_npcname("25FGate102tower-2")+"::OnEnable");
+ stopnpctimer();
end;
}
@@ -1342,15 +1264,15 @@ OnTimer120000:
end;
OnInstanceInit:
- disablenpc instance_npcname("25FGate102tower-2");
+ disablenpc(instance_npcname("25FGate102tower-2"));
end;
OnEnable:
- enablenpc instance_npcname("25FGate102tower-2");
+ enablenpc(instance_npcname("25FGate102tower-2"));
end;
OnTouch_:
- warp instance_mapname("2@tower"),52,354;
+ warp(instance_mapname("2@tower"), 52, 354);
end;
}
@@ -1358,38 +1280,38 @@ OnTouch_:
end;
OnInstanceInit:
- initnpctimer;
+ initnpctimer();
end;
OnTimer15000:
OnTimer60000:
- mapannounce instance_mapname("1@tower"), "Notice : In any abnormal situation where you defeat a monster, you can't advance to the next level!",bc_map,"0xff0000";
+ mapannounce(instance_mapname("1@tower"), _("Notice : In any abnormal situation where you defeat a monster, you can't advance to the next level!"), bc_map, C_RED);
end;
OnTimer120000:
- mapannounce instance_mapname("1@tower"), "Notice : In any abnormal situation where you defeat a monster, you can't advance to the next level!",bc_map,"0xff0000";
- stopnpctimer;
+ mapannounce(instance_mapname("1@tower"), _("Notice : In any abnormal situation where you defeat a monster, you can't advance to the next level!"), bc_map, C_RED);
+ stopnpctimer();
end;
}
1@tower,71,1,0 script #Manager Mode1 CLEAR_NPC,{
- callfunc "F_GM_NPC";
- mes "Please enter the password.";
- .@i = callfunc("F_GM_NPC","dmc2008",1);
- next;
+ callfunc("F_GM_NPC");
+ mes("Please enter the password.");
+ .@i = callfunc("F_GM_NPC", "dmc2008", 1);
+ next();
if (.@i == 1) {
- mes "This NPC manages the tower from the 1st to the 25th Level.";
- mes "Please enter the Level number to open.";
- mes "(i.g.: 1F->1, 25F->25)";
- input .@input,1,25;
- next;
- if (.@input < 1 || .@input > 25)
- mes "You can only enter a number from 1 to 25.";
- else {
- donpcevent instance_npcname(.@input+"FGate102tower")+"::OnEnable";
- mes "*** Level "+ .@input + " is now being opened. ***";
+ mes("This NPC manages the tower from the 1st to the 25th Level.");
+ mes("Please enter the Level number to open.");
+ mes("(i.g.: 1F->1, 25F->25)");
+ input(.@input, 1, 25);
+ next();
+ if (.@input < 1 || .@input > 25) {
+ mes("You can only enter a number from 1 to 25.");
+ } else {
+ donpcevent(instance_npcname(.@input+"FGate102tower")+"::OnEnable");
+ mesf("*** Level %d is now being opened. ***", .@input);
}
}
- close;
+ close();
}
//== Levels 26-50 ==========================================
@@ -1397,27 +1319,24 @@ OnTimer120000:
end;
OnInstanceInit:
- callfunc "F_Tower_Monster",
- 26,
- instance_mapname("2@tower"),
- instance_npcname("Immortal Furnace#1")+"::OnMyMobDead";
+ callfunc("F_Tower_Monster", 26, instance_mapname("2@tower"), instance_npcname("Immortal Furnace#1")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("2@tower");
- .@mob_dead_num = mobcount(.@map$,instance_npcname("Immortal Furnace#1")+"::OnMyMobDead");
+ .@mob_dead_num = mobcount(.@map$, instance_npcname("Immortal Furnace#1")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- initnpctimer;
+ initnpctimer();
//SetItemPartyInMap in_102floor 26
+ } else {
+ mapannounce(.@map$, sprintf(_$("Remaining Monsters on the 26th Level - %d"), .@mob_dead_num), bc_map, C_SPRINGGREEN);
}
- else
- mapannounce .@map$, "Remaining Monsters on the 26th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- mapannounce instance_mapname("2@tower"), "All Monsters on the 26th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("26FGate102tower")+"::OnEnable";
- stopnpctimer;
+ mapannounce(instance_mapname("2@tower"), _("All Monsters on the 26th Level have been defeated."), bc_map, C_YELLOW);
+ donpcevent(instance_npcname("26FGate102tower")+"::OnEnable");
+ stopnpctimer();
end;
}
@@ -1450,23 +1369,23 @@ OnTimer5000:
end;
OnInstanceInit:
- disablenpc instance_npcname("50FGate102tower");
+ disablenpc(instance_npcname("50FGate102tower"));
end;
OnEnable:
- enablenpc instance_npcname("50FGate102tower");
- initnpctimer;
+ enablenpc(instance_npcname("50FGate102tower"));
+ initnpctimer();
end;
OnTouch_:
- getitem Dark_Ashes,1;
- warp instance_mapname("3@tower"),52,354;
+ getitem(Dark_Ashes, 1);
+ warp(instance_mapname("3@tower"), 52, 354);
end;
OnTimer120000:
- disablenpc instance_npcname("50FGate102tower");
- donpcevent instance_npcname("50FGate102tower-2")+"::OnEnable";
- stopnpctimer;
+ disablenpc(instance_npcname("50FGate102tower"));
+ donpcevent(instance_npcname("50FGate102tower-2")+"::OnEnable");
+ stopnpctimer();
end;
}
@@ -1474,37 +1393,37 @@ OnTimer120000:
end;
OnInstanceInit:
- disablenpc instance_npcname("50FGate102tower-2");
+ disablenpc(instance_npcname("50FGate102tower-2"));
end;
OnEnable:
- enablenpc instance_npcname("50FGate102tower-2");
+ enablenpc(instance_npcname("50FGate102tower-2"));
end;
OnTouch_:
- warp instance_mapname("3@tower"),52,354;
+ warp(instance_mapname("3@tower"), 52, 354);
end;
}
2@tower,71,1,0 script #Manager Mode2 CLEAR_NPC,{
- callfunc "F_GM_NPC";
- mes "Please enter the password.";
- .@i = callfunc("F_GM_NPC","dmc2008",1);
- next;
+ callfunc("F_GM_NPC");
+ mes("Please enter the password.");
+ .@i = callfunc("F_GM_NPC", "dmc2008", 1);
+ next();
if (.@i == 1) {
- mes "This NPC manages the tower from the 26st to the 50th Level.";
- mes "Please enter the Level number to open.";
- mes "(i.g.: 26F->26, 50F->50)";
- input .@input,26,50;
- next;
- if (.@onput < 26 || .@input > 50)
- mes "You can only enter a number from 26 to 50.";
- else {
- donpcevent instance_npcname(.@input+"FGate102tower")+"::OnEnable";
- mes "*** Level "+ .@input + " is now being opened. ***";
+ mes("This NPC manages the tower from the 26st to the 50th Level.");
+ mes("Please enter the Level number to open.");
+ mes("(i.g.: 26F->26, 50F->50)");
+ input(.@input, 26, 50);
+ next();
+ if (.@onput < 26 || .@input > 50) {
+ mes("You can only enter a number from 26 to 50.");
+ } else {
+ donpcevent(instance_npcname(.@input+"FGate102tower")+"::OnEnable");
+ mesf("*** Level %d is now being opened. ***", .@input);
}
}
- close;
+ close();
}
//== Levels 51-75 ==========================================
@@ -1512,27 +1431,24 @@ OnTouch_:
end;
OnInstanceInit:
- callfunc "F_Tower_Monster",
- 51,
- instance_mapname("3@tower"),
- instance_npcname("Immortal Furnace#2")+"::OnMyMobDead";
+ callfunc("F_Tower_Monster", 51, instance_mapname("3@tower"), instance_npcname("Immortal Furnace#2")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("3@tower");
- .@mob_dead_num = mobcount(.@map$,instance_npcname("Immortal Furnace#2")+"::OnMyMobDead");
+ .@mob_dead_num = mobcount(.@map$, instance_npcname("Immortal Furnace#2")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- initnpctimer;
+ initnpctimer();
//SetItemPartyInMap in_102floor 51
+ } else {
+ mapannounce(.@map$, sprintf(_$("Remaining Monsters on the 51st Level - %d"), .@mob_dead_num), bc_map, C_SPRINGGREEN);
}
- else
- mapannounce .@map$, "Remaining Monsters on the 51st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- mapannounce instance_mapname("3@tower"), "All Monsters on the 51st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("51FGate102tower")+"::OnEnable";
- stopnpctimer;
+ mapannounce(instance_mapname("3@tower"), _("All Monsters on the 51st Level have been defeated."), bc_map, C_YELLOW);
+ donpcevent(instance_npcname("51FGate102tower")+"::OnEnable");
+ stopnpctimer();
end;
}
@@ -1565,23 +1481,23 @@ OnTimer5000:
end;
OnInstanceInit:
- disablenpc instance_npcname("75FGate102tower");
+ disablenpc(instance_npcname("75FGate102tower"));
end;
OnEnable:
- enablenpc instance_npcname("75FGate102tower");
- initnpctimer;
+ enablenpc(instance_npcname("75FGate102tower"));
+ initnpctimer();
end;
OnTouch_:
- getitem Dark_Ashes,1;
- warp instance_mapname("4@tower"),52,354;
+ getitem(Dark_Ashes, 1);
+ warp(instance_mapname("4@tower"), 52, 354);
end;
OnTimer120000:
- disablenpc instance_npcname("75FGate102tower");
- donpcevent instance_npcname("75FGate102tower-2")+"::OnEnable";
- stopnpctimer;
+ disablenpc(instance_npcname("75FGate102tower"));
+ donpcevent(instance_npcname("75FGate102tower-2")+"::OnEnable");
+ stopnpctimer();
end;
}
@@ -1589,37 +1505,37 @@ OnTimer120000:
end;
OnInstanceInit:
- disablenpc instance_npcname("75FGate102tower-2");
+ disablenpc(instance_npcname("75FGate102tower-2"));
end;
OnEnable:
- enablenpc instance_npcname("75FGate102tower-2");
+ enablenpc(instance_npcname("75FGate102tower-2"));
end;
OnTouch_:
- warp instance_mapname("4@tower"),52,354;
+ warp(instance_mapname("4@tower"), 52, 354);
end;
}
3@tower,71,1,0 script #Manager Mode3 CLEAR_NPC,{
- callfunc "F_GM_NPC";
- mes "Please enter the password.";
- .@i = callfunc("F_GM_NPC","dmc2008",1);
- next;
+ callfunc("F_GM_NPC");
+ mes("Please enter the password.");
+ .@i = callfunc("F_GM_NPC", "dmc2008", 1);
+ next();
if (.@i == 1) {
- mes "This NPC manages the tower from the 51st to the 75th Level.";
- mes "Please enter the Level number to open.";
- mes "(i.g.: 51F->51, 75F->75)";
- input .@input,51,75;
- next;
- if (.@input < 51 || .@input > 75)
- mes "You can only enter a number from 51 to 75.";
- else {
- donpcevent instance_npcname(.@input+"FGate102tower")+"::OnEnable";
- mes "*** Level "+ .@input + " is now being opened. ***";
+ mes("This NPC manages the tower from the 51st to the 75th Level.");
+ mes("Please enter the Level number to open.");
+ mes("(i.g.: 51F->51, 75F->75)");
+ input(.@input, 51, 75);
+ next();
+ if (.@input < 51 || .@input > 75) {
+ mes("You can only enter a number from 51 to 75.");
+ } else {
+ donpcevent(instance_npcname(.@input+"FGate102tower")+"::OnEnable");
+ mesf("*** Level %d is now being opened. ***", .@input);
}
}
- close;
+ close();
}
//== Levels 76-99 ==========================================
@@ -1627,27 +1543,24 @@ OnTouch_:
end;
OnInstanceInit:
- callfunc "F_Tower_Monster",
- 76,
- instance_mapname("4@tower"),
- instance_npcname("Immortal Furnace#3")+"::OnMyMobDead";
+ callfunc("F_Tower_Monster", 76, instance_mapname("4@tower"), instance_npcname("Immortal Furnace#3")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("4@tower");
- .@mob_dead_num = mobcount(.@map$,instance_npcname("Immortal Furnace#3")+"::OnMyMobDead");
+ .@mob_dead_num = mobcount(.@map$, instance_npcname("Immortal Furnace#3")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- initnpctimer;
+ initnpctimer();
//SetItemPartyInMap in_102floor 76
+ } else {
+ mapannounce(.@map$, sprintf(_$("Remaining Monsters on the 76th Level - %d"), .@mob_dead_num), bc_map, C_SPRINGGREEN);
}
- else
- mapannounce .@map$,"Remaining Monsters on the 76th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- mapannounce instance_mapname("4@tower"),"All Monsters on the 76th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("76FGate102tower")+"::OnEnable";
- stopnpctimer;
+ mapannounce(instance_mapname("4@tower"), _("All Monsters on the 76th Level have been defeated."), bc_map, C_YELLOW);
+ donpcevent(instance_npcname("76FGate102tower")+"::OnEnable");
+ stopnpctimer();
end;
}
@@ -1679,23 +1592,23 @@ OnTimer5000:
end;
OnInstanceInit:
- disablenpc instance_npcname("99FGate102tower");
+ disablenpc(instance_npcname("99FGate102tower"));
end;
OnEnable:
- enablenpc instance_npcname("99FGate102tower");
- initnpctimer;
+ enablenpc(instance_npcname("99FGate102tower"));
+ initnpctimer();
end;
OnTouch_:
- getitem Dark_Ashes,1;
- warp instance_mapname("5@tower"),101,72;
+ getitem(Dark_Ashes, 1);
+ warp(instance_mapname("5@tower"), 101, 72);
end;
OnTimer120000:
- disablenpc instance_npcname("99FGate102tower");
- donpcevent instance_npcname("99FGate102tower-2")+"::OnEnable";
- stopnpctimer;
+ disablenpc(instance_npcname("99FGate102tower"));
+ donpcevent(instance_npcname("99FGate102tower-2")+"::OnEnable");
+ stopnpctimer();
end;
}
@@ -1703,89 +1616,88 @@ OnTimer120000:
end;
OnInstanceInit:
- disablenpc instance_npcname("99FGate102tower-2");
+ disablenpc(instance_npcname("99FGate102tower-2"));
end;
OnEnable:
- enablenpc instance_npcname("99FGate102tower-2");
+ enablenpc(instance_npcname("99FGate102tower-2"));
end;
OnTouch_:
- warp instance_mapname("5@tower"),101,72;
+ warp(instance_mapname("5@tower"), 101, 72);
end;
}
4@tower,71,1,0 script #Manager Mode4 CLEAR_NPC,{
- callfunc "F_GM_NPC";
- mes "Please enter the password.";
- .@i = callfunc("F_GM_NPC","dmc2008",1);
- next;
+ callfunc("F_GM_NPC");
+ mes("Please enter the password.");
+ .@i = callfunc("F_GM_NPC", "dmc2008", 1);
+ next();
if (.@i == 1) {
- mes "This NPC manages the tower from the 76th to the 99th Level.";
- mes "Please enter the Level number to open.";
- mes "(i.g.: 76F->76, 99F->99)";
- input .@input,76,99;
- next;
- if (.@input < 76 || .@input > 99)
- mes "You can only enter a number from 76 to 99.";
- else {
- donpcevent instance_npcname(.@input+"FGate102tower")+"::OnEnable";
- mes "*** Level "+ .@input + " is now being opened. ***";
+ mes("This NPC manages the tower from the 76th to the 99th Level.");
+ mes("Please enter the Level number to open.");
+ mes("(i.g.: 76F->76, 99F->99)");
+ input(.@input, 76, 99);
+ next();
+ if (.@input < 76 || .@input > 99) {
+ mes("You can only enter a number from 76 to 99.");
+ } else {
+ donpcevent(instance_npcname(.@input+"FGate102tower")+"::OnEnable");
+ mesf("*** Level %d is now being opened. ***", .@input);
}
}
- close;
+ close();
}
//== Level 100 =============================================
5@tower,106,109,2 script Lucid Crystal#102 CLEAR_NPC,{
if (in_102tower < 10) {
- mes "^0000ffA mysterious voice echoes through the room as you touch the lucid crystal radiating a strong light.^000000";
- next;
- mes "[Mysterious Voice]";
- mes "Welcome to my place, intruders. I've had fun watching you endure all the difficulties I've set before you.";
- next;
- mes "[Mysterious Voice]";
- mes "Unfortunately, the time has come to end the show.";
- next;
- mes "[Mysterious Voice]";
- mes "It's still too early to celebrate your victory against my right-hand man Knothen because he isn't completely destroyed!";
- next;
- mes "[Mysterious Voice]";
- mes "I shall resurrect him for your next show. Defeat him again, and then I'll gladly accept your challenge.";
- next;
- mes "[Mysterious Voice]";
- mes "Good-bye for now.";
- mes "Once again, I had such a great time, humans. I look forward to seeing you again.";
- next;
- mes "^0000ffAs soon as the voice stopped talking, an irresistible force lifted and moved you somewhere else.";
- close2;
+ mes("^0000ffA mysterious voice echoes through the room as you touch the lucid crystal radiating a strong light.^000000");
+ next();
+ mes("[Mysterious Voice]");
+ mes("Welcome to my place, intruders. I've had fun watching you endure all the difficulties I've set before you.");
+ next();
+ mes("[Mysterious Voice]");
+ mes("Unfortunately, the time has come to end the show.");
+ next();
+ mes("[Mysterious Voice]");
+ mes("It's still too early to celebrate your victory against my right-hand man Knothen because he isn't completely destroyed!");
+ next();
+ mes("[Mysterious Voice]");
+ mes("I shall resurrect him for your next show. Defeat him again, and then I'll gladly accept your challenge.");
+ next();
+ mes("[Mysterious Voice]");
+ mes("Good-bye for now.");
+ mes("Once again, I had such a great time, humans. I look forward to seeing you again.");
+ next();
+ mes("^0000ffAs soon as the voice stopped talking, an irresistible force lifted and moved you somewhere else.");
+ close2();
in_102tower = 10;
- warp "alberta",223,36;
- }
- else {
- mes "^0000ffThe radiating crystal piece seems to beckon you, just like last time.^000000";
- next;
- mes "[Mysterious Voice]";
- mes "I must have underestimated you... I didn't expect to see you again.";
- next;
- mes "[Mysterious Voice]";
- mes "I can smell your sweat, hear the gasps of your exhaustion in combat. Ah~ The human desire for victory always excites me.";
- next;
- mes "[Mysterious Voice]";
- mes "I now allow you to come receive an audience from me. Come to me, to Nacht Sieger the Hegemon-King of the Darkness!";
- close2;
- warp instance_mapname("6@tower"),32,12;
+ warp("alberta", 223, 36);
+ } else {
+ mes("^0000ffThe radiating crystal piece seems to beckon you, just like last time.^000000");
+ next();
+ mes("[Mysterious Voice]");
+ mes("I must have underestimated you... I didn't expect to see you again.");
+ next();
+ mes("[Mysterious Voice]");
+ mes("I can smell your sweat, hear the gasps of your exhaustion in combat. Ah~ The human desire for victory always excites me.");
+ next();
+ mes("[Mysterious Voice]");
+ mes("I now allow you to come receive an audience from me. Come to me, to Nacht Sieger the Hegemon-King of the Darkness!");
+ close2();
+ warp(instance_mapname("6@tower"), 32, 12);
}
end;
OnInstanceInit:
OnDisable:
- disablenpc instance_npcname("Lucid Crystal#102");
+ disablenpc(instance_npcname("Lucid Crystal#102"));
end;
OnEnable:
- enablenpc instance_npcname("Lucid Crystal#102");
- donpcevent instance_npcname("#102Effect1")+"::OnEnable";
+ enablenpc(instance_npcname("Lucid Crystal#102"));
+ donpcevent(instance_npcname("#102Effect1")+"::OnEnable");
end;
}
@@ -1793,22 +1705,22 @@ OnEnable:
end;
OnInstanceInit:
- disablenpc instance_npcname("#102Effect1");
+ disablenpc(instance_npcname("#102Effect1"));
end;
OnDisable:
- disablenpc instance_npcname("#102Effect1");
+ disablenpc(instance_npcname("#102Effect1"));
end;
OnEnable:
- enablenpc instance_npcname("#102Effect1");
- initnpctimer;
+ enablenpc(instance_npcname("#102Effect1"));
+ initnpctimer();
end;
OnTimer500:
- specialeffect EF_ENHANCE;
- stopnpctimer;
- donpcevent instance_npcname("#102Effect2")+"::OnEnable";
+ specialeffect(EF_ENHANCE);
+ stopnpctimer();
+ donpcevent(instance_npcname("#102Effect2")+"::OnEnable");
end;
}
@@ -1816,22 +1728,22 @@ OnTimer500:
end;
OnInstanceInit:
- disablenpc instance_npcname("#102Effect2");
+ disablenpc(instance_npcname("#102Effect2"));
end;
OnDisable:
- disablenpc instance_npcname("#102Effect2");
+ disablenpc(instance_npcname("#102Effect2"));
end;
OnEnable:
- enablenpc instance_npcname("#102Effect2");
- initnpctimer;
+ enablenpc(instance_npcname("#102Effect2"));
+ initnpctimer();
end;
OnTimer500:
- specialeffect EF_ENHANCE;
- stopnpctimer;
- donpcevent instance_npcname("#102Effect1")+"::OnEnable";
+ specialeffect(EF_ENHANCE);
+ stopnpctimer();
+ donpcevent(instance_npcname("#102Effect1")+"::OnEnable");
end;
}
@@ -1839,17 +1751,17 @@ OnTimer500:
end;
OnInstanceInit:
- donpcevent instance_npcname("#102FShadowDust")+"::OnEnable";
- monster instance_mapname("5@tower"),83,85,"Entweihen Crothen",1957,1,instance_npcname("#102FShadowDust1")+"::OnMyMobDead";
+ donpcevent(instance_npcname("#102FShadowDust")+"::OnEnable");
+ monster(instance_mapname("5@tower"), 83, 85, _("Entweihen Crothen"), ENTWEIHEN, 1, instance_npcname("#102FShadowDust1")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("5@tower");
- .@mob_dead_num = mobcount(.@map$,instance_npcname("#102FShadowDust1")+"::OnMyMobDead");
+ .@mob_dead_num = mobcount(.@map$, instance_npcname("#102FShadowDust1")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- mapannounce .@map$, "Mysterious Voice: Who are you to dare intrude upon my sanctuary?!",bc_map,"0xffff00";
- donpcevent instance_npcname("#102FShadowDust")+"::OnDisable";
- donpcevent instance_npcname("Lucid Crystal#102")+"::OnEnable";
+ mapannounce(.@map$, _("Mysterious Voice: Who are you to dare intrude upon my sanctuary?!"), bc_map, C_YELLOW);
+ donpcevent(instance_npcname("#102FShadowDust")+"::OnDisable");
+ donpcevent(instance_npcname("Lucid Crystal#102")+"::OnEnable");
//SetItemPartyInMap in_102floor 100
}
end;
@@ -1859,74 +1771,86 @@ OnMyMobDead:
end;
OnInstanceInit:
- disablenpc instance_npcname("#102FShadowDust");
+ disablenpc(instance_npcname("#102FShadowDust"));
end;
OnDisable:
- killmonsterall instance_mapname("5@tower");
+ killmonsterall(instance_mapname("5@tower"));
end;
OnEnable:
.@map$ = instance_mapname("5@tower");
- monster .@map$,72,93,"Thorny Skeleton",1958,1;
- monster .@map$,70,87,"Thorn of Magic",1960,1;
- monster .@map$,68,83,"Thorn of Pureness",1961,1;
- monster .@map$,70,80,"Thorny Skeleton",1958,1;
- monster .@map$,74,81,"Thorn of Magic",1960,1;
- monster .@map$,78,72,"Thorn of Magic",1960,1;
- monster .@map$,81,70,"Thorny Skeleton",1958,1;
- monster .@map$,78,84,"Thorn of Recovery",1959,1;
- monster .@map$,85,72,"Thorn of Magic",1960,1;
- monster .@map$,91,74,"Thorny Skeleton",1958,1;
- monster .@map$,79,77,"Thorn of Pureness",1961,1;
- monster .@map$,82,80,"Thorn of Recovery",1959,1;
- monster .@map$,87,83,"Thorn of Recovery",1959,1;
- monster .@map$,80,92,"Thorn of Pureness",1961,1;
- monster .@map$,81,89,"Thorny Skeleton",1958,1;
- monster .@map$,85,93,"Thorn of Magic",1960,1;
- monster .@map$,86,90,"Thorn of Recovery",1959,1;
- monster .@map$,88,88,"Thorny Skeleton",1958,1;
- monster .@map$,91,87,"Thorn of Magic",1960,1;
- monster .@map$,95,94,"Thorn of Magic",1960,1;
- monster .@map$,91,96,"Thorny Skeleton",1958,1;
- monster .@map$,90,82,"Thorn of Pureness",1961,1;
- monster .@map$,96,98,"Thorn of Magic",1960,1;
- monster .@map$,83,76,"Thorny Skeleton",1958,1;
- monster .@map$,74,85,"Thorny Skeleton",1958,1;
- switch(rand(1,3)) {
- case 1: monster .@map$,82,85,"Thorny Skeleton",1958,1; break;
- case 2: monster .@map$,82,85,"Thorn of Magic",1960,1; break;
- case 3: monster .@map$,82,85,"Thorn of Pureness",1961,1; break;
+ monster(.@map$, 72, 93, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ monster(.@map$, 70, 87, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ monster(.@map$, 68, 83, _("Thorn of Pureness"), G_ENTWEIHEN_S, 1);
+ monster(.@map$, 70, 80, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ monster(.@map$, 74, 81, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ monster(.@map$, 78, 72, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ monster(.@map$, 81, 70, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ monster(.@map$, 78, 84, _("Thorn of Recovery"), G_ENTWEIHEN_H, 1);
+ monster(.@map$, 85, 72, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ monster(.@map$, 91, 74, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ monster(.@map$, 79, 77, _("Thorn of Pureness"), G_ENTWEIHEN_S, 1);
+ monster(.@map$, 82, 80, _("Thorn of Recovery"), G_ENTWEIHEN_H, 1);
+ monster(.@map$, 87, 83, _("Thorn of Recovery"), G_ENTWEIHEN_H, 1);
+ monster(.@map$, 80, 92, _("Thorn of Pureness"), G_ENTWEIHEN_S, 1);
+ monster(.@map$, 81, 89, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ monster(.@map$, 85, 93, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ monster(.@map$, 86, 90, _("Thorn of Recovery"), G_ENTWEIHEN_H, 1);
+ monster(.@map$, 88, 88, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ monster(.@map$, 91, 87, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ monster(.@map$, 95, 94, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ monster(.@map$, 91, 96, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ monster(.@map$, 90, 82, _("Thorn of Pureness"), G_ENTWEIHEN_S, 1);
+ monster(.@map$, 96, 98, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ monster(.@map$, 83, 76, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ monster(.@map$, 74, 85, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ switch (rand(1, 3)) {
+ case 1:
+ monster(.@map$, 82, 85, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ break;
+ case 2:
+ monster(.@map$, 82, 85, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ break;
+ case 3:
+ monster(.@map$, 82, 85, _("Thorn of Pureness"), G_ENTWEIHEN_S, 1);
+ break;
}
- switch(rand(1,3)) {
- case 1: monster .@map$,84,85,"Thorny Skeleton",1958,1; break;
- case 2: monster .@map$,84,85,"Thorn of Magic",1960,1; break;
- case 3: monster .@map$,84,85,"Thorn of Pureness",1961,1; break;
+ switch (rand(1, 3)) {
+ case 1:
+ monster(.@map$, 84, 85, _("Thorny Skeleton"), G_ENTWEIHEN_R, 1);
+ break;
+ case 2:
+ monster(.@map$, 84, 85, _("Thorn of Magic"), G_ENTWEIHEN_M, 1);
+ break;
+ case 3:
+ monster(.@map$, 84, 85, _("Thorn of Pureness"), G_ENTWEIHEN_S, 1);
+ break;
}
end;
}
5@tower,71,1,0 script #Manager Mode5 CLEAR_NPC,{
- callfunc "F_GM_NPC";
- mes "This NPC manages the crystal on the 100th Level. Please enter the password.";
- .@i = callfunc("F_GM_NPC","dmc2008",1);
- next;
+ callfunc("F_GM_NPC");
+ mes("This NPC manages the crystal on the 100th Level. Please enter the password.");
+ .@i = callfunc("F_GM_NPC", "dmc2008", 1);
+ next();
if (.@i == 1) {
- donpcevent instance_npcname("Lucid Crystal#102")+"::OnEnable";
- mes "The 100th Level's crystal has been activated.";
+ donpcevent(instance_npcname("Lucid Crystal#102")+"::OnEnable");
+ mes("The 100th Level's crystal has been activated.");
} else
- mes "Please enter the correct password.";
- close;
+ mes("Please enter the correct password.");
+ close();
}
//== Level 101 =============================================
6@tower,45,89,2 script Life Spring#1 CLEAR_NPC,{
- mes "^0066ffYou took a sip of the spring's clear water, and you feel invigorated.^000000";
- heal (MaxHp-Hp),(MaxSp-Sp);
- close;
+ mes("^0066ffYou took a sip of the spring's clear water, and you feel invigorated.^000000");
+ heal((MaxHp - Hp), (MaxSp - Sp));
+ close();
OnInstanceInit:
- donpcevent instance_npcname("Life Spring#2")+"::OnEnable";
+ donpcevent(instance_npcname("Life Spring#2")+"::OnEnable");
end;
}
@@ -1934,13 +1858,13 @@ OnInstanceInit:
end;
OnEnable:
- specialeffect EF_BUBBLE;
- initnpctimer;
+ specialeffect(EF_BUBBLE);
+ initnpctimer();
end;
OnTimer2000:
- stopnpctimer;
- donpcevent instance_npcname("Life Spring#3")+"::OnEnable";
+ stopnpctimer();
+ donpcevent(instance_npcname("Life Spring#3")+"::OnEnable");
end;
}
@@ -1948,13 +1872,13 @@ OnTimer2000:
end;
OnEnable:
- specialeffect EF_BUBBLE;
- initnpctimer;
+ specialeffect(EF_BUBBLE);
+ initnpctimer();
end;
OnTimer2000:
- stopnpctimer;
- donpcevent instance_npcname("Life Spring#2")+"::OnEnable";
+ stopnpctimer();
+ donpcevent(instance_npcname("Life Spring#2")+"::OnEnable");
end;
}
@@ -1964,14 +1888,14 @@ OnTimer2000:
end;
OnInstanceInit:
- areamonster instance_mapname("6@tower"),154,73,156,75,"Watcher's Son",1627,10,instance_npcname("Tyrant's Throne#")+"::OnMyMobDead";
+ areamonster(instance_mapname("6@tower"), 154, 73, 156, 75, _("Watcher's Son"), ANOPHELES, 10, instance_npcname("Tyrant's Throne#")+"::OnMyMobDead");
end;
OnMyMobDead:
- .@mob_dead_num = mobcount(instance_mapname("6@tower"),instance_npcname("Tyrant's Throne#")+"::OnMyMobDead");
+ .@mob_dead_num = mobcount(instance_mapname("6@tower"), instance_npcname("Tyrant's Throne#")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- donpcevent instance_npcname("#1st Beeper")+"::OnEnable";
- disablenpc instance_npcname("Tyrant's Throne#");
+ donpcevent(instance_npcname("#1st Beeper")+"::OnEnable");
+ disablenpc(instance_npcname("Tyrant's Throne#"));
}
end;
}
@@ -1980,42 +1904,42 @@ OnMyMobDead:
end;
OnEnable:
- initnpctimer;
+ initnpctimer();
end;
OnTimer500:
- mapannounce instance_mapname("6@tower"),"Guests, huh? I hope you've come here knowing that you'll be buried in this place. If you didn't know, well... it's too late!",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("Guests, huh? I hope you've come here knowing that you'll be buried in this place. If you didn't know, well... it's too late!"), bc_map, "0x00ffcc");
end;
OnTimer5500:
- mapannounce instance_mapname("6@tower"),"This is why you adventurers always end up dead.",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("This is why you adventurers always end up dead."), bc_map, "0x00ffcc");
end;
OnTimer10500:
- mapannounce instance_mapname("6@tower"),"I may applaud you for your courage... Of course, I intend to play with you a little bit first.",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("I may applaud you for your courage... Of course, I intend to play with you a little bit first."), bc_map, "0x00ffcc");
end;
OnTimer15500:
- mapannounce instance_mapname("6@tower"),"You know, I like watching humans running around in fear.",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("You know, I like watching humans running around in fear."), bc_map, "0x00ffcc");
end;
OnTimer20500:
.@map$ = instance_mapname("6@tower");
- mapannounce .@map$,"Let's see who runs fastest. Are you ready?",bc_map,"0x00ffcc";
- stopnpctimer;
- areamonster .@map$,151,66,153,106,"Bone Guardian",1152,50,instance_npcname("#1st Beeper")+"::OnMyMobDead";
- areamonster .@map$,158,66,160,106,"Bone Guardian",1152,50,instance_npcname("#1st Beeper")+"::OnMyMobDead";
+ mapannounce(.@map$, _("Let's see who runs fastest. Are you ready?"), bc_map, "0x00ffcc");
+ stopnpctimer();
+ areamonster(.@map$, 151, 66, 153, 106, _("Bone Guardian"), ORC_SKELETON, 50, instance_npcname("#1st Beeper")+"::OnMyMobDead");
+ areamonster(.@map$, 158, 66, 160, 106, _("Bone Guardian"), ORC_SKELETON, 50, instance_npcname("#1st Beeper")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("6@tower");
- .@mob_dead_num = mobcount(.@map$,instance_npcname("#1st Beeper")+"::OnMyMobDead");
+ .@mob_dead_num = mobcount(.@map$, instance_npcname("#1st Beeper")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- donpcevent instance_npcname("#2nd Beeper")+"::OnEnable";
+ donpcevent(instance_npcname("#2nd Beeper")+"::OnEnable");
//SetItemPartyInMap in_102floor 101
+ } else {
+ mapannounce(.@map$, sprintf(_$("Remaining Targets %dea"), .@mob_dead_num), bc_map, C_SPRINGGREEN);
}
- else
- mapannounce .@map$,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
end;
}
@@ -2023,34 +1947,34 @@ OnMyMobDead:
end;
OnEnable:
- initnpctimer;
+ initnpctimer();
end;
OnTimer500:
- mapannounce instance_mapname("6@tower"),"Well, I guess they aren't too challenging for you.",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("Well, I guess they aren't too challenging for you."), bc_map, "0x00ffcc");
end;
OnTimer5500:
- mapannounce instance_mapname("6@tower"),"Let's speed up a little bit, shall we?",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("Let's speed up a little bit, shall we?"), bc_map, "0x00ffcc");
end;
OnTimer10500:
.@map$ = instance_mapname("6@tower");
- mapannounce .@map$,"I demand an encore!",bc_map,"0x00ffcc";
- stopnpctimer;
- areamonster .@map$,151,66,153,106,"Wind Guardian",1263,30,instance_npcname("#2nd Beeper")+"::OnMyMobDead";
- areamonster .@map$,158,66,160,106,"Wind Guardian",1263,30,instance_npcname("#2nd Beeper")+"::OnMyMobDead";
+ mapannounce(.@map$, _("I demand an encore!"), bc_map, "0x00ffcc");
+ stopnpctimer();
+ areamonster(.@map$, 151, 66, 153, 106, _("Wind Guardian"), WIND_GHOST, 30, instance_npcname("#2nd Beeper")+"::OnMyMobDead");
+ areamonster(.@map$, 158, 66, 160, 106, _("Wind Guardian"), WIND_GHOST, 30, instance_npcname("#2nd Beeper")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("6@tower");
- .@mob_dead_num = mobcount(.@map$,instance_npcname("#2nd Beeper")+"::OnMyMobDead");
+ .@mob_dead_num = mobcount(.@map$, instance_npcname("#2nd Beeper")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- donpcevent instance_npcname("#3rd Beeper")+"::OnEnable";
+ donpcevent(instance_npcname("#3rd Beeper")+"::OnEnable");
//SetItemPartyInMap in_102floor 102
+ } else {
+ mapannounce(.@map$, sprintf(_$("Remaining Targets %dea"), .@mob_dead_num), bc_map, C_SPRINGGREEN);
}
- else
- mapannounce .@map$,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
end;
}
@@ -2058,34 +1982,34 @@ OnMyMobDead:
end;
OnEnable:
- initnpctimer;
+ initnpctimer();
end;
OnTimer500:
- mapannounce instance_mapname("6@tower"),"Yes, this is getting exciting!",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("Yes, this is getting exciting!"), bc_map, "0x00ffcc");
end;
OnTimer5500:
- mapannounce instance_mapname("6@tower"),"I'll remember you as one of a few that have managed to entertain me.",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("I'll remember you as one of a few that have managed to entertain me."), bc_map, "0x00ffcc");
end;
OnTimer10500:
.@map$ = instance_mapname("6@tower");
- mapannounce .@map$,"How would you like to play one more round?",bc_map,"0x00ffcc";
- stopnpctimer;
- areamonster .@map$,151,66,153,106,"Sword Edge Guardian",1132,20,instance_npcname("#3rd Beeper")+"::OnMyMobDead";
- areamonster .@map$,158,66,160,106,"Sword Edge Guardian",1132,20,instance_npcname("#3rd Beeper")+"::OnMyMobDead";
+ mapannounce(.@map$, _("How would you like to play one more round?"), bc_map, "0x00ffcc");
+ stopnpctimer();
+ areamonster(.@map$, 151, 66, 153, 106, _("Sword Edge Guardian"), KHALITZBURG, 20, instance_npcname("#3rd Beeper")+"::OnMyMobDead");
+ areamonster(.@map$, 158, 66, 160, 106, _("Sword Edge Guardian"), KHALITZBURG, 20, instance_npcname("#3rd Beeper")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("6@tower");
- .@mob_dead_num = mobcount(.@map$,instance_npcname("#3rd Beeper")+"::OnMyMobDead");
+ .@mob_dead_num = mobcount(.@map$, instance_npcname("#3rd Beeper")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- donpcevent instance_npcname("#4th Beeper")+"::OnEnable";
+ donpcevent(instance_npcname("#4th Beeper")+"::OnEnable");
//SetItemPartyInMap in_102floor 103
+ } else {
+ mapannounce(.@map$, sprintf(_$("Remaining Targets %dea"), .@mob_dead_num), bc_map, C_SPRINGGREEN);
}
- else
- mapannounce .@map$,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
end;
}
@@ -2093,106 +2017,106 @@ OnMyMobDead:
end;
OnEnable:
- initnpctimer;
+ initnpctimer();
end;
OnTimer500:
- mapannounce instance_mapname("6@tower"),"Okay, the time has come to make my appearance!",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("Okay, the time has come to make my appearance!"), bc_map, "0x00ffcc");
end;
OnTimer5500:
- mapannounce instance_mapname("6@tower"),"Do you want to know who I am?",bc_map,"0x00ffcc";
+ mapannounce(instance_mapname("6@tower"), _("Do you want to know who I am?"), bc_map, "0x00ffcc");
end;
OnTimer10500:
.@map$ = instance_mapname("6@tower");
- mapannounce .@map$,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";
- stopnpctimer;
- monster .@map$,156,147,"Nacht Sieger",1956,1,instance_npcname("#4th Beeper")+"::OnMyMobDead";
+ mapannounce(.@map$, _("You'll soon know. Mine is the face of death!"), bc_map, "0x00ffcc");
+ stopnpctimer();
+ monster(.@map$, 156, 147, _("Nacht Sieger"), NAGHT_SIEGER, 1, instance_npcname("#4th Beeper")+"::OnMyMobDead");
end;
OnMyMobDead:
- donpcevent instance_npcname("Lost Soul#102")+"::OnEnable";
+ donpcevent(instance_npcname("Lost Soul#102")+"::OnEnable");
end;
}
6@tower,169,127,2 script Lost Soul#102 4_M_NFDEADSWDMAN,{
- if (checkweight(Knife,1) == 0) {
- mes "You're carrying too much stuff. Why don't you put some of it away, and then come back?";
- close;
+ if (checkweight(Knife, 1) == 0) {
+ mes("You're carrying too much stuff. Why don't you put some of it away, and then come back?");
+ close();
}
- mes "[Lost Souls]";
- mes "It's you that have liberated us from the evil Nacht Sieger.";
- next;
- mes "[Lost Souls]";
- mes "Thank you so much. Now we can escape from this cold and dark place... to heaven.";
- next;
- if ((countitem(Twin_Edge_B) > 0) && (countitem(Twin_Edge_R) > 0)) {
- mes "[Lost Souls]";
- mes "Hey, you have the remnants of Nacht Sieger with you.";
- next;
- mes "[Lost Souls]";
- mes "They may appear to be one-handed swords, but I can put them together to make a two-handed one if you want. That's the only way I can repay you for freeing me.";
- next;
- switch(select("Make a Two-Handed Sword.", "No, thanks.")) {
+ mes("[Lost Souls]");
+ mes("It's you that have liberated us from the evil Nacht Sieger.");
+ next();
+ mes("[Lost Souls]");
+ mes("Thank you so much. Now we can escape from this cold and dark place... to heaven.");
+ next();
+ if (countitem(Twin_Edge_B) > 0 && countitem(Twin_Edge_R) > 0) {
+ mes("[Lost Souls]");
+ mes("Hey, you have the remnants of Nacht Sieger with you.");
+ next();
+ mes("[Lost Souls]");
+ mes("They may appear to be one-handed swords, but I can put them together to make a two-handed one if you want. That's the only way I can repay you for freeing me.");
+ next();
+ switch (select("Make a Two-Handed Sword.", "No, thanks.")) {
case 1:
- mes "[Lost Souls]";
- mes "If it is already upgraded or has a card inside, those effects will be disappear. Is this ok with you?";
- next;
- switch(select("It's fine with me. Please make one.", "No way!")) {
+ mes("[Lost Souls]");
+ mes("If it is already upgraded or has a card inside, those effects will be disappear. Is this ok with you?");
+ next();
+ switch (select("It's fine with me. Please make one.", "No way!")) {
case 1:
- mes "[Lost Souls]";
- mes "Good, then I'll combine these to create a two-handed sword.";
- next;
- delitem Twin_Edge_B,1;
- delitem Twin_Edge_R,1;
- getitem Violet_Fear,1;
+ mes("[Lost Souls]");
+ mes("Good, then I'll combine these to create a two-handed sword.");
+ next();
+ delitem(Twin_Edge_B, 1);
+ delitem(Twin_Edge_R, 1);
+ getitem(Violet_Fear, 1);
break;
case 2:
- mes "[Lost Souls]";
- mes "I see. I guess you aren't as greedy or ambitious as those other adventurers.";
- next;
+ mes("[Lost Souls]");
+ mes("I see. I guess you aren't as greedy or ambitious as those other adventurers.");
+ next();
break;
}
break;
case 2:
- mes "[Lost Souls]";
- mes "I see. I guess you aren't as greedy or ambitious as those other adventurers.";
- next;
+ mes("[Lost Souls]");
+ mes("I see. I guess you aren't as greedy or ambitious as those other adventurers.");
+ next();
break;
}
}
- mes "[Lost Souls]";
- mes "I'd like to talk to you more, but I've... I've got to go now.";
- next;
- mes "[Lost Souls]";
- mes "Farewell, young adventurer. I wish you good luck.";
- close2;
- warp "alberta",223,36;
+ mes("[Lost Souls]");
+ mes("I'd like to talk to you more, but I've... I've got to go now.");
+ next();
+ mes("[Lost Souls]");
+ mes("Farewell, young adventurer. I wish you good luck.");
+ close2();
+ warp("alberta", 223, 36);
end;
OnInstanceInit:
- disablenpc instance_npcname("Lost Soul#102");
+ disablenpc(instance_npcname("Lost Soul#102"));
end;
OnEnable:
- initnpctimer;
- enablenpc instance_npcname("Lost Soul#102");
- donpcevent instance_npcname("#Effect30")+"::OnEnable";
+ initnpctimer();
+ enablenpc(instance_npcname("Lost Soul#102"));
+ donpcevent(instance_npcname("#Effect30")+"::OnEnable");
//SetItemPartyInMap in_102floor 104
end;
OnTimer500:
- mapannounce instance_mapname("6@tower"),"This... This can't be happening! I can't be defeated!",bc_map,"0xffff00";
+ mapannounce(instance_mapname("6@tower"), _("This... This can't be happening! I can't be defeated!"), bc_map, C_YELLOW);
end;
OnTimer5500:
- mapannounce instance_mapname("6@tower"),"Nooo! My soul... My shell...! Nooo~!",bc_map,"0xffff00";
+ mapannounce(instance_mapname("6@tower"), _("Nooo! My soul... My shell...! Nooo~!"), bc_map, C_YELLOW);
end;
OnTimer10500:
- mapannounce instance_mapname("6@tower"),"Nacht Sieger's body has turned into dark ashes that scattered in the wind.",bc_map,"0x00ffcc";
- stopnpctimer;
+ mapannounce(instance_mapname("6@tower"), _("Nacht Sieger's body has turned into dark ashes that scattered in the wind."), bc_map, "0x00ffcc");
+ stopnpctimer();
end;
}
@@ -2200,17 +2124,17 @@ OnTimer10500:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Effect30");
+ disablenpc(instance_npcname("#Effect30"));
end;
OnEnable:
- specialeffect EF_CONE;
- initnpctimer;
+ specialeffect(EF_CONE);
+ initnpctimer();
end;
OnTimer1000:
- stopnpctimer;
- donpcevent instance_npcname("#Effect31")+"::OnEnable";
+ stopnpctimer();
+ donpcevent(instance_npcname("#Effect31")+"::OnEnable");
end;
}
@@ -2218,16 +2142,16 @@ OnTimer1000:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Effect31");
+ disablenpc(instance_npcname("#Effect31"));
end;
OnEnable:
- specialeffect EF_CONE;
- initnpctimer;
+ specialeffect(EF_CONE);
+ initnpctimer();
end;
OnTimer1000:
- stopnpctimer;
- donpcevent instance_npcname("#Effect30")+"::OnEnable";
+ stopnpctimer();
+ donpcevent(instance_npcname("#Effect30")+"::OnEnable");
end;
}
diff --git a/npc/instances/OrcsMemory.txt b/npc/instances/OrcsMemory.txt
index 28cc9bbd5..1aaf2fd42 100644
--- a/npc/instances/OrcsMemory.txt
+++ b/npc/instances/OrcsMemory.txt
@@ -38,132 +38,136 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 2_MONEMUS,{
.@party_id = getcharid(CHAR_ID_PARTY);
.@p_name$ = getpartyname(.@party_id);
- .@md_name$ = "Orc's Memory";
+ .@md_name$ = _("Orc's Memory");
- if (!instance_check_party(.@party_id,2,30,80)) {
- mes "Only users between Levels ^ff000030 ~ 80^000000 can enter this Dungeon.";
- close;
+ if (!instance_check_party(.@party_id, 2, 30, 80)) {
+ mes("Only users between Levels ^ff000030 ~ 80^000000 can enter this Dungeon.");
+ close();
}
- .@orctime = questprogress(12059,PLAYTIME);
+ .@orctime = questprogress(12059, PLAYTIME);
if (.@orctime == 2) {
- mes "^0000ffAll records and after-effects related to the Orc's Memory Dungeon are deleted. You can now regenerate or re-enter the dungeon.^000000";
- erasequest 12059;
- close;
+ mes("^0000ffAll records and after-effects related to the Orc's Memory Dungeon are deleted. You can now regenerate or re-enter the dungeon.^000000");
+ erasequest(12059);
+ close();
}
if (.@orctime == 1) {
- mes "You can enter the Dungeon if it has been generated.";
- next;
- if(select("Enter the Dungeon "+.@md_name$, "Cancel") == 2)
- close;
+ mes("You can enter the Dungeon if it has been generated.");
+ next();
+ .@str$ = sprintf(_$("Enter the Dungeon %s"), .@md_name$);
+ if (select(.@str$, "Cancel") == 2)
+ close();
// Fall through to access the dungeon
} else { // !.@orctime
- if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2)) {
- mes "Party status confirmed. Would you like to book entrance to the "+.@md_name$+"?";
- next;
- switch(select("Reserve the "+.@md_name$, "Enter the Dungeon", "Cancel")) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id, 2)) {
+ mesf("Party status confirmed. Would you like to book entrance to the %s?", .@md_name$);
+ next();
+ .@str$ = sprintf(_$("Reserve the %s"), .@md_name$);
+ switch (select(.@str$, "Enter the Dungeon", "Cancel")) {
case 1:
- .@instance = instance_create(.@md_name$,.@party_id);
+ .@instance = instance_create(.@md_name$, .@party_id);
if (.@instance < 0) {
- mes "Party Name: "+.@p_name$;
- mes "Party Leader: "+strcharinfo(PC_NAME);
- mes "^0000ff"+.@md_name$+" ^000000 - Reservation Failed.";
- close;
+ mesf("Party Name: %s", .@p_name$);
+ mesf("Party Leader: %s", strcharinfo(PC_NAME));
+ mesf("^0000ff%s ^000000 - Reservation Failed.", .@md_name$);
+ close();
}
- mes "^0000ff"+.@md_name$+"^000000- Attempting to book an entrance";
+ mesf("^0000ff%s^000000- Attempting to book an entrance", .@md_name$);
for (.@i = 1; .@i <= 2; ++.@i) {
- if( instance_attachmap(.@i + "@orcs", .@instance) == "" )
+ if (instance_attachmap(.@i + "@orcs", .@instance) == "")
break;
}
- if( .@i < 2 ) {
+ if (.@i < 2) {
instance_destroy(.@instance);
- close;
+ close();
}
- instance_set_timeout 7200,300,.@instance;
+ instance_set_timeout(7200, 300, .@instance);
instance_init(.@instance);
- mes "After making a reservation, you have to select 'Enter the Dungeon' from the menu if you wish to enter the "+.@md_name$+".";
- close;
+ mesf("After making a reservation, you have to select 'Enter the Dungeon' from the menu if you wish to enter the %s.", .@md_name$);
+ close();
case 2:
break; // Fall through to access the dungeon (after the else)
case 3:
- close;
+ close();
}
- } else if (select(.@md_name$ + " Enter the Memorial Dungeon", "Cancel") == 2)
+ } else if (select(sprintf(_$("%s Enter the Memorial Dungeon"), .@md_name$), "Cancel") == 2) {
end;
+ }
// Else access the dungeon
}
// Dungeon access
if (has_instance("1@orcs") == "") {
- mes "Memorial Dungeon "+.@md_name$+" does not exist.";
- mes "The party leader has not reserved entrance to the dungeon yet.";
- next;
- mes "Once the reservation is complete, the dungeon will be generated.";
- mes "If your dungeon has been destroyed you must wait 7 days before re-entering.";
- close;
+ mesf("Memorial Dungeon %s does not exist.", .@md_name$);
+ mes("The party leader has not reserved entrance to the dungeon yet.");
+ next();
+ mes("Once the reservation is complete, the dungeon will be generated.");
+ mes("If your dungeon has been destroyed you must wait 7 days before re-entering.");
+ close();
}
- mapannounce "gef_fild10", strcharinfo(PC_NAME) + " of the party, " + .@p_name$ + " is entering the "+.@md_name$+".",bc_map,"0x00ff99";
- if (!questprogress(12059)) setquest 12059;
- warp "1@orcs",179,15;
+ mapannounce("gef_fild10", sprintf(_$("%s of the party, %s is entering the %s."), strcharinfo(PC_NAME), .@p_name$, .@md_name$), bc_map, C_SPRINGGREEN);
+ if (!questprogress(12059))
+ setquest(12059);
+ warp("1@orcs", 179, 15);
end;
}
gef_fild10,238,202,6 script Mad Scientist#orc 4_LGTSCIENCE,{
if (BaseLevel < 50) {
- mes "The Mad Scientist doesn't seem to notice you and keeps mumbling to himself...";
- close;
+ mes("The Mad Scientist doesn't seem to notice you and keeps mumbling to himself...");
+ close();
}
if (mad == 0) {
- mes "[Mad Scientist]";
- mes "Haha, no Orcs are coming near me!";
- mes "The power of the Dimensional Gorge is undefeatable!!";
- next;
- switch(select("Orcs don't attack you?", "You wish!")) {
+ mes("[Mad Scientist]");
+ mes("Haha, no Orcs are coming near me!");
+ mes("The power of the Dimensional Gorge is undefeatable!!");
+ next();
+ switch (select("Orcs don't attack you?", "You wish!")) {
case 1:
- mes "[Mad Scientist]";
- mes "Yeah, yeah.. I know it's hard to belive. I don't blame ya.";
- mes "I used to study the Dimensional Gorge discovered near Morroc.";
- mes "According to my research, the minerals found there have enormous power inside them!";
- next;
+ mes("[Mad Scientist]");
+ mes("Yeah, yeah.. I know it's hard to belive. I don't blame ya.");
+ mes("I used to study the Dimensional Gorge discovered near Morroc.");
+ mes("According to my research, the minerals found there have enormous power inside them!");
+ next();
break;
case 2:
- mes "[Mad Scientist]";
- mes "You are a pretty distrustful person, huh?";
- next;
+ mes("[Mad Scientist]");
+ mes("You are a pretty distrustful person, huh?");
+ next();
break;
}
select("Oh? Like what, travel to alternate space?");
- mes "[Mad Scientist]";
- mes "Very smart! I have actually just done that! See that statue over there? It's not your normal Monolith!";
- next;
- mes "[Mad Scientist]";
- mes "I have created it with a combination of our technology and the unlimited energy I discovered from the Gorge! Want to try it?";
- next;
+ mes("[Mad Scientist]");
+ mes("Very smart! I have actually just done that! See that statue over there? It's not your normal Monolith!");
+ next();
+ mes("[Mad Scientist]");
+ mes("I have created it with a combination of our technology and the unlimited energy I discovered from the Gorge! Want to try it?");
+ next();
select("...Um, that doesn't sound legal?");
- mes "[Mad Scientist]";
- mes "Hey, since when did something so interesting have to be legal!? How about it! You can talk to the Orcs! C'mon!";
- next;
- mes "[Mad Scientist]";
- mes "Chances are they'll just give you lots of instructions once they see you, so just wing it! They're always saying the same thing, to the point where I memorized them!";
- next;
- switch(select("Alright... What do I do?", "Umm, maybe not.")) {
+ mes("[Mad Scientist]");
+ mes("Hey, since when did something so interesting have to be legal!? How about it! You can talk to the Orcs! C'mon!");
+ next();
+ mes("[Mad Scientist]");
+ mes("Chances are they'll just give you lots of instructions once they see you, so just wing it! They're always saying the same thing, to the point where I memorized them!");
+ next();
+ switch (select("Alright... What do I do?", "Umm, maybe not.")) {
case 1:
- mes "[Mad Scientist]";
- mes "Very good! Just sit in the hands of this statue! And try to act natural when you're in there!";
+ mes("[Mad Scientist]");
+ mes("Very good! Just sit in the hands of this statue! And try to act natural when you're in there!");
mad = 1;
- close;
+ close();
case 2:
- mes "[Mad Scientist]";
- mes "Oh fine, be that way!";
- close;
+ mes("[Mad Scientist]");
+ mes("Oh fine, be that way!");
+ close();
}
} else if (mad == 1) {
- mes "[Mad Scientist]";
- mes "Hmm? Put your hand on that Monemus Statue if you want to experience traveling through dimensions!";
- close;
+ mes("[Mad Scientist]");
+ mes("Hmm? Put your hand on that Monemus Statue if you want to experience traveling through dimensions!");
+ close();
} else {
mad = 1;
end;
@@ -175,60 +179,53 @@ gef_fild10,238,202,6 script Mad Scientist#orc 4_LGTSCIENCE,{
end;
OnInstanceInit:
- disablenpc instance_npcname("#Resurrect Monsters1");
+ disablenpc(instance_npcname("#Resurrect Monsters1"));
end;
OnDisable:
- stopnpctimer;
- killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
+ stopnpctimer();
+ killmonster(instance_mapname("1@orcs"), instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
end;
OnEnable:
- enablenpc instance_npcname("#Resurrect Monsters1");
- monster instance_mapname("1@orcs"),0,0,"Orc Warrior",1023,30,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
+ enablenpc(instance_npcname("#Resurrect Monsters1"));
+ monster(instance_mapname("1@orcs"), 0, 0, _("Orc Warrior"), ORK_WARRIOR, 30, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("1@orcs");
- .@mob_dead_num = 30 - mobcount(.@map$,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
+ .@mob_dead_num = 30 - mobcount(.@map$, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
if (.@mob_dead_num > 0) {
- .@mob_ran = rand(1,30);
+ .@mob_ran = rand(1, 30);
if (.@mob_ran > 29) {
- monster .@map$,0,0,"Orc Warrior",1023,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
- }
- else if ((.@mob_ran > 28) && (.@mob_ran < 30)) {
- monster .@map$,0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
- if (rand(1,10) == 9) {
- mapannounce .@map$, "High Orc: We need more defenses! Get more people here!",bc_map,"0xff4444";
- }
- }
- else if ((.@mob_ran > 26) && (.@mob_ran < 29)) {
- areamonster .@map$,41,91,51,81,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
- if (rand(1,10) == 9) {
- mapannounce .@map$, "Where are the High Orcs!? Get them to stop the enemies!",bc_map,"0xff4444";
- }
- }
- else {
- areamonster .@map$,17,187,27,177,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
- if (rand(1,5) == 3) {
- mapannounce .@map$, "Caution: The army's starting to concentrate at Zone No. 4.",bc_map,"0x77ff77";
- }
- if (rand(1,100) == 50) {
- initnpctimer;
- }
+ monster(.@map$, 0, 0, _("Orc Warrior"), ORK_WARRIOR, .@mob_dead_num, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
+ } else if (.@mob_ran > 28 && .@mob_ran < 30) {
+ monster(.@map$, 0, 0, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
+ if (rand(1, 10) == 9)
+ mapannounce(.@map$, _("High Orc: We need more defenses! Get more people here!"), bc_map, "0xff4444");
+ } else if (.@mob_ran > 26 && .@mob_ran < 29) {
+ areamonster(.@map$, 41, 91, 51, 81, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
+ if (rand(1, 10) == 9)
+ mapannounce(.@map$, _("Where are the High Orcs!? Get them to stop the enemies!"), bc_map, "0xff4444");
+ } else {
+ areamonster(.@map$, 17, 187, 27, 177, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
+ if (rand(1, 5) == 3)
+ mapannounce(.@map$, _("Caution: The army's starting to concentrate at Zone No. 4."), bc_map, "0x77ff77");
+ if (rand(1, 100) == 50)
+ initnpctimer();
}
}
end;
OnTimer10:
- mapannounce instance_mapname("1@orcs"), "Shouts of the Chief Orc of Safeguards: Looks like this will take longer than expected. Summon the Stalactic Golems!",bc_map,"0xff4444";
+ mapannounce(instance_mapname("1@orcs"), _("Shouts of the Chief Orc of Safeguards: Looks like this will take longer than expected. Summon the Stalactic Golems!"), bc_map, "0xff4444");
end;
OnTimer4010:
.@map$ = instance_mapname("1@orcs");
- mapannounce .@map$, "Stalactic Golems are digging out of the deep underground.",bc_map,"0x77ff77";
- areamonster .@map$,17,187,27,177,"Stalactic Golem",1278,20,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
- stopnpctimer;
+ mapannounce(.@map$, _("Stalactic Golems are digging out of the deep underground."), bc_map, "0x77ff77");
+ areamonster(.@map$, 17, 187, 27, 177, _("Stalactic Golem"), STALACTIC_GOLEM, 20, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
+ stopnpctimer();
end;
}
@@ -236,30 +233,27 @@ OnTimer4010:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Resurrect Monsters2");
+ disablenpc(instance_npcname("#Resurrect Monsters2"));
end;
OnDisable:
- killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead";
+ killmonster(instance_mapname("1@orcs"), instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead");
end;
OnEnable:
- enablenpc instance_npcname("#Resurrect Monsters2");
- monster instance_mapname("1@orcs"),0,0,"Trained Wolf",1106,15,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead";
+ enablenpc(instance_npcname("#Resurrect Monsters2"));
+ monster(instance_mapname("1@orcs"), 0, 0, _("Trained Wolf"), DESERT_WOLF, 15, instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("1@orcs");
- .@mob_dead_num = 15 - mobcount(.@map$,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead");
- if (rand(1,30) > 15) {
- if (.@mob_dead_num > 0) {
- monster .@map$,0,0,"Trained Wolf",1106,.@mob_dead_num,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead";
- }
- }
- else {
- if (.@mob_dead_num > 0) {
- areamonster .@map$,17,187,27,177,"Trained Wolf",1106,.@mob_dead_num,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead";
- }
+ .@mob_dead_num = 15 - mobcount(.@map$, instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead");
+ if (rand(1, 30) > 15) {
+ if (.@mob_dead_num > 0)
+ monster(.@map$, 0, 0, _("Trained Wolf"), DESERT_WOLF, .@mob_dead_num, instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead");
+ } else {
+ if (.@mob_dead_num > 0)
+ areamonster(.@map$, 17, 187, 27, 177, _("Trained Wolf"), DESERT_WOLF, .@mob_dead_num, instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead");
}
end;
}
@@ -268,39 +262,34 @@ OnMyMobDead:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Resurrect Monsters3");
+ disablenpc(instance_npcname("#Resurrect Monsters3"));
end;
OnDisable:
- killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
+ killmonster(instance_mapname("1@orcs"), instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead");
end;
OnEnable:
- enablenpc instance_npcname("#Resurrect Monsters3");
- monster instance_mapname("1@orcs"),0,0,"Orc Archer",1189,15,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
+ enablenpc(instance_npcname("#Resurrect Monsters3"));
+ monster(instance_mapname("1@orcs"), 0, 0, _("Orc Archer"), ORC_ARCHER, 15, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("1@orcs");
- .@mob_dead_num = 15 - mobcount(.@map$,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead");
- .@mob_ran = rand(1,30);
+ .@mob_dead_num = 15 - mobcount(.@map$, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead");
+ .@mob_ran = rand(1, 30);
if (.@mob_ran > 29) {
+ if (.@mob_dead_num > 0)
+ monster(.@map$, 0, 0, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead");
+ } else if (.@mob_ran > 26 && .@mob_ran < 30) {
if (.@mob_dead_num > 0) {
- monster .@map$,0,0,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
- }
- }
- else if ((.@mob_ran > 26) && (.@mob_ran < 30)) {
- if (.@mob_dead_num > 0) {
- areamonster .@map$,43,155,47,159,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
- if (rand(1,3) == 3) {
- mapannounce .@map$, "High Orc: Attack them from behind! Cut off their support!",bc_map,"0xff4444";
- }
- }
- }
- else {
- if (.@mob_dead_num > 0) {
- areamonster .@map$,17,187,27,177,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
+ areamonster(.@map$, 43, 155, 47, 159, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead");
+ if (rand(1, 3) == 3)
+ mapannounce(.@map$, _("High Orc: Attack them from behind! Cut off their support!"), bc_map, "0xff4444");
}
+ } else {
+ if (.@mob_dead_num > 0)
+ areamonster(.@map$, 17, 187, 27, 177, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead");
}
end;
}
@@ -309,25 +298,24 @@ OnMyMobDead:
end;
OnInstanceInit:
- enablenpc instance_npcname("#Resurrect Monsters4");
- areamonster instance_mapname("1@orcs"),98,35,178,115,"Anopheles",1627,10,instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead";
+ enablenpc(instance_npcname("#Resurrect Monsters4"));
+ areamonster(instance_mapname("1@orcs"), 98, 35, 178, 115, _("Anopheles"), ANOPHELES, 10, instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("1@orcs");
- .@mob_dead_num = 10 - mobcount(.@map$,instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead");
- if (.@mob_dead_num > 0) {
- monster .@map$,0,0,"Anopheles",1627,.@mob_dead_num,instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead";
- }
+ .@mob_dead_num = 10 - mobcount(.@map$, instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead");
+ if (.@mob_dead_num > 0)
+ monster(.@map$, 0, 0, _("Anopheles"), ANOPHELES, .@mob_dead_num, instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead");
end;
OnDisable:
- killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead";
+ killmonster(instance_mapname("1@orcs"), instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead");
end;
}
1@orcs,180,29,4 script Kruger#1-1 4_ORCWARRIOR,{
- donpcevent instance_npcname("Kruger#1-2")+"::OnEnable";
+ donpcevent(instance_npcname("Kruger#1-2")+"::OnEnable");
end;
}
@@ -335,164 +323,164 @@ OnDisable:
end;
OnInstanceInit:
- disablenpc instance_npcname("Kruger#1-2");
+ disablenpc(instance_npcname("Kruger#1-2"));
end;
OnEnable:
- disablenpc instance_npcname("Kruger#1-1");
- enablenpc instance_npcname("Kruger#1-2");
- initnpctimer;
+ disablenpc(instance_npcname("Kruger#1-1"));
+ enablenpc(instance_npcname("Kruger#1-2"));
+ initnpctimer();
end;
OnTimer10:
- mapannounce instance_mapname("1@orcs"), "Kruger: Damn... What took you so long!! I don't have all day!!",bc_map,"0xffff00";
+ mapannounce(instance_mapname("1@orcs"), _("Kruger: Damn... What took you so long!! I don't have all day!!"), bc_map, C_YELLOW);
end;
OnTimer5710:
- mapannounce instance_mapname("1@orcs"), "Kruger: My plan was to let our comrades open the gate, but it's all ruined since I got busted by the Orc Shaman.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("1@orcs"), _("Kruger: My plan was to let our comrades open the gate, but it's all ruined since I got busted by the Orc Shaman."), bc_map, C_YELLOW);
end;
OnTimer14610:
- mapannounce instance_mapname("1@orcs"), "Shouts of the Chief Orc of Safeguards: I smell a rat.. Send some patrols to the entrance!!",bc_map,"0xff4444";
+ mapannounce(instance_mapname("1@orcs"), _("Shouts of the Chief Orc of Safeguards: I smell a rat.. Send some patrols to the entrance!!"), bc_map, "0xff4444");
end;
OnTimer20210:
- mapannounce instance_mapname("1@orcs"), "Kruger: Darn it.. They'll be here any minute. Ok. Listen to me now.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("1@orcs"), _("Kruger: Darn it.. They'll be here any minute. Ok. Listen to me now."), bc_map, C_YELLOW);
end;
OnTimer24910:
- mapannounce instance_mapname("1@orcs"), "Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the power to unseal the next zone.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("1@orcs"), _("Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the power to unseal the next zone."), bc_map, C_YELLOW);
end;
OnTimer34310:
- mapannounce instance_mapname("1@orcs"), "Kruger: Find those Enchanted Orcs and get rid of them to move to the next zone.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("1@orcs"), _("Kruger: Find those Enchanted Orcs and get rid of them to move to the next zone."), bc_map, C_YELLOW);
end;
OnTimer39710:
- mapannounce instance_mapname("1@orcs"), "Kruger: Try to avoid encountering Orcs other then the Enchanted ones. Everytime you kill a normal Orc, High Orcs will gather at the last path to the 2nd floor.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("1@orcs"), _("Kruger: Try to avoid encountering Orcs other then the Enchanted ones. Everytime you kill a normal Orc, High Orcs will gather at the last path to the 2nd floor."), bc_map, C_YELLOW);
end;
OnTimer49210:
- mapannounce instance_mapname("1@orcs"), "Kruger: In the worst case, the path to the 2nd floor could be completely blocked. For your own sake, you should be as sneaky as possible.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("1@orcs"), _("Kruger: In the worst case, the path to the 2nd floor could be completely blocked. For your own sake, you should be as sneaky as possible."), bc_map, C_YELLOW);
end;
OnTimer56310:
- mapannounce instance_mapname("1@orcs"), "Mission: Sneak in and get rid of the 'Enchanted Orcs'. Avoiding battles with other Orcs is the best way of getting into the 2nd floor.",bc_map,"0x44ffff";
- donpcevent instance_npcname("#Resurrect Monsters1")+"::OnEnable";
- donpcevent instance_npcname("#Resurrect Monsters2")+"::OnEnable";
- donpcevent instance_npcname("#Resurrect Monsters3")+"::OnEnable";
- disablenpc instance_npcname("Kruger#1-2");
+ mapannounce(instance_mapname("1@orcs"), _("Mission: Sneak in and get rid of the 'Enchanted Orcs'. Avoiding battles with other Orcs is the best way of getting into the 2nd floor."), bc_map, "0x44ffff");
+ donpcevent(instance_npcname("#Resurrect Monsters1")+"::OnEnable");
+ donpcevent(instance_npcname("#Resurrect Monsters2")+"::OnEnable");
+ donpcevent(instance_npcname("#Resurrect Monsters3")+"::OnEnable");
+ disablenpc(instance_npcname("Kruger#1-2"));
end;
OnTimer60000:
- areamonster instance_mapname("1@orcs"),137,83,143,89,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead";
- stopnpctimer;
+ areamonster(instance_mapname("1@orcs"), 137, 83, 143, 89, _("Enchanted Orc"), ORK_WARRIOR, 1, instance_npcname("B1 Area Mobs")+"::OnMyMobDead");
+ stopnpctimer();
end;
}
1@orcs,168,125,0 script B1 Area 1 WARPNPC,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("B1 Area 1");
+ disablenpc(instance_npcname("B1 Area 1"));
end;
OnEnable:
- enablenpc instance_npcname("B1 Area 1");
- areamonster instance_mapname("1@orcs"),103,105,109,111,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead1";
+ enablenpc(instance_npcname("B1 Area 1"));
+ areamonster(instance_mapname("1@orcs"), 103, 105, 109, 111, _("Enchanted Orc"), ORK_WARRIOR, 1, instance_npcname("B1 Area Mobs")+"::OnMyMobDead1");
end;
OnTouch:
- warp instance_mapname("1@orcs"),168,130;
+ warp(instance_mapname("1@orcs"), 168, 130);
end;
OnContinue:
- donpcevent instance_npcname("B1 Area 2")+"::OnEnable";
- initnpctimer;
+ donpcevent(instance_npcname("B1 Area 2")+"::OnEnable");
+ initnpctimer();
end;
OnTimer10300:
- mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shaman started to control them with her magic.",bc_map,"0xff4499";
+ mapannounce(instance_mapname("1@orcs"), _("Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shaman started to control them with her magic."), bc_map, "0xff4499");
end;
OnTimer18700:
- mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: There's nothing we can do but to defeat the Orc Shaman if we want to save the remaining tribes.",bc_map,"0xff4499";
- stopnpctimer;
+ mapannounce(instance_mapname("1@orcs"), _("Kruger's Whisper: There's nothing we can do but to defeat the Orc Shaman if we want to save the remaining tribes."), bc_map, "0xff4499");
+ stopnpctimer();
end;
}
1@orcs,89,94,0 script B1 Area 2 WARPNPC,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("B1 Area 2");
+ disablenpc(instance_npcname("B1 Area 2"));
end;
OnEnable:
- enablenpc instance_npcname("B1 Area 2");
- areamonster instance_mapname("1@orcs"),32,40,38,46,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead2";
+ enablenpc(instance_npcname("B1 Area 2"));
+ areamonster(instance_mapname("1@orcs"), 32, 40, 38, 46, _("Enchanted Orc"), ORK_WARRIOR, 1, instance_npcname("B1 Area Mobs")+"::OnMyMobDead2");
end;
OnTouch:
- warp instance_mapname("1@orcs"),85,85;
+ warp(instance_mapname("1@orcs"), 85, 85);
end;
OnContinue:
- donpcevent instance_npcname("B1 Area 3")+"::OnEnable";
- initnpctimer;
+ donpcevent(instance_npcname("B1 Area 3")+"::OnEnable");
+ initnpctimer();
end;
OnTimer30300:
- mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman used those Orcs for her rituals.",bc_map,"0xff4499";
+ mapannounce(instance_mapname("1@orcs"), _("Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman used those Orcs for her rituals."), bc_map, "0xff4499");
end;
OnTimer37600:
- mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: ... It all has to do with me. I am responsible for this evil.",bc_map,"0xff4499";
- stopnpctimer;
+ mapannounce(instance_mapname("1@orcs"), _("Kruger's Whisper: ... It all has to do with me. I am responsible for this evil."), bc_map, "0xff4499");
+ stopnpctimer();
end;
}
1@orcs,38,105,0 script B1 Area 3 WARPNPC,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("B1 Area 3");
+ disablenpc(instance_npcname("B1 Area 3"));
end;
OnEnable:
- enablenpc instance_npcname("B1 Area 3");
- areamonster instance_mapname("1@orcs"),19,177,25,183,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead3";
+ enablenpc(instance_npcname("B1 Area 3"));
+ areamonster(instance_mapname("1@orcs"), 19, 177, 25, 183, _("Enchanted Orc"), ORK_WARRIOR, 1, instance_npcname("B1 Area Mobs")+"::OnMyMobDead3");
end;
OnTouch:
- warp instance_mapname("1@orcs"),38,110;
+ warp(instance_mapname("1@orcs"), 38, 110);
end;
OnContinue:
- donpcevent instance_npcname("B1 Area 4")+"::OnEnable";
- initnpctimer;
+ donpcevent(instance_npcname("B1 Area 4")+"::OnEnable");
+ initnpctimer();
end;
OnTimer30300:
- mapannounce instance_mapname("1@orcs"), "Please, hang in there!",bc_map,"0xff4499";
+ mapannounce(instance_mapname("1@orcs"), _("Please, hang in there!"), bc_map, "0xff4499");
end;
OnTimer32700:
- mapannounce instance_mapname("1@orcs"), "We'll get some rest when we get to the 2nd basement after passing through here.",bc_map,"0xff4499";
- stopnpctimer;
+ mapannounce(instance_mapname("1@orcs"), _("We'll get some rest when we get to the 2nd basement after passing through here."), bc_map, "0xff4499");
+ stopnpctimer();
end;
}
1@orcs,21,189,0 script B1 Area 4 WARPNPC,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("B1 Area 4");
+ disablenpc(instance_npcname("B1 Area 4"));
end;
OnEnable:
- enablenpc instance_npcname("B1 Area 4");
- donpcevent instance_npcname("#Resurrect Monsters1")+"::OnDisable";
- donpcevent instance_npcname("#Resurrect Monsters2")+"::OnDisable";
- donpcevent instance_npcname("#Resurrect Monsters3")+"::OnDisable";
- donpcevent instance_npcname("#Resurrect Monsters4")+"::OnDisable";
+ enablenpc(instance_npcname("B1 Area 4"));
+ donpcevent(instance_npcname("#Resurrect Monsters1")+"::OnDisable");
+ donpcevent(instance_npcname("#Resurrect Monsters2")+"::OnDisable");
+ donpcevent(instance_npcname("#Resurrect Monsters3")+"::OnDisable");
+ donpcevent(instance_npcname("#Resurrect Monsters4")+"::OnDisable");
end;
OnTouch:
- warp instance_mapname("2@orcs"),32,171;
+ warp(instance_mapname("2@orcs"), 32, 171);
end;
}
@@ -500,19 +488,19 @@ OnTouch:
end;
OnMyMobDead:
- donpcevent instance_npcname("B1 Area 1")+"::OnEnable";
+ donpcevent(instance_npcname("B1 Area 1")+"::OnEnable");
end;
OnMyMobDead1:
- donpcevent instance_npcname("B1 Area 1")+"::OnContinue";
+ donpcevent(instance_npcname("B1 Area 1")+"::OnContinue");
end;
OnMyMobDead2:
- donpcevent instance_npcname("B1 Area 2")+"::OnContinue";
+ donpcevent(instance_npcname("B1 Area 2")+"::OnContinue");
end;
OnMyMobDead3:
- donpcevent instance_npcname("B1 Area 3")+"::OnContinue";
+ donpcevent(instance_npcname("B1 Area 3")+"::OnContinue");
end;
}
@@ -521,57 +509,51 @@ OnMyMobDead3:
end;
OnInstanceInit:
- disablenpc instance_npcname("#2Resurrect Monsters1");
+ disablenpc(instance_npcname("#2Resurrect Monsters1"));
end;
OnEnable:
- enablenpc instance_npcname("#2Resurrect Monsters1");
- monster instance_mapname("2@orcs"),0,0,"Vengeful Orc",1152,30,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
+ enablenpc(instance_npcname("#2Resurrect Monsters1"));
+ monster(instance_mapname("2@orcs"), 0, 0, _("Vengeful Orc"), ORC_SKELETON, 30, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
end;
OnDisable:
- stopnpctimer;
- killmonster instance_mapname("2@orcs"),instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
+ stopnpctimer();
+ killmonster(instance_mapname("2@orcs"), instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("2@orcs");
- .@mob_dead_num = 30 - mobcount(.@map$,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
+ .@mob_dead_num = 30 - mobcount(.@map$, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
if (.@mob_dead_num > 0) {
- .@mob_ran = rand(1,30);
+ .@mob_ran = rand(1, 30);
if (.@mob_ran > 29) {
- monster .@map$,0,0,"Vengeful Orc",1152,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
- }
- else if ((.@mob_ran > 28) && (.@mob_ran < 30)) {
- monster .@map$,0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
- }
- else if ((.@mob_ran > 26) && (.@mob_ran < 29)) {
- areamonster .@map$,157,112,167,122,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
- if (rand(1,10) == 9) {
- mapannounce .@map$, "Warning: High Orcs are gathering near area 3.",bc_map,"0xff4444";
- }
- }
- else {
- areamonster .@map$,173,13,183,23,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
- if (rand(1,5) == 3) {
- mapannounce .@map$, "Caution: The Forces have started to concentrate at the Shaman's Altar.",bc_map,"0x77ff77";
- }
- if (rand(1,70) == 50) {
- initnpctimer;
- }
+ monster(.@map$, 0, 0, _("Vengeful Orc"), ORC_SKELETON, .@mob_dead_num, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
+ } else if (.@mob_ran > 28 && .@mob_ran < 30) {
+ monster(.@map$, 0, 0, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
+ } else if (.@mob_ran > 26 && .@mob_ran < 29) {
+ areamonster(.@map$, 157, 112, 167, 122, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
+ if (rand(1, 10) == 9)
+ mapannounce(.@map$, _("Warning: High Orcs are gathering near area 3."), bc_map, "0xff4444");
+ } else {
+ areamonster(.@map$, 173, 13, 183, 23, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
+ if (rand(1, 5) == 3)
+ mapannounce(.@map$, _("Caution: The Forces have started to concentrate at the Shaman's Altar."), bc_map, "0x77ff77");
+ if (rand(1, 70) == 50)
+ initnpctimer();
}
}
end;
OnTimer10:
- mapannounce instance_mapname("2@orcs"), "Voice from somewhere: Foolish... Do you really think the altar would fall like that?",bc_map,"0xff4444";
+ mapannounce(instance_mapname("2@orcs"), _("Voice from somewhere: Foolish... Do you really think the altar would fall like that?"), bc_map, "0xff4444");
end;
OnTimer4010:
.@map$ = instance_mapname("2@orcs");
- mapannounce .@map$, "[ Wraiths were summoned by an unknown power ]",bc_map,"0x77ff77";
- areamonster .@map$,167,25,177,35,"Wraith",1475,30,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
- stopnpctimer;
+ mapannounce(.@map$, _("[ Wraiths were summoned by an unknown power ]"), bc_map, "0x77ff77");
+ areamonster(.@map$, 167, 25, 177, 35, _("Wraith"), G_WRAITH, 30, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
+ stopnpctimer();
end;
}
@@ -579,40 +561,36 @@ OnTimer4010:
end;
OnInstanceInit:
- disablenpc instance_npcname("#2Resurrect Monsters3");
+ disablenpc(instance_npcname("#2Resurrect Monsters3"));
end;
OnEnable:
- enablenpc instance_npcname("#2Resurrect Monsters3");
- monster instance_mapname("2@orcs"),0,0,"Orc Zombie",1153,15,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
+ enablenpc(instance_npcname("#2Resurrect Monsters3"));
+ monster(instance_mapname("2@orcs"), 0, 0, _("Orc Zombie"), ORC_ZOMBIE, 15, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("2@orcs");
- .@mob_dead_num = 15 - mobcount(.@map$,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead");
- .@mob_ran = rand(1,30);
+ .@mob_dead_num = 15 - mobcount(.@map$, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead");
+ .@mob_ran = rand(1, 30);
if (.@mob_ran > 29) {
if (.@mob_dead_num > 0) {
- monster .@map$,0,0,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
+ monster(.@map$, 0, 0, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead");
}
- }
- else if ((.@mob_ran > 6) && (.@mob_ran < 30)) {
- if (.@mob_dead_num > 0) {
- areamonster .@map$,168,10,184,26,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
- if (rand(1,15) == 3) {
- mapannounce .@map$, "Warning: Orc Archer teams are gathering near the altar.",bc_map,"0xff4444";
- }
- }
- }
- else {
+ } else if (.@mob_ran > 6 && .@mob_ran < 30) {
if (.@mob_dead_num > 0) {
- areamonster .@map$,168,21,184,21,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
+ areamonster(.@map$, 168, 10, 184, 26, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead");
+ if (rand(1, 15) == 3)
+ mapannounce(.@map$, _("Warning: Orc Archer teams are gathering near the altar."), bc_map, "0xff4444");
}
+ } else {
+ if (.@mob_dead_num > 0)
+ areamonster(.@map$, 168, 21, 184, 21, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead");
}
end;
OnDisable:
- killmonster instance_mapname("2@orcs"),instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
+ killmonster(instance_mapname("2@orcs"), instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead");
end;
}
@@ -620,21 +598,20 @@ OnDisable:
end;
OnInstanceInit:
- enablenpc instance_npcname("#2Resurrect Monsters4");
- monster instance_mapname("2@orcs"),0,0,"Anopheles",1627,10,instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead";
+ enablenpc(instance_npcname("#2Resurrect Monsters4"));
+ monster(instance_mapname("2@orcs"), 0, 0, _("Anopheles"), ANOPHELES, 10, instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("2@orcs");
- .@mob_dead_num = 10 - mobcount(.@map$,instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead");
- if (.@mob_dead_num > 0) {
- monster .@map$,0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead";
- }
+ .@mob_dead_num = 10 - mobcount(.@map$, instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead");
+ if (.@mob_dead_num > 0)
+ monster(.@map$, 0, 0, _("Anopheles"), ANOPHELES, 1, instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead");
end;
}
2@orcs,35,169,4 script Kruger#2-1 4_ORCWARRIOR,{
- donpcevent instance_npcname("Kruger#2-2")+"::OnEnable";
+ donpcevent(instance_npcname("Kruger#2-2")+"::OnEnable");
end;
}
@@ -642,72 +619,73 @@ OnMyMobDead:
end;
OnInstanceInit:
- disablenpc instance_npcname("Kruger#2-2");
+ disablenpc(instance_npcname("Kruger#2-2"));
end;
OnEnable:
- disablenpc instance_npcname("Kruger#2-1");
- enablenpc instance_npcname("Kruger#2-2");
- initnpctimer;
+ disablenpc(instance_npcname("Kruger#2-1"));
+ enablenpc(instance_npcname("Kruger#2-2"));
+ initnpctimer();
end;
OnTimer10:
- mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: I'll tell you how to get to the Shaman's altar.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: I'll tell you how to get to the Shaman's altar."), bc_map, C_YELLOW);
end;
OnTimer3510:
- mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: Do you see the braziers that light the path? Unseal the next zone by strengthening their flames.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: Do you see the braziers that light the path? Unseal the next zone by strengthening their flames."), bc_map, C_YELLOW);
end;
OnTimer10710:
- mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: Of course those monsters won't let you touch the braziers that easily.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: Of course those monsters won't let you touch the braziers that easily."), bc_map, C_YELLOW);
end;
OnTimer16310:
- mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: But still, try keep the battles not too noticable so the Shaman won't guard the altar with her army squad.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: But still, try keep the battles not too noticable so the Shaman won't guard the altar with her army squad."), bc_map, C_YELLOW);
end;
OnTimer21910:
- mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: Only the Party Leader can strengthen the flames, so protect your leader.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: Only the Party Leader can strengthen the flames, so protect your leader."), bc_map, C_YELLOW);
end;
OnTimer23910:
- mapannounce instance_mapname("2@orcs"), "Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order, so be careful.",bc_map,"0x4444ff";
- donpcevent instance_npcname("#2Resurrect Monsters1")+"::OnEnable";
- donpcevent instance_npcname("#2Resurrect Monsters3")+"::OnEnable";
- donpcevent instance_npcname("Torch#1-1")+"::OnEnable";
- disablenpc instance_npcname("Kruger#2-2");
+ mapannounce(instance_mapname("2@orcs"), _("Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order, so be careful."), bc_map, "0x4444ff");
+ donpcevent(instance_npcname("#2Resurrect Monsters1")+"::OnEnable");
+ donpcevent(instance_npcname("#2Resurrect Monsters3")+"::OnEnable");
+ donpcevent(instance_npcname("Torch#1-1")+"::OnEnable");
+ disablenpc(instance_npcname("Kruger#2-2"));
end;
}
2@orcs,26,164,0 script Torch#1-1 CLEAR_NPC,{
- if(getpartyleader(getcharid(CHAR_ID_PARTY),2) != getcharid(CHAR_ID_CHAR)) end;
- progressbar "ffff00",5;
- setarray .@id[0], atoi(charat(strnpcinfo(NPC_NAME_HIDDEN),0)), atoi(charat(strnpcinfo(NPC_NAME_HIDDEN),2));
+ if (getpartyleader(getcharid(CHAR_ID_PARTY), 2) != getcharid(CHAR_ID_CHAR))
+ end;
+ progressbar(sprintf("0x%x", C_YELLOW), 5);
+ setarray(.@id[0], atoi(charat(strnpcinfo(NPC_NAME_HIDDEN), 0)), atoi(charat(strnpcinfo(NPC_NAME_HIDDEN), 2)));
if (.@id[1] == 4)
- donpcevent instance_npcname("#Warp2-"+.@id[0])+"::OnEnable";
+ donpcevent(instance_npcname("#Warp2-"+.@id[0])+"::OnEnable");
else
- donpcevent instance_npcname("Torch#"+.@id[0]+"-"+(.@id[1]+1))+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname(strnpcinfo(NPC_NAME));
+ donpcevent(instance_npcname("Torch#"+.@id[0]+"-"+(.@id[1]+1))+"::OnEnable");
+ initnpctimer();
+ disablenpc(instance_npcname(strnpcinfo(NPC_NAME)));
end;
OnInstanceInit:
if (strnpcinfo(NPC_NAME) != "Torch#2-1" && strnpcinfo(NPC_NAME) != "Torch#3-1")
- disablenpc instance_npcname(strnpcinfo(NPC_NAME));
+ disablenpc(instance_npcname(strnpcinfo(NPC_NAME)));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(NPC_NAME));
+ enablenpc(instance_npcname(strnpcinfo(NPC_NAME)));
end;
OnTimer100:
- specialeffect EF_FIREPILLAR;
+ specialeffect(EF_FIREPILLAR);
end;
OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
+ specialeffect(EF_FIREPILLARBOMB);
+ stopnpctimer();
end;
}
2@orcs,55,155,0 duplicate(Torch#1-1) Torch#1-2 CLEAR_NPC
@@ -716,27 +694,27 @@ OnTimer2000:
2@orcs,48,100,0 script #Warp2-1 WARPNPC,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("#Warp2-1");
+ disablenpc(instance_npcname("#Warp2-1"));
end;
OnEnable:
.@map$ = instance_mapname("2@orcs");
- monster .@map$,109,156,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control")+"::OnMyMobDead1";
- mapannounce .@map$, "The Chief Orc of Safeguards: Oh!! Looks like I have company. Defeat me if you can!!",bc_map,"0xff8888";
+ monster(.@map$, 109, 156, _("Safeguard Chief"), I_HIGH_ORC, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead1");
+ mapannounce(.@map$, _("The Chief Orc of Safeguards: Oh!! Looks like I have company. Defeat me if you can!!"), bc_map, "0xff8888");
end;
OnContinue:
- enablenpc instance_npcname("#Warp2-1");
- initnpctimer;
+ enablenpc(instance_npcname("#Warp2-1"));
+ initnpctimer();
end;
OnTimer10000:
- areamonster instance_mapname("2@orcs"),28,158,40,170,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control")+"::OnMyMobDead1";
- stopnpctimer;
+ areamonster(instance_mapname("2@orcs"), 28, 158, 40, 170, _("Safeguard Chief"), I_HIGH_ORC, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead1");
+ stopnpctimer();
end;
OnTouch:
- warp instance_mapname("2@orcs"),47,93;
+ warp(instance_mapname("2@orcs"), 47, 93);
end;
}
@@ -747,27 +725,27 @@ OnTouch:
2@orcs,101,55,0 script #Warp2-2 WARPNPC,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("#Warp2-2");
+ disablenpc(instance_npcname("#Warp2-2"));
end;
OnEnable:
.@map$ = instance_mapname("2@orcs");
- monster .@map$,67,64,"Orc Sniper",1982,1,instance_npcname("#Mobs Control")+"::OnMyMobDead2";
- mapannounce .@map$, "Orc Sniper: Hah! Pretty impressive that you made it this far, but your foolish little trip ends here...",bc_map,"0xff8888";
+ monster(.@map$, 67, 64, _("Orc Sniper"), I_ORC_ARCHER, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead2");
+ mapannounce(.@map$, _("Orc Sniper: Hah! Pretty impressive that you made it this far, but your foolish little trip ends here..."), bc_map, "0xff8888");
end;
OnContinue:
- enablenpc instance_npcname("#Warp2-2");
- initnpctimer;
+ enablenpc(instance_npcname("#Warp2-2"));
+ initnpctimer();
end;
OnTimer10000:
- areamonster instance_mapname("2@orcs"),40,91,52,103,"Orc Sniper",1982,1,instance_npcname("#Mobs Control")+"::OnMyMobDead2";
- stopnpctimer;
+ areamonster(instance_mapname("2@orcs"), 40, 91, 52, 103, _("Orc Sniper"), I_ORC_ARCHER, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead2");
+ stopnpctimer();
end;
OnTouch:
- warp instance_mapname("2@orcs"),107,55;
+ warp(instance_mapname("2@orcs"), 107, 55);
end;
}
@@ -778,41 +756,41 @@ OnTouch:
2@orcs,167,104,0 script #Warp2-3 WARPNPC,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("#Warp2-3");
+ disablenpc(instance_npcname("#Warp2-3"));
end;
OnEnable:
.@map$ = instance_mapname("2@orcs");
- monster .@map$,152,147,"Depraved Orc Spirit",1983,1,instance_npcname("#Mobs Control")+"::OnMyMobDead3";
- mapannounce .@map$, "Depraved Orc Spirit: I smell flesh! Hungry! Wanna try some human meat!!",bc_map,"0xff8888";
+ monster(.@map$, 152, 147, _("Depraved Orc Spirit"), I_ORC_SKELETON, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead3");
+ mapannounce(.@map$, _("Depraved Orc Spirit: I smell flesh! Hungry! Wanna try some human meat!!"), bc_map, "0xff8888");
end;
OnContinue:
- areamonster instance_mapname("2@orcs"),117,61,129,73,"Depraved Orc Spirit",1983,1;
- donpcevent instance_npcname("#Boss Control")+"::OnEnable";
- enablenpc instance_npcname("#Warp2-3");
- initnpctimer;
+ areamonster(instance_mapname("2@orcs"), 117, 61, 129, 73, _("Depraved Orc Spirit"), I_ORC_SKELETON, 1);
+ donpcevent(instance_npcname("#Boss Control")+"::OnEnable");
+ enablenpc(instance_npcname("#Warp2-3"));
+ initnpctimer();
end;
OnTimer10:
- mapannounce instance_mapname("2@orcs"), "Shaman Cargalache: Hahaha!! So, you finally made it here. The assassin you sent was just terrible. That stupid Orc is getting cold under my feet.",bc_map,"0xffff00";
+ mapannounce(instance_mapname("2@orcs"), _("Shaman Cargalache: Hahaha!! So, you finally made it here. The assassin you sent was just terrible. That stupid Orc is getting cold under my feet."), bc_map, C_YELLOW);
end;
OnTimer6810:
- mapannounce instance_mapname("2@orcs"), "Shaman Cargalache: My loyal slave, go get those intruders!",bc_map,"0xffff00";
+ mapannounce(instance_mapname("2@orcs"), _("Shaman Cargalache: My loyal slave, go get those intruders!"), bc_map, C_YELLOW);
end;
OnTimer10310:
- mapannounce instance_mapname("2@orcs"), "Depraved Orc Hero: Whatever you say, my lord.",bc_map,"0xff7777";
+ mapannounce(instance_mapname("2@orcs"), _("Depraved Orc Hero: Whatever you say, my lord."), bc_map, "0xff7777");
end;
OnTimer13110:
- mapannounce instance_mapname("2@orcs"), "Caution: You have been discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger.",bc_map,"0x8888ff";
- stopnpctimer;
+ mapannounce(instance_mapname("2@orcs"), _("Caution: You have been discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger."), bc_map, "0x8888ff");
+ stopnpctimer();
end;
OnTouch:
- warp instance_mapname("2@orcs"),167,95;
+ warp(instance_mapname("2@orcs"), 167, 95);
end;
}
@@ -820,93 +798,87 @@ OnTouch:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Boss Control");
+ disablenpc(instance_npcname("#Boss Control"));
end;
OnEnable:
.@map$ = instance_mapname("2@orcs");
- monster .@map$,185,8,"Shaman Cargalache",1984,1,instance_npcname("#Boss Control")+"::OnMyMobDead";
- monster .@map$,179,15,"Depraved Orc Hero",1087,1;
- enablenpc instance_npcname("#Boss Control");
+ monster(.@map$, 185, 8, _("Shaman Cargalache"), I_ORC_LADY, 1, instance_npcname("#Boss Control")+"::OnMyMobDead");
+ monster(.@map$, 179, 15, _("Depraved Orc Hero"), ORK_HERO, 1);
+ enablenpc(instance_npcname("#Boss Control"));
end;
OnMyMobDead:
- donpcevent instance_npcname("Kruger#")+"::OnEnable";
+ donpcevent(instance_npcname("Kruger#")+"::OnEnable");
.@map$ = instance_mapname("2@orcs");
- .@mob_ran = rand(1,5);
- if (.@mob_ran == 1) {
- mapannounce .@map$, "Shaman Cargalache: How... How could this be... How could someone like you...!!",bc_map,"0xffff00";
- }
- else if (.@mob_ran == 2) {
- mapannounce .@map$, "Shaman Cargalache: How is it that I've been overpowered by mere humans!",bc_map,"0xffff00";
- }
- else if (.@mob_ran == 3) {
- mapannounce .@map$, "Shaman Cargalache: This... This can't be the end...",bc_map,"0xffff00";
- }
- else if (.@mob_ran == 4) {
- mapannounce .@map$, "Shaman Cargalache: I... Can't die... Yet...!",bc_map,"0xffff00";
- }
- else {
- mapannounce .@map$, "Shaman Cargalache: Defeated by these fools... It can't be happening...!",bc_map,"0xffff00";
- }
- donpcevent instance_npcname("#2Resurrect Monsters1")+"::OnDisable";
- donpcevent instance_npcname("#2Resurrect Monsters3")+"::OnDisable";
- donpcevent instance_npcname("#Warp Outside Orc Dun")+"::OnEnable";
+ .@mob_ran = rand(1, 5);
+ if (.@mob_ran == 1)
+ mapannounce(.@map$, _("Shaman Cargalache: How... How could this be... How could someone like you...!!"), bc_map, C_YELLOW);
+ else if (.@mob_ran == 2)
+ mapannounce(.@map$, _("Shaman Cargalache: How is it that I've been overpowered by mere humans!"), bc_map, C_YELLOW);
+ else if (.@mob_ran == 3)
+ mapannounce(.@map$, _("Shaman Cargalache: This... This can't be the end..."), bc_map, C_YELLOW);
+ else if (.@mob_ran == 4)
+ mapannounce(.@map$, _("Shaman Cargalache: I... Can't die... Yet...!"), bc_map, C_YELLOW);
+ else
+ mapannounce(.@map$, _("Shaman Cargalache: Defeated by these fools... It can't be happening...!"), bc_map, C_YELLOW);
+ donpcevent(instance_npcname("#2Resurrect Monsters1")+"::OnDisable");
+ donpcevent(instance_npcname("#2Resurrect Monsters3")+"::OnDisable");
+ donpcevent(instance_npcname("#Warp Outside Orc Dun")+"::OnEnable");
end;
}
2@orcs,182,8,0 script #Warp Outside Orc Dun WARPNPC,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("#Warp Outside Orc Dun");
+ disablenpc(instance_npcname("#Warp Outside Orc Dun"));
end;
OnEnable:
- enablenpc instance_npcname("#Warp Outside Orc Dun");
+ enablenpc(instance_npcname("#Warp Outside Orc Dun"));
end;
OnTouch:
- warp "gef_fild10",240,197;
+ warp("gef_fild10", 240, 197);
end;
}
2@orcs,172,13,0 script Kruger# 4_ORCWARRIOR2,{
if (yong_odun < 2) {
- mes "[Kruger]";
- mes "*Coughing*";
- mes ""+strcharinfo(PC_NAME)+", it's you...";
- next;
- mes "["+strcharinfo(PC_NAME)+"] ";
- mes "Don't move! You are wounded!";
- next;
- mes "[Kruger]";
- mes "It's... all right.. I'm dying...";
- mes "....";
- mes "The Shaman? What about the Shaman?";
- next;
- mes "["+strcharinfo(PC_NAME)+"] ";
- mes "The Shaman's dead now. Who was that Shaman really?";
- next;
- mes "Kruger seemed to be relieved as he hears of the death of the Shaman, but you notice the bitter expression on his face.";
- next;
- mes "[Kruger]";
- mes "I.. I just couldn't kill my own daughter...";
- mes "Thank you, I'm sure she's finally free from the nightmare that used to choke her soul.";
- next;
- mes "Kruger was about to say something more, but he breathed his last breath before he could...";
+ mes("[Kruger]");
+ mes("*Coughing*");
+ mesf("%s, it's you...", strcharinfo(PC_NAME));
+ next();
+ mesf("[%s]", strcharinfo(PC_NAME));
+ mes("Don't move! You are wounded!");
+ next();
+ mes("[Kruger]");
+ mes("It's... all right.. I'm dying...");
+ mes("....");
+ mes("The Shaman? What about the Shaman?");
+ next();
+ mesf("[%s]", strcharinfo(PC_NAME));
+ mes("The Shaman's dead now. Who was that Shaman really?");
+ next();
+ mes("Kruger seemed to be relieved as he hears of the death of the Shaman, but you notice the bitter expression on his face.");
+ next();
+ mes("[Kruger]");
+ mes("I.. I just couldn't kill my own daughter...");
+ mes("Thank you, I'm sure she's finally free from the nightmare that used to choke her soul.");
+ next();
+ mes("Kruger was about to say something more, but he breathed his last breath before he could...");
yong_odun = 2;
- close;
- }
- else {
- mes "You can see the dead body of Kruger, peacefully lying on the ground.";
- close;
+ close();
+ } else {
+ mes("You can see the dead body of Kruger, peacefully lying on the ground.");
+ close();
}
OnInstanceInit:
- disablenpc instance_npcname("Kruger#");
+ disablenpc(instance_npcname("Kruger#"));
end;
OnEnable:
- enablenpc instance_npcname("Kruger#");
+ enablenpc(instance_npcname("Kruger#"));
end;
}
@@ -914,14 +886,14 @@ OnEnable:
end;
OnMyMobDead1:
- donpcevent instance_npcname("#Warp2-1")+"::OnContinue";
+ donpcevent(instance_npcname("#Warp2-1")+"::OnContinue");
end;
OnMyMobDead2:
- donpcevent instance_npcname("#Warp2-2")+"::OnContinue";
+ donpcevent(instance_npcname("#Warp2-2")+"::OnContinue");
end;
OnMyMobDead3:
- donpcevent instance_npcname("#Warp2-3")+"::OnContinue";
+ donpcevent(instance_npcname("#Warp2-3")+"::OnContinue");
end;
}
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index 1b1022dcf..3bc3d951a 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -37,65 +37,64 @@
//== Sealed Catacomb Entrance ==============================
monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{
- cutin "ins_cata_pri_n",2;
- mes "[Friar Patrick]";
- mes "The peace of this world cannot last forever... The hands of Evil are reaching into the world again...";
- next;
- mes "[Friar Patrick]";
- mes "What brought you to this place?";
- next;
+ cutin("ins_cata_pri_n", 2);
+ mes("[Friar Patrick]");
+ mes("The peace of this world cannot last forever... The hands of Evil are reaching into the world again...");
+ next();
+ mes("[Friar Patrick]");
+ mes("What brought you to this place?");
+ next();
if (countitem(Bapho_Doll) > 0) {
.@doll = 1;
.@selection = select("What is this place?", "I want to enter.", "About the Cursed Baphomet Doll.", "Cancel.");
- }
- else {
+ } else {
.@selection = select("What is this place?", "I want to enter.", "Cancel.");
}
- switch(.@selection) {
+ switch (.@selection) {
case 1:
- mes "[Friar Patrick]";
- mes "Huh... Don't you know? This is St. Capitolina Monastery where the Brothers who wish to become monks train and pray.";
- next;
- mes "[Friar Patrick]";
- mes "And this place is... What can I say... Yes. It's the grave of the Devil. Grave...";
- next;
- mes "[Friar Patrick]";
- mes "The very place where the great Devil who once demolished this world is sleeping.";
- next;
- switch(select("Tell me more.", "Stop talking.")) {
+ mes("[Friar Patrick]");
+ mes("Huh... Don't you know? This is St. Capitolina Monastery where the Brothers who wish to become monks train and pray.");
+ next();
+ mes("[Friar Patrick]");
+ mes("And this place is... What can I say... Yes. It's the grave of the Devil. Grave...");
+ next();
+ mes("[Friar Patrick]");
+ mes("The very place where the great Devil who once demolished this world is sleeping.");
+ next();
+ switch (select("Tell me more.", "Stop talking.")) {
case 1:
- cutin "ins_cata_pri_n",2;
- mes "[Friar Patrick]";
- mes "Baphomet... is the name of the Devil... I think you have heard of his name.";
- next;
- mes "[Friar Patrick]";
- mes "Numerous brave men and brothers have trained in this monastery...";
- next;
- mes "[Friar Patrick]";
- mes "Under this gravestone in front of you... Baphomet is sealed.";
- next;
- mes "[Friar Patrick]";
- mes "But... As we speak Satan Morocc is marshalling his powerful magic in order to affect all life on this continent.";
- next;
- mes "[Friar Patrick]";
- mes "Baphomet also... has awakened and is preparing for his revival, into this world, by weakening the power of the seal through the power of Satan Morocc...";
- next;
- mes "[Friar Patrick]";
- mes "Now... I'm looking for someone brave enough to reseal Baphomet in its shrine... as we once did many years ago...";
- next;
- mes "[Friar Patrick]";
- mes "Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world...";
- next;
- mes "[Friar Patrick]";
- mes "Train more and use your skills to protect the world from evil's looming presence...";
+ cutin("ins_cata_pri_n", 2);
+ mes("[Friar Patrick]");
+ mes("Baphomet... is the name of the Devil... I think you have heard of his name.");
+ next();
+ mes("[Friar Patrick]");
+ mes("Numerous brave men and brothers have trained in this monastery...");
+ next();
+ mes("[Friar Patrick]");
+ mes("Under this gravestone in front of you... Baphomet is sealed.");
+ next();
+ mes("[Friar Patrick]");
+ mes("But... As we speak Satan Morocc is marshalling his powerful magic in order to affect all life on this continent.");
+ next();
+ mes("[Friar Patrick]");
+ mes("Baphomet also... has awakened and is preparing for his revival, into this world, by weakening the power of the seal through the power of Satan Morocc...");
+ next();
+ mes("[Friar Patrick]");
+ mes("Now... I'm looking for someone brave enough to reseal Baphomet in its shrine... as we once did many years ago...");
+ next();
+ mes("[Friar Patrick]");
+ mes("Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world...");
+ next();
+ mes("[Friar Patrick]");
+ mes("Train more and use your skills to protect the world from evil's looming presence...");
break;
case 2:
- cutin "ins_cata_pri_n",2;
- mes "[Friar Patrick]";
- mes "Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world...";
- next;
- mes "[Friar Patrick]";
- mes "Train more and use your skills to protect the world from evil's looming presence...";
+ cutin("ins_cata_pri_n", 2);
+ mes("[Friar Patrick]");
+ mes("Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world...");
+ next();
+ mes("[Friar Patrick]");
+ mes("Train more and use your skills to protect the world from evil's looming presence...");
break;
}
break;
@@ -104,332 +103,327 @@ monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{
.@party_id = getcharid(CHAR_ID_PARTY);
- mes "[Friar Patrick]";
- mes "Do you mean you'll go to the shrine and reseal Baphomet?";
- next;
+ mes("[Friar Patrick]");
+ mes("Do you mean you'll go to the shrine and reseal Baphomet?");
+ next();
// 12 hour cooldown
- .@ins_bapho_check = questprogress(3040,PLAYTIME);
+ .@ins_bapho_check = questprogress(3040, PLAYTIME);
// Two hour play limit
- //.@ins_bapho_check2 = questprogress(3045,PLAYTIME);
+ //.@ins_bapho_check2 = questprogress(3045, PLAYTIME);
if (!.@ins_bapho_check) {
- if (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR) && instance_check_party(.@party_id,2,75)) {
- mes "[Friar Patrick]";
- mes "Party name is "+getpartyname(.@party_id)+"...";
- mes "Name of the leader is "+strcharinfo(PC_NAME)+"...";
- .@instance = instance_create("Sealed Catacomb",.@party_id);
+ if (getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR) && instance_check_party(.@party_id, 2, 75)) {
+ mes("[Friar Patrick]");
+ mesf("Party name is %s...", getpartyname(.@party_id));
+ mesf("Name of the leader is %s...", strcharinfo(PC_NAME));
+ .@instance = instance_create(_("Sealed Catacomb"), .@party_id);
if (.@instance < 0) {
- mes "Umm... But it seems that there is a problem here... I'll check quickly. Please wait.";
- }
- else {
+ mes("Umm... But it seems that there is a problem here... I'll check quickly. Please wait.");
+ } else {
for (.@i = 1; .@i <= 2; .@i++) {
- if( instance_attachmap(.@i + "@cata", .@instance) == "" ) {
- mes "Failed to attach "+.@i+"@cata as a map!";
+ if (instance_attachmap(.@i + "@cata", .@instance) == "") {
+ mesf("Failed to attach %d@cata as a map!", .@i);
instance_destroy(.@instance);
- close;
+ close();
}
}
- instance_set_timeout 7200,300,.@instance;
+ instance_set_timeout(7200, 300, .@instance);
instance_init(.@instance);
- mes "Okay... I'll adjust the shrine's seal so that you and your group can enter.";
- next;
- mes "[Friar Patrick]";
- mes "You will see a sign when the seal has broken. Please wait until the sign appears...";
- next;
- mes "[Friar Patrick]";
- mes "When you see the sign, put your hands on the gravestone... Then you can move inside.";
- next;
- mes "[Friar Patrick]";
- mes "One thing that you should remember is... Anyone who enters this shrine will be cursed by Baphomet and cannot enter or leave while they are cursed.";
- next;
- mes "[Friar Patrick]";
- mes "And one more thing... In this cursed area, some skills, which are protected by outer physical power are prohibited by the effect of the seal.";
- next;
- mes "[Friar Patrick]";
- mes "For example, the skills like ^0000FFSafety Wall and Assumptio^000000... So you'd better prepare before entering the shrine.";
+ mes("Okay... I'll adjust the shrine's seal so that you and your group can enter.");
+ next();
+ mes("[Friar Patrick]");
+ mes("You will see a sign when the seal has broken. Please wait until the sign appears...");
+ next();
+ mes("[Friar Patrick]");
+ mes("When you see the sign, put your hands on the gravestone... Then you can move inside.");
+ next();
+ mes("[Friar Patrick]");
+ mes("One thing that you should remember is... Anyone who enters this shrine will be cursed by Baphomet and cannot enter or leave while they are cursed.");
+ next();
+ mes("[Friar Patrick]");
+ mes("And one more thing... In this cursed area, some skills, which are protected by outer physical power are prohibited by the effect of the seal.");
+ next();
+ mes("[Friar Patrick]");
+ mes("For example, the skills like ^0000FFSafety Wall and Assumptio^000000... So you'd better prepare before entering the shrine.");
}
+ } else {
+ mes("[Friar Patrick]");
+ mes("Umm... I recognize your courage, but... I can't permit anyone to enter this place. I can only permit the leader of a party to enter first.");
+ next();
+ mes("[Friar Patrick]");
+ mes("Once the party leader is permitted, the rest of the party can enter. This is a rule of this monastery, so please understand.");
}
- else {
- mes "[Friar Patrick]";
- mes "Umm... I recognize your courage, but... I can't permit anyone to enter this place. I can only permit the leader of a party to enter first.";
- next;
- mes "[Friar Patrick]";
- mes "Once the party leader is permitted, the rest of the party can enter. This is a rule of this monastery, so please understand.";
- }
+ } else if (.@ins_bapho_check == 1) {
+ mes("[Friar Patrick]");
+ mes("It seems you have entered this shrine recently... You cannot reenter because Baphomet's Curse still remains. Baphomet's Curse disappears only after a certain amount of time has passed.");
+ } else if (.@ins_bapho_check == 2) {
+ mes("[Friar Patrick]");
+ mes("Umm... It seems that Baphomet's Curse has weakened. I can remove it now.");
+ next();
+ mes("[Friar Patrick]");
+ mes("Haaaaaaap... Hocus Pocus Wingardium Abracadabra!!!!!");
+ next();
+ erasequest(3040);
+ if (questprogress(3041))
+ erasequest(3041);
+ if (questprogress(3045))
+ erasequest(3045);
+ mes("[Friar Patrick]");
+ mes("Huu... It's over. Now that I've released Baphomet's Curse, you can enter again.");
}
- else if (.@ins_bapho_check == 1) {
- mes "[Friar Patrick]";
- mes "It seems you have entered this shrine recently... You cannot reenter because Baphomet's Curse still remains. Baphomet's Curse disappears only after a certain amount of time has passed.";
- }
- else if (.@ins_bapho_check == 2) {
- mes "[Friar Patrick]";
- mes "Umm... It seems that Baphomet's Curse has weakened. I can remove it now.";
- next;
- mes "[Friar Patrick]";
- mes "Haaaaaaap... Hocus Pocus Wingardium Abracadabra!!!!!";
- next;
- erasequest 3040;
- if (questprogress(3041)) erasequest 3041;
- if (questprogress(3045)) erasequest 3045;
- mes "[Friar Patrick]";
- mes "Huu... It's over. Now that I've released Baphomet's Curse, you can enter again.";
- }
- }
- else {
- mes "[Friar Patrick]";
- mes "Umm... You should train more to enter this dangerous place... You should reach at least Lv 75 to enter here.";
- next;
- mes "[Friar Patrick]";
- mes "Please train more and come again.";
+ } else {
+ mes("[Friar Patrick]");
+ mes("Umm... You should train more to enter this dangerous place... You should reach at least Lv 75 to enter here.");
+ next();
+ mes("[Friar Patrick]");
+ mes("Please train more and come again.");
}
break;
case 3:
if (.@doll == 1) {
- mes "[Friar Patrick]";
- mes "That is... the villainous doll that you are holding... Let me see it.";
- next;
- mes "[Friar Patrick]";
- mes "... ... ...";
- next;
- mes "[Friar Patrick]";
- mes "That's correct... I can feel Baphomet's evil inside... So, what will you do with the doll?";
- next;
- mes "[Friar Patrick]";
- mes "It is just a dangerous and useless thing if you do nothing with it... I'll introduce someone who can help you... Do you want to see him?";
- next;
- mes "[Friar Patrick]";
- mes "Go to see ^0000FFRust Blackhand^000000 who is near the main building of the monastery... He will make this doll helpful to you.";
- setquest 3042;
+ mes("[Friar Patrick]");
+ mes("That is... the villainous doll that you are holding... Let me see it.");
+ next();
+ mes("[Friar Patrick]");
+ mes("... ... ...");
+ next();
+ mes("[Friar Patrick]");
+ mes("That's correct... I can feel Baphomet's evil inside... So, what will you do with the doll?");
+ next();
+ mes("[Friar Patrick]");
+ mes("It is just a dangerous and useless thing if you do nothing with it... I'll introduce someone who can help you... Do you want to see him?");
+ next();
+ mes("[Friar Patrick]");
+ mes("Go to see ^0000FFRust Blackhand^000000 who is near the main building of the monastery... He will make this doll helpful to you.");
+ setquest(3042);
break;
}
case 4:
- mes "[Friar Patrick]";
- mes "Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world...";
- next;
- mes "[Friar Patrick]";
- mes "Train more and use your skills to protect the world from evil's looming presence...";
+ mes("[Friar Patrick]");
+ mes("Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world...");
+ next();
+ mes("[Friar Patrick]");
+ mes("Train more and use your skills to protect the world from evil's looming presence...");
break;
}
- close2;
- cutin "",255;
+ close2();
+ cutin("", 255);
end;
}
monk_test,306,151,3 script Grave of Baphomet#edq HIDDEN_NPC,{
- if (countitem(Token_Of_Apostle)) delitem Token_Of_Apostle,countitem(Token_Of_Apostle);
- mes "This gravestone has a carving of a wicked devil with large horns. It arouses an ominous feeling.";
- next;
- if(select("Touch the stone.", "Step back.") == 2)
- close;
+ if (countitem(Token_Of_Apostle))
+ delitem(Token_Of_Apostle, countitem(Token_Of_Apostle));
+ mes("This gravestone has a carving of a wicked devil with large horns. It arouses an ominous feeling.");
+ next();
+ if (select("Touch the stone.", "Step back.") == 2)
+ close();
// 12 hour cooldown
- .@ins_bapho_check = questprogress(3040,PLAYTIME);
+ .@ins_bapho_check = questprogress(3040, PLAYTIME);
// Two hour play limit
- //.@ins_bapho_check2 = questprogress(3045,PLAYTIME);
+ //.@ins_bapho_check2 = questprogress(3045, PLAYTIME);
if (!.@ins_bapho_check) {
if (has_instance("1@cata") == "") {
- mes "It's cold to the touch. It doesn't respond.";
- close;
+ mes("It's cold to the touch. It doesn't respond.");
+ close();
} else {
- mapannounce "monk_test","[" + strcharinfo(PC_NAME) + "] member of the [" + getpartyname(.@party_id) + "] party has entered the Sealed Shrine.",bc_map,"0x00ff99";
- setquest 3040;
- warp "1@cata",100,224;
+ mapannounce("monk_test", sprintf(_$("[%s] member of the [%s] party has entered the Sealed Shrine."), strcharinfo(PC_NAME), getpartyname(.@party_id)), bc_map, C_SPRINGGREEN);
+ setquest(3040);
+ warp("1@cata", 100, 224);
end;
}
} else if (.@ins_bapho_check == 1) {
- mes "[Friar Patrick]";
- mes "It seems you have entered this shrine recently... You cannot reenter because the curse of Baphomet still remains.";
- mes "The curse of Baphomet disappears after a certain amount of time after you entered.";
- close;
+ mes("[Friar Patrick]");
+ mes("It seems you have entered this shrine recently... You cannot reenter because the curse of Baphomet still remains.");
+ mes("The curse of Baphomet disappears after a certain amount of time after you entered.");
+ close();
} else if (.@ins_bapho_check == 2) {
- mes "[Friar Patrick]";
- mes "Umm... It seems the curse of Baphomet weakened. I'll clear the bad curse.";
- next;
- mes "[Friar Patrick]";
- mes "Haaaaaaap... Wingardium Leviosa Expecto Patronum !!!!!";
+ mes("[Friar Patrick]");
+ mes("Umm... It seems the curse of Baphomet weakened. I'll clear the bad curse.");
+ next();
+ mes("[Friar Patrick]");
+ mes("Haaaaaaap... Wingardium Leviosa Expecto Patronum !!!!!");
specialeffect(EF_HOLYHIT, AREA, playerattached());
- erasequest 3040;
- if (questprogress(3041)) erasequest 3041;
- if (questprogress(3045)) erasequest 3045;
- next;
- mes "[Friar Patrick]";
- mes "Huu... It's over. Now I released all of the curses on you. You can enter again.";
- close;
+ erasequest(3040);
+ if (questprogress(3041))
+ erasequest(3041);
+ if (questprogress(3045))
+ erasequest(3045);
+ next();
+ mes("[Friar Patrick]");
+ mes("Huu... It's over. Now I released all of the curses on you. You can enter again.");
+ close();
}
}
prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
.@new_maje = questprogress(3043);
- mes "[Rust Blackhand]";
- mes "Who are you? What do you want me for?";
- next;
- mes "[Rust Blackhand]";
- mes "You're not a monk, then what do you want?";
- next;
+ mes("[Rust Blackhand]");
+ mes("Who are you? What do you want me for?");
+ next();
+ mes("[Rust Blackhand]");
+ mes("You're not a monk, then what do you want?");
+ next();
if (.@new_maje == 1) {
- mes "[Rust Blackhand]";
- mes "Did you bring all of the ingredients?";
- next;
- if (countitem(Bapho_Doll) && countitem(Magestic_Goat) && (countitem(Dark_Crystal) > 29) && (countitem(Dark_Debris) > 49) && (Zeny >= 990000)) {
- mes "[Rust Blackhand]";
- mes "kkk... You prepared the ingredients well. Why don't you leave it there and wait?";
- next;
- mes "[Rust Blackhand]";
- mes "Hmm... It's been such a long time since I last saw these wicked horns... kkk... Let me start...";
- next;
- mes "...";
- next;
- mes "... ...";
- next;
- mes "... ... ...";
- next;
- delitem Bapho_Doll,1;
- delitem Magestic_Goat,1;
- delitem Dark_Crystal,30;
- delitem Dark_Debris,50;
+ mes("[Rust Blackhand]");
+ mes("Did you bring all of the ingredients?");
+ next();
+ if (countitem(Bapho_Doll) && countitem(Magestic_Goat) && countitem(Dark_Crystal) > 29 && countitem(Dark_Debris) > 49 && Zeny >= 990000) {
+ mes("[Rust Blackhand]");
+ mes("kkk... You prepared the ingredients well. Why don't you leave it there and wait?");
+ next();
+ mes("[Rust Blackhand]");
+ mes("Hmm... It's been such a long time since I last saw these wicked horns... kkk... Let me start...");
+ next();
+ mes("...");
+ next();
+ mes("... ...");
+ next();
+ mes("... ... ...");
+ next();
+ delitem(Bapho_Doll, 1);
+ delitem(Magestic_Goat, 1);
+ delitem(Dark_Crystal, 30);
+ delitem(Dark_Debris, 50);
Zeny -= 990000;
- completequest 3043;
- getitem L_Magestic_Goat,1;
- mes "[Rust Blackhand]";
- mes "It's done. You may be excited, of course. I understand...";
- next;
- mes "[Rust Blackhand]";
- mes "I don't accept complaints or A/S requests, so use it with care. I must go...";
- close;
- }
- else {
- mes "[Rust Blackhand]";
- mes "Huu... You don't understand what I said. You cannot make anything with these ingredients.";
- next;
- mes "[Rust Blackhand]";
- mes "I'll tell you the ingredients one more time, so please gather them correctly.";
- next;
- mes "[Rust Blackhand]";
- mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny.";
- close;
+ completequest(3043);
+ getitem(L_Magestic_Goat, 1);
+ mes("[Rust Blackhand]");
+ mes("It's done. You may be excited, of course. I understand...");
+ next();
+ mes("[Rust Blackhand]");
+ mes("I don't accept complaints or A/S requests, so use it with care. I must go...");
+ close();
+ } else {
+ mes("[Rust Blackhand]");
+ mes("Huu... You don't understand what I said. You cannot make anything with these ingredients.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("I'll tell you the ingredients one more time, so please gather them correctly.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny.");
+ close();
}
- }
- else if (!.@new_maje && countitem(Bapho_Doll) > 0) {
- switch(select("About the Cursed Baphomet Doll", "Stop talking.")) {
+ } else if (!.@new_maje && countitem(Bapho_Doll) > 0) {
+ switch (select("About the Cursed Baphomet Doll", "Stop talking.")) {
case 1:
- mes "[Rust Blackhand]";
- mes "What?... Hmmm... Did you get the doll? You're pretty good, unlike your appearance...";
- next;
- mes "[Rust Blackhand]";
- mes "Let me see... Needless to say, Patric must have sent you here to deal with the doll, right?";
- next;
- mes "[Rust Blackhand]";
- mes "Cool... I'll help you make the evil doll useful. What? What can I do?";
- next;
- mes "[Rust Blackhand]";
- mes "I can make the strong and large horns of the wicked devil Baphomet for you. A helm that has his immense power.";
- next;
- mes "[Rust Blackhand]";
- mes "It is called the ^4d4dffGigantic Magestic Goat^000000. You'll realize that the Magestic Goat you're familiar with is nothing in comparison.";
- next;
- mes "[Rust Blackhand]";
- mes "The Cursed Baphomet Doll is the most important ingredient... I'll make you if you want. What would you like to do?";
- next;
- switch(select("I want to make one!", "I don't need one.")) {
+ mes("[Rust Blackhand]");
+ mes("What?... Hmmm... Did you get the doll? You're pretty good, unlike your appearance...");
+ next();
+ mes("[Rust Blackhand]");
+ mes("Let me see... Needless to say, Patric must have sent you here to deal with the doll, right?");
+ next();
+ mes("[Rust Blackhand]");
+ mes("Cool... I'll help you make the evil doll useful. What? What can I do?");
+ next();
+ mes("[Rust Blackhand]");
+ mes("I can make the strong and large horns of the wicked devil Baphomet for you. A helm that has his immense power.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("It is called the ^4d4dffGigantic Magestic Goat^000000. You'll realize that the Magestic Goat you're familiar with is nothing in comparison.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("The Cursed Baphomet Doll is the most important ingredient... I'll make you if you want. What would you like to do?");
+ next();
+ switch (select("I want to make one!", "I don't need one.")) {
case 1:
- mes "[Rust Blackhand]";
- mes "kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all.";
- next;
- mes "[Rust Blackhand]";
- mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny.";
- next;
- mes "[Rust Blackhand]";
- mes "You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc.";
- next;
- mes "[Rust Blackhand]";
- mes "I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk...";
- next;
- mes "[Rust Blackhand]";
- mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.";
+ mes("[Rust Blackhand]");
+ mes("kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk...");
+ next();
+ mes("[Rust Blackhand]");
+ mes("You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.");
if (questprogress(3042))
- erasequest 3042;
- setquest 3043;
- close;
+ erasequest(3042);
+ setquest(3043);
+ close();
case 2:
- mes "[Rust Blackhand]";
- mes "Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?";
- next;
- mes "[Rust Blackhand]";
- mes "Tut, tut... I don't care if the wicked doll threatens your life all the time!";
- close;
+ mes("[Rust Blackhand]");
+ mes("Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?");
+ next();
+ mes("[Rust Blackhand]");
+ mes("Tut, tut... I don't care if the wicked doll threatens your life all the time!");
+ close();
}
case 2:
- mes "[Rust Blackhand]";
- mes "What a dull boy he is... huh...";
- close;
+ mes("[Rust Blackhand]");
+ mes("What a dull boy he is... huh...");
+ close();
}
- }
- else if (!.@new_maje && !countitem(Bapho_Doll)) {
- mes "[Rust Blackhand]";
- mes "If you don't have business with me, go away! As you see, I make equipment for the Brothers at the monastery, not for adventurers like you. Do you understand?";
- close;
- }
- else if (.@new_maje == 2 && countitem(Bapho_Doll)) {
- switch(select("About the Cursed Baphomet Doll", "Stop talking.")) {
+ } else if (!.@new_maje && !countitem(Bapho_Doll)) {
+ mes("[Rust Blackhand]");
+ mes("If you don't have business with me, go away! As you see, I make equipment for the Brothers at the monastery, not for adventurers like you. Do you understand?");
+ close();
+ } else if (.@new_maje == 2 && countitem(Bapho_Doll)) {
+ switch (select("About the Cursed Baphomet Doll", "Stop talking.")) {
case 1:
- mes "[Rust Blackhand]";
- mes "What?... You again? What do you want this time?";
- next;
- mes "[Rust Blackhand]";
- mes "What? You got another doll from the wicked devil? Umm... You're much better than I thought...";
- next;
- mes "[Rust Blackhand]";
- mes "Alright... I'll help you again.";
- next;
- mes "[Rust Blackhand]";
- mes "If you want to make the doll into a ^4d4dffGigantic Magestic Goat^000000 again, I can make you another.";
- next;
- mes "[Rust Blackhand]";
- mes "I'll tell you the ingredients again. So, do you want to make?";
- next;
- switch(select("I want.", "No, I don't want.")) {
+ mes("[Rust Blackhand]");
+ mes("What?... You again? What do you want this time?");
+ next();
+ mes("[Rust Blackhand]");
+ mes("What? You got another doll from the wicked devil? Umm... You're much better than I thought...");
+ next();
+ mes("[Rust Blackhand]");
+ mes("Alright... I'll help you again.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("If you want to make the doll into a ^4d4dffGigantic Magestic Goat^000000 again, I can make you another.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("I'll tell you the ingredients again. So, do you want to make?");
+ next();
+ switch (select("I want.", "No, I don't want.")) {
case 1:
- mes "[Rust Blackhand]";
- mes "kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all.";
- next;
- mes "[Rust Blackhand]";
- mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny.";
- next;
- mes "[Rust Blackhand]";
- mes "You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc.";
- next;
- mes "[Rust Blackhand]";
- mes "I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk...";
- next;
- mes "[Rust Blackhand]";
- mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.";
+ mes("[Rust Blackhand]");
+ mes("kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc.");
+ next();
+ mes("[Rust Blackhand]");
+ mes("I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk...");
+ next();
+ mes("[Rust Blackhand]");
+ mes("You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.");
if (questprogress(3042))
- erasequest 3042;
- erasequest 3043;
- setquest 3043;
- close;
+ erasequest(3042);
+ erasequest(3043);
+ setquest(3043);
+ close();
case 2:
- mes "[Rust Blackhand]";
- mes "Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?";
- next;
- mes "[Rust Blackhand]";
- mes "Tut, tut... I don't care if the wicked doll threatens your life all the time!";
- close;
+ mes("[Rust Blackhand]");
+ mes("Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?");
+ next();
+ mes("[Rust Blackhand]");
+ mes("Tut, tut... I don't care if the wicked doll threatens your life all the time!");
+ close();
}
case 2:
- mes "[Rust Blackhand]";
- mes "What a dull boy he is... huh...";
- close;
+ mes("[Rust Blackhand]");
+ mes("What a dull boy he is... huh...");
+ close();
}
- }
- else if (.@new_maje == 2 && !countitem(Bapho_Doll)) {
- mes "[Rust Blackhand]";
- mes "Why are you hanging around here? If you don't want a ^4d4dffGigantic Magestic Goat^000000, go away.";
- close;
+ } else if (.@new_maje == 2 && !countitem(Bapho_Doll)) {
+ mes("[Rust Blackhand]");
+ mes("Why are you hanging around here? If you don't want a ^4d4dffGigantic Magestic Goat^000000, go away.");
+ close();
}
}
@@ -437,18 +431,17 @@ prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
1@cata,1,2,0 script ins_baphomet_lotto FAKE_NPC,{
OnInstanceInit:
// Pick one "true" Gravestone and 12 "false" Gravestones.
- .@true = rand(1,13);
- for (.@i = 1; .@i <= 13; ++.@i) {
- disablenpc instance_npcname("Gravestone#1F_"+.@i+((.@i == .@true)?"T":"F"));
- }
- disablenpc instance_npcname("ins_baphomet_lotto");
+ .@true = rand(1, 13);
+ for (.@i = 1; .@i <= 13; ++.@i)
+ disablenpc(instance_npcname("Gravestone#1F_"+.@i+((.@i == .@true)?"T":"F")));
+ disablenpc(instance_npcname("ins_baphomet_lotto"));
end;
}
1@cata,3,2,0 script ins_baphomet_lotto2 FAKE_NPC,{
OnEnable:
for (.@i = 1; .@i <= 12; ++.@i)
- enablenpc instance_npcname("Bobbing Torch#"+.@i);
+ enablenpc(instance_npcname("Bobbing Torch#"+.@i));
end;
}
@@ -456,33 +449,32 @@ OnEnable:
OnEnable:
.@label$ = instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead";
.@map$ = instance_mapname("1@cata");
- monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1132,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1117,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1132,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1117,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1132,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1117,1,.@label$;
- monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), WRAITH_DEAD, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), WRAITH_DEAD, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), WRAITH_DEAD, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), KHALITZBURG, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), EVIL_DRUID, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), KHALITZBURG, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), EVIL_DRUID, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), KHALITZBURG, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), WRAITH_DEAD, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), EVIL_DRUID, 1, .@label$);
+ monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$);
end;
OnDisable:
- killmonster instance_mapname("1@cata"),instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead";
+ killmonster(instance_mapname("1@cata"), instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("1@cata");
- if (mobcount(.@map$,instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead") < 1) {
- mapannounce .@map$, "All apostles of Baphomet are dead!",bc_map,"0x00ff99";
- }
- getitem Token_Of_Apostle,1;
+ if (mobcount(.@map$, instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead") < 1)
+ mapannounce(.@map$, _("All apostles of Baphomet are dead!"), bc_map, C_SPRINGGREEN);
+ getitem(Token_Of_Apostle, 1);
end;
}
@@ -490,102 +482,98 @@ OnMyMobDead:
1@cata,141,221,0 script Gravestone# CLEAR_NPC,3,3,{
.@party_id = getcharid(CHAR_ID_PARTY);
if ('ins_baphomet == 0) {
- mes "The gravestone is trembling...";
- next;
- mes "When touching the gravestone, I hear a voice.";
- next;
+ mes("The gravestone is trembling...");
+ next();
+ mes("When touching the gravestone, I hear a voice.");
+ next();
specialeffect(EF_CONE, AREA, playerattached());
- mes "[Voice of the Gravestone]";
- mes "I have waited and waited for a brave adventurer like you who will come back here again...";
- next;
- while(1) {
- switch(select("Who are you?", "Waited for me?", "Cancel.")) {
+ mes("[Voice of the Gravestone]");
+ mes("I have waited and waited for a brave adventurer like you who will come back here again...");
+ next();
+ while (true) {
+ switch (select("Who are you?", "Waited for me?", "Cancel.")) {
case 1:
- mes "[Voice of the Gravestone]";
- mes "I was one of the warriors to stop Baphomet like you. Now, I'm dead and only my soul remains...";
- next;
- mes "[Voice of the Gravestone]";
- mes "As you know... We don't have much time. You can't stop Baphomet by yourselves. The power of the devil has strengthened over the years.";
- next;
- mes "[Voice of the Gravestone]";
- mes "In the past, my companions and I sealed Baphomet at the altar located on the 2nd basement and blocked the entrance.";
- next;
- mes "[Voice of the Gravestone]";
- mes "I moved my soul's essence to my pendant, so that I could remain in this world. That's when I became this grave's guardian.";
- next;
+ mes("[Voice of the Gravestone]");
+ mes("I was one of the warriors to stop Baphomet like you. Now, I'm dead and only my soul remains...");
+ next();
+ mes("[Voice of the Gravestone]");
+ mes("As you know... We don't have much time. You can't stop Baphomet by yourselves. The power of the devil has strengthened over the years.");
+ next();
+ mes("[Voice of the Gravestone]");
+ mes("In the past, my companions and I sealed Baphomet at the altar located on the 2nd basement and blocked the entrance.");
+ next();
+ mes("[Voice of the Gravestone]");
+ mes("I moved my soul's essence to my pendant, so that I could remain in this world. That's when I became this grave's guardian.");
+ next();
break;
case 2:
- mes "[Voice of the Gravestone]";
- mes "Baphomet's power is about to break the seal that we made. If you don't reactivate them... Baphomet's revival will only be a matter of time.";
- next;
- mes "[Voice of the Gravestone]";
- mes "To open the entrance, you must substantialize my soul. I'll open the entrance and reactivate the weakened seals after I am substantilized.";
- next;
- mes "[Voice of the Gravestone]";
- mes "To substantialize my soul, you should find my pendant. You can find my body near a grave here.";
- next;
- mes "[Voice of the Gravestone]";
- mes "If your ^0000FFparty leader^000000 brings me the pendant, my soul can be substantialized. So, hurry up.";
+ mes("[Voice of the Gravestone]");
+ mes("Baphomet's power is about to break the seal that we made. If you don't reactivate them... Baphomet's revival will only be a matter of time.");
+ next();
+ mes("[Voice of the Gravestone]");
+ mes("To open the entrance, you must substantialize my soul. I'll open the entrance and reactivate the weakened seals after I am substantilized.");
+ next();
+ mes("[Voice of the Gravestone]");
+ mes("To substantialize my soul, you should find my pendant. You can find my body near a grave here.");
+ next();
+ mes("[Voice of the Gravestone]");
+ mes("If your ^0000FFparty leader^000000 brings me the pendant, my soul can be substantialized. So, hurry up.");
'ins_baphomet = 1;
- close;
+ close();
case 3:
- mes "I can feel the voice becoming faint.";
- close;
+ mes("I can feel the voice becoming faint.");
+ close();
}
}
- }
- else if ('ins_baphomet == 1) {
- mes "[Voice of the Gravestone]";
- mes "To open the entrance, you must substantialize my soul. I'll open the entrance and reactivate the weakened seals after I am substantilized.";
- next;
- mes "[Voice of the Gravestone]";
- mes "To substantialize my soul, you should find my pendant. You can find my body near a grave here.";
- next;
- mes "[Voice of the Gravestone]";
- mes "If your ^0000FFparty leader^000000 brings me the pendant, my soul can be substantialized. So, hurry up.";
- close;
- }
- else if (('ins_baphomet == 2) && (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR))) {
- mes "[Voice of the Gravestone]";
- mes "Did you find the pendant?";
- next;
+ } else if ('ins_baphomet == 1) {
+ mes("[Voice of the Gravestone]");
+ mes("To open the entrance, you must substantialize my soul. I'll open the entrance and reactivate the weakened seals after I am substantilized.");
+ next();
+ mes("[Voice of the Gravestone]");
+ mes("To substantialize my soul, you should find my pendant. You can find my body near a grave here.");
+ next();
+ mes("[Voice of the Gravestone]");
+ mes("If your ^0000FFparty leader^000000 brings me the pendant, my soul can be substantialized. So, hurry up.");
+ close();
+ } else if ('ins_baphomet == 2 && getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) {
+ mes("[Voice of the Gravestone]");
+ mes("Did you find the pendant?");
+ next();
if (countitem(Soul_Pendant) > 0) {
- specialeffect EF_MAPPILLAR;
- mes "[Voice of the Gravestone]";
- mes "Yes... This is... My pendant...";
- next;
- delitem Soul_Pendant,1;
- enablenpc instance_npcname("Ancient Hero's Soul#1F");
- disablenpc instance_npcname("Gravestone#");
- mes "[Voice of the Gravestone]";
- mes "Now I can substantialize my soul. I'll wait for you in front of the altar of fire located at the center of this grave. Let's meet there.";
- next;
- mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : I'll wait for you in front of the altar of fire located at the center",bc_map,"0xFFFF00";
- mes "I can feel the voice becoming faint.";
- close;
- }
- else {
- mes "[Voice of the Gravestone]";
- mes "Are you still there? Bring back my pendant as soon as possible.";
- next;
- mes "[Voice of the Gravestone]";
- mes "You can find my body near a grave here. Go and get my pendant there.";
- close;
+ specialeffect(EF_MAPPILLAR);
+ mes("[Voice of the Gravestone]");
+ mes("Yes... This is... My pendant...");
+ next();
+ delitem(Soul_Pendant, 1);
+ enablenpc(instance_npcname("Ancient Hero's Soul#1F"));
+ disablenpc(instance_npcname("Gravestone#"));
+ mes("[Voice of the Gravestone]");
+ mes("Now I can substantialize my soul. I'll wait for you in front of the altar of fire located at the center of this grave. Let's meet there.");
+ next();
+ mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : I'll wait for you in front of the altar of fire located at the center"), bc_map, C_YELLOW);
+ mes("I can feel the voice becoming faint.");
+ close();
+ } else {
+ mes("[Voice of the Gravestone]");
+ mes("Are you still there? Bring back my pendant as soon as possible.");
+ next();
+ mes("[Voice of the Gravestone]");
+ mes("You can find my body near a grave here. Go and get my pendant there.");
+ close();
}
- }
- else {
- mes "[Voice of the Gravestone]";
- mes "I want to talk to ^0000FFa representative among your party^000000. Everyone else, wait here.";
- close;
+ } else {
+ mes("[Voice of the Gravestone]");
+ mes("I want to talk to ^0000FFa representative among your party^000000. Everyone else, wait here.");
+ close();
}
end;
OnTouch:
if ('ins_baphomet == 0) {
- mes "'Krrrr... Krrrr...'";
- next;
- mes "I can feel something odd at the grave. It's like someone is calling out silently...";
- close;
+ mes("'Krrrr... Krrrr...'");
+ next();
+ mes("I can feel something odd at the grave. It's like someone is calling out silently...");
+ close();
}
end;
@@ -596,220 +584,210 @@ OnInstanceInit: // Temporary fix for @reloadscript.
1@cata,176,119,4 script Ancient Hero's Soul#1F 4_M_CHAMPSOUL,{
.@party_id = getcharid(CHAR_ID_PARTY);
- cutin "ins_cata_champ_n",2;
+ cutin("ins_cata_champ_n", 2);
if ('ins_baphomet == 2) {
- mes "[Ancient Hero's Soul]";
- mes "With your help, my soul can be substantialized. I want to talk more, but we do not have enough time...";
- next;
- mes "[Ancient Hero's Soul]";
- mes "I must be substantialized within the next hour. To reach the Main Altar underground, you must help me perform the ceremony for opening each seal.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Now I'll tell you what should you do. First, collect ^0000FFEssence of Fire^000000 from the torches on the graves...";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Second, all members who will enter the underground must carry a symbol, called the Token of Apostle.";
- next;
- while(1) {
- cutin "ins_cata_champ_n",2;
- switch(select("What is Essence of Fire?", "What is a Token of Apostle?", "What should I do?", "I am ready.")) {
+ mes("[Ancient Hero's Soul]");
+ mes("With your help, my soul can be substantialized. I want to talk more, but we do not have enough time...");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("I must be substantialized within the next hour. To reach the Main Altar underground, you must help me perform the ceremony for opening each seal.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Now I'll tell you what should you do. First, collect ^0000FFEssence of Fire^000000 from the torches on the graves...");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Second, all members who will enter the underground must carry a symbol, called the Token of Apostle.");
+ next();
+ while (true) {
+ cutin("ins_cata_champ_n", 2);
+ switch (select("What is Essence of Fire?", "What is a Token of Apostle?", "What should I do?", "I am ready.")) {
case 1:
++.@ins_baphomet_1f_1;
- mes "[Ancient Hero's Soul]";
- mes "You can see the torches here and there. These torches are the essence of Thor, the god of Thunder. They are inherited from our predecessors to stop the darkness of Baphomet...";
- next;
- mes "[Ancient Hero's Soul]";
- mes "To open the sealed underground gate, I must be purified by the ^0000FFEssence of Fire^000000 which has the power of Thor. Collect ^0000FF10 Essence of Fire^000000 from the torches.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "One thing you must remember is... ^0000FFEssence of Fire^000000 can only be collected by the Inheritor of Faith.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "I'll give the token of the Inheritor of Faith to the party leader. Only the party leader can collect the ^0000FFEssence of Fire^000000.";
- next;
+ mes("[Ancient Hero's Soul]");
+ mes("You can see the torches here and there. These torches are the essence of Thor, the god of Thunder. They are inherited from our predecessors to stop the darkness of Baphomet...");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("To open the sealed underground gate, I must be purified by the ^0000FFEssence of Fire^000000 which has the power of Thor. Collect ^0000FF10 Essence of Fire^000000 from the torches.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("One thing you must remember is... ^0000FFEssence of Fire^000000 can only be collected by the Inheritor of Faith.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("I'll give the token of the Inheritor of Faith to the party leader. Only the party leader can collect the ^0000FFEssence of Fire^000000.");
+ next();
break;
case 2:
++.@ins_baphomet_1f_2;
- mes "[Ancient Hero's Soul]";
- mes "At that time, it was impossible to get rid of Devil Baphomet by ourselves. After numerous heroes sacrificed their lives, we could barely seal him under this Abbey.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "However, Baphomet never gave up. He continuously strengthened his power. And his power has brought new life to this shrine.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Some of these monsters have magical powers. Baphomet calls them his 'Apostles'.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "The apostles are cloning themselves to fill the shrine with their evil energy. They are the monsters here in this catacomb.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Kill the Apostles. They can only be distinguished from their clones because they will possess a ^0000FFToken of Apostle^000000...";
- next;
- mes "[Ancient Hero's Soul]";
- mes "If each party member possesses a ^0000FFToken of Apostle^000000, Baphomet will not be able to perceive your entrance to the Main Altar underground.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "If Baphomet perceives you when you pass through the sealed gate, he may release his tremendous magical power. Then, this abbey will be demolished.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Kill the apostles and get the ^0000FFToken of Apostle^000000.";
- next;
+ mes("[Ancient Hero's Soul]");
+ mes("At that time, it was impossible to get rid of Devil Baphomet by ourselves. After numerous heroes sacrificed their lives, we could barely seal him under this Abbey.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("However, Baphomet never gave up. He continuously strengthened his power. And his power has brought new life to this shrine.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Some of these monsters have magical powers. Baphomet calls them his 'Apostles'.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("The apostles are cloning themselves to fill the shrine with their evil energy. They are the monsters here in this catacomb.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Kill the Apostles. They can only be distinguished from their clones because they will possess a ^0000FFToken of Apostle^000000...");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("If each party member possesses a ^0000FFToken of Apostle^000000, Baphomet will not be able to perceive your entrance to the Main Altar underground.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("If Baphomet perceives you when you pass through the sealed gate, he may release his tremendous magical power. Then, this abbey will be demolished.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Kill the apostles and get the ^0000FFToken of Apostle^000000.");
+ next();
break;
case 3:
++.@ins_baphomet_1f_3;
- if (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR)) {
- mes "[Ancient Hero's Soul]";
- mes "You look like the leader of this party. You need to go and get ^0000FF10 Essence of Fire^000000 from the torches.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Now I'll carve you the symbol which shows you're a inheritor of faith. Be aware that no one in your party but you can collect the Essence of Fire.";
- next;
+ if (getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) {
+ mes("[Ancient Hero's Soul]");
+ mes("You look like the leader of this party. You need to go and get ^0000FF10 Essence of Fire^000000 from the torches.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Now I'll carve you the symbol which shows you're a inheritor of faith. Be aware that no one in your party but you can collect the Essence of Fire.");
+ next();
specialeffect(EF_HOLYHIT, AREA, playerattached());
- mes "[Ancient Hero's Soul]";
- mes "You should also carry a ^0000FFToken of Apostle^000000, so find one for yourself too.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "When all of you are ready to go, let me know. I'll open the sealed gate when you're ready.";
- next;
- }
- else {
- mes "[Ancient Hero's Soul]";
- mes "Make sure that your party leader has listened to my explanation of what you and your companions must do.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Kill the Apostles of Baphomet and find their ^0000FFToken of Apostle^000000.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "It might be better to kill all of them because there is no way to differentiate them from their clones.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Are you ready?";
- mes "Make sure that you have listened to all that I have to say before saying that you are ready.";
- next;
+ mes("[Ancient Hero's Soul]");
+ mes("You should also carry a ^0000FFToken of Apostle^000000, so find one for yourself too.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("When all of you are ready to go, let me know. I'll open the sealed gate when you're ready.");
+ next();
+ } else {
+ mes("[Ancient Hero's Soul]");
+ mes("Make sure that your party leader has listened to my explanation of what you and your companions must do.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Kill the Apostles of Baphomet and find their ^0000FFToken of Apostle^000000.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("It might be better to kill all of them because there is no way to differentiate them from their clones.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Are you ready?");
+ mes("Make sure that you have listened to all that I have to say before saying that you are ready.");
+ next();
}
break;
case 4:
- if ((.@ins_baphomet_1f_1 > 0) && (.@ins_baphomet_1f_2 > 0) && (.@ins_baphomet_1f_3 > 0)) {
- cutin "ins_cata_champ_n",2;
- mes "[Ancient Hero's Soul]";
- mes "Are you ready to go? Then I'll open this sealed gate now.";
- next;
+ if (.@ins_baphomet_1f_1 > 0 && .@ins_baphomet_1f_2 > 0 && .@ins_baphomet_1f_3 > 0) {
+ cutin("ins_cata_champ_n", 2);
+ mes("[Ancient Hero's Soul]");
+ mes("Are you ready to go? Then I'll open this sealed gate now.");
+ next();
.@exitloop = 1;
- }
- else {
- cutin "ins_cata_champ_a",2;
- mes "[Ancient Hero's Soul]";
- mes "It may be difficult but I wish you luck braving the perils of this catacomb.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Remember, you need to collect ^0000FF10 Essence of Fire^000000 from the torches and the ^0000FFToken of Apostle^000000 from the Apostles of Baphomet.";
- next;
+ } else {
+ cutin("ins_cata_champ_a", 2);
+ mes("[Ancient Hero's Soul]");
+ mes("It may be difficult but I wish you luck braving the perils of this catacomb.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Remember, you need to collect ^0000FF10 Essence of Fire^000000 from the torches and the ^0000FFToken of Apostle^000000 from the Apostles of Baphomet.");
+ next();
}
break;
}
- if (.@exitloop) break;
+ if (.@exitloop)
+ break;
}
- if (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR)) {
- mes "[Ancient Hero's Soul]";
- mes "To remind you again, I must be substantialized within the next hour. So everyone, finish your work within that time!";
+ if (getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) {
+ mes("[Ancient Hero's Soul]");
+ mes("To remind you again, I must be substantialized within the next hour. So everyone, finish your work within that time!");
'ins_baphomet = 3;
- donpcevent instance_npcname("ins_baphomet_1f_timer")+"::OnEnable";
- donpcevent instance_npcname("ins_baphomet_lotto2")+"::OnEnable";
- donpcevent instance_npcname("ins_baphomet_lotto3")+"::OnEnable";
- }
- else {
- mes "[Ancient Hero's Soul]";
- mes "To remind you again, I can be substantialized for the next hour. So everyone, finish your work within that time.";
+ donpcevent(instance_npcname("ins_baphomet_1f_timer")+"::OnEnable");
+ donpcevent(instance_npcname("ins_baphomet_lotto2")+"::OnEnable");
+ donpcevent(instance_npcname("ins_baphomet_lotto3")+"::OnEnable");
+ } else {
+ mes("[Ancient Hero's Soul]");
+ mes("To remind you again, I can be substantialized for the next hour. So everyone, finish your work within that time.");
//'ins_baphomet = 3;
}
- close2;
- cutin "",255;
+ close2();
+ cutin("", 255);
end;
- }
- else if (('ins_baphomet == 3) && (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR))) {
- cutin "ins_cata_champ_n",2;
- mes "[Ancient Hero's Soul]";
- mes "Did you get 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000?";
- next;
- if ((countitem(Essence_Of_Fire) > 9) && (countitem(Token_Of_Apostle) > 0)) {
- delitem Essence_Of_Fire,countitem(Essence_Of_Fire);
+ } else if ('ins_baphomet == 3 && getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) {
+ cutin("ins_cata_champ_n", 2);
+ mes("[Ancient Hero's Soul]");
+ mes("Did you get 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000?");
+ next();
+ if (countitem(Essence_Of_Fire) > 9 && countitem(Token_Of_Apostle) > 0) {
+ delitem(Essence_Of_Fire, countitem(Essence_Of_Fire));
'ins_baphomet = 4;
- mes "[Ancient Hero's Soul]";
- mes "Okay. You've done your work. Now check your companions and tell me when everyone has finished their work.";
- }
- else {
- mes "[Ancient Hero's Soul]";
- mes "Not ready yet? You should prepare 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000.";
+ mes("[Ancient Hero's Soul]");
+ mes("Okay. You've done your work. Now check your companions and tell me when everyone has finished their work.");
+ } else {
+ mes("[Ancient Hero's Soul]");
+ mes("Not ready yet? You should prepare 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000.");
}
- close2;
- cutin "",255;
+ close2();
+ cutin("", 255);
end;
- }
- else if ('ins_baphomet == 3) {
- cutin "ins_cata_champ_n",2;
- mes "[Ancient Hero's Soul]";
- mes "Do you have a ^0000FFToken of Apostle^000000?";
- next;
+ } else if ('ins_baphomet == 3) {
+ cutin("ins_cata_champ_n", 2);
+ mes("[Ancient Hero's Soul]");
+ mes("Do you have a ^0000FFToken of Apostle^000000?");
+ next();
if (countitem(Token_Of_Apostle) > 0) {
'ins_baphomet = 4;
- mes "[Ancient Hero's Soul]";
- mes "Okay. You've done your work. Tell your representative to check your companions and come to me when everyone has finished their work.";
- }
- else {
- mes "[Ancient Hero's Soul]";
- mes "Not ready yet? You should prepare ^0000FFToken of Apostle^000000.";
+ mes("[Ancient Hero's Soul]");
+ mes("Okay. You've done your work. Tell your representative to check your companions and come to me when everyone has finished their work.");
+ } else {
+ mes("[Ancient Hero's Soul]");
+ mes("Not ready yet? You should prepare ^0000FFToken of Apostle^000000.");
}
- close2;
- cutin "",255;
+ close2();
+ cutin("", 255);
end;
- }
- else if (('ins_baphomet == 4) && (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR))) {
- cutin "ins_cata_champ_n",2;
- mes "[Ancient Hero's Soul]";
- mes "Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000.";
- next;
+ } else if ('ins_baphomet == 4 && getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) {
+ cutin("ins_cata_champ_n", 2);
+ mes("[Ancient Hero's Soul]");
+ mes("Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000.");
+ next();
'ins_baphomet = 5;
- specialeffect EF_TELEPORTATION;
- enablenpc instance_npcname("ins_bapho_to_2f");
- mes "[Ancient Hero's Soul]";
- mes "Now you can go to the main altar. It is located in the bottom right corner of this floor.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Your real battle will begin... I'll follow you soon and find a way to help you.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "Go ahead, warriors.";
- cutin "",255;
- mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : Now you can go to the Main Altar's gate. It is located in the Southeast",bc_map,"0xFFFF00";
- close;
- }
- else if ('ins_baphomet == 4) {
- cutin "ins_cata_champ_n",2;
- mes "[Ancient Hero's Soul]";
- mes "Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "I'll complete opening the sealed gate when your representative tells me that you're ready.";
- cutin "",255;
- close;
- }
- else if ('ins_baphomet == 5) {
- cutin "ins_cata_champ_n",2;
- mes "[Ancient Hero's Soul]";
- mes "What are you doing? The entrance of the main altar is opened now, go and fight! The entrance is near the bottom right side of this floor.";
- cutin "",255;
- close;
- }
- else {
- cutin "ins_cata_champ_n",2;
- mes "[Ancient Hero's Soul]";
- mes "I have nothing to say to you...";
- cutin "",255;
- close;
+ specialeffect(EF_TELEPORTATION);
+ enablenpc(instance_npcname("ins_bapho_to_2f"));
+ mes("[Ancient Hero's Soul]");
+ mes("Now you can go to the main altar. It is located in the bottom right corner of this floor.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Your real battle will begin... I'll follow you soon and find a way to help you.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("Go ahead, warriors.");
+ cutin("", 255);
+ mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : Now you can go to the Main Altar's gate. It is located in the Southeast"), bc_map, C_YELLOW);
+ close();
+ } else if ('ins_baphomet == 4) {
+ cutin("ins_cata_champ_n", 2);
+ mes("[Ancient Hero's Soul]");
+ mes("Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("I'll complete opening the sealed gate when your representative tells me that you're ready.");
+ cutin("", 255);
+ close();
+ } else if ('ins_baphomet == 5) {
+ cutin("ins_cata_champ_n", 2);
+ mes("[Ancient Hero's Soul]");
+ mes("What are you doing? The entrance of the main altar is opened now, go and fight! The entrance is near the bottom right side of this floor.");
+ cutin("", 255);
+ close();
+ } else {
+ cutin("ins_cata_champ_n", 2);
+ mes("[Ancient Hero's Soul]");
+ mes("I have nothing to say to you...");
+ cutin("", 255);
+ close();
}
OnInstanceInit:
- disablenpc instance_npcname("Ancient Hero's Soul#1F");
+ disablenpc(instance_npcname("Ancient Hero's Soul#1F"));
end;
}
@@ -817,38 +795,37 @@ OnInstanceInit:
1@cata,281,12,0 script ins_bapho_to_2f WARPNPC,1,1,{
OnTouch:
if (countitem(Token_Of_Apostle) > 0) {
- delitem Token_Of_Apostle,countitem(Token_Of_Apostle);
+ delitem(Token_Of_Apostle, countitem(Token_Of_Apostle));
'ins_baphomet = 5;
- warp instance_mapname("2@cata"),80,144;
+ warp(instance_mapname("2@cata"), 80, 144);
end;
- }
- else {
- mes "[Ancient Hero's Soul]";
- mes "Where is your Token of Apostle? I said you should carry the Token of Apostle to pass this gate.";
- close;
+ } else {
+ mes("[Ancient Hero's Soul]");
+ mes("Where is your Token of Apostle? I said you should carry the Token of Apostle to pass this gate.");
+ close();
}
OnInstanceInit:
- disablenpc instance_npcname("ins_bapho_to_2f");
+ disablenpc(instance_npcname("ins_bapho_to_2f"));
end;
}
//== Gravestones ===========================================
- script Gravestone#SS1 FAKE_NPC,{
if ('ins_baphomet == 1) {
- getitem Soul_Pendant,1;
+ getitem(Soul_Pendant, 1);
'ins_baphomet = 2;
- mes "A small object is shining under a leaning grave.";
- next;
- mes "[" + strcharinfo(PC_NAME) + "]";
- mes "I think this is the pendant...";
- close;
- }
- else {
- mes "I can only feel gloom from this Gravestone.";
- close;
+ mes("A small object is shining under a leaning grave.");
+ next();
+ mesf("[%s]", strcharinfo(PC_NAME));
+ mes("I think this is the pendant...");
+ close();
+ } else {
+ mes("I can only feel gloom from this Gravestone.");
+ close();
}
}
+
1@cata,86,214,0 duplicate(Gravestone#SS1) Gravestone#1F_1T CLEAR_NPC
1@cata,200,209,0 duplicate(Gravestone#SS1) Gravestone#1F_2T CLEAR_NPC
1@cata,230,195,0 duplicate(Gravestone#SS1) Gravestone#1F_3T CLEAR_NPC
@@ -864,9 +841,10 @@ OnInstanceInit:
1@cata,267,30,0 duplicate(Gravestone#SS1) Gravestone#1F_13T CLEAR_NPC
- script Gravestone#SS2 FAKE_NPC,{
- mes "I can only feel gloom from this Gravestone.";
- close;
+ mes("I can only feel gloom from this Gravestone.");
+ close();
}
+
1@cata,86,214,0 duplicate(Gravestone#SS2) Gravestone#1F_1F CLEAR_NPC
1@cata,200,209,0 duplicate(Gravestone#SS2) Gravestone#1F_2F CLEAR_NPC
1@cata,230,195,0 duplicate(Gravestone#SS2) Gravestone#1F_3F CLEAR_NPC
@@ -884,41 +862,39 @@ OnInstanceInit:
//== Bobbing Torches =======================================
- script Bobbing Torch#SS FAKE_NPC,{
.@party_id = getcharid(CHAR_ID_PARTY);
- if (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR)) {
- if (('ins_baphomet == 3) && (countitem(Essence_Of_Fire) < 11)) {
- mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
- next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
- next;
+ if (getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) {
+ if ('ins_baphomet == 3 && countitem(Essence_Of_Fire) < 11) {
+ mes("A huge torch appearing as if it can burn everything is bobbing up and down in front of me.");
+ next();
+ mes("The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.");
+ next();
specialeffect(EF_HOLYHIT, AREA, playerattached());
- getitem Essence_Of_Fire,1;
- mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
- disablenpc instance_npcname(strnpcinfo(NPC_NAME));
- close;
- }
- else if (('ins_baphomet == 3) && (countitem(Essence_Of_Fire) > 10)) {
- mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
- close;
- }
- else {
- mes "You don't need to collect Essence of Fire anymore.";
- close;
+ getitem(Essence_Of_Fire, 1);
+ mes("The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.");
+ disablenpc(instance_npcname(strnpcinfo(NPC_NAME)));
+ close();
+ } else if ('ins_baphomet == 3 && countitem(Essence_Of_Fire) > 10) {
+ mes("You have 10 Essence of Fire already, so you don't need to collect any more.");
+ close();
+ } else {
+ mes("You don't need to collect Essence of Fire anymore.");
+ close();
}
- }
- else {
- mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
- next;
- mes "[Unknown Voice]";
- mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
+ } else {
+ mes("A huge torch appearing as if it can burn everything is bobbing up and down in front of me..");
+ next();
+ mes("[Unknown Voice]");
+ mes("You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.");
specialeffect(EF_FIRESPLASHHIT, AREA, playerattached());
- percentheal -50,0;
- close;
+ percentheal(-50, 0);
+ close();
}
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(NPC_NAME));
+ disablenpc(instance_npcname(strnpcinfo(NPC_NAME)));
end;
}
+
1@cata,267,210,0 duplicate(Bobbing Torch#SS) Bobbing Torch#1 CLEAR_NPC
1@cata,85,182,0 duplicate(Bobbing Torch#SS) Bobbing Torch#2 CLEAR_NPC
1@cata,267,154,0 duplicate(Bobbing Torch#SS) Bobbing Torch#3 CLEAR_NPC
@@ -934,186 +910,193 @@ OnInstanceInit:
1@cata,1,1,0 script ins_baphomet_1f_timer FAKE_NPC,{
OnInstanceInit:
- disablenpc instance_npcname("ins_baphomet_1f_timer");
+ disablenpc(instance_npcname("ins_baphomet_1f_timer"));
end;
OnEnable:
- enablenpc instance_npcname("ins_baphomet_1f_timer");
- initnpctimer;
+ enablenpc(instance_npcname("ins_baphomet_1f_timer"));
+ initnpctimer();
end;
OnDisable:
- disablenpc instance_npcname("ins_baphomet_1f_timer");
- stopnpctimer;
+ disablenpc(instance_npcname("ins_baphomet_1f_timer"));
+ stopnpctimer();
end;
OnTimer1800000:
- mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : We don't have enough time! Hurry up!",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : We don't have enough time! Hurry up!"), bc_map, C_YELLOW);
end;
OnTimer2400000:
- mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : My body is disappearing... Hurry up!",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : My body is disappearing... Hurry up!"), bc_map, C_YELLOW);
end;
OnTimer3000000:
- mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : Everything is over... There is no other way but to wait for the next chance...",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : Everything is over... There is no other way but to wait for the next chance..."), bc_map, C_YELLOW);
end;
OnTimer3050000:
- mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : We failed... However... We still have a chance. I hope you will train yourselves until the time comes.",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : We failed... However... We still have a chance. I hope you will train yourselves until the time comes."), bc_map, C_YELLOW);
end;
OnTimer3100000:
- mapannounce instance_mapname("1@cata"), "You've failed to open the seal of main altar.",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("1@cata"), _("You've failed to open the seal of main altar."), bc_map, C_YELLOW);
end;
OnTimer3500000:
- instance_warpall "monk_test",310,150;
- stopnpctimer;
+ instance_warpall("monk_test", 310, 150);
+ stopnpctimer();
end;
}
2@cata,80,144,0 script ins_2f_enter FAKE_NPC,3,3,{
OnTouch:
- donpcevent instance_npcname("ins_2f_enter_broad")+"::OnEnable";
- disablenpc instance_npcname("ins_2f_enter");
+ donpcevent(instance_npcname("ins_2f_enter_broad")+"::OnEnable");
+ disablenpc(instance_npcname("ins_2f_enter"));
end;
}
2@cata,1,1,0 script ins_2f_enter_broad FAKE_NPC,{
OnInstanceInit:
OnDisable:
- disablenpc instance_npcname("ins_2f_enter_broad");
+ disablenpc(instance_npcname("ins_2f_enter_broad"));
end;
OnEnable:
- enablenpc instance_npcname("ins_2f_enter_broad");
- initnpctimer;
+ enablenpc(instance_npcname("ins_2f_enter_broad"));
+ initnpctimer();
end;
OnTimer10000:
- mapannounce instance_mapname("2@cata"), "Baphomet : Humans... interfering again...",bc_map,"0xdb7093";
+ mapannounce(instance_mapname("2@cata"), _("Baphomet : Humans... interfering again..."), bc_map, "0xdb7093");
end;
OnTimer13000:
- mapannounce instance_mapname("2@cata"), "Apostle of Baphomet : Humans! Humans have invaded our sanctum!",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Apostle of Baphomet : Humans! Humans have invaded our sanctum!"), bc_map, C_YELLOW);
end;
OnTimer16000:
- mapannounce instance_mapname("2@cata"), "Apostle of Baphomet : Kill the humans! Do not stop the revival of our Master!",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Apostle of Baphomet : Kill the humans! Do not stop the revival of our Master!"), bc_map, C_YELLOW);
end;
OnTimer18000:
- mapannounce instance_mapname("2@cata"), "Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us!",bc_map,"0xFFFF00";
- stopnpctimer;
- disablenpc instance_npcname("ins_2f_enter_broad");
+ mapannounce(instance_mapname("2@cata"), _("Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us!"), bc_map, C_YELLOW);
+ stopnpctimer();
+ disablenpc(instance_npcname("ins_2f_enter_broad"));
end;
}
2@cata,50,67,0 script slave_left FAKE_NPC,5,5,{
OnTouch:
.@map$ = instance_mapname("2@cata");
- mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
- monster .@map$,55,67,"Apostle of Baphomet",1869,1;
- monster .@map$,51,67,"Apostle of Baphomet",1291,1;
- monster .@map$,58,67,"Apostle of Baphomet",1292,1;
- monster .@map$,53,67,"Apostle of Baphomet",1291,1;
- monster .@map$,54,67,"Apostle of Baphomet",1869,1;
- monster .@map$,55,67,"Apostle of Baphomet",1291,1;
- monster .@map$,56,67,"Apostle of Baphomet",1117,1;
- monster .@map$,58,66,"Apostle of Baphomet",1869,1;
- monster .@map$,56,66,"Apostle of Baphomet",1117,1;
- monster .@map$,60,66,"Apostle of Baphomet",1132,1;
- monster .@map$,59,66,"Apostle of Baphomet",1117,1;
- monster .@map$,54,66,"Apostle of Baphomet",1132,1;
- monster .@map$,55,66,"Apostle of Baphomet",1292,1;
- monster .@map$,56,66,"Apostle of Baphomet",1132,1;
- monster .@map$,50,65,"Apostle of Baphomet",1867,1;
- monster .@map$,61,65,"Apostle of Baphomet",1292,1;
- disablenpc instance_npcname("slave_left");
+ mapannounce(.@map$, _("Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!"), bc_map, C_YELLOW);
+ monster(.@map$, 55, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1);
+ monster(.@map$, 51, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1);
+ monster(.@map$, 58, 67, _("Apostle of Baphomet"), MINI_DEMON, 1);
+ monster(.@map$, 53, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1);
+ monster(.@map$, 54, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1);
+ monster(.@map$, 55, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1);
+ monster(.@map$, 56, 67, _("Apostle of Baphomet"), EVIL_DRUID, 1);
+ monster(.@map$, 58, 66, _("Apostle of Baphomet"), FLAME_SKULL, 1);
+ monster(.@map$, 56, 66, _("Apostle of Baphomet"), EVIL_DRUID, 1);
+ monster(.@map$, 60, 66, _("Apostle of Baphomet"), KHALITZBURG, 1);
+ monster(.@map$, 59, 66, _("Apostle of Baphomet"), EVIL_DRUID, 1);
+ monster(.@map$, 54, 66, _("Apostle of Baphomet"), KHALITZBURG, 1);
+ monster(.@map$, 55, 66, _("Apostle of Baphomet"), MINI_DEMON, 1);
+ monster(.@map$, 56, 66, _("Apostle of Baphomet"), KHALITZBURG, 1);
+ monster(.@map$, 50, 65, _("Apostle of Baphomet"), BANSHEE, 1);
+ monster(.@map$, 61, 65, _("Apostle of Baphomet"), MINI_DEMON, 1);
+ disablenpc(instance_npcname("slave_left"));
end;
}
2@cata,109,67,0 script slave_right FAKE_NPC,5,5,{
OnTouch:
.@map$ = instance_mapname("2@cata");
- mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
- monster .@map$,105,67,"Apostle of Baphomet",1869,1;
- monster .@map$,104,67,"Apostle of Baphomet",1291,1;
- monster .@map$,107,67,"Apostle of Baphomet",1869,1;
- monster .@map$,106,67,"Apostle of Baphomet",1291,1;
- monster .@map$,102,67,"Apostle of Baphomet",1869,1;
- monster .@map$,103,67,"Apostle of Baphomet",1291,1;
- monster .@map$,103,67,"Apostle of Baphomet",1117,1;
- monster .@map$,109,66,"Apostle of Baphomet",1117,1;
- monster .@map$,108,66,"Apostle of Baphomet",1132,1;
- monster .@map$,101,66,"Apostle of Baphomet",1117,1;
- monster .@map$,106,66,"Apostle of Baphomet",1292,1;
- monster .@map$,102,66,"Apostle of Baphomet",1132,1;
- monster .@map$,104,66,"Apostle of Baphomet",1292,1;
- monster .@map$,103,66,"Apostle of Baphomet",1132,1;
- monster .@map$,109,65,"Apostle of Baphomet",1867,1;
- monster .@map$,108,65,"Apostle of Baphomet",1292,1;
- disablenpc instance_npcname("slave_right");
+ mapannounce(.@map$, _("Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!"), bc_map, C_YELLOW);
+ monster(.@map$, 105, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1);
+ monster(.@map$, 104, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1);
+ monster(.@map$, 107, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1);
+ monster(.@map$, 106, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1);
+ monster(.@map$, 102, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1);
+ monster(.@map$, 103, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1);
+ monster(.@map$, 103, 67, _("Apostle of Baphomet"), EVIL_DRUID, 1);
+ monster(.@map$, 109, 66, _("Apostle of Baphomet"), EVIL_DRUID, 1);
+ monster(.@map$, 108, 66, _("Apostle of Baphomet"), KHALITZBURG, 1);
+ monster(.@map$, 101, 66, _("Apostle of Baphomet"), EVIL_DRUID, 1);
+ monster(.@map$, 106, 66, _("Apostle of Baphomet"), MINI_DEMON, 1);
+ monster(.@map$, 102, 66, _("Apostle of Baphomet"), KHALITZBURG, 1);
+ monster(.@map$, 104, 66, _("Apostle of Baphomet"), MINI_DEMON, 1);
+ monster(.@map$, 103, 66, _("Apostle of Baphomet"), KHALITZBURG, 1);
+ monster(.@map$, 109, 65, _("Apostle of Baphomet"), BANSHEE, 1);
+ monster(.@map$, 108, 65, _("Apostle of Baphomet"), MINI_DEMON, 1);
+ disablenpc(instance_npcname("slave_right"));
end;
}
2@cata,79,39,0 script slave_down FAKE_NPC,5,5,{
OnTouch:
.@map$ = instance_mapname("2@cata");
- mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
- monster .@map$,78,41,"Apostle of Baphomet",1869,1;
- monster .@map$,79,42,"Apostle of Baphomet",1291,1;
- monster .@map$,78,46,"Apostle of Baphomet",1869,1;
- monster .@map$,81,41,"Apostle of Baphomet",1291,1;
- monster .@map$,81,42,"Apostle of Baphomet",1869,1;
- monster .@map$,79,43,"Apostle of Baphomet",1291,1;
- monster .@map$,77,40,"Apostle of Baphomet",1117,1;
- monster .@map$,79,41,"Apostle of Baphomet",1132,1;
- monster .@map$,79,42,"Apostle of Baphomet",1117,1;
- monster .@map$,79,43,"Apostle of Baphomet",1132,1;
- monster .@map$,79,48,"Apostle of Baphomet",1117,1;
- monster .@map$,78,49,"Apostle of Baphomet",1132,1;
- monster .@map$,78,41,"Apostle of Baphomet",1292,1;
- monster .@map$,74,42,"Apostle of Baphomet",1292,1;
- monster .@map$,72,48,"Apostle of Baphomet",1867,1;
- monster .@map$,72,38,"Apostle of Baphomet",1292,1;
- disablenpc instance_npcname("slave_down");
+ mapannounce(.@map$, _("Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!"), bc_map, C_YELLOW);
+ monster(.@map$, 78, 41, _("Apostle of Baphomet"), FLAME_SKULL, 1);
+ monster(.@map$, 79, 42, _("Apostle of Baphomet"), WRAITH_DEAD, 1);
+ monster(.@map$, 78, 46, _("Apostle of Baphomet"), FLAME_SKULL, 1);
+ monster(.@map$, 81, 41, _("Apostle of Baphomet"), WRAITH_DEAD, 1);
+ monster(.@map$, 81, 42, _("Apostle of Baphomet"), FLAME_SKULL, 1);
+ monster(.@map$, 79, 43, _("Apostle of Baphomet"), WRAITH_DEAD, 1);
+ monster(.@map$, 77, 40, _("Apostle of Baphomet"), EVIL_DRUID, 1);
+ monster(.@map$, 79, 41, _("Apostle of Baphomet"), KHALITZBURG, 1);
+ monster(.@map$, 79, 42, _("Apostle of Baphomet"), EVIL_DRUID, 1);
+ monster(.@map$, 79, 43, _("Apostle of Baphomet"), KHALITZBURG, 1);
+ monster(.@map$, 79, 48, _("Apostle of Baphomet"), EVIL_DRUID, 1);
+ monster(.@map$, 78, 49, _("Apostle of Baphomet"), KHALITZBURG, 1);
+ monster(.@map$, 78, 41, _("Apostle of Baphomet"), MINI_DEMON, 1);
+ monster(.@map$, 74, 42, _("Apostle of Baphomet"), MINI_DEMON, 1);
+ monster(.@map$, 72, 48, _("Apostle of Baphomet"), BANSHEE, 1);
+ monster(.@map$, 72, 38, _("Apostle of Baphomet"), MINI_DEMON, 1);
+ disablenpc(instance_npcname("slave_down"));
end;
}
//== Magical Seals =========================================
- script Magical Seal#SS FAKE_NPC,{
- .@seal_check = questprogress(3041,PLAYTIME);
+ .@seal_check = questprogress(3041, PLAYTIME);
if (.@seal_check == 1) {
specialeffect(EF_SILENCEATTACK, AREA, playerattached());
- percentheal -50,0;
- sc_start Eff_Stone,30000,0;
- mes "Your SP has not recovered yet. You lost your SP on the altar, but it seems the power of the seal has returned.";
- close;
+ percentheal(-50, 0);
+ sc_start(Eff_Stone, 30000, 0);
+ mes("Your SP has not recovered yet. You lost your SP on the altar, but it seems the power of the seal has returned.");
+ close();
}
- if (.@seal_check == 2) erasequest 3041;
- specialeffect EF_LEXDIVINA;
- disablenpc instance_npcname(strnpcinfo(NPC_NAME));
+ if (.@seal_check == 2)
+ erasequest(3041);
+ specialeffect(EF_LEXDIVINA);
+ disablenpc(instance_npcname(strnpcinfo(NPC_NAME)));
.@map$ = instance_mapname("2@cata");
- if (strnpcinfo(NPC_NAME_HIDDEN) == "0") areamobuseskill .@map$,79,81,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
- else if (strnpcinfo(NPC_NAME_HIDDEN) == "2") areamobuseskill .@map$,123,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
- else if (strnpcinfo(NPC_NAME_HIDDEN) == "4") areamobuseskill .@map$,123,22,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
- else if (strnpcinfo(NPC_NAME_HIDDEN) == "8") areamobuseskill .@map$,35,21,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
- else if (strnpcinfo(NPC_NAME_HIDDEN) == "10") areamobuseskill .@map$,35,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
- percentheal -50,0;
- sc_start Eff_Stone,20000,0;
- setquest 3041;
- mapannounce .@map$, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by adding magical power.";
- next;
- mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
- close;
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "0")
+ areamobuseskill(.@map$, 79, 81, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0);
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "2")
+ areamobuseskill(.@map$, 123, 109, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0);
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "4")
+ areamobuseskill(.@map$, 123, 22, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0);
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "8")
+ areamobuseskill(.@map$, 35, 21, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0);
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "10")
+ areamobuseskill(.@map$, 35, 109, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0);
+ percentheal(-50, 0);
+ sc_start(Eff_Stone, 20000, 0);
+ setquest(3041);
+ mapannounce(.@map$, _("The seal activated by putting magical power into the altar."), bc_map, "0x87ceeb");
+ mes("I can feel the power of the altar came back by adding magical power.");
+ next();
+ mes("But you can't use your magic for 3 minutes because you used your SP on the altar.");
+ close();
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(NPC_NAME));
+ disablenpc(instance_npcname(strnpcinfo(NPC_NAME)));
end;
}
+
2@cata,79,81,0 duplicate(Magical Seal#SS) Magical Seal#0 CLEAR_NPC
2@cata,123,109,0 duplicate(Magical Seal#SS) Magical Seal#2 CLEAR_NPC
2@cata,123,22,0 duplicate(Magical Seal#SS) Magical Seal#4 CLEAR_NPC
@@ -1122,137 +1105,137 @@ OnInstanceInit:
2@cata,79,65,0 script The Main Altar#ss CLEAR_NPC,{
.@party_id = getcharid(CHAR_ID_PARTY);
- if (('ins_baphomet == 5) && (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR))) {
- mes "An evil power, too terrible to describe, lies under the great altar radiating a violet color.";
- next;
- mes "Complicated Magical Rune letters blink rapidly, attempting to suppress the dreadful power within.";
- next;
- mes "The bottom of the Main Altar trembles furiously.";
- next;
- specialeffect EF_METEORSTORM;
- specialeffect EF_METEORSTORM;
- mes "[" + strcharinfo(PC_NAME) + "]";
- mes "Watch out! Something... Something is coming.";
+ if ('ins_baphomet == 5 && getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) {
+ mes("An evil power, too terrible to describe, lies under the great altar radiating a violet color.");
+ next();
+ mes("Complicated Magical Rune letters blink rapidly, attempting to suppress the dreadful power within.");
+ next();
+ mes("The bottom of the Main Altar trembles furiously.");
+ next();
+ specialeffect(EF_METEORSTORM);
+ specialeffect(EF_METEORSTORM);
+ mesf("[%s]", strcharinfo(PC_NAME));
+ mes("Watch out! Something... Something is coming.");
'ins_baphomet = 6;
- donpcevent instance_npcname("ins_2f_hero_broad")+"::OnEnable";
- disablenpc instance_npcname("The Main Altar#ss");
- close;
- }
- else {
- mes "An evil power, too terrible to describe, lies under the great altar radiating a violet color.";
- next;
- mes "Complicated Magical Rune letters blink rapidly, attempting to suppress the dreadful power within.";
- close;
+ donpcevent(instance_npcname("ins_2f_hero_broad")+"::OnEnable");
+ disablenpc(instance_npcname("The Main Altar#ss"));
+ close();
+ } else {
+ mes("An evil power, too terrible to describe, lies under the great altar radiating a violet color.");
+ next();
+ mes("Complicated Magical Rune letters blink rapidly, attempting to suppress the dreadful power within.");
+ close();
}
end;
}
2@cata,80,63,4 script Ancient Hero's Soul#2F 4_M_CHAMPSOUL,{
- cutin "ins_cata_champ_s",2;
- if (questprogress(3041)) erasequest 3041;
- mes "[Ancient Hero's Soul]";
- mes "Good job, my descendants... You've finished the long-cherished task that me and my bretheren could not complete.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "I really appreciate your help.";
- mes "Our souls can finally rest in peace...";
- next;
- mes "[Ancient Hero's Soul]";
- mes "The struggle for peace on this world will never end. But... my role here is finally over because there are brave heroes like you.";
- next;
- switch(select("Let me leave the shrine.", "Stop talking.")) {
+ cutin("ins_cata_champ_s", 2);
+ if (questprogress(3041))
+ erasequest(3041);
+ mes("[Ancient Hero's Soul]");
+ mes("Good job, my descendants... You've finished the long-cherished task that me and my bretheren could not complete.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("I really appreciate your help.");
+ mes("Our souls can finally rest in peace...");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("The struggle for peace on this world will never end. But... my role here is finally over because there are brave heroes like you.");
+ next();
+ switch (select("Let me leave the shrine.", "Stop talking.")) {
case 1:
- mes "[Ancient Hero's Soul]";
- mes "Okay. I'll let you and your group leave here safely.";
- next;
- mes "[Ancient Hero's Soul]";
- mes "If you leave, please say hello to Patrick for me.";
- cutin "",255;
+ mes("[Ancient Hero's Soul]");
+ mes("Okay. I'll let you and your group leave here safely.");
+ next();
+ mes("[Ancient Hero's Soul]");
+ mes("If you leave, please say hello to Patrick for me.");
+ cutin("", 255);
'ins_baphomet = 0;
- warp "monk_test",310,150;
- close;
+ warp("monk_test", 310, 150);
+ close();
case 2:
- mes "[Ancient Hero's Soul]";
- mes "Do you still have something to do here? If you're done I'll let you leave safely...";
- cutin "",255;
- close;
+ mes("[Ancient Hero's Soul]");
+ mes("Do you still have something to do here? If you're done I'll let you leave safely...");
+ cutin("", 255);
+ close();
}
OnInstanceInit:
- disablenpc instance_npcname("Ancient Hero's Soul#2F");
+ disablenpc(instance_npcname("Ancient Hero's Soul#2F"));
end;
}
2@cata,1,2,0 script ins_2f_hero_broad FAKE_NPC,{
OnEnable:
- enablenpc instance_npcname("ins_2f_hero_broad");
- initnpctimer;
+ enablenpc(instance_npcname("ins_2f_hero_broad"));
+ initnpctimer();
end;
OnDisable:
- disablenpc instance_npcname("ins_2f_hero_broad");
+ disablenpc(instance_npcname("ins_2f_hero_broad"));
end;
OnTimer3000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : My God! The seal of the Main Altar is weakening!",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : My God! The seal of the Main Altar is weakening!"), bc_map, C_YELLOW);
end;
OnTimer6000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : My descendants... Listen carefully to what I'm going to say.",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : My descendants... Listen carefully to what I'm going to say."), bc_map, C_YELLOW);
end;
OnTimer9000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The altars that control the Main Altar's power are located in the Northeast, Southeast, Southwest and Northwest corners of this room.",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The altars that control the Main Altar's power are located in the Northeast, Southeast, Southwest and Northwest corners of this room."), bc_map, C_YELLOW);
end;
OnTimer12000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Find these altars and activate their seals before Baphomet revives.",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : Find these altars and activate their seals before Baphomet revives."), bc_map, C_YELLOW);
end;
OnTimer15000:
- mapannounce instance_mapname("2@cata"), "Baphomet : It's too late, weaklings... Now, you'll feel the despair of death!",bc_map,"0xdb7093";
+ mapannounce(instance_mapname("2@cata"), _("Baphomet : It's too late, weaklings... Now, you'll feel the despair of death!"), bc_map, "0xdb7093");
end;
OnTimer17000:
- mapannounce instance_mapname("2@cata"), "Baphomet : No one can harm me here. You will be my first sacrifice.",bc_map,"0xdb7093";
- donpcevent instance_npcname("control_baphomet")+"::OnEnable";
- donpcevent instance_npcname("ins_2f_hero_broad2")+"::OnEnable";
- stopnpctimer;
- disablenpc instance_npcname("ins_2f_hero_broad");
+ mapannounce(instance_mapname("2@cata"), _("Baphomet : No one can harm me here. You will be my first sacrifice."), bc_map, "0xdb7093");
+ donpcevent(instance_npcname("control_baphomet")+"::OnEnable");
+ donpcevent(instance_npcname("ins_2f_hero_broad2")+"::OnEnable");
+ stopnpctimer();
+ disablenpc(instance_npcname("ins_2f_hero_broad"));
end;
}
2@cata,3,3,0 script control_baphomet FAKE_NPC,{
OnInstanceInit:
OnDisable:
- disablenpc instance_npcname("control_baphomet");
+ disablenpc(instance_npcname("control_baphomet"));
end;
OnEnable:
- enablenpc instance_npcname("control_baphomet");
- donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnEnable";
- monster instance_mapname("2@cata"),79,64,"Baphomet#",1929,1,instance_npcname("control_baphomet")+"::OnMyMobDead";
+ enablenpc(instance_npcname("control_baphomet"));
+ donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnEnable");
+ monster(instance_mapname("2@cata"), 79, 64, "Baphomet#", BAPHOMET_I, 1, instance_npcname("control_baphomet")+"::OnMyMobDead");
end;
OnMyMobDead:
.@map$ = instance_mapname("2@cata");
- if (mobcount(.@map$,instance_npcname("control_baphomet")+"::OnMyMobDead") < 1) {
+ if (mobcount(.@map$, instance_npcname("control_baphomet")+"::OnMyMobDead") < 1) {
'ins_baphomet = 7;
- erasequest 3041;
- mapannounce .@map$, "Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!...",bc_map,"0xdb7093";
- enablenpc instance_npcname("Ancient Hero's Soul#2F");
- disablenpc instance_npcname("slave_down");
- disablenpc instance_npcname("slave_left");
- disablenpc instance_npcname("slave_right");
- donpcevent instance_npcname("ins_2f_hero_broad")+"::OnDisable";
- donpcevent instance_npcname("ins_2f_hero_broad2")+"::OnDisable";
- donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable";
- donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnDisable";
- donpcevent instance_npcname("2f_callmon_pattern")+"::OnDisable";
- donpcevent instance_npcname("ins_2f_hero_pattern")+"::OnDisable";
- donpcevent instance_npcname("ins_2f_enter_broad")+"::OnDisable";
- donpcevent instance_npcname("control_baphomet")+"::OnDisable";
- disablenpc instance_npcname("control_baphomet");
+ erasequest(3041);
+ mapannounce(.@map$, _("Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!..."), bc_map, "0xdb7093");
+ enablenpc(instance_npcname("Ancient Hero's Soul#2F"));
+ disablenpc(instance_npcname("slave_down"));
+ disablenpc(instance_npcname("slave_left"));
+ disablenpc(instance_npcname("slave_right"));
+ donpcevent(instance_npcname("ins_2f_hero_broad")+"::OnDisable");
+ donpcevent(instance_npcname("ins_2f_hero_broad2")+"::OnDisable");
+ donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable");
+ donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnDisable");
+ donpcevent(instance_npcname("2f_callmon_pattern")+"::OnDisable");
+ donpcevent(instance_npcname("ins_2f_hero_pattern")+"::OnDisable");
+ donpcevent(instance_npcname("ins_2f_enter_broad")+"::OnDisable");
+ donpcevent(instance_npcname("control_baphomet")+"::OnDisable");
+ disablenpc(instance_npcname("control_baphomet"));
}
end;
}
@@ -1260,232 +1243,232 @@ OnMyMobDead:
2@cata,2,2,0 script ins_2f_hero_broad2 FAKE_NPC,{
OnInstanceInit:
OnDisable:
- disablenpc instance_npcname("ins_2f_hero_broad2");
+ disablenpc(instance_npcname("ins_2f_hero_broad2"));
end;
OnEnable:
- enablenpc instance_npcname("ins_2f_hero_broad2");
- initnpctimer;
+ enablenpc(instance_npcname("ins_2f_hero_broad2"));
+ initnpctimer();
end;
OnTimer8000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Don't be discouraged, Baphomet can still be defeated!",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : Don't be discouraged, Baphomet can still be defeated!"), bc_map, C_YELLOW);
end;
OnTimer11000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Go to the altars and activate their seals.",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : Go to the altars and activate their seals."), bc_map, C_YELLOW);
end;
OnTimer13000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Once the seals recover their power, Baphomet will be vulnerable.",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : Once the seals recover their power, Baphomet will be vulnerable."), bc_map, C_YELLOW);
end;
OnTimer16000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : You should lure Baphomet to the unsealed Altars. Otherwise, your efforts will be futile.",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : You should lure Baphomet to the unsealed Altars. Otherwise, your efforts will be futile."), bc_map, C_YELLOW);
end;
OnTimer19000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : We have only 1 hour to stop Baphomet. If time runs out, the power of the seals will be useless.",bc_map,"0xFFFF00";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : We have only 1 hour to stop Baphomet. If time runs out, the power of the seals will be useless."), bc_map, C_YELLOW);
end;
OnTimer22000:
- mapannounce instance_mapname("2@cata"), "Baphomet : It's useless. Make more seals. I'll crush them all. None of you will survive!",bc_map,"0xdb7093";
+ mapannounce(instance_mapname("2@cata"), _("Baphomet : It's useless. Make more seals. I'll crush them all. None of you will survive!"), bc_map, "0xdb7093");
end;
OnTimer26000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the central seal is running out. Go to the central seal and put the magical power.",bc_map,"0xFFFF00";
- enablenpc instance_npcname("Magical Seal#0");
- disablenpc instance_npcname("Magical Seal#2");
- disablenpc instance_npcname("Magical Seal#4");
- disablenpc instance_npcname("Magical Seal#8");
- disablenpc instance_npcname("Magical Seal#10");
- donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnEnable";
- stopnpctimer;
- disablenpc instance_npcname("ins_2f_hero_broad2");
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the central seal is running out. Go to the central seal and put the magical power."), bc_map, C_YELLOW);
+ enablenpc(instance_npcname("Magical Seal#0"));
+ disablenpc(instance_npcname("Magical Seal#2"));
+ disablenpc(instance_npcname("Magical Seal#4"));
+ disablenpc(instance_npcname("Magical Seal#8"));
+ disablenpc(instance_npcname("Magical Seal#10"));
+ donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnEnable");
+ stopnpctimer();
+ disablenpc(instance_npcname("ins_2f_hero_broad2"));
end;
}
2@cata,4,1,0 script 2f_callmon_pattern_c FAKE_NPC,{
OnInstanceInit:
- disablenpc instance_npcname("2f_callmon_pattern_c");
+ disablenpc(instance_npcname("2f_callmon_pattern_c"));
end;
OnEnable:
- enablenpc instance_npcname("2f_callmon_pattern_c");
- initnpctimer;
- donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnGo";
+ enablenpc(instance_npcname("2f_callmon_pattern_c"));
+ initnpctimer();
+ donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnGo");
end;
OnDisable:
- stopnpctimer;
- disablenpc instance_npcname("2f_callmon_pattern_c");
+ stopnpctimer();
+ disablenpc(instance_npcname("2f_callmon_pattern_c"));
end;
OnGo:
- donpcevent instance_npcname("2f_callmon_pattern")+"::OnEnable";
+ donpcevent(instance_npcname("2f_callmon_pattern")+"::OnEnable");
end;
OnTimer3600000:
- donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnDisable";
+ donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnDisable");
end;
}
2@cata,4,2,0 script 2f_callmon_pattern FAKE_NPC,{
OnInstanceInit:
- disablenpc instance_npcname("2f_callmon_pattern");
+ disablenpc(instance_npcname("2f_callmon_pattern"));
end;
OnEnable:
- enablenpc instance_npcname("2f_callmon_pattern");
- stopnpctimer;
- initnpctimer;
+ enablenpc(instance_npcname("2f_callmon_pattern"));
+ stopnpctimer();
+ initnpctimer();
end;
OnDisable:
- disablenpc instance_npcname("2f_callmon_pattern");
- stopnpctimer;
+ disablenpc(instance_npcname("2f_callmon_pattern"));
+ stopnpctimer();
end;
OnTimer300000:
- enablenpc instance_npcname("slave_down");
- enablenpc instance_npcname("slave_left");
- enablenpc instance_npcname("slave_right");
- donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnGo";
+ enablenpc(instance_npcname("slave_down"));
+ enablenpc(instance_npcname("slave_left"));
+ enablenpc(instance_npcname("slave_right"));
+ donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnGo");
end;
}
2@cata,3,1,0 script ins_2f_hero_pattern_c FAKE_NPC,{
OnInstanceInit:
- disablenpc instance_npcname("ins_2f_hero_pattern_c");
+ disablenpc(instance_npcname("ins_2f_hero_pattern_c"));
end;
OnEnable:
- enablenpc instance_npcname("ins_2f_hero_pattern_c");
- initnpctimer;
- donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnGo";
+ enablenpc(instance_npcname("ins_2f_hero_pattern_c"));
+ initnpctimer();
+ donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnGo");
end;
OnGo:
- donpcevent instance_npcname("ins_2f_hero_pattern")+"::OnEnable";
+ donpcevent(instance_npcname("ins_2f_hero_pattern")+"::OnEnable");
end;
OnDisable:
- stopnpctimer;
- disablenpc instance_npcname("Magical Seal#0");
- disablenpc instance_npcname("Magical Seal#2");
- disablenpc instance_npcname("Magical Seal#4");
- disablenpc instance_npcname("Magical Seal#8");
- disablenpc instance_npcname("Magical Seal#10");
- donpcevent instance_npcname("ins_2f_hero_pattern")+"::OnDisable";
- disablenpc instance_npcname("ins_2f_hero_pattern_c");
+ stopnpctimer();
+ disablenpc(instance_npcname("Magical Seal#0"));
+ disablenpc(instance_npcname("Magical Seal#2"));
+ disablenpc(instance_npcname("Magical Seal#4"));
+ disablenpc(instance_npcname("Magical Seal#8"));
+ disablenpc(instance_npcname("Magical Seal#10"));
+ donpcevent(instance_npcname("ins_2f_hero_pattern")+"::OnDisable");
+ disablenpc(instance_npcname("ins_2f_hero_pattern_c"));
end;
OnTimer3600000:
- mapannounce instance_mapname("2@cata"), "Baphomet : krrrr... Now you can't stop me with the seals. All you can do is wait for death!",bc_map,"0xdb7093";
+ mapannounce(instance_mapname("2@cata"), _("Baphomet : krrrr... Now you can't stop me with the seals. All you can do is wait for death!"), bc_map, "0xdb7093");
end;
OnTimer3605000:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : We can't stop Baphomet with the magical power of the seals anymore. Now everything depends on God...",bc_map,"0xFFFF00";
- donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable";
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : We can't stop Baphomet with the magical power of the seals anymore. Now everything depends on God..."), bc_map, C_YELLOW);
+ donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable");
end;
}
2@cata,3,2,0 script ins_2f_hero_pattern FAKE_NPC,{
OnInstanceInit:
- disablenpc instance_npcname("ins_2f_hero_pattern");
+ disablenpc(instance_npcname("ins_2f_hero_pattern"));
end;
OnEnable:
- enablenpc instance_npcname("ins_2f_hero_pattern");
- initnpctimer;
+ enablenpc(instance_npcname("ins_2f_hero_pattern"));
+ initnpctimer();
end;
OnDisable:
- disablenpc instance_npcname("ins_2f_hero_pattern");
- stopnpctimer;
+ disablenpc(instance_npcname("ins_2f_hero_pattern"));
+ stopnpctimer();
end;
OnTimer70000:
- switch(rand(1,5)) {
+ switch (rand(1, 5)) {
case 1:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!",bc_map,"0xFFFF00";
- enablenpc instance_npcname("Magical Seal#0");
- disablenpc instance_npcname("Magical Seal#2");
- disablenpc instance_npcname("Magical Seal#4");
- disablenpc instance_npcname("Magical Seal#8");
- disablenpc instance_npcname("Magical Seal#10");
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!"), bc_map, C_YELLOW);
+ enablenpc(instance_npcname("Magical Seal#0"));
+ disablenpc(instance_npcname("Magical Seal#2"));
+ disablenpc(instance_npcname("Magical Seal#4"));
+ disablenpc(instance_npcname("Magical Seal#8"));
+ disablenpc(instance_npcname("Magical Seal#10"));
break;
case 2:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 2 o'clock is running out. Go to 2 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
- disablenpc instance_npcname("Magical Seal#0");
- enablenpc instance_npcname("Magical Seal#2");
- disablenpc instance_npcname("Magical Seal#4");
- disablenpc instance_npcname("Magical Seal#8");
- disablenpc instance_npcname("Magical Seal#10");
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the seal at 2 o'clock is running out. Go to 2 o'clock and put the magical power in the seal."), bc_map, C_YELLOW);
+ disablenpc(instance_npcname("Magical Seal#0"));
+ enablenpc(instance_npcname("Magical Seal#2"));
+ disablenpc(instance_npcname("Magical Seal#4"));
+ disablenpc(instance_npcname("Magical Seal#8"));
+ disablenpc(instance_npcname("Magical Seal#10"));
break;
case 3:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 4 o'clock is running out. Go to 4 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
- disablenpc instance_npcname("Magical Seal#0");
- disablenpc instance_npcname("Magical Seal#2");
- enablenpc instance_npcname("Magical Seal#4");
- disablenpc instance_npcname("Magical Seal#8");
- disablenpc instance_npcname("Magical Seal#10");
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the seal at 4 o'clock is running out. Go to 4 o'clock and put the magical power in the seal."), bc_map, C_YELLOW);
+ disablenpc(instance_npcname("Magical Seal#0"));
+ disablenpc(instance_npcname("Magical Seal#2"));
+ enablenpc(instance_npcname("Magical Seal#4"));
+ disablenpc(instance_npcname("Magical Seal#8"));
+ disablenpc(instance_npcname("Magical Seal#10"));
break;
case 4:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 8 o'clock is running out. Go to 8 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
- disablenpc instance_npcname("Magical Seal#0");
- disablenpc instance_npcname("Magical Seal#2");
- disablenpc instance_npcname("Magical Seal#4");
- enablenpc instance_npcname("Magical Seal#8");
- disablenpc instance_npcname("Magical Seal#10");
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the seal at 8 o'clock is running out. Go to 8 o'clock and put the magical power in the seal."), bc_map, C_YELLOW);
+ disablenpc(instance_npcname("Magical Seal#0"));
+ disablenpc(instance_npcname("Magical Seal#2"));
+ disablenpc(instance_npcname("Magical Seal#4"));
+ enablenpc(instance_npcname("Magical Seal#8"));
+ disablenpc(instance_npcname("Magical Seal#10"));
break;
case 5:
- mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 10 o'clock is running out. Go to 10 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
- disablenpc instance_npcname("Magical Seal#0");
- disablenpc instance_npcname("Magical Seal#2");
- disablenpc instance_npcname("Magical Seal#4");
- disablenpc instance_npcname("Magical Seal#8");
- enablenpc instance_npcname("Magical Seal#10");
+ mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the seal at 10 o'clock is running out. Go to 10 o'clock and put the magical power in the seal."), bc_map, C_YELLOW);
+ disablenpc(instance_npcname("Magical Seal#0"));
+ disablenpc(instance_npcname("Magical Seal#2"));
+ disablenpc(instance_npcname("Magical Seal#4"));
+ disablenpc(instance_npcname("Magical Seal#8"));
+ enablenpc(instance_npcname("Magical Seal#10"));
}
- stopnpctimer;
- donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnGo";
+ stopnpctimer();
+ donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnGo");
end;
}
1@cata,1,1,0 script ins_1f_spawn_mobs FAKE_NPC,{
OnInstanceInit:
.@map$ = instance_mapname("1@cata");
- monster .@map$,0,0,"Zombie Master",1298,10;
- monster .@map$,0,0,"Wraith Dead",1291,10;
- //monster .@map$,0,0,"Ancient Mimic",1699,10;
- monster .@map$,0,0,"Flame Skull",1869,10;
- monster .@map$,0,0,"Skeleton General",1290,10;
- monster .@map$,0,0,"Zombie Master",1298,10;
- monster .@map$,0,0,"Skeleton General",1290,10;
- monster .@map$,0,0,"Flame Skull",1869,10;
- monster .@map$,0,0,"Wraith Dead",1291,10;
- monster .@map$,0,0,"Wraith Dead",1291,10;
- monster .@map$,0,0,"Khalitzburg",1132,10;
- monster .@map$,0,0,"Khalitzburg",1132,10;
- monster .@map$,0,0,"Flame Skull",1869,10;
- monster .@map$,0,0,"Flame Skull",1869,10;
- monster .@map$,0,0,"Ancient Mimic",1699,10;
- monster .@map$,0,0,"Zombie Master",1298,10;
- monster .@map$,0,0,"Ancient Mimic",1699,10;
- monster .@map$,0,0,"Zombie Master",1298,10;
- monster .@map$,0,0,"Wraith Dead",1291,10;
- monster .@map$,0,0,"Skeleton General",1290,10;
- monster .@map$,0,0,"Skeleton General",1290,10;
- monster .@map$,0,0,"Wind Ghost",1263,10;
- monster .@map$,0,0,"Wind Ghost",1263,10;
- monster .@map$,0,0,"Wind Ghost",1263,10;
- monster .@map$,0,0,"Lude",1509,10;
- monster .@map$,0,0,"Lude",1509,10;
- monster .@map$,0,0,"Evil Druid",1117,10;
- monster .@map$,0,0,"Evil Druid",1117,10;
- monster .@map$,0,0,"Evil Druid",1117,10;
- monster .@map$,0,0,"Banshee",1867,10;
- monster .@map$,0,0,"Dark Illusion",1302,1;
- disablenpc instance_npcname("ins_1f_spawn_mobs");
+ monster(.@map$, 0, 0, _("Zombie Master"), ZOMBIE_MASTER, 10);
+ monster(.@map$, 0, 0, _("Wraith Dead"), WRAITH_DEAD, 10);
+ //monster(.@map$, 0, 0, _("Ancient Mimic"), ANCIENT_MIMIC, 10);
+ monster(.@map$, 0, 0, _("Flame Skull"), FLAME_SKULL, 10);
+ monster(.@map$, 0, 0, _("Skeleton General"), SKELETON_GENERAL, 10);
+ monster(.@map$, 0, 0, _("Zombie Master"), ZOMBIE_MASTER, 10);
+ monster(.@map$, 0, 0, _("Skeleton General"), SKELETON_GENERAL, 10);
+ monster(.@map$, 0, 0, _("Flame Skull"), FLAME_SKULL, 10);
+ monster(.@map$, 0, 0, _("Wraith Dead"), WRAITH_DEAD, 10);
+ monster(.@map$, 0, 0, _("Wraith Dead"), WRAITH_DEAD, 10);
+ monster(.@map$, 0, 0, _("Khalitzburg"), KHALITZBURG, 10);
+ monster(.@map$, 0, 0, _("Khalitzburg"), KHALITZBURG, 10);
+ monster(.@map$, 0, 0, _("Flame Skull"), FLAME_SKULL, 10);
+ monster(.@map$, 0, 0, _("Flame Skull"), FLAME_SKULL, 10);
+ monster(.@map$, 0, 0, _("Ancient Mimic"), ANCIENT_MIMIC, 10);
+ monster(.@map$, 0, 0, _("Zombie Master"), ZOMBIE_MASTER, 10);
+ monster(.@map$, 0, 0, _("Ancient Mimic"), ANCIENT_MIMIC, 10);
+ monster(.@map$, 0, 0, _("Zombie Master"), ZOMBIE_MASTER, 10);
+ monster(.@map$, 0, 0, _("Wraith Dead"), WRAITH_DEAD, 10);
+ monster(.@map$, 0, 0, _("Skeleton General"), SKELETON_GENERAL, 10);
+ monster(.@map$, 0, 0, _("Skeleton General"), SKELETON_GENERAL, 10);
+ monster(.@map$, 0, 0, _("Wind Ghost"), WIND_GHOST, 10);
+ monster(.@map$, 0, 0, _("Wind Ghost"), WIND_GHOST, 10);
+ monster(.@map$, 0, 0, _("Wind Ghost"), WIND_GHOST, 10);
+ monster(.@map$, 0, 0, _("Lude"), LUDE, 10);
+ monster(.@map$, 0, 0, _("Lude"), LUDE, 10);
+ monster(.@map$, 0, 0, _("Evil Druid"), EVIL_DRUID, 10);
+ monster(.@map$, 0, 0, _("Evil Druid"), EVIL_DRUID, 10);
+ monster(.@map$, 0, 0, _("Evil Druid"), EVIL_DRUID, 10);
+ monster(.@map$, 0, 0, _("Banshee"), BANSHEE, 10);
+ monster(.@map$, 0, 0, _("Dark Illusion"), DARK_ILLUSION, 1);
+ disablenpc(instance_npcname("ins_1f_spawn_mobs"));
end;
}
diff --git a/npc/merchants/socket_enchant.txt b/npc/merchants/socket_enchant.txt
index 279aaf0ba..599d41564 100644
--- a/npc/merchants/socket_enchant.txt
+++ b/npc/merchants/socket_enchant.txt
@@ -268,17 +268,16 @@ function script Func_Socket {
mes "Ah, and don't forget to bring that " + getitemname(getarg(0)) + "!";
next;
mes "[Seiyablem]";
- if (getiteminfo(getarg(0),5)&2) // EQP_HAND_R = 2, it's a weapon
- {
+ if (getiteminfo(getarg(0), ITEMINFO_LOC) & EQP_HAND_R) {
+ // EQP_HAND_R = 2, it's a weapon
mes "I can try to add a slot now if you have the required items and zeny.";
mes "However, you should know that there's a chance that I might fail.";
mes "Therefore, I need to give you a fair warning...";
next;
mes "[Seiyablem]";
mes "If this attempt to add a Slot to your Weapon fails, then the ^FF0000Weapon^000000, ^FF0000and any Cards compounded to it will be destroyed^000000.";
- }
- else // armor
- {
+ } else {
+ // armor
mes "If you have all the required materials, my zeny service fee and the Armor, then we can go ahead with the Slot Addition attempt.";
mes "But before that, I must warn you of the risk.";
next;
diff --git a/npc/merchants/socket_enchant2.txt b/npc/merchants/socket_enchant2.txt
index 98d33b01c..29573970d 100644
--- a/npc/merchants/socket_enchant2.txt
+++ b/npc/merchants/socket_enchant2.txt
@@ -425,8 +425,8 @@ function script Func_Socket2 {
mes "[Leablem]";
mes "Did you already bring all of them?";
mes "For your information, if you fail to create a slot,";
- mes "you will lose all the item requirement as well as the target " + (getiteminfo(getarg(0),5)&2 ? "weapon" : "armor") + "."; // EQP_HAND_R = 2, it's a weapon, otherwise armor
- mes "Also remember, if the " + (getiteminfo(getarg(0),5)&2 ? "weapon" : "armor") + " has been upgraded, and has been inserted with a card,";
+ mes "you will lose all the item requirement as well as the target " + ((getiteminfo(getarg(0), ITEMINFO_LOC) & EQP_HAND_R) ? "weapon" : "armor") + "."; // EQP_HAND_R = 2, it's a weapon, otherwise armor
+ mes "Also remember, if the " + ((getiteminfo(getarg(0), ITEMINFO_LOC) & EQP_HAND_R) ? "weapon" : "armor") + " has been upgraded, and has been inserted with a card,";
mes "you will lose them even if you succeed in creating a slot.";
next;
switch(select("Ask for slot creation.", "Try next time."))
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index bc19ff048..9882e9d71 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -235,53 +235,137 @@ function script F_Load2Skills {
}
//== Function F_GetWeaponType ==============================
-// Determines weapon type by view
+// Determines weapon type by subtype
function script F_GetWeaponType {
- switch(getiteminfo(getarg(0),11)) {
- case 1: return "Dagger"; break;
- case 2: return "One-handed Sword"; break;
- case 3: return "Two-handed Sword"; break;
- case 4: return "One-handed Spear"; break;
- case 5: return "Two-handed Spear"; break;
- case 6: return "One-handed Axe"; break;
- case 7: return "Two-handed Axe"; break;
- case 8: return "Mace"; break;
- //case 9: return "Unused"; break;
- case 10: return "Staff"; break;
- case 11: return "Bow"; break;
- case 12: return "Knuckle"; break;
- case 13: return "Instrument"; break;
- case 14: return "Whip"; break;
- case 15: return "Book"; break;
- case 16: return "Katar"; break;
- case 17: return "Revolver"; break;
- case 18: return "Rifle"; break;
- case 19: return "Gatling gun"; break;
- case 20: return "Shotgun"; break;
- case 21: return "Grenade Launcher"; break;
- case 22: return "Shuriken"; break;
+ if (getiteminfo(getarg(0), ITEMINFO_TYPE) != IT_WEAPON)
+ return "Not a weapon";
+
+ switch (getiteminfo(getarg(0), ITEMINFO_SUBTYPE)) {
+ case W_DAGGER: return "Dagger"; break;
+ case W_1HSWORD: return "One-handed Sword"; break;
+ case W_2HSWORD: return "Two-handed Sword"; break;
+ case W_1HSPEAR: return "One-handed Spear"; break;
+ case W_2HSPEAR: return "Two-handed Spear"; break;
+ case W_1HAXE: return "One-handed Axe"; break;
+ case W_2HAXE: return "Two-handed Axe"; break;
+ case W_MACE: return "Mace"; break;
+ //case W_2HMACE: return "Two-handed Mace"; break; // Unused
+ case W_STAFF: return "Staff"; break;
+ case W_BOW: return "Bow"; break;
+ case W_KNUCKLE: return "Knuckle"; break;
+ case W_MUSICAL: return "Instrument"; break;
+ case W_WHIP: return "Whip"; break;
+ case W_BOOK: return "Book"; break;
+ case W_KATAR: return "Katar"; break;
+ case W_REVOLVER: return "Revolver"; break;
+ case W_RIFLE: return "Rifle"; break;
+ case W_GATLING: return "Gatling gun"; break;
+ case W_SHOTGUN: return "Shotgun"; break;
+ case W_GRENADE: return "Grenade Launcher"; break;
+ case W_HUUMA: return "Shuriken"; break;
+ case W_2HSTAFF: return "Two-handed Staff"; break;
default: return "Unable to Determine Equip Type"; break;
}
end;
}
+//== Function F_GetAmmoType ================================
+// Determines ammunition type by subtype
+function script F_GetAmmoType {
+ if (getiteminfo(getarg(0), ITEMINFO_TYPE) != IT_AMMO)
+ return "Not an ammunition";
+
+ switch (getiteminfo(getarg(0), ITEMINFO_SUBTYPE)) {
+ case A_ARROW: return "Arrow"; break;
+ case A_DAGGER: return "Throwing Dagger"; break;
+ case A_BULLET: return "Bullet"; break;
+ case A_SHELL: return "Shell"; break;
+ case A_GRENADE: return "Grenade"; break;
+ case A_SHURIKEN: return "Huuma Shuriken"; break;
+ case A_KUNAI: return "Kunai"; break;
+ case A_CANNONBALL: return "Cannon Ball"; break;
+ case A_THROWWEAPON: return "Throwing Weapon"; break;
+ default: return "Unable to Determine Ammunition Type"; break;
+ }
+ end;
+}
+
//== Function F_GetArmorType ===============================
// Determines equipment type by equip location
function script F_GetArmorType {
- switch(getiteminfo(getarg(0),5)) {
- case 001: return "Lower Headgear"; break;
- case 2: return "Weapon"; break;
- case 4: return "Garment"; break;
- case 8: return "Accessory"; break;
- case 16: return "Armor"; break;
- case 32: return "Shield"; break;
- case 64: return "Shoes"; break;
- case 128: return "Accessory"; break;
- case 256: return "Upper Headgear"; break;
- case 512: return "Middle Headgear"; break;
- default: return "Unable to Determine Equip Location"; break;
+ switch (getiteminfo(getarg(0), ITEMINFO_TYPE)) {
+ case IT_WEAPON:
+ return callfunc("F_GetWeaponType", getarg(0));
+ case IT_AMMO:
+ return callfunc("F_GetAmmoType", getarg(0));
+ case IT_ARMOR:
+ break;
+ default:
+ return "Unknown Equip Type";
}
- end;
+
+ .@loc = getiteminfo(getarg(0), ITEMINFO_LOC);
+
+ if ((.@loc & EQP_HELM) != 0) {
+ .@name$ = "";
+ if ((.@loc & EQP_HEAD_TOP) != 0) {
+ .@name$ += "Top";
+ }
+ if ((.@loc & EQP_HEAD_MID) != 0) {
+ if ((.@loc & EQP_HEAD_TOP) != 0)
+ .@name$ += " + ";
+ .@name$ += "Middle";
+ }
+ if ((.@loc & EQP_HEAD_LOW) != 0) {
+ if ((.@loc & (EQP_HEAD_TOP | EQP_HEAD_MID)) != 0)
+ .@name$ += " + ";
+ .@name$ += "Lower";
+ }
+ .@name$ += " Headgear";
+ return .@name$;
+ }
+ if ((.@loc & EQP_GARMENT) != 0)
+ return "Garment";
+ if ((.@loc & EQP_ACC) != 0)
+ return "Accessory";
+ if ((.@loc & EQP_ARMOR) != 0)
+ return "Armor";
+ if ((.@loc & EQP_SHIELD) != 0)
+ return "Shield";
+ if ((.@loc & EQP_SHOES) != 0)
+ return "Shoes";
+ if ((.@loc & EQP_COSTUE_GARMENT) != 0)
+ return "Costume Garment";
+ if ((.@loc & EQP_COSTUME) != 0) {
+ .@name = "Costume ";
+ if ((.@loc & EQP_COSTUME_HEAD_TOP) != 0) {
+ .@name$ += "Top";
+ }
+ if ((.@loc & EQP_COSTUME_HEAD_MID) != 0) {
+ if ((.@loc & EQP_COSTUME_HEAD_TOP) != 0)
+ .@name$ += " + ";
+ .@name$ += "Middle";
+ }
+ if ((.@loc & EQP_COSTUME_HEAD_LOW) != 0) {
+ if ((.@loc & (EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_MID)) != 0)
+ .@name$ += " + ";
+ .@name$ += "Lower";
+ }
+ .@name$ += " Headgear";
+ return .@name$;
+ }
+ if ((.@loc & EQP_SHADOW_ARMOR) != 0)
+ return "Shadow Armor";
+ if ((.@loc & EQP_SHADOW_WEAPON) != 0)
+ return "Shadow Weapon";
+ if ((.@loc & EQP_SHADOW_SHIELD) != 0)
+ return "Shadow Shield";
+ if ((.@loc & EQP_SHADOW_SHOES) != 0)
+ return "Shadow Shoes";
+ if ((.@loc & EQP_SHADOW_ACC) != 0)
+ return "Shadow Accessory";
+
+ return "Unknown Equip Type";
}
//== Function Time2Str =====================================
diff --git a/npc/other/monster_race.txt b/npc/other/monster_race.txt
index 9ddafeef5..9e938c663 100644
--- a/npc/other/monster_race.txt
+++ b/npc/other/monster_race.txt
@@ -2635,7 +2635,7 @@ S_BonusReward:
mes "me a reward later?";
next;
mes "[Ei'felle]";
- if (!getiteminfo(.@arg1,13)) { //use item level to determine if the item is armor (no weapon level)
+ if (!getiteminfo(.@arg1, ITEMINFO_WLV)) { // use item level to determine if the item is armor (no weapon level)
mes "Of course, of course.";
mes "Remember, if you donate";
mes "more medals to me, then";
diff --git a/npc/quests/cooking_quest.txt b/npc/quests/cooking_quest.txt
index ad0306b2c..505561f52 100644
--- a/npc/quests/cooking_quest.txt
+++ b/npc/quests/cooking_quest.txt
@@ -2069,8 +2069,8 @@ prt_castle,45,35,5 script Madeleine Chu#cook 4_COOK,{
close;
S_SellSets:
- .@item_cost = getiteminfo(getarg(0),0);
- .@item_weight = getiteminfo(getarg(0),6);
+ .@item_cost = getiteminfo(getarg(0), ITEMINFO_BUYPRICE);
+ .@item_weight = getiteminfo(getarg(0), ITEMINFO_WEIGHT);
mes "[Madeleine Chu]";
mes "How many " + (getarg(0)==12125 ? "Outdoor":"Indoor");
mes "Cooking Kits would";
diff --git a/npc/re/merchants/coin_exchange.txt b/npc/re/merchants/coin_exchange.txt
index be9f1dbee..f35c722f7 100644
--- a/npc/re/merchants/coin_exchange.txt
+++ b/npc/re/merchants/coin_exchange.txt
@@ -569,7 +569,7 @@ function script F_mal_coin {
mes "I'm sorry, you need more "+.@str$+".";
close;
}
- if (MaxWeight - Weight < getiteminfo(getarg(3),6)) {
+ if (MaxWeight - Weight < getiteminfo(getarg(3), ITEMINFO_WEIGHT)) {
mes getarg(1);
mes "Sorry, you've purchased too many.";
mes "You need to make more space in your inventory. Please come back later.";
diff --git a/npc/re/merchants/enchan_mal.txt b/npc/re/merchants/enchan_mal.txt
index bea4c6e03..e921a7336 100644
--- a/npc/re/merchants/enchan_mal.txt
+++ b/npc/re/merchants/enchan_mal.txt
@@ -84,11 +84,11 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
close;
}
@mal_equip_id = getequipid(EQI_HAND_R);
- .@equip_type = getiteminfo(@mal_equip_id,11);
+ .@equip_type = getiteminfo(@mal_equip_id, ITEMINFO_SUBTYPE);
//callsub L_Socket,<cost multiplier>,<4-x enchants possible>;
switch(.@equip_type) { // Check weapon type first to speed up the checks.
- case 1: // Daggers
+ case W_DAGGER: // Daggers
switch(@mal_equip_id) {
case 1224: callsub L_Socket,1,2; //Sword_Breaker
case 1225: callsub L_Socket,1,2; //Mail_Breaker
@@ -114,7 +114,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 13062: callsub L_Socket,4,2; //Ancient_Dagger
}
break;
- case 16: // Katars
+ case W_KATAR: // Katars
switch(@mal_equip_id) {
case 1271: callsub L_Socket,1,2; //Blood_Tears
case 1263: callsub L_Socket,1,2; //Unholy_Touch
@@ -128,13 +128,13 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1266: callsub L_Socket,4,2; //Infiltrator_
}
break;
- case 6: // 1-H Axes
+ case W_1HAXE: // 1-H Axes
switch(@mal_equip_id) {
case 1305: callsub L_Socket,1,2; //Cleaver
case 1311: callsub L_Socket,1,2; //Vecer_Axe
}
break;
- case 7: // 2-H Axes
+ case W_2HAXE: // 2-H Axes
switch(@mal_equip_id) {
case 1364: callsub L_Socket,1,2; //Great_Axe
case 1365: callsub L_Socket,1,2; //Sabbath
@@ -151,7 +151,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1371: callsub L_Socket,4,2; //Doom_Slayer_
}
break;
- case 2: // 1-H Swords
+ case W_1HSWORD: // 1-H Swords
switch(@mal_equip_id) {
case 1131: callsub L_Socket,1,2; //Ice_Falchon
case 1133: callsub L_Socket,1,2; //Fire_Brand
@@ -170,7 +170,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1132: callsub L_Socket,4,2; //Edge
}
break;
- case 3: // 2-H Swords
+ case W_2HSWORD: // 2-H Swords
switch(@mal_equip_id) {
case 1164: callsub L_Socket,1,2; //Muramasa
case 1166: callsub L_Socket,1,2; //Dragon_Slayer
@@ -194,7 +194,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1186: callsub L_Socket,4,2; //Death_Guidance
}
break;
- case 4: // 1-H Spears
+ case W_1HSPEAR: // 1-H Spears
switch(@mal_equip_id) {
case 1420: callsub L_Socket,1,2; //Long_Horn
case 1413: callsub L_Socket,1,2; //Gungnir
@@ -207,7 +207,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1422: callsub L_Socket,4,2; //Hunting_Spear
}
break;
- case 5: // 2-H Spears
+ case W_2HSPEAR: // 2-H Spears
switch(@mal_equip_id) {
case 1466: callsub L_Socket,1,2; //Crescent_Scythe
case 1467: callsub L_Socket,1,2; //Bill_Guisarme
@@ -224,7 +224,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1484: callsub L_Socket,2,2; //Cardo
}
break;
- case 10: // Staves
+ case W_STAFF: // Staves
switch(@mal_equip_id) {
case 1616: callsub L_Socket,1,2; //Staff_Of_Wing
case 1629: callsub L_Socket,1,2; //Walking_Stick
@@ -236,7 +236,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1473: callsub L_Socket,1,2; //Wizardy_Staff
}
break;
- case 23: // New 2-H Staves
+ case W_2HSTAFF: // New 2-H Staves
switch(@mal_equip_id) {
case 2004: callsub L_Socket,1,2; //Kronos
case 2005: callsub L_Socket,1,2; //Dea_Staff
@@ -244,7 +244,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 2000: callsub L_Socket,4,2; //Destruction_Rod
}
break;
- case 8: // Maces
+ case W_MACE: // Maces
switch(@mal_equip_id) {
case 1524: callsub L_Socket,1,2; //Golden_Mace
case 1525: callsub L_Socket,1,2; //Long_Mace
@@ -261,7 +261,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1540: callsub L_Socket,4,2; //Grand_Cross_
}
break;
- case 15: // Books
+ case W_BOOK: // Books
switch(@mal_equip_id) {
case 1557: callsub L_Socket,1,2; //Book_Of_The_Apocalypse
case 1558: callsub L_Socket,1,2; //Girls_Diary
@@ -271,7 +271,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1565: callsub L_Socket,4,2; //Death_Note
}
break;
- case 12: // Knuckles
+ case W_KNUCKLE: // Knuckles
switch(@mal_equip_id) {
case 1813: callsub L_Socket,1,2; //Kaiser_Knuckle
case 1814: callsub L_Socket,1,2; //Berserk
@@ -280,7 +280,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1830: callsub L_Socket,2,2; //Sura_Rampage
}
break;
- case 11: // Bows
+ case W_BOW: // Bows
switch(@mal_equip_id) {
case 1719: callsub L_Socket,1,2; //Bow_Of_Roguemaster
case 1722: callsub L_Socket,1,2; //Balistar
@@ -295,7 +295,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1720: callsub L_Socket,2,2; //Bow_Of_Rudra
}
break;
- case 13: // Musical Instruments
+ case W_MUSICAL: // Musical Instruments
switch(@mal_equip_id) {
case 1913: callsub L_Socket,1,2; //Electronic_Guitar
case 1918: callsub L_Socket,1,2; //Oriental_Lute
@@ -305,7 +305,7 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1930: callsub L_Socket,2,2; //Green_Whistle
}
break;
- case 14: // Whips
+ case W_WHIP: // Whips
switch(@mal_equip_id) {
case 1962: callsub L_Socket,1,2; //Lariat
case 1963: callsub L_Socket,1,2; //Rapture_Rose
@@ -321,6 +321,14 @@ malangdo,213,167,4 script Mayomayo#mal 4_CAT_3COLOR,{
case 1985: callsub L_Socket,4,2; //Rosebine
}
break;
+ case W_2HMACE:
+ case W_REVOLVER:
+ case W_RIFLE:
+ case W_GATLING:
+ case W_SHOTGUN:
+ case W_GRENADE:
+ case W_HUUMA:
+ break;
}
mes "[Mayomayo]";
if (@mal_enchant_select == 1)
diff --git a/npc/re/quests/eden/eden_tutorial.txt b/npc/re/quests/eden/eden_tutorial.txt
index 45d7c6f1e..902db7945 100644
--- a/npc/re/quests/eden/eden_tutorial.txt
+++ b/npc/re/quests/eden/eden_tutorial.txt
@@ -290,7 +290,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
close;
} else if (questprogress(9168) == 1) {
if (checkweight(Yggdrasilberry,1) == 0) {
- if (MaxWeight - Weight < getiteminfo(607,6)) {
+ if (MaxWeight - Weight < getiteminfo(Yggdrasilberry, ITEMINFO_WEIGHT)) {
mes "[Tutorial Instructor]";
mes "You seemed to be sluggish with a lot of items";
mes "in your inventory making you heavy...";
@@ -492,7 +492,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
}
}
if (checkweight(Yggdrasilberry,6) == 0) {
- if (MaxWeight - Weight < getiteminfo(607,6)) {
+ if (MaxWeight - Weight < getiteminfo(Yggdrasilberry, ITEMINFO_WEIGHT)) {
mes "[Tutorial Instructor]";
mes "Your inventory seems to be really full";
mes "with various stuff... Do you think";
@@ -591,7 +591,7 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{
moc_para01,32,179,4 script Tutorial Goal 4_F_KHELLY,{
if (checkweight(Seed_Of_Yggdrasil,7) == 0) {
- if (MaxWeight - Weight < getiteminfo(608,7)) {
+ if (MaxWeight - Weight < getiteminfo(Seed_Of_Yggdrasil, ITEMINFO_WEIGHT)) {
mes "[Tutorial Goal]";
mes "You seem to be overweight with items. Go put some stuff away then come back.";
close;
diff --git a/npc/re/quests/quests_dewata.txt b/npc/re/quests/quests_dewata.txt
index ef1352e1e..1b57e4397 100644
--- a/npc/re/quests/quests_dewata.txt
+++ b/npc/re/quests/quests_dewata.txt
@@ -191,7 +191,7 @@ dew_in01,22,48,3 script Sage Kasyapa#dew 4_M_DEWZATIMAN,{
mes "Please, it would honor us if you would take it.";
next;
if (checkweight(Cendrawasih_SF,1) == 0) {
- if (Weight + getiteminfo(6406,6) > MaxWeight) {
+ if (Weight + getiteminfo(Cendrawasih_SF, ITEMINFO_WEIGHT) > MaxWeight) {
mes "[Sage Kasyapa]";
mes "You are carrying too much weight over the limit.";
mes "I cannot get you your reward unless you reduce the amount of weighty items you are carrying.";
diff --git a/src/char/char.c b/src/char/char.c
index 78b2d19fa..9bef2941d 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -600,7 +600,7 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p)
StrBuf->Clear(&buf);
StrBuf->Printf(&buf, "INSERT INTO `%s`(`char_id`,`id`,`lv`,`flag`) VALUES ", skill_db);
//insert here.
- for( i = 0, count = 0; i < MAX_SKILL; ++i ) {
+ for (i = 0, count = 0; i < MAX_SKILL_DB; ++i) {
if( p->skill[i].id != 0 && p->skill[i].flag != SKILL_FLAG_TEMPORARY ) {
if( p->skill[i].lv == 0 && ( p->skill[i].flag == SKILL_FLAG_PERM_GRANTED || p->skill[i].flag == SKILL_FLAG_PERMANENT ) )
continue;
@@ -755,7 +755,7 @@ int char_getitemdata_from_sql(struct item *items, int max, int guid, enum invent
stmt = SQL->StmtMalloc(inter->sql_handle);
if (SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf))
- || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &guid, 0)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &guid, sizeof guid)
|| SQL_ERROR == SQL->StmtExecute(stmt)) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
@@ -763,32 +763,35 @@ int char_getitemdata_from_sql(struct item *items, int max, int guid, enum invent
return -1;
}
- if (SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &item.equip, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &item.bound, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &item.unique_id, 0, NULL, NULL))
- {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, sizeof item.id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, sizeof item.nameid, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, sizeof item.amount, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &item.equip, sizeof item.equip, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, sizeof item.identify, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, sizeof item.refine, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, sizeof item.attribute, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, sizeof item.expire_time, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &item.bound, sizeof item.bound, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &item.unique_id, sizeof item.unique_id, NULL, NULL)
+ ) {
SqlStmt_ShowDebug(stmt);
}
- for (i = 0; i < MAX_SLOTS; i++)
- if (SQL_ERROR == SQL->StmtBindColumn(stmt, 10 + i, SQLDT_SHORT, &item.card[i], 0, NULL, NULL))
+ for (i = 0; i < MAX_SLOTS; i++) {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt, 10 + i, SQLDT_SHORT, &item.card[i], sizeof item.card[i], NULL, NULL))
SqlStmt_ShowDebug(stmt);
+ }
- for (i = 0; i < MAX_ITEM_OPTIONS; i++)
- if (SQL_ERROR == SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + i * 2, SQLDT_INT16, &item.option[i].index, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 11 + MAX_SLOTS + i * 2, SQLDT_INT16, &item.option[i].value, 0, NULL, NULL))
+ for (i = 0; i < MAX_ITEM_OPTIONS; i++) {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + i * 2, SQLDT_INT16, &item.option[i].index, sizeof item.option[i].index, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 11 + MAX_SLOTS + i * 2, SQLDT_INT16, &item.option[i].value, sizeof item.option[i].index, NULL, NULL))
SqlStmt_ShowDebug(stmt);
+ }
- if (has_favorite)
- if (SQL_ERROR == SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + MAX_ITEM_OPTIONS * 2, SQLDT_UCHAR, &item.favorite, 0, NULL, NULL))
+ if (has_favorite) {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + MAX_ITEM_OPTIONS * 2, SQLDT_CHAR, &item.favorite, sizeof item.favorite, NULL, NULL))
SqlStmt_ShowDebug(stmt);
+ }
if (SQL->StmtNumRows(stmt) > 0 ) {
i = 0;
@@ -1066,46 +1069,46 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf)
"`robe`,`slotchange`,`unban_time`,`sex`"
" FROM `%s` WHERE `account_id`='%d' AND `char_num` < '%d'", char_db, sd->account_id, MAX_CHARS)
|| SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p.char_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &p.slot, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &p.name, sizeof(p.name), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_SHORT, &p.class, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p.base_level, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p.job_level, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT64, &p.base_exp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT64, &p.job_exp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_INT, &p.zeny, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_SHORT, &p.str, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_SHORT, &p.agi, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_SHORT, &p.vit, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 12, SQLDT_SHORT, &p.int_, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 13, SQLDT_SHORT, &p.dex, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 14, SQLDT_SHORT, &p.luk, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 15, SQLDT_INT, &p.max_hp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 16, SQLDT_INT, &p.hp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 17, SQLDT_INT, &p.max_sp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 18, SQLDT_INT, &p.sp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 19, SQLDT_INT, &p.status_point, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 20, SQLDT_INT, &p.skill_point, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 21, SQLDT_UINT, &p.option, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 22, SQLDT_UCHAR, &p.karma, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 23, SQLDT_SHORT, &p.manner, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 24, SQLDT_SHORT, &p.hair, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 25, SQLDT_SHORT, &p.hair_color, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 26, SQLDT_SHORT, &p.clothes_color, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 27, SQLDT_SHORT, &p.body, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 28, SQLDT_SHORT, &p.look.weapon, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 29, SQLDT_SHORT, &p.look.shield, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 30, SQLDT_SHORT, &p.look.head_top, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 31, SQLDT_SHORT, &p.look.head_mid, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 32, SQLDT_SHORT, &p.look.head_bottom, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 33, SQLDT_STRING, &last_map, sizeof(last_map), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 34, SQLDT_USHORT, &p.rename, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 35, SQLDT_UINT32, &p.delete_date, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p.look.robe, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_USHORT, &p.slotchange, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_LONG, &unban_time, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 39, SQLDT_ENUM, &sex, sizeof(sex), NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p.char_id, sizeof p.char_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &p.slot, sizeof p.slot, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &p.name, sizeof p.name, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT16, &p.class, sizeof p.class, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p.base_level, sizeof p.base_level, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p.job_level, sizeof p.job_level, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT64, &p.base_exp, sizeof p.base_exp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT64, &p.job_exp, sizeof p.job_exp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_INT, &p.zeny, sizeof p.zeny, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_SHORT, &p.str, sizeof p.str, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_SHORT, &p.agi, sizeof p.agi, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_SHORT, &p.vit, sizeof p.vit, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 12, SQLDT_SHORT, &p.int_, sizeof p.int_, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 13, SQLDT_SHORT, &p.dex, sizeof p.dex, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 14, SQLDT_SHORT, &p.luk, sizeof p.luk, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 15, SQLDT_INT, &p.max_hp, sizeof p.max_hp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 16, SQLDT_INT, &p.hp, sizeof p.hp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 17, SQLDT_INT, &p.max_sp, sizeof p.max_sp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 18, SQLDT_INT, &p.sp, sizeof p.sp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 19, SQLDT_INT, &p.status_point, sizeof p.status_point, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 20, SQLDT_INT, &p.skill_point, sizeof p.skill_point, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 21, SQLDT_UINT, &p.option, sizeof p.option, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 22, SQLDT_UCHAR, &p.karma, sizeof p.karma, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 23, SQLDT_SHORT, &p.manner, sizeof p.manner, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 24, SQLDT_SHORT, &p.hair, sizeof p.hair, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 25, SQLDT_SHORT, &p.hair_color, sizeof p.hair_color, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 26, SQLDT_SHORT, &p.clothes_color, sizeof p.clothes_color, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 27, SQLDT_SHORT, &p.body, sizeof p.body, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 28, SQLDT_SHORT, &p.look.weapon, sizeof p.look.weapon, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 29, SQLDT_SHORT, &p.look.shield, sizeof p.look.shield, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 30, SQLDT_SHORT, &p.look.head_top, sizeof p.look.head_top, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 31, SQLDT_SHORT, &p.look.head_mid, sizeof p.look.head_mid, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 32, SQLDT_SHORT, &p.look.head_bottom, sizeof p.look.head_bottom, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 33, SQLDT_STRING, &last_map, sizeof last_map, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 34, SQLDT_USHORT, &p.rename, sizeof p.rename, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 35, SQLDT_TIME, &p.delete_date, sizeof p.delete_date, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p.look.robe, sizeof p.look.robe, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_USHORT, &p.slotchange, sizeof p.slotchange, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_TIME, &unban_time, sizeof unban_time, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 39, SQLDT_ENUM, &sex, sizeof sex, NULL, NULL)
) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
@@ -1172,67 +1175,67 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
"`save_map`,`save_x`,`save_y`,`partner_id`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`,`robe`,`slotchange`,"
"`char_opt`,`font`,`uniqueitem_counter`,`sex`,`hotkey_rowshift`"
" FROM `%s` WHERE `char_id`=? LIMIT 1", char_db)
- || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, sizeof char_id)
|| SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p->char_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &p->account_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UCHAR, &p->slot, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &p->name, sizeof(p->name), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_SHORT, &p->class, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p->base_level, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_INT, &p->job_level, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT64, &p->base_exp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_UINT64, &p->job_exp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_INT, &p->zeny, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_SHORT, &p->str, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_SHORT, &p->agi, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 12, SQLDT_SHORT, &p->vit, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 13, SQLDT_SHORT, &p->int_, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 14, SQLDT_SHORT, &p->dex, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 15, SQLDT_SHORT, &p->luk, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 16, SQLDT_INT, &p->max_hp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 17, SQLDT_INT, &p->hp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 18, SQLDT_INT, &p->max_sp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 19, SQLDT_INT, &p->sp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 20, SQLDT_INT, &p->status_point, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 21, SQLDT_INT, &p->skill_point, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 22, SQLDT_UINT, &p->option, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 23, SQLDT_UCHAR, &p->karma, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 24, SQLDT_SHORT, &p->manner, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 25, SQLDT_INT, &p->party_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 26, SQLDT_INT, &p->guild_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 27, SQLDT_INT, &p->pet_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 28, SQLDT_INT, &p->hom_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 29, SQLDT_INT, &p->ele_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 30, SQLDT_SHORT, &p->hair, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 31, SQLDT_SHORT, &p->hair_color, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 32, SQLDT_SHORT, &p->clothes_color, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 33, SQLDT_SHORT, &p->body, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 34, SQLDT_SHORT, &p->look.weapon, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 35, SQLDT_SHORT, &p->look.shield, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p->look.head_top, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_SHORT, &p->look.head_mid, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_SHORT, &p->look.head_bottom, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 39, SQLDT_STRING, &last_map, sizeof(last_map), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 40, SQLDT_SHORT, &p->last_point.x, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 41, SQLDT_SHORT, &p->last_point.y, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 42, SQLDT_STRING, &save_map, sizeof(save_map), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 43, SQLDT_SHORT, &p->save_point.x, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 44, SQLDT_SHORT, &p->save_point.y, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 45, SQLDT_INT, &p->partner_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 46, SQLDT_INT, &p->father, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 47, SQLDT_INT, &p->mother, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 48, SQLDT_INT, &p->child, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 49, SQLDT_INT, &p->fame, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 50, SQLDT_USHORT, &p->rename, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 51, SQLDT_UINT32, &p->delete_date, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 52, SQLDT_SHORT, &p->look.robe, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 53, SQLDT_USHORT, &p->slotchange, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 54, SQLDT_UINT, &opt, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 55, SQLDT_UCHAR, &p->font, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 56, SQLDT_UINT, &p->uniqueitem_counter, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 57, SQLDT_ENUM, &sex, sizeof(sex), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 58, SQLDT_UCHAR, &p->hotkey_rowshift, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p->char_id, sizeof p->char_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &p->account_id, sizeof p->account_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UCHAR, &p->slot, sizeof p->slot, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &p->name, sizeof p->name, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT16, &p->class, sizeof p->class, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p->base_level, sizeof p->base_level, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_INT, &p->job_level, sizeof p->job_level, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT64, &p->base_exp, sizeof p->base_exp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_UINT64, &p->job_exp, sizeof p->job_exp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_INT, &p->zeny, sizeof p->zeny, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_SHORT, &p->str, sizeof p->str, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_SHORT, &p->agi, sizeof p->agi, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 12, SQLDT_SHORT, &p->vit, sizeof p->vit, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 13, SQLDT_SHORT, &p->int_, sizeof p->int_, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 14, SQLDT_SHORT, &p->dex, sizeof p->dex, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 15, SQLDT_SHORT, &p->luk, sizeof p->luk, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 16, SQLDT_INT, &p->max_hp, sizeof p->max_hp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 17, SQLDT_INT, &p->hp, sizeof p->hp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 18, SQLDT_INT, &p->max_sp, sizeof p->max_sp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 19, SQLDT_INT, &p->sp, sizeof p->sp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 20, SQLDT_INT, &p->status_point, sizeof p->status_point, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 21, SQLDT_INT, &p->skill_point, sizeof p->skill_point, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 22, SQLDT_UINT, &p->option, sizeof p->option, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 23, SQLDT_UCHAR, &p->karma, sizeof p->karma, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 24, SQLDT_SHORT, &p->manner, sizeof p->manner, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 25, SQLDT_INT, &p->party_id, sizeof p->party_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 26, SQLDT_INT, &p->guild_id, sizeof p->guild_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 27, SQLDT_INT, &p->pet_id, sizeof p->pet_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 28, SQLDT_INT, &p->hom_id, sizeof p->hom_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 29, SQLDT_INT, &p->ele_id, sizeof p->ele_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 30, SQLDT_SHORT, &p->hair, sizeof p->hair, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 31, SQLDT_SHORT, &p->hair_color, sizeof p->hair_color, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 32, SQLDT_SHORT, &p->clothes_color, sizeof p->clothes_color, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 33, SQLDT_SHORT, &p->body, sizeof p->body, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 34, SQLDT_SHORT, &p->look.weapon, sizeof p->look.weapon, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 35, SQLDT_SHORT, &p->look.shield, sizeof p->look.shield, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p->look.head_top, sizeof p->look.head_top, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_SHORT, &p->look.head_mid, sizeof p->look.head_mid, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_SHORT, &p->look.head_bottom, sizeof p->look.head_bottom, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 39, SQLDT_STRING, &last_map, sizeof last_map, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 40, SQLDT_INT16, &p->last_point.x, sizeof p->last_point.x, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 41, SQLDT_INT16, &p->last_point.y, sizeof p->last_point.y, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 42, SQLDT_STRING, &save_map, sizeof save_map, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 43, SQLDT_INT16, &p->save_point.x, sizeof p->save_point.x, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 44, SQLDT_INT16, &p->save_point.y, sizeof p->save_point.y, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 45, SQLDT_INT, &p->partner_id, sizeof p->partner_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 46, SQLDT_INT, &p->father, sizeof p->father, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 47, SQLDT_INT, &p->mother, sizeof p->mother, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 48, SQLDT_INT, &p->child, sizeof p->child, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 49, SQLDT_INT, &p->fame, sizeof p->fame, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 50, SQLDT_USHORT, &p->rename, sizeof p->rename, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 51, SQLDT_TIME, &p->delete_date, sizeof p->delete_date, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 52, SQLDT_SHORT, &p->look.robe, sizeof p->look.robe, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 53, SQLDT_USHORT, &p->slotchange, sizeof p->slotchange, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 54, SQLDT_UINT, &opt, sizeof opt, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 55, SQLDT_UCHAR, &p->font, sizeof p->font, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 56, SQLDT_UINT32, &p->uniqueitem_counter, sizeof p->uniqueitem_counter, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 57, SQLDT_ENUM, &sex, sizeof sex, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 58, SQLDT_UCHAR, &p->hotkey_rowshift, sizeof p->hotkey_rowshift, NULL, NULL)
) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
@@ -1276,11 +1279,11 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
//`memo` (`memo_id`,`char_id`,`map`,`x`,`y`)
memset(&tmp_point, 0, sizeof(tmp_point));
if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `map`,`x`,`y` FROM `%s` WHERE `char_id`=? ORDER by `memo_id` LIMIT %d", memo_db, MAX_MEMOPOINTS)
- || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, sizeof char_id)
|| SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &point_map, sizeof(point_map), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &tmp_point.x, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &tmp_point.y, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &point_map, sizeof point_map, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT16, &tmp_point.x, sizeof tmp_point.x, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_INT16, &tmp_point.y, sizeof tmp_point.y, NULL, NULL)
)
SqlStmt_ShowDebug(stmt);
@@ -1301,12 +1304,12 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
//read skill
//`skill` (`char_id`, `id`, `lv`)
memset(&tmp_skill, 0, sizeof(tmp_skill));
- if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `id`, `lv`,`flag` FROM `%s` WHERE `char_id`=? LIMIT %d", skill_db, MAX_SKILL)
- || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
+ if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `id`, `lv`,`flag` FROM `%s` WHERE `char_id`=? LIMIT %d", skill_db, MAX_SKILL_DB)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, sizeof char_id)
|| SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_USHORT, &tmp_skill.id , 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR , &tmp_skill.lv , 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UCHAR , &tmp_skill.flag, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_USHORT, &tmp_skill.id, sizeof tmp_skill.id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &tmp_skill.lv, sizeof tmp_skill.lv, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UCHAR, &tmp_skill.flag, sizeof tmp_skill.flag, NULL, NULL)
) {
SqlStmt_ShowDebug(stmt);
}
@@ -1314,7 +1317,7 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
if( tmp_skill.flag != SKILL_FLAG_PERM_GRANTED )
tmp_skill.flag = SKILL_FLAG_PERMANENT;
- for( i = 0; i < MAX_SKILL && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i ) {
+ for (i = 0; i < MAX_SKILL_DB && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i) {
if( skillid2idx[tmp_skill.id] )
memcpy(&p->skill[skillid2idx[tmp_skill.id]], &tmp_skill, sizeof(tmp_skill));
else
@@ -1326,11 +1329,11 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
//`friends` (`char_id`, `friend_account`, `friend_id`)
memset(&tmp_friend, 0, sizeof(tmp_friend));
if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT c.`account_id`, c.`char_id`, c.`name` FROM `%s` c LEFT JOIN `%s` f ON f.`friend_account` = c.`account_id` AND f.`friend_id` = c.`char_id` WHERE f.`char_id`=? LIMIT %d", char_db, friend_db, MAX_FRIENDS)
- || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, sizeof char_id)
|| SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_friend.account_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &tmp_friend.char_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &tmp_friend.name, sizeof(tmp_friend.name), NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_friend.account_id, sizeof tmp_friend.account_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &tmp_friend.char_id, sizeof tmp_friend.char_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &tmp_friend.name, sizeof tmp_friend.name, NULL, NULL)
) {
SqlStmt_ShowDebug(stmt);
}
@@ -1344,13 +1347,15 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
//`hotkey` (`char_id`, `hotkey`, `type`, `itemskill_id`, `skill_lvl`
memset(&tmp_hotkey, 0, sizeof(tmp_hotkey));
if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `hotkey`, `type`, `itemskill_id`, `skill_lvl` FROM `%s` WHERE `char_id`=?", hotkey_db)
- || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, sizeof char_id)
|| SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &hotkey_num, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &tmp_hotkey.type, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UINT, &tmp_hotkey.id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &tmp_hotkey.lv, 0, NULL, NULL) )
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &hotkey_num, sizeof hotkey_num, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &tmp_hotkey.type, sizeof tmp_hotkey.type, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UINT, &tmp_hotkey.id, sizeof tmp_hotkey.id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &tmp_hotkey.lv, sizeof tmp_hotkey.lv, NULL, NULL)
+ ) {
SqlStmt_ShowDebug(stmt);
+ }
while( SQL_SUCCESS == SQL->StmtNextRow(stmt) )
{
@@ -1371,12 +1376,12 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
//`account_data` (`account_id`,`bank_vault`,`base_exp`,`base_drop`,`base_death`)
if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `bank_vault`,`base_exp`,`base_drop`,`base_death` FROM `%s` WHERE `account_id`=? LIMIT 1", account_data_db)
- || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &account_id, 0)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &account_id, sizeof account_id)
|| SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p->bank_vault, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_USHORT, &p->mod_exp, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_USHORT, &p->mod_drop, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &p->mod_death, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p->bank_vault, sizeof p->bank_vault, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_USHORT, &p->mod_exp, sizeof p->mod_exp, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_USHORT, &p->mod_drop, sizeof p->mod_drop, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &p->mod_death, sizeof p->mod_death, NULL, NULL)
) {
SqlStmt_ShowDebug(stmt);
}
@@ -2439,13 +2444,13 @@ int char_parse_fromlogin_changesex_reply(int fd)
stmt = SQL->StmtMalloc(inter->sql_handle);
if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `char_id`,`class`,`guild_id` FROM `%s` WHERE `account_id` = '%d'", char_db, acc)
|| SQL_ERROR == SQL->StmtExecute(stmt)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &char_id, sizeof char_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &class, sizeof class, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &guild_id, sizeof guild_id, NULL, NULL)
) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
}
- SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &char_id, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &class, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &guild_id, 0, NULL, NULL);
for (i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i) {
char_change_sex_sub(sex, acc, char_id, class, guild_id);
@@ -2979,8 +2984,8 @@ void char_parse_frommap_skillid2idx(int fd)
if( j )
j /= 4;
for(i = 0; i < j; i++) {
- if( RFIFOW(fd, 4 + (i*4)) > MAX_SKILL_ID ) {
- ShowWarning("Error skillid2dx[%d] = %d failed, %d is higher than MAX_SKILL_ID (%d)\n",RFIFOW(fd, 4 + (i*4)), RFIFOW(fd, 6 + (i*4)),RFIFOW(fd, 4 + (i*4)),MAX_SKILL_ID);
+ if (RFIFOW(fd, 4 + (i*4)) >= MAX_SKILL_ID) {
+ ShowWarning("Error skillid2dx[%d] = %d failed, %d is higher than MAX_SKILL_ID (%d)\n", RFIFOW(fd, 4 + (i*4)), RFIFOW(fd, 6 + (i*4)), RFIFOW(fd, 4 + (i*4)), MAX_SKILL_ID);
continue;
}
skillid2idx[RFIFOW(fd, 4 + (i*4))] = RFIFOW(fd, 6 + (i*4));
@@ -3375,8 +3380,8 @@ void char_ban(int account_id, int char_id, time_t *unban_time, short year, short
if( SQL_SUCCESS != SQL->StmtPrepare(stmt,
"UPDATE `%s` SET `unban_time` = ? WHERE `char_id` = ? LIMIT 1",
char_db)
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_LONG, &timestamp, sizeof(timestamp))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_INT, &char_id, sizeof(char_id))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_TIME, &timestamp, sizeof timestamp)
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_INT, &char_id, sizeof char_id)
|| SQL_SUCCESS != SQL->StmtExecute(stmt)
) {
SqlStmt_ShowDebug(stmt);
@@ -3385,7 +3390,7 @@ void char_ban(int account_id, int char_id, time_t *unban_time, short year, short
SQL->StmtFree(stmt);
// condition applies; send to all map-servers to disconnect the player
- if( timestamp > time(NULL) ) {
+ if (timestamp > time(NULL)) {
mapif->char_ban(char_id, timestamp);
// disconnect player if online on char-server
chr->disconnect_player(account_id);
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index 4f382cd3c..edf737992 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -171,9 +171,9 @@ bool mapif_homunculus_save(const struct s_homunculus *hd)
} else {
for (i = 0; i < MAX_HOMUNSKILL; ++i) {
if (hd->hskill[i].id > 0 && hd->hskill[i].lv != 0) {
- SQL->StmtBindParam(stmt, 0, SQLDT_USHORT, &hd->hskill[i].id, 0);
- SQL->StmtBindParam(stmt, 1, SQLDT_USHORT, &hd->hskill[i].lv, 0);
- if (SQL_ERROR == SQL->StmtExecute(stmt)) {
+ if (SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_USHORT, &hd->hskill[i].id, sizeof hd->hskill[i].id)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 1, SQLDT_UCHAR, &hd->hskill[i].lv, sizeof hd->hskill[i].lv)
+ || SQL_ERROR == SQL->StmtExecute(stmt)) {
SqlStmt_ShowDebug(stmt);
flag = false;
break;
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index bd49cb7d4..9554be414 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -56,6 +56,7 @@ struct quest *mapif_quests_fromsql(int char_id, int *count)
StringBuf buf;
int i;
int sqlerror = SQL_SUCCESS;
+ int quest_state = 0;
if (!count)
return NULL;
@@ -77,11 +78,11 @@ struct quest *mapif_quests_fromsql(int char_id, int *count)
memset(&tmp_quest, 0, sizeof(struct quest));
if (SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf))
- || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0)
+ || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, sizeof char_id)
|| SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_quest.quest_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &tmp_quest.state, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UINT, &tmp_quest.time, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_quest.quest_id, sizeof tmp_quest.quest_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &quest_state, sizeof quest_state, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UINT, &tmp_quest.time, sizeof tmp_quest.time, NULL, NULL)
) {
sqlerror = SQL_ERROR;
}
@@ -89,7 +90,7 @@ struct quest *mapif_quests_fromsql(int char_id, int *count)
StrBuf->Destroy(&buf);
for (i = 0; sqlerror != SQL_ERROR && i < MAX_QUEST_OBJECTIVES; i++) { // Stop on the first error
- sqlerror = SQL->StmtBindColumn(stmt, 3+i, SQLDT_INT, &tmp_quest.count[i], 0, NULL, NULL);
+ sqlerror = SQL->StmtBindColumn(stmt, 3+i, SQLDT_INT, &tmp_quest.count[i], sizeof tmp_quest.count[i], NULL, NULL);
}
if (sqlerror == SQL_ERROR) {
@@ -105,9 +106,10 @@ struct quest *mapif_quests_fromsql(int char_id, int *count)
questlog = (struct quest *)aCalloc(*count, sizeof(struct quest));
while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) {
+ tmp_quest.state = quest_state;
if (i >= *count) // Sanity check, should never happen
break;
- memcpy(&questlog[i++], &tmp_quest, sizeof(tmp_quest));
+ questlog[i++] = tmp_quest;
}
if (i < *count) {
// Should never happen. Compact array
diff --git a/src/char/int_rodex.c b/src/char/int_rodex.c
index 994e8110e..f5d036991 100644
--- a/src/char/int_rodex.c
+++ b/src/char/int_rodex.c
@@ -43,10 +43,9 @@ struct inter_rodex_interface *inter_rodex;
// Loads new mails of this char_id/account_id
static int inter_rodex_fromsql(int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails)
{
- int i, count = 0;
+ int count = 0;
struct rodex_message msg = { 0 };
struct SqlStmt *stmt;
- struct SqlStmt *stmt_items;
nullpo_retr(-1, mails);
@@ -108,112 +107,128 @@ static int inter_rodex_fromsql(int char_id, int account_id, int8 opentype, int64
}
if (SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT64, &msg.id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_STRING, &msg.sender_name, sizeof(msg.sender_name), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &msg.sender_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &msg.receiver_name, sizeof(msg.receiver_name), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &msg.receiver_id, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &msg.receiver_accountid, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_STRING, &msg.title, sizeof(msg.title), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_STRING, &msg.body, sizeof(msg.body), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_INT, &msg.zeny, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UINT8, &msg.type, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_INT8, &msg.is_read, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_INT, &msg.send_date, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 12, SQLDT_INT, &msg.expire_date, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 13, SQLDT_INT, &msg.weight, 0, NULL, NULL)
- ) {
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT64, &msg.id, sizeof msg.id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_STRING, &msg.sender_name, sizeof msg.sender_name, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &msg.sender_id, sizeof msg.sender_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &msg.receiver_name, sizeof msg.receiver_name, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &msg.receiver_id, sizeof msg.receiver_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &msg.receiver_accountid, sizeof msg.receiver_accountid, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_STRING, &msg.title, sizeof msg.title, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_STRING, &msg.body, sizeof msg.body, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_INT64, &msg.zeny, sizeof msg.zeny, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UINT8, &msg.type, sizeof msg.type, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_BOOL, &msg.is_read, sizeof msg.is_read, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_INT, &msg.send_date, sizeof msg.send_date, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 12, SQLDT_INT, &msg.expire_date, sizeof msg.expire_date, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 13, SQLDT_INT, &msg.weight, sizeof msg.weight, NULL, NULL)
+ ) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
return -1;
}
- stmt_items = SQL->StmtMalloc(inter->sql_handle);
- if (stmt_items == NULL) {
- SQL->StmtFreeResult(stmt);
- SQL->StmtFree(stmt);
- return -1;
- }
-
- // Read mails
- while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) {
+ {
struct item it = { 0 };
+ StringBuf buf;
+ struct SqlStmt *stmt_items = SQL->StmtMalloc(inter->sql_handle);
+ int i;
- if (msg.type & MAIL_TYPE_ITEM) {
- if (SQL_ERROR == SQL->StmtPrepare(stmt_items, "SELECT `nameid`, `amount`, `equip`, `identify`,"
- "`refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, `opt_idx0`, `opt_val0`,"
- "`opt_idx1`, `opt_val1`, `opt_idx2`, `opt_val2`, `opt_idx3`, `opt_val3`, `opt_idx4`, `opt_val4`,"
- "`expire_time`, `bound`, `unique_id`"
- "FROM `%s` WHERE mail_id = '%"PRId64"' ORDER BY `mail_id` ASC", rodex_item_db, msg.id)
- || SQL_ERROR == SQL->StmtExecute(stmt_items)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 0, SQLDT_INT, &it.nameid, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 1, SQLDT_INT, &it.amount, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 2, SQLDT_UINT, &it.equip, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 3, SQLDT_INT8, &it.identify, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 4, SQLDT_INT8, &it.refine, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 5, SQLDT_INT8, &it.attribute, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 6, SQLDT_INT16, &it.card[0], 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 7, SQLDT_INT16, &it.card[1], 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 8, SQLDT_INT16, &it.card[2], 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 9, SQLDT_INT16, &it.card[3], 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 10, SQLDT_INT16, &it.option[0].index, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 11, SQLDT_INT16, &it.option[0].value, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 12, SQLDT_INT16, &it.option[1].index, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 13, SQLDT_INT16, &it.option[1].value, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 14, SQLDT_INT16, &it.option[2].index, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 15, SQLDT_INT16, &it.option[2].value, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 16, SQLDT_INT16, &it.option[3].index, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 17, SQLDT_INT16, &it.option[3].value, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 18, SQLDT_INT16, &it.option[4].index, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 19, SQLDT_INT16, &it.option[4].value, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 20, SQLDT_INT, &it.expire_time, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 21, SQLDT_UINT8, &it.bound, 0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 22, SQLDT_UINT64, &it.unique_id, 0, NULL, NULL)) {
- SqlStmt_ShowDebug(stmt_items);
- }
-
- for (i = 0; i < RODEX_MAX_ITEM && SQL_SUCCESS == SQL->StmtNextRow(stmt_items); ++i) {
- msg.items[i].item = it;
- msg.items_count++;
- }
+ if (stmt_items == NULL) {
+ SQL->StmtFreeResult(stmt);
+ SQL->StmtFree(stmt);
+ return -1;
}
- if (msg.items_count == 0) {
- msg.type &= ~MAIL_TYPE_ITEM;
+ StrBuf->Init(&buf);
+
+ StrBuf->AppendStr(&buf, "SELECT `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`");
+ for (i = 0; i < MAX_SLOTS; i++) {
+ StrBuf->Printf(&buf, ", `card%d`", i);
+ }
+ for (i = 0; i < MAX_ITEM_OPTIONS; i++) {
+ StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", i, i);
}
+ StrBuf->Printf(&buf, "FROM `%s` WHERE mail_id = ? ORDER BY `mail_id` ASC", rodex_item_db);
- if (msg.zeny == 0) {
- msg.type &= ~MAIL_TYPE_ZENY;
+ if (SQL_ERROR == SQL->StmtPrepareStr(stmt_items, StrBuf->Value(&buf))
+ || SQL_ERROR == SQL->StmtBindParam(stmt_items, 0, SQLDT_INT64, &msg.id, sizeof msg.id)
+ ) {
+ SqlStmt_ShowDebug(stmt_items);
}
+ // Read mails
+ while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) {
+
+ if (msg.type & MAIL_TYPE_ITEM) {
+ if (SQL_ERROR == SQL->StmtExecute(stmt_items)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 0, SQLDT_SHORT, &it.nameid, sizeof it.nameid, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 1, SQLDT_SHORT, &it.amount, sizeof it.amount, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 2, SQLDT_UINT, &it.equip, sizeof it.equip, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 3, SQLDT_CHAR, &it.identify, sizeof it.identify, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 4, SQLDT_CHAR, &it.refine, sizeof it.refine, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 5, SQLDT_CHAR, &it.attribute, sizeof it.attribute, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 6, SQLDT_UINT, &it.expire_time, sizeof it.expire_time, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 7, SQLDT_UCHAR, &it.bound, sizeof it.bound, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 8, SQLDT_UINT64, &it.unique_id, sizeof it.unique_id, NULL, NULL)
+ ) {
+ SqlStmt_ShowDebug(stmt_items);
+ }
+ for (i = 0; i < MAX_SLOTS; i++) {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt_items, 9 + i, SQLDT_SHORT, &it.card[i], sizeof it.card[i], NULL, NULL))
+ SqlStmt_ShowDebug(stmt_items);
+ }
+ for (i = 0; i < MAX_ITEM_OPTIONS; i++) {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt_items, 9 + MAX_SLOTS + i * 2, SQLDT_INT16, &it.option[i].index, sizeof it.option[i].index, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 10 + MAX_SLOTS + i * 2, SQLDT_INT16, &it.option[i].value, sizeof it.option[i].value, NULL, NULL)
+ ) {
+ SqlStmt_ShowDebug(stmt_items);
+ }
+ }
+
+ for (i = 0; i < RODEX_MAX_ITEM && SQL_SUCCESS == SQL->StmtNextRow(stmt_items); ++i) {
+ msg.items[i].item = it;
+ msg.items_count++;
+ }
+ }
+
+ if (msg.items_count == 0) {
+ msg.type &= ~MAIL_TYPE_ITEM;
+ }
+
+ if (msg.zeny == 0) {
+ msg.type &= ~MAIL_TYPE_ZENY;
+ }
+
#if PACKETVER >= 20170419
- if (opentype == RODEX_OPENTYPE_UNSET) {
- if (msg.receiver_id != 0)
- msg.opentype = RODEX_OPENTYPE_MAIL;
- else
- msg.opentype = RODEX_OPENTYPE_ACCOUNT;
- } else {
- msg.opentype = opentype;
- }
+ if (opentype == RODEX_OPENTYPE_UNSET) {
+ if (msg.receiver_id != 0)
+ msg.opentype = RODEX_OPENTYPE_MAIL;
+ else
+ msg.opentype = RODEX_OPENTYPE_ACCOUNT;
+ } else {
+ msg.opentype = opentype;
+ }
#else
- msg.opentype = opentype;
+ msg.opentype = opentype;
#endif
#if PACKETVER < 20160601
- // NPC Message Type isn't supported in old clients
- msg.type &= ~MAIL_TYPE_NPC;
+ // NPC Message Type isn't supported in old clients
+ msg.type &= ~MAIL_TYPE_NPC;
#endif
- ++count;
- VECTOR_ENSURE(*mails, 1, 1);
- VECTOR_PUSH(*mails, msg);
- memset(&msg, 0, sizeof(struct rodex_message));
+ ++count;
+ VECTOR_ENSURE(*mails, 1, 1);
+ VECTOR_PUSH(*mails, msg);
+ memset(&msg, 0, sizeof(struct rodex_message));
+
+ SQL->StmtFreeResult(stmt_items);
+ }
+ StrBuf->Destroy(&buf);
+ SQL->StmtFree(stmt_items);
}
SQL->StmtFreeResult(stmt);
- SQL->StmtFreeResult(stmt_items);
-
SQL->StmtFree(stmt);
- SQL->StmtFree(stmt_items);
ShowInfo("rodex load complete from DB - id: %d (total: %d)\n", char_id, count);
return count;
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index aafba8520..70cdc5f19 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -566,23 +566,23 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd)
}
memset(&item, 0, sizeof(item));
- SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 3, SQLDT_USHORT, &item.equip, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &item.bound, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &item.unique_id, 0, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, sizeof item.id, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, sizeof item.nameid, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, sizeof item.amount, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &item.equip, sizeof item.equip, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, sizeof item.identify, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, sizeof item.refine, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, sizeof item.attribute, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, sizeof item.expire_time, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &item.bound, sizeof item.bound, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &item.unique_id, sizeof item.unique_id, NULL, NULL);
/* Card Slots */
for (j = 0; j < MAX_SLOTS; ++j)
- SQL->StmtBindColumn(stmt, 10 + j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 10 + j, SQLDT_SHORT, &item.card[j], sizeof item.card[j], NULL, NULL);
/* Item Options */
for (j = 0; j < MAX_ITEM_OPTIONS; ++j) {
- SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + j * 2, SQLDT_INT16, &item.option[j].index, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 11 + MAX_SLOTS + j * 2, SQLDT_INT16, &item.option[j].value, 0, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + j * 2, SQLDT_INT16, &item.option[j].index, sizeof item.option[j].index, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 11 + MAX_SLOTS + j * 2, SQLDT_INT16, &item.option[j].value, sizeof item.option[j].value, NULL, NULL);
}
while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) {
Assert_retb(i < MAX_INVENTORY);
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 7480269e5..e8135b6d1 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -574,6 +574,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_MAIL_LIST", sizeof(struct PACKET_ZC_MAIL_LIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_UNREADMAIL", sizeof(struct PACKET_ZC_NOTIFY_UNREADMAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_READ_MAIL", sizeof(struct PACKET_ZC_READ_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_SKILL_SCALE", sizeof(struct PACKET_ZC_SKILL_SCALE), SERVER_TYPE_MAP },
{ "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP },
{ "mail_item", sizeof(struct mail_item), SERVER_TYPE_MAP },
{ "maillistinfo", sizeof(struct maillistinfo), SERVER_TYPE_MAP },
diff --git a/src/common/mmo.h b/src/common/mmo.h
index f102e2a2a..3987ef48b 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -139,8 +139,8 @@
#endif
#define MAX_FAME 1000000000
#define MAX_CART 100
-#ifndef MAX_SKILL
-#define MAX_SKILL 1510
+#ifndef MAX_SKILL_DB
+#define MAX_SKILL_DB 1510 ///< Maximum number of skills in the skill DB (compacted array size)
#endif
#ifndef MAX_SKILL_ID
#define MAX_SKILL_ID 10015 // [Ind/Hercules] max used skill ID
@@ -636,7 +636,7 @@ struct mmo_charstatus {
struct point last_point,save_point,memo_point[MAX_MEMOPOINTS];
struct item inventory[MAX_INVENTORY],cart[MAX_CART];
- struct s_skill skill[MAX_SKILL];
+ struct s_skill skill[MAX_SKILL_DB];
struct s_friend friends[MAX_FRIENDS]; //New friend system [Skotlex]
#ifdef HOTKEY_SAVING
@@ -1204,4 +1204,8 @@ enum hz_char_ask_name_answer {
#error MAX_SLOTS it too small
#endif
+#ifdef MAX_SKILL
+#error MAX_SKILL has been replaced by MAX_SKILL_DB. Please update your custom definitions.
+#endif
+
#endif /* COMMON_MMO_H */
diff --git a/src/common/sql.c b/src/common/sql.c
index 235be3aca..7f526cff6 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -423,68 +423,99 @@ static int Sql_P_BindSqlDataType(MYSQL_BIND* bind, enum SqlDataType buffer_type,
memset(bind, 0, sizeof(MYSQL_BIND));
switch( buffer_type )
{
- case SQLDT_NULL: bind->buffer_type = MYSQL_TYPE_NULL;
+ case SQLDT_NULL:
+ bind->buffer_type = MYSQL_TYPE_NULL;
buffer_len = 0;// FIXME length = ? [FlavioJS]
break;
// fixed size
- case SQLDT_UINT8: bind->is_unsigned = 1;
+ case SQLDT_UINT8:
+ bind->is_unsigned = 1;
FALLTHROUGH
- case SQLDT_INT8: bind->buffer_type = MYSQL_TYPE_TINY;
- buffer_len = 1;
+ case SQLDT_INT8:
+ bind->buffer_type = MYSQL_TYPE_TINY;
+ Assert_retr(SQL_ERROR, buffer_len == 1);
break;
- case SQLDT_UINT16: bind->is_unsigned = 1;
+ case SQLDT_UINT16:
+ bind->is_unsigned = 1;
FALLTHROUGH
- case SQLDT_INT16: bind->buffer_type = MYSQL_TYPE_SHORT;
- buffer_len = 2;
+ case SQLDT_INT16:
+ bind->buffer_type = MYSQL_TYPE_SHORT;
+ Assert_retr(SQL_ERROR, buffer_len == 2);
break;
- case SQLDT_UINT32: bind->is_unsigned = 1;
+ case SQLDT_UINT32:
+ bind->is_unsigned = 1;
FALLTHROUGH
- case SQLDT_INT32: bind->buffer_type = MYSQL_TYPE_LONG;
- buffer_len = 4;
+ case SQLDT_INT32:
+ bind->buffer_type = MYSQL_TYPE_LONG;
+ Assert_retr(SQL_ERROR, buffer_len == 4);
break;
- case SQLDT_UINT64: bind->is_unsigned = 1;
+ case SQLDT_UINT64:
+ bind->is_unsigned = 1;
FALLTHROUGH
- case SQLDT_INT64: bind->buffer_type = MYSQL_TYPE_LONGLONG;
- buffer_len = 8;
+ case SQLDT_INT64:
+ bind->buffer_type = MYSQL_TYPE_LONGLONG;
+ Assert_retr(SQL_ERROR, buffer_len == 8);
break;
// platform dependent size
- case SQLDT_UCHAR: bind->is_unsigned = 1;
+ case SQLDT_UCHAR:
+ bind->is_unsigned = 1;
FALLTHROUGH
- case SQLDT_CHAR: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(char));
- buffer_len = sizeof(char);
+ case SQLDT_CHAR:
+ bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(char));
+ Assert_retr(SQL_ERROR, buffer_len == sizeof(char));
break;
- case SQLDT_USHORT: bind->is_unsigned = 1;
+ case SQLDT_USHORT:
+ bind->is_unsigned = 1;
FALLTHROUGH
- case SQLDT_SHORT: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(short));
- buffer_len = sizeof(short);
+ case SQLDT_SHORT:
+ bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(short));
+ Assert_retr(SQL_ERROR, buffer_len == sizeof(short));
break;
- case SQLDT_UINT: bind->is_unsigned = 1;
+ case SQLDT_UINT:
+ bind->is_unsigned = 1;
FALLTHROUGH
- case SQLDT_INT: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(int));
- buffer_len = sizeof(int);
+ case SQLDT_INT:
+ bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(int));
+ Assert_retr(SQL_ERROR, buffer_len == sizeof(int));
break;
- case SQLDT_ULONG: bind->is_unsigned = 1;
+ case SQLDT_ULONG:
+ bind->is_unsigned = 1;
FALLTHROUGH
- case SQLDT_LONG: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(long));
- buffer_len = sizeof(long);
+ case SQLDT_LONG:
+ bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(long));
+ Assert_retr(SQL_ERROR, buffer_len == sizeof(long));
break;
- case SQLDT_ULONGLONG: bind->is_unsigned = 1;
+ case SQLDT_ULONGLONG:
+ bind->is_unsigned = 1;
FALLTHROUGH
- case SQLDT_LONGLONG: bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(int64));
- buffer_len = sizeof(int64);
+ case SQLDT_LONGLONG:
+ bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(long long));
+ Assert_retr(SQL_ERROR, buffer_len == sizeof(long long));
+ break;
+ case SQLDT_BOOL:
+ bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(bool));
+ Assert_retr(SQL_ERROR, buffer_len == sizeof(bool));
+ break;
+ case SQLDT_TIME:
+ bind->buffer_type = Sql_P_SizeToMysqlIntType(sizeof(time_t));
+ Assert_retr(SQL_ERROR, buffer_len == sizeof(time_t));
break;
// floating point
- case SQLDT_FLOAT: bind->buffer_type = MYSQL_TYPE_FLOAT;
- buffer_len = 4;
+ case SQLDT_FLOAT:
+ bind->buffer_type = MYSQL_TYPE_FLOAT;
+ Assert_retr(SQL_ERROR, buffer_len == 4);
break;
- case SQLDT_DOUBLE: bind->buffer_type = MYSQL_TYPE_DOUBLE;
- buffer_len = 8;
+ case SQLDT_DOUBLE:
+ bind->buffer_type = MYSQL_TYPE_DOUBLE;
+ Assert_retr(SQL_ERROR, buffer_len == 8);
break;
// other
case SQLDT_STRING:
- case SQLDT_ENUM: bind->buffer_type = MYSQL_TYPE_STRING;
+ case SQLDT_ENUM:
+ bind->buffer_type = MYSQL_TYPE_STRING;
break;
- case SQLDT_BLOB: bind->buffer_type = MYSQL_TYPE_BLOB;
+ case SQLDT_BLOB:
+ bind->buffer_type = MYSQL_TYPE_BLOB;
break;
default:
ShowDebug("Sql_P_BindSqlDataType: unsupported buffer type (%u)\n", buffer_type);
diff --git a/src/common/sql.h b/src/common/sql.h
index 4d9a12cc1..11127c66c 100644
--- a/src/common/sql.h
+++ b/src/common/sql.h
@@ -59,6 +59,8 @@ enum SqlDataType {
SQLDT_UINT,
SQLDT_ULONG,
SQLDT_ULONGLONG,
+ SQLDT_BOOL,
+ SQLDT_TIME,
// floating point
SQLDT_FLOAT,
SQLDT_DOUBLE,
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 70d4f3dfb..66ede6cfa 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -599,16 +599,16 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
if( SQL_SUCCESS != SQL->StmtPrepare(stmt,
"INSERT INTO `%s` (`account_id`, `userid`, `user_pass`, `sex`, `email`, `group_id`, `state`, `unban_time`, `expiration_time`, `logincount`, `lastlogin`, `last_ip`, `birthdate`, `character_slots`, `pincode`, `pincode_change`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
db->account_db)
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_INT, &acc->account_id, sizeof(acc->account_id))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_INT, &acc->account_id, sizeof acc->account_id)
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, acc->userid, strlen(acc->userid))
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 2, SQLDT_STRING, acc->pass, strlen(acc->pass))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 3, SQLDT_ENUM, &acc->sex, sizeof(acc->sex))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 3, SQLDT_ENUM, &acc->sex, sizeof acc->sex)
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 4, SQLDT_STRING, &acc->email, strlen(acc->email))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 5, SQLDT_INT, &acc->group_id, sizeof(acc->group_id))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 6, SQLDT_UINT, &acc->state, sizeof(acc->state))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 7, SQLDT_LONG, &acc->unban_time, sizeof(acc->unban_time))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 8, SQLDT_INT, &acc->expiration_time, sizeof(acc->expiration_time))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 9, SQLDT_UINT, &acc->logincount, sizeof(acc->logincount))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 5, SQLDT_INT, &acc->group_id, sizeof acc->group_id)
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 6, SQLDT_UINT, &acc->state, sizeof acc->state)
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 7, SQLDT_TIME, &acc->unban_time, sizeof acc->unban_time)
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 8, SQLDT_TIME, &acc->expiration_time, sizeof acc->expiration_time)
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 9, SQLDT_UINT, &acc->logincount, sizeof acc->logincount)
|| SQL_SUCCESS != (acc->lastlogin[0] < '1' || acc->lastlogin[0] > '9' ?
SQL->StmtBindParam(stmt, 10, SQLDT_NULL, NULL, 0) :
SQL->StmtBindParam(stmt, 10, SQLDT_STRING, &acc->lastlogin, strlen(acc->lastlogin))
@@ -618,9 +618,9 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
SQL->StmtBindParam(stmt, 12, SQLDT_NULL, NULL, 0) :
SQL->StmtBindParam(stmt, 12, SQLDT_STRING, &acc->birthdate, strlen(acc->birthdate))
)
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 13, SQLDT_UCHAR, &acc->char_slots, sizeof(acc->char_slots))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 13, SQLDT_UINT8, &acc->char_slots, sizeof acc->char_slots)
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 14, SQLDT_STRING, &acc->pincode, strlen(acc->pincode))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 15, SQLDT_LONG, &acc->pincode_change, sizeof(acc->pincode_change))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 15, SQLDT_UINT, &acc->pincode_change, sizeof acc->pincode_change)
|| SQL_SUCCESS != SQL->StmtExecute(stmt)
) {
SqlStmt_ShowDebug(stmt);
@@ -630,13 +630,13 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
if( SQL_SUCCESS != SQL->StmtPrepare(stmt, "UPDATE `%s` SET `userid`=?,`user_pass`=?,`sex`=?,`email`=?,`group_id`=?,`state`=?,`unban_time`=?,`expiration_time`=?,`logincount`=?,`lastlogin`=?,`last_ip`=?,`birthdate`=?,`character_slots`=?,`pincode`=?,`pincode_change`=? WHERE `account_id` = '%d'", db->account_db, acc->account_id)
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, acc->userid, strlen(acc->userid))
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, acc->pass, strlen(acc->pass))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 2, SQLDT_ENUM, &acc->sex, sizeof(acc->sex))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 2, SQLDT_ENUM, &acc->sex, sizeof acc->sex)
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 3, SQLDT_STRING, acc->email, strlen(acc->email))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 4, SQLDT_INT, &acc->group_id, sizeof(acc->group_id))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 5, SQLDT_UINT, &acc->state, sizeof(acc->state))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 6, SQLDT_LONG, &acc->unban_time, sizeof(acc->unban_time))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 7, SQLDT_LONG, &acc->expiration_time, sizeof(acc->expiration_time))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 8, SQLDT_UINT, &acc->logincount, sizeof(acc->logincount))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 4, SQLDT_INT, &acc->group_id, sizeof acc->group_id)
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 5, SQLDT_UINT, &acc->state, sizeof acc->state)
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 6, SQLDT_TIME, &acc->unban_time, sizeof acc->unban_time)
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 7, SQLDT_TIME, &acc->expiration_time, sizeof acc->expiration_time)
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 8, SQLDT_UINT, &acc->logincount, sizeof acc->logincount)
|| SQL_SUCCESS != (acc->lastlogin[0] < '1' || acc->lastlogin[0] > '9' ?
SQL->StmtBindParam(stmt, 9, SQLDT_NULL, NULL, 0) :
SQL->StmtBindParam(stmt, 9, SQLDT_STRING, &acc->lastlogin, strlen(acc->lastlogin))
@@ -646,9 +646,9 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
SQL->StmtBindParam(stmt, 11, SQLDT_NULL, NULL, 0) :
SQL->StmtBindParam(stmt, 11, SQLDT_STRING, &acc->birthdate, strlen(acc->birthdate))
)
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 12, SQLDT_UCHAR, &acc->char_slots, sizeof(acc->char_slots))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 12, SQLDT_UINT8, &acc->char_slots, sizeof acc->char_slots)
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 13, SQLDT_STRING, &acc->pincode, strlen(acc->pincode))
- || SQL_SUCCESS != SQL->StmtBindParam(stmt, 14, SQLDT_LONG, &acc->pincode_change, sizeof(acc->pincode_change))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 14, SQLDT_UINT, &acc->pincode_change, sizeof acc->pincode_change)
|| SQL_SUCCESS != SQL->StmtExecute(stmt)
) {
SqlStmt_ShowDebug(stmt);
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d9f4810ee..1590c3f0c 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -5296,12 +5296,13 @@ ACMD(skillid)
iter = db_iterator(skill->name2id_db);
for (data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key)) {
- int idx = skill->get_index(DB->data2i(data));
- if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill->dbs->db[idx].desc, message, skillen) == 0) {
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1164), DB->data2i(data), skill->dbs->db[idx].desc, key.str); // skill %d: %s (%s)
+ int skill_id = DB->data2i(data);
+ const char *skill_desc = skill->get_desc(skill_id);
+ if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill_desc, message, skillen) == 0) {
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1164), skill_id, skill_desc, key.str); // skill %d: %s (%s)
clif->message(fd, atcmd_output);
- } else if ( found < MAX_SKILLID_PARTIAL_RESULTS && ( stristr(key.str,message) || stristr(skill->dbs->db[idx].desc,message) ) ) {
- snprintf(partials[found], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_fd(fd,1164), DB->data2i(data), skill->dbs->db[idx].desc, key.str);
+ } else if (found < MAX_SKILLID_PARTIAL_RESULTS && (stristr(key.str, message) != NULL || stristr(skill_desc, message) != NULL)) {
+ snprintf(partials[found], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_fd(fd, 1164), skill_id, skill_desc, key.str);
found++;
}
}
@@ -5428,7 +5429,7 @@ ACMD(skilltree)
for (j = 0; j < VECTOR_LENGTH(entry->need); j++) {
struct skill_tree_requirement *req = &VECTOR_INDEX(entry->need, j);
if (pc->checkskill(sd, req->id) < req->lv) {
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1170), req->lv, skill->dbs->db[req->id].desc); // Player requires level %d of skill %s.
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1170), req->lv, skill->get_desc(req->id)); // Player requires level %d of skill %s.
clif->message(fd, atcmd_output);
meets = 0;
}
@@ -8686,7 +8687,7 @@ ACMD(cart) {
int val = atoi(message);
bool need_skill = pc->checkskill(sd, MC_PUSHCART) ? false : true;
- unsigned int index = skill->get_index(MC_PUSHCART);
+ int index = skill->get_index(MC_PUSHCART);
if (!*message || val < 0 || val > MAX_CARTS) {
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1390),command,MAX_CARTS); // Unknown Cart (usage: %s <0-%d>).
@@ -9394,7 +9395,7 @@ ACMD(cddebug) {
}
if (!cd || (*message && !strcmpi(message,"reset"))) {
- for(i = 0; i < MAX_SKILL; i++) {
+ for (i = 0; i < MAX_SKILL_DB; i++) {
if( sd->blockskill[i] ) {
clif->messages(fd,"Found skill '%s', unblocking...",skill->dbs->db[i].name);
sd->blockskill[i] = false;
diff --git a/src/map/battle.h b/src/map/battle.h
index f6e825e82..429249dca 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -54,6 +54,7 @@ struct status_data;
enum {
// Flag of the final calculation
+ BF_NONE = 0x0000,
BF_WEAPON = 0x0001,
BF_MAGIC = 0x0002,
BF_MISC = 0x0004,
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 39aa046d7..96f144523 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1360,10 +1360,10 @@ void chrif_skillid2idx(int fd) {
if (!sockt->session_is_valid(fd))
return;
- WFIFOHEAD(fd,4 + (MAX_SKILL * 4));
+ WFIFOHEAD(fd,4 + (MAX_SKILL_DB * 4));
WFIFOW(fd,0) = 0x2b0b;
- for(i = 0; i < MAX_SKILL; i++) {
- if( skill->dbs->db[i].nameid ) {
+ for (i = 0; i < MAX_SKILL_DB; i++) {
+ if (skill->dbs->db[i].nameid != 0) {
WFIFOW(fd, 4 + (count*4)) = skill->dbs->db[i].nameid;
WFIFOW(fd, 6 + (count*4)) = i;
count++;
diff --git a/src/map/clif.c b/src/map/clif.c
index eb6b46bec..5f7cf3b5d 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -293,7 +293,11 @@ unsigned char clif_bl_type(struct block_list *bl)
case BL_NPC:
vd = status->get_viewdata(bl);
nullpo_retr(CLUT_NPC, vd);
+#if PACKETVER >= 20170726
+ return CLUT_EVENT;
+#else
return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_EVENT;
+#endif
case BL_PET:
vd = status->get_viewdata(bl);
nullpo_retr(CLUT_NPC, vd);
@@ -3341,17 +3345,22 @@ void clif_changelook(struct block_list *bl,int type,int val)
#if PACKETVER < 4
clif->sendlook(bl, bl->id, type, val, 0, target);
#else
- if(type == LOOK_WEAPON || type == LOOK_SHIELD) {
- nullpo_retv(vd);
- type = LOOK_WEAPON;
- val = vd->weapon;
- val2 = vd->shield;
- }
- if (clif->isdisguised(bl)) {
- clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS);
- clif->sendlook(bl, -bl->id, type, val, val2, SELF);
+ if (bl->type != BL_NPC) {
+ if(type == LOOK_WEAPON || type == LOOK_SHIELD) {
+ nullpo_retv(vd);
+ type = LOOK_WEAPON;
+ val = vd->weapon;
+ val2 = vd->shield;
+ }
+ if (clif->isdisguised(bl)) {
+ clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS);
+ clif->sendlook(bl, -bl->id, type, val, val2, SELF);
+ } else {
+ clif->sendlook(bl, bl->id, type, val, val2, target);
+ }
} else {
- clif->sendlook(bl, bl->id, type, val, val2, target);
+ struct npc_data *nd = BL_UCAST(BL_NPC, bl);
+ npc->refresh(nd);
}
#endif
}
@@ -4857,9 +4866,9 @@ void clif_skillinfoblock(struct map_session_data *sd)
fd=sd->fd;
if (!fd) return;
- WFIFOHEAD(fd, MAX_SKILL * 37 + 4);
+ WFIFOHEAD(fd, MAX_SKILL_DB * 37 + 4);
WFIFOW(fd,0) = 0x10f;
- for ( i = 0, len = 4; i < MAX_SKILL; i++) {
+ for ( i = 0, len = 4; i < MAX_SKILL_DB; i++) {
if( (id = sd->status.skill[i].id) != 0 ) {
int level;
// workaround for bugreport:5348
@@ -4890,7 +4899,7 @@ void clif_skillinfoblock(struct map_session_data *sd)
WFIFOSET(fd,len);
// workaround for bugreport:5348; send the remaining skills one by one to bypass packet size limit
- for ( ; i < MAX_SKILL; i++) {
+ for ( ; i < MAX_SKILL_DB; i++) {
if( (id = sd->status.skill[i].id) != 0 ) {
clif->addskill(sd, id);
clif->skillinfo(sd, id, 0);
@@ -4992,7 +5001,7 @@ void clif_skillinfo(struct map_session_data *sd,int skill_id, int inf)
int skill_lv;
nullpo_retv(sd);
- Assert_retv(idx >= 0 && idx < MAX_SKILL);
+ Assert_retv(idx >= 0 && idx < MAX_SKILL_DB);
skill_lv = sd->status.skill[idx].lv;
@@ -5059,6 +5068,10 @@ void clif_useskill(struct block_list* bl, int src_id, int dst_id, int dst_x, int
} else {
clif->send(buf,packet_len(cmd), bl, AREA);
}
+#if PACKETVER >= 20151223
+ if ((skill->get_inf2(skill_id) & INF2_SHOW_SKILL_SCALE) != 0)
+ clif->skill_scale(bl, src_id, bl->x, bl->y, skill_id, skill_lv, casttime);
+#endif
}
/// Notifies clients in area, that an object canceled casting (ZC_DISPEL).
@@ -17647,7 +17660,7 @@ int clif_autoshadowspell_list(struct map_session_data *sd) {
WFIFOHEAD(fd, 2 * 6 + 4);
WFIFOW(fd,0) = 0x442;
- for( i = 0, c = 0; i < MAX_SKILL; i++ )
+ for (i = 0, c = 0; i < MAX_SKILL_DB; i++)
if( sd->status.skill[i].flag == SKILL_FLAG_PLAGIARIZED && sd->status.skill[i].id > 0 &&
sd->status.skill[i].id < GS_GLITTERING && skill->get_type(sd->status.skill[i].id) == BF_MAGIC )
{ // Can't auto cast both Extended class and 3rd class skills.
@@ -19865,6 +19878,32 @@ void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd)
rodex->clean(sd, 1);
}
+void clif_skill_scale(struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime)
+{
+#if PACKETVER >= 20151223
+ struct PACKET_ZC_SKILL_SCALE p;
+
+ p.PacketType = skillscale;
+ p.AID = src_id;
+ p.skill_id = skill_id;
+ p.skill_lv = skill_lv;
+ p.x = x;
+ p.y = y;
+ p.casttime = casttime;
+
+ if (clif->isdisguised(bl)) {
+ clif->send(&p, sizeof(p), bl, AREA_WOS);
+ p.AID = -src_id;
+ clif->send(&p, sizeof(p), bl, SELF);
+ } else {
+ clif->send(&p, sizeof(p), bl, AREA);
+ }
+#else
+ ShowWarning("clif_skill_scale: showing skill scale available only for clients >= 20151223.");
+ return;
+#endif
+}
+
/*==========================================
* Main client packet processing function
*------------------------------------------*/
@@ -20934,4 +20973,5 @@ void clif_defaults(void) {
clif->rodex_request_items = clif_rodex_request_items;
clif->rodex_icon = clif_rodex_icon;
clif->rodex_send_mails_all = clif_rodex_send_mails_all;
+ clif->skill_scale = clif_skill_scale;
}
diff --git a/src/map/clif.h b/src/map/clif.h
index c321b99d7..e348bbb08 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1403,6 +1403,7 @@ struct clif_interface {
void (*pRodexRequestItems) (int fd, struct map_session_data *sd);
void (*rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result);
void (*rodex_icon) (int fd, bool show);
+ void (*skill_scale) (struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime);
};
#ifdef HERCULES_CORE
diff --git a/src/map/elemental.c b/src/map/elemental.c
index ae1fda0a2..cf1d485e1 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -885,7 +885,7 @@ int read_elementaldb(void) {
estatus->race = atoi(str[20]);
ele = atoi(str[21]);
- estatus->def_ele = ele%10;
+ estatus->def_ele = ele % ELE_MAX;
estatus->ele_lv = ele/20;
if( estatus->def_ele >= ELE_MAX ) {
ShowWarning("Elemental %d has invalid element type %d (max element is %d)\n", db->class_, estatus->def_ele, ELE_MAX - 1);
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index a80392cf6..f3b10fc19 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -124,7 +124,7 @@ struct homun_data {
struct map_session_data *master; //pointer back to its master
int hungry_timer; //[orn]
unsigned int exp_next;
- char blockskill[MAX_SKILL]; // [orn]
+ char blockskill[MAX_SKILL_DB]; // [orn]
int64 masterteleport_timer;
};
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 4cdb91b21..02015e011 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -211,9 +211,9 @@ void script_load_mapreg(void) {
mapreg->skip_insert = true;
- SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &varname[0], sizeof(varname), &length, NULL);
- SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &index, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &value[0], sizeof(value), NULL, NULL);
+ SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &varname, sizeof varname, &length, NULL);
+ SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &index, sizeof index, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &value, sizeof value, NULL, NULL);
while ( SQL_SUCCESS == SQL->StmtNextRow(stmt) ) {
int s = script->add_str(varname);
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index f5d3fe11c..c4b692008 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -465,7 +465,7 @@ bool read_mercenarydb_sub(char* str[], int columns, int current) {
mstatus->race = atoi(str[20]);
ele = atoi(str[21]);
- mstatus->def_ele = ele%10;
+ mstatus->def_ele = ele % ELE_MAX;
mstatus->ele_lv = ele/20;
if( mstatus->def_ele >= ELE_MAX ) {
ShowWarning("Mercenary %d has invalid element type %d (max element is %d)\n", db->class_, mstatus->def_ele, ELE_MAX - 1);
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 0af75e8a2..f3773f191 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -92,7 +92,7 @@ struct mercenary_data {
struct regen_data regen;
struct s_mercenary_db *db;
struct s_mercenary mercenary;
- char blockskill[MAX_SKILL];
+ char blockskill[MAX_SKILL_DB];
struct map_session_data *master;
int contract_timer;
diff --git a/src/map/mob.c b/src/map/mob.c
index 208617b5d..f509ecace 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -4846,7 +4846,7 @@ bool mob_parse_row_mobskilldb(char** str, int columns, int current)
struct mob_skill *ms, gms;
int mob_id;
int i =0, j, tmp;
- uint16 sidx = 0;
+ int sidx = 0;
nullpo_retr(false, str);
mob_id = atoi(str[0]);
diff --git a/src/map/npc.c b/src/map/npc.c
index de5335302..d3dfb39d2 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -114,6 +114,8 @@ bool npc_db_checkid(int id)
return true;
if (id >= MAX_NPC_CLASS2_START && id < MAX_NPC_CLASS2_END) // Second range
return true;
+ if (pc->db_checkid(id))
+ return true;
// Anything else is invalid
return false;
}
@@ -1558,9 +1560,9 @@ void npc_market_fromsql(void)
return;
}
- SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &name[0], sizeof(name), NULL, NULL);
- SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &itemid, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &amount, 0, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &name, sizeof name, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &itemid, sizeof itemid, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &amount, sizeof amount, NULL, NULL);
while ( SQL_SUCCESS == SQL->StmtNextRow(stmt) ) {
struct npc_data *nd = NULL;
@@ -2706,6 +2708,7 @@ struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, u
nd->area_size = AREA_SIZE + 1;
nd->class_ = class_;
nd->speed = 200;
+ nd->vd = npc_viewdb[0]; // Copy INVISIBLE_CLASS view data. Actual view data is set by npc->add_to_location() later.
return nd;
}
@@ -3656,6 +3659,18 @@ void npc_setclass(struct npc_data* nd, short class_) {
clif->spawn(&nd->bl);// fade in
}
+void npc_refresh(struct npc_data* nd)
+{
+ nullpo_retv(nd);
+
+ if (map->list[nd->bl.m].users) {
+ // using here CLR_TRICKDEAD because other flags show effects.
+ // probably need use other flag or other way to refresh npc.
+ clif->clearunit_area(&nd->bl, CLR_TRICKDEAD); // fade out
+ clif->spawn(&nd->bl); // fade in
+ }
+}
+
// @commands (script based)
int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const char* message, const char* eventname)
{
@@ -4999,7 +5014,6 @@ int do_init_npc(bool minimal) {
npc_viewdb[i].class = i;
for( i = MAX_NPC_CLASS2_START; i < MAX_NPC_CLASS2_END; i++ )
npc_viewdb2[i - MAX_NPC_CLASS2_START].class = i;
-
npc->ev_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, EVENT_NAME_LENGTH);
npc->ev_label_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, NAME_LENGTH);
npc->name_db = strdb_alloc(DB_OPT_BASE, NAME_LENGTH);
@@ -5194,4 +5208,5 @@ void npc_defaults(void) {
npc->market_delfromsql = npc_market_delfromsql;
npc->market_delfromsql_sub = npc_market_delfromsql_sub;
npc->db_checkid = npc_db_checkid;
+ npc->refresh = npc_refresh;
}
diff --git a/src/map/npc.h b/src/map/npc.h
index 3bd11d536..8bb38f252 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -70,7 +70,7 @@ struct npc_parse;
struct npc_data {
struct block_list bl;
struct unit_data *ud;
- struct view_data *vd;
+ struct view_data vd;
unsigned int option;
struct npc_data *master_nd;
short class_;
@@ -309,6 +309,7 @@ struct npc_interface {
void (*market_delfromsql) (struct npc_data *nd, unsigned short index);
void (*market_delfromsql_sub) (const char *npcname, unsigned short index);
bool (*db_checkid) (const int id);
+ void (*refresh) (struct npc_data* nd);
/**
* For the Secure NPC Timeout option (check config/Secure.h) [RR]
**/
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 03b555e2b..e1395e949 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -330,6 +330,9 @@ enum packet_headers {
#else // PACKETVER >= 20160316
rodexcheckplayer = 0x0A51,
#endif
+#if PACKETVER >= 20151223
+ skillscale = 0xA41,
+#endif
};
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
@@ -1478,6 +1481,16 @@ struct PACKET_ZC_ACK_ITEM_FROM_MAIL {
int8 result;
} __attribute__((packed));
+struct PACKET_ZC_SKILL_SCALE {
+ int16 PacketType;
+ uint32 AID;
+ int16 skill_id;
+ int16 skill_lv;
+ int16 x;
+ int16 y;
+ uint32 casttime;
+} __attribute__((packed));
+
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
#pragma pack(pop)
#endif // not NetBSD < 6 / Solaris
diff --git a/src/map/pc.c b/src/map/pc.c
index 0636ebafa..d5d359557 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1560,7 +1560,7 @@ int pc_calc_skillpoint(struct map_session_data* sd) {
nullpo_ret(sd);
- for (i = 1; i < MAX_SKILL; i++) {
+ for (i = 1; i < MAX_SKILL_DB; i++) {
int skill_lv = pc->checkskill2(sd,i);
if (skill_lv > 0) {
inf2 = skill->dbs->db[i].inf2;
@@ -1596,7 +1596,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
}
classidx = pc->class2idx(class);
- for( i = 0; i < MAX_SKILL; i++ ) {
+ for (i = 0; i < MAX_SKILL_DB; i++) {
if( sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED ) //Don't touch these
sd->status.skill[i].id = 0; //First clear skills.
/* permanent skills that must be re-checked */
@@ -1613,7 +1613,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
}
}
- for( i = 0; i < MAX_SKILL; i++ ) {
+ for (i = 0; i < MAX_SKILL_DB; i++) {
if( sd->status.skill[i].flag != SKILL_FLAG_PERMANENT && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED && sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED )
{ // Restore original level of skills after deleting earned skills.
sd->status.skill[i].lv = (sd->status.skill[i].flag == SKILL_FLAG_TEMPORARY) ? 0 : sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0;
@@ -1622,18 +1622,25 @@ int pc_calc_skilltree(struct map_session_data *sd)
if( sd->sc.count && sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_BARDDANCER && skill->dbs->db[i].nameid >= DC_HUMMING && skill->dbs->db[i].nameid <= DC_SERVICEFORYOU )
{ //Enable Bard/Dancer spirit linked skills.
- if( sd->status.sex )
- { //Link dancer skills to bard.
- // i can be < 8?
- if( sd->status.skill[i-8].lv < 10 )
+ if (sd->status.sex) {
+ // Link dancer skills to bard.
+ if (i < 8) {
+ Assert_report(i >= 8);
+ continue;
+ }
+ if (sd->status.skill[i-8].lv < 10)
continue;
sd->status.skill[i].id = skill->dbs->db[i].nameid;
sd->status.skill[i].lv = sd->status.skill[i-8].lv; // Set the level to the same as the linking skill
sd->status.skill[i].flag = SKILL_FLAG_TEMPORARY; // Tag it as a non-savable, non-uppable, bonus skill
- } else { //Link bard skills to dancer.
- if( sd->status.skill[i].lv < 10 )
+ } else {
+ // Link bard skills to dancer.
+ if (i < 8) {
+ Assert_report(i >= 8);
+ continue;
+ }
+ if (sd->status.skill[i].lv < 10)
continue;
- // i can be < 8?
sd->status.skill[i-8].id = skill->dbs->db[i-8].nameid;
sd->status.skill[i-8].lv = sd->status.skill[i].lv; // Set the level to the same as the linking skill
sd->status.skill[i-8].flag = SKILL_FLAG_TEMPORARY; // Tag it as a non-savable, non-uppable, bonus skill
@@ -1642,7 +1649,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
}
if( pc_has_permission(sd, PC_PERM_ALL_SKILL) ) {
- for( i = 0; i < MAX_SKILL; i++ ) {
+ for (i = 0; i < MAX_SKILL_DB; i++) {
switch(skill->dbs->db[i].nameid) {
/**
* Dummy skills must be added here otherwise they'll be displayed in the,
@@ -1836,7 +1843,7 @@ int pc_clean_skilltree(struct map_session_data *sd)
{
int i;
nullpo_ret(sd);
- for (i = 0; i < MAX_SKILL; i++){
+ for (i = 0; i < MAX_SKILL_DB; i++) {
if (sd->status.skill[i].flag == SKILL_FLAG_TEMPORARY || sd->status.skill[i].flag == SKILL_FLAG_PLAGIARIZED) {
sd->status.skill[i].id = 0;
sd->status.skill[i].lv = 0;
@@ -4143,7 +4150,7 @@ int pc_bonus5(struct map_session_data *sd,int type,int type2,int type3,int type4
*------------------------------------------*/
int pc_skill(struct map_session_data *sd, int id, int level, int flag)
{
- uint16 index = 0;
+ int index = 0;
nullpo_ret(sd);
if (!(index = skill->get_index(id))) {
@@ -5869,7 +5876,7 @@ int pc_memo(struct map_session_data* sd, int pos) {
* Return player sd skill_lv learned for given skill
*------------------------------------------*/
int pc_checkskill(struct map_session_data *sd,uint16 skill_id) {
- uint16 index = 0;
+ int index = 0;
if(sd == NULL) return 0;
if( skill_id >= GD_SKILLBASE && skill_id < GD_MAX ) {
struct guild *g;
@@ -5888,8 +5895,9 @@ int pc_checkskill(struct map_session_data *sd,uint16 skill_id) {
return 0;
}
int pc_checkskill2(struct map_session_data *sd,uint16 index) {
- if(sd == NULL) return 0;
- if(index >= ARRAYLENGTH(sd->status.skill) ) {
+ if (sd == NULL)
+ return 0;
+ if (index >= MAX_SKILL_DB) {
ShowError("pc_checkskill: Invalid skill index %d (char_id=%d).\n", index, sd->status.char_id);
return 0;
}
@@ -7229,7 +7237,7 @@ int pc_statusup2(struct map_session_data* sd, int type, int val)
* Skill point allocation
*------------------------------------------*/
int pc_skillup(struct map_session_data *sd,uint16 skill_id) {
- uint16 index = 0;
+ int index = 0;
nullpo_ret(sd);
if( skill_id >= GD_SKILLBASE && skill_id < GD_SKILLBASE+MAX_GUILDSKILL ) {
@@ -7286,7 +7294,7 @@ int pc_allskillup(struct map_session_data *sd)
nullpo_ret(sd);
- for(i=0;i<MAX_SKILL;i++){
+ for (i = 0; i < MAX_SKILL_DB; i++) {
if (sd->status.skill[i].flag != SKILL_FLAG_PERMANENT && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED && sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED) {
sd->status.skill[i].lv = (sd->status.skill[i].flag == SKILL_FLAG_TEMPORARY) ? 0 : sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0;
sd->status.skill[i].flag = SKILL_FLAG_PERMANENT;
@@ -7297,7 +7305,7 @@ int pc_allskillup(struct map_session_data *sd)
if (pc_has_permission(sd, PC_PERM_ALL_SKILL)) { //Get ALL skills except npc/guild ones. [Skotlex]
//and except SG_DEVIL [Komurka] and MO_TRIPLEATTACK and RG_SNATCHER [ultramage]
- for(i=0;i<MAX_SKILL;i++){
+ for (i = 0; i < MAX_SKILL_DB; i++) {
switch( skill->dbs->db[i].nameid ) {
case SG_DEVIL:
case MO_TRIPLEATTACK:
@@ -7537,9 +7545,7 @@ int pc_resetskill(struct map_session_data* sd, int flag)
status_change_end(&sd->bl, SC_SPRITEMABLE, INVALID_TIMER);
}
- for( i = 1; i < MAX_SKILL; i++ ) {
- // FIXME: We're looping on i = [1..MAX_SKILL-1] (which makes sense as index for sd->status.skill[]) but then we're using the
- // same i to access skill->dbs->db[], and especially to check skill_ischangesex(). This is wrong.
+ for (i = 1; i < MAX_SKILL_DB; i++) {
uint16 skill_id = 0;
int lv = sd->status.skill[i].lv;
if (lv < 1) continue;
diff --git a/src/map/pc.h b/src/map/pc.h
index 50cb1b68e..df0df979d 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -292,7 +292,7 @@ struct map_session_data {
uint16 skill_id_old,skill_lv_old;
uint16 skill_id_dance,skill_lv_dance;
short cook_mastery; // range: [0,1999] [Inkfish]
- bool blockskill[MAX_SKILL];
+ bool blockskill[MAX_SKILL_DB];
int cloneskill_id, reproduceskill_id;
int menuskill_id, menuskill_val, menuskill_val2;
int invincible_timer;
diff --git a/src/map/script.c b/src/map/script.c
index 2d4f60f37..7f7aba183 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12190,7 +12190,7 @@ BUILDIN(homunculus_mutate)
if (script_hasdata(st,2))
homun_id = script_getnum(st,2);
else
- homun_id = 6048 + (rnd() % 4);
+ homun_id = HOMID_EIRA + (rnd() % 4);
m_class = homun->class2type(sd->hd->homunculus.class_);
m_id = homun->class2type(homun_id);
@@ -14081,53 +14081,61 @@ BUILDIN(getiteminfo)
}
switch (n) {
- case 0:
+ case ITEMINFO_BUYPRICE:
script_pushint(st, it->value_buy);
break;
- case 1:
+ case ITEMINFO_SELLPRICE:
script_pushint(st, it->value_sell);
break;
- case 2:
+ case ITEMINFO_TYPE:
script_pushint(st, it->type);
break;
- case 3:
+ case ITEMINFO_MAXCHANCE:
script_pushint(st, it->maxchance);
break;
- case 4:
+ case ITEMINFO_SEX:
script_pushint(st, it->sex);
break;
- case 5:
+ case ITEMINFO_LOC:
script_pushint(st, it->equip);
break;
- case 6:
+ case ITEMINFO_WEIGHT:
script_pushint(st, it->weight);
break;
- case 7:
+ case ITEMINFO_ATK:
script_pushint(st, it->atk);
break;
- case 8:
+ case ITEMINFO_DEF:
script_pushint(st, it->def);
break;
- case 9:
+ case ITEMINFO_RANGE:
script_pushint(st, it->range);
break;
- case 10:
+ case ITEMINFO_SLOTS:
script_pushint(st, it->slot);
break;
- case 11:
+ case ITEMINFO_SUBTYPE:
script_pushint(st, it->subtype);
break;
- case 12:
+ case ITEMINFO_ELV:
script_pushint(st, it->elv);
break;
- case 13:
+ case ITEMINFO_WLV:
script_pushint(st, it->wlv);
break;
- case 14:
+ case ITEMINFO_VIEWID:
script_pushint(st, it->view_id);
break;
+ case ITEMINFO_MATK:
+ script_pushint(st, it->matk);
+ break;
+ case ITEMINFO_VIEWSPRITE:
+ script_pushint(st, it->view_sprite);
+ break;
default:
+ ShowError("buildin_getiteminfo: Invalid item type %d.\n", n);
script_pushint(st,-1);
+ return false;
}
return true;
}
@@ -14339,54 +14347,61 @@ BUILDIN(setiteminfo)
}
switch (n) {
- case 0:
+ case ITEMINFO_BUYPRICE:
it->value_buy = value;
break;
- case 1:
+ case ITEMINFO_SELLPRICE:
it->value_sell = value;
break;
- case 2:
+ case ITEMINFO_TYPE:
it->type = value;
break;
- case 3:
+ case ITEMINFO_MAXCHANCE:
it->maxchance = value;
break;
- case 4:
+ case ITEMINFO_SEX:
it->sex = value;
break;
- case 5:
+ case ITEMINFO_LOC:
it->equip = value;
break;
- case 6:
+ case ITEMINFO_WEIGHT:
it->weight = value;
break;
- case 7:
+ case ITEMINFO_ATK:
it->atk = value;
break;
- case 8:
+ case ITEMINFO_DEF:
it->def = value;
break;
- case 9:
+ case ITEMINFO_RANGE:
it->range = value;
break;
- case 10:
+ case ITEMINFO_SLOTS:
it->slot = value;
break;
- case 11:
+ case ITEMINFO_SUBTYPE:
it->subtype = value;
break;
- case 12:
+ case ITEMINFO_ELV:
it->elv = value;
break;
- case 13:
+ case ITEMINFO_WLV:
it->wlv = value;
break;
- case 14:
+ case ITEMINFO_VIEWID:
it->view_id = value;
break;
+ case ITEMINFO_MATK:
+ it->matk = value;
+ break;
+ case ITEMINFO_VIEWSPRITE:
+ it->view_sprite = value;
+ break;
default:
+ ShowError("buildin_setiteminfo: invalid type %d.\n", n);
script_pushint(st,-1);
- return true;
+ return false;
}
script_pushint(st,value);
return true;
@@ -14590,7 +14605,7 @@ BUILDIN(getskilllist)
int i,j=0;
if (sd == NULL)
return true;
- for(i=0;i<MAX_SKILL;i++) {
+ for (i = 0; i < MAX_SKILL_DB; i++) {
if(sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0) {
pc->setreg(sd,reference_uid(script->add_str("@skilllist_id"), j),sd->status.skill[i].id);
pc->setreg(sd,reference_uid(script->add_str("@skilllist_lv"), j),sd->status.skill[i].lv);
@@ -18217,6 +18232,8 @@ BUILDIN(setunitdata)
case UDT_INTIMACY:
case UDT_LIFETIME:
case UDT_MERC_KILLCOUNT:
+ case UDT_ROBE:
+ case UDT_BODY2:
setunitdata_check_min(4, 0);
break;
case UDT_MASTERAID:
@@ -19155,6 +19172,40 @@ BUILDIN(setunitdata)
case UDT_DMOTION:
nd->status.dmotion = (unsigned short) val;
break;
+ case UDT_SEX:
+ nd->vd.sex = (char)val;
+ npc->refresh(nd);
+ break;
+ case UDT_HAIRSTYLE:
+ clif->changelook(bl, LOOK_HAIR, val);
+ break;
+ case UDT_HAIRCOLOR:
+ clif->changelook(bl, LOOK_HAIR_COLOR, val);
+ break;
+ case UDT_HEADBOTTOM:
+ clif->changelook(bl, LOOK_HEAD_BOTTOM, val);
+ break;
+ case UDT_HEADMIDDLE:
+ clif->changelook(bl, LOOK_HEAD_MID, val);
+ break;
+ case UDT_HEADTOP:
+ clif->changelook(bl, LOOK_HEAD_TOP, val);
+ break;
+ case UDT_CLOTHCOLOR:
+ clif->changelook(bl, LOOK_CLOTHES_COLOR, val);
+ break;
+ case UDT_SHIELD:
+ clif->changelook(bl, LOOK_SHIELD, val);
+ break;
+ case UDT_WEAPON:
+ clif->changelook(bl, LOOK_WEAPON, val);
+ break;
+ case UDT_ROBE:
+ clif->changelook(bl, LOOK_ROBE, val);
+ break;
+ case UDT_BODY2:
+ clif->changelook(bl, LOOK_BODY2, val);
+ break;
default:
ShowWarning("buildin_setunitdata: Invalid data type '%s' for NPC unit.\n", udtype);
script_pushint(st, 0);
@@ -19565,6 +19616,18 @@ BUILDIN(getunitdata)
case UDT_AMOTION: script_pushint(st, nd->status.amotion); break;
case UDT_ADELAY: script_pushint(st, nd->status.adelay); break;
case UDT_DMOTION: script_pushint(st, nd->status.dmotion); break;
+ case UDT_SEX: script_pushint(st, nd->vd.sex); break;
+ case UDT_CLASS: script_pushint(st, nd->vd.class); break;
+ case UDT_HAIRSTYLE: script_pushint(st, nd->vd.hair_style); break;
+ case UDT_HAIRCOLOR: script_pushint(st, nd->vd.hair_color); break;
+ case UDT_HEADBOTTOM: script_pushint(st, nd->vd.head_bottom); break;
+ case UDT_HEADMIDDLE: script_pushint(st, nd->vd.head_mid); break;
+ case UDT_HEADTOP: script_pushint(st, nd->vd.head_top); break;
+ case UDT_CLOTHCOLOR: script_pushint(st, nd->vd.cloth_color); break;
+ case UDT_SHIELD: script_pushint(st, nd->vd.shield); break;
+ case UDT_WEAPON: script_pushint(st, nd->vd.weapon); break;
+ case UDT_ROBE: script_pushint(st, nd->vd.robe); break;
+ case UDT_BODY2: script_pushint(st, nd->vd.body_style); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for NPC unit.\n", udtype);
script_pushint(st, 0);
@@ -21140,72 +21203,90 @@ BUILDIN(has_instance)
const char *str;
int16 m;
int instance_id = -1;
+ int i = 0, j = 0;
bool type = strcmp(script->getfuncname(st),"has_instance2") == 0 ? true : false;
str = script_getstr(st, 2);
- if( (m = map->mapname2mapid(str)) < 0 ) {
- if( type )
+ if ((m = map->mapname2mapid(str)) < 0) {
+ if (type) {
script_pushint(st, -1);
- else
+ } else {
script_pushconststr(st, "");
+ }
return true;
}
- if( script_hasdata(st, 3) )
+ if (script_hasdata(st, 3))
instance_id = script_getnum(st, 3);
- else if( st->instance_id >= 0 )
+ else if (st->instance_id >= 0)
instance_id = st->instance_id;
- else if( (sd = script->rid2sd(st)) != NULL ) {
+ else if ((sd = script->rid2sd(st)) != NULL) {
struct party_data *p;
- int i = 0, j = 0;
- if( sd->instances ) {
- for( i = 0; i < sd->instances; i++ ) {
- if( sd->instance[i] >= 0 ) {
+ if (sd->instances) {
+ for (i = 0; i < sd->instances; i++) {
+ if (sd->instance[i] >= 0) {
ARR_FIND(0, instance->list[sd->instance[i]].num_map, j, map->list[instance->list[sd->instance[i]].map[j]].instance_src_map == m);
- if( j != instance->list[sd->instance[i]].num_map )
+ if (j != instance->list[sd->instance[i]].num_map)
break;
}
}
- if( i != sd->instances )
+ if (i != sd->instances) {
instance_id = sd->instance[i];
+ }
}
if (instance_id == -1 && sd->status.party_id && (p = party->search(sd->status.party_id)) != NULL && p->instances) {
- for( i = 0; i < p->instances; i++ ) {
- if( p->instance[i] >= 0 ) {
+ for (i = 0; i < p->instances; i++) {
+ if (p->instance[i] >= 0) {
ARR_FIND(0, instance->list[p->instance[i]].num_map, j, map->list[instance->list[p->instance[i]].map[j]].instance_src_map == m);
- if( j != instance->list[p->instance[i]].num_map )
+ if (j != instance->list[p->instance[i]].num_map)
break;
}
}
- if( i != p->instances )
+ if (i != p->instances) {
instance_id = p->instance[i];
+ }
}
- if( instance_id == -1 && sd->guild && sd->guild->instances ) {
- for( i = 0; i < sd->guild->instances; i++ ) {
- if( sd->guild->instance[i] >= 0 ) {
+ if (instance_id == -1 && sd->guild && sd->guild->instances) {
+ for (i = 0; i < sd->guild->instances; i++) {
+ if (sd->guild->instance[i] >= 0) {
ARR_FIND(0, instance->list[sd->guild->instance[i]].num_map, j, map->list[instance->list[sd->guild->instance[i]].map[j]].instance_src_map == m);
- if( j != instance->list[sd->guild->instance[i]].num_map )
+ if (j != instance->list[sd->guild->instance[i]].num_map)
break;
}
}
- if( i != sd->guild->instances )
+ if (i != sd->guild->instances)
instance_id = sd->guild->instance[i];
}
}
- if( !instance->valid(instance_id) || (m = instance->map2imap(m, instance_id)) < 0 ) {
- if( type )
+ if (instance_id == -1) {
+ for (i = 0; i < instance->instances; i++) {
+ if (instance->list[i].state != INSTANCE_FREE && instance->list[i].owner_type == IOT_NONE && instance->list[i].num_map > 0) {
+ ARR_FIND(0, instance->list[i].num_map, j, map->list[instance->list[i].map[j]].instance_src_map == m);
+ if (j != instance->list[i].num_map)
+ break;
+ }
+ }
+ if (i != instance->instances) {
+ instance_id = instance->list[i].id;
+ }
+ }
+
+ if (!instance->valid(instance_id) || (m = instance->map2imap(m, instance_id)) < 0) {
+ if (type) {
script_pushint(st, -1);
- else
+ } else {
script_pushconststr(st, "");
+ }
return true;
}
- if( type )
+ if (type) {
script_pushint(st, instance_id);
- else
+ } else {
script_pushconststr(st, map->list[m].name);
+ }
return true;
}
@@ -24763,6 +24844,25 @@ void script_hardcoded_constants(void)
script->set_constant("MAPINFO_SIZE_Y", MAPINFO_SIZE_Y, false, false);
script->set_constant("MAPINFO_ZONE", MAPINFO_ZONE, false, false);
+ script->constdb_comment("set/getiteminfo options");
+ script->set_constant("ITEMINFO_BUYPRICE", ITEMINFO_BUYPRICE, false, false);
+ script->set_constant("ITEMINFO_SELLPRICE", ITEMINFO_SELLPRICE, false, false);
+ script->set_constant("ITEMINFO_TYPE", ITEMINFO_TYPE, false, false);
+ script->set_constant("ITEMINFO_MAXCHANCE", ITEMINFO_MAXCHANCE, false, false);
+ script->set_constant("ITEMINFO_SEX", ITEMINFO_SEX, false, false);
+ script->set_constant("ITEMINFO_LOC", ITEMINFO_LOC, false, false);
+ script->set_constant("ITEMINFO_WEIGHT", ITEMINFO_WEIGHT, false, false);
+ script->set_constant("ITEMINFO_ATK", ITEMINFO_ATK, false, false);
+ script->set_constant("ITEMINFO_DEF", ITEMINFO_DEF, false, false);
+ script->set_constant("ITEMINFO_RANGE", ITEMINFO_RANGE, false, false);
+ script->set_constant("ITEMINFO_SLOTS", ITEMINFO_SLOTS, false, false);
+ script->set_constant("ITEMINFO_SUBTYPE", ITEMINFO_SUBTYPE, false, false);
+ script->set_constant("ITEMINFO_ELV", ITEMINFO_ELV, false, false);
+ script->set_constant("ITEMINFO_WLV", ITEMINFO_WLV, false, false);
+ script->set_constant("ITEMINFO_VIEWID", ITEMINFO_VIEWID, false, false);
+ script->set_constant("ITEMINFO_MATK", ITEMINFO_MATK, false, false);
+ script->set_constant("ITEMINFO_VIEWSPRITE", ITEMINFO_VIEWSPRITE, false, false);
+
script->constdb_comment("Renewal");
#ifdef RENEWAL
script->set_constant("RENEWAL", 1, false, false);
diff --git a/src/map/script.h b/src/map/script.h
index 283afa496..14d20838d 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -423,10 +423,37 @@ enum script_unit_data_types {
UDT_LIFETIME,
UDT_MERC_KILLCOUNT,
UDT_STATPOINT,
+ UDT_ROBE,
+ UDT_BODY2,
UDT_MAX
};
/**
+ * Item Info types.
+ */
+enum script_iteminfo_types {
+ ITEMINFO_BUYPRICE = 0,
+ ITEMINFO_SELLPRICE,
+ ITEMINFO_TYPE,
+ ITEMINFO_MAXCHANCE,
+ ITEMINFO_SEX,
+ ITEMINFO_LOC,
+ ITEMINFO_WEIGHT,
+ ITEMINFO_ATK,
+ ITEMINFO_DEF,
+ ITEMINFO_RANGE,
+ ITEMINFO_SLOTS,
+ ITEMINFO_SUBTYPE,
+ ITEMINFO_ELV,
+ ITEMINFO_WLV,
+ ITEMINFO_VIEWID,
+ ITEMINFO_MATK,
+ ITEMINFO_VIEWSPRITE,
+
+ ITEMINFO_MAX
+};
+
+/**
* Structures
**/
diff --git a/src/map/skill.c b/src/map/skill.c
index 726deaa9a..88a29b9a8 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -105,7 +105,7 @@ int skill_name2id(const char* name)
/// Maps skill ids to skill db offsets.
/// Returns the skill's array index, or 0 (Unknown Skill).
-int skill_get_index (uint16 skill_id)
+int skill_get_index(int skill_id)
{
// avoid ranges reserved for mapping guild/homun/mercenary skills
if( (skill_id >= GD_SKILLRANGEMIN && skill_id <= GD_SKILLRANGEMAX)
@@ -138,88 +138,593 @@ int skill_get_index (uint16 skill_id)
}
// validate result
- if( !skill_id || skill_id >= MAX_SKILL_DB )
+ if (skill_id <= 0|| skill_id >= MAX_SKILL_DB)
return 0;
return skill_id;
}
-const char* skill_get_name( uint16 skill_id ) {
+const char *skill_get_name(int skill_id)
+{
return skill->dbs->db[skill->get_index(skill_id)].name;
}
-const char* skill_get_desc( uint16 skill_id ) {
+const char *skill_get_desc(int skill_id)
+{
return skill->dbs->db[skill->get_index(skill_id)].desc;
}
-// out of bounds error checking [celest]
-void skill_chk(uint16* skill_id) {
- *skill_id = skill->get_index(*skill_id); // checks/adjusts id
-}
+#define skill_get_lvl_idx(lv) (min((lv), MAX_SKILL_LEVEL) - 1)
+#define skill_adjust_over_level(val, lv, max_lv) ((val) > 1 ? ((val) + ((lv) - (max_lv)) / 2) : (val))
-#define skill_get(var,id) do { skill->chk(&(id)); if(!(id)) return 0; return (var); } while(0)
-#define skill_get2(var,id,lv) do { \
- skill->chk(&(id)); \
- if(!(id)) return 0; \
- if( (lv) > MAX_SKILL_LEVEL && (var) > 1 ) { \
- int lv2__ = (lv); (lv) = skill->dbs->db[(id)].max; \
- return (var) + ((lv2__-(lv))/2);\
- } \
- return (var);\
-} while(0)
-#define skill_glv(lv) min((lv),MAX_SKILL_LEVEL-1)
// Skill DB
-int skill_get_hit( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].hit, skill_id); }
-int skill_get_inf( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].inf, skill_id); }
-int skill_get_ele( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get (skill->dbs->db[skill_id].element[skill_glv(skill_lv-1)], skill_id); }
-int skill_get_nk( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].nk, skill_id); }
-int skill_get_max( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].max, skill_id); }
-int skill_get_range( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].range[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_splash( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 ( (skill->dbs->db[skill_id].splash[skill_glv(skill_lv-1)]>=0?skill->dbs->db[skill_id].splash[skill_glv(skill_lv-1)]:AREA_SIZE), skill_id, skill_lv); }
-int skill_get_hp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].hp[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_sp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].sp[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_hp_rate(uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].hp_rate[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_sp_rate(uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].sp_rate[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_state(uint16 skill_id) { skill_get (skill->dbs->db[skill_id].state, skill_id); }
-int skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].spiritball[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_itemid(uint16 skill_id, int idx) { skill_get (skill->dbs->db[skill_id].itemid[idx], skill_id); }
-int skill_get_itemqty(uint16 skill_id, int idx) { skill_get (skill->dbs->db[skill_id].amount[idx], skill_id); }
-int skill_get_zeny( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].zeny[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_num( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].num[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_cast( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].cast[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_delay( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].delay[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_walkdelay( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].walkdelay[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_time( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].upkeep_time[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_time2( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].upkeep_time2[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_castdef( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].cast_def_rate, skill_id); }
-int skill_get_weapontype( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].weapon, skill_id); }
-int skill_get_ammotype( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].ammo, skill_id); }
-int skill_get_ammo_qty( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].ammo_qty[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_inf2( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].inf2, skill_id); }
-int skill_get_castcancel( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].castcancel, skill_id); }
-int skill_get_maxcount( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].maxcount[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_blewcount( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].blewcount[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_mhp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].mhp[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_castnodex( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].castnodex[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_delaynodex( uint16 skill_id ,uint16 skill_lv ){ Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].delaynodex[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_type( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].skill_type, skill_id); }
-int skill_get_unit_id ( uint16 skill_id, int flag ){ skill_get (skill->dbs->db[skill_id].unit_id[flag], skill_id); }
-int skill_get_unit_interval( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_interval, skill_id); }
-int skill_get_unit_range( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].unit_range[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_unit_target( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_target&BCT_ALL, skill_id); }
-int skill_get_unit_bl_target( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_target&BL_ALL, skill_id); }
-int skill_get_unit_flag( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_flag, skill_id); }
-int skill_get_unit_layout_type( uint16 skill_id ,uint16 skill_lv ){ Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].unit_layout_type[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_cooldown( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].cooldown[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_fixed_cast( uint16 skill_id ,uint16 skill_lv ) {
+
+int skill_get_hit(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ return skill->dbs->db[idx].hit;
+}
+
+int skill_get_inf(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return INF_NONE;
+ idx = skill->get_index(skill_id);
+ Assert_retr(INF_NONE, idx != 0);
+ return skill->dbs->db[idx].inf;
+}
+
+int skill_get_ele(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return ELE_NEUTRAL;
+ idx = skill->get_index(skill_id);
+ Assert_retr(ELE_NEUTRAL, idx != 0);
+ Assert_retr(ELE_NEUTRAL, skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].element[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].element[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_nk(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return NK_NONE;
+ idx = skill->get_index(skill_id);
+ Assert_retr(NK_NONE, idx != 0);
+ return skill->dbs->db[idx].nk;
+}
+
+int skill_get_max(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ return skill->dbs->db[idx].max;
+}
+
+int skill_get_range(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].range[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].range[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_splash(int skill_id, int skill_lv)
+{
+ int idx, val;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ val = skill->dbs->db[idx].splash[skill_get_lvl_idx(skill_lv)];
+ if (val < 0) {
+ val = AREA_SIZE;
+ }
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return val;
+}
+
+int skill_get_hp(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].hp[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].hp[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_sp(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].sp[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].sp[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_hp_rate(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].hp_rate[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].hp_rate[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_sp_rate(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].sp_rate[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].sp_rate[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_state(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return ST_NONE;
+ idx = skill->get_index(skill_id);
+ Assert_retr(ST_NONE, idx != 0);
+ return skill->dbs->db[idx].state;
+}
+
+int skill_get_spiritball(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].spiritball[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].spiritball[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_itemid(int skill_id, int item_idx)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(item_idx >= 0 && item_idx < MAX_SKILL_ITEM_REQUIRE);
+ return skill->dbs->db[idx].itemid[item_idx];
+}
+
+int skill_get_itemqty(int skill_id, int item_idx)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(item_idx >= 0 && item_idx < MAX_SKILL_ITEM_REQUIRE);
+ return skill->dbs->db[idx].amount[item_idx];
+}
+
+int skill_get_zeny(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].zeny[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].zeny[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_num(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].num[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].num[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_cast(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].cast[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].cast[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_delay(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].delay[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].delay[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_walkdelay(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].walkdelay[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].walkdelay[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_time(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].upkeep_time[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].upkeep_time[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_time2(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].upkeep_time2[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].upkeep_time2[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_castdef(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ return skill->dbs->db[idx].cast_def_rate;
+}
+
+int skill_get_weapontype(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ return skill->dbs->db[idx].weapon;
+}
+
+int skill_get_ammotype(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ return skill->dbs->db[idx].ammo;
+}
+
+int skill_get_ammo_qty(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].ammo_qty[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].ammo_qty[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_inf2(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return INF2_NONE;
+ idx = skill->get_index(skill_id);
+ Assert_retr(INF2_NONE, idx != 0);
+ return skill->dbs->db[idx].inf2;
+}
+
+int skill_get_castcancel(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ return skill->dbs->db[idx].castcancel;
+}
+
+int skill_get_maxcount(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].maxcount[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].maxcount[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_blewcount(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].blewcount[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].blewcount[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_mhp(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].mhp[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].mhp[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_castnodex(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].castnodex[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].castnodex[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_delaynodex(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].delaynodex[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].delaynodex[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_type(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return BF_NONE;
+ idx = skill->get_index(skill_id);
+ Assert_retr(BF_NONE, idx != 0);
+ return skill->dbs->db[idx].skill_type;
+}
+
+int skill_get_unit_id(int skill_id, int flag)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(flag >= 0 && flag < ARRAYLENGTH(skill->dbs->db[0].unit_id));
+ return skill->dbs->db[idx].unit_id[flag];
+}
+
+int skill_get_unit_interval(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ return skill->dbs->db[idx].unit_interval;
+}
+
+int skill_get_unit_range(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].unit_range[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].unit_range[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_unit_target(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return BCT_NOONE;
+ idx = skill->get_index(skill_id);
+ Assert_retr(BCT_NOONE, idx != 0);
+ return skill->dbs->db[idx].unit_target & BCT_ALL;
+}
+
+int skill_get_unit_bl_target(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return BL_NUL;
+ idx = skill->get_index(skill_id);
+ Assert_retr(BL_NUL, idx != 0);
+ return skill->dbs->db[idx].unit_target & BL_ALL;
+}
+
+int skill_get_unit_flag(int skill_id)
+{
+ int idx;
+ if (skill_id == 0)
+ return UF_NONE;
+ idx = skill->get_index(skill_id);
+ Assert_retr(UF_NONE, idx != 0);
+ return skill->dbs->db[idx].unit_flag;
+}
+
+int skill_get_unit_layout_type(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].unit_layout_type[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].unit_layout_type[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_cooldown(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].cooldown[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].cooldown[skill_get_lvl_idx(skill_lv)];
+}
+
+int skill_get_fixed_cast(int skill_id, int skill_lv)
+{
+ int idx;
+ if (skill_id == 0)
+ return 0;
+ idx = skill->get_index(skill_id);
+ Assert_ret(idx != 0);
+ Assert_ret(skill_lv > 0);
#ifdef RENEWAL_CAST
- Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].fixed_cast[skill_glv(skill_lv-1)], skill_id, skill_lv);
+ if (skill_lv > MAX_SKILL_LEVEL) {
+ int val = skill->dbs->db[idx].fixed_cast[skill_get_lvl_idx(skill_lv)];
+ return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
+ }
+ return skill->dbs->db[idx].fixed_cast[skill_get_lvl_idx(skill_lv)];
#else
return 0;
#endif
}
-int skill_tree_get_max(uint16 skill_id, int class)
+int skill_tree_get_max(int skill_id, int class)
{
int i;
int class_idx = pc->class2idx(class);
@@ -231,7 +736,7 @@ int skill_tree_get_max(uint16 skill_id, int class)
return skill->get_max(skill_id);
}
-int skill_get_casttype(uint16 skill_id)
+int skill_get_casttype(int skill_id)
{
int inf = skill->get_inf(skill_id);
if (inf&(INF_GROUND_SKILL))
@@ -248,7 +753,7 @@ int skill_get_casttype(uint16 skill_id)
return CAST_DAMAGE;
}
-int skill_get_casttype2(uint16 index)
+int skill_get_casttype2(int index)
{
int inf;
Assert_retr(CAST_NODAMAGE, index < MAX_SKILL_DB);
@@ -268,7 +773,7 @@ int skill_get_casttype2(uint16 index)
}
//Returns actual skill range taking into account attack range and AC_OWL [Skotlex]
-int skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
+int skill_get_range2(struct block_list *bl, int skill_id, int skill_lv)
{
int range;
struct map_session_data *sd = BL_CAST(BL_PC, bl);
@@ -3175,8 +3680,8 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv,
struct status_data *st;
struct map_session_data *sd = NULL;
int i, hp, sp, hp_rate, sp_rate, state, mhp;
- uint16 idx;
- int itemid[MAX_SKILL_ITEM_REQUIRE],amount[ARRAYLENGTH(itemid)],index[ARRAYLENGTH(itemid)];
+ int idx;
+ int itemid[MAX_SKILL_ITEM_REQUIRE], amount[MAX_SKILL_ITEM_REQUIRE], index[MAX_SKILL_ITEM_REQUIRE];
if( lv < 1 || lv > MAX_SKILL_LEVEL )
return 0;
@@ -3192,8 +3697,7 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv,
return 0;
// Requirements
- for( i = 0; i < ARRAYLENGTH(itemid); i++ )
- {
+ for (i = 0; i < MAX_SKILL_ITEM_REQUIRE; i++) {
itemid[i] = skill->dbs->db[idx].itemid[i];
amount[i] = skill->dbs->db[idx].amount[i];
}
@@ -6666,7 +7170,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
// custom hack to make the mob display the skill, because these skills don't show the skill use text themselves
//NOTE: mobs don't have the sprite animation that is used when performing this skill (will cause glitches)
char temp[70];
- snprintf(temp, sizeof(temp), "%s : %s !!",md->name,skill->dbs->db[skill_id].desc);
+ snprintf(temp, sizeof(temp), "%s : %s !!", md->name, skill->get_desc(skill_id));
clif->disp_overhead(&md->bl,temp);
}
break;
@@ -6865,7 +7369,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
return 1;
}
if( sd->skillitem != skill_id )
- status_zap(src,0,skill->dbs->db[skill->get_index(skill_id)].sp[skill_lv]); // consume sp only if succeeded
+ status_zap(src, 0, skill->get_sp(skill_id, skill_lv)); // consume sp only if succeeded
}
break;
@@ -7041,21 +7545,22 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
return 1;
}
if( sd ) {
- int x,bonus=100, potion = min(500+skill_lv,505);
- x = skill_lv%11 - 1;
- i = pc->search_inventory(sd,skill->dbs->db[skill_id].itemid[x]);
- if (i == INDEX_NOT_FOUND || skill->dbs->db[skill_id].itemid[x] <= 0) {
+ int bonus = 100, potion = min(500+skill_lv,505);
+ int item_idx = (skill_lv - 1) % MAX_SKILL_ITEM_REQUIRE;
+ int item_id = skill->get_itemid(skill_id, item_idx);
+ int inventory_idx = pc->search_inventory(sd, item_id);
+ if (inventory_idx == INDEX_NOT_FOUND || item_id <= 0) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
map->freeblock_unlock();
return 1;
}
- if(sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill->dbs->db[skill_id].amount[x]) {
+ if (sd->inventory_data[inventory_idx] == NULL || sd->status.inventory[inventory_idx].amount < skill->get_itemqty(skill_id, item_idx)) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
map->freeblock_unlock();
return 1;
}
if( skill_id == AM_BERSERKPITCHER ) {
- if (dstsd && dstsd->status.base_level < sd->inventory_data[i]->elv) {
+ if (dstsd != NULL && dstsd->status.base_level < sd->inventory_data[inventory_idx]->elv) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
map->freeblock_unlock();
return 1;
@@ -7064,7 +7569,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
script->potion_flag = 1;
script->potion_hp = script->potion_sp = script->potion_per_hp = script->potion_per_sp = 0;
script->potion_target = bl->id;
- script->run_use_script(sd, sd->inventory_data[i], 0);
+ script->run_use_script(sd, sd->inventory_data[inventory_idx], 0);
script->potion_flag = script->potion_target = 0;
if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ALCHEMIST )
bonus += sd->status.base_level;
@@ -7384,7 +7889,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
maxlv = skill_lv - 4;
}
else if(skill_lv >=2) {
- int i = rnd()%3;
+ int i = rnd() % ARRAYLENGTH(spellarray);
spellid = spellarray[i];
maxlv = skill_lv - 1;
}
@@ -7591,14 +8096,14 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case WE_MALE:
{
- int hp_rate = (!skill_lv)? 0:skill->dbs->db[skill_id].hp_rate[skill_lv-1];
+ int hp_rate = skill_lv == 0 ? 0 : skill->get_hp_rate(skill_id, skill_lv);
int gain_hp = tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it cost the caster. [Skotlex]
clif->skill_nodamage(src,bl,skill_id,status->heal(bl, gain_hp, 0, 0),1);
}
break;
case WE_FEMALE:
{
- int sp_rate = (!skill_lv)? 0:skill->dbs->db[skill_id].sp_rate[skill_lv-1];
+ int sp_rate = skill_lv == 0 ? 0 : skill->get_sp_rate(skill_id, skill_lv);
int gain_sp = tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it cost the caster. [Skotlex]
clif->skill_nodamage(src,bl,skill_id,status->heal(bl, 0, gain_sp, 0),1);
}
@@ -7661,16 +8166,17 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( battle_config.skill_removetrap_type ) {
int i;
// get back all items used to deploy the trap
- for( i = 0; i < 10; i++ ) {
- if( skill->dbs->db[su->group->skill_id].itemid[i] > 0 ) {
+ for (i = 0; i < MAX_SKILL_ITEM_REQUIRE; i++) {
+ int nameid = skill->get_itemid(su->group->skill_id, i);
+ if (nameid > 0) {
int success;
- struct item item_tmp;
- memset(&item_tmp,0,sizeof(item_tmp));
- item_tmp.nameid = skill->dbs->db[su->group->skill_id].itemid[i];
+ struct item item_tmp = { 0 };
+ int amount = skill->get_itemqty(su->group->skill_id, i);
+ item_tmp.nameid = nameid;
item_tmp.identify = 1;
- if (item_tmp.nameid && (success=pc->additem(sd,&item_tmp,skill->dbs->db[su->group->skill_id].amount[i],LOG_TYPE_SKILL)) != 0) {
+ if ((success = pc->additem(sd, &item_tmp, amount, LOG_TYPE_SKILL)) != 0) {
clif->additem(sd,0,0,success);
- map->addflooritem(&sd->bl, &item_tmp, skill->dbs->db[su->group->skill_id].amount[i], sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0);
+ map->addflooritem(&sd->bl, &item_tmp, amount, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0);
}
}
}
@@ -7902,7 +8408,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
map->freeblock_unlock();
return 0;
}
- status_zap(src,0,skill->dbs->db[skill->get_index(skill_id)].sp[skill_lv]); // consume sp only if succeeded [Inkfish]
+ status_zap(src, 0, skill->get_sp(skill_id, skill_lv)); // consume sp only if succeeded [Inkfish]
do {
int eff = rnd() % 14;
if( eff == 5 )
@@ -7926,7 +8432,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
clif->damage(src,bl,0,0,1000,0,BDT_NORMAL,0);
if( !status->isdead(bl) ) {
int where[] = { EQP_ARMOR, EQP_SHIELD, EQP_HELM, EQP_SHOES, EQP_GARMENT };
- skill->break_equip(bl, where[rnd()%5], 10000, BCT_ENEMY);
+ skill->break_equip(bl, where[rnd() % ARRAYLENGTH(where)], 10000, BCT_ENEMY);
}
}
break;
@@ -7947,7 +8453,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case 7: // stop freeze or stoned
{
enum sc_type sc[] = { SC_STOP, SC_FREEZE, SC_STONE };
- sc_start(src,bl,sc[rnd()%3],100,skill_lv,skill->get_time2(skill_id,skill_lv));
+ sc_start(src,bl,sc[rnd() % ARRAYLENGTH(sc)],100,skill_lv,skill->get_time2(skill_id,skill_lv));
}
break;
case 8: // curse coma and poison
@@ -10837,10 +11343,13 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
// Slim Pitcher [Celest]
case CR_SLIMPITCHER:
if (sd) {
- int i = skill_lv%11 - 1;
- int j = pc->search_inventory(sd,skill->dbs->db[skill_id].itemid[i]);
- if (j == INDEX_NOT_FOUND || skill->dbs->db[skill_id].itemid[i] <= 0
- || sd->inventory_data[j] == NULL || sd->status.inventory[j].amount < skill->dbs->db[skill_id].amount[i]
+ int item_idx = (skill_lv - 1) % MAX_SKILL_ITEM_REQUIRE;
+ int item_id = skill->get_itemid(skill_id, item_idx);
+ int inventory_idx = pc->search_inventory(sd, item_id);
+ int bonus;
+ if (inventory_idx == INDEX_NOT_FOUND || item_id <= 0
+ || sd->inventory_data[inventory_idx] == NULL
+ || sd->status.inventory[inventory_idx].amount < skill->get_itemqty(skill_id, item_idx)
) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 1;
@@ -10848,44 +11357,44 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
script->potion_flag = 1;
script->potion_hp = 0;
script->potion_sp = 0;
- script->run_use_script(sd, sd->inventory_data[j], 0);
+ script->run_use_script(sd, sd->inventory_data[inventory_idx], 0);
script->potion_flag = 0;
//Apply skill bonuses
- i = pc->checkskill(sd,CR_SLIMPITCHER)*10
+ bonus = pc->checkskill(sd,CR_SLIMPITCHER)*10
+ pc->checkskill(sd,AM_POTIONPITCHER)*10
+ pc->checkskill(sd,AM_LEARNINGPOTION)*5
+ pc->skillheal_bonus(sd, skill_id);
- script->potion_hp = script->potion_hp * (100+i)/100;
- script->potion_sp = script->potion_sp * (100+i)/100;
+ script->potion_hp = script->potion_hp * (100 + bonus) / 100;
+ script->potion_sp = script->potion_sp * (100 + bonus) / 100;
- if(script->potion_hp > 0 || script->potion_sp > 0) {
- i = skill->get_splash(skill_id, skill_lv);
+ if (script->potion_hp > 0 || script->potion_sp > 0) {
+ r = skill->get_splash(skill_id, skill_lv);
map->foreachinarea(skill->area_sub,
- src->m,x-i,y-i,x+i,y+i,BL_CHAR,
- src,skill_id,skill_lv,tick,flag|BCT_PARTY|BCT_GUILD|1,
+ src->m, x - r, y - r, x + r, y + r, BL_CHAR,
+ src, skill_id, skill_lv, tick, flag|BCT_PARTY|BCT_GUILD|1,
skill->castend_nodamage_id);
}
} else {
- int i = skill_lv%11 - 1;
- struct item_data *item;
- i = skill->dbs->db[skill_id].itemid[i];
- item = itemdb->search(i);
+ int item_idx = (skill_lv - 1) % MAX_SKILL_ITEM_REQUIRE;
+ int item_id = skill->get_itemid(skill_id, item_idx);
+ struct item_data *item = itemdb->search(item_id);
+ int bonus;
script->potion_flag = 1;
script->potion_hp = 0;
script->potion_sp = 0;
script->run(item->script,0,src->id,0);
script->potion_flag = 0;
- i = skill->get_max(CR_SLIMPITCHER)*10;
+ bonus = skill->get_max(CR_SLIMPITCHER)*10;
- script->potion_hp = script->potion_hp * (100+i)/100;
- script->potion_sp = script->potion_sp * (100+i)/100;
+ script->potion_hp = script->potion_hp * (100 + bonus)/100;
+ script->potion_sp = script->potion_sp * (100 + bonus)/100;
- if(script->potion_hp > 0 || script->potion_sp > 0) {
- i = skill->get_splash(skill_id, skill_lv);
+ if (script->potion_hp > 0 || script->potion_sp > 0) {
+ r = skill->get_splash(skill_id, skill_lv);
map->foreachinarea(skill->area_sub,
- src->m,x-i,y-i,x+i,y+i,BL_CHAR,
- src,skill_id,skill_lv,tick,flag|BCT_PARTY|BCT_GUILD|1,
+ src->m, x - r, y - r, x + r, y + r, BL_CHAR,
+ src, skill_id, skill_lv, tick, flag|BCT_PARTY|BCT_GUILD|1,
skill->castend_nodamage_id);
}
}
@@ -11636,27 +12145,27 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
int element[5]={ELE_WIND,ELE_DARK,ELE_POISON,ELE_WATER,ELE_FIRE};
val1 = st->rhw.ele;
- if (!val1)
- val1=element[rnd()%5];
+ if (val1 == ELE_NEUTRAL)
+ val1 = element[rnd() % ARRAYLENGTH(element)];
- switch (val1)
- {
+ switch (val1) {
case ELE_FIRE:
- subunt++;
- FALLTHROUGH
+ subunt = 4;
+ break;
case ELE_WATER:
- subunt++;
- FALLTHROUGH
+ subunt = 3;
+ break;
case ELE_POISON:
- subunt++;
- FALLTHROUGH
+ subunt = 2;
+ break;
case ELE_DARK:
- subunt++;
- FALLTHROUGH
+ subunt = 1;
+ break;
case ELE_WIND:
+ subunt = 0;
break;
default:
- subunt=rnd()%5;
+ subunt = rnd() % 5;
break;
}
@@ -14824,7 +15333,8 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
}
for( i = 0; i < MAX_SKILL_ITEM_REQUIRE; i++ ) {
- if( (skill_id == AM_POTIONPITCHER || skill_id == CR_SLIMPITCHER || skill_id == CR_CULTIVATION) && i != skill_lv%11 - 1 )
+ int item_idx = (skill_lv - 1) % MAX_SKILL_ITEM_REQUIRE;
+ if ((skill_id == AM_POTIONPITCHER || skill_id == CR_SLIMPITCHER || skill_id == CR_CULTIVATION) && i != item_idx)
continue;
switch( skill_id ) {
@@ -16618,15 +17128,16 @@ struct skill_unit_group* skill_id2group(int group_id)
/// Fatal error if nothing is available.
int skill_get_new_group_id(void)
{
- if( skill->unit_group_newid >= MAX_SKILL_DB && skill->id2group(skill->unit_group_newid) == NULL )
+ if (skill->unit_group_newid > MAX_SKILL_ID && skill->id2group(skill->unit_group_newid) == NULL)
return skill->unit_group_newid++;// available
- {// find next id
+
+ {
+ // find next id
int base_id = skill->unit_group_newid;
- while( base_id != ++skill->unit_group_newid )
- {
- if( skill->unit_group_newid < MAX_SKILL_DB )
- skill->unit_group_newid = MAX_SKILL_DB;
- if( skill->id2group(skill->unit_group_newid) == NULL )
+ while (base_id != ++skill->unit_group_newid) {
+ if (skill->unit_group_newid <= MAX_SKILL_ID)
+ skill->unit_group_newid = MAX_SKILL_ID + 1;
+ if (skill->id2group(skill->unit_group_newid) == NULL)
return skill->unit_group_newid++;// available
}
// full loop, nothing available
@@ -17719,7 +18230,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
int difficulty = 30 + rnd()%120; // Random number between (30 ~ 150)
make_per = sd->status.job_level / 4 + st->luk / 2 + st->dex / 3; // (Caster?s Job Level / 4) + (Caster?s LUK / 2) + (Caster?s DEX / 3)
- qty = ~(5 + rnd()%5) + 1;
+ qty = ~(5 + rnd()%5) + 1; // FIXME[Haru]: This smells, if anyone knows the intent, please rewrite the expression in a more clear form.
switch(nameid){// difficulty factor
case ITEMID_APPLE_BOMB:
@@ -17755,7 +18266,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
qty = 5;
if( qty < 0 || (skill_lv == 1 && make_per < difficulty)){
- qty = ~qty + 1;
+ qty = ~qty + 1; // FIXME[Haru]: This smells. If anyone knows the intent, please rewrite the expression in a more clear form.
make_per = 0;
}else
make_per = 10000;
@@ -18012,7 +18523,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
int rate = rnd()%500;
memset(&tmp_item,0,sizeof(tmp_item));
if( rate < 50) i = 4;
- else if( rate < 100) i = 2+rnd()%1;
+ else if( rate < 100) i = 2+rnd()%1; // FIXME[Haru]: This '%1' is certainly not intended. If anyone knows the purpose, please rewrite this code.
else if( rate < 250 ) i = 1;
else if( rate < 500 ) i = 0;
tmp_item.nameid = compensation[i];
@@ -18435,7 +18946,7 @@ int skill_blockpc_end(int tid, int64 tick, int id, intptr_t data)
struct map_session_data *sd = map->id2sd(id);
struct skill_cd * cd = NULL;
- if (data <= 0 || data >= MAX_SKILL)
+ if (data <= 0 || data >= MAX_SKILL_DB)
return 0;
if (!sd || !sd->blockskill[data])
return 0;
@@ -18571,7 +19082,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data)
{
struct homun_data *hd = map->id2hd(id);
- if (data <= 0 || data >= MAX_SKILL)
+ if (data <= 0 || data >= MAX_SKILL_DB)
return 0;
if (hd != NULL)
hd->blockskill[data] = 0;
@@ -18600,7 +19111,7 @@ int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick)
int skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data)
{
struct mercenary_data *md = map->id2mc(id);
- if (data <= 0 || data >= MAX_SKILL)
+ if (data <= 0 || data >= MAX_SKILL_DB)
return 0;
if (md != NULL)
md->blockskill[data] = 0;
@@ -19651,6 +20162,12 @@ void skill_validate_skillinfo(struct config_setting_t *conf, struct s_skill_db *
} else {
sk->inf2 &= ~INF2_FREE_CAST_REDUCED;
}
+ } else if (strcmpi(type, "ShowSkillScale") == 0) {
+ if (on) {
+ sk->inf2 |= INF2_SHOW_SKILL_SCALE;
+ } else {
+ sk->inf2 &= ~INF2_SHOW_SKILL_SCALE;
+ }
} else if (strcmpi(type, "None") != 0) {
skilldb_invalid_error(type, config_setting_name(t), sk->nameid);
}
@@ -20477,7 +20994,7 @@ bool skill_read_skilldb(const char *filename)
struct config_setting_t *sk, *conf;
char filepath[256];
int count=0, index=0;
- bool duplicate[MAX_SKILL] = {0};
+ bool duplicate[MAX_SKILL_DB] = {0};
nullpo_retr(false, filename);
@@ -20902,8 +21419,12 @@ void skill_defaults(void)
skill->get_hp = skill_get_hp;
skill->get_mhp = skill_get_mhp;
skill->get_sp = skill_get_sp;
+ skill->get_hp_rate = skill_get_hp_rate;
+ skill->get_sp_rate = skill_get_sp_rate;
skill->get_state = skill_get_state;
skill->get_spiritball = skill_get_spiritball;
+ skill->get_itemid = skill_get_itemid;
+ skill->get_itemqty = skill_get_itemqty;
skill->get_zeny = skill_get_zeny;
skill->get_num = skill_get_num;
skill->get_cast = skill_get_cast;
@@ -20932,7 +21453,6 @@ void skill_defaults(void)
skill->tree_get_max = skill_tree_get_max;
skill->get_name = skill_get_name;
skill->get_desc = skill_get_desc;
- skill->chk = skill_chk;
skill->get_casttype = skill_get_casttype;
skill->get_casttype2 = skill_get_casttype2;
skill->is_combo = skill_is_combo;
diff --git a/src/map/skill.h b/src/map/skill.h
index bba440107..1e00e488f 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -25,7 +25,7 @@
#include "map/status.h" // enum sc_type
#include "common/hercules.h"
#include "common/db.h"
-#include "common/mmo.h" // MAX_SKILL, struct square
+#include "common/mmo.h" // MAX_SKILL_DB, struct square
/**
* Declarations
@@ -43,7 +43,6 @@ struct status_change_entry;
/**
* Defines
**/
-#define MAX_SKILL_DB MAX_SKILL
#define MAX_SKILL_PRODUCE_DB 270
#define MAX_PRODUCE_RESOURCE 10
#define MAX_SKILL_ARROW_DB 140
@@ -77,6 +76,7 @@ struct status_change_entry;
//Constants to identify the skill's inf value:
enum e_skill_inf {
+ INF_NONE = 0x00,
INF_ATTACK_SKILL = 0x01,
INF_GROUND_SKILL = 0x02,
INF_SELF_SKILL = 0x04, // Skills casted on self where target is automatically chosen
@@ -89,6 +89,7 @@ enum e_skill_inf {
//The NK value applies only to non INF_GROUND_SKILL skills
//when determining skill castend function to invoke.
enum e_skill_nk {
+ NK_NONE = 0x00,
NK_NO_DAMAGE = 0x01,
NK_SPLASH = 0x02|0x04, // 0x4 = splash & split
NK_SPLASH_ONLY = 0x02,
@@ -103,6 +104,7 @@ enum e_skill_nk {
//A skill with 3 would be no damage + splash: area of effect.
//Constants to identify a skill's inf2 value.
enum e_skill_inf2 {
+ INF2_NONE = 0x00000,
INF2_QUEST_SKILL = 0x00001,
INF2_NPC_SKILL = 0x00002, // NPC skills are those that players can't have in their skill tree.
INF2_WEDDING_SKILL = 0x00004,
@@ -120,6 +122,7 @@ enum e_skill_inf2 {
INF2_CHORUS_SKILL = 0x04000, // Chorus skill
INF2_FREE_CAST_NORMAL = 0x08000,
INF2_FREE_CAST_REDUCED = 0x10000,
+ INF2_SHOW_SKILL_SCALE = 0x20000,
};
@@ -132,6 +135,7 @@ enum e_skill_display {
};
enum {
+ UF_NONE = 0x0000,
UF_DEFNOTENEMY = 0x0001, // If 'defunit_not_enemy' is set, the target is changed to 'friend'
UF_NOREITERATION = 0x0002, // Spell cannot be stacked
UF_NOFOOTSET = 0x0004, // Spell cannot be cast near/on targets
@@ -158,7 +162,7 @@ enum wl_spheres {
};
enum {
- ST_NONE,
+ ST_NONE = 0,
ST_HIDING,
ST_CLOAKING,
ST_HIDDEN,
@@ -1930,54 +1934,56 @@ struct skill_interface {
int unit_temp[20]; // temporary storage for tracking skill unit skill ids as players move in/out of them
int unit_group_newid;
/* accesssors */
- int (*get_index) ( uint16 skill_id );
- int (*get_type) ( uint16 skill_id );
- int (*get_hit) ( uint16 skill_id );
- int (*get_inf) ( uint16 skill_id );
- int (*get_ele) ( uint16 skill_id, uint16 skill_lv );
- int (*get_nk) ( uint16 skill_id );
- int (*get_max) ( uint16 skill_id );
- int (*get_range) ( uint16 skill_id, uint16 skill_lv );
- int (*get_range2) (struct block_list *bl, uint16 skill_id, uint16 skill_lv);
- int (*get_splash) ( uint16 skill_id, uint16 skill_lv );
- int (*get_hp) ( uint16 skill_id, uint16 skill_lv );
- int (*get_mhp) ( uint16 skill_id, uint16 skill_lv );
- int (*get_sp) ( uint16 skill_id, uint16 skill_lv );
- int (*get_state) (uint16 skill_id);
- int (*get_spiritball) (uint16 skill_id, uint16 skill_lv);
- int (*get_zeny) ( uint16 skill_id, uint16 skill_lv );
- int (*get_num) ( uint16 skill_id, uint16 skill_lv );
- int (*get_cast) ( uint16 skill_id, uint16 skill_lv );
- int (*get_delay) ( uint16 skill_id, uint16 skill_lv );
- int (*get_walkdelay) ( uint16 skill_id, uint16 skill_lv );
- int (*get_time) ( uint16 skill_id, uint16 skill_lv );
- int (*get_time2) ( uint16 skill_id, uint16 skill_lv );
- int (*get_castnodex) ( uint16 skill_id, uint16 skill_lv );
- int (*get_delaynodex) ( uint16 skill_id ,uint16 skill_lv );
- int (*get_castdef) ( uint16 skill_id );
- int (*get_weapontype) ( uint16 skill_id );
- int (*get_ammotype) ( uint16 skill_id );
- int (*get_ammo_qty) ( uint16 skill_id, uint16 skill_lv );
- int (*get_unit_id) (uint16 skill_id,int flag);
- int (*get_inf2) ( uint16 skill_id );
- int (*get_castcancel) ( uint16 skill_id );
- int (*get_maxcount) ( uint16 skill_id, uint16 skill_lv );
- int (*get_blewcount) ( uint16 skill_id, uint16 skill_lv );
- int (*get_unit_flag) ( uint16 skill_id );
- int (*get_unit_target) ( uint16 skill_id );
- int (*get_unit_interval) ( uint16 skill_id );
- int (*get_unit_bl_target) ( uint16 skill_id );
- int (*get_unit_layout_type) ( uint16 skill_id ,uint16 skill_lv );
- int (*get_unit_range) ( uint16 skill_id, uint16 skill_lv );
- int (*get_cooldown) ( uint16 skill_id, uint16 skill_lv );
- int (*tree_get_max) (uint16 skill_id, int class);
- const char *(*get_name) ( uint16 skill_id );
- const char *(*get_desc) ( uint16 skill_id );
- /* check */
- void (*chk) (uint16* skill_id);
+ int (*get_index) (int skill_id);
+ int (*get_type) (int skill_id);
+ int (*get_hit) (int skill_id);
+ int (*get_inf) (int skill_id);
+ int (*get_ele) (int skill_id, int skill_lv);
+ int (*get_nk) (int skill_id);
+ int (*get_max) (int skill_id);
+ int (*get_range) (int skill_id, int skill_lv);
+ int (*get_range2) (struct block_list *bl, int skill_id, int skill_lv);
+ int (*get_splash) (int skill_id, int skill_lv);
+ int (*get_hp) (int skill_id, int skill_lv);
+ int (*get_mhp) (int skill_id, int skill_lv);
+ int (*get_sp) (int skill_id, int skill_lv);
+ int (*get_hp_rate) (int skill_id, int skill_lv);
+ int (*get_sp_rate) (int skill_id, int skill_lv);
+ int (*get_state) (int skill_id);
+ int (*get_spiritball) (int skill_id, int skill_lv);
+ int (*get_itemid) (int skill_id, int item_idx);
+ int (*get_itemqty) (int skill_id, int item_idx);
+ int (*get_zeny) (int skill_id, int skill_lv);
+ int (*get_num) (int skill_id, int skill_lv);
+ int (*get_cast) (int skill_id, int skill_lv);
+ int (*get_delay) (int skill_id, int skill_lv);
+ int (*get_walkdelay) (int skill_id, int skill_lv);
+ int (*get_time) (int skill_id, int skill_lv);
+ int (*get_time2) (int skill_id, int skill_lv);
+ int (*get_castnodex) (int skill_id, int skill_lv);
+ int (*get_delaynodex) (int skill_id, int skill_lv);
+ int (*get_castdef) (int skill_id);
+ int (*get_weapontype) (int skill_id);
+ int (*get_ammotype) (int skill_id);
+ int (*get_ammo_qty) (int skill_id, int skill_lv);
+ int (*get_unit_id) (int skill_id, int flag);
+ int (*get_inf2) (int skill_id);
+ int (*get_castcancel) (int skill_id);
+ int (*get_maxcount) (int skill_id, int skill_lv);
+ int (*get_blewcount) (int skill_id, int skill_lv);
+ int (*get_unit_flag) (int skill_id);
+ int (*get_unit_target) (int skill_id);
+ int (*get_unit_interval) (int skill_id);
+ int (*get_unit_bl_target) (int skill_id);
+ int (*get_unit_layout_type) (int skill_id, int skill_lv);
+ int (*get_unit_range) (int skill_id, int skill_lv);
+ int (*get_cooldown) (int skill_id, int skill_lv);
+ int (*tree_get_max) (int skill_id, int class);
+ const char *(*get_name) (int skill_id);
+ const char *(*get_desc) (int skill_id);
/* whether its CAST_GROUND, CAST_DAMAGE or CAST_NODAMAGE */
- int (*get_casttype) (uint16 skill_id);
- int (*get_casttype2) (uint16 index);
+ int (*get_casttype) (int skill_id);
+ int (*get_casttype2) (int index);
bool (*is_combo) (int skill_id);
int (*name2id) (const char* name);
int (*isammotype) (struct map_session_data *sd, int skill_id);
@@ -2071,7 +2077,7 @@ struct skill_interface {
int (*check_condition_mob_master_sub) (struct block_list *bl, va_list ap);
void (*brandishspear_first) (struct square *tc, uint8 dir, int16 x, int16 y);
void (*brandishspear_dir) (struct square* tc, uint8 dir, int are);
- int (*get_fixed_cast) ( uint16 skill_id ,uint16 skill_lv );
+ int (*get_fixed_cast) (int skill_id, int skill_lv);
int (*sit_count) (struct block_list *bl, va_list ap);
int (*sit_in) (struct block_list *bl, va_list ap);
int (*sit_out) (struct block_list *bl, va_list ap);
diff --git a/src/map/status.c b/src/map/status.c
index e0893aa36..ddb8c7e6a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -159,7 +159,7 @@ void initChangeTables(void)
for (i = 0; i < SC_MAX; i++)
status->dbs->IconChangeTable[i] = SI_BLANK;
- for (i = 0; i < MAX_SKILL; i++)
+ for (i = 0; i < MAX_SKILL_DB; i++)
status->dbs->Skill2SCTable[i] = SC_NONE;
for (i = 0; i < SI_MAX; i++)
@@ -2329,7 +2329,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
static int calculating = 0; //Check for recursive call preemption. [Skotlex]
struct status_data *bstatus; // pointer to the player's base status
const struct status_change *sc;
- struct s_skill b_skill[MAX_SKILL]; // previous skill tree
+ struct s_skill b_skill[MAX_SKILL_DB]; // previous skill tree
int b_weight, b_max_weight, b_cart_weight_max, // previous weight
i, k, index, skill_lv,refinedef=0;
int64 i64;
@@ -6809,7 +6809,7 @@ struct view_data *status_get_viewdata(struct block_list *bl)
case BL_PC: return &BL_UCAST(BL_PC, bl)->vd;
case BL_MOB: return BL_UCAST(BL_MOB, bl)->vd;
case BL_PET: return &BL_UCAST(BL_PET, bl)->vd;
- case BL_NPC: return BL_UCAST(BL_NPC, bl)->vd;
+ case BL_NPC: return &BL_UCAST(BL_NPC, bl)->vd;
case BL_HOM: return BL_UCAST(BL_HOM, bl)->vd;
case BL_MER: return BL_UCAST(BL_MER, bl)->vd;
case BL_ELEM: return BL_UCAST(BL_ELEM, bl)->vd;
@@ -6927,10 +6927,14 @@ void status_set_viewdata(struct block_list *bl, int class_)
case BL_NPC:
{
struct npc_data *nd = BL_UCAST(BL_NPC, bl);
- if (vd != NULL)
- nd->vd = vd;
- else
+ if (vd != NULL) {
+ memcpy(&nd->vd, vd, sizeof(struct view_data));
+ } else if (pc->db_checkid(class_)) {
+ memset(&nd->vd, 0, sizeof(struct view_data));
+ nd->vd.class = class_;
+ } else {
ShowError("status_set_viewdata (NPC): No view data for class %d (name=%s)\n", class_, nd->name);
+ }
}
break;
case BL_HOM: //[blackhole89]
diff --git a/src/map/status.h b/src/map/status.h
index a104c66ab..e9c2218e8 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -2257,7 +2257,7 @@ BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when sta
int HP_table[CLASS_COUNT][MAX_LEVEL + 1];
int SP_table[CLASS_COUNT][MAX_LEVEL + 1];
int aspd_base[CLASS_COUNT][MAX_SINGLE_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD
- sc_type Skill2SCTable[MAX_SKILL]; // skill -> status
+ sc_type Skill2SCTable[MAX_SKILL_DB]; // skill -> status
int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated)
unsigned int ChangeFlagTable[SC_MAX]; // status -> flags
int SkillChangeTable[SC_MAX]; // status -> skill
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index b18bd84f5..4204be2e4 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -2294,6 +2294,8 @@ typedef void (*HPMHOOK_pre_clif_rodex_request_items) (struct map_session_data **
typedef void (*HPMHOOK_post_clif_rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result);
typedef void (*HPMHOOK_pre_clif_rodex_icon) (int *fd, bool *show);
typedef void (*HPMHOOK_post_clif_rodex_icon) (int fd, bool show);
+typedef void (*HPMHOOK_pre_clif_skill_scale) (struct block_list **bl, int *src_id, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *casttime);
+typedef void (*HPMHOOK_post_clif_skill_scale) (struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
@@ -5150,6 +5152,8 @@ typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, uns
typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, unsigned short index);
typedef bool (*HPMHOOK_pre_npc_db_checkid) (const int *id);
typedef bool (*HPMHOOK_post_npc_db_checkid) (bool retVal___, const int id);
+typedef void (*HPMHOOK_pre_npc_refresh) (struct npc_data **nd);
+typedef void (*HPMHOOK_post_npc_refresh) (struct npc_data *nd);
typedef int (*HPMHOOK_pre_npc_secure_timeout_timer) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_npc_secure_timeout_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data);
#endif // MAP_NPC_H
@@ -6356,98 +6360,104 @@ typedef void (*HPMHOOK_pre_skill_reload) (void);
typedef void (*HPMHOOK_post_skill_reload) (void);
typedef void (*HPMHOOK_pre_skill_read_db) (bool *minimal);
typedef void (*HPMHOOK_post_skill_read_db) (bool minimal);
-typedef int (*HPMHOOK_pre_skill_get_index) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_index) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_type) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_type) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_hit) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_hit) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_inf) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_inf) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_ele) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_ele) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_nk) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_nk) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_max) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_max) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_range) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_range) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_range2) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_range2) (int retVal___, struct block_list *bl, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_splash) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_splash) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_hp) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_hp) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_mhp) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_mhp) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_sp) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_sp) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_state) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_state) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_spiritball) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_spiritball) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_zeny) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_zeny) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_num) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_num) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_cast) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_cast) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_delay) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_delay) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_walkdelay) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_walkdelay) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_time) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_time) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_time2) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_time2) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_castnodex) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_castnodex) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_delaynodex) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_delaynodex) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_castdef) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_castdef) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_weapontype) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_weapontype) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_ammotype) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_ammotype) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_ammo_qty) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_ammo_qty) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_unit_id) (uint16 *skill_id, int *flag);
-typedef int (*HPMHOOK_post_skill_get_unit_id) (int retVal___, uint16 skill_id, int flag);
-typedef int (*HPMHOOK_pre_skill_get_inf2) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_inf2) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_castcancel) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_castcancel) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_maxcount) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_maxcount) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_blewcount) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_blewcount) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_unit_flag) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_unit_flag) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_unit_target) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_unit_target) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_unit_interval) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_unit_interval) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_unit_bl_target) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_unit_bl_target) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_unit_layout_type) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_unit_layout_type) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_unit_range) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_unit_range) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_get_cooldown) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_cooldown) (int retVal___, uint16 skill_id, uint16 skill_lv);
-typedef int (*HPMHOOK_pre_skill_tree_get_max) (uint16 *skill_id, int *class);
-typedef int (*HPMHOOK_post_skill_tree_get_max) (int retVal___, uint16 skill_id, int class);
-typedef const char* (*HPMHOOK_pre_skill_get_name) (uint16 *skill_id);
-typedef const char* (*HPMHOOK_post_skill_get_name) (const char* retVal___, uint16 skill_id);
-typedef const char* (*HPMHOOK_pre_skill_get_desc) (uint16 *skill_id);
-typedef const char* (*HPMHOOK_post_skill_get_desc) (const char* retVal___, uint16 skill_id);
-typedef void (*HPMHOOK_pre_skill_chk) (uint16 **skill_id);
-typedef void (*HPMHOOK_post_skill_chk) (uint16 *skill_id);
-typedef int (*HPMHOOK_pre_skill_get_casttype) (uint16 *skill_id);
-typedef int (*HPMHOOK_post_skill_get_casttype) (int retVal___, uint16 skill_id);
-typedef int (*HPMHOOK_pre_skill_get_casttype2) (uint16 *index);
-typedef int (*HPMHOOK_post_skill_get_casttype2) (int retVal___, uint16 index);
+typedef int (*HPMHOOK_pre_skill_get_index) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_index) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_type) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_type) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_hit) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_hit) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_inf) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_inf) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_ele) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_ele) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_nk) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_nk) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_max) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_max) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_range) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_range) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_range2) (struct block_list **bl, int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_range2) (int retVal___, struct block_list *bl, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_splash) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_splash) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_hp) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_hp) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_mhp) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_mhp) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_sp) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_sp) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_hp_rate) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_hp_rate) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_sp_rate) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_sp_rate) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_state) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_state) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_spiritball) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_spiritball) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_itemid) (int *skill_id, int *item_idx);
+typedef int (*HPMHOOK_post_skill_get_itemid) (int retVal___, int skill_id, int item_idx);
+typedef int (*HPMHOOK_pre_skill_get_itemqty) (int *skill_id, int *item_idx);
+typedef int (*HPMHOOK_post_skill_get_itemqty) (int retVal___, int skill_id, int item_idx);
+typedef int (*HPMHOOK_pre_skill_get_zeny) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_zeny) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_num) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_num) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_cast) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_cast) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_delay) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_delay) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_walkdelay) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_walkdelay) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_time) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_time) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_time2) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_time2) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_castnodex) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_castnodex) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_delaynodex) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_delaynodex) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_castdef) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_castdef) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_weapontype) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_weapontype) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_ammotype) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_ammotype) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_ammo_qty) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_ammo_qty) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_unit_id) (int *skill_id, int *flag);
+typedef int (*HPMHOOK_post_skill_get_unit_id) (int retVal___, int skill_id, int flag);
+typedef int (*HPMHOOK_pre_skill_get_inf2) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_inf2) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_castcancel) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_castcancel) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_maxcount) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_maxcount) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_blewcount) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_blewcount) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_unit_flag) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_unit_flag) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_unit_target) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_unit_target) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_unit_interval) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_unit_interval) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_unit_bl_target) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_unit_bl_target) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_unit_layout_type) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_unit_layout_type) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_unit_range) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_unit_range) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_cooldown) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_cooldown) (int retVal___, int skill_id, int skill_lv);
+typedef int (*HPMHOOK_pre_skill_tree_get_max) (int *skill_id, int *class);
+typedef int (*HPMHOOK_post_skill_tree_get_max) (int retVal___, int skill_id, int class);
+typedef const char* (*HPMHOOK_pre_skill_get_name) (int *skill_id);
+typedef const char* (*HPMHOOK_post_skill_get_name) (const char* retVal___, int skill_id);
+typedef const char* (*HPMHOOK_pre_skill_get_desc) (int *skill_id);
+typedef const char* (*HPMHOOK_post_skill_get_desc) (const char* retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_casttype) (int *skill_id);
+typedef int (*HPMHOOK_post_skill_get_casttype) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_casttype2) (int *index);
+typedef int (*HPMHOOK_post_skill_get_casttype2) (int retVal___, int index);
typedef bool (*HPMHOOK_pre_skill_is_combo) (int *skill_id);
typedef bool (*HPMHOOK_post_skill_is_combo) (bool retVal___, int skill_id);
typedef int (*HPMHOOK_pre_skill_name2id) (const char **name);
@@ -6634,8 +6644,8 @@ typedef void (*HPMHOOK_pre_skill_brandishspear_first) (struct square **tc, uint8
typedef void (*HPMHOOK_post_skill_brandishspear_first) (struct square *tc, uint8 dir, int16 x, int16 y);
typedef void (*HPMHOOK_pre_skill_brandishspear_dir) (struct square **tc, uint8 *dir, int *are);
typedef void (*HPMHOOK_post_skill_brandishspear_dir) (struct square *tc, uint8 dir, int are);
-typedef int (*HPMHOOK_pre_skill_get_fixed_cast) (uint16 *skill_id, uint16 *skill_lv);
-typedef int (*HPMHOOK_post_skill_get_fixed_cast) (int retVal___, uint16 skill_id, uint16 skill_lv);
+typedef int (*HPMHOOK_pre_skill_get_fixed_cast) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_fixed_cast) (int retVal___, int skill_id, int skill_lv);
typedef int (*HPMHOOK_pre_skill_sit_count) (struct block_list **bl, va_list ap);
typedef int (*HPMHOOK_post_skill_sit_count) (int retVal___, struct block_list *bl, va_list ap);
typedef int (*HPMHOOK_pre_skill_sit_in) (struct block_list **bl, va_list ap);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index a2679a551..cc097aeae 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1930,6 +1930,8 @@ struct {
struct HPMHookPoint *HP_clif_rodex_request_items_post;
struct HPMHookPoint *HP_clif_rodex_icon_pre;
struct HPMHookPoint *HP_clif_rodex_icon_post;
+ struct HPMHookPoint *HP_clif_skill_scale_pre;
+ struct HPMHookPoint *HP_clif_skill_scale_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -3918,6 +3920,8 @@ struct {
struct HPMHookPoint *HP_npc_market_delfromsql_sub_post;
struct HPMHookPoint *HP_npc_db_checkid_pre;
struct HPMHookPoint *HP_npc_db_checkid_post;
+ struct HPMHookPoint *HP_npc_refresh_pre;
+ struct HPMHookPoint *HP_npc_refresh_post;
struct HPMHookPoint *HP_npc_secure_timeout_timer_pre;
struct HPMHookPoint *HP_npc_secure_timeout_timer_post;
struct HPMHookPoint *HP_nullpo_assert_report_pre;
@@ -5100,10 +5104,18 @@ struct {
struct HPMHookPoint *HP_skill_get_mhp_post;
struct HPMHookPoint *HP_skill_get_sp_pre;
struct HPMHookPoint *HP_skill_get_sp_post;
+ struct HPMHookPoint *HP_skill_get_hp_rate_pre;
+ struct HPMHookPoint *HP_skill_get_hp_rate_post;
+ struct HPMHookPoint *HP_skill_get_sp_rate_pre;
+ struct HPMHookPoint *HP_skill_get_sp_rate_post;
struct HPMHookPoint *HP_skill_get_state_pre;
struct HPMHookPoint *HP_skill_get_state_post;
struct HPMHookPoint *HP_skill_get_spiritball_pre;
struct HPMHookPoint *HP_skill_get_spiritball_post;
+ struct HPMHookPoint *HP_skill_get_itemid_pre;
+ struct HPMHookPoint *HP_skill_get_itemid_post;
+ struct HPMHookPoint *HP_skill_get_itemqty_pre;
+ struct HPMHookPoint *HP_skill_get_itemqty_post;
struct HPMHookPoint *HP_skill_get_zeny_pre;
struct HPMHookPoint *HP_skill_get_zeny_post;
struct HPMHookPoint *HP_skill_get_num_pre;
@@ -5160,8 +5172,6 @@ struct {
struct HPMHookPoint *HP_skill_get_name_post;
struct HPMHookPoint *HP_skill_get_desc_pre;
struct HPMHookPoint *HP_skill_get_desc_post;
- struct HPMHookPoint *HP_skill_chk_pre;
- struct HPMHookPoint *HP_skill_chk_post;
struct HPMHookPoint *HP_skill_get_casttype_pre;
struct HPMHookPoint *HP_skill_get_casttype_post;
struct HPMHookPoint *HP_skill_get_casttype2_pre;
@@ -8129,6 +8139,8 @@ struct {
int HP_clif_rodex_request_items_post;
int HP_clif_rodex_icon_pre;
int HP_clif_rodex_icon_post;
+ int HP_clif_skill_scale_pre;
+ int HP_clif_skill_scale_post;
int HP_cmdline_init_pre;
int HP_cmdline_init_post;
int HP_cmdline_final_pre;
@@ -10117,6 +10129,8 @@ struct {
int HP_npc_market_delfromsql_sub_post;
int HP_npc_db_checkid_pre;
int HP_npc_db_checkid_post;
+ int HP_npc_refresh_pre;
+ int HP_npc_refresh_post;
int HP_npc_secure_timeout_timer_pre;
int HP_npc_secure_timeout_timer_post;
int HP_nullpo_assert_report_pre;
@@ -11299,10 +11313,18 @@ struct {
int HP_skill_get_mhp_post;
int HP_skill_get_sp_pre;
int HP_skill_get_sp_post;
+ int HP_skill_get_hp_rate_pre;
+ int HP_skill_get_hp_rate_post;
+ int HP_skill_get_sp_rate_pre;
+ int HP_skill_get_sp_rate_post;
int HP_skill_get_state_pre;
int HP_skill_get_state_post;
int HP_skill_get_spiritball_pre;
int HP_skill_get_spiritball_post;
+ int HP_skill_get_itemid_pre;
+ int HP_skill_get_itemid_post;
+ int HP_skill_get_itemqty_pre;
+ int HP_skill_get_itemqty_post;
int HP_skill_get_zeny_pre;
int HP_skill_get_zeny_post;
int HP_skill_get_num_pre;
@@ -11359,8 +11381,6 @@ struct {
int HP_skill_get_name_post;
int HP_skill_get_desc_pre;
int HP_skill_get_desc_post;
- int HP_skill_chk_pre;
- int HP_skill_chk_post;
int HP_skill_get_casttype_pre;
int HP_skill_get_casttype_post;
int HP_skill_get_casttype2_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 3a3a7177e..7caf25de6 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -987,6 +987,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pRodexRequestItems, HP_clif_pRodexRequestItems) },
{ HP_POP(clif->rodex_request_items, HP_clif_rodex_request_items) },
{ HP_POP(clif->rodex_icon, HP_clif_rodex_icon) },
+ { HP_POP(clif->skill_scale, HP_clif_skill_scale) },
/* cmdline_interface */
{ HP_POP(cmdline->init, HP_cmdline_init) },
{ HP_POP(cmdline->final, HP_cmdline_final) },
@@ -2009,6 +2010,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(npc->market_delfromsql, HP_npc_market_delfromsql) },
{ HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) },
{ HP_POP(npc->db_checkid, HP_npc_db_checkid) },
+ { HP_POP(npc->refresh, HP_npc_refresh) },
{ HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) },
/* nullpo_interface */
{ HP_POP(nullpo->assert_report, HP_nullpo_assert_report) },
@@ -2614,8 +2616,12 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->get_hp, HP_skill_get_hp) },
{ HP_POP(skill->get_mhp, HP_skill_get_mhp) },
{ HP_POP(skill->get_sp, HP_skill_get_sp) },
+ { HP_POP(skill->get_hp_rate, HP_skill_get_hp_rate) },
+ { HP_POP(skill->get_sp_rate, HP_skill_get_sp_rate) },
{ HP_POP(skill->get_state, HP_skill_get_state) },
{ HP_POP(skill->get_spiritball, HP_skill_get_spiritball) },
+ { HP_POP(skill->get_itemid, HP_skill_get_itemid) },
+ { HP_POP(skill->get_itemqty, HP_skill_get_itemqty) },
{ HP_POP(skill->get_zeny, HP_skill_get_zeny) },
{ HP_POP(skill->get_num, HP_skill_get_num) },
{ HP_POP(skill->get_cast, HP_skill_get_cast) },
@@ -2644,7 +2650,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->tree_get_max, HP_skill_tree_get_max) },
{ HP_POP(skill->get_name, HP_skill_get_name) },
{ HP_POP(skill->get_desc, HP_skill_get_desc) },
- { HP_POP(skill->chk, HP_skill_chk) },
{ HP_POP(skill->get_casttype, HP_skill_get_casttype) },
{ HP_POP(skill->get_casttype2, HP_skill_get_casttype2) },
{ HP_POP(skill->is_combo, HP_skill_is_combo) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 59464109d..4340f8dbd 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -25113,6 +25113,32 @@ void HP_clif_rodex_icon(int fd, bool show) {
}
return;
}
+void HP_clif_skill_scale(struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_skill_scale_pre > 0) {
+ void (*preHookFunc) (struct block_list **bl, int *src_id, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *casttime);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_scale_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_scale_pre[hIndex].func;
+ preHookFunc(&bl, &src_id, &x, &y, &skill_id, &skill_lv, &casttime);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_scale(bl, src_id, x, y, skill_id, skill_lv, casttime);
+ }
+ if (HPMHooks.count.HP_clif_skill_scale_post > 0) {
+ void (*postHookFunc) (struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_scale_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_scale_post[hIndex].func;
+ postHookFunc(bl, src_id, x, y, skill_id, skill_lv, casttime);
+ }
+ }
+ return;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;
@@ -52089,6 +52115,32 @@ bool HP_npc_db_checkid(const int id) {
}
return retVal___;
}
+void HP_npc_refresh(struct npc_data *nd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_npc_refresh_pre > 0) {
+ void (*preHookFunc) (struct npc_data **nd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_npc_refresh_pre[hIndex].func;
+ preHookFunc(&nd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.refresh(nd);
+ }
+ if (HPMHooks.count.HP_npc_refresh_post > 0) {
+ void (*postHookFunc) (struct npc_data *nd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_npc_refresh_post[hIndex].func;
+ postHookFunc(nd);
+ }
+ }
+ return;
+}
int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
@@ -67767,11 +67819,11 @@ void HP_skill_read_db(bool minimal) {
}
return;
}
-int HP_skill_get_index(uint16 skill_id) {
+int HP_skill_get_index(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_index_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_index_pre[hIndex].func;
@@ -67786,7 +67838,7 @@ int HP_skill_get_index(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_index(skill_id);
}
if (HPMHooks.count.HP_skill_get_index_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_index_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -67794,11 +67846,11 @@ int HP_skill_get_index(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_type(uint16 skill_id) {
+int HP_skill_get_type(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_type_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_type_pre[hIndex].func;
@@ -67813,7 +67865,7 @@ int HP_skill_get_type(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_type(skill_id);
}
if (HPMHooks.count.HP_skill_get_type_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_type_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -67821,11 +67873,11 @@ int HP_skill_get_type(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_hit(uint16 skill_id) {
+int HP_skill_get_hit(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_hit_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_hit_pre[hIndex].func;
@@ -67840,7 +67892,7 @@ int HP_skill_get_hit(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_hit(skill_id);
}
if (HPMHooks.count.HP_skill_get_hit_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_hit_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -67848,11 +67900,11 @@ int HP_skill_get_hit(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_inf(uint16 skill_id) {
+int HP_skill_get_inf(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_inf_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_inf_pre[hIndex].func;
@@ -67867,7 +67919,7 @@ int HP_skill_get_inf(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_inf(skill_id);
}
if (HPMHooks.count.HP_skill_get_inf_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_inf_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -67875,11 +67927,11 @@ int HP_skill_get_inf(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_ele(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_ele_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_ele_pre[hIndex].func;
@@ -67894,7 +67946,7 @@ int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_ele(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_ele_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_ele_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -67902,11 +67954,11 @@ int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_nk(uint16 skill_id) {
+int HP_skill_get_nk(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_nk_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_nk_pre[hIndex].func;
@@ -67921,7 +67973,7 @@ int HP_skill_get_nk(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_nk(skill_id);
}
if (HPMHooks.count.HP_skill_get_nk_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_nk_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -67929,11 +67981,11 @@ int HP_skill_get_nk(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_max(uint16 skill_id) {
+int HP_skill_get_max(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_max_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_max_pre[hIndex].func;
@@ -67948,7 +68000,7 @@ int HP_skill_get_max(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_max(skill_id);
}
if (HPMHooks.count.HP_skill_get_max_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_max_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -67956,11 +68008,11 @@ int HP_skill_get_max(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_range(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_range_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_range_pre[hIndex].func;
@@ -67975,7 +68027,7 @@ int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_range(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_range_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_range_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -67983,11 +68035,11 @@ int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_range2(struct block_list *bl, int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_range2_pre > 0) {
- int (*preHookFunc) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (struct block_list **bl, int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_range2_pre[hIndex].func;
@@ -68002,7 +68054,7 @@ int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
retVal___ = HPMHooks.source.skill.get_range2(bl, skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_range2_post > 0) {
- int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_range2_post[hIndex].func;
retVal___ = postHookFunc(retVal___, bl, skill_id, skill_lv);
@@ -68010,11 +68062,11 @@ int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
}
return retVal___;
}
-int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_splash(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_splash_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_splash_pre[hIndex].func;
@@ -68029,7 +68081,7 @@ int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_splash(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_splash_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_splash_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68037,11 +68089,11 @@ int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_hp(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_hp_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_hp_pre[hIndex].func;
@@ -68056,7 +68108,7 @@ int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_hp(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_hp_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_hp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68064,11 +68116,11 @@ int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_mhp(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_mhp_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_mhp_pre[hIndex].func;
@@ -68083,7 +68135,7 @@ int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_mhp(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_mhp_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_mhp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68091,11 +68143,11 @@ int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_sp(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_sp_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_sp_pre[hIndex].func;
@@ -68110,7 +68162,7 @@ int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_sp(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_sp_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_sp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68118,11 +68170,65 @@ int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_state(uint16 skill_id) {
+int HP_skill_get_hp_rate(int skill_id, int skill_lv) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_skill_get_hp_rate_pre > 0) {
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_rate_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_skill_get_hp_rate_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_hp_rate(skill_id, skill_lv);
+ }
+ if (HPMHooks.count.HP_skill_get_hp_rate_post > 0) {
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_rate_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_skill_get_hp_rate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_sp_rate(int skill_id, int skill_lv) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_skill_get_sp_rate_pre > 0) {
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_rate_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_skill_get_sp_rate_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_sp_rate(skill_id, skill_lv);
+ }
+ if (HPMHooks.count.HP_skill_get_sp_rate_post > 0) {
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_rate_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_skill_get_sp_rate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_state(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_state_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_state_pre[hIndex].func;
@@ -68137,7 +68243,7 @@ int HP_skill_get_state(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_state(skill_id);
}
if (HPMHooks.count.HP_skill_get_state_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_state_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68145,11 +68251,11 @@ int HP_skill_get_state(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_spiritball(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_spiritball_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_spiritball_pre[hIndex].func;
@@ -68164,7 +68270,7 @@ int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_spiritball(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_spiritball_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_spiritball_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68172,11 +68278,65 @@ int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_itemid(int skill_id, int item_idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_skill_get_itemid_pre > 0) {
+ int (*preHookFunc) (int *skill_id, int *item_idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_itemid_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_skill_get_itemid_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &item_idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_itemid(skill_id, item_idx);
+ }
+ if (HPMHooks.count.HP_skill_get_itemid_post > 0) {
+ int (*postHookFunc) (int retVal___, int skill_id, int item_idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_itemid_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_skill_get_itemid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, skill_id, item_idx);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_itemqty(int skill_id, int item_idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_skill_get_itemqty_pre > 0) {
+ int (*preHookFunc) (int *skill_id, int *item_idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_itemqty_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_skill_get_itemqty_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &item_idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_itemqty(skill_id, item_idx);
+ }
+ if (HPMHooks.count.HP_skill_get_itemqty_post > 0) {
+ int (*postHookFunc) (int retVal___, int skill_id, int item_idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_itemqty_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_skill_get_itemqty_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, skill_id, item_idx);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_zeny(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_zeny_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_zeny_pre[hIndex].func;
@@ -68191,7 +68351,7 @@ int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_zeny(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_zeny_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_zeny_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68199,11 +68359,11 @@ int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_num(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_num_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_num_pre[hIndex].func;
@@ -68218,7 +68378,7 @@ int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_num(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_num_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_num_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68226,11 +68386,11 @@ int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_cast(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_cast_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_cast_pre[hIndex].func;
@@ -68245,7 +68405,7 @@ int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_cast(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_cast_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_cast_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68253,11 +68413,11 @@ int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_delay(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_delay_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_delay_pre[hIndex].func;
@@ -68272,7 +68432,7 @@ int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_delay(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_delay_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_delay_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68280,11 +68440,11 @@ int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_walkdelay(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_walkdelay_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_walkdelay_pre[hIndex].func;
@@ -68299,7 +68459,7 @@ int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_walkdelay(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_walkdelay_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_walkdelay_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68307,11 +68467,11 @@ int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_time(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_time_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_time_pre[hIndex].func;
@@ -68326,7 +68486,7 @@ int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_time(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_time_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_time_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68334,11 +68494,11 @@ int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_time2(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_time2_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_time2_pre[hIndex].func;
@@ -68353,7 +68513,7 @@ int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_time2(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_time2_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_time2_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68361,11 +68521,11 @@ int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_castnodex(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_castnodex_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_castnodex_pre[hIndex].func;
@@ -68380,7 +68540,7 @@ int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_castnodex(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_castnodex_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_castnodex_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68388,11 +68548,11 @@ int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_delaynodex(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_delaynodex_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_delaynodex_pre[hIndex].func;
@@ -68407,7 +68567,7 @@ int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_delaynodex(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_delaynodex_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_delaynodex_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68415,11 +68575,11 @@ int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_castdef(uint16 skill_id) {
+int HP_skill_get_castdef(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_castdef_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_castdef_pre[hIndex].func;
@@ -68434,7 +68594,7 @@ int HP_skill_get_castdef(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_castdef(skill_id);
}
if (HPMHooks.count.HP_skill_get_castdef_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_castdef_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68442,11 +68602,11 @@ int HP_skill_get_castdef(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_weapontype(uint16 skill_id) {
+int HP_skill_get_weapontype(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_weapontype_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_weapontype_pre[hIndex].func;
@@ -68461,7 +68621,7 @@ int HP_skill_get_weapontype(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_weapontype(skill_id);
}
if (HPMHooks.count.HP_skill_get_weapontype_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_weapontype_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68469,11 +68629,11 @@ int HP_skill_get_weapontype(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_ammotype(uint16 skill_id) {
+int HP_skill_get_ammotype(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_ammotype_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_ammotype_pre[hIndex].func;
@@ -68488,7 +68648,7 @@ int HP_skill_get_ammotype(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_ammotype(skill_id);
}
if (HPMHooks.count.HP_skill_get_ammotype_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_ammotype_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68496,11 +68656,11 @@ int HP_skill_get_ammotype(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_ammo_qty(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_ammo_qty_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_pre[hIndex].func;
@@ -68515,7 +68675,7 @@ int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_ammo_qty(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_ammo_qty_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68523,11 +68683,11 @@ int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_unit_id(uint16 skill_id, int flag) {
+int HP_skill_get_unit_id(int skill_id, int flag) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_unit_id_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, int *flag);
+ int (*preHookFunc) (int *skill_id, int *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_id_pre[hIndex].func;
@@ -68542,7 +68702,7 @@ int HP_skill_get_unit_id(uint16 skill_id, int flag) {
retVal___ = HPMHooks.source.skill.get_unit_id(skill_id, flag);
}
if (HPMHooks.count.HP_skill_get_unit_id_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, int flag);
+ int (*postHookFunc) (int retVal___, int skill_id, int flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_unit_id_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, flag);
@@ -68550,11 +68710,11 @@ int HP_skill_get_unit_id(uint16 skill_id, int flag) {
}
return retVal___;
}
-int HP_skill_get_inf2(uint16 skill_id) {
+int HP_skill_get_inf2(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_inf2_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_inf2_pre[hIndex].func;
@@ -68569,7 +68729,7 @@ int HP_skill_get_inf2(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_inf2(skill_id);
}
if (HPMHooks.count.HP_skill_get_inf2_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_inf2_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68577,11 +68737,11 @@ int HP_skill_get_inf2(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_castcancel(uint16 skill_id) {
+int HP_skill_get_castcancel(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_castcancel_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_castcancel_pre[hIndex].func;
@@ -68596,7 +68756,7 @@ int HP_skill_get_castcancel(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_castcancel(skill_id);
}
if (HPMHooks.count.HP_skill_get_castcancel_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_castcancel_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68604,11 +68764,11 @@ int HP_skill_get_castcancel(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_maxcount(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_maxcount_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_maxcount_pre[hIndex].func;
@@ -68623,7 +68783,7 @@ int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_maxcount(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_maxcount_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_maxcount_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68631,11 +68791,11 @@ int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_blewcount(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_blewcount_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_blewcount_pre[hIndex].func;
@@ -68650,7 +68810,7 @@ int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_blewcount(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_blewcount_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_blewcount_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68658,11 +68818,11 @@ int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_unit_flag(uint16 skill_id) {
+int HP_skill_get_unit_flag(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_unit_flag_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_flag_pre[hIndex].func;
@@ -68677,7 +68837,7 @@ int HP_skill_get_unit_flag(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_unit_flag(skill_id);
}
if (HPMHooks.count.HP_skill_get_unit_flag_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_unit_flag_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68685,11 +68845,11 @@ int HP_skill_get_unit_flag(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_unit_target(uint16 skill_id) {
+int HP_skill_get_unit_target(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_unit_target_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_target_pre[hIndex].func;
@@ -68704,7 +68864,7 @@ int HP_skill_get_unit_target(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_unit_target(skill_id);
}
if (HPMHooks.count.HP_skill_get_unit_target_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_unit_target_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68712,11 +68872,11 @@ int HP_skill_get_unit_target(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_unit_interval(uint16 skill_id) {
+int HP_skill_get_unit_interval(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_unit_interval_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_interval_pre[hIndex].func;
@@ -68731,7 +68891,7 @@ int HP_skill_get_unit_interval(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_unit_interval(skill_id);
}
if (HPMHooks.count.HP_skill_get_unit_interval_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_unit_interval_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68739,11 +68899,11 @@ int HP_skill_get_unit_interval(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_unit_bl_target(uint16 skill_id) {
+int HP_skill_get_unit_bl_target(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_unit_bl_target_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_pre[hIndex].func;
@@ -68758,7 +68918,7 @@ int HP_skill_get_unit_bl_target(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_unit_bl_target(skill_id);
}
if (HPMHooks.count.HP_skill_get_unit_bl_target_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68766,11 +68926,11 @@ int HP_skill_get_unit_bl_target(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_unit_layout_type(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_unit_layout_type_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_pre[hIndex].func;
@@ -68785,7 +68945,7 @@ int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_unit_layout_type(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_unit_layout_type_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68793,11 +68953,11 @@ int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_unit_range(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_unit_range_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_unit_range_pre[hIndex].func;
@@ -68812,7 +68972,7 @@ int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_unit_range(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_unit_range_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_unit_range_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68820,11 +68980,11 @@ int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_cooldown(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_cooldown_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_cooldown_pre[hIndex].func;
@@ -68839,7 +68999,7 @@ int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_cooldown(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_cooldown_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_cooldown_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
@@ -68847,11 +69007,11 @@ int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) {
}
return retVal___;
}
-int HP_skill_tree_get_max(uint16 skill_id, int class) {
+int HP_skill_tree_get_max(int skill_id, int class) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_tree_get_max_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, int *class);
+ int (*preHookFunc) (int *skill_id, int *class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_tree_get_max_pre[hIndex].func;
@@ -68866,7 +69026,7 @@ int HP_skill_tree_get_max(uint16 skill_id, int class) {
retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, class);
}
if (HPMHooks.count.HP_skill_tree_get_max_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, int class);
+ int (*postHookFunc) (int retVal___, int skill_id, int class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_tree_get_max_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, class);
@@ -68874,11 +69034,11 @@ int HP_skill_tree_get_max(uint16 skill_id, int class) {
}
return retVal___;
}
-const char* HP_skill_get_name(uint16 skill_id) {
+const char* HP_skill_get_name(int skill_id) {
int hIndex = 0;
const char* retVal___ = NULL;
if (HPMHooks.count.HP_skill_get_name_pre > 0) {
- const char* (*preHookFunc) (uint16 *skill_id);
+ const char* (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_name_pre[hIndex].func;
@@ -68893,7 +69053,7 @@ const char* HP_skill_get_name(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_name(skill_id);
}
if (HPMHooks.count.HP_skill_get_name_post > 0) {
- const char* (*postHookFunc) (const char* retVal___, uint16 skill_id);
+ const char* (*postHookFunc) (const char* retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_name_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68901,11 +69061,11 @@ const char* HP_skill_get_name(uint16 skill_id) {
}
return retVal___;
}
-const char* HP_skill_get_desc(uint16 skill_id) {
+const char* HP_skill_get_desc(int skill_id) {
int hIndex = 0;
const char* retVal___ = NULL;
if (HPMHooks.count.HP_skill_get_desc_pre > 0) {
- const char* (*preHookFunc) (uint16 *skill_id);
+ const char* (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_desc_pre[hIndex].func;
@@ -68920,7 +69080,7 @@ const char* HP_skill_get_desc(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_desc(skill_id);
}
if (HPMHooks.count.HP_skill_get_desc_post > 0) {
- const char* (*postHookFunc) (const char* retVal___, uint16 skill_id);
+ const char* (*postHookFunc) (const char* retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_desc_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68928,37 +69088,11 @@ const char* HP_skill_get_desc(uint16 skill_id) {
}
return retVal___;
}
-void HP_skill_chk(uint16 *skill_id) {
- int hIndex = 0;
- if (HPMHooks.count.HP_skill_chk_pre > 0) {
- void (*preHookFunc) (uint16 **skill_id);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_skill_chk_pre[hIndex].func;
- preHookFunc(&skill_id);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.skill.chk(skill_id);
- }
- if (HPMHooks.count.HP_skill_chk_post > 0) {
- void (*postHookFunc) (uint16 *skill_id);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_skill_chk_post[hIndex].func;
- postHookFunc(skill_id);
- }
- }
- return;
-}
-int HP_skill_get_casttype(uint16 skill_id) {
+int HP_skill_get_casttype(int skill_id) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_casttype_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id);
+ int (*preHookFunc) (int *skill_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_casttype_pre[hIndex].func;
@@ -68973,7 +69107,7 @@ int HP_skill_get_casttype(uint16 skill_id) {
retVal___ = HPMHooks.source.skill.get_casttype(skill_id);
}
if (HPMHooks.count.HP_skill_get_casttype_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_casttype_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id);
@@ -68981,11 +69115,11 @@ int HP_skill_get_casttype(uint16 skill_id) {
}
return retVal___;
}
-int HP_skill_get_casttype2(uint16 index) {
+int HP_skill_get_casttype2(int index) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_casttype2_pre > 0) {
- int (*preHookFunc) (uint16 *index);
+ int (*preHookFunc) (int *index);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_casttype2_pre[hIndex].func;
@@ -69000,7 +69134,7 @@ int HP_skill_get_casttype2(uint16 index) {
retVal___ = HPMHooks.source.skill.get_casttype2(index);
}
if (HPMHooks.count.HP_skill_get_casttype2_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 index);
+ int (*postHookFunc) (int retVal___, int index);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_casttype2_post[hIndex].func;
retVal___ = postHookFunc(retVal___, index);
@@ -71607,11 +71741,11 @@ void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) {
}
return;
}
-int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) {
+int HP_skill_get_fixed_cast(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_fixed_cast_pre > 0) {
- int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_pre[hIndex].func;
@@ -71626,7 +71760,7 @@ int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) {
retVal___ = HPMHooks.source.skill.get_fixed_cast(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_fixed_cast_post > 0) {
- int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_post[hIndex].func;
retVal___ = postHookFunc(retVal___, skill_id, skill_lv);