summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/constants.conf7
-rw-r--r--db/pre-re/item_db.conf10
-rw-r--r--db/re/item_db.conf12
-rw-r--r--doc/constants.md8
-rw-r--r--doc/script_commands.txt64
-rw-r--r--npc/battleground/flavius/flavius01.txt8
-rw-r--r--npc/battleground/flavius/flavius02.txt8
-rw-r--r--npc/battleground/tierra/tierra01.txt20
-rw-r--r--npc/battleground/tierra/tierra02.txt20
-rw-r--r--npc/custom/battleground/bg_tierra_01.txt6
-rw-r--r--npc/custom/battleground/bg_tierra_02.txt6
-rw-r--r--npc/custom/bgqueue/flavius.txt12
-rw-r--r--npc/custom/etc/marriage.txt6
-rw-r--r--npc/custom/events/cluckers.txt14
-rw-r--r--npc/custom/item_signer.txt2
-rw-r--r--npc/custom/itembind.txt4
-rw-r--r--npc/custom/quests/hunting_missions.txt12
-rw-r--r--npc/custom/woe_controller.txt2
-rw-r--r--npc/events/gdevent_aru.txt6
-rw-r--r--npc/events/gdevent_sch.txt6
-rw-r--r--npc/events/god_se_festival.txt4
-rw-r--r--npc/events/nguild/nguild_dunsw.txt2
-rw-r--r--npc/events/nguild/nguild_ev_agit.txt2
-rw-r--r--npc/events/nguild/nguild_flags.txt4
-rw-r--r--npc/events/nguild/nguild_kafras.txt2
-rw-r--r--npc/events/nguild/nguild_managers.txt2
-rw-r--r--npc/events/nguild/nguild_warper.txt34
-rw-r--r--npc/instances/EndlessTower.txt4
-rw-r--r--npc/instances/NydhoggsNest.txt10
-rw-r--r--npc/instances/OrcsMemory.txt6
-rw-r--r--npc/instances/SealedShrine.txt26
-rw-r--r--npc/jobs/2-1/assassin.txt2
-rw-r--r--npc/kafras/functions_kafras.txt2
-rw-r--r--npc/other/CashShop_Functions.txt6
-rw-r--r--npc/other/arena/arena_party.txt8
-rw-r--r--npc/other/marriage.txt10
-rw-r--r--npc/other/poring_war.txt24
-rw-r--r--npc/quests/guildrelay.txt14
-rw-r--r--npc/quests/partyrelay.txt30
-rw-r--r--npc/quests/quests_louyang.txt10
-rw-r--r--npc/quests/quests_morocc.txt8
-rw-r--r--npc/quests/quests_nameless.txt2
-rw-r--r--npc/quests/seals/god_weapon_creation.txt4
-rw-r--r--npc/re/cities/malaya.txt4
-rw-r--r--npc/re/instances/BakonawaLake.txt8
-rw-r--r--npc/re/instances/BangungotHospital.txt14
-rw-r--r--npc/re/instances/BuwayaCave.txt6
-rw-r--r--npc/re/instances/EclageInterior.txt8
-rw-r--r--npc/re/instances/HazyForest.txt6
-rw-r--r--npc/re/instances/MalangdoCulvert.txt14
-rw-r--r--npc/re/instances/OldGlastHeim.txt36
-rw-r--r--npc/re/instances/WolfchevLaboratory.txt14
-rw-r--r--npc/re/instances/ghost_palace.txt14
-rw-r--r--npc/re/instances/octopus_cave.txt6
-rw-r--r--npc/re/instances/saras_memory.txt36
-rw-r--r--npc/re/woe-fe/invest_main.txt6
-rw-r--r--npc/woe-fe/agit_main.txt8
-rw-r--r--npc/woe-fe/aldeg_cas01.txt4
-rw-r--r--npc/woe-fe/aldeg_cas02.txt4
-rw-r--r--npc/woe-fe/aldeg_cas03.txt4
-rw-r--r--npc/woe-fe/aldeg_cas04.txt4
-rw-r--r--npc/woe-fe/aldeg_cas05.txt4
-rw-r--r--npc/woe-fe/gefg_cas01.txt4
-rw-r--r--npc/woe-fe/gefg_cas02.txt4
-rw-r--r--npc/woe-fe/gefg_cas03.txt4
-rw-r--r--npc/woe-fe/gefg_cas04.txt4
-rw-r--r--npc/woe-fe/gefg_cas05.txt4
-rw-r--r--npc/woe-fe/payg_cas01.txt4
-rw-r--r--npc/woe-fe/payg_cas02.txt4
-rw-r--r--npc/woe-fe/payg_cas03.txt4
-rw-r--r--npc/woe-fe/payg_cas04.txt4
-rw-r--r--npc/woe-fe/payg_cas05.txt4
-rw-r--r--npc/woe-fe/prtg_cas01.txt4
-rw-r--r--npc/woe-fe/prtg_cas02.txt4
-rw-r--r--npc/woe-fe/prtg_cas03.txt4
-rw-r--r--npc/woe-fe/prtg_cas04.txt4
-rw-r--r--npc/woe-fe/prtg_cas05.txt4
-rw-r--r--npc/woe-se/agit_main_se.txt20
-rw-r--r--sql-files/item_db.sql10
-rw-r--r--sql-files/item_db_re.sql12
-rw-r--r--src/common/HPM.c3
-rw-r--r--src/common/HPMSymbols.inc.h6
-rw-r--r--src/common/HPMi.h1
-rw-r--r--src/common/memmgr.h4
-rw-r--r--src/map/clif.c2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc30
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc57
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc15
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc373
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.sources.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc57
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc15
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc373
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.sources.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc57
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc15
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc373
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.sources.inc1
-rwxr-xr-xtools/HPMHookGen/HPMHookGen.pl3
99 files changed, 391 insertions, 1747 deletions
diff --git a/db/constants.conf b/db/constants.conf
index a044aee7d..c22435a36 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -3656,6 +3656,13 @@ constants_db: {
NPC_NAME_HIDDEN: 2
NPC_NAME_UNIQUE: 3
NPC_MAP: 4
+
+ comment__: "getcharid"
+ CHAR_ID_CHAR: 0
+ CHAR_ID_PARTY: 1
+ CHAR_ID_GUILD: 2
+ CHAR_ID_ACCOUNT: 3
+ CHAR_ID_BG: 4
comment__: "sc_start"
SCFLAG_NONE: 0x00
diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf
index 1ba177d18..4ba5719a4 100644
--- a/db/pre-re/item_db.conf
+++ b/db/pre-re/item_db.conf
@@ -93445,7 +93445,7 @@ item_db: (
Name: "Chemical Protection Helm Scroll"
Type: 2
Weight: 10
- Script: <" unitskilluseid getcharid(3),237,5; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5; ">
},
{
Id: 14518
@@ -93453,7 +93453,7 @@ item_db: (
Name: "Chemical Protection Shield Scrol"
Type: 2
Weight: 10
- Script: <" unitskilluseid getcharid(3),235,5; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5; ">
},
{
Id: 14519
@@ -93461,7 +93461,7 @@ item_db: (
Name: "Chemical Protection Armor Scroll"
Type: 2
Weight: 10
- Script: <" unitskilluseid getcharid(3),236,5; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5; ">
},
{
Id: 14520
@@ -93469,7 +93469,7 @@ item_db: (
Name: "Chemical Protection Weapon Scroll"
Type: 2
Weight: 10
- Script: <" unitskilluseid getcharid(3),234,5; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5; ">
},
{
Id: 14521
@@ -93489,7 +93489,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <" unitskilluseid getcharid(3),108,1; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1; ">
},
{
Id: 14522
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 3587fb4ce..34136aa5c 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -120552,7 +120552,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" unitskilluseid getcharid(3),237,5; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5; ">
},
{
Id: 14518
@@ -120569,7 +120569,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" unitskilluseid getcharid(3),235,5; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5; ">
},
{
Id: 14519
@@ -120586,7 +120586,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" unitskilluseid getcharid(3),236,5; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5; ">
},
{
Id: 14520
@@ -120603,7 +120603,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" unitskilluseid getcharid(3),234,5; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5; ">
},
{
Id: 14521
@@ -120623,7 +120623,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <" unitskilluseid getcharid(3),108,1; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1; ">
},
{
Id: 14522
@@ -146123,7 +146123,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" unitskilluseid getcharid(3), "AL_TELEPORT", 3; ">
+ Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT), "AL_TELEPORT", 3; ">
},
{
Id: 22514
diff --git a/doc/constants.md b/doc/constants.md
index b6c6d44f5..7bfcede27 100644
--- a/doc/constants.md
+++ b/doc/constants.md
@@ -3571,6 +3571,14 @@
- `NPC_NAME_UNIQUE`: 3
- `NPC_MAP`: 4
+### getcharid
+
+- `CHAR_ID_CHAR`: 0
+- `CHAR_ID_PARTY`: 1
+- `CHAR_ID_GUILD`: 2
+- `CHAR_ID_ACCOUNT`: 3
+- `CHAR_ID_BG`: 4
+
### sc_start
- `SCFLAG_NONE`: 0
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index eb7e0cd9d..cb25c389f 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -2466,11 +2466,11 @@ or, if a character name is specified, of that player.
Type is the kind of associated ID number required:
- 0 - Character ID number.
- 1 - Party ID number.
- 2 - Guild ID number.
- 3 - Account ID number.
- 4 - Battle ground ID
+(0) CHAR_ID_CHAR - Character ID number.
+(1) CHAR_ID_PARTY - Party ID number.
+(2) CHAR_ID_GUILD - Guild ID number.
+(3) CHAR_ID_ACCOUNT - Account ID number.
+(4) CHAR_ID_BG - Battle ground ID
For most purposes other than printing it, a number is better to have than
a name (people do horrifying things to their character names).
@@ -2479,12 +2479,12 @@ If the character is not in a party or not in a guild, the function will
return 0 if guild or party number is requested. If a name is specified and
the character is not found, 0 is returned.
-If getcharid(0) returns a zero, the script got called not by a character
+If getcharid(CHAR_ID_CHAR) returns a zero, the script got called not by a character
and doesn't have an attached RID. Note that this will cause the map server
to print "player not attached!" error messages, so it is preferred to use
playerattached() to check for the character attached to the script.
- if (getcharid(2) == 0)
+ if (getcharid(CHAR_ID_GUILD) == 0)
mes("Only members of a guild are allowed here!");
---------------------------------------
@@ -2588,7 +2588,7 @@ return 7 in this case.
Example 1: list party member names
// get the party member names
- getpartymember(getcharid(1), 0);
+ getpartymember(getcharid(CHAR_ID_PARTY), 0);
// It's a good idea to copy the global temporary $@partymember*****
// variables to your own scope variables because if you have pauses in
@@ -2610,8 +2610,8 @@ Example 2: check party count (with a next() pause), before warping to event
.register_num = 5; // How many party members are required?
// get the charID and accountID of character's party members
- getpartymember(getcharid(1), 1);
- getpartymember(getcharid(1), 2);
+ getpartymember(getcharid(CHAR_ID_PARTY), 1);
+ getpartymember(getcharid(CHAR_ID_PARTY), 2);
if ($@partymembercount != .register_num) {
mes("Please form a party of "+ .register_num +" to continue");
@@ -2645,7 +2645,7 @@ Example 2: check party count (with a next() pause), before warping to event
// party. To prevent this, we call getpartymember again and compare
// with the original values.
- getpartymember(getcharid(1), 1);
+ getpartymember(getcharid(CHAR_ID_PARTY), 1);
if ($@partymembercount != .register_num) {
mes("You've made changes to your party !");
close();
@@ -2658,7 +2658,7 @@ Example 2: check party count (with a next() pause), before warping to event
}
// Finally, it's safe to start the event!
- warpparty("event_map", 0, 0, getcharid(1));
+ warpparty("event_map", 0, 0, getcharid(CHAR_ID_PARTY));
---------------------------------------
@@ -3377,7 +3377,7 @@ guild.
Maybe you want to make a room only guild masters can enter:
- .@GID = getcharid(2);
+ .@GID = getcharid(CHAR_ID_GUILD);
if (.@GID == 0) {
mes("Sorry you are not in a guild");
close();
@@ -3476,7 +3476,7 @@ Returns the amount of characters from the specified guild on the given map.
Example:
- mes("You have "+getmapguildusers("prontera", getcharid(2))+" guild members in Prontera.");
+ mes("You have "+getmapguildusers("prontera", getcharid(CHAR_ID_GUILD))+" guild members in Prontera.");
---------------------------------------
@@ -4251,8 +4251,8 @@ See also warp().
*warpparty("<to_mapname>", <x>, <y>, <party_id>, {"<from_mapname>"})
Warps a party to specified map and coordinate given the party ID, which
-you can get with getcharid(1). You can also request another party id given
-a member's name with getcharid(1, <player_name>).
+you can get with getcharid(CHAR_ID_PARTY). You can also request another party id given
+a member's name with getcharid(CHAR_ID_PARTY, <player_name>).
You can use the following "map names" for special warping behavior:
Random: All party members are randomly warped in their current map
@@ -4273,7 +4273,7 @@ Example:
mes("[Party Warper]");
mes("Here you go!");
close2();
- .@id = getcharid(1);
+ .@id = getcharid(CHAR_ID_PARTY);
warpparty("prontera", 150, 100, .@id);
close();
@@ -4282,7 +4282,7 @@ Example:
*warpchar("<mapname>", <x>, <y>, <char_id>)
Warps another player to specified map and coordinate given the char id,
-which you can get with getcharid(0, <player_name>). Obviously this is
+which you can get with getcharid(CHAR_ID_CHAR, <player_name>). Obviously this is
useless if you want to warp the same player that is executing this script,
unless it's some kind of "chosen" script.
@@ -4295,8 +4295,8 @@ Example:
*warpguild("<mapname>", <x>, <y>, <guild_id>)
Warps a guild to specified map and coordinate given the guild id, which
-you can get with getcharid(2). You can also request another guild id given
-the member's name with getcharid(2, <player_name>).
+you can get with getcharid(CHAR_ID_GUILD). You can also request another guild id given
+the member's name with getcharid(CHAR_ID_GUILD, <player_name>).
You can use the following "map names" for special warping behavior:
Random: All guild members are randomly warped in their current map
@@ -4748,7 +4748,7 @@ like this. Careful, minor magic ahead.
// item. Only an existing character's name may be there.
// Let's assume our character is 'Adam' and find his ID.
- .@charid = getcharid(0, "Adam");
+ .@charid = getcharid(CHAR_ID_CHAR, "Adam");
// Now we split the character ID number into two portions with a
// binary shift operation. If you don't understand what this does,
@@ -5902,10 +5902,10 @@ Examples:
// This will make Aaron follow Bullah, when both of these characters are
// online.
- pcfollow(getcharid(3, "Aaron"), getcharid(3, "Bullah"));
+ pcfollow(getcharid(CHAR_ID_ACCOUNT, "Aaron"), getcharid(CHAR_ID_ACCOUNT, "Bullah"));
// Makes Aaron stop following whoever he is following.
- pcstopfollow(getcharid(3, "Aaron"));
+ pcstopfollow(getcharid(CHAR_ID_ACCOUNT, "Aaron"));
---------------------------------------
@@ -5919,10 +5919,10 @@ player if zero is supplied.
Examples:
// Prevents the current char from moving away.
- pcblockmove(getcharid(3), true);
+ pcblockmove(getcharid(CHAR_ID_ACCOUNT), true);
// Enables the current char to move again.
- pcblockmove(getcharid(3), false);
+ pcblockmove(getcharid(CHAR_ID_ACCOUNT), false);
---------------------------------------
@@ -5983,7 +5983,7 @@ For example:
// We'll make a poring which will automatically attack invoking player:
.@mobGID = monster("prontera", 150, 150, "Poring", PORING, 1); // PORING is defined in the mob db and its value is 1002
- unitattack(.@mobGID, getcharid(3)); // Attacker GID, attacked GID
+ unitattack(.@mobGID, getcharid(CHAR_ID_ACCOUNT)); // Attacker GID, attacked GID
The way you can get the GID of more than only one monster is looping
through all the summons to get their individual GIDs and do whatever you
@@ -6273,7 +6273,7 @@ Examples:
unitwalk(.GID, 150, 150);
//NPC will move towards the attached player.
- unitwalk(.GID, getcharid(3));//a player's GID is their account ID
+ unitwalk(.GID, getcharid(CHAR_ID_ACCOUNT));//a player's GID is their account ID
---------------------------------------
@@ -8519,7 +8519,7 @@ ID this command returns.
Example:
// Store the Party ID of the invoking character.
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
// Attempt to create an instance using that party ID.
.@id = instance_create("Endless Tower", .@party_id);
@@ -8662,7 +8662,7 @@ max - maximum level of all characters in the party (default is max
Example:
-if (instance_check_party(getcharid(1), 2, 2, 149)) {
+if (instance_check_party(getcharid(CHAR_ID_PARTY), 2, 2, 149)) {
mes("Your party meets the Memorial Dungeon requirements.");
mes("All online members are between levels 1-150 and at least two are online.");
close();
@@ -8683,7 +8683,7 @@ min - minimum level of all characters in the guild (default is 1).
max - maximum level of all characters in the guild (default is max level in conf).
Example:
- if (instance_check_guild(getcharid(2), 2, 1, 150)) {
+ if (instance_check_guild(getcharid(CHAR_ID_GUILD), 2, 1, 150)) {
mes("Your guild meets the Memorial Dungeon requirements.");
mes("All online members are between levels 1-150 and at least two are online.");
close();
@@ -8907,10 +8907,10 @@ Example:
*bg_team_setxy(<Battle Group ID>, <x>, <y>)
Update the respawn point of the given battle group to x, y on the same
-map. The <Battle Group ID> can be retrieved using getcharid(4).
+map. The <Battle Group ID> can be retrieved using getcharid(CHAR_ID_BG).
Example:
- bg_team_setxy(getcharid(4), 56, 212);
+ bg_team_setxy(getcharid(CHAR_ID_BG), 56, 212);
mapannounce("bat_a01", "Group [1] has taken the work shop, and will now respawn there.", bc_map, 0xFFCE00);
end;
diff --git a/npc/battleground/flavius/flavius01.txt b/npc/battleground/flavius/flavius01.txt
index 681786792..8370f1e53 100644
--- a/npc/battleground/flavius/flavius01.txt
+++ b/npc/battleground/flavius/flavius01.txt
@@ -405,7 +405,7 @@ OnTouch:
}
bat_b01,10,294,3 script Guillaume Vintenar#b01_a 4_M_RASWORD,{
- if ($@FlaviusBG1_id1 == getcharid(4)) {
+ if ($@FlaviusBG1_id1 == getcharid(CHAR_ID_BG)) {
if ($@FlaviusBG1_Victory == 1) {
.@your_medal = countitem(BF_Badge2);
.@medal_gap = 500 - .@your_medal;
@@ -457,7 +457,7 @@ OnInit:
}
bat_b01,389,14,3 script Croix Vintenar#b01_b 4_M_RASWORD,{
- if ($@FlaviusBG1_id2 == getcharid(4)) {
+ if ($@FlaviusBG1_id2 == getcharid(CHAR_ID_BG)) {
if ($@FlaviusBG1_Victory == 2) {
.@your_medal = countitem(BF_Badge2);
.@medal_gap = 500 - .@your_medal;
@@ -590,7 +590,7 @@ bat_b01,389,16,3 script Croix Camp#flag31 1_FLAG_EAGLE,{ end; }
bat_b01,10,294,3 script Vintenar#bat_b01_aover 4_M_KY_HEAD,{
.@A_B_gap = $@Guill_ScoreBG1 - $@Croix_ScoreBG1;
- if ($@FlaviusBG1_id1 == getcharid(4)) {
+ if ($@FlaviusBG1_id1 == getcharid(CHAR_ID_BG)) {
if (.@A_B_gap > 0) {
.@your_medal = countitem(BF_Badge2);
.@medal_gap = 500 - .@your_medal;
@@ -668,7 +668,7 @@ OnInit:
bat_b01,389,14,3 script Vintenar#bat_b01_bover 4_M_CRU_HEAD,{
.@A_B_gap = $@Guill_ScoreBG1 - $@Croix_ScoreBG1;
- if ($@FlaviusBG1_id2 == getcharid(4)) {
+ if ($@FlaviusBG1_id2 == getcharid(CHAR_ID_BG)) {
if (.@A_B_gap > 0) {
.@your_medal = countitem(BF_Badge2);
.@medal_gap = 500 - .@your_medal;
diff --git a/npc/battleground/flavius/flavius02.txt b/npc/battleground/flavius/flavius02.txt
index becee77c6..232dd7e39 100644
--- a/npc/battleground/flavius/flavius02.txt
+++ b/npc/battleground/flavius/flavius02.txt
@@ -405,7 +405,7 @@ OnTouch:
}
bat_b02,10,294,3 script Guillaume Vintenar#b02_a 4_M_RASWORD,{
- if ($@FlaviusBG2_id1 == getcharid(4)) {
+ if ($@FlaviusBG2_id1 == getcharid(CHAR_ID_BG)) {
if ($@FlaviusBG2_Victory == 1) {
.@your_medal = countitem(BF_Badge2);
.@medal_gap = 500 - .@your_medal;
@@ -457,7 +457,7 @@ OnInit:
}
bat_b02,389,14,3 script Croix Vintenar#b02_b 4_M_RASWORD,{
- if ($@FlaviusBG2_id2 == getcharid(4)) {
+ if ($@FlaviusBG2_id2 == getcharid(CHAR_ID_BG)) {
if ($@FlaviusBG2_Victory == 2) {
.@your_medal = countitem(BF_Badge2);
.@medal_gap = 500 - .@your_medal;
@@ -590,7 +590,7 @@ bat_b02,389,16,3 script Croix Camp#flag42 1_FLAG_EAGLE,{ end; }
bat_b02,10,294,3 script Vintenar#bat_b02_aover 4_M_KY_HEAD,{
.@A_B_gap = $@Guill_ScoreBG2 - $@Croix_ScoreBG2;
- if ($@FlaviusBG2_id1 == getcharid(4)) {
+ if ($@FlaviusBG2_id1 == getcharid(CHAR_ID_BG)) {
if (.@A_B_gap > 0) {
.@your_medal = countitem(BF_Badge2);
.@medal_gap = 500 - .@your_medal;
@@ -668,7 +668,7 @@ OnInit:
bat_b02,389,14,3 script Vintenar#bat_b02_bover 4_M_CRU_HEAD,{
.@A_B_gap = $@Guill_ScoreBG2 - $@Croix_ScoreBG2;
- if ($@FlaviusBG2_id2 == getcharid(4)) {
+ if ($@FlaviusBG2_id2 == getcharid(CHAR_ID_BG)) {
if (.@A_B_gap > 0) {
.@your_medal = countitem(BF_Badge2);
.@medal_gap = 500 - .@your_medal;
diff --git a/npc/battleground/tierra/tierra01.txt b/npc/battleground/tierra/tierra01.txt
index 0dabe28d0..22a612c81 100644
--- a/npc/battleground/tierra/tierra01.txt
+++ b/npc/battleground/tierra/tierra01.txt
@@ -267,8 +267,8 @@ OnKill:
OnMyMobDead:
if (mobcount("bat_a01","OBJ#bat_a01_n::OnMyMobDead") < 17) {
- bg_team_setxy getcharid(4),56,212;
- if (getcharid(4) == $@TierraBG1_id1) {
+ bg_team_setxy getcharid(CHAR_ID_BG),56,212;
+ if (getcharid(CHAR_ID_BG) == $@TierraBG1_id1) {
donpcevent "NOBJ_mob#bat_a01_a::OnEnable";
mapannounce("bat_a01", _("Guillaume captured a Neutrality Flag, so they have an advantage."), bc_map, "0xFFCE00");
}
@@ -313,7 +313,7 @@ OnMyMobDead:
}
bat_a01,185,270,1 script Guillaume Blacksmith#a01 4_M_REPAIR,{
- if (getcharid(4) == $@TierraBG1_id1) {
+ if (getcharid(CHAR_ID_BG) == $@TierraBG1_id1) {
mes("[Guillaume Blacksmith]");
mes("We are in urgency! The Barricade has been destroyed!");
mes("We can repair the Barricade with ^3131FF50 Stones, 3 Sinew of Bear, 500 Metal Fragments, 30 Rough Elunium and 100 Gold.^000000");
@@ -397,7 +397,7 @@ OnInit:
}
bat_a01,170,121,5 script Croix Blacksmith#bat_a01 4_M_REPAIR,{
- if (getcharid(4) == $@TierraBG1_id2) {
+ if (getcharid(CHAR_ID_BG) == $@TierraBG1_id2) {
mes("[Croix Blacksmith]");
mes("We are in urgency! The Barricade has been destroyed!");
mes("We can repair the Barricade with ^3131FF50 Stones, 3 Sinew of Bear, 500 Metal Fragments, 30 Rough Elunium and 100 Gold.^000000");
@@ -622,28 +622,28 @@ OnTouch:
bat_a01,194,267,0 script barri_warp_up#bat_a01_a FAKE_NPC,7,0,{
OnTouch:
- if (getcharid(4) == $@TierraBG1_id1)
+ if (getcharid(CHAR_ID_BG) == $@TierraBG1_id1)
warp "bat_a01",194,261;
end;
}
bat_a01,194,265,0 script barri_warp_down#bat_a01a FAKE_NPC,7,0,{
OnTouch:
- if (getcharid(4) == $@TierraBG1_id1)
+ if (getcharid(CHAR_ID_BG) == $@TierraBG1_id1)
warp "bat_a01",194,270;
end;
}
bat_a01,177,130,0 script barri_warp_up#bat_a01_b FAKE_NPC,7,0,{
OnTouch:
- if (getcharid(4) == $@TierraBG1_id2)
+ if (getcharid(CHAR_ID_BG) == $@TierraBG1_id2)
warp "bat_a01",178,125;
end;
}
bat_a01,177,128,0 script barri_warp_down#bat_a01b FAKE_NPC,7,0,{
OnTouch:
- if (getcharid(4) == $@TierraBG1_id2)
+ if (getcharid(CHAR_ID_BG) == $@TierraBG1_id2)
warp "bat_a01",178,134;
end;
}
@@ -695,7 +695,7 @@ bat_a01,357,74,3 script Croix Camp#flag8 1_FLAG_EAGLE,{ end; }
bat_a01,348,74,3 script Croix Camp#flag9 1_FLAG_EAGLE,{ end; }
bat_a01,53,377,3 script Guillaume Vintenar#a01_a 4_M_KY_HEAD,{
- if (getcharid(4) == $@TierraBG1_id1) {
+ if (getcharid(CHAR_ID_BG) == $@TierraBG1_id1) {
if ($@TierraBG1_Victory == 1) {
.@your_medal = countitem(BF_Badge1);
.@medal_gap = 500 - .@your_medal;
@@ -789,7 +789,7 @@ OnInit:
}
bat_a01,45,19,3 script Croix Vintenar#a01_b 4_M_CRU_HEAD,{
- if (getcharid(4) == $@TierraBG1_id2) {
+ if (getcharid(CHAR_ID_BG) == $@TierraBG1_id2) {
if ($@TierraBG1_Victory == 2) {
.@your_medal = countitem(BF_Badge1);
.@medal_gap = 500 - .@your_medal;
diff --git a/npc/battleground/tierra/tierra02.txt b/npc/battleground/tierra/tierra02.txt
index ac7710aa8..a54935089 100644
--- a/npc/battleground/tierra/tierra02.txt
+++ b/npc/battleground/tierra/tierra02.txt
@@ -267,8 +267,8 @@ OnKill:
OnMyMobDead:
if (mobcount("bat_a02","OBJ#bat_a02_n::OnMyMobDead") < 17) {
- bg_team_setxy getcharid(4),56,212;
- if (getcharid(4) == $@TierraBG2_id1) {
+ bg_team_setxy getcharid(CHAR_ID_BG),56,212;
+ if (getcharid(CHAR_ID_BG) == $@TierraBG2_id1) {
donpcevent "NOBJ_mob#bat_a02_a::OnEnable";
mapannounce("bat_a02", _("Guillaume captured a Neutrality Flag, so they have an advantage."), bc_map, "0xFFCE00");
}
@@ -313,7 +313,7 @@ OnMyMobDead:
}
bat_a02,185,270,1 script Guillaume Blacksmith#a02 4_M_REPAIR,{
- if (getcharid(4) == $@TierraBG2_id1) {
+ if (getcharid(CHAR_ID_BG) == $@TierraBG2_id1) {
mes("[Guillaume Blacksmith]");
mes("We are in urgency! The Barricade has been destroyed!");
mes("We can repair the Barricade with ^3131FF50 Stones, 3 Sinew of Bear, 500 Metal Fragments, 30 Rough Elunium and 100 Gold.^000000");
@@ -397,7 +397,7 @@ OnInit:
}
bat_a02,170,121,5 script Croix Blacksmith#bat_a02 4_M_REPAIR,{
- if (getcharid(4) == $@TierraBG2_id2) {
+ if (getcharid(CHAR_ID_BG) == $@TierraBG2_id2) {
mes("[Croix Blacksmith]");
mes("We are in urgency! The Barricade has been destroyed!");
mes("We can repair the Barricade with ^3131FF50 Stones, 3 Sinew of Bear, 500 Metal Fragments, 30 Rough Elunium and 100 Gold.^000000");
@@ -622,28 +622,28 @@ OnTouch:
bat_a02,194,267,0 script barri_warp_up#bat_a02_a FAKE_NPC,7,0,{
OnTouch:
- if (getcharid(4) == $@TierraBG2_id1)
+ if (getcharid(CHAR_ID_BG) == $@TierraBG2_id1)
warp "bat_a02",194,261;
end;
}
bat_a02,194,265,0 script barri_warp_down#bat_a02a FAKE_NPC,7,0,{
OnTouch:
- if (getcharid(4) == $@TierraBG2_id1)
+ if (getcharid(CHAR_ID_BG) == $@TierraBG2_id1)
warp "bat_a02",194,270;
end;
}
bat_a02,177,130,0 script barri_warp_up#bat_a02_b FAKE_NPC,7,0,{
OnTouch:
- if (getcharid(4) == $@TierraBG2_id2)
+ if (getcharid(CHAR_ID_BG) == $@TierraBG2_id2)
warp "bat_a02",178,125;
end;
}
bat_a02,177,128,0 script barri_warp_down#bat_a02b FAKE_NPC,7,0,{
OnTouch:
- if (getcharid(4) == $@TierraBG2_id2)
+ if (getcharid(CHAR_ID_BG) == $@TierraBG2_id2)
warp "bat_a02",178,134;
end;
}
@@ -695,7 +695,7 @@ bat_a02,357,74,3 script Croix Camp#flag18 1_FLAG_EAGLE,{ end; }
bat_a02,348,74,3 script Croix Camp#flag19 1_FLAG_EAGLE,{ end; }
bat_a02,53,377,3 script Guillaume Vintenar#a02_a 4_M_KY_HEAD,{
- if (getcharid(4) == $@TierraBG2_id1) {
+ if (getcharid(CHAR_ID_BG) == $@TierraBG2_id1) {
if ($@TierraBG2_Victory == 1) {
.@your_medal = countitem(BF_Badge1);
.@medal_gap = 500 - .@your_medal;
@@ -789,7 +789,7 @@ OnInit:
}
bat_a02,45,19,3 script Croix Vintenar#a02_b 4_M_CRU_HEAD,{
- if (getcharid(4) == $@TierraBG2_id2) {
+ if (getcharid(CHAR_ID_BG) == $@TierraBG2_id2) {
if ($@TierraBG2_Victory == 2) {
.@your_medal = countitem(BF_Badge1);
.@medal_gap = 500 - .@your_medal;
diff --git a/npc/custom/battleground/bg_tierra_01.txt b/npc/custom/battleground/bg_tierra_01.txt
index bab80916b..56a505356 100644
--- a/npc/custom/battleground/bg_tierra_01.txt
+++ b/npc/custom/battleground/bg_tierra_01.txt
@@ -99,13 +99,13 @@ OnReadyCheck:
end;
OnNeutralBreak:
- if( getcharid(4) == $@TierraBG1_id1 )
+ if( getcharid(CHAR_ID_BG) == $@TierraBG1_id1 )
{
mapannounce "bat_a01","Guillaume obtained a neurality banner, so they have an advantage.",1,0x0000FF;
bg_team_setxy $@TierraBG1_id2,42,16;
areawarp "bat_a01",52,208,61,217,"bat_a01",42,16;
}
- else if( getcharid(4) == $@TierraBG1_id2 )
+ else if( getcharid(CHAR_ID_BG) == $@TierraBG1_id2 )
{
mapannounce "bat_a01","Croix obtained a neutrality banner, so they have an advantage.",1,0xFF0000;
bg_team_setxy $@TierraBG1_id1,50,374;
@@ -113,7 +113,7 @@ OnNeutralBreak:
}
else end;
- set .Neutral_Base, getcharid(4);
+ set .Neutral_Base, getcharid(CHAR_ID_BG);
bg_team_setxy .Neutral_Base,56,212;
if( .Guardian_1 == 0 )
diff --git a/npc/custom/battleground/bg_tierra_02.txt b/npc/custom/battleground/bg_tierra_02.txt
index 791f02109..e0f1b402a 100644
--- a/npc/custom/battleground/bg_tierra_02.txt
+++ b/npc/custom/battleground/bg_tierra_02.txt
@@ -99,13 +99,13 @@ OnReadyCheck:
end;
OnNeutralBreak:
- if( getcharid(4) == $@TierraBG2_id1 )
+ if( getcharid(CHAR_ID_BG) == $@TierraBG2_id1 )
{
mapannounce "bat_a02","Guillaume obtained a neurality banner, so they have an advantage.",1,0x0000FF;
bg_team_setxy $@TierraBG2_id2,42,16;
areawarp "bat_a02",52,208,61,217,"bat_a02",42,16;
}
- else if( getcharid(4) == $@TierraBG2_id2 )
+ else if( getcharid(CHAR_ID_BG) == $@TierraBG2_id2 )
{
mapannounce "bat_a02","Croix obtained a neutrality banner, so they have an advantage.",1,0xFF0000;
bg_team_setxy $@TierraBG2_id1,50,374;
@@ -113,7 +113,7 @@ OnNeutralBreak:
}
else end;
- set .Neutral_Base, getcharid(4);
+ set .Neutral_Base, getcharid(CHAR_ID_BG);
bg_team_setxy .Neutral_Base,56,212;
if( .Guardian_1 == 0 )
diff --git a/npc/custom/bgqueue/flavius.txt b/npc/custom/bgqueue/flavius.txt
index 33561db0a..d959253f3 100644
--- a/npc/custom/bgqueue/flavius.txt
+++ b/npc/custom/bgqueue/flavius.txt
@@ -170,12 +170,12 @@ OnReset:
end;
OnCroixQuit:
- queueremove($@Croix_QueueBG1,getcharid(3));
+ queueremove($@Croix_QueueBG1,getcharid(CHAR_ID_ACCOUNT));
callsub L_OnPlayerQuit;
end;
OnGuillaumeQuit:
- queueremove($@Guill_QueueBG1,getcharid(3));
+ queueremove($@Guill_QueueBG1,getcharid(CHAR_ID_ACCOUNT));
callsub L_OnPlayerQuit;
end;
@@ -437,7 +437,7 @@ OnTouch:
}
bat_b01,10,294,3 script Guillaume Vintenar#b01_a 4_M_RASWORD,{
- if ($@FlaviusBG1_id1 == getcharid(4)) {
+ if ($@FlaviusBG1_id1 == getcharid(CHAR_ID_BG)) {
if ($@FlaviusBG1_Victory == 1) {
set .@your_medal,countitem(BF_Badge2);
set .@medal_gap,500 - .@your_medal;
@@ -489,7 +489,7 @@ OnInit:
}
bat_b01,389,14,3 script Croix Vintenar#b01_b 4_M_RASWORD,{
- if ($@FlaviusBG1_id2 == getcharid(4)) {
+ if ($@FlaviusBG1_id2 == getcharid(CHAR_ID_BG)) {
if ($@FlaviusBG1_Victory == 2) {
set .@your_medal,countitem(BF_Badge2);
set .@medal_gap,500 - .@your_medal;
@@ -623,7 +623,7 @@ bat_b01,389,16,3 script Croix Camp#flag31 1_FLAG_EAGLE,{ end; }
bat_b01,10,294,3 script Vintenar#bat_b01_aover 4_M_KY_HEAD,{
set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
- if ($@FlaviusBG1_id1 == getcharid(4)) {
+ if ($@FlaviusBG1_id1 == getcharid(CHAR_ID_BG)) {
if (.@A_B_gap > 0) {
set .@your_medal,countitem(BF_Badge2);
set .@medal_gap,500 - .@your_medal;
@@ -701,7 +701,7 @@ OnInit:
bat_b01,389,14,3 script Vintenar#bat_b01_bover 4_M_CRU_HEAD,{
set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
- if ($@FlaviusBG1_id2 == getcharid(4)) {
+ if ($@FlaviusBG1_id2 == getcharid(CHAR_ID_BG)) {
if (.@A_B_gap > 0) {
set .@your_medal,countitem(BF_Badge2);
set .@medal_gap,500 - .@your_medal;
diff --git a/npc/custom/etc/marriage.txt b/npc/custom/etc/marriage.txt
index 76b0429c8..4e521ec55 100644
--- a/npc/custom/etc/marriage.txt
+++ b/npc/custom/etc/marriage.txt
@@ -723,13 +723,13 @@ function SF_TryRegister {
set $wed_bride$,strcharinfo(PC_NAME);
$wed_bride_sex = Sex;
if ($@wedding_effect == 1) //Store account id for effect.
- set $wedding_effect_id, getcharid(3);
+ set $wedding_effect_id, getcharid(CHAR_ID_ACCOUNT);
} else {
set $wed_groom_progress,1;
set $wed_groom$,strcharinfo(PC_NAME);
$wed_groom_sex = Sex;
if ($@wedding_effect == 2) //Store account id for effect.
- set $wedding_effect_id, getcharid(3);
+ set $wedding_effect_id, getcharid(CHAR_ID_ACCOUNT);
}
}
@@ -882,7 +882,7 @@ function SF_InProgress {
mes "...I am still waiting for your partner to confirm the divorce procedure.";
close;
}
- if (getcharid(0) != $@divorcee) {
+ if (getcharid(CHAR_ID_CHAR) != $@divorcee) {
mes "["+@name$+"]";
mes "I am in the progress of divorcing "+$@divorcer$+".";
mes "Do you know who the spouse is?";
diff --git a/npc/custom/events/cluckers.txt b/npc/custom/events/cluckers.txt
index f0967590b..fbdbbed3f 100644
--- a/npc/custom/events/cluckers.txt
+++ b/npc/custom/events/cluckers.txt
@@ -23,20 +23,20 @@ prontera,156,219,4 script Cluckers 4_NFCOCK,{
if (.startcluck) {
specialeffect2 2;
switch(rand(15)) {
- case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
+ case 0: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 1: npctalk "Cluuuuuck!~"; break;
- case 2: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
+ case 2: unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; break;
case 3: sc_start SC_FREEZE,10000,0; break;
- case 4: npctalk "CLUUUUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
+ case 4: npctalk "CLUUUUUUUUUCK!!!"; unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 5: sc_start SC_SLEEP,10000,0; break;
case 6: sc_start SC_STONE,10000,0; emotion 29; break;
- case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
- case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; emotion 23; break;
+ case 7: npctalk "CLUUUUUUCK!!!"; unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; emotion 23; break;
+ case 8: npctalk "Cluck! CLUUUCK!!"; unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; emotion 23; break;
case 9: sc_start SC_STUN,10000,0; break;
case 10: sc_start SC_SLEEP,10000,0; emotion 29; break;
case 11: npctalk "Cluck! Cluck!"; break;
case 12: sc_start SC_STUN,10000,0; break;
- case 13: unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1; break;
+ case 13: unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1; break;
default:
if (rand(50) < 4) {
npctalk "WOOF!...........";
@@ -46,7 +46,7 @@ prontera,156,219,4 script Cluckers 4_NFCOCK,{
set .startcluck,0;
} else {
npctalk "Cluck! CLUUUCK!!";
- unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1;
+ unitskilluseid getcharid(CHAR_ID_ACCOUNT),"NPC_SELFDESTRUCTION",1;
}
break;
}
diff --git a/npc/custom/item_signer.txt b/npc/custom/item_signer.txt
index 7e90542b1..a0097bb55 100644
--- a/npc/custom/item_signer.txt
+++ b/npc/custom/item_signer.txt
@@ -126,7 +126,7 @@ prt_in,24,61,7 script Perchik 1_M_01,{
delitem2 .@id,1,1,.@ref,0,.@slot[0],.@slot[1],.@slot[2],.@slot[3];
mes "Done!";
emotion e_proud;
- getitem2 .@id,1,1,.@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff;
+ getitem2 .@id,1,1,.@ref,0,254,0,getcharid(CHAR_ID_CHAR)&0xffff,(getcharid(CHAR_ID_CHAR)>>16)&0xffff;
equip .@id;
close;
}
diff --git a/npc/custom/itembind.txt b/npc/custom/itembind.txt
index 66b37f4e7..8c51ad24d 100644
--- a/npc/custom/itembind.txt
+++ b/npc/custom/itembind.txt
@@ -25,7 +25,7 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{
}
mes "What kind of bind?";
.@boundtype = 1 << (select("Account", "Guild", "Character")-1);
- if(.@boundtype == 2 && (!getcharid(2) || getguildmaster(getcharid(2)) != strcharinfo(PC_NAME))) {
+ if(.@boundtype == 2 && (!getcharid(CHAR_ID_GUILD) || getguildmaster(getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME))) {
mes "In order for me to bind an item to a guild you must be the master of one.";
close;
}
@@ -92,7 +92,7 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{
next;
for(.@i = 0; .@i < getarraysize(@bound_items); .@i++) {
if(@inventorylist_id[.@item] == @bound_items[.@i] &&
- (!getcharid(2) || getguildmaster(getcharid(2)) != strcharinfo(PC_NAME))
+ (!getcharid(CHAR_ID_GUILD) || getguildmaster(getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME))
) {
mes "I will only unbind guild bound items that the guild master requests.";
close;
diff --git a/npc/custom/quests/hunting_missions.txt b/npc/custom/quests/hunting_missions.txt
index dc4e20f79..611bdd480 100644
--- a/npc/custom/quests/hunting_missions.txt
+++ b/npc/custom/quests/hunting_missions.txt
@@ -50,7 +50,7 @@ function Chk; function Cm;
mes "You've started a mission";
mes "on another character.";
if ( !@hm_char_del_check ) {
- if ( !query_sql( "SELECT 1 FROM `char_reg_num_db` WHERE `key` = 'Mission0' AND `char_id` IN ( SELECT `char_id` FROM `char` WHERE `account_id` = "+ getcharid(3) +" )", .@dummy ) ) {
+ if ( !query_sql( "SELECT 1 FROM `char_reg_num_db` WHERE `key` = 'Mission0' AND `char_id` IN ( SELECT `char_id` FROM `char` WHERE `account_id` = "+ getcharid(CHAR_ID_ACCOUNT) +" )", .@dummy ) ) {
next;
mes "[Hunting Missions]";
mes "I can't seem to find any records";
@@ -198,8 +198,8 @@ Mission_Status:
set #Mission_Count,0;
if (.Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600);
set Mission_Total, Mission_Total+1;
- if (Mission_Total == 1) query_sql("INSERT INTO `char_reg_num_db` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(0)+",'Mission_Total','0',1)");
- else query_sql("UPDATE `char_reg_num_db` SET `value` = "+Mission_Total+" WHERE `char_id` = "+getcharid(0)+" AND `key` = 'Mission_Total'");
+ if (Mission_Total == 1) query_sql("INSERT INTO `char_reg_num_db` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(CHAR_ID_CHAR)+",'Mission_Total','0',1)");
+ else query_sql("UPDATE `char_reg_num_db` SET `value` = "+Mission_Total+" WHERE `char_id` = "+getcharid(CHAR_ID_CHAR)+" AND `key` = 'Mission_Total'");
close;
Mission_Info:
@@ -258,7 +258,7 @@ OnBuyItem:
close;
OnNPCKillEvent:
- if (!getcharid(1) || !.Party) {
+ if (!getcharid(CHAR_ID_PARTY) || !.Party) {
if (!#Mission_Count || !Mission0) end;
for (set .@i, 0; .@i<.Quests; set .@i,.@i+1) {
if (strmobinfo(1,killedrid) == strmobinfo(1,getd("Mission"+.@i))) {
@@ -271,8 +271,8 @@ OnNPCKillEvent:
} else if (.Party) {
set .@mob, killedrid;
getmapxy(.@map1$, .@x1, .@y1, UNITTYPE_PC);
- getpartymember getcharid(1),1;
- getpartymember getcharid(1),2;
+ getpartymember getcharid(CHAR_ID_PARTY),1;
+ getpartymember getcharid(CHAR_ID_PARTY),2;
for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) {
if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) {
attachrid $@partymemberaid[.@i];
diff --git a/npc/custom/woe_controller.txt b/npc/custom/woe_controller.txt
index e109951d7..14e288be7 100644
--- a/npc/custom/woe_controller.txt
+++ b/npc/custom/woe_controller.txt
@@ -194,7 +194,7 @@ OnReward:
OnPCLoadMapEvent:
if (!compare(strcharinfo(PC_MAP),"g_cas")) end;
if (((.AutoKick && .Active[0]) || (.NoOwner && !getcastledata(strcharinfo(PC_MAP),1))) && !(.Active[0]&(1<<getd("."+strcharinfo(PC_MAP))))) {
- if (getcharid(2) && getcastledata(strcharinfo(PC_MAP),1) == getcharid(2)) end;
+ if (getcharid(CHAR_ID_GUILD) && getcastledata(strcharinfo(PC_MAP),1) == getcharid(CHAR_ID_GUILD)) end;
sleep2 1000;
message strcharinfo(PC_NAME), getcastlename(strcharinfo(PC_MAP))+" is currently inactive.";
sleep2 5000;
diff --git a/npc/events/gdevent_aru.txt b/npc/events/gdevent_aru.txt
index 39c3ca5f7..898880d02 100644
--- a/npc/events/gdevent_aru.txt
+++ b/npc/events/gdevent_aru.txt
@@ -79,13 +79,13 @@ OnMyMobDead:
}
arug_dun01,199,195,5 script Dwarf#aru_gd 4_M_DWARF,{
- if (getcharid(2) == 0) {
+ if (getcharid(CHAR_ID_GUILD) == 0) {
mes "[Dwarf]";
mes "Hey did you see an ugly Goblin come by? He stole something from me!";
close;
}
.@chk_urquest = questprogress(2143,PLAYTIME);
- .@chk_yourgdname$ = getguildname(getcharid(2));
+ .@chk_yourgdname$ = getguildname(getcharid(CHAR_ID_GUILD));
if ($@gdeventv_a1 == 0) {
if ($@gdevents_a$ == "") {
$@gdeventv_a1 = 1;
@@ -521,7 +521,7 @@ arug_que01,100,81,3 script Pierrot Pier#aru_gd 4_M_PIERROT,{
mes "- and come back later. -";
close;
}
- if (strcharinfo(PC_NAME) == getguildmaster(getcharid(2))) {
+ if (strcharinfo(PC_NAME) == getguildmaster(getcharid(CHAR_ID_GUILD))) {
if ($@gdeventv_a2 == 0) {
.@que_2143 = questprogress(2143,PLAYTIME);
if (!.@que_2143) {
diff --git a/npc/events/gdevent_sch.txt b/npc/events/gdevent_sch.txt
index 1d6b892b7..e04a28075 100644
--- a/npc/events/gdevent_sch.txt
+++ b/npc/events/gdevent_sch.txt
@@ -79,13 +79,13 @@ OnMyMobDead:
}
schg_dun01,194,148,5 script Dwarf#sch_gd 4_M_DWARF,{
- if (getcharid(2) == 0) {
+ if (getcharid(CHAR_ID_GUILD) == 0) {
mes "[Dwarf]";
mes "Hey did you see an ugly Goblin come by? He stole something from me!";
close;
}
.@chk_urquest = questprogress(2143,PLAYTIME);
- .@chk_yourgdname$ = getguildname(getcharid(2));
+ .@chk_yourgdname$ = getguildname(getcharid(CHAR_ID_GUILD));
if ($@gdeventv_s1 == 0) {
if ($@gdevents_s$ == "") {
$@gdeventv_s1 = 1;
@@ -520,7 +520,7 @@ schg_que01,100,81,3 script Pierrot Pier#sch_gd 4_M_PIERROT,{
mes "- and come back later. -";
close;
}
- if (strcharinfo(PC_NAME) == getguildmaster(getcharid(2))) {
+ if (strcharinfo(PC_NAME) == getguildmaster(getcharid(CHAR_ID_GUILD))) {
if ($@gdeventv_s2 == 0) {
.@que_2143 = questprogress(2143,PLAYTIME);
if (!.@que_2143) {
diff --git a/npc/events/god_se_festival.txt b/npc/events/god_se_festival.txt
index 1dbbe434a..7c0523cf5 100644
--- a/npc/events/god_se_festival.txt
+++ b/npc/events/god_se_festival.txt
@@ -66,7 +66,7 @@ yuno,1,1,0 script Festival Manager#gq_fes0 4_F_HUGIRL,{
}
yuno,118,192,5 script Rmimi Ravies#gq_fes01 4_F_HUGIRL,{
- .@GID = getcharid(2);
+ .@GID = getcharid(CHAR_ID_GUILD);
if (countitem(Valkyrie_Gift) > 0) {
mes "[Rmimi Ravies]";
mes "This is the flower.";
@@ -442,7 +442,7 @@ rachel,1,1,0 script Festival Manager#gq_fes2 4_F_HUGIRL,{
}
rachel,132,117,3 script Rhehe Ravies#gq_fes03 4_F_HUGIRL,{
- .@GID = getcharid(2);
+ .@GID = getcharid(CHAR_ID_GUILD);
if (countitem(Valkyrie_Gift) > 0) {
mes "[Rhehe Ravies]";
mes "A flower!!";
diff --git a/npc/events/nguild/nguild_dunsw.txt b/npc/events/nguild/nguild_dunsw.txt
index 23cd8ec8c..291b08db3 100644
--- a/npc/events/nguild/nguild_dunsw.txt
+++ b/npc/events/nguild/nguild_dunsw.txt
@@ -49,7 +49,7 @@ function script F_GldDunSw {
next;
if (select("Pull.", "Do not.") == 1) {
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
warp "gld_dun"+getarg(1),getarg(2),getarg(3);
end;
}
diff --git a/npc/events/nguild/nguild_ev_agit.txt b/npc/events/nguild/nguild_ev_agit.txt
index cbf6aec3c..99545bfff 100644
--- a/npc/events/nguild/nguild_ev_agit.txt
+++ b/npc/events/nguild/nguild_ev_agit.txt
@@ -67,7 +67,7 @@ function script F_AgitBreak {
.@map$ = getarg(0);
.@castle$ = getarg(1);
- .@GID = getcharid(2);
+ .@GID = getcharid(CHAR_ID_GUILD);
if (.@GID <= 0) return;
.@Economy = getcastledata(.@map$,2) - 5;
diff --git a/npc/events/nguild/nguild_flags.txt b/npc/events/nguild/nguild_flags.txt
index d2a753003..999f79dca 100644
--- a/npc/events/nguild/nguild_flags.txt
+++ b/npc/events/nguild/nguild_flags.txt
@@ -53,12 +53,12 @@ function script F_Flags {
return;
}
else {
- if (getcharid(2) == .@GID && getarg(4) == 1) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID && getarg(4) == 1) {
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if (select("Return to the guild castle.", "Quit.") == 1) {
- if (getcharid(2) == getcastledata(getarg(1),1))
+ if (getcharid(CHAR_ID_GUILD) == getcastledata(getarg(1),1))
warp getarg(1),getarg(2),getarg(3);
}
return;
diff --git a/npc/events/nguild/nguild_kafras.txt b/npc/events/nguild/nguild_kafras.txt
index 66c53ff2d..8b448bbe3 100644
--- a/npc/events/nguild/nguild_kafras.txt
+++ b/npc/events/nguild/nguild_kafras.txt
@@ -39,7 +39,7 @@
function script F_GKafra {
cutin "kafra_01",2;
@GID = getcastledata(getarg(0),1);
- if (getcharid(2) == @GID && getgdskilllv(@GID,10001)) goto L_StartG;
+ if (getcharid(CHAR_ID_GUILD) == @GID && getgdskilllv(@GID,10001)) goto L_StartG;
mes "[Kafra Service]";
mes "I am contracted to provide service only for the ^ff0000" + getguildname(@GID) + "^000000 Guild. Please use another Kafra Corporation staff member around here. I am Sorry for your inconvenience.";
diff --git a/npc/events/nguild/nguild_managers.txt b/npc/events/nguild/nguild_managers.txt
index 6ff1e7e2a..1d9b56966 100644
--- a/npc/events/nguild/nguild_managers.txt
+++ b/npc/events/nguild/nguild_managers.txt
@@ -47,7 +47,7 @@ function script F_GldManager {
mes "I am waiting for my master. Brave adventurer, follow your destiny!";
return;
}
- if (getcharid(2) != @GID){
+ if (getcharid(CHAR_ID_GUILD) != @GID){
mes "I am here to follow ^5533FF" + getguildmaster(@GID) + "^000000's command! Hey! Your not even a part of the guild!!";
mes "Where are the guardians? Destroy these intruders!";
return;
diff --git a/npc/events/nguild/nguild_warper.txt b/npc/events/nguild/nguild_warper.txt
index 07ee4b0ed..a2e2faed1 100644
--- a/npc/events/nguild/nguild_warper.txt
+++ b/npc/events/nguild/nguild_warper.txt
@@ -42,24 +42,24 @@
prontera,146,163,6 script Novice Castles 4_F_NOVICE,{
mes "[Cita]";
- if (!getcharid(2)) {
+ if (!getcharid(CHAR_ID_GUILD)) {
mes "^FF0000You have to enter a guild to be able to hit Emperium!^000000";
- } else if (getgdskilllv(getcharid(2),10013) ||
- (getgdskilllv(getcharid(2),10000) +
- getgdskilllv(getcharid(2),10001) +
- getgdskilllv(getcharid(2),10002) +
- getgdskilllv(getcharid(2),10003) +
- getgdskilllv(getcharid(2),10004) +
- getgdskilllv(getcharid(2),10005) +
- getgdskilllv(getcharid(2),10006) +
- getgdskilllv(getcharid(2),10007) +
- getgdskilllv(getcharid(2),10008) +
- getgdskilllv(getcharid(2),10009) +
- getgdskilllv(getcharid(2),10010) +
- getgdskilllv(getcharid(2),10011) +
- getgdskilllv(getcharid(2),10012) +
- getgdskilllv(getcharid(2),10013) +
- getgdskilllv(getcharid(2),10014) > 9)
+ } else if (getgdskilllv(getcharid(CHAR_ID_GUILD),10013) ||
+ (getgdskilllv(getcharid(CHAR_ID_GUILD),10000) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10001) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10002) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10003) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10004) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10005) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10006) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10007) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10008) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10009) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10010) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10011) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10012) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10013) +
+ getgdskilllv(getcharid(CHAR_ID_GUILD),10014) > 9)
) {
mes "I see... your guild has Emergency Call mastered.";
mes "You cannot enter the Novice Castle area.";
diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt
index 8fc6f973e..e6947d2a4 100644
--- a/npc/instances/EndlessTower.txt
+++ b/npc/instances/EndlessTower.txt
@@ -209,7 +209,7 @@ alberta,214,77,6 script Captain Janssen 4_M_SEAMAN,{
e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@p_name$ = getpartyname(.@party_id);
.@md_name$ = "Endless Tower";
@@ -221,7 +221,7 @@ e_tower,81,105,0 script Tower Protection Stone 2_MONEMUS,{
close;
}
if (!.@etower_timer) {
- if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ 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")) {
diff --git a/npc/instances/NydhoggsNest.txt b/npc/instances/NydhoggsNest.txt
index c8f6c8567..bad1aacec 100644
--- a/npc/instances/NydhoggsNest.txt
+++ b/npc/instances/NydhoggsNest.txt
@@ -104,7 +104,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper HIDDEN_NPC,8,8,{
}
} else if (ins_nyd == 131 || ins_nyd == 132 || ins_nyd > 199) {
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@md_name$ = "Nidhoggur's Nest";
.@ins_nyd_check = questprogress(3135,PLAYTIME); // 3 Day cooldown
@@ -124,7 +124,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper HIDDEN_NPC,8,8,{
mes "And only 1 representative of you needs to talk to me, so don't annoy me...";
close;
}
- if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2)) {
mes "[Yggdrasil Gatekeeper]";
mes "The loyal servants of the Guardian... what can I do for you?";
next;
@@ -224,7 +224,7 @@ L_Enter:
mes "You did not request for entrance. Please let your leader request entrance.";
close;
} else {
- mapannounce "nyd_dun02", getpartyname(getcharid(1))+"'s party member "+strcharinfo(PC_NAME)+" has entered Nidhoggur's Nest.",bc_map,"0x00ff99";
+ mapannounce "nyd_dun02", getpartyname(getcharid(CHAR_ID_PARTY))+"'s party member "+strcharinfo(PC_NAME)+" has entered Nidhoggur's Nest.",bc_map,"0x00ff99";
if (!questprogress(3135)) setquest 3135;
if (!questprogress(3136)) setquest 3136;
warp "1@nyd",32,37;
@@ -1608,7 +1608,7 @@ OnTouch_:
mes "I thank you deeply for your decision. I will use what is left of my powers to open up the path towards the Guardian's Nest.";
next;
mes "[World Tree Yggdrasil]";
- if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY),2)) {
mes "The path to the Guardian's Nest is just past the waterfall by the large World Tree Yggdrasil to the North. The defensive mechanisms of the Sanctuary will start immediately.";
next;
mes "[World Tree Yggdrasil]";
@@ -1860,7 +1860,7 @@ OnTouch:
2@nyd,199,268,0 script nyd_2f_boss_enter FAKE_NPC,8,8,{
OnTouch_:
- if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY),2)) {
donpcevent instance_npcname("nyd_2f_boss_enter_call")+"::OnEnable";
disablenpc instance_npcname("nyd_2f_boss_enter");
end;
diff --git a/npc/instances/OrcsMemory.txt b/npc/instances/OrcsMemory.txt
index 4455124eb..48412a631 100644
--- a/npc/instances/OrcsMemory.txt
+++ b/npc/instances/OrcsMemory.txt
@@ -39,7 +39,7 @@
//== Entrance ==============================================
gef_fild10,242,202,0 script Dimensional Gorge Piece 2_MONEMUS,{
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@p_name$ = getpartyname(.@party_id);
.@md_name$ = "Orc's Memory";
@@ -62,7 +62,7 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 2_MONEMUS,{
close;
// Fall through to access the dungeon
} else { // !.@orctime
- if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ 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")) {
@@ -684,7 +684,7 @@ OnTimer23910:
}
2@orcs,26,164,0 script Torch#1-1 CLEAR_NPC,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
+ 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 (.@id[1] == 4)
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index fd33f16a0..90efe6f5c 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -105,7 +105,7 @@ monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{
case 2:
if (BaseLevel >= 75) {
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
mes "[Friar Patrick]";
mes "Do you mean you'll go to the shrine and reseal Baphomet?";
@@ -117,7 +117,7 @@ monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{
//.@ins_bapho_check2 = questprogress(3045,PLAYTIME);
if (!.@ins_bapho_check) {
- if (getpartyleader(.@party_id,2) == getcharid(0) && instance_check_party(.@party_id,2,75)) {
+ 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)+"...";
@@ -491,7 +491,7 @@ OnMyMobDead:
//== Soul of hero near the north grave =====================
1@cata,141,221,0 script Gravestone# CLEAR_NPC,3,3,{
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
if ('ins_baphomet == 0) {
mes "The gravestone is trembling...";
next;
@@ -548,7 +548,7 @@ OnMyMobDead:
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(0))) {
+ 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;
@@ -598,7 +598,7 @@ OnInstanceInit: // Temporary fix for @reloadscript.
}
1@cata,176,119,4 script Ancient Hero's Soul#1F 4_M_CHAMPSOUL,{
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
cutin "ins_cata_champ_n",2;
if ('ins_baphomet == 2) {
mes "[Ancient Hero's Soul]";
@@ -660,7 +660,7 @@ OnInstanceInit: // Temporary fix for @reloadscript.
break;
case 3:
++.@ins_baphomet_1f_3;
- if (getpartyleader(.@party_id,2) == getcharid(0)) {
+ 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;
@@ -712,7 +712,7 @@ OnInstanceInit: // Temporary fix for @reloadscript.
}
if (.@exitloop) break;
}
- if (getpartyleader(.@party_id,2) == getcharid(0)) {
+ 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;
@@ -729,7 +729,7 @@ OnInstanceInit: // Temporary fix for @reloadscript.
cutin "",255;
end;
}
- else if (('ins_baphomet == 3) && (getpartyleader(.@party_id,2) == getcharid(0))) {
+ 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?";
@@ -766,7 +766,7 @@ OnInstanceInit: // Temporary fix for @reloadscript.
cutin "",255;
end;
}
- else if (('ins_baphomet == 4) && (getpartyleader(.@party_id,2) == getcharid(0))) {
+ 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.";
@@ -886,8 +886,8 @@ OnInstanceInit:
//== Bobbing Torches =======================================
- script Bobbing Torch#SS FAKE_NPC,{
- .@party_id = getcharid(1);
- if (getpartyleader(.@party_id,2) == getcharid(0)) {
+ .@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;
@@ -1124,8 +1124,8 @@ OnInstanceInit:
2@cata,35,109,0 duplicate(Magical Seal#SS) Magical Seal#10 CLEAR_NPC
2@cata,79,65,0 script The Main Altar#ss CLEAR_NPC,{
- .@party_id = getcharid(1);
- if (('ins_baphomet == 5) && (getpartyleader(.@party_id,2) == getcharid(0))) {
+ .@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.";
diff --git a/npc/jobs/2-1/assassin.txt b/npc/jobs/2-1/assassin.txt
index 86ce74644..fcc1c4c98 100644
--- a/npc/jobs/2-1/assassin.txt
+++ b/npc/jobs/2-1/assassin.txt
@@ -1103,7 +1103,7 @@ OnStartArena:
warpwaitingpc "in_moc_16", 66, 151;
attachrid($@warpwaitingpc[0]);
if (ASSIN_Q2 < 5) {
- warpchar "in_moc_16",20,145,getcharid(0);
+ warpchar "in_moc_16",20,145,getcharid(CHAR_ID_CHAR);
end;
}
donpcevent "Beholder#ASNTEST::OnEnable";
diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt
index 379aabfb7..54db666e6 100644
--- a/npc/kafras/functions_kafras.txt
+++ b/npc/kafras/functions_kafras.txt
@@ -80,7 +80,7 @@ function script F_Kafra {
break;
case 2:
// Guild Castle Kafra message
- @GID = getcharid(2);
+ @GID = getcharid(CHAR_ID_GUILD);
mes "[Kafra Employee]";
mes "Welcome. ^ff0000" + getguildname(@GID) + "^000000 Member.";
mes "The Kafra Coporation will stay with you wherever you go.";
diff --git a/npc/other/CashShop_Functions.txt b/npc/other/CashShop_Functions.txt
index 3197b3838..629e91b8a 100644
--- a/npc/other/CashShop_Functions.txt
+++ b/npc/other/CashShop_Functions.txt
@@ -57,9 +57,9 @@ function script F_CashStore {
// - No arguments.
function script F_CashPartyCall {
warp "Random",0,0;
- if (getpartyleader(getcharid(1),2) == getcharid(0)) {
+ if (getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR)) {
getmapxy(.@mapl$, .@xl, .@yl, UNITTYPE_PC);
- warpparty .@mapl$, .@xl, .@yl, getcharid(1), .@mapl$;
+ warpparty .@mapl$, .@xl, .@yl, getcharid(CHAR_ID_PARTY), .@mapl$;
}
return;
}
@@ -285,7 +285,7 @@ function script F_Snowball {
case 2:
mes "Blessings.";
mes "Holy night~";
- unitskilluseid getcharid(3),"SM_ENDURE",10;
+ unitskilluseid getcharid(CHAR_ID_ACCOUNT),"SM_ENDURE",10;
close2;
cutin "",255;
break;
diff --git a/npc/other/arena/arena_party.txt b/npc/other/arena/arena_party.txt
index ad341e8a9..d7865d441 100644
--- a/npc/other/arena/arena_party.txt
+++ b/npc/other/arena/arena_party.txt
@@ -1025,7 +1025,7 @@ prt_are_in,77,135,3 script Staff#party-2 1_F_02,{
mes "[Staff]";
mes "^3131FF"+$arena_pttopn$+"^000000's running time was ^3131FF"+$top_ptmin+"^000000minutes ^3131FF"+$top_ptsec+"^000000seconds.";
next;
- .arn_party = getcharid(1);
+ .arn_party = getcharid(CHAR_ID_PARTY);
if (@gappt < 0) {
mes "[Staff]";
mes "Although you failed to make a new record, I hope you will succeed next time.";
@@ -1053,7 +1053,7 @@ prt_are_in,77,135,3 script Staff#party-2 1_F_02,{
mes "See you later~";
close2;
}
- if(getpartyleader(.arn_party,2) == getcharid(0)) {
+ if(getpartyleader(.arn_party,2) == getcharid(CHAR_ID_CHAR)) {
donpcevent "#arn_timer_pt::OnStop";
donpcevent "alloff#pt::OnEnable";
donpcevent "Ponox::OnStart";
@@ -1068,7 +1068,7 @@ prt_are_in,77,135,3 script Staff#party-2 1_F_02,{
mes "Wow! You have renewed the record!";
mes "What a great job!";
next;
- if(getpartyleader(.arn_party,2) == getcharid(0)) {
+ if(getpartyleader(.arn_party,2) == getcharid(CHAR_ID_CHAR)) {
mes "[Staff]";
mes "You can record you and your party members on ^FF0000the hall of Arena Time Force Battle party ^000000.";
mes "When you enter a name, the name will be remained on the top unless someone make a new record.";
@@ -1131,7 +1131,7 @@ prt_are_in,77,135,3 script Staff#party-2 1_F_02,{
mes "See you later~";
close2;
}
- if(getpartyleader(.arn_party,2) == getcharid(0)) {
+ if(getpartyleader(.arn_party,2) == getcharid(CHAR_ID_CHAR)) {
donpcevent "#arn_timer_pt::OnStop";
donpcevent "alloff#pt::OnEnable";
donpcevent "Ponox::OnStart";
diff --git a/npc/other/marriage.txt b/npc/other/marriage.txt
index ea43b347f..bbd659420 100644
--- a/npc/other/marriage.txt
+++ b/npc/other/marriage.txt
@@ -577,7 +577,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{
if (!getpartnerid()) {
if (!$@wedding) {
if (wedding_sign == 1) {
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
if (.@partymembercount == 2) {
if (Sex == SEX_MALE) {
@@ -648,7 +648,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{
}
else if ($@wedding == 1) {
if (wedding_sign == 1) {
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
if (.@partymembercount == 2) {
if (Sex == SEX_FEMALE) {
@@ -689,7 +689,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{
mes "Will you marry "+$@wed_groom$+"?";
next;
if (select("Yes, I do.", "^FF0000No.^000000") == 1) {
- if (isloggedin(getcharid(3,$@wed_groom$))) {
+ if (isloggedin(getcharid(CHAR_ID_ACCOUNT,$@wed_groom$))) {
if (marriage($@wed_groom$)) {
//Call Wedding effect
wedding;
@@ -697,12 +697,12 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{
sc_start SC_WEDDING,3600000,1;
getitem Bride_Ring,1;
//Give ring to Groom, and change to wedding sprite.
- attachrid(getcharid(3,$@wed_groom$));
+ attachrid(getcharid(CHAR_ID_ACCOUNT,$@wed_groom$));
sc_start SC_WEDDING,3600000,1;
getitem Bridegroom_Ring,1;
detachrid;
//Switch Script progression back to Bride
- attachrid(getcharid(3,$@wed_bride$));
+ attachrid(getcharid(CHAR_ID_ACCOUNT,$@wed_bride$));
cutin "wedding_bomars02",2;
mapannounce "prt_church","I now pronounce you, "+$@wed_groom$+" and "+$@wed_bride$+", husband and wife.",bc_map;
mes "[Vomars]";
diff --git a/npc/other/poring_war.txt b/npc/other/poring_war.txt
index 7d58569ef..b3e0eb15a 100644
--- a/npc/other/poring_war.txt
+++ b/npc/other/poring_war.txt
@@ -644,8 +644,8 @@ poring_w02,26,181,3 script Mr. Doppel#wop_team_a 8_DOPPEL,{
close;
}
.@a_tname$ = getpartyname($@wop_team_a);
- .@pname$ = getpartyname(getcharid(1));
- if ($@wop_team_a != 0 && $@wop_team_a == getcharid(1)) {
+ .@pname$ = getpartyname(getcharid(CHAR_ID_PARTY));
+ if ($@wop_team_a != 0 && $@wop_team_a == getcharid(CHAR_ID_PARTY)) {
mes "[Mr. Doppel]";
mes "So, everyone joined the party?";
mes "The name of the party is... " + .@pname$ + ", right?";
@@ -662,7 +662,7 @@ poring_w02,26,181,3 script Mr. Doppel#wop_team_a 8_DOPPEL,{
mes "If you don't get there in time, you won't make it to the battle.";
close;
case 2:
- if ((getpartyleader(getcharid(1),2) == getcharid(0))) {
+ if ((getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR))) {
mes "[Mr. Doppel]";
mes "So, you are the leader. Before going to the battlefield, you should check all your members.";
next;
@@ -694,7 +694,7 @@ poring_w02,26,181,3 script Mr. Doppel#wop_team_a 8_DOPPEL,{
}
}
else {
- if ((getpartyleader(getcharid(1),2) == getcharid(0))) {
+ if ((getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR))) {
if ($@wop_team_a == 0) {
mes "[Mr. Doppel]";
mes "So, you are the party leader of Angeling Team.";
@@ -719,7 +719,7 @@ poring_w02,26,181,3 script Mr. Doppel#wop_team_a 8_DOPPEL,{
mes "So, I'll register your party name as - " +.@pname$ + " -.";
mes "Now, Tell your ^4d4dffmembers to confirm your party^000000.";
mes "I'll send you to the battlefield as soon as I confirm your party.";
- $@wop_team_a = getcharid(1);
+ $@wop_team_a = getcharid(CHAR_ID_PARTY);
mapannounce "poring_w02","The registration of the Angeling Team has been confirmed. The party members must confirm their team with Mr. Doppel.",0,0x33FF66;
close;
case 3:
@@ -775,8 +775,8 @@ poring_w02,170,181,3 script Mr. Doppel#wop_team_d 8_DOPPEL,{
close;
}
.@d_tname$ = getpartyname($@wop_team_d);
- .@pname$ = getpartyname(getcharid(1));
- if ($@wop_team_d != 0 && $@wop_team_d == getcharid(1)) {
+ .@pname$ = getpartyname(getcharid(CHAR_ID_PARTY));
+ if ($@wop_team_d != 0 && $@wop_team_d == getcharid(CHAR_ID_PARTY)) {
mes "[Mr. Doppel]";
mes "So, everyone joined the party?";
mes "The name of the party is... " + .@pname$ + ", right?";
@@ -793,7 +793,7 @@ poring_w02,170,181,3 script Mr. Doppel#wop_team_d 8_DOPPEL,{
mes "If you don't get there in time, you won't make it to the battle.";
close;
case 2:
- if ((getpartyleader(getcharid(1),2) == getcharid(0))) {
+ if ((getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR))) {
mes "[Mr. Doppel]";
mes "So, you are the leader. Before going to the battlefield, you should check all your members.";
next;
@@ -823,7 +823,7 @@ poring_w02,170,181,3 script Mr. Doppel#wop_team_d 8_DOPPEL,{
}
}
} else {
- if ((getpartyleader(getcharid(1),2) == getcharid(0))) {
+ if ((getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR))) {
if ($@wop_team_d == 0) {
mes "[Mr. Doppel]";
mes "So, you are the party leader of Deviling Team.";
@@ -848,7 +848,7 @@ poring_w02,170,181,3 script Mr. Doppel#wop_team_d 8_DOPPEL,{
mes "So, I'll register your party name as - " + .@pname$ + " -.";
mes "Now, Tell your ^4d4dffmembers to confirm your party^000000.";
mes "I'll send you to the battlefield as soon as I confirm your party.";
- $@wop_team_d = getcharid(1);
+ $@wop_team_d = getcharid(CHAR_ID_PARTY);
mapannounce "poring_w02","The registration of the Deviling Team has been confirmed. The party members must confirm their team with Mr. Doppel.",0,0x33FF66;
close;
case 3:
@@ -1238,7 +1238,7 @@ poring_w02,99,201,3 script Deviruchi#wop_endmaster 4_DEVIRUCHI,{
}
.@a_point = $@wop_deadcount_a;
.@d_point = $@wop_deadcount_d;
- if (getcharid(1) == $@wop_team_a) {
+ if (getcharid(CHAR_ID_PARTY) == $@wop_team_a) {
if (.@a_point < .@d_point) {
mes "[Devi]";
mes "Good work!";
@@ -1319,7 +1319,7 @@ poring_w02,99,201,3 script Deviruchi#wop_endmaster 4_DEVIRUCHI,{
}
}
}
- else if (getcharid(1) == $@wop_team_d) {
+ else if (getcharid(CHAR_ID_PARTY) == $@wop_team_d) {
if (.@a_point > .@d_point) {
mes "[Devi]";
mes "Good work!";
diff --git a/npc/quests/guildrelay.txt b/npc/quests/guildrelay.txt
index 55717e9ce..7cb580130 100644
--- a/npc/quests/guildrelay.txt
+++ b/npc/quests/guildrelay.txt
@@ -85,7 +85,7 @@
mes "head on your way.^000000";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
if (strcharinfo(PC_NAME) == getguildmaster(.@GID)) {
if (guildrelay_q == 100) {
if (guildtime > 22) {
@@ -1197,7 +1197,7 @@
}
}
else {
- if (getcharid(2) == 0) {
+ if (getcharid(CHAR_ID_GUILD) == 0) {
mes "[" + .@name$ + "]";
mes "You haven't joined";
mes "a guild yet? Why don't";
@@ -1264,7 +1264,7 @@
mes "head on your way.^000000";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
if (strcharinfo(PC_NAME) == getguildmaster(.@GID)) {
if (countitem(Soul_Of_Guild) > 0) {
mes "[" + .@name$ + "]";
@@ -1768,7 +1768,7 @@
mes "there's no reason to be here.^000000";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
if (strcharinfo(PC_NAME) == getguildmaster(.@GID)) {
if (countitem(Soul_Of_Confidence) > 0) {
mes "[" + .@name$ + "]";
@@ -2452,7 +2452,7 @@
mes "there's no reason to be here.^000000";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
if (strcharinfo(PC_NAME) == getguildmaster(.@GID)) {
if (countitem(Soul_Of_Peace) > 0) {
mes "[" + .@name$ + "]";
@@ -2527,9 +2527,9 @@
close;
}
}
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
- .@partyleader = getpartyleader(getcharid(1),2);
+ .@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (guildrelay_q == 91) {
if (.@partymembercount == 6) {
mes "[" + .@name$ + "]";
diff --git a/npc/quests/partyrelay.txt b/npc/quests/partyrelay.txt
index 54d78bec6..f426106fc 100644
--- a/npc/quests/partyrelay.txt
+++ b/npc/quests/partyrelay.txt
@@ -34,9 +34,9 @@
//=========================================================================
payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
- .@partyleader = getpartyleader(getcharid(1),2);
+ .@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (checkweight(Resin,300) == 0) {
mes "^3355FFWait a minute! You're";
mes "carrying too many items";
@@ -54,7 +54,7 @@ payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
mes "of your group members with you.";
close;
}
- if ((countitem(Mission_Certificate12) > 0) && (.@partyleader == getcharid(0)) && (getcharid(2) > 0) && (.@partymembercount > 5)) {
+ if ((countitem(Mission_Certificate12) > 0) && (.@partyleader == getcharid(CHAR_ID_CHAR)) && (getcharid(CHAR_ID_GUILD) > 0) && (.@partymembercount > 5)) {
mes "[Ledrion]";
mes "Ah, you've brought the";
mes "last ticket from Rospii.";
@@ -129,7 +129,7 @@ payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
mes "over to Gatan right now?";
close;
}
- if ((countitem(Mission_Certificate8) > 0) && (.@partyleader == getcharid(0)) && (getcharid(2) > 0) && (.@partymembercount > 5)) {
+ if ((countitem(Mission_Certificate8) > 0) && (.@partyleader == getcharid(CHAR_ID_CHAR)) && (getcharid(CHAR_ID_GUILD) > 0) && (.@partymembercount > 5)) {
mes "[Ledrion]";
mes "Great, you've brought";
mes "me the eighth ticket from";
@@ -178,7 +178,7 @@ payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
mes "a ticket to Gatan?";
close;
}
- if ((countitem(Mission_Certificate4) > 0) && (.@partyleader == getcharid(0)) && (getcharid(2) > 0) && (.@partymembercount > 5)) {
+ if ((countitem(Mission_Certificate4) > 0) && (.@partyleader == getcharid(CHAR_ID_CHAR)) && (getcharid(CHAR_ID_GUILD) > 0) && (.@partymembercount > 5)) {
mes "[Ledrion]";
mes "I see that you've brought";
mes "me the fourth ticket from";
@@ -219,7 +219,7 @@ payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
mes "come to me, not yet.";
close;
}
- if ((BaseLevel > 39) && (.@partyleader == getcharid(0)) && (getcharid(2) > 0) && (.@partymembercount > 5) && (party_relay == 1)) {
+ if ((BaseLevel > 39) && (.@partyleader == getcharid(CHAR_ID_CHAR)) && (getcharid(CHAR_ID_GUILD) > 0) && (.@partymembercount > 5) && (party_relay == 1)) {
mes "[Ledrion]";
mes "As I mentioned earlier,";
mes "I'm challenging guild";
@@ -271,7 +271,7 @@ payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
mes "once the time is right.";
close;
}
- if ((.@partyleader == getcharid(0)) && (getcharid(2) > 0) && (.@partymembercount > 5) && (party_relay > 0)) {
+ if ((.@partyleader == getcharid(CHAR_ID_CHAR)) && (getcharid(CHAR_ID_GUILD) > 0) && (.@partymembercount > 5) && (party_relay > 0)) {
mes "[Ledrion]";
mes "As leader of your";
mes "Party, you should";
@@ -280,7 +280,7 @@ payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
mes "of your partners.";
close;
}
- if ((.@partyleader != getcharid(0)) && (getcharid(2) > 0)) {
+ if ((.@partyleader != getcharid(CHAR_ID_CHAR)) && (getcharid(CHAR_ID_GUILD) > 0)) {
mes "[Ledrion]";
mes "I'm sorry, but there's";
mes "nothing I can really offer";
@@ -363,7 +363,7 @@ payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
next;
switch(select("Sure!", "No.")) {
case 1:
- if ((BaseLevel > 39) && (.@partyleader == getcharid(0)) && (getcharid(2) > 0) && (.@partymembercount > 5)) {
+ if ((BaseLevel > 39) && (.@partyleader == getcharid(CHAR_ID_CHAR)) && (getcharid(CHAR_ID_GUILD) > 0) && (.@partymembercount > 5)) {
mes "[Ledrion]";
mes "Great! Let's see...";
mes "Well, you meet all the";
@@ -402,9 +402,9 @@ payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
}
payon,83,327,3 script Gatan#payon::RelayGatan 4_M_04,{
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
- .@partyleader = getpartyleader(getcharid(1),2);
+ .@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (checkweight(Resin,300) == 0) {
mes "^3355FFWait a minute! You're";
mes "carrying too many items";
@@ -1837,9 +1837,9 @@ payon,83,327,3 script Gatan#payon::RelayGatan 4_M_04,{
}
payon,204,221,3 script Bafhail#payon::RelayBafhail 4_M_JOB_BLACKSMITH,{
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
- .@partyleader = getpartyleader(getcharid(1),2);
+ .@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (checkweight(Resin,300) == 0) {
mes "^3355FFWait a minute! You're";
mes "carrying too many items";
@@ -2470,9 +2470,9 @@ payon,204,221,3 script Bafhail#payon::RelayBafhail 4_M_JOB_BLACKSMITH,{
}
payon,168,314,3 script Lospii#payon::RelayLospii 4_M_KID1,{
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
- .@partyleader = getpartyleader(getcharid(1),2);
+ .@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (checkweight(Resin,300) == 0) {
mes "^3355FFWait a minute! You're";
mes "carrying too many items";
diff --git a/npc/quests/quests_louyang.txt b/npc/quests/quests_louyang.txt
index e9e76b99c..d9c07c597 100644
--- a/npc/quests/quests_louyang.txt
+++ b/npc/quests/quests_louyang.txt
@@ -4634,9 +4634,9 @@ lou_in02,77,37,7 script Hermit 4_M_CHNOLD,{
mes strcharinfo(PC_NAME)+ "...!";
mes "Your name is now engraved on this bloody pledge board. We will fight together to the death for Louyang's future!";
next;
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
@partymember = $@partymembercount;
- if (getpartyleader(getcharid(1),1) == getcharid(0) || !@partymember) {
+ if (getpartyleader(getcharid(CHAR_ID_PARTY),1) == getcharid(CHAR_ID_CHAR) || !@partymember) {
mes "[Sun Mao]";
mes "Now, the most important thing for our cause is to gather more recruits and increase our numbers. Please find others who will join us in our fight.";
next;
@@ -4659,7 +4659,7 @@ lou_in02,77,37,7 script Hermit 4_M_CHNOLD,{
mes "If you're a real tourist, you do not want to get involved in our business, one way or another.";
close;
}
- } else if (getpartyleader(getcharid(1),2) == getcharid(0)) {
+ } else if (getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR)) {
if (QL_REVOL == 9) {
mes "[Sun Mao]";
mes "Once again,";
@@ -4668,7 +4668,7 @@ lou_in02,77,37,7 script Hermit 4_M_CHNOLD,{
mes "Go back safe.";
close;
}
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
@partymember = $@partymembercount;
if (QL_REVOL < 8) {
if (@partymember == QL_REVOL +1) {
@@ -4860,7 +4860,7 @@ lou_in02,77,37,7 script Hermit 4_M_CHNOLD,{
lou_in01,43,147,3 script Gunpowder Expert 4_M_ALCHE_C,{
if (ch_make == 0) {
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
@partymember = $@partymembercount;
if (!QL_REVOL) {
mes "[Hao Chenryu]";
diff --git a/npc/quests/quests_morocc.txt b/npc/quests/quests_morocc.txt
index c7acc986e..1b387be0c 100644
--- a/npc/quests/quests_morocc.txt
+++ b/npc/quests/quests_morocc.txt
@@ -938,12 +938,12 @@ moc_fild20,354,183,3 script Continental Guard#01::MocConGuard 4_M_MOC_SOLDIER,3,
close;
case 2:
if ($@re_moc < 3) {
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
while (.@partymembercount >= 0) {
.@name$ = .@partymembername$[.@partymembercount];
- if (isloggedin(getcharid(3,.@name$))) {
+ if (isloggedin(getcharid(CHAR_ID_ACCOUNT,.@name$))) {
++.@onlinemembers;
}
--.@partymembercount;
@@ -1001,12 +1001,12 @@ moc_fild20,354,183,3 script Continental Guard#01::MocConGuard 4_M_MOC_SOLDIER,3,
mes "[Continental Guard]";
mes "Ah, you're an adventurer working for the Continental Guard. Nice to meet you. Feel free to ask me if you need my assistance.";
next;
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
while (.@partymembercount >= 0) {
.@name$ = .@partymembername$[.@partymembercount];
- if (isloggedin(getcharid(3,.@name$))) {
+ if (isloggedin(getcharid(CHAR_ID_ACCOUNT,.@name$))) {
++.@onlinemembers;
}
--.@partymembercount;
diff --git a/npc/quests/quests_nameless.txt b/npc/quests/quests_nameless.txt
index f2e20c07f..1371c93bf 100644
--- a/npc/quests/quests_nameless.txt
+++ b/npc/quests/quests_nameless.txt
@@ -10174,7 +10174,7 @@ moc_fild18,108,116,0 script #treasure CLEAR_NPC,{
mes "protection to get the treasure.^000000";
next;
input .@input$;
- getpartymember(getcharid(1));
+ getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
if (.@partymembercount > 1) {
if (((.@input$ == "OpenSesame") && (treasure_nd == 9)) || ((.@input$ == "UnlockTreasure") && (treasure_nd == 10))) {
diff --git a/npc/quests/seals/god_weapon_creation.txt b/npc/quests/seals/god_weapon_creation.txt
index 87c231dd7..3f32461fa 100644
--- a/npc/quests/seals/god_weapon_creation.txt
+++ b/npc/quests/seals/god_weapon_creation.txt
@@ -89,7 +89,7 @@ gld_dun01,28,85,0 script Grunburti#1::GodDwarf 4_M_DWARF,{
mes "At least I was fortunate enough to find this cave. We Dwarves are most cozy living underground, after all.";
close;
case 3:
- .@GID = getcharid(2);
+ .@GID = getcharid(CHAR_ID_GUILD);
if (($God1 < $@god_check2) || ($God2 < $@god_check2) || ($God3 < $@god_check2) || ($God4 < $@god_check2)){
if (($God1 >= $@god_check1) && ($God2 >= $@god_check1) && ($God3 >= $@god_check1) && ($God4 >= $@god_check1) && (strcharinfo(PC_NAME) == getguildmaster(.@GID))) {
mes "[Dwarf Grunburti]";
@@ -412,7 +412,7 @@ que_god01,154,112,4 script Grunburti#god 4_M_DWARF,{
mes "pity for you~";
close;
}
- .@GID = getcharid(2);
+ .@GID = getcharid(CHAR_ID_GUILD);
if (strcharinfo(PC_NAME) != getguildmaster(.@GID)) {
mes "[Dwarf Grunburti]";
mes "How in the...";
diff --git a/npc/re/cities/malaya.txt b/npc/re/cities/malaya.txt
index afe816a3e..f18bbd0af 100644
--- a/npc/re/cities/malaya.txt
+++ b/npc/re/cities/malaya.txt
@@ -183,7 +183,7 @@ OnBingx2:
donpcevent strnpcinfo(NPC_NAME)+"::OnDisable";
end;
OnTouch:
- if (getcharid(1)) {
+ if (getcharid(CHAR_ID_PARTY)) {
if ($ma_name04$ == strcharinfo(PC_NAME) || $ma_name05$ == strcharinfo(PC_NAME) || $ma_name06$ == strcharinfo(PC_NAME)) {
donpcevent strnpcinfo(NPC_NAME)+"::OnBingx2";
mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
@@ -236,7 +236,7 @@ OnBingx2:
OnTouch:
.@i = atoi(strnpcinfo(NPC_NAME_HIDDEN));
if (.@i%4 == 2) {
- if (getcharid(0) == getpartyleader(getcharid(1),2))
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY),2))
.@pass = 1;
} else if (.@i%4 == 3) {
if (questprogress(4229,PLAYTIME) && questprogress(9223,PLAYTIME) && questprogress(12278,PLAYTIME))
diff --git a/npc/re/instances/BakonawaLake.txt b/npc/re/instances/BakonawaLake.txt
index 8214a3039..5e2ae7f33 100644
--- a/npc/re/instances/BakonawaLake.txt
+++ b/npc/re/instances/BakonawaLake.txt
@@ -56,7 +56,7 @@ ma_scene01,174,179,4 script Taho 4_M_DEWZATIMAN,{
close;
}
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@md_name$ = "Bakonawa Lake";
.@baku_time = questprogress(12278,PLAYTIME);
@@ -69,7 +69,7 @@ ma_scene01,174,179,4 script Taho 4_M_DEWZATIMAN,{
close;
}
if (!.@baku_time) {
- if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2)) {
mes "[Taho]";
mes "Are you the leader of the Bakonawa slayers? The road is not well so we have to go down the cliff with a rope, is that OK?";
next;
@@ -144,7 +144,7 @@ sec_in02,26,26,4 script Bakonawa's Rage 4_M_DEWZATIMAN,{
mes "[Taho]";
mes "Bakonawa becomes invincible at some point. When that time comes, listen to my guides carefully. Just trust me and all will be good.";
next;
- if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY),2)) {
mes "[Taho]";
mes "Now I will make Bakonawa spring out from the lake.";
next;
@@ -528,7 +528,7 @@ OnTimer10000:
mes "[Taho]";
mes "HMM. We almost got him but he is one fast creature...";
next;
- if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY),2)) {
mes "[Taho]";
mes "Are we going to try again?";
next;
diff --git a/npc/re/instances/BangungotHospital.txt b/npc/re/instances/BangungotHospital.txt
index d45fdfc23..1504f892f 100644
--- a/npc/re/instances/BangungotHospital.txt
+++ b/npc/re/instances/BangungotHospital.txt
@@ -39,7 +39,7 @@
ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
if (BaseLevel < 100) end;
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
cutin "malaya_nurseB",2;
if (!questprogress(9223)) {
.@quest = questprogress(9222);
@@ -60,7 +60,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
else if (malaya_bang == 31)
callsub L_Closed,0;
else if (malaya_bang > 39)
- callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,0,0;
+ callsub L_Enter,(getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2))?1:0,0,0;
else {
mes "[Nurse Maenne]";
mes "..........";
@@ -104,7 +104,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
} else {
//if (!.@party_id) goto L_NoParty; //unneeded
if (malaya_bang > 39)
- callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,1,1;
+ callsub L_Enter,(getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2))?1:0,1,1;
else {
mes "[Nurse Maenne]";
mes ".......";
@@ -136,7 +136,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
} else if (.@playtime == 2) {
//if (!.@party_id) goto L_NoParty; //unneeded
if (malaya_bang > 39)
- callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,1,1;
+ callsub L_Enter,(getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2))?1:0,1,1;
else {
mes "[Nurse Maenne]";
mes ".......";
@@ -215,7 +215,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{
} else {
if (!.@party_id) goto L_NoParty;
if (malaya_bang > 39)
- callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,1,1;
+ callsub L_Enter,(getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2))?1:0,1,1;
else {
mes "[Nurse Maenne]";
mes ".......";
@@ -275,7 +275,7 @@ L_Enter:
next;
switch(select(((getarg(0))?"Prepare to enter the second floor.":""), "Enter the second floor.", "Do not enter.")) {
case 1:
- .@instance = instance_create(.@md_name$,getcharid(1));
+ .@instance = instance_create(.@md_name$,getcharid(CHAR_ID_PARTY));
if (.@instance < 0) {
mes "[Nurse Maenne]";
mes "A critical situation has happened.";
@@ -312,7 +312,7 @@ L_Enter:
mes "The party leader did not generate the dungeon yet.";
close;
} else {
- mapannounce "ma_dun01", getpartyname(getcharid(1))+" party's "+strcharinfo(PC_NAME)+" member entered "+.@md_name$+".",bc_map,"0x00ff99";
+ mapannounce "ma_dun01", getpartyname(getcharid(CHAR_ID_PARTY))+" party's "+strcharinfo(PC_NAME)+" member entered "+.@md_name$+".",bc_map,"0x00ff99";
if (getarg(1)) {
if (questprogress(9223)) {
completequest 9223;
diff --git a/npc/re/instances/BuwayaCave.txt b/npc/re/instances/BuwayaCave.txt
index 878000d0f..242d0a8e4 100644
--- a/npc/re/instances/BuwayaCave.txt
+++ b/npc/re/instances/BuwayaCave.txt
@@ -44,7 +44,7 @@ ma_fild02,312,317,5 script Guard#buwaya_cave 4_MAL_SOLDIER,{
close;
}
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@md_name$ = "Buwaya Cave";
if (!.@party_id) {
@@ -54,7 +54,7 @@ ma_fild02,312,317,5 script Guard#buwaya_cave 4_MAL_SOLDIER,{
mes "team with other people.";
close;
}
- if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2)) {
mes "[Guard]";
mes "This place is dangerous. Please go back.";
mes "If you dont have any business here, please go back.";
@@ -159,7 +159,7 @@ OnTouch:
mes "The party leader did not generate the dungeon yet.";
close;
} else {
- mapannounce "ma_fild02",getpartyname(getcharid(1))+" party's "+strcharinfo(PC_NAME)+" member began hunting Buwaya in Buwaya Cave.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ mapannounce "ma_fild02",getpartyname(getcharid(CHAR_ID_PARTY))+" party's "+strcharinfo(PC_NAME)+" member began hunting Buwaya in Buwaya Cave.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
setquest 4229;
warp "1@ma_c",35,57;
end;
diff --git a/npc/re/instances/EclageInterior.txt b/npc/re/instances/EclageInterior.txt
index 9b232ac99..9ad8519b4 100644
--- a/npc/re/instances/EclageInterior.txt
+++ b/npc/re/instances/EclageInterior.txt
@@ -33,7 +33,7 @@
//=========================================================================
ecl_hub01,132,12,3 script Chief of Staff#tl01::EclInstance 4_F_FAIRY,{
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@md_name$ = "Eclage Interior";
if (!.@party_id){
mes "-! Warning !-";
@@ -42,7 +42,7 @@ ecl_hub01,132,12,3 script Chief of Staff#tl01::EclInstance 4_F_FAIRY,{
close;
}
- if (getpartyleader(.@party_id,2) != getcharid(0)) {
+ if (getpartyleader(.@party_id,2) != getcharid(CHAR_ID_CHAR)) {
mes "-! Warning !-";
mes "This current quest will be held at Memorial dungeon.";
mes "Only the party leader will enter. Please create your party.";
@@ -93,7 +93,7 @@ ecl_hub01,130,15,0 script It is closed shut. CLEAR_NPC,{
next;
switch (select("Enter it.", "Forget it.")) {
case 1:
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
if (has_instance("1@ecl") == "") {
mes "It is closed shut.";
@@ -101,7 +101,7 @@ ecl_hub01,130,15,0 script It is closed shut. CLEAR_NPC,{
}
if (.@party_id) {
.@md_name$ = "Eclage Interior";
- if (getpartyleader(.@party_id,2) != getcharid(0)){
+ if (getpartyleader(.@party_id,2) != getcharid(CHAR_ID_CHAR)){
mes "-! Warning !-";
mes "This current quest will be held at Memorial dungeon.";
mes "Only the party leader will enter. Please create your party.";
diff --git a/npc/re/instances/HazyForest.txt b/npc/re/instances/HazyForest.txt
index 7b12e1649..7f85fee50 100644
--- a/npc/re/instances/HazyForest.txt
+++ b/npc/re/instances/HazyForest.txt
@@ -38,7 +38,7 @@
//== Instance Creation =====================================
bif_fild01,158,340,5 script Laphine Soldier#mist 4_M_FAIRYSOLDIER,{
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@md_name$ = "Mistwood Maze";
mes "[Laphine Soldier]";
@@ -51,7 +51,7 @@ bif_fild01,158,340,5 script Laphine Soldier#mist 4_M_FAIRYSOLDIER,{
close;
}
.@playtime = questprogress(7211,PLAYTIME);
- if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2)) {
if (.@playtime == 1) {
mes "[Laphine Soldier]";
mes "...Are you sure you're not doing too much?";
@@ -177,7 +177,7 @@ bif_fild01,161,355,0 script Log Tunnel CLEAR_NPC,{
} else {
if (questprogress(7211,PLAYTIME) == 2) erasequest 7211;
if (!questprogress(7211,PLAYTIME)) setquest 7211;
- mapannounce "bif_fild01",getpartyname(getcharid(1))+" party's "+strcharinfo(PC_NAME)+" member is entering the Mistwood Maze.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ mapannounce "bif_fild01",getpartyname(getcharid(CHAR_ID_PARTY))+" party's "+strcharinfo(PC_NAME)+" member is entering the Mistwood Maze.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
warp "1@mist",89,29;
close;
}
diff --git a/npc/re/instances/MalangdoCulvert.txt b/npc/re/instances/MalangdoCulvert.txt
index e44fed03b..164caf548 100644
--- a/npc/re/instances/MalangdoCulvert.txt
+++ b/npc/re/instances/MalangdoCulvert.txt
@@ -399,7 +399,7 @@ mal_in01,160,34,4 script Missing, the Cleaner 4_CAT_SAILOR2,{
mes "You don't look like you have Seagod Protection. I can't open door at the moment!";
close;
}
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@md_name$ = "Culvert";
if (!.@party_id) {
mes "^0000ffYou have to organize a party of";
@@ -409,7 +409,7 @@ mal_in01,160,34,4 script Missing, the Cleaner 4_CAT_SAILOR2,{
}
.@playtime = questprogress(12254,PLAYTIME);
if (!.@playtime) {
- if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2)) {
mes "[Missing, the Cleaner]";
mes "Ummm? What's up? Tell me the password if you're the leader!";
next;
@@ -476,7 +476,7 @@ L_Enter:
//== Instance: Common Scripts ==============================
1@pump,63,100,4 script Missing, the Cleaner#0 4_CAT_SAILOR2,{
- if (getcharid(0) != getpartyleader(getcharid(1),2)) {
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY),2)) {
mes "[Missing, the Cleaner]";
mes "I am trying to have a conversation with your leader now. Please don't disturb and wait!";
close;
@@ -497,7 +497,7 @@ L_Enter:
mes "Huh? Not ready yet? Talk to me again when you're ready.";
close;
}
- 'party_id = getcharid(1);
+ 'party_id = getcharid(CHAR_ID_PARTY);
mapannounce instance_mapname("1@pump"),"Missing: Move toward the 3 o'clock direction and wait for my next order!",bc_map,"0xff88ff",FW_NORMAL,15;
disablenpc instance_npcname("Missing, the Cleaner#0");
enablenpc instance_npcname("Missing, the Cleaner#n");
@@ -519,7 +519,7 @@ L_Enter:
mes "Hmm? Talk to me again when you're ready.";
close;
}
- 'party_id = getcharid(1);
+ 'party_id = getcharid(CHAR_ID_PARTY);
mapannounce instance_mapname("1@pump"),"Missing: I'll go in first, so follow me! I'll open up a gate at the 3 o'clock direction!",bc_map,"0xff88ff",FW_NORMAL,15;
disablenpc instance_npcname("Missing, the Cleaner#0");
enablenpc instance_npcname("Culvert Entrance#i");
@@ -566,7 +566,7 @@ function script F_mal_missing {
mes "[Missing, the Cleaner]";
mes "I don't care if you get help from your friends or not. I want you to clean up all culverts! Don't forget! I will watch you and give you instructions. Just do what I said!!";
next;
- if (getcharid(0) != getpartyleader(getcharid(1),2)) {
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY),2)) {
mes "[Missing, the Cleaner]";
mes "Once your leader finishes preparing, it will begin, so get your hearts ready for it!!";
close;
@@ -594,7 +594,7 @@ function script F_mal_missing {
mes "[Missing, the Cleaner]";
mes "I see seaweed everywhere because you're wiggling! All the culverts will be blocked with seaweed!";
next;
- if (getcharid(0) != getpartyleader(getcharid(1),2)) {
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY),2)) {
mes "[Missing, the Cleaner]";
mes "Once your leader finishes preparing, settlement will be decided so get your hearts ready for it!!";
close;
diff --git a/npc/re/instances/OldGlastHeim.txt b/npc/re/instances/OldGlastHeim.txt
index 0b7bb7e6e..0b21767f7 100644
--- a/npc/re/instances/OldGlastHeim.txt
+++ b/npc/re/instances/OldGlastHeim.txt
@@ -93,7 +93,7 @@ glast_01,204,273,6 script Hugin#ghinstance 4_M_SAGE_C,{
mes("Umm? Did you see me at another place? I don't think so. What about this time?");
next;
if (!questprogress(12317, PLAYTIME)) {
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@p_name$ = getpartyname(.@party_id);
.@md_name$ = "Old Glast Heim";
if (!instance_check_party(.@party_id)) {
@@ -103,13 +103,13 @@ glast_01,204,273,6 script Hugin#ghinstance 4_M_SAGE_C,{
}
if (!questprogress(12318, HUNTING))
setquest 12318;
- if (getcharid(0) == getpartyleader(.@party_id, 2))
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id, 2))
.@menu1$ = "Generate Time Gap";
else
.@menu1$ = "";
switch (select(.@menu1$, "Enter Old Glast Heim", "Cancel")) {
case 1:
- if (getcharid(0) != getpartyleader(.@party_id, 2))
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(.@party_id, 2))
end;
.@instance = instance_create(.@md_name$, .@party_id);
if (.@instance < 0) {
@@ -165,7 +165,7 @@ glast_01,204,273,6 script Hugin#ghinstance 4_M_SAGE_C,{
// Floor 1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1@gl_k,149,41,6 script Varmundt#ghinstance1 4_M_BARMUND,{
- if (getcharid(0) != getpartyleader(getcharid(1), 2)) {
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2)) {
cutin("gl_barmund2", 2);
mes("[Varmundt]");
mes("Where's your leader? I need his help.");
@@ -181,7 +181,7 @@ glast_01,204,273,6 script Hugin#ghinstance 4_M_SAGE_C,{
select("Oh. Well I...");
mesf("[%s]", strcharinfo(PC_NAME));
mes("Ah yes, I am. Herico told me to meet you.");
- unittalk(getcharid(3), _("Ah yes, I am. Herico told me to meet you."));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Ah yes, I am. Herico told me to meet you."));
next;
cutin("gl_barmund2", 2);
mes("[Varmundt]");
@@ -191,7 +191,7 @@ glast_01,204,273,6 script Hugin#ghinstance 4_M_SAGE_C,{
select("Himelmez...");
mesf("[%s]", strcharinfo(PC_NAME));
mes("Who is Himelmez?");
- unittalk(getcharid(3), _("Who is Himelmez?"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Who is Himelmez?"));
next;
cutin("gl_barmund3", 2);
mes("[Varmundt]");
@@ -277,7 +277,7 @@ OnEnable:
1@gl_k,154,104,3 duplicate(Khalitzburg Knight#1) Khalitzburg Knight#22 4_F_KHALITZBURG
1@gl_k,149,100,6 script Heinrich#ghinstance1 4_M_HEINRICH,{
- if (getcharid(0) != getpartyleader(getcharid(1), 2)) {
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2)) {
cutin("gl_heinrich2", 2);
mes("[Heinrich]");
mes("Where is your leader? I must talk to him.");
@@ -289,7 +289,7 @@ OnEnable:
select("Sir. Heinrich. Varmundt...");
mesf("[%s]", strcharinfo(PC_NAME));
mes("Sir. Heinrich. Do you know what is happening in the castle now?");
- unittalk(getcharid(3), _("Sir. Heinrich. Do you know what is happening in the castle now?"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Sir. Heinrich. Do you know what is happening in the castle now?"));
next;
mes("[Heinrich]");
mes("Aren't you the adventurer that came along with Varmundt?");
@@ -302,7 +302,7 @@ OnEnable:
select("Himelmez's invasion...");
mesf("[%s]", strcharinfo(PC_NAME));
mes("Dead man's Valkyrie, Himelmez is coming to take the Ymir's Heart piece hidden inside this castle!");
- unittalk(getcharid(3), _("Dead man's Valkyrie, Himelmez is coming to take the Ymir's Heart piece hidden inside this castle!"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Dead man's Valkyrie, Himelmez is coming to take the Ymir's Heart piece hidden inside this castle!"));
next;
cutin("gl_heinrich1", 2);
mes("[Heinrich]");
@@ -321,7 +321,7 @@ OnEnable:
select("Even if you don't believe me...");
mesf("[%s]", strcharinfo(PC_NAME));
mes("I can't make you believe me, but there's no time to argue!");
- unittalk(getcharid(3), _("I can't make you believe me, but there's no time to argue!"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("I can't make you believe me, but there's no time to argue!"));
cutin("gl_barmund2", 255);
next;
cutin("gl_heinrich1", 2);
@@ -801,7 +801,7 @@ OnMyMobDead:
}
1@gl_k,17,51,3 script Altar boy Domun#clearGH 4_M_KID1,{
- if (getcharid(0) != getpartyleader(getcharid(1), 2)) {
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2)) {
mes("[Altar boy Domun]");
mes("Save me, save me, please...");
close;
@@ -814,7 +814,7 @@ OnMyMobDead:
mesf("[%s]", strcharinfo(PC_NAME));
mes("Hold on!\r"
"Are you the only survivor?");
- unittalk(getcharid(3), _("Hold on! Are you the only survivor?"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Hold on! Are you the only survivor?"));
next;
mes("[Altar boy Domun]");
mes("Chamberlains... monks...\r"
@@ -830,7 +830,7 @@ OnMyMobDead:
select("Pull it together!");
mesf("[%s]", strcharinfo(PC_NAME));
mes("Wake up kid! Go east and find the middle passage to the outside! That is safe!");
- unittalk(getcharid(3), _("Wake up kid! Go east and find the middle passage to the outside! That is safe!")); // Displays 1st Letter of char name in small?
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Wake up kid! Go east and find the middle passage to the outside! That is safe!")); // Displays 1st Letter of char name in small?
next;
mes("[Altar boy Domun]");
mes("To the east passage?\r"
@@ -841,7 +841,7 @@ OnMyMobDead:
select("I will give you a weapon.");
mesf("[%s]", strcharinfo(PC_NAME));
mes("Here's a weapon. Just close your eye and swing for those monsters.");
- unittalk(getcharid(3), _("Here's a weapon. Just close your eye and swing for those monsters."));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Here's a weapon. Just close your eye and swing for those monsters."));
next;
mes("[Altar boy Domun]");
mes("Ok, I... I'l try.");
@@ -898,7 +898,7 @@ OnMyMobDead:
}
1@gl_k,291,145,3 script Holgren the Destroyer 4_F_JOB_BLACKSMITH,{
- if (getcharid(0) != getpartyleader(getcharid(1), 2)) {
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2)) {
mes("[Holgren the Destroyer]");
mes("Are you human?");
close;
@@ -911,7 +911,7 @@ OnMyMobDead:
select("Relax! I'm not a monster!");
mesf("[%s]", strcharinfo(PC_NAME));
mes("Relax! I am Human. Are you alone? Anyone else here?");
- unittalk(getcharid(3), _("Relax! I am Human. Are you alone? Anyone else here?"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Relax! I am Human. Are you alone? Anyone else here?"));
next;
mes("[Holgren the Destroyer]");
mes("It's only me alive.");
@@ -920,7 +920,7 @@ OnMyMobDead:
select("It's dangerous here...");
mesf("[%s]", strcharinfo(PC_NAME));
mes("It's dangerous here. You know the way to the middle passage? Can you move?");
- unittalk(getcharid(3), _("It's dangerous here. You know the way to the middle passage? Can you move?")); // Displays 1st Letter of char name in small?
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("It's dangerous here. You know the way to the middle passage? Can you move?")); // Displays 1st Letter of char name in small?
next;
mes("[Holgren the Destroyer]");
mes("Yes, I can move. I need to get out of here.");
@@ -929,7 +929,7 @@ OnMyMobDead:
select("Be safe...");
mesf("[%s]", strcharinfo(PC_NAME));
mes("Sorry, I can't go with you.");
- unittalk(getcharid(3), _("Sorry, I can't go with you."));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Sorry, I can't go with you."));
next;
mes("[Holgren the Destroyer]");
mes("It's ok. You've already done enough. I can help myself. Good luck to you too.");
diff --git a/npc/re/instances/WolfchevLaboratory.txt b/npc/re/instances/WolfchevLaboratory.txt
index ce0ca4c31..e88ec4332 100644
--- a/npc/re/instances/WolfchevLaboratory.txt
+++ b/npc/re/instances/WolfchevLaboratory.txt
@@ -1768,7 +1768,7 @@ lhz_dun04,151,276,3 script Researcher#memo 4_LGTSCIENCE,{
mes "So, please prepare your party members, and take care of those boss creatures. I'm not sure how long this place can hold.";
close;
} else if (lght_duk01 > 6) {
- if (getcharid(1) > 0) {
+ if (getcharid(CHAR_ID_PARTY) > 0) {
mes "[Wolfchev]";
mes "Are you all set there? I will prepare the entrance if you are the leader of that party.";
next;
@@ -1859,8 +1859,8 @@ lhz_dun04,151,276,3 script Researcher#memo 4_LGTSCIENCE,{
}
}
}
- if (getpartyleader(getcharid(1),2) == getcharid(0)) {
- .@instance = instance_create("Worsef", getcharid(1));
+ if (getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR)) {
+ .@instance = instance_create("Worsef", getcharid(CHAR_ID_PARTY));
if (.@instance < 0) {
mes "[Wolfchev]";
mes "Hmm.. Lab entering system is a bit weird. Would wait for me to check the system?";
@@ -2035,7 +2035,7 @@ lhz_dun04,147,279,0 script Laboratory Entrance#memo CLEAR_NPC,{
1@lhz,39,168,0 script Manual Sheet#1_1 CLEAR_NPC,{
mes "There are valve manual sheets littered on the floor.";
next;
- if (getpartyleader(getcharid(1),2) == getcharid(0)) {
+ if (getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR)) {
mes "You the party leader, started to read the manual.";
next;
mes "[Emergency Access Valve Manual]";
@@ -2112,7 +2112,7 @@ lhz_dun04,147,279,0 script Laboratory Entrance#memo CLEAR_NPC,{
1@lhz,41,172,0 script Valve#1_2 CLEAR_NPC,{
.@open_portal = 0;
mes "This is the left valve for the emergency access.";
- if (getpartyleader(getcharid(1),2) == getcharid(0)) {
+ if (getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR)) {
next;
mes "To which direction do you wish to turn?";
next;
@@ -2174,7 +2174,7 @@ lhz_dun04,147,279,0 script Laboratory Entrance#memo CLEAR_NPC,{
1@lhz,52,172,0 script Valve#1_3 CLEAR_NPC,{
.@open_portal = 0;
mes "This is the left valve for the emergency access.";
- if (getpartyleader(getcharid(1),2) == getcharid(0)) {
+ if (getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR)) {
next;
mes "To which direction do you wish to turn?";
next;
@@ -2562,7 +2562,7 @@ lhz_dun04,147,279,0 script Laboratory Entrance#memo CLEAR_NPC,{
//== The Lab No.2 Valves ===================================
- script bio4FLab2Valve FAKE_NPC,{
- if (getpartyleader(getcharid(1),2) == getcharid(0)) {
+ if (getpartyleader(getcharid(CHAR_ID_PARTY),2) == getcharid(CHAR_ID_CHAR)) {
progressbar "0xffff00", 20;
stopnpctimer;
donpcevent instance_npcname("Lab2#2_2")+"::OnDisableValve1";
diff --git a/npc/re/instances/ghost_palace.txt b/npc/re/instances/ghost_palace.txt
index 8b0bbb866..08fe3b71b 100644
--- a/npc/re/instances/ghost_palace.txt
+++ b/npc/re/instances/ghost_palace.txt
@@ -59,13 +59,13 @@ dali02,44,129,5 script Unpleasent Royal Guard 4_M_SAKRAYROYAL,{
"I will be right behind you!");
close();
}
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
if (!.@party_id) {
mes("[Unpleasent Royal Guard]");
mes("This is a solo instance. Please form a solo party before continuing.");
close();
}
- if (getcharid(0) != getpartyleader(.@party_id,2)) {
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(.@party_id,2)) {
mes("[Unpleasent Royal Guard]");
mes("I'm looking for adventurers to help me!\r"
"I want to talk to the team leader, can I?");
@@ -134,7 +134,7 @@ dali02,41,134,0 script Interdimensional Device::gpportal PORTAL,{
mes("The monsters that attacked the palace are wandering around the secret entrance. It would be very bad if they spotted us... Please wait until the time limit for re-entrance passed.");
close();
}
- if (getcharid(0) == getpartyleader(.@party_id,2) && !questprogress(1260)) {
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2) && !questprogress(1260)) {
mes("[Unpleasent Royal Guard]");
mes("I'm looking for adventurers to help me!\r"
"I want to talk to the team leader, can I?");
@@ -155,7 +155,7 @@ dali02,41,134,0 script Interdimensional Device::gpportal PORTAL,{
mes("^FF0000Inside the device you see a dark hole. If you wish to enter you may wish to talk to the Unpleasant Royal Guard first.^000000");
close();
}
- mapannounce("dali", sprintf(_$("%s of the party, %s, is entering the Ghost Palace."), strcharinfo(PC_NAME), getpartyname(getcharid(1))), bc_map, C_SPRINGGREEN);
+ mapannounce("dali", sprintf(_$("%s of the party, %s, is entering the Ghost Palace."), strcharinfo(PC_NAME), getpartyname(getcharid(CHAR_ID_PARTY))), bc_map, C_SPRINGGREEN);
if (!questprogress(1260)) setquest 1260;
setquest 1261;
warp("1@spa", 198, 188);
@@ -550,7 +550,7 @@ OnInstanceInit:
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("Sakray, What do you want sympathy? Or is it a trap?");
- unittalk(getcharid(3), _("Sakray, What do you want sympathy? Or is it a trap?"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Sakray, What do you want sympathy? Or is it a trap?"));
next;
mes("[Sakray]");
mes("Non...I did not need to make an effort to catch a novice.");
@@ -558,7 +558,7 @@ OnInstanceInit:
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("If so... then why...?");
- unittalk(getcharid(3), _("If so... then why...?"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("If so... then why...?"));
next;
cutin("cry-b", 3);
mes("[Sakray]");
@@ -580,7 +580,7 @@ OnInstanceInit:
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("...");
- unittalk(getcharid(3), _("..."));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("..."));
next;
mes("[Sakray]");
mes("Heh heh... I will keep watching you until the day you grow up enough.");
diff --git a/npc/re/instances/octopus_cave.txt b/npc/re/instances/octopus_cave.txt
index 71f164ff7..b09d243ab 100644
--- a/npc/re/instances/octopus_cave.txt
+++ b/npc/re/instances/octopus_cave.txt
@@ -38,7 +38,7 @@
//== Instance Creation =====================================
mal_dun01,151,235,5 script Starfish 4_ASTER,{
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@md_name$ = "Octopus Cave";
if (!.@party_id) {
@@ -46,7 +46,7 @@ mal_dun01,151,235,5 script Starfish 4_ASTER,{
mes("You alone is powerless, hehe! Better get someone to help you out. Make a party, and come back later.");
close;
}
- if (getcharid(0) != getpartyleader(.@party_id, 2)) {
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(.@party_id, 2)) {
mes("[Starfish]");
mes("Where is your leader, hehe. I don't talk to some random people. Bring your boss to me.");
close;
@@ -136,7 +136,7 @@ mal_dun01,153,237,5 script Weird Entrance CLEAR_NPC,{
close;
}
- mapannounce("mal_dun01", sprintf(_$("%s party's %s member started to hunt the Octopus!"), getpartyname(getcharid(1)), strcharinfo(PC_NAME)), bc_map, C_SPRINGGREEN);
+ mapannounce("mal_dun01", sprintf(_$("%s party's %s member started to hunt the Octopus!"), getpartyname(getcharid(CHAR_ID_PARTY)), strcharinfo(PC_NAME)), bc_map, C_SPRINGGREEN);
if (!questprogress(4197)) setquest 4197;
warp "1@cash", 199, 99;
end;
diff --git a/npc/re/instances/saras_memory.txt b/npc/re/instances/saras_memory.txt
index 0c7f4a9cb..2b3b4f2c0 100644
--- a/npc/re/instances/saras_memory.txt
+++ b/npc/re/instances/saras_memory.txt
@@ -168,7 +168,7 @@ dali,138,118,0 script Dimensional Device#dimen PORTAL,{
erasequest 15002;
end;
} else if (!.@sara_time) {
- .@party_id = getcharid(1);
+ .@party_id = getcharid(CHAR_ID_PARTY);
.@p_name$ = getpartyname(.@party_id);
.@md_name$ = "Sara's Memory";
if (!instance_check_party(.@party_id)) {
@@ -177,13 +177,13 @@ dali,138,118,0 script Dimensional Device#dimen PORTAL,{
"can use quotes to put spaces in a party name.");
close;
}
- if (getcharid(0) == getpartyleader(.@party_id, 2))
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id, 2))
.@menu1$ = "Boot up the dimensional device";
else
.@menu1$ = "";
switch (select(.@menu1$, "Use the dimensional device", "Cancel")) {
case 1:
- if (getcharid(0) != getpartyleader(.@party_id, 2))
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(.@party_id, 2))
end;
.@instance = instance_create(.@md_name$, .@party_id);
if (.@instance < 0) {
@@ -219,11 +219,11 @@ dali,138,118,0 script Dimensional Device#dimen PORTAL,{
}
1@sara,261,156,5 script A girl#sarains 4_F_SARAH_BABY,{
- if (getcharid(0) != getpartyleader(getcharid(1), 2))
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2))
end;
mesf("[%s]", strcharinfo(PC_NAME));
mes("Where am I?");
- unittalk(getcharid(3), _("Where am I?"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Where am I?"));
next;
cutin "sara_9sara1.bmp", 2;
mes("[A girl]");
@@ -232,7 +232,7 @@ dali,138,118,0 script Dimensional Device#dimen PORTAL,{
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("Are you from here? You don't seem to quite match the locals either.");
- unittalk(getcharid(3), _("Are you from here? You don't seem to quite match to locals either."));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Are you from here? You don't seem to quite match to locals either."));
next;
mes("[A girl]");
mes("Yes! I was born here! My name is Sara. Sara Irene!");
@@ -244,7 +244,7 @@ dali,138,118,0 script Dimensional Device#dimen PORTAL,{
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("Oh! I am sorry! Uh... Why are you standing out here all alone?");
- unittalk(getcharid(3), _("Oh! I am sorry! Uh... Why are you standing out here all alone?"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Oh! I am sorry! Uh... Why are you standing out here all alone?"));
next;
mes("[Sara Irene]");
mes("I am waiting for my father. He said that he will be here soon.");
@@ -523,7 +523,7 @@ OnEnable:
OnTouch:
.@map$ = instance_mapname("1@sara");
warp .@map$, 89, 175;
- if (getcharid(0) == getpartyleader(getcharid(1),2))
+ if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY),2))
viewpoint 1, 39, 142, 1, C_GREEN;
end;
}
@@ -546,7 +546,7 @@ OnTouch:
}
1@sara,107,325,5 script Sara Irene#sarains1 4_F_SARAH_BABY,{
- if (getcharid(0) != getpartyleader(getcharid(1), 2))
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2))
end;
cutin "sara_9sara1.bmp", 2;
mes("[Sara Irene]");
@@ -1007,7 +1007,7 @@ OnMyMobDead:
}
1@sara,152,233,5 script Sara Irene#sarains2 4_F_SARAH_BABY,{
- if (getcharid(0) != getpartyleader(getcharid(1), 2))
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2))
end;
cutin "sara_9sara2.bmp", 2;
mes("[Sara Irene]");
@@ -1031,7 +1031,7 @@ OnMyMobDead:
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("I won't let you take Sara!");
- unittalk(getcharid(3), _("I won't let you take Sara!"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("I won't let you take Sara!"));
next;
cutin "sara_elder_irine3.bmp", 2;
mes("[Doyen Irene]");
@@ -1040,7 +1040,7 @@ OnMyMobDead:
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("Sara... run! Save yourself!");
- unittalk(getcharid(3), _("Sara... run! Save yourself!"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Sara... run! Save yourself!"));
next;
cutin "sara_9sara2.bmp", 2;
mes("[Sara Irene]");
@@ -1151,7 +1151,7 @@ OnMyMobDead:
}
1@sara,156,236,3 script Doyen Irene#sarains3 4_M_CHIEF_IRIN,{
- if (getcharid(0) != getpartyleader(getcharid(1), 2))
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2))
end;
cutin "sara_elder_irine4.bmp", 2;
mes("[Doyen Irene]");
@@ -1164,7 +1164,7 @@ OnMyMobDead:
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("What are you talking about? We saw you standing over Sara's mother with your sword COVERED in blood!");
- unittalk(getcharid(3), _("What are you talking about? We saw you standing over Sara's mother with your sword COVERED in blood!"));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("What are you talking about? We saw you standing over Sara's mother with your sword COVERED in blood!"));
next;
mes("[Doyen Irene]");
mes("You.. think I killed Sara's mother?");
@@ -1188,7 +1188,7 @@ OnMyMobDead:
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("I am just an adventurer who was passing through. I heard some men plotting their deaths and needed to intervene.");
- unittalk(getcharid(3), _("I am just an adventurer who was passing through. I heard some men plotting their deaths and needed to intervene."));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("I am just an adventurer who was passing through. I heard some men plotting their deaths and needed to intervene."));
next;
mes("[Doyen Irene]");
mes("If.. you are telling the truth...\r"
@@ -1201,11 +1201,11 @@ OnMyMobDead:
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("There might be more assassins so we have to find Sara as fast as we can.");
- unittalk(getcharid(3), _("There might be more assassins so we have to find Sara as fast as we can."));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("There might be more assassins so we have to find Sara as fast as we can."));
next;
mesf("[%s]", strcharinfo(PC_NAME));
mes("Sara believes that you killed her mother. We need to tell her the truth.");
- unittalk(getcharid(3), _("Sara believes that you killed her mother. We need to tell her the truth."));
+ unittalk(getcharid(CHAR_ID_ACCOUNT), _("Sara believes that you killed her mother. We need to tell her the truth."));
next;
mes("[Doyen Irene]");
mes("We must do our best to find her. Let's split up and search for her.\r"
@@ -1233,7 +1233,7 @@ OnDisable:
}
1@sara,39,142,3 script Sara Irene#sarains3 4_F_SARAH_BABY,{
- if (getcharid(0) != getpartyleader(getcharid(1), 2))
+ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2))
end;
mes("^FF0000As you are about to call out to Sara a sudden blow knocks you down from behind.^000000");
dispbottom(_("As you are about to call out to Sara a sudden blow knocks you down from behind."));
diff --git a/npc/re/woe-fe/invest_main.txt b/npc/re/woe-fe/invest_main.txt
index 012a96afe..c912444cc 100644
--- a/npc/re/woe-fe/invest_main.txt
+++ b/npc/re/woe-fe/invest_main.txt
@@ -902,7 +902,7 @@ OnAgitInvest:
mes "Please come back during the investment duration.";
close;
}
- .@guild = getcharid(2);
+ .@guild = getcharid(CHAR_ID_GUILD);
for(.@i = 1; .@i<=5; ++.@i) {
.@castle_name$[.@i] = getcastlename(.@npc$+"g_cas0"+.@i);
.@owner_id[.@i] = getcastledata(.@npc$+"g_cas0"+.@i,1);
@@ -1114,7 +1114,7 @@ OnAgitInvest:
}
.@GID = getcastledata(strnpcinfo(NPC_MAP),1);
- if (getcharid(2) != .@GID) {
+ if (getcharid(CHAR_ID_GUILD) != .@GID) {
mes "[Gate Manager]";
mes "You don't seem to be the member of guild owning this castle.";
mes "If you need any help, please visit any of our guild members at "+.@realm$+" Square.";
@@ -1145,7 +1145,7 @@ OnAgitInvest:
mes "Please come back during the investment duration.";
close;
}
- if (getcharid(2) != .@GID) {
+ if (getcharid(CHAR_ID_GUILD) != .@GID) {
mes "[Gate Manager]";
mes "You don't seem to be the member of the guild owning this castle.";
mes "Please use the normal investment from "+.@realm$+" Square.";
diff --git a/npc/woe-fe/agit_main.txt b/npc/woe-fe/agit_main.txt
index 912063b8b..5ac5b8e9a 100644
--- a/npc/woe-fe/agit_main.txt
+++ b/npc/woe-fe/agit_main.txt
@@ -101,10 +101,10 @@ OnStartArena:
// The Emperium has been broken.
OnAgitBreak:
- .@GID = getcharid(2);
+ .@GID = getcharid(CHAR_ID_GUILD);
// Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen)
if (.@GID <= 0) {
- .@notice$ = "Character "+strcharinfo(PC_NAME)+" ("+getcharid(0)+") broke the Emperium in Castle: "+strnpcinfo(NPC_NAME_HIDDEN)+" while guildless. No data will be saved and Emperium respawned.";
+ .@notice$ = "Character "+strcharinfo(PC_NAME)+" ("+getcharid(CHAR_ID_CHAR)+") broke the Emperium in Castle: "+strnpcinfo(NPC_NAME_HIDDEN)+" while guildless. No data will be saved and Emperium respawned.";
logmes .@notice$; debugmes .@notice$;
donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena";
end;
@@ -342,7 +342,7 @@ OnRecvCastle:
}
cutin "kafra_01",2;
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[Kafra Employee]";
mes "Welcome. ^ff0000" + getguildname(.@GID) + "^000000 Member.";
mes "The Kafra Corporation will stay with you wherever you go.";
@@ -969,7 +969,7 @@ OnRecvCastle:
mes "There's a small lever. Will you pull it?";
next;
if(select("Pull.", "Don't pull.") == 1) {
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
close2;
warp .@destination$,.@coordinates[0],.@coordinates[1];
end;
diff --git a/npc/woe-fe/aldeg_cas01.txt b/npc/woe-fe/aldeg_cas01.txt
index 4472a0f46..5c76ca483 100644
--- a/npc/woe-fe/aldeg_cas01.txt
+++ b/npc/woe-fe/aldeg_cas01.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("aldeg_cas01",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("aldeg_cas01",1)) {
warp "aldeg_cas01",218,170;
end;
}
diff --git a/npc/woe-fe/aldeg_cas02.txt b/npc/woe-fe/aldeg_cas02.txt
index 9a9182d96..e588909a1 100644
--- a/npc/woe-fe/aldeg_cas02.txt
+++ b/npc/woe-fe/aldeg_cas02.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("aldeg_cas02",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("aldeg_cas02",1)) {
warp "aldeg_cas02",220,190;
end;
}
diff --git a/npc/woe-fe/aldeg_cas03.txt b/npc/woe-fe/aldeg_cas03.txt
index b4b1df558..a0076bfec 100644
--- a/npc/woe-fe/aldeg_cas03.txt
+++ b/npc/woe-fe/aldeg_cas03.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("aldeg_cas03",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("aldeg_cas03",1)) {
warp "aldeg_cas03",205,186;
end;
}
diff --git a/npc/woe-fe/aldeg_cas04.txt b/npc/woe-fe/aldeg_cas04.txt
index c0289ec45..f96586f48 100644
--- a/npc/woe-fe/aldeg_cas04.txt
+++ b/npc/woe-fe/aldeg_cas04.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("aldeg_cas04",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("aldeg_cas04",1)) {
warp "aldeg_cas04",116,217;
end;
}
diff --git a/npc/woe-fe/aldeg_cas05.txt b/npc/woe-fe/aldeg_cas05.txt
index 7a1747adb..79c5c77af 100644
--- a/npc/woe-fe/aldeg_cas05.txt
+++ b/npc/woe-fe/aldeg_cas05.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("aldeg_cas05",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("aldeg_cas05",1)) {
warp "aldeg_cas05",167,225;
end;
}
diff --git a/npc/woe-fe/gefg_cas01.txt b/npc/woe-fe/gefg_cas01.txt
index 65ae7f1e4..364222781 100644
--- a/npc/woe-fe/gefg_cas01.txt
+++ b/npc/woe-fe/gefg_cas01.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("gefg_cas01",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("gefg_cas01",1)) {
warp "gefg_cas01",197,36;
end;
}
diff --git a/npc/woe-fe/gefg_cas02.txt b/npc/woe-fe/gefg_cas02.txt
index 5229586df..5729b4033 100644
--- a/npc/woe-fe/gefg_cas02.txt
+++ b/npc/woe-fe/gefg_cas02.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("gefg_cas02",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("gefg_cas02",1)) {
warp "gefg_cas02",178,43;
end;
}
diff --git a/npc/woe-fe/gefg_cas03.txt b/npc/woe-fe/gefg_cas03.txt
index f52cce240..d74692200 100644
--- a/npc/woe-fe/gefg_cas03.txt
+++ b/npc/woe-fe/gefg_cas03.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("gefg_cas03",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("gefg_cas03",1)) {
warp "gefg_cas03",221,30;
end;
}
diff --git a/npc/woe-fe/gefg_cas04.txt b/npc/woe-fe/gefg_cas04.txt
index b15f87984..39141723f 100644
--- a/npc/woe-fe/gefg_cas04.txt
+++ b/npc/woe-fe/gefg_cas04.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("gefg_cas04",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("gefg_cas04",1)) {
warp "gefg_cas04",168,43;
end;
}
diff --git a/npc/woe-fe/gefg_cas05.txt b/npc/woe-fe/gefg_cas05.txt
index a7722d48b..caa9a10fc 100644
--- a/npc/woe-fe/gefg_cas05.txt
+++ b/npc/woe-fe/gefg_cas05.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("gefg_cas05",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("gefg_cas05",1)) {
warp "gefg_cas05",168,31;
end;
}
diff --git a/npc/woe-fe/payg_cas01.txt b/npc/woe-fe/payg_cas01.txt
index 0c5f54be1..d06883620 100644
--- a/npc/woe-fe/payg_cas01.txt
+++ b/npc/woe-fe/payg_cas01.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("payg_cas01",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("payg_cas01",1)) {
warp "payg_cas01",54,144;
end;
}
diff --git a/npc/woe-fe/payg_cas02.txt b/npc/woe-fe/payg_cas02.txt
index 9666a147f..9b5b97811 100644
--- a/npc/woe-fe/payg_cas02.txt
+++ b/npc/woe-fe/payg_cas02.txt
@@ -53,14 +53,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("payg_cas02",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("payg_cas02",1)) {
warp "payg_cas02",278,251;
end;
}
diff --git a/npc/woe-fe/payg_cas03.txt b/npc/woe-fe/payg_cas03.txt
index 879866a62..10b859c8f 100644
--- a/npc/woe-fe/payg_cas03.txt
+++ b/npc/woe-fe/payg_cas03.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("payg_cas03",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("payg_cas03",1)) {
warp "payg_cas03",9,263;
end;
}
diff --git a/npc/woe-fe/payg_cas04.txt b/npc/woe-fe/payg_cas04.txt
index a6732b5b8..46f4fbb6b 100644
--- a/npc/woe-fe/payg_cas04.txt
+++ b/npc/woe-fe/payg_cas04.txt
@@ -53,14 +53,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("payg_cas04",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("payg_cas04",1)) {
warp "payg_cas04",40,235;
end;
}
diff --git a/npc/woe-fe/payg_cas05.txt b/npc/woe-fe/payg_cas05.txt
index 7e5ce5aae..a2a35790a 100644
--- a/npc/woe-fe/payg_cas05.txt
+++ b/npc/woe-fe/payg_cas05.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("payg_cas05",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("payg_cas05",1)) {
warp "payg_cas05",243,27;
end;
}
diff --git a/npc/woe-fe/prtg_cas01.txt b/npc/woe-fe/prtg_cas01.txt
index 660dd11ef..33a564fe9 100644
--- a/npc/woe-fe/prtg_cas01.txt
+++ b/npc/woe-fe/prtg_cas01.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("prtg_cas01",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("prtg_cas01",1)) {
warp "prtg_cas01",96,173;
end;
}
diff --git a/npc/woe-fe/prtg_cas02.txt b/npc/woe-fe/prtg_cas02.txt
index 3333de0c2..6531b681f 100644
--- a/npc/woe-fe/prtg_cas02.txt
+++ b/npc/woe-fe/prtg_cas02.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("prtg_cas02",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("prtg_cas02",1)) {
warp "prtg_cas02",169,55;
end;
}
diff --git a/npc/woe-fe/prtg_cas03.txt b/npc/woe-fe/prtg_cas03.txt
index 9040cb697..2a3879f65 100644
--- a/npc/woe-fe/prtg_cas03.txt
+++ b/npc/woe-fe/prtg_cas03.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("prtg_cas03",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("prtg_cas03",1)) {
warp "prtg_cas03",181,215;
end;
}
diff --git a/npc/woe-fe/prtg_cas04.txt b/npc/woe-fe/prtg_cas04.txt
index 48c0f7026..3e0de365f 100644
--- a/npc/woe-fe/prtg_cas04.txt
+++ b/npc/woe-fe/prtg_cas04.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("prtg_cas04",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("prtg_cas04",1)) {
warp "prtg_cas04",258,247;
end;
}
diff --git a/npc/woe-fe/prtg_cas05.txt b/npc/woe-fe/prtg_cas05.txt
index 8ad8c6f77..56dc902a3 100644
--- a/npc/woe-fe/prtg_cas05.txt
+++ b/npc/woe-fe/prtg_cas05.txt
@@ -52,14 +52,14 @@
mes "ownership of this castle.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "[ Echoing Voice ]";
mes "Brave ones...";
mes "Do you wish to return to your honorable place?";
next;
if(select("Return to the guild castle.", "Quit.") == 1) {
close2;
- if (getcharid(2) == getcastledata("prtg_cas05",1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata("prtg_cas05",1)) {
warp "prtg_cas05",52,41;
end;
}
diff --git a/npc/woe-se/agit_main_se.txt b/npc/woe-se/agit_main_se.txt
index 9e01c6efd..c9b34f610 100644
--- a/npc/woe-se/agit_main_se.txt
+++ b/npc/woe-se/agit_main_se.txt
@@ -230,7 +230,7 @@ OnTreasureDied:
mes "to conquer this stronghold?";
close;
}
- if (getcharid(2) != .@GID || strcharinfo(PC_NAME) != getguildmaster(.@GID)) {
+ if (getcharid(CHAR_ID_GUILD) != .@GID || strcharinfo(PC_NAME) != getguildmaster(.@GID)) {
mes "[ Steward ]";
mes "Hmpf. Your threats don't";
mes "scare me! Guardians, drive";
@@ -619,7 +619,7 @@ OnStop:
end;
OnStartArena:
- .@GID = getcharid(2);
+ .@GID = getcharid(CHAR_ID_GUILD);
.@region$ = (compare(strnpcinfo(NPC_MAP),"arug"))?"Valfreyja":"Nithafjoll";
// Lower castle Economy
.@Economy = getcastledata(strnpcinfo(NPC_MAP),2)-5;
@@ -663,7 +663,7 @@ OnStartArena:
mes "over this stronghold.";
close;
}
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
if (strcharinfo(PC_NAME) != getguildmaster(.@GID)) {
mes .@n$;
mes "As guardian of this";
@@ -854,7 +854,7 @@ OnInit:
- script Kafra#template FAKE_NPC,{
cutin "kafra_01",2;
.@GID = getcastledata(strnpcinfo(NPC_MAP),1);
- if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID && getgdskilllv(.@GID,10001)) {
mes "[Kafra Employee]";
mes "Welcome, proud member";
mes "of the ^FF0000"+getguildname(.@GID)+"^000000 Guild!";
@@ -967,7 +967,7 @@ OnInit:
.@GID = getcastledata(strnpcinfo(NPC_MAP),1);
.@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),0));
.@var$ = "$agit_"+strnpcinfo(NPC_NAME_HIDDEN);
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
mes "^3355FFYou will need the";
mes "following materials to";
mes "rebuild a destroyed";
@@ -1120,7 +1120,7 @@ OnEnable:
.@GID = getcastledata(strnpcinfo(NPC_MAP),1);
.@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),15));
.@var$ = "$agit_"+strnpcinfo(NPC_NAME_HIDDEN);
- if (getcharid(2) == .@GID) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID) {
if (strcharinfo(PC_NAME) == getguildmaster(.@GID)) {
if (getd(.@var$+"["+(.@num+1)+"]") == 2) {
mes "^3355FFDemolished Fortress";
@@ -1707,7 +1707,7 @@ OnDisable:
//== Link Flags (function) =================================
function script LinkFlag {
- if (!getcharid(2) || getcharid(2) != getcastledata(strnpcinfo(NPC_MAP),1)) end;
+ if (!getcharid(CHAR_ID_GUILD) || getcharid(CHAR_ID_GUILD) != getcastledata(strnpcinfo(NPC_MAP),1)) end;
if (getarg(0) == "Convenience Facility") {
mes "^3355FFThis is the Stronghold";
mes "Teleport Service. Would";
@@ -1754,13 +1754,13 @@ function script ReturnFlag {
mes "be recognized as its new owner.";
close;
}
- if (getcharid(2) == .@GID && getarg(1,0)) {
+ if (getcharid(CHAR_ID_GUILD) == .@GID && getarg(1,0)) {
mes "[ Ringing Voice ]";
mes "Courageous one,";
mes "do you wish to return";
mes "to your stronghold?";
next;
- if(select("Return to the Stronghold", "Cancel") == 1 && getcharid(2) == getcastledata(getarg(0),1)) {
+ if(select("Return to the Stronghold", "Cancel") == 1 && getcharid(CHAR_ID_GUILD) == getcastledata(getarg(0),1)) {
if (compare(getarg(0),"arug")) {
if (getarg(0) == "arug_cas01") setarray .@i[0],67,193;
else if (getarg(0) == "arug_cas02") setarray .@i[0],43,256;
@@ -1814,7 +1814,7 @@ function script ReturnFlag {
//== Guild Dungeon Warps ===================================
- script Sunflower#template FAKE_NPC,{
- if (getcharid(2) == getcastledata(strnpcinfo(NPC_MAP),1)) {
+ if (getcharid(CHAR_ID_GUILD) == getcastledata(strnpcinfo(NPC_MAP),1)) {
mes "- It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower. -";
next;
switch(select("Hold the stem.", "Do nothing.")) {
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index 5b8b9fc54..640258d4f 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -6082,11 +6082,11 @@ REPLACE INTO `item_db` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','11
REPLACE INTO `item_db` VALUES ('14514','Vermilion_10_Scroll','Lord of Vermilion Scroll','11','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_VERMILION,10;','','');
REPLACE INTO `item_db` VALUES ('14515','Lex_Aeterna_Scroll','Lex Aeterna Scroll','11','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_LEXAETERNA,1;','','');
REPLACE INTO `item_db` VALUES ('14516','Magnificat_5_Scroll','Magnificat Scroll','11','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,5;','','');
-REPLACE INTO `item_db` VALUES ('14517','CP_Helm_Scroll','Chemical Protection Helm Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3),237,5;','','');
-REPLACE INTO `item_db` VALUES ('14518','CP_Shield_Scroll','Chemical Protection Shield Scrol','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3),235,5;','','');
-REPLACE INTO `item_db` VALUES ('14519','CP_Armor_Scroll','Chemical Protection Armor Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3),236,5;','','');
-REPLACE INTO `item_db` VALUES ('14520','CP_Weapon_Scroll','Chemical Protection Weapon Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3),234,5;','','');
-REPLACE INTO `item_db` VALUES ('14521','Repair_Scroll','Repair Weapon Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','unitskilluseid getcharid(3),108,1;','','');
+REPLACE INTO `item_db` VALUES ('14517','CP_Helm_Scroll','Chemical Protection Helm Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5;','','');
+REPLACE INTO `item_db` VALUES ('14518','CP_Shield_Scroll','Chemical Protection Shield Scrol','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5;','','');
+REPLACE INTO `item_db` VALUES ('14519','CP_Armor_Scroll','Chemical Protection Armor Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5;','','');
+REPLACE INTO `item_db` VALUES ('14520','CP_Weapon_Scroll','Chemical Protection Weapon Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5;','','');
+REPLACE INTO `item_db` VALUES ('14521','Repair_Scroll','Repair Weapon Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1;','','');
REPLACE INTO `item_db` VALUES ('14522','Big_Bun','Big Bun','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,0;','','');
REPLACE INTO `item_db` VALUES ('14523','Pill_','Pill','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 0,100;','','');
REPLACE INTO `item_db` VALUES ('14524','Superb_Fish_Slice','Superb Fish Slice','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','','');
diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql
index 44d7d1206..4569bd6b1 100644
--- a/sql-files/item_db_re.sql
+++ b/sql-files/item_db_re.sql
@@ -7847,11 +7847,11 @@ REPLACE INTO `item_db` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','11
REPLACE INTO `item_db` VALUES ('14514','Vermilion_10_Scroll','Lord of Vermilion Scroll','11','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_VERMILION,10;','','');
REPLACE INTO `item_db` VALUES ('14515','Lex_Aeterna_Scroll','Lex Aeterna Scroll','11','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_LEXAETERNA,1;','','');
REPLACE INTO `item_db` VALUES ('14516','Magnificat_5_Scroll','Magnificat Scroll','11','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,5;','','');
-REPLACE INTO `item_db` VALUES ('14517','CP_Helm_Scroll','Chemical Protection Helm Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3),237,5;','','');
-REPLACE INTO `item_db` VALUES ('14518','CP_Shield_Scroll','Chemical Protection Shield Scrol','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3),235,5;','','');
-REPLACE INTO `item_db` VALUES ('14519','CP_Armor_Scroll','Chemical Protection Armor Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3),236,5;','','');
-REPLACE INTO `item_db` VALUES ('14520','CP_Weapon_Scroll','Chemical Protection Weapon Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3),234,5;','','');
-REPLACE INTO `item_db` VALUES ('14521','Repair_Scroll','Repair Weapon Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','unitskilluseid getcharid(3),108,1;','','');
+REPLACE INTO `item_db` VALUES ('14517','CP_Helm_Scroll','Chemical Protection Helm Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5;','','');
+REPLACE INTO `item_db` VALUES ('14518','CP_Shield_Scroll','Chemical Protection Shield Scrol','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5;','','');
+REPLACE INTO `item_db` VALUES ('14519','CP_Armor_Scroll','Chemical Protection Armor Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5;','','');
+REPLACE INTO `item_db` VALUES ('14520','CP_Weapon_Scroll','Chemical Protection Weapon Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5;','','');
+REPLACE INTO `item_db` VALUES ('14521','Repair_Scroll','Repair Weapon Scroll','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1;','','');
REPLACE INTO `item_db` VALUES ('14522','Big_Bun','Big Bun','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 100,0;','','');
REPLACE INTO `item_db` VALUES ('14523','Pill_','Pill','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 0,100;','','');
REPLACE INTO `item_db` VALUES ('14524','Superb_Fish_Slice','Superb Fish Slice','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','','');
@@ -9739,7 +9739,7 @@ REPLACE INTO `item_db` VALUES ('22046','Boots_of_Airship','Boots of Airship','5'
REPLACE INTO `item_db` VALUES ('22047','Tarlock\'s_Boots','Tarlock\'s Boots','5','20','10','250','0','0','13','0','0','18446744073709551615','63','2','64','0','125',NULL,'1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAgi,1; bonus bAspdRate,5; if(getrefine()>6) { bonus bAgi,1; bonus bAspdRate,5; } if(getrefine()>8) { bonus bAgi,1; bonus bAspdRate,5; } if(getrefine()>11) { bonus bAspd,1; }','','');
REPLACE INTO `item_db` VALUES ('22059','Egir_Shoes_K','Egir Shoes','5','200000','100000','300','0','0','13','0','1','18446744073709551615','63','2','64','0','40',NULL,'1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bMaxHP, 500; bonus bMaxSP, 50; bonus bUnbreakableShoes, 0;','','');
REPLACE INTO `item_db` VALUES ('22067','Witch_Shoes','Witch Shoes','5','3500','1750','400','0','0','10','0','0','18446744073709551614','63','2','64','0','0',NULL,'1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','skill ALL_CATCRY, 1; bonus bUnbreakableShoes, 1; autobonus3 \"{ }\", 1000, 7000, ALL_CATCRY, \"{ montransform LOLI_RURI, 420000; }\";','','');
-REPLACE INTO `item_db` VALUES ('22508','Para_Team_Mark_','Eden Group Mark','11','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','1200000','507',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3), \"AL_TELEPORT\", 3;','','');
+REPLACE INTO `item_db` VALUES ('22508','Para_Team_Mark_','Eden Group Mark','11','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','1200000','507',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT), \"AL_TELEPORT\", 3;','','');
REPLACE INTO `item_db` VALUES ('22514','Candy_Holder','Candy Holder','11','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('22515','Twisted_Key_of_Time','Twisted Key of Time','3','10','5','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','60000','475',NULL,'0',NULL,'20','1','0','itemskill RK_LUXANIMA,1;','','');
diff --git a/src/common/HPM.c b/src/common/HPM.c
index ff1371b14..1fad7102f 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -567,6 +567,7 @@ struct hplugin *hplugin_load(const char* filename)
/* id */
plugin->hpi->pid = plugin->idx;
/* core */
+ plugin->hpi->memmgr = HPMiMalloc;
#ifdef CONSOLE_INPUT
plugin->hpi->addCPCommand = console->input->addCommand;
#endif // CONSOLE_INPUT
@@ -1093,8 +1094,8 @@ void hpm_init(void)
HPM->off = false;
- memcpy(&iMalloc_HPM, iMalloc, sizeof(struct malloc_interface));
HPMiMalloc = &iMalloc_HPM;
+ *HPMiMalloc = *iMalloc;
HPMiMalloc->malloc = HPM_mmalloc;
HPMiMalloc->calloc = HPM_calloc;
HPMiMalloc->realloc = HPM_realloc;
diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h
index 7ccb960de..8dd0f1cd7 100644
--- a/src/common/HPMSymbols.inc.h
+++ b/src/common/HPMSymbols.inc.h
@@ -155,9 +155,6 @@ struct loginif_interface *loginif;
#ifdef MAP_MAIL_H /* mail */
struct mail_interface *mail;
#endif // MAP_MAIL_H
-#ifdef COMMON_MEMMGR_H /* iMalloc */
-struct malloc_interface *iMalloc;
-#endif // COMMON_MEMMGR_H
#ifdef MAP_MAP_H /* map */
struct map_interface *map;
#endif // MAP_MAP_H
@@ -405,9 +402,6 @@ if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("loginif", loginif)) return
#ifdef MAP_MAIL_H /* mail */
if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mail", mail)) return "mail";
#endif // MAP_MAIL_H
-#ifdef COMMON_MEMMGR_H /* iMalloc */
-if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("iMalloc", iMalloc)) return "iMalloc";
-#endif // COMMON_MEMMGR_H
#ifdef MAP_MAP_H /* map */
if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("map", map)) return "map";
#endif // MAP_MAP_H
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 19b9b20a5..143c325c1 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -231,6 +231,7 @@ struct HPMi_interface {
/* Hooking */
struct HPMHooking_interface *hooking;
+ struct malloc_interface *memmgr;
};
#ifdef HERCULES_CORE
#define HPM_SYMBOL(n, s) (HPM->share((s), (n)), true)
diff --git a/src/common/memmgr.h b/src/common/memmgr.h
index 680947466..a5b7e4e7d 100644
--- a/src/common/memmgr.h
+++ b/src/common/memmgr.h
@@ -101,8 +101,10 @@ struct malloc_interface {
void malloc_defaults(void);
void memmgr_report(int extra);
-#endif // HERCULES_CORE
HPShared struct malloc_interface *iMalloc;
+#else
+#define iMalloc HPMi->memmgr
+#endif // HERCULES_CORE
#endif /* COMMON_MEMMGR_H */
diff --git a/src/map/clif.c b/src/map/clif.c
index 3e6b4937b..8a79cbab1 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5749,7 +5749,7 @@ void clif_heal(int fd, int type, int val)
int len = packet_len(cmd);
WFIFOHEAD(fd, len);
- WFIFOW(fd, 0) = 0x13d;
+ WFIFOW(fd, 0) = cmd;
WFIFOW(fd, 2) = type;
#if PACKETVER < 20150513
WFIFOW(fd, 4) = cap_value(val, 0, INT16_MAX);
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 6b88ddf43..1e4ca6425 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -3787,36 +3787,6 @@ typedef void (*HPMHOOK_post_mail_deliveryfail) (struct map_session_data *sd, str
typedef bool (*HPMHOOK_pre_mail_invalid_operation) (struct map_session_data **sd);
typedef bool (*HPMHOOK_post_mail_invalid_operation) (bool retVal___, struct map_session_data *sd);
#endif // MAP_MAIL_H
-#ifdef COMMON_MEMMGR_H /* iMalloc */
-typedef void (*HPMHOOK_pre_iMalloc_init) (void);
-typedef void (*HPMHOOK_post_iMalloc_init) (void);
-typedef void (*HPMHOOK_pre_iMalloc_final) (void);
-typedef void (*HPMHOOK_post_iMalloc_final) (void);
-typedef void* (*HPMHOOK_pre_iMalloc_malloc) (size_t *size, const char **file, int *line, const char **func);
-typedef void* (*HPMHOOK_post_iMalloc_malloc) (void* retVal___, size_t size, const char *file, int line, const char *func);
-typedef void* (*HPMHOOK_pre_iMalloc_calloc) (size_t *num, size_t *size, const char **file, int *line, const char **func);
-typedef void* (*HPMHOOK_post_iMalloc_calloc) (void* retVal___, size_t num, size_t size, const char *file, int line, const char *func);
-typedef void* (*HPMHOOK_pre_iMalloc_realloc) (void **p, size_t *size, const char **file, int *line, const char **func);
-typedef void* (*HPMHOOK_post_iMalloc_realloc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func);
-typedef void* (*HPMHOOK_pre_iMalloc_reallocz) (void **p, size_t *size, const char **file, int *line, const char **func);
-typedef void* (*HPMHOOK_post_iMalloc_reallocz) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func);
-typedef char* (*HPMHOOK_pre_iMalloc_astrdup) (const char **p, const char **file, int *line, const char **func);
-typedef char* (*HPMHOOK_post_iMalloc_astrdup) (char* retVal___, const char *p, const char *file, int line, const char *func);
-typedef char* (*HPMHOOK_pre_iMalloc_astrndup) (const char **p, size_t *size, const char **file, int *line, const char **func);
-typedef char* (*HPMHOOK_post_iMalloc_astrndup) (char* retVal___, const char *p, size_t size, const char *file, int line, const char *func);
-typedef void (*HPMHOOK_pre_iMalloc_free) (void **p, const char **file, int *line, const char **func);
-typedef void (*HPMHOOK_post_iMalloc_free) (void *p, const char *file, int line, const char *func);
-typedef void (*HPMHOOK_pre_iMalloc_memory_check) (void);
-typedef void (*HPMHOOK_post_iMalloc_memory_check) (void);
-typedef bool (*HPMHOOK_pre_iMalloc_verify_ptr) (void **ptr);
-typedef bool (*HPMHOOK_post_iMalloc_verify_ptr) (bool retVal___, void *ptr);
-typedef size_t (*HPMHOOK_pre_iMalloc_usage) (void);
-typedef size_t (*HPMHOOK_post_iMalloc_usage) (size_t retVal___);
-typedef void (*HPMHOOK_pre_iMalloc_post_shutdown) (void);
-typedef void (*HPMHOOK_post_iMalloc_post_shutdown) (void);
-typedef void (*HPMHOOK_pre_iMalloc_init_messages) (void);
-typedef void (*HPMHOOK_post_iMalloc_init_messages) (void);
-#endif // COMMON_MEMMGR_H
#ifdef MAP_MAP_H /* map */
typedef void (*HPMHOOK_pre_map_zone_init) (void);
typedef void (*HPMHOOK_post_map_zone_init) (void);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index 836e51f3f..3af236f48 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -804,34 +804,6 @@ struct {
struct HPMHookPoint *HP_loginif_send_users_count_post;
struct HPMHookPoint *HP_loginif_connect_to_server_pre;
struct HPMHookPoint *HP_loginif_connect_to_server_post;
- struct HPMHookPoint *HP_iMalloc_init_pre;
- struct HPMHookPoint *HP_iMalloc_init_post;
- struct HPMHookPoint *HP_iMalloc_final_pre;
- struct HPMHookPoint *HP_iMalloc_final_post;
- struct HPMHookPoint *HP_iMalloc_malloc_pre;
- struct HPMHookPoint *HP_iMalloc_malloc_post;
- struct HPMHookPoint *HP_iMalloc_calloc_pre;
- struct HPMHookPoint *HP_iMalloc_calloc_post;
- struct HPMHookPoint *HP_iMalloc_realloc_pre;
- struct HPMHookPoint *HP_iMalloc_realloc_post;
- struct HPMHookPoint *HP_iMalloc_reallocz_pre;
- struct HPMHookPoint *HP_iMalloc_reallocz_post;
- struct HPMHookPoint *HP_iMalloc_astrdup_pre;
- struct HPMHookPoint *HP_iMalloc_astrdup_post;
- struct HPMHookPoint *HP_iMalloc_astrndup_pre;
- struct HPMHookPoint *HP_iMalloc_astrndup_post;
- struct HPMHookPoint *HP_iMalloc_free_pre;
- struct HPMHookPoint *HP_iMalloc_free_post;
- struct HPMHookPoint *HP_iMalloc_memory_check_pre;
- struct HPMHookPoint *HP_iMalloc_memory_check_post;
- struct HPMHookPoint *HP_iMalloc_verify_ptr_pre;
- struct HPMHookPoint *HP_iMalloc_verify_ptr_post;
- struct HPMHookPoint *HP_iMalloc_usage_pre;
- struct HPMHookPoint *HP_iMalloc_usage_post;
- struct HPMHookPoint *HP_iMalloc_post_shutdown_pre;
- struct HPMHookPoint *HP_iMalloc_post_shutdown_post;
- struct HPMHookPoint *HP_iMalloc_init_messages_pre;
- struct HPMHookPoint *HP_iMalloc_init_messages_post;
struct HPMHookPoint *HP_mapif_ban_pre;
struct HPMHookPoint *HP_mapif_ban_post;
struct HPMHookPoint *HP_mapif_server_init_pre;
@@ -2309,34 +2281,6 @@ struct {
int HP_loginif_send_users_count_post;
int HP_loginif_connect_to_server_pre;
int HP_loginif_connect_to_server_post;
- int HP_iMalloc_init_pre;
- int HP_iMalloc_init_post;
- int HP_iMalloc_final_pre;
- int HP_iMalloc_final_post;
- int HP_iMalloc_malloc_pre;
- int HP_iMalloc_malloc_post;
- int HP_iMalloc_calloc_pre;
- int HP_iMalloc_calloc_post;
- int HP_iMalloc_realloc_pre;
- int HP_iMalloc_realloc_post;
- int HP_iMalloc_reallocz_pre;
- int HP_iMalloc_reallocz_post;
- int HP_iMalloc_astrdup_pre;
- int HP_iMalloc_astrdup_post;
- int HP_iMalloc_astrndup_pre;
- int HP_iMalloc_astrndup_post;
- int HP_iMalloc_free_pre;
- int HP_iMalloc_free_post;
- int HP_iMalloc_memory_check_pre;
- int HP_iMalloc_memory_check_post;
- int HP_iMalloc_verify_ptr_pre;
- int HP_iMalloc_verify_ptr_post;
- int HP_iMalloc_usage_pre;
- int HP_iMalloc_usage_post;
- int HP_iMalloc_post_shutdown_pre;
- int HP_iMalloc_post_shutdown_post;
- int HP_iMalloc_init_messages_pre;
- int HP_iMalloc_init_messages_post;
int HP_mapif_ban_pre;
int HP_mapif_ban_post;
int HP_mapif_server_init_pre;
@@ -3057,7 +3001,6 @@ struct {
struct inter_storage_interface inter_storage;
struct libconfig_interface libconfig;
struct loginif_interface loginif;
- struct malloc_interface iMalloc;
struct mapif_interface mapif;
struct mapindex_interface mapindex;
struct md5_interface md5;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 047373f77..55fc347e5 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -436,21 +436,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(loginif->auth, HP_loginif_auth) },
{ HP_POP(loginif->send_users_count, HP_loginif_send_users_count) },
{ HP_POP(loginif->connect_to_server, HP_loginif_connect_to_server) },
-/* malloc_interface */
- { HP_POP(iMalloc->init, HP_iMalloc_init) },
- { HP_POP(iMalloc->final, HP_iMalloc_final) },
- { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) },
- { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) },
- { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) },
- { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) },
- { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) },
- { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) },
- { HP_POP(iMalloc->free, HP_iMalloc_free) },
- { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) },
- { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) },
- { HP_POP(iMalloc->usage, HP_iMalloc_usage) },
- { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) },
- { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) },
/* mapif_interface */
{ HP_POP(mapif->ban, HP_mapif_ban) },
{ HP_POP(mapif->server_init, HP_mapif_server_init) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 63afcab3c..89ae03319 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -10440,379 +10440,6 @@ void HP_loginif_connect_to_server(void) {
}
return;
}
-/* malloc_interface */
-void HP_iMalloc_init(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_init_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.init();
- }
- if( HPMHooks.count.HP_iMalloc_init_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void HP_iMalloc_final(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_final_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.final();
- }
- if( HPMHooks.count.HP_iMalloc_final_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_malloc_pre ) {
- void* (*preHookFunc) (size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func;
- retVal___ = preHookFunc(&size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_malloc_post ) {
- void* (*postHookFunc) (void* retVal___, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, size, file, line, func);
- }
- }
- return retVal___;
-}
-void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_calloc_pre ) {
- void* (*preHookFunc) (size_t *num, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func;
- retVal___ = preHookFunc(&num, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_calloc_post ) {
- void* (*postHookFunc) (void* retVal___, size_t num, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, num, size, file, line, func);
- }
- }
- return retVal___;
-}
-void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_realloc_pre ) {
- void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_realloc_post ) {
- void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, size, file, line, func);
- }
- }
- return retVal___;
-}
-void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_reallocz_pre ) {
- void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_reallocz_post ) {
- void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, size, file, line, func);
- }
- }
- return retVal___;
-}
-char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) {
- int hIndex = 0;
- char* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_astrdup_pre ) {
- char* (*preHookFunc) (const char **p, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_astrdup_post ) {
- char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, file, line, func);
- }
- }
- return retVal___;
-}
-char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- char* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_astrndup_pre ) {
- char* (*preHookFunc) (const char **p, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_astrndup_post ) {
- char* (*postHookFunc) (char* retVal___, const char *p, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, size, file, line, func);
- }
- }
- return retVal___;
-}
-void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_free_pre ) {
- void (*preHookFunc) (void **p, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func;
- preHookFunc(&p, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.free(p, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_free_post ) {
- void (*postHookFunc) (void *p, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func;
- postHookFunc(p, file, line, func);
- }
- }
- return;
-}
-void HP_iMalloc_memory_check(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_memory_check_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.memory_check();
- }
- if( HPMHooks.count.HP_iMalloc_memory_check_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-bool HP_iMalloc_verify_ptr(void *ptr) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) {
- bool (*preHookFunc) (void **ptr);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func;
- retVal___ = preHookFunc(&ptr);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr);
- }
- if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) {
- bool (*postHookFunc) (bool retVal___, void *ptr);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, ptr);
- }
- }
- return retVal___;
-}
-size_t HP_iMalloc_usage(void) {
- int hIndex = 0;
- size_t retVal___ = 0;
- if( HPMHooks.count.HP_iMalloc_usage_pre ) {
- size_t (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func;
- retVal___ = preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.usage();
- }
- if( HPMHooks.count.HP_iMalloc_usage_post ) {
- size_t (*postHookFunc) (size_t retVal___);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func;
- retVal___ = postHookFunc(retVal___);
- }
- }
- return retVal___;
-}
-void HP_iMalloc_post_shutdown(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.post_shutdown();
- }
- if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void HP_iMalloc_init_messages(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_init_messages_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.init_messages();
- }
- if( HPMHooks.count.HP_iMalloc_init_messages_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
/* mapif_interface */
void HP_mapif_ban(int id, unsigned int flag, int status) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
index 54ae8f030..d940e379a 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
@@ -46,7 +46,6 @@ memcpy(&HPMHooks.source.inter_quest, inter_quest, sizeof(struct inter_quest_inte
memcpy(&HPMHooks.source.inter_storage, inter_storage, sizeof(struct inter_storage_interface));
memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface));
memcpy(&HPMHooks.source.loginif, loginif, sizeof(struct loginif_interface));
-memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface));
memcpy(&HPMHooks.source.mapif, mapif, sizeof(struct mapif_interface));
memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_interface));
memcpy(&HPMHooks.source.md5, md5, sizeof(struct md5_interface));
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index b97b6ea7f..1d7ac8267 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -376,34 +376,6 @@ struct {
struct HPMHookPoint *HP_login_config_set_defaults_post;
struct HPMHookPoint *HP_login_config_read_pre;
struct HPMHookPoint *HP_login_config_read_post;
- struct HPMHookPoint *HP_iMalloc_init_pre;
- struct HPMHookPoint *HP_iMalloc_init_post;
- struct HPMHookPoint *HP_iMalloc_final_pre;
- struct HPMHookPoint *HP_iMalloc_final_post;
- struct HPMHookPoint *HP_iMalloc_malloc_pre;
- struct HPMHookPoint *HP_iMalloc_malloc_post;
- struct HPMHookPoint *HP_iMalloc_calloc_pre;
- struct HPMHookPoint *HP_iMalloc_calloc_post;
- struct HPMHookPoint *HP_iMalloc_realloc_pre;
- struct HPMHookPoint *HP_iMalloc_realloc_post;
- struct HPMHookPoint *HP_iMalloc_reallocz_pre;
- struct HPMHookPoint *HP_iMalloc_reallocz_post;
- struct HPMHookPoint *HP_iMalloc_astrdup_pre;
- struct HPMHookPoint *HP_iMalloc_astrdup_post;
- struct HPMHookPoint *HP_iMalloc_astrndup_pre;
- struct HPMHookPoint *HP_iMalloc_astrndup_post;
- struct HPMHookPoint *HP_iMalloc_free_pre;
- struct HPMHookPoint *HP_iMalloc_free_post;
- struct HPMHookPoint *HP_iMalloc_memory_check_pre;
- struct HPMHookPoint *HP_iMalloc_memory_check_post;
- struct HPMHookPoint *HP_iMalloc_verify_ptr_pre;
- struct HPMHookPoint *HP_iMalloc_verify_ptr_post;
- struct HPMHookPoint *HP_iMalloc_usage_pre;
- struct HPMHookPoint *HP_iMalloc_usage_post;
- struct HPMHookPoint *HP_iMalloc_post_shutdown_pre;
- struct HPMHookPoint *HP_iMalloc_post_shutdown_post;
- struct HPMHookPoint *HP_iMalloc_init_messages_pre;
- struct HPMHookPoint *HP_iMalloc_init_messages_post;
struct HPMHookPoint *HP_md5_string_pre;
struct HPMHookPoint *HP_md5_string_post;
struct HPMHookPoint *HP_md5_binary_pre;
@@ -1077,34 +1049,6 @@ struct {
int HP_login_config_set_defaults_post;
int HP_login_config_read_pre;
int HP_login_config_read_post;
- int HP_iMalloc_init_pre;
- int HP_iMalloc_init_post;
- int HP_iMalloc_final_pre;
- int HP_iMalloc_final_post;
- int HP_iMalloc_malloc_pre;
- int HP_iMalloc_malloc_post;
- int HP_iMalloc_calloc_pre;
- int HP_iMalloc_calloc_post;
- int HP_iMalloc_realloc_pre;
- int HP_iMalloc_realloc_post;
- int HP_iMalloc_reallocz_pre;
- int HP_iMalloc_reallocz_post;
- int HP_iMalloc_astrdup_pre;
- int HP_iMalloc_astrdup_post;
- int HP_iMalloc_astrndup_pre;
- int HP_iMalloc_astrndup_post;
- int HP_iMalloc_free_pre;
- int HP_iMalloc_free_post;
- int HP_iMalloc_memory_check_pre;
- int HP_iMalloc_memory_check_post;
- int HP_iMalloc_verify_ptr_pre;
- int HP_iMalloc_verify_ptr_post;
- int HP_iMalloc_usage_pre;
- int HP_iMalloc_usage_post;
- int HP_iMalloc_post_shutdown_pre;
- int HP_iMalloc_post_shutdown_post;
- int HP_iMalloc_init_messages_pre;
- int HP_iMalloc_init_messages_post;
int HP_md5_string_pre;
int HP_md5_string_post;
int HP_md5_binary_pre;
@@ -1438,7 +1382,6 @@ struct {
struct lclif_interface_private PRIV__lclif;
struct libconfig_interface libconfig;
struct login_interface login;
- struct malloc_interface iMalloc;
struct md5_interface md5;
struct mutex_interface mutex;
struct nullpo_interface nullpo;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index 2d3e37bc3..96a711af6 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -211,21 +211,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(login->parse_request_connection, HP_login_parse_request_connection) },
{ HP_POP(login->config_set_defaults, HP_login_config_set_defaults) },
{ HP_POP(login->config_read, HP_login_config_read) },
-/* malloc_interface */
- { HP_POP(iMalloc->init, HP_iMalloc_init) },
- { HP_POP(iMalloc->final, HP_iMalloc_final) },
- { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) },
- { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) },
- { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) },
- { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) },
- { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) },
- { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) },
- { HP_POP(iMalloc->free, HP_iMalloc_free) },
- { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) },
- { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) },
- { HP_POP(iMalloc->usage, HP_iMalloc_usage) },
- { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) },
- { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) },
/* md5_interface */
{ HP_POP(md5->string, HP_md5_string) },
{ HP_POP(md5->binary, HP_md5_binary) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 290c2283a..097b4b283 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -4716,379 +4716,6 @@ bool HP_login_config_read(const char *filename, bool included) {
}
return retVal___;
}
-/* malloc_interface */
-void HP_iMalloc_init(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_init_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.init();
- }
- if( HPMHooks.count.HP_iMalloc_init_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void HP_iMalloc_final(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_final_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.final();
- }
- if( HPMHooks.count.HP_iMalloc_final_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_malloc_pre ) {
- void* (*preHookFunc) (size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func;
- retVal___ = preHookFunc(&size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_malloc_post ) {
- void* (*postHookFunc) (void* retVal___, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, size, file, line, func);
- }
- }
- return retVal___;
-}
-void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_calloc_pre ) {
- void* (*preHookFunc) (size_t *num, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func;
- retVal___ = preHookFunc(&num, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_calloc_post ) {
- void* (*postHookFunc) (void* retVal___, size_t num, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, num, size, file, line, func);
- }
- }
- return retVal___;
-}
-void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_realloc_pre ) {
- void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_realloc_post ) {
- void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, size, file, line, func);
- }
- }
- return retVal___;
-}
-void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_reallocz_pre ) {
- void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_reallocz_post ) {
- void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, size, file, line, func);
- }
- }
- return retVal___;
-}
-char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) {
- int hIndex = 0;
- char* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_astrdup_pre ) {
- char* (*preHookFunc) (const char **p, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_astrdup_post ) {
- char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, file, line, func);
- }
- }
- return retVal___;
-}
-char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- char* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_astrndup_pre ) {
- char* (*preHookFunc) (const char **p, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_astrndup_post ) {
- char* (*postHookFunc) (char* retVal___, const char *p, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, size, file, line, func);
- }
- }
- return retVal___;
-}
-void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_free_pre ) {
- void (*preHookFunc) (void **p, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func;
- preHookFunc(&p, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.free(p, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_free_post ) {
- void (*postHookFunc) (void *p, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func;
- postHookFunc(p, file, line, func);
- }
- }
- return;
-}
-void HP_iMalloc_memory_check(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_memory_check_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.memory_check();
- }
- if( HPMHooks.count.HP_iMalloc_memory_check_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-bool HP_iMalloc_verify_ptr(void *ptr) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) {
- bool (*preHookFunc) (void **ptr);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func;
- retVal___ = preHookFunc(&ptr);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr);
- }
- if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) {
- bool (*postHookFunc) (bool retVal___, void *ptr);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, ptr);
- }
- }
- return retVal___;
-}
-size_t HP_iMalloc_usage(void) {
- int hIndex = 0;
- size_t retVal___ = 0;
- if( HPMHooks.count.HP_iMalloc_usage_pre ) {
- size_t (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func;
- retVal___ = preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.usage();
- }
- if( HPMHooks.count.HP_iMalloc_usage_post ) {
- size_t (*postHookFunc) (size_t retVal___);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func;
- retVal___ = postHookFunc(retVal___);
- }
- }
- return retVal___;
-}
-void HP_iMalloc_post_shutdown(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.post_shutdown();
- }
- if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void HP_iMalloc_init_messages(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_init_messages_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.init_messages();
- }
- if( HPMHooks.count.HP_iMalloc_init_messages_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
/* md5_interface */
void HP_md5_string(const char *string, char *output) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
index 6677a0c55..4bb7f5396 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
@@ -35,7 +35,6 @@ memcpy(&HPMHooks.source.lclif, lclif, sizeof(struct lclif_interface));
memcpy(&HPMHooks.source.PRIV__lclif, lclif->p, sizeof(struct lclif_interface_private));
memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface));
memcpy(&HPMHooks.source.login, login, sizeof(struct login_interface));
-memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface));
memcpy(&HPMHooks.source.md5, md5, sizeof(struct md5_interface));
memcpy(&HPMHooks.source.mutex, mutex, sizeof(struct mutex_interface));
memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface));
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index d71ecc52f..cbaf14715 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2984,34 +2984,6 @@ struct {
struct HPMHookPoint *HP_mail_deliveryfail_post;
struct HPMHookPoint *HP_mail_invalid_operation_pre;
struct HPMHookPoint *HP_mail_invalid_operation_post;
- struct HPMHookPoint *HP_iMalloc_init_pre;
- struct HPMHookPoint *HP_iMalloc_init_post;
- struct HPMHookPoint *HP_iMalloc_final_pre;
- struct HPMHookPoint *HP_iMalloc_final_post;
- struct HPMHookPoint *HP_iMalloc_malloc_pre;
- struct HPMHookPoint *HP_iMalloc_malloc_post;
- struct HPMHookPoint *HP_iMalloc_calloc_pre;
- struct HPMHookPoint *HP_iMalloc_calloc_post;
- struct HPMHookPoint *HP_iMalloc_realloc_pre;
- struct HPMHookPoint *HP_iMalloc_realloc_post;
- struct HPMHookPoint *HP_iMalloc_reallocz_pre;
- struct HPMHookPoint *HP_iMalloc_reallocz_post;
- struct HPMHookPoint *HP_iMalloc_astrdup_pre;
- struct HPMHookPoint *HP_iMalloc_astrdup_post;
- struct HPMHookPoint *HP_iMalloc_astrndup_pre;
- struct HPMHookPoint *HP_iMalloc_astrndup_post;
- struct HPMHookPoint *HP_iMalloc_free_pre;
- struct HPMHookPoint *HP_iMalloc_free_post;
- struct HPMHookPoint *HP_iMalloc_memory_check_pre;
- struct HPMHookPoint *HP_iMalloc_memory_check_post;
- struct HPMHookPoint *HP_iMalloc_verify_ptr_pre;
- struct HPMHookPoint *HP_iMalloc_verify_ptr_post;
- struct HPMHookPoint *HP_iMalloc_usage_pre;
- struct HPMHookPoint *HP_iMalloc_usage_post;
- struct HPMHookPoint *HP_iMalloc_post_shutdown_pre;
- struct HPMHookPoint *HP_iMalloc_post_shutdown_post;
- struct HPMHookPoint *HP_iMalloc_init_messages_pre;
- struct HPMHookPoint *HP_iMalloc_init_messages_post;
struct HPMHookPoint *HP_map_zone_init_pre;
struct HPMHookPoint *HP_map_zone_init_post;
struct HPMHookPoint *HP_map_zone_remove_pre;
@@ -9047,34 +9019,6 @@ struct {
int HP_mail_deliveryfail_post;
int HP_mail_invalid_operation_pre;
int HP_mail_invalid_operation_post;
- int HP_iMalloc_init_pre;
- int HP_iMalloc_init_post;
- int HP_iMalloc_final_pre;
- int HP_iMalloc_final_post;
- int HP_iMalloc_malloc_pre;
- int HP_iMalloc_malloc_post;
- int HP_iMalloc_calloc_pre;
- int HP_iMalloc_calloc_post;
- int HP_iMalloc_realloc_pre;
- int HP_iMalloc_realloc_post;
- int HP_iMalloc_reallocz_pre;
- int HP_iMalloc_reallocz_post;
- int HP_iMalloc_astrdup_pre;
- int HP_iMalloc_astrdup_post;
- int HP_iMalloc_astrndup_pre;
- int HP_iMalloc_astrndup_post;
- int HP_iMalloc_free_pre;
- int HP_iMalloc_free_post;
- int HP_iMalloc_memory_check_pre;
- int HP_iMalloc_memory_check_post;
- int HP_iMalloc_verify_ptr_pre;
- int HP_iMalloc_verify_ptr_post;
- int HP_iMalloc_usage_pre;
- int HP_iMalloc_usage_post;
- int HP_iMalloc_post_shutdown_pre;
- int HP_iMalloc_post_shutdown_post;
- int HP_iMalloc_init_messages_pre;
- int HP_iMalloc_init_messages_post;
int HP_map_zone_init_pre;
int HP_map_zone_init_post;
int HP_map_zone_remove_pre;
@@ -12179,7 +12123,6 @@ struct {
struct libconfig_interface libconfig;
struct log_interface logs;
struct mail_interface mail;
- struct malloc_interface iMalloc;
struct map_interface map;
struct mapindex_interface mapindex;
struct mapit_interface mapit;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index b6ee443a3..989296011 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1532,21 +1532,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mail->openmail, HP_mail_openmail) },
{ HP_POP(mail->deliveryfail, HP_mail_deliveryfail) },
{ HP_POP(mail->invalid_operation, HP_mail_invalid_operation) },
-/* malloc_interface */
- { HP_POP(iMalloc->init, HP_iMalloc_init) },
- { HP_POP(iMalloc->final, HP_iMalloc_final) },
- { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) },
- { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) },
- { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) },
- { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) },
- { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) },
- { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) },
- { HP_POP(iMalloc->free, HP_iMalloc_free) },
- { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) },
- { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) },
- { HP_POP(iMalloc->usage, HP_iMalloc_usage) },
- { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) },
- { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) },
/* map_interface */
{ HP_POP(map->zone_init, HP_map_zone_init) },
{ HP_POP(map->zone_remove, HP_map_zone_remove) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 0c81e557f..e5712b34d 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -39298,379 +39298,6 @@ bool HP_mail_invalid_operation(struct map_session_data *sd) {
}
return retVal___;
}
-/* malloc_interface */
-void HP_iMalloc_init(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_init_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.init();
- }
- if( HPMHooks.count.HP_iMalloc_init_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void HP_iMalloc_final(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_final_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.final();
- }
- if( HPMHooks.count.HP_iMalloc_final_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_malloc_pre ) {
- void* (*preHookFunc) (size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func;
- retVal___ = preHookFunc(&size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_malloc_post ) {
- void* (*postHookFunc) (void* retVal___, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, size, file, line, func);
- }
- }
- return retVal___;
-}
-void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_calloc_pre ) {
- void* (*preHookFunc) (size_t *num, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func;
- retVal___ = preHookFunc(&num, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_calloc_post ) {
- void* (*postHookFunc) (void* retVal___, size_t num, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, num, size, file, line, func);
- }
- }
- return retVal___;
-}
-void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_realloc_pre ) {
- void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_realloc_post ) {
- void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, size, file, line, func);
- }
- }
- return retVal___;
-}
-void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- void* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_reallocz_pre ) {
- void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_reallocz_post ) {
- void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, size, file, line, func);
- }
- }
- return retVal___;
-}
-char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) {
- int hIndex = 0;
- char* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_astrdup_pre ) {
- char* (*preHookFunc) (const char **p, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_astrdup_post ) {
- char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, file, line, func);
- }
- }
- return retVal___;
-}
-char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) {
- int hIndex = 0;
- char* retVal___ = NULL;
- if( HPMHooks.count.HP_iMalloc_astrndup_pre ) {
- char* (*preHookFunc) (const char **p, size_t *size, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func;
- retVal___ = preHookFunc(&p, &size, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_astrndup_post ) {
- char* (*postHookFunc) (char* retVal___, const char *p, size_t size, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, p, size, file, line, func);
- }
- }
- return retVal___;
-}
-void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_free_pre ) {
- void (*preHookFunc) (void **p, const char **file, int *line, const char **func);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func;
- preHookFunc(&p, &file, &line, &func);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.free(p, file, line, func);
- }
- if( HPMHooks.count.HP_iMalloc_free_post ) {
- void (*postHookFunc) (void *p, const char *file, int line, const char *func);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func;
- postHookFunc(p, file, line, func);
- }
- }
- return;
-}
-void HP_iMalloc_memory_check(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_memory_check_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.memory_check();
- }
- if( HPMHooks.count.HP_iMalloc_memory_check_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-bool HP_iMalloc_verify_ptr(void *ptr) {
- int hIndex = 0;
- bool retVal___ = false;
- if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) {
- bool (*preHookFunc) (void **ptr);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func;
- retVal___ = preHookFunc(&ptr);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr);
- }
- if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) {
- bool (*postHookFunc) (bool retVal___, void *ptr);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, ptr);
- }
- }
- return retVal___;
-}
-size_t HP_iMalloc_usage(void) {
- int hIndex = 0;
- size_t retVal___ = 0;
- if( HPMHooks.count.HP_iMalloc_usage_pre ) {
- size_t (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func;
- retVal___ = preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.iMalloc.usage();
- }
- if( HPMHooks.count.HP_iMalloc_usage_post ) {
- size_t (*postHookFunc) (size_t retVal___);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func;
- retVal___ = postHookFunc(retVal___);
- }
- }
- return retVal___;
-}
-void HP_iMalloc_post_shutdown(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.post_shutdown();
- }
- if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void HP_iMalloc_init_messages(void) {
- int hIndex = 0;
- if( HPMHooks.count.HP_iMalloc_init_messages_pre ) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func;
- preHookFunc();
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.iMalloc.init_messages();
- }
- if( HPMHooks.count.HP_iMalloc_init_messages_post ) {
- void (*postHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
/* map_interface */
void HP_map_zone_init(void) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
index 54861ed6f..0cc52b595 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
@@ -52,7 +52,6 @@ memcpy(&HPMHooks.source.itemdb, itemdb, sizeof(struct itemdb_interface));
memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface));
memcpy(&HPMHooks.source.logs, logs, sizeof(struct log_interface));
memcpy(&HPMHooks.source.mail, mail, sizeof(struct mail_interface));
-memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface));
memcpy(&HPMHooks.source.map, map, sizeof(struct map_interface));
memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_interface));
memcpy(&HPMHooks.source.mapit, mapit, sizeof(struct mapit_interface));
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl
index 3203e0b70..b8835b376 100755
--- a/tools/HPMHookGen/HPMHookGen.pl
+++ b/tools/HPMHookGen/HPMHookGen.pl
@@ -295,6 +295,7 @@ foreach my $file (@files) { # Loop through the xml files
my $loc = $data->{compounddef}->{$filekey}->{location}->[0];
next unless $loc->{file} =~ /src\/(map|char|login|common)\//;
next if $loc->{file} =~ /\/HPM.*\.h/; # Don't allow hooking into the HPM itself
+ next if $loc->{file} =~ /\/memmgr\.h/; # Don't allow hooking into the memory manager
my $servertype = $1;
my $key = $data->{compounddef}->{$filekey}->{compoundname}->[0];
my $original = $key;
@@ -338,8 +339,6 @@ foreach my $file (@files) { # Loop through the xml files
$key = "chr";
} elsif ($key eq "db_interface") {
$key = "DB";
- } elsif ($key eq "malloc_interface") {
- $key = "iMalloc";
} elsif ($key eq "socket_interface") {
$key = "sockt";
} elsif ($key eq "sql_interface") {