diff options
54 files changed, 3926 insertions, 2502 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..2b1745233 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,40 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project does not adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [Unreleased] +<!-- +If you are reading this in a text editor, simply ignore this section +--> + +## [v2017.10.22-1] `October 22 2017` `PATCH 1` +### Fixed +- Fixed a wrong null pointer check in `logmes()`, which caused the command to never log and instead print debug information. + +## [v2017.10.22] `October 22 2017` +### Added +- Added the script command `getmapinfo()`, which allows to obtain misc information about a map. (#1852) +- Added an option to restrict party leader changes to characters on the same map. Controlled by the setting `party_change_leader_same_map` (defaults to true). (#1812) +- Added initial support (shuffle packets, obfuscation keys) for clients 2017-09-27, 2017-10-02, 2017-10-11, 2017-10-18. (#1859) +- Added the `noautoloot` mapflag, allowing to disable the `@autoloot` functionality on a map by map basis. (#1833) + +### Changed +- Extended the script command `logmes()` with an option to log to the `atcommandlog` table. (#1843) +- Updated RoDEX, with support for packetver `20170419` and newer. (#1859) +- Updated Exp-related packets and handling functions to support values larger than 2 billions (as seen in packetver `20170830` and newer). (#1859) +- Changed the diagnostic message in `skill_init_unit_layout()` to report the skill ID instead of its index. (#1854) + +### Fixed +- Corrected the Kafra dialog in case a Doram without the Summoner's Basic Skill attempts to open the Storage. (#1864) +- Changed the cell stack counting algorithm to ignore invisible NPCs, improving the Dancer Quest experience as well as other cases of hidden NPCs blocking off certain cells. (#1827) +- Improved the handling of the `cardfix` value to make it more resistant to overflows, especially in renewal mode. Simplified the related renewal/pre-renewal conditional code. (#1825) +- Fixed some compilation warnings occurring in VS2017. (#1870) + +### Other +- New versioning scheme and project changelogs/release notes (#1853) + +[Unreleased]: https://github.com/HerculesWS/Hercules/compare/stable...master +[v2017.10.22-1]: https://github.com/HerculesWS/Hercules/compare/v2017.10.22...v2017.10.22-1 +[v2017.10.22]: https://github.com/HerculesWS/Hercules/compare/6b1fe2d...v2017.10.22 diff --git a/conf/login/login-server.conf b/conf/login/login-server.conf index 71928e3d0..4ad02deb2 100644 --- a/conf/login/login-server.conf +++ b/conf/login/login-server.conf @@ -54,6 +54,22 @@ login_configuration: { date_format: "%Y-%m-%d %H:%M:%S" } + // for packet version >= 20170726 + users_count: { + // if false, dont show any colored strings. + // if true, show special users count numbers for coloring char servers. + send_user_count_description: true + + // users counts for use different colors. + // below 'low' show green text + // below 'medium' show oragne text + // below 'high' show red text + // higher 'high' show purple text + low: 200 + medium: 500 + high: 1000 + } + // Account engine configuration account: { // Can you use _M/_F to make new accounts on the server? diff --git a/conf/map/battle/party.conf b/conf/map/battle/party.conf index 07a0bdaea..a38321806 100644 --- a/conf/map/battle/party.conf +++ b/conf/map/battle/party.conf @@ -41,6 +41,12 @@ party_update_interval: 1000 // 1: Athena - bar is updated with the party map dots (up to 1 second delay) party_hp_mode: 0 +// When changing party leader, should the new leader be in the same map +// as the current leader. (Note 1) +// true: Aegis - They must be in the same map +// false: Athena - They can be in different maps +party_change_leader_same_map: true + // When 'Party Share' item sharing is enabled in a party, // announce in the party which party-member received the item and what's he received? (Note 1) show_party_share_picker: true diff --git a/conf/messages.conf b/conf/messages.conf index 155cfd881..78f0c6aa9 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -607,7 +607,10 @@ 668: Shadow Chaser T 669: Summoner -//670-855 FREE (please start using from the top if you need, leave the 670+ range for new jobs) +//670-853 FREE (please start using from the top if you need, leave the 670+ range for new jobs) + +// Mapflag to disable Autoloot Commands +854: Auto loot item are disabled on this map. // MVP exp message issue clients 2013-12-23cRagexe and newer. 855: Congratulations! You are the MVP! Your reward EXP Points are %u !! @@ -856,7 +859,7 @@ 1060: NoWarp | 1061: NoWarpTo | 1062: NoReturn | -//1063 FREE +1063: NoAutoloot | 1064: NoMemo | 1065: No Exp Penalty: %s | No Zeny Penalty: %s 1066: On diff --git a/db/constants.conf b/db/constants.conf index bc06eed72..eda877671 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -426,7 +426,8 @@ constants_db: { mf_reset: 52 mf_notomb: 53 mf_nocashshop: 54 - mf_noviewid: 55 + mf_noautoloot: 55 + mf_noviewid: 56 comment__: "Cell Properties" cell_walkable: 0 @@ -3609,15 +3610,20 @@ constants_db: { HUNTING: 2 comment__: "questinfo" - QTYPE_NONE: 0x270f - QTYPE_QUEST: 0x00 - QTYPE_QUEST2: 0x01 - QTYPE_JOB: 0x02 - QTYPE_JOB2: 0x03 - QTYPE_EVENT: 0x04 - QTYPE_EVENT2: 0x05 - QTYPE_WARG: 0x06 - QTYPE_WARG2: 0x08 + QTYPE_NONE: 0x270f + QTYPE_QUEST: 0x00 + QTYPE_QUEST2: 0x01 + QTYPE_JOB: 0x02 + QTYPE_JOB2: 0x03 + QTYPE_EVENT: 0x04 + QTYPE_EVENT2: 0x05 + QTYPE_WARG: 0x06 + QTYPE_CLICKME: 0x06 + QTYPE_DAILYQUEST: 0x07 + QTYPE_WARG2: 0x08 + QTYPE_EVENT3: 0x08 + QTYPE_JOBQUEST: 0x09 + QTYPE_JUMPING_PORING: 0xA comment__: "Font weight" FW_DONTCARE: 0 @@ -3864,4 +3870,6 @@ constants_db: { UDT_LIFETIME: 52 UDT_MERC_KILLCOUNT: 53 UDT_STATADD: 54 + UDT_ROBE: 55 + UDT_BODY2: 56 } diff --git a/doc/constants.md b/doc/constants.md index 60ba6908d..fa077b965 100644 --- a/doc/constants.md +++ b/doc/constants.md @@ -358,7 +358,8 @@ - `mf_reset`: 52 - `mf_notomb`: 53 - `mf_nocashshop`: 54 -- `mf_noviewid`: 55 +- `mf_noautoloot`: 55 +- `mf_noviewid`: 56 ### Cell Properties @@ -3542,7 +3543,12 @@ - `QTYPE_EVENT`: 4 - `QTYPE_EVENT2`: 5 - `QTYPE_WARG`: 6 +- `QTYPE_CLICKME`: 6 +- `QTYPE_DAILYQUEST`: 7 - `QTYPE_WARG2`: 8 +- `QTYPE_EVENT3`: 8 +- `QTYPE_JOBQUEST`: 9 +- `QTYPE_JUMPING_PORING`: 10 ### Font weight @@ -3781,6 +3787,8 @@ - `UDT_LIFETIME`: 52 - `UDT_MERC_KILLCOUNT`: 53 - `UDT_STATADD`: 54 +- `UDT_ROBE`: 55 +- `UDT_BODY2`: 56 ## Hardcoded Constants (source) @@ -4004,6 +4012,11 @@ - `DATATYPE_VAR`: 4096 - `DATATYPE_LABEL`: 8192 +### Logmes types + +- `LOGMES_NPC`: 0 +- `LOGMES_ATCOMMAND`: 1 + ### Item Subtypes (Weapon types) - `W_FIST`: 0 @@ -4059,6 +4072,14 @@ - `DRESSROOM_OPEN`: 1 - `DRESSROOM_CLOSE`: 0 +### getmapinfo options + +- `MAPINFO_NAME`: 0 +- `MAPINFO_ID`: 1 +- `MAPINFO_SIZE_X`: 2 +- `MAPINFO_SIZE_Y`: 3 +- `MAPINFO_ZONE`: 4 + ### Renewal - `RENEWAL`: 1 diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 331bed1c7..940302982 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -189,6 +189,7 @@ There are two optional fields for monster size and AI. Size can be 0 Alternately, a monster spawned using 'boss_monster' instead of 'monster' is able to be detected on the map with the SC_CASH_BOSS_ALARM status (used by Convex Mirror, item ID# 12214). +A monster spawned using 'miniboss_monster' is spawn monster as mini boss view. ** NPC names @@ -3232,6 +3233,7 @@ Set an equipment's option index or value for the specified option slot. <equipment_index> For a list of equipment indexes see getequipid(). <option_slot> can range from 1 to MAX_ITEM_OPTIONS <type> can be IT_OPT_INDEX (the ID of the option bonus, @see "Id" or "Name" in db/item_options.conf) + removes the equip option if type is 0. <value> The value of the type to be set. returns 0 if value couldn't be set, 1 on success. @@ -3305,6 +3307,27 @@ Notice that NPC objects disabled with disablenpc() will still be located. --------------------------------------- +*getmapinfo(<info>{, "<map name>"}) +*getmapinfo(<info>{, <map id>}) + +This command returns various information about a specific map. If the second +argument is omitted, it will try to use the map of the attached NPC, or the +map of the attached player if the NPC can't be found. + +Valid <info> are: + MAPINFO_NAME name of the map + MAPINFO_ID numeric ID of the map + MAPINFO_ZONE name of the zone used by the map + MAPINFO_SIZE_X width of the map (cells on the x axis) + MAPINFO_SIZE_Y height of the map (cells on the y axis) + +Examples: + getmapinfo(MAPINFO_ID, "map name"); // ID from name + getmapinfo(MAPINFO_NAME, 3); // name from ID + getmapinfo(MAPINFO_ZONE); // zone, ie Normal, PvP, Jail, ... + +--------------------------------------- + *getunits(<type>, <variable>, <limit>, "<map>"{, <x1>, <y1>, <x2>, <y2>}) This function searches a whole map or area for units and adds their GID to @@ -7506,13 +7529,21 @@ window). It will not be displayed anywhere else. debugmes("\033[38D\033[K ==Message== \n"); // enable colour code. --------------------------------------- -*logmes("<message>") +*logmes("<message>"{, <log type>}) + +This command will write the message given to the map server log files, as +specified in 'conf/map/logs.conf'. If SQL logging is enabled, the message will +go to the specified log table. If logs are not enabled, nothing will happen. + +Log types are: -This command will write the message given to the map server NPC log file, -as specified in 'conf/map/logs.conf'. If SQL logging is enabled, the message -will go to the 'npclog' table. +LOGMES_NPC - log to the 'npclog' table (Default) +LOGMES_ATCOMMAND - log to the 'atcommandlog' table -If logs are not enabled for NPCs, nothing will happen. +Example: + + logmes("foobar"); + logmes("foobar", LOGMES_ATCOMMAND); --------------------------------------- @@ -9197,7 +9228,14 @@ No Icon : QTYPE_NONE ! Event Icon : QTYPE_EVENT ? Event Icon : QTYPE_EVENT2 Warg : QTYPE_WARG -Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410) +Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410 && packetver < 20170315) + +- Only for packetver >= 20170315 +Click Me Icon : QTYPE_CLICKME +! Daily Quest Icon : QTYPE_DAILYQUEST +! Green Event Icon : QTYPE_EVENT3 +! Job Quest Icon : QTYPE_JOBQUEST +Jumping Poring : QTYPE_JUMPING_PORING Map Mark Color, when used, creates a mark in the user's mini map on the position of the NPC, the available color values are: @@ -9306,7 +9344,14 @@ Remove Icon : QTYPE_NONE ! Event Icon : QTYPE_EVENT ? Event Icon : QTYPE_EVENT2 Warg : QTYPE_WARG -Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410) +Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410 && packetver < 20170315) + +- Only for packetver >= 20170315 +Click Me Icon : QTYPE_CLICKME +! Daily Quest Icon : QTYPE_DAILYQUEST +! Green Event Icon : QTYPE_EVENT3 +! Job Quest Icon : QTYPE_JOBQUEST +Jumping Poring : QTYPE_JUMPING_PORING Mark Color: 0 - No Mark diff --git a/npc/instances/OrcsMemory.txt b/npc/instances/OrcsMemory.txt index 28cc9bbd5..1aaf2fd42 100644 --- a/npc/instances/OrcsMemory.txt +++ b/npc/instances/OrcsMemory.txt @@ -38,132 +38,136 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 2_MONEMUS,{ .@party_id = getcharid(CHAR_ID_PARTY); .@p_name$ = getpartyname(.@party_id); - .@md_name$ = "Orc's Memory"; + .@md_name$ = _("Orc's Memory"); - if (!instance_check_party(.@party_id,2,30,80)) { - mes "Only users between Levels ^ff000030 ~ 80^000000 can enter this Dungeon."; - close; + if (!instance_check_party(.@party_id, 2, 30, 80)) { + mes("Only users between Levels ^ff000030 ~ 80^000000 can enter this Dungeon."); + close(); } - .@orctime = questprogress(12059,PLAYTIME); + .@orctime = questprogress(12059, PLAYTIME); if (.@orctime == 2) { - mes "^0000ffAll records and after-effects related to the Orc's Memory Dungeon are deleted. You can now regenerate or re-enter the dungeon.^000000"; - erasequest 12059; - close; + mes("^0000ffAll records and after-effects related to the Orc's Memory Dungeon are deleted. You can now regenerate or re-enter the dungeon.^000000"); + erasequest(12059); + close(); } if (.@orctime == 1) { - mes "You can enter the Dungeon if it has been generated."; - next; - if(select("Enter the Dungeon "+.@md_name$, "Cancel") == 2) - close; + mes("You can enter the Dungeon if it has been generated."); + next(); + .@str$ = sprintf(_$("Enter the Dungeon %s"), .@md_name$); + if (select(.@str$, "Cancel") == 2) + close(); // Fall through to access the dungeon } else { // !.@orctime - if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2)) { - mes "Party status confirmed. Would you like to book entrance to the "+.@md_name$+"?"; - next; - switch(select("Reserve the "+.@md_name$, "Enter the Dungeon", "Cancel")) { + if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id, 2)) { + mesf("Party status confirmed. Would you like to book entrance to the %s?", .@md_name$); + next(); + .@str$ = sprintf(_$("Reserve the %s"), .@md_name$); + switch (select(.@str$, "Enter the Dungeon", "Cancel")) { case 1: - .@instance = instance_create(.@md_name$,.@party_id); + .@instance = instance_create(.@md_name$, .@party_id); if (.@instance < 0) { - mes "Party Name: "+.@p_name$; - mes "Party Leader: "+strcharinfo(PC_NAME); - mes "^0000ff"+.@md_name$+" ^000000 - Reservation Failed."; - close; + mesf("Party Name: %s", .@p_name$); + mesf("Party Leader: %s", strcharinfo(PC_NAME)); + mesf("^0000ff%s ^000000 - Reservation Failed.", .@md_name$); + close(); } - mes "^0000ff"+.@md_name$+"^000000- Attempting to book an entrance"; + mesf("^0000ff%s^000000- Attempting to book an entrance", .@md_name$); for (.@i = 1; .@i <= 2; ++.@i) { - if( instance_attachmap(.@i + "@orcs", .@instance) == "" ) + if (instance_attachmap(.@i + "@orcs", .@instance) == "") break; } - if( .@i < 2 ) { + if (.@i < 2) { instance_destroy(.@instance); - close; + close(); } - instance_set_timeout 7200,300,.@instance; + instance_set_timeout(7200, 300, .@instance); instance_init(.@instance); - mes "After making a reservation, you have to select 'Enter the Dungeon' from the menu if you wish to enter the "+.@md_name$+"."; - close; + mesf("After making a reservation, you have to select 'Enter the Dungeon' from the menu if you wish to enter the %s.", .@md_name$); + close(); case 2: break; // Fall through to access the dungeon (after the else) case 3: - close; + close(); } - } else if (select(.@md_name$ + " Enter the Memorial Dungeon", "Cancel") == 2) + } else if (select(sprintf(_$("%s Enter the Memorial Dungeon"), .@md_name$), "Cancel") == 2) { end; + } // Else access the dungeon } // Dungeon access if (has_instance("1@orcs") == "") { - mes "Memorial Dungeon "+.@md_name$+" does not exist."; - mes "The party leader has not reserved entrance to the dungeon yet."; - next; - mes "Once the reservation is complete, the dungeon will be generated."; - mes "If your dungeon has been destroyed you must wait 7 days before re-entering."; - close; + mesf("Memorial Dungeon %s does not exist.", .@md_name$); + mes("The party leader has not reserved entrance to the dungeon yet."); + next(); + mes("Once the reservation is complete, the dungeon will be generated."); + mes("If your dungeon has been destroyed you must wait 7 days before re-entering."); + close(); } - mapannounce "gef_fild10", strcharinfo(PC_NAME) + " of the party, " + .@p_name$ + " is entering the "+.@md_name$+".",bc_map,"0x00ff99"; - if (!questprogress(12059)) setquest 12059; - warp "1@orcs",179,15; + mapannounce("gef_fild10", sprintf(_$("%s of the party, %s is entering the %s."), strcharinfo(PC_NAME), .@p_name$, .@md_name$), bc_map, C_SPRINGGREEN); + if (!questprogress(12059)) + setquest(12059); + warp("1@orcs", 179, 15); end; } gef_fild10,238,202,6 script Mad Scientist#orc 4_LGTSCIENCE,{ if (BaseLevel < 50) { - mes "The Mad Scientist doesn't seem to notice you and keeps mumbling to himself..."; - close; + mes("The Mad Scientist doesn't seem to notice you and keeps mumbling to himself..."); + close(); } if (mad == 0) { - mes "[Mad Scientist]"; - mes "Haha, no Orcs are coming near me!"; - mes "The power of the Dimensional Gorge is undefeatable!!"; - next; - switch(select("Orcs don't attack you?", "You wish!")) { + mes("[Mad Scientist]"); + mes("Haha, no Orcs are coming near me!"); + mes("The power of the Dimensional Gorge is undefeatable!!"); + next(); + switch (select("Orcs don't attack you?", "You wish!")) { case 1: - mes "[Mad Scientist]"; - mes "Yeah, yeah.. I know it's hard to belive. I don't blame ya."; - mes "I used to study the Dimensional Gorge discovered near Morroc."; - mes "According to my research, the minerals found there have enormous power inside them!"; - next; + mes("[Mad Scientist]"); + mes("Yeah, yeah.. I know it's hard to belive. I don't blame ya."); + mes("I used to study the Dimensional Gorge discovered near Morroc."); + mes("According to my research, the minerals found there have enormous power inside them!"); + next(); break; case 2: - mes "[Mad Scientist]"; - mes "You are a pretty distrustful person, huh?"; - next; + mes("[Mad Scientist]"); + mes("You are a pretty distrustful person, huh?"); + next(); break; } select("Oh? Like what, travel to alternate space?"); - mes "[Mad Scientist]"; - mes "Very smart! I have actually just done that! See that statue over there? It's not your normal Monolith!"; - next; - mes "[Mad Scientist]"; - mes "I have created it with a combination of our technology and the unlimited energy I discovered from the Gorge! Want to try it?"; - next; + mes("[Mad Scientist]"); + mes("Very smart! I have actually just done that! See that statue over there? It's not your normal Monolith!"); + next(); + mes("[Mad Scientist]"); + mes("I have created it with a combination of our technology and the unlimited energy I discovered from the Gorge! Want to try it?"); + next(); select("...Um, that doesn't sound legal?"); - mes "[Mad Scientist]"; - mes "Hey, since when did something so interesting have to be legal!? How about it! You can talk to the Orcs! C'mon!"; - next; - mes "[Mad Scientist]"; - mes "Chances are they'll just give you lots of instructions once they see you, so just wing it! They're always saying the same thing, to the point where I memorized them!"; - next; - switch(select("Alright... What do I do?", "Umm, maybe not.")) { + mes("[Mad Scientist]"); + mes("Hey, since when did something so interesting have to be legal!? How about it! You can talk to the Orcs! C'mon!"); + next(); + mes("[Mad Scientist]"); + mes("Chances are they'll just give you lots of instructions once they see you, so just wing it! They're always saying the same thing, to the point where I memorized them!"); + next(); + switch (select("Alright... What do I do?", "Umm, maybe not.")) { case 1: - mes "[Mad Scientist]"; - mes "Very good! Just sit in the hands of this statue! And try to act natural when you're in there!"; + mes("[Mad Scientist]"); + mes("Very good! Just sit in the hands of this statue! And try to act natural when you're in there!"); mad = 1; - close; + close(); case 2: - mes "[Mad Scientist]"; - mes "Oh fine, be that way!"; - close; + mes("[Mad Scientist]"); + mes("Oh fine, be that way!"); + close(); } } else if (mad == 1) { - mes "[Mad Scientist]"; - mes "Hmm? Put your hand on that Monemus Statue if you want to experience traveling through dimensions!"; - close; + mes("[Mad Scientist]"); + mes("Hmm? Put your hand on that Monemus Statue if you want to experience traveling through dimensions!"); + close(); } else { mad = 1; end; @@ -175,60 +179,53 @@ gef_fild10,238,202,6 script Mad Scientist#orc 4_LGTSCIENCE,{ end; OnInstanceInit: - disablenpc instance_npcname("#Resurrect Monsters1"); + disablenpc(instance_npcname("#Resurrect Monsters1")); end; OnDisable: - stopnpctimer; - killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"; + stopnpctimer(); + killmonster(instance_mapname("1@orcs"), instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"); end; OnEnable: - enablenpc instance_npcname("#Resurrect Monsters1"); - monster instance_mapname("1@orcs"),0,0,"Orc Warrior",1023,30,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"; + enablenpc(instance_npcname("#Resurrect Monsters1")); + monster(instance_mapname("1@orcs"), 0, 0, _("Orc Warrior"), ORK_WARRIOR, 30, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"); end; OnMyMobDead: .@map$ = instance_mapname("1@orcs"); - .@mob_dead_num = 30 - mobcount(.@map$,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"); + .@mob_dead_num = 30 - mobcount(.@map$, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"); if (.@mob_dead_num > 0) { - .@mob_ran = rand(1,30); + .@mob_ran = rand(1, 30); if (.@mob_ran > 29) { - monster .@map$,0,0,"Orc Warrior",1023,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"; - } - else if ((.@mob_ran > 28) && (.@mob_ran < 30)) { - monster .@map$,0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"; - if (rand(1,10) == 9) { - mapannounce .@map$, "High Orc: We need more defenses! Get more people here!",bc_map,"0xff4444"; - } - } - else if ((.@mob_ran > 26) && (.@mob_ran < 29)) { - areamonster .@map$,41,91,51,81,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"; - if (rand(1,10) == 9) { - mapannounce .@map$, "Where are the High Orcs!? Get them to stop the enemies!",bc_map,"0xff4444"; - } - } - else { - areamonster .@map$,17,187,27,177,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"; - if (rand(1,5) == 3) { - mapannounce .@map$, "Caution: The army's starting to concentrate at Zone No. 4.",bc_map,"0x77ff77"; - } - if (rand(1,100) == 50) { - initnpctimer; - } + monster(.@map$, 0, 0, _("Orc Warrior"), ORK_WARRIOR, .@mob_dead_num, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"); + } else if (.@mob_ran > 28 && .@mob_ran < 30) { + monster(.@map$, 0, 0, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"); + if (rand(1, 10) == 9) + mapannounce(.@map$, _("High Orc: We need more defenses! Get more people here!"), bc_map, "0xff4444"); + } else if (.@mob_ran > 26 && .@mob_ran < 29) { + areamonster(.@map$, 41, 91, 51, 81, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"); + if (rand(1, 10) == 9) + mapannounce(.@map$, _("Where are the High Orcs!? Get them to stop the enemies!"), bc_map, "0xff4444"); + } else { + areamonster(.@map$, 17, 187, 27, 177, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"); + if (rand(1, 5) == 3) + mapannounce(.@map$, _("Caution: The army's starting to concentrate at Zone No. 4."), bc_map, "0x77ff77"); + if (rand(1, 100) == 50) + initnpctimer(); } } end; OnTimer10: - mapannounce instance_mapname("1@orcs"), "Shouts of the Chief Orc of Safeguards: Looks like this will take longer than expected. Summon the Stalactic Golems!",bc_map,"0xff4444"; + mapannounce(instance_mapname("1@orcs"), _("Shouts of the Chief Orc of Safeguards: Looks like this will take longer than expected. Summon the Stalactic Golems!"), bc_map, "0xff4444"); end; OnTimer4010: .@map$ = instance_mapname("1@orcs"); - mapannounce .@map$, "Stalactic Golems are digging out of the deep underground.",bc_map,"0x77ff77"; - areamonster .@map$,17,187,27,177,"Stalactic Golem",1278,20,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"; - stopnpctimer; + mapannounce(.@map$, _("Stalactic Golems are digging out of the deep underground."), bc_map, "0x77ff77"); + areamonster(.@map$, 17, 187, 27, 177, _("Stalactic Golem"), STALACTIC_GOLEM, 20, instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead"); + stopnpctimer(); end; } @@ -236,30 +233,27 @@ OnTimer4010: end; OnInstanceInit: - disablenpc instance_npcname("#Resurrect Monsters2"); + disablenpc(instance_npcname("#Resurrect Monsters2")); end; OnDisable: - killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"; + killmonster(instance_mapname("1@orcs"), instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"); end; OnEnable: - enablenpc instance_npcname("#Resurrect Monsters2"); - monster instance_mapname("1@orcs"),0,0,"Trained Wolf",1106,15,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"; + enablenpc(instance_npcname("#Resurrect Monsters2")); + monster(instance_mapname("1@orcs"), 0, 0, _("Trained Wolf"), DESERT_WOLF, 15, instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"); end; OnMyMobDead: .@map$ = instance_mapname("1@orcs"); - .@mob_dead_num = 15 - mobcount(.@map$,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"); - if (rand(1,30) > 15) { - if (.@mob_dead_num > 0) { - monster .@map$,0,0,"Trained Wolf",1106,.@mob_dead_num,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"; - } - } - else { - if (.@mob_dead_num > 0) { - areamonster .@map$,17,187,27,177,"Trained Wolf",1106,.@mob_dead_num,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"; - } + .@mob_dead_num = 15 - mobcount(.@map$, instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"); + if (rand(1, 30) > 15) { + if (.@mob_dead_num > 0) + monster(.@map$, 0, 0, _("Trained Wolf"), DESERT_WOLF, .@mob_dead_num, instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"); + } else { + if (.@mob_dead_num > 0) + areamonster(.@map$, 17, 187, 27, 177, _("Trained Wolf"), DESERT_WOLF, .@mob_dead_num, instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead"); } end; } @@ -268,39 +262,34 @@ OnMyMobDead: end; OnInstanceInit: - disablenpc instance_npcname("#Resurrect Monsters3"); + disablenpc(instance_npcname("#Resurrect Monsters3")); end; OnDisable: - killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"; + killmonster(instance_mapname("1@orcs"), instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"); end; OnEnable: - enablenpc instance_npcname("#Resurrect Monsters3"); - monster instance_mapname("1@orcs"),0,0,"Orc Archer",1189,15,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"; + enablenpc(instance_npcname("#Resurrect Monsters3")); + monster(instance_mapname("1@orcs"), 0, 0, _("Orc Archer"), ORC_ARCHER, 15, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"); end; OnMyMobDead: .@map$ = instance_mapname("1@orcs"); - .@mob_dead_num = 15 - mobcount(.@map$,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"); - .@mob_ran = rand(1,30); + .@mob_dead_num = 15 - mobcount(.@map$, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"); + .@mob_ran = rand(1, 30); if (.@mob_ran > 29) { + if (.@mob_dead_num > 0) + monster(.@map$, 0, 0, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"); + } else if (.@mob_ran > 26 && .@mob_ran < 30) { if (.@mob_dead_num > 0) { - monster .@map$,0,0,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"; - } - } - else if ((.@mob_ran > 26) && (.@mob_ran < 30)) { - if (.@mob_dead_num > 0) { - areamonster .@map$,43,155,47,159,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"; - if (rand(1,3) == 3) { - mapannounce .@map$, "High Orc: Attack them from behind! Cut off their support!",bc_map,"0xff4444"; - } - } - } - else { - if (.@mob_dead_num > 0) { - areamonster .@map$,17,187,27,177,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"; + areamonster(.@map$, 43, 155, 47, 159, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"); + if (rand(1, 3) == 3) + mapannounce(.@map$, _("High Orc: Attack them from behind! Cut off their support!"), bc_map, "0xff4444"); } + } else { + if (.@mob_dead_num > 0) + areamonster(.@map$, 17, 187, 27, 177, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead"); } end; } @@ -309,25 +298,24 @@ OnMyMobDead: end; OnInstanceInit: - enablenpc instance_npcname("#Resurrect Monsters4"); - areamonster instance_mapname("1@orcs"),98,35,178,115,"Anopheles",1627,10,instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead"; + enablenpc(instance_npcname("#Resurrect Monsters4")); + areamonster(instance_mapname("1@orcs"), 98, 35, 178, 115, _("Anopheles"), ANOPHELES, 10, instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead"); end; OnMyMobDead: .@map$ = instance_mapname("1@orcs"); - .@mob_dead_num = 10 - mobcount(.@map$,instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead"); - if (.@mob_dead_num > 0) { - monster .@map$,0,0,"Anopheles",1627,.@mob_dead_num,instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead"; - } + .@mob_dead_num = 10 - mobcount(.@map$, instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead"); + if (.@mob_dead_num > 0) + monster(.@map$, 0, 0, _("Anopheles"), ANOPHELES, .@mob_dead_num, instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead"); end; OnDisable: - killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead"; + killmonster(instance_mapname("1@orcs"), instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead"); end; } 1@orcs,180,29,4 script Kruger#1-1 4_ORCWARRIOR,{ - donpcevent instance_npcname("Kruger#1-2")+"::OnEnable"; + donpcevent(instance_npcname("Kruger#1-2")+"::OnEnable"); end; } @@ -335,164 +323,164 @@ OnDisable: end; OnInstanceInit: - disablenpc instance_npcname("Kruger#1-2"); + disablenpc(instance_npcname("Kruger#1-2")); end; OnEnable: - disablenpc instance_npcname("Kruger#1-1"); - enablenpc instance_npcname("Kruger#1-2"); - initnpctimer; + disablenpc(instance_npcname("Kruger#1-1")); + enablenpc(instance_npcname("Kruger#1-2")); + initnpctimer(); end; OnTimer10: - mapannounce instance_mapname("1@orcs"), "Kruger: Damn... What took you so long!! I don't have all day!!",bc_map,"0xffff00"; + mapannounce(instance_mapname("1@orcs"), _("Kruger: Damn... What took you so long!! I don't have all day!!"), bc_map, C_YELLOW); end; OnTimer5710: - mapannounce instance_mapname("1@orcs"), "Kruger: My plan was to let our comrades open the gate, but it's all ruined since I got busted by the Orc Shaman.",bc_map,"0xffff00"; + mapannounce(instance_mapname("1@orcs"), _("Kruger: My plan was to let our comrades open the gate, but it's all ruined since I got busted by the Orc Shaman."), bc_map, C_YELLOW); end; OnTimer14610: - mapannounce instance_mapname("1@orcs"), "Shouts of the Chief Orc of Safeguards: I smell a rat.. Send some patrols to the entrance!!",bc_map,"0xff4444"; + mapannounce(instance_mapname("1@orcs"), _("Shouts of the Chief Orc of Safeguards: I smell a rat.. Send some patrols to the entrance!!"), bc_map, "0xff4444"); end; OnTimer20210: - mapannounce instance_mapname("1@orcs"), "Kruger: Darn it.. They'll be here any minute. Ok. Listen to me now.",bc_map,"0xffff00"; + mapannounce(instance_mapname("1@orcs"), _("Kruger: Darn it.. They'll be here any minute. Ok. Listen to me now."), bc_map, C_YELLOW); end; OnTimer24910: - mapannounce instance_mapname("1@orcs"), "Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the power to unseal the next zone.",bc_map,"0xffff00"; + mapannounce(instance_mapname("1@orcs"), _("Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the power to unseal the next zone."), bc_map, C_YELLOW); end; OnTimer34310: - mapannounce instance_mapname("1@orcs"), "Kruger: Find those Enchanted Orcs and get rid of them to move to the next zone.",bc_map,"0xffff00"; + mapannounce(instance_mapname("1@orcs"), _("Kruger: Find those Enchanted Orcs and get rid of them to move to the next zone."), bc_map, C_YELLOW); end; OnTimer39710: - mapannounce instance_mapname("1@orcs"), "Kruger: Try to avoid encountering Orcs other then the Enchanted ones. Everytime you kill a normal Orc, High Orcs will gather at the last path to the 2nd floor.",bc_map,"0xffff00"; + mapannounce(instance_mapname("1@orcs"), _("Kruger: Try to avoid encountering Orcs other then the Enchanted ones. Everytime you kill a normal Orc, High Orcs will gather at the last path to the 2nd floor."), bc_map, C_YELLOW); end; OnTimer49210: - mapannounce instance_mapname("1@orcs"), "Kruger: In the worst case, the path to the 2nd floor could be completely blocked. For your own sake, you should be as sneaky as possible.",bc_map,"0xffff00"; + mapannounce(instance_mapname("1@orcs"), _("Kruger: In the worst case, the path to the 2nd floor could be completely blocked. For your own sake, you should be as sneaky as possible."), bc_map, C_YELLOW); end; OnTimer56310: - mapannounce instance_mapname("1@orcs"), "Mission: Sneak in and get rid of the 'Enchanted Orcs'. Avoiding battles with other Orcs is the best way of getting into the 2nd floor.",bc_map,"0x44ffff"; - donpcevent instance_npcname("#Resurrect Monsters1")+"::OnEnable"; - donpcevent instance_npcname("#Resurrect Monsters2")+"::OnEnable"; - donpcevent instance_npcname("#Resurrect Monsters3")+"::OnEnable"; - disablenpc instance_npcname("Kruger#1-2"); + mapannounce(instance_mapname("1@orcs"), _("Mission: Sneak in and get rid of the 'Enchanted Orcs'. Avoiding battles with other Orcs is the best way of getting into the 2nd floor."), bc_map, "0x44ffff"); + donpcevent(instance_npcname("#Resurrect Monsters1")+"::OnEnable"); + donpcevent(instance_npcname("#Resurrect Monsters2")+"::OnEnable"); + donpcevent(instance_npcname("#Resurrect Monsters3")+"::OnEnable"); + disablenpc(instance_npcname("Kruger#1-2")); end; OnTimer60000: - areamonster instance_mapname("1@orcs"),137,83,143,89,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead"; - stopnpctimer; + areamonster(instance_mapname("1@orcs"), 137, 83, 143, 89, _("Enchanted Orc"), ORK_WARRIOR, 1, instance_npcname("B1 Area Mobs")+"::OnMyMobDead"); + stopnpctimer(); end; } 1@orcs,168,125,0 script B1 Area 1 WARPNPC,3,3,{ OnInstanceInit: - disablenpc instance_npcname("B1 Area 1"); + disablenpc(instance_npcname("B1 Area 1")); end; OnEnable: - enablenpc instance_npcname("B1 Area 1"); - areamonster instance_mapname("1@orcs"),103,105,109,111,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead1"; + enablenpc(instance_npcname("B1 Area 1")); + areamonster(instance_mapname("1@orcs"), 103, 105, 109, 111, _("Enchanted Orc"), ORK_WARRIOR, 1, instance_npcname("B1 Area Mobs")+"::OnMyMobDead1"); end; OnTouch: - warp instance_mapname("1@orcs"),168,130; + warp(instance_mapname("1@orcs"), 168, 130); end; OnContinue: - donpcevent instance_npcname("B1 Area 2")+"::OnEnable"; - initnpctimer; + donpcevent(instance_npcname("B1 Area 2")+"::OnEnable"); + initnpctimer(); end; OnTimer10300: - mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shaman started to control them with her magic.",bc_map,"0xff4499"; + mapannounce(instance_mapname("1@orcs"), _("Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shaman started to control them with her magic."), bc_map, "0xff4499"); end; OnTimer18700: - mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: There's nothing we can do but to defeat the Orc Shaman if we want to save the remaining tribes.",bc_map,"0xff4499"; - stopnpctimer; + mapannounce(instance_mapname("1@orcs"), _("Kruger's Whisper: There's nothing we can do but to defeat the Orc Shaman if we want to save the remaining tribes."), bc_map, "0xff4499"); + stopnpctimer(); end; } 1@orcs,89,94,0 script B1 Area 2 WARPNPC,3,3,{ OnInstanceInit: - disablenpc instance_npcname("B1 Area 2"); + disablenpc(instance_npcname("B1 Area 2")); end; OnEnable: - enablenpc instance_npcname("B1 Area 2"); - areamonster instance_mapname("1@orcs"),32,40,38,46,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead2"; + enablenpc(instance_npcname("B1 Area 2")); + areamonster(instance_mapname("1@orcs"), 32, 40, 38, 46, _("Enchanted Orc"), ORK_WARRIOR, 1, instance_npcname("B1 Area Mobs")+"::OnMyMobDead2"); end; OnTouch: - warp instance_mapname("1@orcs"),85,85; + warp(instance_mapname("1@orcs"), 85, 85); end; OnContinue: - donpcevent instance_npcname("B1 Area 3")+"::OnEnable"; - initnpctimer; + donpcevent(instance_npcname("B1 Area 3")+"::OnEnable"); + initnpctimer(); end; OnTimer30300: - mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman used those Orcs for her rituals.",bc_map,"0xff4499"; + mapannounce(instance_mapname("1@orcs"), _("Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman used those Orcs for her rituals."), bc_map, "0xff4499"); end; OnTimer37600: - mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: ... It all has to do with me. I am responsible for this evil.",bc_map,"0xff4499"; - stopnpctimer; + mapannounce(instance_mapname("1@orcs"), _("Kruger's Whisper: ... It all has to do with me. I am responsible for this evil."), bc_map, "0xff4499"); + stopnpctimer(); end; } 1@orcs,38,105,0 script B1 Area 3 WARPNPC,3,3,{ OnInstanceInit: - disablenpc instance_npcname("B1 Area 3"); + disablenpc(instance_npcname("B1 Area 3")); end; OnEnable: - enablenpc instance_npcname("B1 Area 3"); - areamonster instance_mapname("1@orcs"),19,177,25,183,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead3"; + enablenpc(instance_npcname("B1 Area 3")); + areamonster(instance_mapname("1@orcs"), 19, 177, 25, 183, _("Enchanted Orc"), ORK_WARRIOR, 1, instance_npcname("B1 Area Mobs")+"::OnMyMobDead3"); end; OnTouch: - warp instance_mapname("1@orcs"),38,110; + warp(instance_mapname("1@orcs"), 38, 110); end; OnContinue: - donpcevent instance_npcname("B1 Area 4")+"::OnEnable"; - initnpctimer; + donpcevent(instance_npcname("B1 Area 4")+"::OnEnable"); + initnpctimer(); end; OnTimer30300: - mapannounce instance_mapname("1@orcs"), "Please, hang in there!",bc_map,"0xff4499"; + mapannounce(instance_mapname("1@orcs"), _("Please, hang in there!"), bc_map, "0xff4499"); end; OnTimer32700: - mapannounce instance_mapname("1@orcs"), "We'll get some rest when we get to the 2nd basement after passing through here.",bc_map,"0xff4499"; - stopnpctimer; + mapannounce(instance_mapname("1@orcs"), _("We'll get some rest when we get to the 2nd basement after passing through here."), bc_map, "0xff4499"); + stopnpctimer(); end; } 1@orcs,21,189,0 script B1 Area 4 WARPNPC,3,3,{ OnInstanceInit: - disablenpc instance_npcname("B1 Area 4"); + disablenpc(instance_npcname("B1 Area 4")); end; OnEnable: - enablenpc instance_npcname("B1 Area 4"); - donpcevent instance_npcname("#Resurrect Monsters1")+"::OnDisable"; - donpcevent instance_npcname("#Resurrect Monsters2")+"::OnDisable"; - donpcevent instance_npcname("#Resurrect Monsters3")+"::OnDisable"; - donpcevent instance_npcname("#Resurrect Monsters4")+"::OnDisable"; + enablenpc(instance_npcname("B1 Area 4")); + donpcevent(instance_npcname("#Resurrect Monsters1")+"::OnDisable"); + donpcevent(instance_npcname("#Resurrect Monsters2")+"::OnDisable"); + donpcevent(instance_npcname("#Resurrect Monsters3")+"::OnDisable"); + donpcevent(instance_npcname("#Resurrect Monsters4")+"::OnDisable"); end; OnTouch: - warp instance_mapname("2@orcs"),32,171; + warp(instance_mapname("2@orcs"), 32, 171); end; } @@ -500,19 +488,19 @@ OnTouch: end; OnMyMobDead: - donpcevent instance_npcname("B1 Area 1")+"::OnEnable"; + donpcevent(instance_npcname("B1 Area 1")+"::OnEnable"); end; OnMyMobDead1: - donpcevent instance_npcname("B1 Area 1")+"::OnContinue"; + donpcevent(instance_npcname("B1 Area 1")+"::OnContinue"); end; OnMyMobDead2: - donpcevent instance_npcname("B1 Area 2")+"::OnContinue"; + donpcevent(instance_npcname("B1 Area 2")+"::OnContinue"); end; OnMyMobDead3: - donpcevent instance_npcname("B1 Area 3")+"::OnContinue"; + donpcevent(instance_npcname("B1 Area 3")+"::OnContinue"); end; } @@ -521,57 +509,51 @@ OnMyMobDead3: end; OnInstanceInit: - disablenpc instance_npcname("#2Resurrect Monsters1"); + disablenpc(instance_npcname("#2Resurrect Monsters1")); end; OnEnable: - enablenpc instance_npcname("#2Resurrect Monsters1"); - monster instance_mapname("2@orcs"),0,0,"Vengeful Orc",1152,30,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"; + enablenpc(instance_npcname("#2Resurrect Monsters1")); + monster(instance_mapname("2@orcs"), 0, 0, _("Vengeful Orc"), ORC_SKELETON, 30, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"); end; OnDisable: - stopnpctimer; - killmonster instance_mapname("2@orcs"),instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"; + stopnpctimer(); + killmonster(instance_mapname("2@orcs"), instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"); end; OnMyMobDead: .@map$ = instance_mapname("2@orcs"); - .@mob_dead_num = 30 - mobcount(.@map$,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"); + .@mob_dead_num = 30 - mobcount(.@map$, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"); if (.@mob_dead_num > 0) { - .@mob_ran = rand(1,30); + .@mob_ran = rand(1, 30); if (.@mob_ran > 29) { - monster .@map$,0,0,"Vengeful Orc",1152,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"; - } - else if ((.@mob_ran > 28) && (.@mob_ran < 30)) { - monster .@map$,0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"; - } - else if ((.@mob_ran > 26) && (.@mob_ran < 29)) { - areamonster .@map$,157,112,167,122,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"; - if (rand(1,10) == 9) { - mapannounce .@map$, "Warning: High Orcs are gathering near area 3.",bc_map,"0xff4444"; - } - } - else { - areamonster .@map$,173,13,183,23,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"; - if (rand(1,5) == 3) { - mapannounce .@map$, "Caution: The Forces have started to concentrate at the Shaman's Altar.",bc_map,"0x77ff77"; - } - if (rand(1,70) == 50) { - initnpctimer; - } + monster(.@map$, 0, 0, _("Vengeful Orc"), ORC_SKELETON, .@mob_dead_num, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"); + } else if (.@mob_ran > 28 && .@mob_ran < 30) { + monster(.@map$, 0, 0, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"); + } else if (.@mob_ran > 26 && .@mob_ran < 29) { + areamonster(.@map$, 157, 112, 167, 122, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"); + if (rand(1, 10) == 9) + mapannounce(.@map$, _("Warning: High Orcs are gathering near area 3."), bc_map, "0xff4444"); + } else { + areamonster(.@map$, 173, 13, 183, 23, _("High Orc"), HIGH_ORC, .@mob_dead_num, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"); + if (rand(1, 5) == 3) + mapannounce(.@map$, _("Caution: The Forces have started to concentrate at the Shaman's Altar."), bc_map, "0x77ff77"); + if (rand(1, 70) == 50) + initnpctimer(); } } end; OnTimer10: - mapannounce instance_mapname("2@orcs"), "Voice from somewhere: Foolish... Do you really think the altar would fall like that?",bc_map,"0xff4444"; + mapannounce(instance_mapname("2@orcs"), _("Voice from somewhere: Foolish... Do you really think the altar would fall like that?"), bc_map, "0xff4444"); end; OnTimer4010: .@map$ = instance_mapname("2@orcs"); - mapannounce .@map$, "[ Wraiths were summoned by an unknown power ]",bc_map,"0x77ff77"; - areamonster .@map$,167,25,177,35,"Wraith",1475,30,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"; - stopnpctimer; + mapannounce(.@map$, _("[ Wraiths were summoned by an unknown power ]"), bc_map, "0x77ff77"); + areamonster(.@map$, 167, 25, 177, 35, _("Wraith"), G_WRAITH, 30, instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead"); + stopnpctimer(); end; } @@ -579,40 +561,36 @@ OnTimer4010: end; OnInstanceInit: - disablenpc instance_npcname("#2Resurrect Monsters3"); + disablenpc(instance_npcname("#2Resurrect Monsters3")); end; OnEnable: - enablenpc instance_npcname("#2Resurrect Monsters3"); - monster instance_mapname("2@orcs"),0,0,"Orc Zombie",1153,15,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"; + enablenpc(instance_npcname("#2Resurrect Monsters3")); + monster(instance_mapname("2@orcs"), 0, 0, _("Orc Zombie"), ORC_ZOMBIE, 15, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"); end; OnMyMobDead: .@map$ = instance_mapname("2@orcs"); - .@mob_dead_num = 15 - mobcount(.@map$,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"); - .@mob_ran = rand(1,30); + .@mob_dead_num = 15 - mobcount(.@map$, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"); + .@mob_ran = rand(1, 30); if (.@mob_ran > 29) { if (.@mob_dead_num > 0) { - monster .@map$,0,0,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"; + monster(.@map$, 0, 0, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"); } - } - else if ((.@mob_ran > 6) && (.@mob_ran < 30)) { - if (.@mob_dead_num > 0) { - areamonster .@map$,168,10,184,26,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"; - if (rand(1,15) == 3) { - mapannounce .@map$, "Warning: Orc Archer teams are gathering near the altar.",bc_map,"0xff4444"; - } - } - } - else { + } else if (.@mob_ran > 6 && .@mob_ran < 30) { if (.@mob_dead_num > 0) { - areamonster .@map$,168,21,184,21,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"; + areamonster(.@map$, 168, 10, 184, 26, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"); + if (rand(1, 15) == 3) + mapannounce(.@map$, _("Warning: Orc Archer teams are gathering near the altar."), bc_map, "0xff4444"); } + } else { + if (.@mob_dead_num > 0) + areamonster(.@map$, 168, 21, 184, 21, _("Orc Archer"), ORC_ARCHER, .@mob_dead_num, instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"); } end; OnDisable: - killmonster instance_mapname("2@orcs"),instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"; + killmonster(instance_mapname("2@orcs"), instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead"); end; } @@ -620,21 +598,20 @@ OnDisable: end; OnInstanceInit: - enablenpc instance_npcname("#2Resurrect Monsters4"); - monster instance_mapname("2@orcs"),0,0,"Anopheles",1627,10,instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead"; + enablenpc(instance_npcname("#2Resurrect Monsters4")); + monster(instance_mapname("2@orcs"), 0, 0, _("Anopheles"), ANOPHELES, 10, instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead"); end; OnMyMobDead: .@map$ = instance_mapname("2@orcs"); - .@mob_dead_num = 10 - mobcount(.@map$,instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead"); - if (.@mob_dead_num > 0) { - monster .@map$,0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead"; - } + .@mob_dead_num = 10 - mobcount(.@map$, instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead"); + if (.@mob_dead_num > 0) + monster(.@map$, 0, 0, _("Anopheles"), ANOPHELES, 1, instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead"); end; } 2@orcs,35,169,4 script Kruger#2-1 4_ORCWARRIOR,{ - donpcevent instance_npcname("Kruger#2-2")+"::OnEnable"; + donpcevent(instance_npcname("Kruger#2-2")+"::OnEnable"); end; } @@ -642,72 +619,73 @@ OnMyMobDead: end; OnInstanceInit: - disablenpc instance_npcname("Kruger#2-2"); + disablenpc(instance_npcname("Kruger#2-2")); end; OnEnable: - disablenpc instance_npcname("Kruger#2-1"); - enablenpc instance_npcname("Kruger#2-2"); - initnpctimer; + disablenpc(instance_npcname("Kruger#2-1")); + enablenpc(instance_npcname("Kruger#2-2")); + initnpctimer(); end; OnTimer10: - mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: I'll tell you how to get to the Shaman's altar.",bc_map,"0xffff00"; + mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: I'll tell you how to get to the Shaman's altar."), bc_map, C_YELLOW); end; OnTimer3510: - mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: Do you see the braziers that light the path? Unseal the next zone by strengthening their flames.",bc_map,"0xffff00"; + mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: Do you see the braziers that light the path? Unseal the next zone by strengthening their flames."), bc_map, C_YELLOW); end; OnTimer10710: - mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: Of course those monsters won't let you touch the braziers that easily.",bc_map,"0xffff00"; + mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: Of course those monsters won't let you touch the braziers that easily."), bc_map, C_YELLOW); end; OnTimer16310: - mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: But still, try keep the battles not too noticable so the Shaman won't guard the altar with her army squad.",bc_map,"0xffff00"; + mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: But still, try keep the battles not too noticable so the Shaman won't guard the altar with her army squad."), bc_map, C_YELLOW); end; OnTimer21910: - mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: Only the Party Leader can strengthen the flames, so protect your leader.",bc_map,"0xffff00"; + mapannounce(instance_mapname("2@orcs"), _("Kruger's Whisper: Only the Party Leader can strengthen the flames, so protect your leader."), bc_map, C_YELLOW); end; OnTimer23910: - mapannounce instance_mapname("2@orcs"), "Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order, so be careful.",bc_map,"0x4444ff"; - donpcevent instance_npcname("#2Resurrect Monsters1")+"::OnEnable"; - donpcevent instance_npcname("#2Resurrect Monsters3")+"::OnEnable"; - donpcevent instance_npcname("Torch#1-1")+"::OnEnable"; - disablenpc instance_npcname("Kruger#2-2"); + mapannounce(instance_mapname("2@orcs"), _("Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order, so be careful."), bc_map, "0x4444ff"); + donpcevent(instance_npcname("#2Resurrect Monsters1")+"::OnEnable"); + donpcevent(instance_npcname("#2Resurrect Monsters3")+"::OnEnable"); + donpcevent(instance_npcname("Torch#1-1")+"::OnEnable"); + disablenpc(instance_npcname("Kruger#2-2")); end; } 2@orcs,26,164,0 script Torch#1-1 CLEAR_NPC,{ - if(getpartyleader(getcharid(CHAR_ID_PARTY),2) != getcharid(CHAR_ID_CHAR)) end; - progressbar "ffff00",5; - setarray .@id[0], atoi(charat(strnpcinfo(NPC_NAME_HIDDEN),0)), atoi(charat(strnpcinfo(NPC_NAME_HIDDEN),2)); + if (getpartyleader(getcharid(CHAR_ID_PARTY), 2) != getcharid(CHAR_ID_CHAR)) + end; + progressbar(sprintf("0x%x", C_YELLOW), 5); + setarray(.@id[0], atoi(charat(strnpcinfo(NPC_NAME_HIDDEN), 0)), atoi(charat(strnpcinfo(NPC_NAME_HIDDEN), 2))); if (.@id[1] == 4) - donpcevent instance_npcname("#Warp2-"+.@id[0])+"::OnEnable"; + donpcevent(instance_npcname("#Warp2-"+.@id[0])+"::OnEnable"); else - donpcevent instance_npcname("Torch#"+.@id[0]+"-"+(.@id[1]+1))+"::OnEnable"; - initnpctimer; - disablenpc instance_npcname(strnpcinfo(NPC_NAME)); + donpcevent(instance_npcname("Torch#"+.@id[0]+"-"+(.@id[1]+1))+"::OnEnable"); + initnpctimer(); + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); end; OnInstanceInit: if (strnpcinfo(NPC_NAME) != "Torch#2-1" && strnpcinfo(NPC_NAME) != "Torch#3-1") - disablenpc instance_npcname(strnpcinfo(NPC_NAME)); + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); end; OnEnable: - enablenpc instance_npcname(strnpcinfo(NPC_NAME)); + enablenpc(instance_npcname(strnpcinfo(NPC_NAME))); end; OnTimer100: - specialeffect EF_FIREPILLAR; + specialeffect(EF_FIREPILLAR); end; OnTimer2000: - specialeffect EF_FIREPILLARBOMB; - stopnpctimer; + specialeffect(EF_FIREPILLARBOMB); + stopnpctimer(); end; } 2@orcs,55,155,0 duplicate(Torch#1-1) Torch#1-2 CLEAR_NPC @@ -716,27 +694,27 @@ OnTimer2000: 2@orcs,48,100,0 script #Warp2-1 WARPNPC,3,3,{ OnInstanceInit: - disablenpc instance_npcname("#Warp2-1"); + disablenpc(instance_npcname("#Warp2-1")); end; OnEnable: .@map$ = instance_mapname("2@orcs"); - monster .@map$,109,156,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control")+"::OnMyMobDead1"; - mapannounce .@map$, "The Chief Orc of Safeguards: Oh!! Looks like I have company. Defeat me if you can!!",bc_map,"0xff8888"; + monster(.@map$, 109, 156, _("Safeguard Chief"), I_HIGH_ORC, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead1"); + mapannounce(.@map$, _("The Chief Orc of Safeguards: Oh!! Looks like I have company. Defeat me if you can!!"), bc_map, "0xff8888"); end; OnContinue: - enablenpc instance_npcname("#Warp2-1"); - initnpctimer; + enablenpc(instance_npcname("#Warp2-1")); + initnpctimer(); end; OnTimer10000: - areamonster instance_mapname("2@orcs"),28,158,40,170,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control")+"::OnMyMobDead1"; - stopnpctimer; + areamonster(instance_mapname("2@orcs"), 28, 158, 40, 170, _("Safeguard Chief"), I_HIGH_ORC, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead1"); + stopnpctimer(); end; OnTouch: - warp instance_mapname("2@orcs"),47,93; + warp(instance_mapname("2@orcs"), 47, 93); end; } @@ -747,27 +725,27 @@ OnTouch: 2@orcs,101,55,0 script #Warp2-2 WARPNPC,3,3,{ OnInstanceInit: - disablenpc instance_npcname("#Warp2-2"); + disablenpc(instance_npcname("#Warp2-2")); end; OnEnable: .@map$ = instance_mapname("2@orcs"); - monster .@map$,67,64,"Orc Sniper",1982,1,instance_npcname("#Mobs Control")+"::OnMyMobDead2"; - mapannounce .@map$, "Orc Sniper: Hah! Pretty impressive that you made it this far, but your foolish little trip ends here...",bc_map,"0xff8888"; + monster(.@map$, 67, 64, _("Orc Sniper"), I_ORC_ARCHER, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead2"); + mapannounce(.@map$, _("Orc Sniper: Hah! Pretty impressive that you made it this far, but your foolish little trip ends here..."), bc_map, "0xff8888"); end; OnContinue: - enablenpc instance_npcname("#Warp2-2"); - initnpctimer; + enablenpc(instance_npcname("#Warp2-2")); + initnpctimer(); end; OnTimer10000: - areamonster instance_mapname("2@orcs"),40,91,52,103,"Orc Sniper",1982,1,instance_npcname("#Mobs Control")+"::OnMyMobDead2"; - stopnpctimer; + areamonster(instance_mapname("2@orcs"), 40, 91, 52, 103, _("Orc Sniper"), I_ORC_ARCHER, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead2"); + stopnpctimer(); end; OnTouch: - warp instance_mapname("2@orcs"),107,55; + warp(instance_mapname("2@orcs"), 107, 55); end; } @@ -778,41 +756,41 @@ OnTouch: 2@orcs,167,104,0 script #Warp2-3 WARPNPC,3,3,{ OnInstanceInit: - disablenpc instance_npcname("#Warp2-3"); + disablenpc(instance_npcname("#Warp2-3")); end; OnEnable: .@map$ = instance_mapname("2@orcs"); - monster .@map$,152,147,"Depraved Orc Spirit",1983,1,instance_npcname("#Mobs Control")+"::OnMyMobDead3"; - mapannounce .@map$, "Depraved Orc Spirit: I smell flesh! Hungry! Wanna try some human meat!!",bc_map,"0xff8888"; + monster(.@map$, 152, 147, _("Depraved Orc Spirit"), I_ORC_SKELETON, 1, instance_npcname("#Mobs Control")+"::OnMyMobDead3"); + mapannounce(.@map$, _("Depraved Orc Spirit: I smell flesh! Hungry! Wanna try some human meat!!"), bc_map, "0xff8888"); end; OnContinue: - areamonster instance_mapname("2@orcs"),117,61,129,73,"Depraved Orc Spirit",1983,1; - donpcevent instance_npcname("#Boss Control")+"::OnEnable"; - enablenpc instance_npcname("#Warp2-3"); - initnpctimer; + areamonster(instance_mapname("2@orcs"), 117, 61, 129, 73, _("Depraved Orc Spirit"), I_ORC_SKELETON, 1); + donpcevent(instance_npcname("#Boss Control")+"::OnEnable"); + enablenpc(instance_npcname("#Warp2-3")); + initnpctimer(); end; OnTimer10: - mapannounce instance_mapname("2@orcs"), "Shaman Cargalache: Hahaha!! So, you finally made it here. The assassin you sent was just terrible. That stupid Orc is getting cold under my feet.",bc_map,"0xffff00"; + mapannounce(instance_mapname("2@orcs"), _("Shaman Cargalache: Hahaha!! So, you finally made it here. The assassin you sent was just terrible. That stupid Orc is getting cold under my feet."), bc_map, C_YELLOW); end; OnTimer6810: - mapannounce instance_mapname("2@orcs"), "Shaman Cargalache: My loyal slave, go get those intruders!",bc_map,"0xffff00"; + mapannounce(instance_mapname("2@orcs"), _("Shaman Cargalache: My loyal slave, go get those intruders!"), bc_map, C_YELLOW); end; OnTimer10310: - mapannounce instance_mapname("2@orcs"), "Depraved Orc Hero: Whatever you say, my lord.",bc_map,"0xff7777"; + mapannounce(instance_mapname("2@orcs"), _("Depraved Orc Hero: Whatever you say, my lord."), bc_map, "0xff7777"); end; OnTimer13110: - mapannounce instance_mapname("2@orcs"), "Caution: You have been discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger.",bc_map,"0x8888ff"; - stopnpctimer; + mapannounce(instance_mapname("2@orcs"), _("Caution: You have been discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger."), bc_map, "0x8888ff"); + stopnpctimer(); end; OnTouch: - warp instance_mapname("2@orcs"),167,95; + warp(instance_mapname("2@orcs"), 167, 95); end; } @@ -820,93 +798,87 @@ OnTouch: end; OnInstanceInit: - disablenpc instance_npcname("#Boss Control"); + disablenpc(instance_npcname("#Boss Control")); end; OnEnable: .@map$ = instance_mapname("2@orcs"); - monster .@map$,185,8,"Shaman Cargalache",1984,1,instance_npcname("#Boss Control")+"::OnMyMobDead"; - monster .@map$,179,15,"Depraved Orc Hero",1087,1; - enablenpc instance_npcname("#Boss Control"); + monster(.@map$, 185, 8, _("Shaman Cargalache"), I_ORC_LADY, 1, instance_npcname("#Boss Control")+"::OnMyMobDead"); + monster(.@map$, 179, 15, _("Depraved Orc Hero"), ORK_HERO, 1); + enablenpc(instance_npcname("#Boss Control")); end; OnMyMobDead: - donpcevent instance_npcname("Kruger#")+"::OnEnable"; + donpcevent(instance_npcname("Kruger#")+"::OnEnable"); .@map$ = instance_mapname("2@orcs"); - .@mob_ran = rand(1,5); - if (.@mob_ran == 1) { - mapannounce .@map$, "Shaman Cargalache: How... How could this be... How could someone like you...!!",bc_map,"0xffff00"; - } - else if (.@mob_ran == 2) { - mapannounce .@map$, "Shaman Cargalache: How is it that I've been overpowered by mere humans!",bc_map,"0xffff00"; - } - else if (.@mob_ran == 3) { - mapannounce .@map$, "Shaman Cargalache: This... This can't be the end...",bc_map,"0xffff00"; - } - else if (.@mob_ran == 4) { - mapannounce .@map$, "Shaman Cargalache: I... Can't die... Yet...!",bc_map,"0xffff00"; - } - else { - mapannounce .@map$, "Shaman Cargalache: Defeated by these fools... It can't be happening...!",bc_map,"0xffff00"; - } - donpcevent instance_npcname("#2Resurrect Monsters1")+"::OnDisable"; - donpcevent instance_npcname("#2Resurrect Monsters3")+"::OnDisable"; - donpcevent instance_npcname("#Warp Outside Orc Dun")+"::OnEnable"; + .@mob_ran = rand(1, 5); + if (.@mob_ran == 1) + mapannounce(.@map$, _("Shaman Cargalache: How... How could this be... How could someone like you...!!"), bc_map, C_YELLOW); + else if (.@mob_ran == 2) + mapannounce(.@map$, _("Shaman Cargalache: How is it that I've been overpowered by mere humans!"), bc_map, C_YELLOW); + else if (.@mob_ran == 3) + mapannounce(.@map$, _("Shaman Cargalache: This... This can't be the end..."), bc_map, C_YELLOW); + else if (.@mob_ran == 4) + mapannounce(.@map$, _("Shaman Cargalache: I... Can't die... Yet...!"), bc_map, C_YELLOW); + else + mapannounce(.@map$, _("Shaman Cargalache: Defeated by these fools... It can't be happening...!"), bc_map, C_YELLOW); + donpcevent(instance_npcname("#2Resurrect Monsters1")+"::OnDisable"); + donpcevent(instance_npcname("#2Resurrect Monsters3")+"::OnDisable"); + donpcevent(instance_npcname("#Warp Outside Orc Dun")+"::OnEnable"); end; } 2@orcs,182,8,0 script #Warp Outside Orc Dun WARPNPC,3,3,{ OnInstanceInit: - disablenpc instance_npcname("#Warp Outside Orc Dun"); + disablenpc(instance_npcname("#Warp Outside Orc Dun")); end; OnEnable: - enablenpc instance_npcname("#Warp Outside Orc Dun"); + enablenpc(instance_npcname("#Warp Outside Orc Dun")); end; OnTouch: - warp "gef_fild10",240,197; + warp("gef_fild10", 240, 197); end; } 2@orcs,172,13,0 script Kruger# 4_ORCWARRIOR2,{ if (yong_odun < 2) { - mes "[Kruger]"; - mes "*Coughing*"; - mes ""+strcharinfo(PC_NAME)+", it's you..."; - next; - mes "["+strcharinfo(PC_NAME)+"] "; - mes "Don't move! You are wounded!"; - next; - mes "[Kruger]"; - mes "It's... all right.. I'm dying..."; - mes "...."; - mes "The Shaman? What about the Shaman?"; - next; - mes "["+strcharinfo(PC_NAME)+"] "; - mes "The Shaman's dead now. Who was that Shaman really?"; - next; - mes "Kruger seemed to be relieved as he hears of the death of the Shaman, but you notice the bitter expression on his face."; - next; - mes "[Kruger]"; - mes "I.. I just couldn't kill my own daughter..."; - mes "Thank you, I'm sure she's finally free from the nightmare that used to choke her soul."; - next; - mes "Kruger was about to say something more, but he breathed his last breath before he could..."; + mes("[Kruger]"); + mes("*Coughing*"); + mesf("%s, it's you...", strcharinfo(PC_NAME)); + next(); + mesf("[%s]", strcharinfo(PC_NAME)); + mes("Don't move! You are wounded!"); + next(); + mes("[Kruger]"); + mes("It's... all right.. I'm dying..."); + mes("...."); + mes("The Shaman? What about the Shaman?"); + next(); + mesf("[%s]", strcharinfo(PC_NAME)); + mes("The Shaman's dead now. Who was that Shaman really?"); + next(); + mes("Kruger seemed to be relieved as he hears of the death of the Shaman, but you notice the bitter expression on his face."); + next(); + mes("[Kruger]"); + mes("I.. I just couldn't kill my own daughter..."); + mes("Thank you, I'm sure she's finally free from the nightmare that used to choke her soul."); + next(); + mes("Kruger was about to say something more, but he breathed his last breath before he could..."); yong_odun = 2; - close; - } - else { - mes "You can see the dead body of Kruger, peacefully lying on the ground."; - close; + close(); + } else { + mes("You can see the dead body of Kruger, peacefully lying on the ground."); + close(); } OnInstanceInit: - disablenpc instance_npcname("Kruger#"); + disablenpc(instance_npcname("Kruger#")); end; OnEnable: - enablenpc instance_npcname("Kruger#"); + enablenpc(instance_npcname("Kruger#")); end; } @@ -914,14 +886,14 @@ OnEnable: end; OnMyMobDead1: - donpcevent instance_npcname("#Warp2-1")+"::OnContinue"; + donpcevent(instance_npcname("#Warp2-1")+"::OnContinue"); end; OnMyMobDead2: - donpcevent instance_npcname("#Warp2-2")+"::OnContinue"; + donpcevent(instance_npcname("#Warp2-2")+"::OnContinue"); end; OnMyMobDead3: - donpcevent instance_npcname("#Warp2-3")+"::OnContinue"; + donpcevent(instance_npcname("#Warp2-3")+"::OnContinue"); end; } diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt index 1b1022dcf..3bc3d951a 100644 --- a/npc/instances/SealedShrine.txt +++ b/npc/instances/SealedShrine.txt @@ -37,65 +37,64 @@ //== Sealed Catacomb Entrance ============================== monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{ - cutin "ins_cata_pri_n",2; - mes "[Friar Patrick]"; - mes "The peace of this world cannot last forever... The hands of Evil are reaching into the world again..."; - next; - mes "[Friar Patrick]"; - mes "What brought you to this place?"; - next; + cutin("ins_cata_pri_n", 2); + mes("[Friar Patrick]"); + mes("The peace of this world cannot last forever... The hands of Evil are reaching into the world again..."); + next(); + mes("[Friar Patrick]"); + mes("What brought you to this place?"); + next(); if (countitem(Bapho_Doll) > 0) { .@doll = 1; .@selection = select("What is this place?", "I want to enter.", "About the Cursed Baphomet Doll.", "Cancel."); - } - else { + } else { .@selection = select("What is this place?", "I want to enter.", "Cancel."); } - switch(.@selection) { + switch (.@selection) { case 1: - mes "[Friar Patrick]"; - mes "Huh... Don't you know? This is St. Capitolina Monastery where the Brothers who wish to become monks train and pray."; - next; - mes "[Friar Patrick]"; - mes "And this place is... What can I say... Yes. It's the grave of the Devil. Grave..."; - next; - mes "[Friar Patrick]"; - mes "The very place where the great Devil who once demolished this world is sleeping."; - next; - switch(select("Tell me more.", "Stop talking.")) { + mes("[Friar Patrick]"); + mes("Huh... Don't you know? This is St. Capitolina Monastery where the Brothers who wish to become monks train and pray."); + next(); + mes("[Friar Patrick]"); + mes("And this place is... What can I say... Yes. It's the grave of the Devil. Grave..."); + next(); + mes("[Friar Patrick]"); + mes("The very place where the great Devil who once demolished this world is sleeping."); + next(); + switch (select("Tell me more.", "Stop talking.")) { case 1: - cutin "ins_cata_pri_n",2; - mes "[Friar Patrick]"; - mes "Baphomet... is the name of the Devil... I think you have heard of his name."; - next; - mes "[Friar Patrick]"; - mes "Numerous brave men and brothers have trained in this monastery..."; - next; - mes "[Friar Patrick]"; - mes "Under this gravestone in front of you... Baphomet is sealed."; - next; - mes "[Friar Patrick]"; - mes "But... As we speak Satan Morocc is marshalling his powerful magic in order to affect all life on this continent."; - next; - mes "[Friar Patrick]"; - mes "Baphomet also... has awakened and is preparing for his revival, into this world, by weakening the power of the seal through the power of Satan Morocc..."; - next; - mes "[Friar Patrick]"; - mes "Now... I'm looking for someone brave enough to reseal Baphomet in its shrine... as we once did many years ago..."; - next; - mes "[Friar Patrick]"; - mes "Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world..."; - next; - mes "[Friar Patrick]"; - mes "Train more and use your skills to protect the world from evil's looming presence..."; + cutin("ins_cata_pri_n", 2); + mes("[Friar Patrick]"); + mes("Baphomet... is the name of the Devil... I think you have heard of his name."); + next(); + mes("[Friar Patrick]"); + mes("Numerous brave men and brothers have trained in this monastery..."); + next(); + mes("[Friar Patrick]"); + mes("Under this gravestone in front of you... Baphomet is sealed."); + next(); + mes("[Friar Patrick]"); + mes("But... As we speak Satan Morocc is marshalling his powerful magic in order to affect all life on this continent."); + next(); + mes("[Friar Patrick]"); + mes("Baphomet also... has awakened and is preparing for his revival, into this world, by weakening the power of the seal through the power of Satan Morocc..."); + next(); + mes("[Friar Patrick]"); + mes("Now... I'm looking for someone brave enough to reseal Baphomet in its shrine... as we once did many years ago..."); + next(); + mes("[Friar Patrick]"); + mes("Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world..."); + next(); + mes("[Friar Patrick]"); + mes("Train more and use your skills to protect the world from evil's looming presence..."); break; case 2: - cutin "ins_cata_pri_n",2; - mes "[Friar Patrick]"; - mes "Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world..."; - next; - mes "[Friar Patrick]"; - mes "Train more and use your skills to protect the world from evil's looming presence..."; + cutin("ins_cata_pri_n", 2); + mes("[Friar Patrick]"); + mes("Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world..."); + next(); + mes("[Friar Patrick]"); + mes("Train more and use your skills to protect the world from evil's looming presence..."); break; } break; @@ -104,332 +103,327 @@ monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{ .@party_id = getcharid(CHAR_ID_PARTY); - mes "[Friar Patrick]"; - mes "Do you mean you'll go to the shrine and reseal Baphomet?"; - next; + mes("[Friar Patrick]"); + mes("Do you mean you'll go to the shrine and reseal Baphomet?"); + next(); // 12 hour cooldown - .@ins_bapho_check = questprogress(3040,PLAYTIME); + .@ins_bapho_check = questprogress(3040, PLAYTIME); // Two hour play limit - //.@ins_bapho_check2 = questprogress(3045,PLAYTIME); + //.@ins_bapho_check2 = questprogress(3045, PLAYTIME); if (!.@ins_bapho_check) { - if (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR) && instance_check_party(.@party_id,2,75)) { - mes "[Friar Patrick]"; - mes "Party name is "+getpartyname(.@party_id)+"..."; - mes "Name of the leader is "+strcharinfo(PC_NAME)+"..."; - .@instance = instance_create("Sealed Catacomb",.@party_id); + if (getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR) && instance_check_party(.@party_id, 2, 75)) { + mes("[Friar Patrick]"); + mesf("Party name is %s...", getpartyname(.@party_id)); + mesf("Name of the leader is %s...", strcharinfo(PC_NAME)); + .@instance = instance_create(_("Sealed Catacomb"), .@party_id); if (.@instance < 0) { - mes "Umm... But it seems that there is a problem here... I'll check quickly. Please wait."; - } - else { + mes("Umm... But it seems that there is a problem here... I'll check quickly. Please wait."); + } else { for (.@i = 1; .@i <= 2; .@i++) { - if( instance_attachmap(.@i + "@cata", .@instance) == "" ) { - mes "Failed to attach "+.@i+"@cata as a map!"; + if (instance_attachmap(.@i + "@cata", .@instance) == "") { + mesf("Failed to attach %d@cata as a map!", .@i); instance_destroy(.@instance); - close; + close(); } } - instance_set_timeout 7200,300,.@instance; + instance_set_timeout(7200, 300, .@instance); instance_init(.@instance); - mes "Okay... I'll adjust the shrine's seal so that you and your group can enter."; - next; - mes "[Friar Patrick]"; - mes "You will see a sign when the seal has broken. Please wait until the sign appears..."; - next; - mes "[Friar Patrick]"; - mes "When you see the sign, put your hands on the gravestone... Then you can move inside."; - next; - mes "[Friar Patrick]"; - mes "One thing that you should remember is... Anyone who enters this shrine will be cursed by Baphomet and cannot enter or leave while they are cursed."; - next; - mes "[Friar Patrick]"; - mes "And one more thing... In this cursed area, some skills, which are protected by outer physical power are prohibited by the effect of the seal."; - next; - mes "[Friar Patrick]"; - mes "For example, the skills like ^0000FFSafety Wall and Assumptio^000000... So you'd better prepare before entering the shrine."; + mes("Okay... I'll adjust the shrine's seal so that you and your group can enter."); + next(); + mes("[Friar Patrick]"); + mes("You will see a sign when the seal has broken. Please wait until the sign appears..."); + next(); + mes("[Friar Patrick]"); + mes("When you see the sign, put your hands on the gravestone... Then you can move inside."); + next(); + mes("[Friar Patrick]"); + mes("One thing that you should remember is... Anyone who enters this shrine will be cursed by Baphomet and cannot enter or leave while they are cursed."); + next(); + mes("[Friar Patrick]"); + mes("And one more thing... In this cursed area, some skills, which are protected by outer physical power are prohibited by the effect of the seal."); + next(); + mes("[Friar Patrick]"); + mes("For example, the skills like ^0000FFSafety Wall and Assumptio^000000... So you'd better prepare before entering the shrine."); } + } else { + mes("[Friar Patrick]"); + mes("Umm... I recognize your courage, but... I can't permit anyone to enter this place. I can only permit the leader of a party to enter first."); + next(); + mes("[Friar Patrick]"); + mes("Once the party leader is permitted, the rest of the party can enter. This is a rule of this monastery, so please understand."); } - else { - mes "[Friar Patrick]"; - mes "Umm... I recognize your courage, but... I can't permit anyone to enter this place. I can only permit the leader of a party to enter first."; - next; - mes "[Friar Patrick]"; - mes "Once the party leader is permitted, the rest of the party can enter. This is a rule of this monastery, so please understand."; - } + } else if (.@ins_bapho_check == 1) { + mes("[Friar Patrick]"); + mes("It seems you have entered this shrine recently... You cannot reenter because Baphomet's Curse still remains. Baphomet's Curse disappears only after a certain amount of time has passed."); + } else if (.@ins_bapho_check == 2) { + mes("[Friar Patrick]"); + mes("Umm... It seems that Baphomet's Curse has weakened. I can remove it now."); + next(); + mes("[Friar Patrick]"); + mes("Haaaaaaap... Hocus Pocus Wingardium Abracadabra!!!!!"); + next(); + erasequest(3040); + if (questprogress(3041)) + erasequest(3041); + if (questprogress(3045)) + erasequest(3045); + mes("[Friar Patrick]"); + mes("Huu... It's over. Now that I've released Baphomet's Curse, you can enter again."); } - else if (.@ins_bapho_check == 1) { - mes "[Friar Patrick]"; - mes "It seems you have entered this shrine recently... You cannot reenter because Baphomet's Curse still remains. Baphomet's Curse disappears only after a certain amount of time has passed."; - } - else if (.@ins_bapho_check == 2) { - mes "[Friar Patrick]"; - mes "Umm... It seems that Baphomet's Curse has weakened. I can remove it now."; - next; - mes "[Friar Patrick]"; - mes "Haaaaaaap... Hocus Pocus Wingardium Abracadabra!!!!!"; - next; - erasequest 3040; - if (questprogress(3041)) erasequest 3041; - if (questprogress(3045)) erasequest 3045; - mes "[Friar Patrick]"; - mes "Huu... It's over. Now that I've released Baphomet's Curse, you can enter again."; - } - } - else { - mes "[Friar Patrick]"; - mes "Umm... You should train more to enter this dangerous place... You should reach at least Lv 75 to enter here."; - next; - mes "[Friar Patrick]"; - mes "Please train more and come again."; + } else { + mes("[Friar Patrick]"); + mes("Umm... You should train more to enter this dangerous place... You should reach at least Lv 75 to enter here."); + next(); + mes("[Friar Patrick]"); + mes("Please train more and come again."); } break; case 3: if (.@doll == 1) { - mes "[Friar Patrick]"; - mes "That is... the villainous doll that you are holding... Let me see it."; - next; - mes "[Friar Patrick]"; - mes "... ... ..."; - next; - mes "[Friar Patrick]"; - mes "That's correct... I can feel Baphomet's evil inside... So, what will you do with the doll?"; - next; - mes "[Friar Patrick]"; - mes "It is just a dangerous and useless thing if you do nothing with it... I'll introduce someone who can help you... Do you want to see him?"; - next; - mes "[Friar Patrick]"; - mes "Go to see ^0000FFRust Blackhand^000000 who is near the main building of the monastery... He will make this doll helpful to you."; - setquest 3042; + mes("[Friar Patrick]"); + mes("That is... the villainous doll that you are holding... Let me see it."); + next(); + mes("[Friar Patrick]"); + mes("... ... ..."); + next(); + mes("[Friar Patrick]"); + mes("That's correct... I can feel Baphomet's evil inside... So, what will you do with the doll?"); + next(); + mes("[Friar Patrick]"); + mes("It is just a dangerous and useless thing if you do nothing with it... I'll introduce someone who can help you... Do you want to see him?"); + next(); + mes("[Friar Patrick]"); + mes("Go to see ^0000FFRust Blackhand^000000 who is near the main building of the monastery... He will make this doll helpful to you."); + setquest(3042); break; } case 4: - mes "[Friar Patrick]"; - mes "Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world..."; - next; - mes "[Friar Patrick]"; - mes "Train more and use your skills to protect the world from evil's looming presence..."; + mes("[Friar Patrick]"); + mes("Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world..."); + next(); + mes("[Friar Patrick]"); + mes("Train more and use your skills to protect the world from evil's looming presence..."); break; } - close2; - cutin "",255; + close2(); + cutin("", 255); end; } monk_test,306,151,3 script Grave of Baphomet#edq HIDDEN_NPC,{ - if (countitem(Token_Of_Apostle)) delitem Token_Of_Apostle,countitem(Token_Of_Apostle); - mes "This gravestone has a carving of a wicked devil with large horns. It arouses an ominous feeling."; - next; - if(select("Touch the stone.", "Step back.") == 2) - close; + if (countitem(Token_Of_Apostle)) + delitem(Token_Of_Apostle, countitem(Token_Of_Apostle)); + mes("This gravestone has a carving of a wicked devil with large horns. It arouses an ominous feeling."); + next(); + if (select("Touch the stone.", "Step back.") == 2) + close(); // 12 hour cooldown - .@ins_bapho_check = questprogress(3040,PLAYTIME); + .@ins_bapho_check = questprogress(3040, PLAYTIME); // Two hour play limit - //.@ins_bapho_check2 = questprogress(3045,PLAYTIME); + //.@ins_bapho_check2 = questprogress(3045, PLAYTIME); if (!.@ins_bapho_check) { if (has_instance("1@cata") == "") { - mes "It's cold to the touch. It doesn't respond."; - close; + mes("It's cold to the touch. It doesn't respond."); + close(); } else { - mapannounce "monk_test","[" + strcharinfo(PC_NAME) + "] member of the [" + getpartyname(.@party_id) + "] party has entered the Sealed Shrine.",bc_map,"0x00ff99"; - setquest 3040; - warp "1@cata",100,224; + mapannounce("monk_test", sprintf(_$("[%s] member of the [%s] party has entered the Sealed Shrine."), strcharinfo(PC_NAME), getpartyname(.@party_id)), bc_map, C_SPRINGGREEN); + setquest(3040); + warp("1@cata", 100, 224); end; } } else if (.@ins_bapho_check == 1) { - mes "[Friar Patrick]"; - mes "It seems you have entered this shrine recently... You cannot reenter because the curse of Baphomet still remains."; - mes "The curse of Baphomet disappears after a certain amount of time after you entered."; - close; + mes("[Friar Patrick]"); + mes("It seems you have entered this shrine recently... You cannot reenter because the curse of Baphomet still remains."); + mes("The curse of Baphomet disappears after a certain amount of time after you entered."); + close(); } else if (.@ins_bapho_check == 2) { - mes "[Friar Patrick]"; - mes "Umm... It seems the curse of Baphomet weakened. I'll clear the bad curse."; - next; - mes "[Friar Patrick]"; - mes "Haaaaaaap... Wingardium Leviosa Expecto Patronum !!!!!"; + mes("[Friar Patrick]"); + mes("Umm... It seems the curse of Baphomet weakened. I'll clear the bad curse."); + next(); + mes("[Friar Patrick]"); + mes("Haaaaaaap... Wingardium Leviosa Expecto Patronum !!!!!"); specialeffect(EF_HOLYHIT, AREA, playerattached()); - erasequest 3040; - if (questprogress(3041)) erasequest 3041; - if (questprogress(3045)) erasequest 3045; - next; - mes "[Friar Patrick]"; - mes "Huu... It's over. Now I released all of the curses on you. You can enter again."; - close; + erasequest(3040); + if (questprogress(3041)) + erasequest(3041); + if (questprogress(3045)) + erasequest(3045); + next(); + mes("[Friar Patrick]"); + mes("Huu... It's over. Now I released all of the curses on you. You can enter again."); + close(); } } prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{ .@new_maje = questprogress(3043); - mes "[Rust Blackhand]"; - mes "Who are you? What do you want me for?"; - next; - mes "[Rust Blackhand]"; - mes "You're not a monk, then what do you want?"; - next; + mes("[Rust Blackhand]"); + mes("Who are you? What do you want me for?"); + next(); + mes("[Rust Blackhand]"); + mes("You're not a monk, then what do you want?"); + next(); if (.@new_maje == 1) { - mes "[Rust Blackhand]"; - mes "Did you bring all of the ingredients?"; - next; - if (countitem(Bapho_Doll) && countitem(Magestic_Goat) && (countitem(Dark_Crystal) > 29) && (countitem(Dark_Debris) > 49) && (Zeny >= 990000)) { - mes "[Rust Blackhand]"; - mes "kkk... You prepared the ingredients well. Why don't you leave it there and wait?"; - next; - mes "[Rust Blackhand]"; - mes "Hmm... It's been such a long time since I last saw these wicked horns... kkk... Let me start..."; - next; - mes "..."; - next; - mes "... ..."; - next; - mes "... ... ..."; - next; - delitem Bapho_Doll,1; - delitem Magestic_Goat,1; - delitem Dark_Crystal,30; - delitem Dark_Debris,50; + mes("[Rust Blackhand]"); + mes("Did you bring all of the ingredients?"); + next(); + if (countitem(Bapho_Doll) && countitem(Magestic_Goat) && countitem(Dark_Crystal) > 29 && countitem(Dark_Debris) > 49 && Zeny >= 990000) { + mes("[Rust Blackhand]"); + mes("kkk... You prepared the ingredients well. Why don't you leave it there and wait?"); + next(); + mes("[Rust Blackhand]"); + mes("Hmm... It's been such a long time since I last saw these wicked horns... kkk... Let me start..."); + next(); + mes("..."); + next(); + mes("... ..."); + next(); + mes("... ... ..."); + next(); + delitem(Bapho_Doll, 1); + delitem(Magestic_Goat, 1); + delitem(Dark_Crystal, 30); + delitem(Dark_Debris, 50); Zeny -= 990000; - completequest 3043; - getitem L_Magestic_Goat,1; - mes "[Rust Blackhand]"; - mes "It's done. You may be excited, of course. I understand..."; - next; - mes "[Rust Blackhand]"; - mes "I don't accept complaints or A/S requests, so use it with care. I must go..."; - close; - } - else { - mes "[Rust Blackhand]"; - mes "Huu... You don't understand what I said. You cannot make anything with these ingredients."; - next; - mes "[Rust Blackhand]"; - mes "I'll tell you the ingredients one more time, so please gather them correctly."; - next; - mes "[Rust Blackhand]"; - mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny."; - close; + completequest(3043); + getitem(L_Magestic_Goat, 1); + mes("[Rust Blackhand]"); + mes("It's done. You may be excited, of course. I understand..."); + next(); + mes("[Rust Blackhand]"); + mes("I don't accept complaints or A/S requests, so use it with care. I must go..."); + close(); + } else { + mes("[Rust Blackhand]"); + mes("Huu... You don't understand what I said. You cannot make anything with these ingredients."); + next(); + mes("[Rust Blackhand]"); + mes("I'll tell you the ingredients one more time, so please gather them correctly."); + next(); + mes("[Rust Blackhand]"); + mes("^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny."); + close(); } - } - else if (!.@new_maje && countitem(Bapho_Doll) > 0) { - switch(select("About the Cursed Baphomet Doll", "Stop talking.")) { + } else if (!.@new_maje && countitem(Bapho_Doll) > 0) { + switch (select("About the Cursed Baphomet Doll", "Stop talking.")) { case 1: - mes "[Rust Blackhand]"; - mes "What?... Hmmm... Did you get the doll? You're pretty good, unlike your appearance..."; - next; - mes "[Rust Blackhand]"; - mes "Let me see... Needless to say, Patric must have sent you here to deal with the doll, right?"; - next; - mes "[Rust Blackhand]"; - mes "Cool... I'll help you make the evil doll useful. What? What can I do?"; - next; - mes "[Rust Blackhand]"; - mes "I can make the strong and large horns of the wicked devil Baphomet for you. A helm that has his immense power."; - next; - mes "[Rust Blackhand]"; - mes "It is called the ^4d4dffGigantic Magestic Goat^000000. You'll realize that the Magestic Goat you're familiar with is nothing in comparison."; - next; - mes "[Rust Blackhand]"; - mes "The Cursed Baphomet Doll is the most important ingredient... I'll make you if you want. What would you like to do?"; - next; - switch(select("I want to make one!", "I don't need one.")) { + mes("[Rust Blackhand]"); + mes("What?... Hmmm... Did you get the doll? You're pretty good, unlike your appearance..."); + next(); + mes("[Rust Blackhand]"); + mes("Let me see... Needless to say, Patric must have sent you here to deal with the doll, right?"); + next(); + mes("[Rust Blackhand]"); + mes("Cool... I'll help you make the evil doll useful. What? What can I do?"); + next(); + mes("[Rust Blackhand]"); + mes("I can make the strong and large horns of the wicked devil Baphomet for you. A helm that has his immense power."); + next(); + mes("[Rust Blackhand]"); + mes("It is called the ^4d4dffGigantic Magestic Goat^000000. You'll realize that the Magestic Goat you're familiar with is nothing in comparison."); + next(); + mes("[Rust Blackhand]"); + mes("The Cursed Baphomet Doll is the most important ingredient... I'll make you if you want. What would you like to do?"); + next(); + switch (select("I want to make one!", "I don't need one.")) { case 1: - mes "[Rust Blackhand]"; - mes "kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all."; - next; - mes "[Rust Blackhand]"; - mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny."; - next; - mes "[Rust Blackhand]"; - mes "You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc."; - next; - mes "[Rust Blackhand]"; - mes "I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk..."; - next; - mes "[Rust Blackhand]"; - mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients."; + mes("[Rust Blackhand]"); + mes("kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all."); + next(); + mes("[Rust Blackhand]"); + mes("^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny."); + next(); + mes("[Rust Blackhand]"); + mes("You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc."); + next(); + mes("[Rust Blackhand]"); + mes("I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk..."); + next(); + mes("[Rust Blackhand]"); + mes("You'll never know how great this hat is until you get one. If you understood, go and get the ingredients."); if (questprogress(3042)) - erasequest 3042; - setquest 3043; - close; + erasequest(3042); + setquest(3043); + close(); case 2: - mes "[Rust Blackhand]"; - mes "Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?"; - next; - mes "[Rust Blackhand]"; - mes "Tut, tut... I don't care if the wicked doll threatens your life all the time!"; - close; + mes("[Rust Blackhand]"); + mes("Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?"); + next(); + mes("[Rust Blackhand]"); + mes("Tut, tut... I don't care if the wicked doll threatens your life all the time!"); + close(); } case 2: - mes "[Rust Blackhand]"; - mes "What a dull boy he is... huh..."; - close; + mes("[Rust Blackhand]"); + mes("What a dull boy he is... huh..."); + close(); } - } - else if (!.@new_maje && !countitem(Bapho_Doll)) { - mes "[Rust Blackhand]"; - mes "If you don't have business with me, go away! As you see, I make equipment for the Brothers at the monastery, not for adventurers like you. Do you understand?"; - close; - } - else if (.@new_maje == 2 && countitem(Bapho_Doll)) { - switch(select("About the Cursed Baphomet Doll", "Stop talking.")) { + } else if (!.@new_maje && !countitem(Bapho_Doll)) { + mes("[Rust Blackhand]"); + mes("If you don't have business with me, go away! As you see, I make equipment for the Brothers at the monastery, not for adventurers like you. Do you understand?"); + close(); + } else if (.@new_maje == 2 && countitem(Bapho_Doll)) { + switch (select("About the Cursed Baphomet Doll", "Stop talking.")) { case 1: - mes "[Rust Blackhand]"; - mes "What?... You again? What do you want this time?"; - next; - mes "[Rust Blackhand]"; - mes "What? You got another doll from the wicked devil? Umm... You're much better than I thought..."; - next; - mes "[Rust Blackhand]"; - mes "Alright... I'll help you again."; - next; - mes "[Rust Blackhand]"; - mes "If you want to make the doll into a ^4d4dffGigantic Magestic Goat^000000 again, I can make you another."; - next; - mes "[Rust Blackhand]"; - mes "I'll tell you the ingredients again. So, do you want to make?"; - next; - switch(select("I want.", "No, I don't want.")) { + mes("[Rust Blackhand]"); + mes("What?... You again? What do you want this time?"); + next(); + mes("[Rust Blackhand]"); + mes("What? You got another doll from the wicked devil? Umm... You're much better than I thought..."); + next(); + mes("[Rust Blackhand]"); + mes("Alright... I'll help you again."); + next(); + mes("[Rust Blackhand]"); + mes("If you want to make the doll into a ^4d4dffGigantic Magestic Goat^000000 again, I can make you another."); + next(); + mes("[Rust Blackhand]"); + mes("I'll tell you the ingredients again. So, do you want to make?"); + next(); + switch (select("I want.", "No, I don't want.")) { case 1: - mes "[Rust Blackhand]"; - mes "kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all."; - next; - mes "[Rust Blackhand]"; - mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny."; - next; - mes "[Rust Blackhand]"; - mes "You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc."; - next; - mes "[Rust Blackhand]"; - mes "I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk..."; - next; - mes "[Rust Blackhand]"; - mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients."; + mes("[Rust Blackhand]"); + mes("kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all."); + next(); + mes("[Rust Blackhand]"); + mes("^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny."); + next(); + mes("[Rust Blackhand]"); + mes("You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc."); + next(); + mes("[Rust Blackhand]"); + mes("I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk..."); + next(); + mes("[Rust Blackhand]"); + mes("You'll never know how great this hat is until you get one. If you understood, go and get the ingredients."); if (questprogress(3042)) - erasequest 3042; - erasequest 3043; - setquest 3043; - close; + erasequest(3042); + erasequest(3043); + setquest(3043); + close(); case 2: - mes "[Rust Blackhand]"; - mes "Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?"; - next; - mes "[Rust Blackhand]"; - mes "Tut, tut... I don't care if the wicked doll threatens your life all the time!"; - close; + mes("[Rust Blackhand]"); + mes("Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?"); + next(); + mes("[Rust Blackhand]"); + mes("Tut, tut... I don't care if the wicked doll threatens your life all the time!"); + close(); } case 2: - mes "[Rust Blackhand]"; - mes "What a dull boy he is... huh..."; - close; + mes("[Rust Blackhand]"); + mes("What a dull boy he is... huh..."); + close(); } - } - else if (.@new_maje == 2 && !countitem(Bapho_Doll)) { - mes "[Rust Blackhand]"; - mes "Why are you hanging around here? If you don't want a ^4d4dffGigantic Magestic Goat^000000, go away."; - close; + } else if (.@new_maje == 2 && !countitem(Bapho_Doll)) { + mes("[Rust Blackhand]"); + mes("Why are you hanging around here? If you don't want a ^4d4dffGigantic Magestic Goat^000000, go away."); + close(); } } @@ -437,18 +431,17 @@ prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{ 1@cata,1,2,0 script ins_baphomet_lotto FAKE_NPC,{ OnInstanceInit: // Pick one "true" Gravestone and 12 "false" Gravestones. - .@true = rand(1,13); - for (.@i = 1; .@i <= 13; ++.@i) { - disablenpc instance_npcname("Gravestone#1F_"+.@i+((.@i == .@true)?"T":"F")); - } - disablenpc instance_npcname("ins_baphomet_lotto"); + .@true = rand(1, 13); + for (.@i = 1; .@i <= 13; ++.@i) + disablenpc(instance_npcname("Gravestone#1F_"+.@i+((.@i == .@true)?"T":"F"))); + disablenpc(instance_npcname("ins_baphomet_lotto")); end; } 1@cata,3,2,0 script ins_baphomet_lotto2 FAKE_NPC,{ OnEnable: for (.@i = 1; .@i <= 12; ++.@i) - enablenpc instance_npcname("Bobbing Torch#"+.@i); + enablenpc(instance_npcname("Bobbing Torch#"+.@i)); end; } @@ -456,33 +449,32 @@ OnEnable: OnEnable: .@label$ = instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead"; .@map$ = instance_mapname("1@cata"); - monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1132,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1117,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1132,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1117,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1132,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1117,1,.@label$; - monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$; + monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), WRAITH_DEAD, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), WRAITH_DEAD, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), WRAITH_DEAD, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), KHALITZBURG, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), EVIL_DRUID, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), KHALITZBURG, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), EVIL_DRUID, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), KHALITZBURG, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), WRAITH_DEAD, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), EVIL_DRUID, 1, .@label$); + monster(.@map$, 0, 0, _("Apostle of Baphomet"), FLAME_SKULL, 1, .@label$); end; OnDisable: - killmonster instance_mapname("1@cata"),instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead"; + killmonster(instance_mapname("1@cata"), instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead"); end; OnMyMobDead: .@map$ = instance_mapname("1@cata"); - if (mobcount(.@map$,instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead") < 1) { - mapannounce .@map$, "All apostles of Baphomet are dead!",bc_map,"0x00ff99"; - } - getitem Token_Of_Apostle,1; + if (mobcount(.@map$, instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead") < 1) + mapannounce(.@map$, _("All apostles of Baphomet are dead!"), bc_map, C_SPRINGGREEN); + getitem(Token_Of_Apostle, 1); end; } @@ -490,102 +482,98 @@ OnMyMobDead: 1@cata,141,221,0 script Gravestone# CLEAR_NPC,3,3,{ .@party_id = getcharid(CHAR_ID_PARTY); if ('ins_baphomet == 0) { - mes "The gravestone is trembling..."; - next; - mes "When touching the gravestone, I hear a voice."; - next; + mes("The gravestone is trembling..."); + next(); + mes("When touching the gravestone, I hear a voice."); + next(); specialeffect(EF_CONE, AREA, playerattached()); - mes "[Voice of the Gravestone]"; - mes "I have waited and waited for a brave adventurer like you who will come back here again..."; - next; - while(1) { - switch(select("Who are you?", "Waited for me?", "Cancel.")) { + mes("[Voice of the Gravestone]"); + mes("I have waited and waited for a brave adventurer like you who will come back here again..."); + next(); + while (true) { + switch (select("Who are you?", "Waited for me?", "Cancel.")) { case 1: - mes "[Voice of the Gravestone]"; - mes "I was one of the warriors to stop Baphomet like you. Now, I'm dead and only my soul remains..."; - next; - mes "[Voice of the Gravestone]"; - mes "As you know... We don't have much time. You can't stop Baphomet by yourselves. The power of the devil has strengthened over the years."; - next; - mes "[Voice of the Gravestone]"; - mes "In the past, my companions and I sealed Baphomet at the altar located on the 2nd basement and blocked the entrance."; - next; - mes "[Voice of the Gravestone]"; - mes "I moved my soul's essence to my pendant, so that I could remain in this world. That's when I became this grave's guardian."; - next; + mes("[Voice of the Gravestone]"); + mes("I was one of the warriors to stop Baphomet like you. Now, I'm dead and only my soul remains..."); + next(); + mes("[Voice of the Gravestone]"); + mes("As you know... We don't have much time. You can't stop Baphomet by yourselves. The power of the devil has strengthened over the years."); + next(); + mes("[Voice of the Gravestone]"); + mes("In the past, my companions and I sealed Baphomet at the altar located on the 2nd basement and blocked the entrance."); + next(); + mes("[Voice of the Gravestone]"); + mes("I moved my soul's essence to my pendant, so that I could remain in this world. That's when I became this grave's guardian."); + next(); break; case 2: - mes "[Voice of the Gravestone]"; - mes "Baphomet's power is about to break the seal that we made. If you don't reactivate them... Baphomet's revival will only be a matter of time."; - next; - mes "[Voice of the Gravestone]"; - mes "To open the entrance, you must substantialize my soul. I'll open the entrance and reactivate the weakened seals after I am substantilized."; - next; - mes "[Voice of the Gravestone]"; - mes "To substantialize my soul, you should find my pendant. You can find my body near a grave here."; - next; - mes "[Voice of the Gravestone]"; - mes "If your ^0000FFparty leader^000000 brings me the pendant, my soul can be substantialized. So, hurry up."; + mes("[Voice of the Gravestone]"); + mes("Baphomet's power is about to break the seal that we made. If you don't reactivate them... Baphomet's revival will only be a matter of time."); + next(); + mes("[Voice of the Gravestone]"); + mes("To open the entrance, you must substantialize my soul. I'll open the entrance and reactivate the weakened seals after I am substantilized."); + next(); + mes("[Voice of the Gravestone]"); + mes("To substantialize my soul, you should find my pendant. You can find my body near a grave here."); + next(); + mes("[Voice of the Gravestone]"); + mes("If your ^0000FFparty leader^000000 brings me the pendant, my soul can be substantialized. So, hurry up."); 'ins_baphomet = 1; - close; + close(); case 3: - mes "I can feel the voice becoming faint."; - close; + mes("I can feel the voice becoming faint."); + close(); } } - } - else if ('ins_baphomet == 1) { - mes "[Voice of the Gravestone]"; - mes "To open the entrance, you must substantialize my soul. I'll open the entrance and reactivate the weakened seals after I am substantilized."; - next; - mes "[Voice of the Gravestone]"; - mes "To substantialize my soul, you should find my pendant. You can find my body near a grave here."; - next; - mes "[Voice of the Gravestone]"; - mes "If your ^0000FFparty leader^000000 brings me the pendant, my soul can be substantialized. So, hurry up."; - close; - } - else if (('ins_baphomet == 2) && (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR))) { - mes "[Voice of the Gravestone]"; - mes "Did you find the pendant?"; - next; + } else if ('ins_baphomet == 1) { + mes("[Voice of the Gravestone]"); + mes("To open the entrance, you must substantialize my soul. I'll open the entrance and reactivate the weakened seals after I am substantilized."); + next(); + mes("[Voice of the Gravestone]"); + mes("To substantialize my soul, you should find my pendant. You can find my body near a grave here."); + next(); + mes("[Voice of the Gravestone]"); + mes("If your ^0000FFparty leader^000000 brings me the pendant, my soul can be substantialized. So, hurry up."); + close(); + } else if ('ins_baphomet == 2 && getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) { + mes("[Voice of the Gravestone]"); + mes("Did you find the pendant?"); + next(); if (countitem(Soul_Pendant) > 0) { - specialeffect EF_MAPPILLAR; - mes "[Voice of the Gravestone]"; - mes "Yes... This is... My pendant..."; - next; - delitem Soul_Pendant,1; - enablenpc instance_npcname("Ancient Hero's Soul#1F"); - disablenpc instance_npcname("Gravestone#"); - mes "[Voice of the Gravestone]"; - mes "Now I can substantialize my soul. I'll wait for you in front of the altar of fire located at the center of this grave. Let's meet there."; - next; - mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : I'll wait for you in front of the altar of fire located at the center",bc_map,"0xFFFF00"; - mes "I can feel the voice becoming faint."; - close; - } - else { - mes "[Voice of the Gravestone]"; - mes "Are you still there? Bring back my pendant as soon as possible."; - next; - mes "[Voice of the Gravestone]"; - mes "You can find my body near a grave here. Go and get my pendant there."; - close; + specialeffect(EF_MAPPILLAR); + mes("[Voice of the Gravestone]"); + mes("Yes... This is... My pendant..."); + next(); + delitem(Soul_Pendant, 1); + enablenpc(instance_npcname("Ancient Hero's Soul#1F")); + disablenpc(instance_npcname("Gravestone#")); + mes("[Voice of the Gravestone]"); + mes("Now I can substantialize my soul. I'll wait for you in front of the altar of fire located at the center of this grave. Let's meet there."); + next(); + mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : I'll wait for you in front of the altar of fire located at the center"), bc_map, C_YELLOW); + mes("I can feel the voice becoming faint."); + close(); + } else { + mes("[Voice of the Gravestone]"); + mes("Are you still there? Bring back my pendant as soon as possible."); + next(); + mes("[Voice of the Gravestone]"); + mes("You can find my body near a grave here. Go and get my pendant there."); + close(); } - } - else { - mes "[Voice of the Gravestone]"; - mes "I want to talk to ^0000FFa representative among your party^000000. Everyone else, wait here."; - close; + } else { + mes("[Voice of the Gravestone]"); + mes("I want to talk to ^0000FFa representative among your party^000000. Everyone else, wait here."); + close(); } end; OnTouch: if ('ins_baphomet == 0) { - mes "'Krrrr... Krrrr...'"; - next; - mes "I can feel something odd at the grave. It's like someone is calling out silently..."; - close; + mes("'Krrrr... Krrrr...'"); + next(); + mes("I can feel something odd at the grave. It's like someone is calling out silently..."); + close(); } end; @@ -596,220 +584,210 @@ OnInstanceInit: // Temporary fix for @reloadscript. 1@cata,176,119,4 script Ancient Hero's Soul#1F 4_M_CHAMPSOUL,{ .@party_id = getcharid(CHAR_ID_PARTY); - cutin "ins_cata_champ_n",2; + cutin("ins_cata_champ_n", 2); if ('ins_baphomet == 2) { - mes "[Ancient Hero's Soul]"; - mes "With your help, my soul can be substantialized. I want to talk more, but we do not have enough time..."; - next; - mes "[Ancient Hero's Soul]"; - mes "I must be substantialized within the next hour. To reach the Main Altar underground, you must help me perform the ceremony for opening each seal."; - next; - mes "[Ancient Hero's Soul]"; - mes "Now I'll tell you what should you do. First, collect ^0000FFEssence of Fire^000000 from the torches on the graves..."; - next; - mes "[Ancient Hero's Soul]"; - mes "Second, all members who will enter the underground must carry a symbol, called the Token of Apostle."; - next; - while(1) { - cutin "ins_cata_champ_n",2; - switch(select("What is Essence of Fire?", "What is a Token of Apostle?", "What should I do?", "I am ready.")) { + mes("[Ancient Hero's Soul]"); + mes("With your help, my soul can be substantialized. I want to talk more, but we do not have enough time..."); + next(); + mes("[Ancient Hero's Soul]"); + mes("I must be substantialized within the next hour. To reach the Main Altar underground, you must help me perform the ceremony for opening each seal."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Now I'll tell you what should you do. First, collect ^0000FFEssence of Fire^000000 from the torches on the graves..."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Second, all members who will enter the underground must carry a symbol, called the Token of Apostle."); + next(); + while (true) { + cutin("ins_cata_champ_n", 2); + switch (select("What is Essence of Fire?", "What is a Token of Apostle?", "What should I do?", "I am ready.")) { case 1: ++.@ins_baphomet_1f_1; - mes "[Ancient Hero's Soul]"; - mes "You can see the torches here and there. These torches are the essence of Thor, the god of Thunder. They are inherited from our predecessors to stop the darkness of Baphomet..."; - next; - mes "[Ancient Hero's Soul]"; - mes "To open the sealed underground gate, I must be purified by the ^0000FFEssence of Fire^000000 which has the power of Thor. Collect ^0000FF10 Essence of Fire^000000 from the torches."; - next; - mes "[Ancient Hero's Soul]"; - mes "One thing you must remember is... ^0000FFEssence of Fire^000000 can only be collected by the Inheritor of Faith."; - next; - mes "[Ancient Hero's Soul]"; - mes "I'll give the token of the Inheritor of Faith to the party leader. Only the party leader can collect the ^0000FFEssence of Fire^000000."; - next; + mes("[Ancient Hero's Soul]"); + mes("You can see the torches here and there. These torches are the essence of Thor, the god of Thunder. They are inherited from our predecessors to stop the darkness of Baphomet..."); + next(); + mes("[Ancient Hero's Soul]"); + mes("To open the sealed underground gate, I must be purified by the ^0000FFEssence of Fire^000000 which has the power of Thor. Collect ^0000FF10 Essence of Fire^000000 from the torches."); + next(); + mes("[Ancient Hero's Soul]"); + mes("One thing you must remember is... ^0000FFEssence of Fire^000000 can only be collected by the Inheritor of Faith."); + next(); + mes("[Ancient Hero's Soul]"); + mes("I'll give the token of the Inheritor of Faith to the party leader. Only the party leader can collect the ^0000FFEssence of Fire^000000."); + next(); break; case 2: ++.@ins_baphomet_1f_2; - mes "[Ancient Hero's Soul]"; - mes "At that time, it was impossible to get rid of Devil Baphomet by ourselves. After numerous heroes sacrificed their lives, we could barely seal him under this Abbey."; - next; - mes "[Ancient Hero's Soul]"; - mes "However, Baphomet never gave up. He continuously strengthened his power. And his power has brought new life to this shrine."; - next; - mes "[Ancient Hero's Soul]"; - mes "Some of these monsters have magical powers. Baphomet calls them his 'Apostles'."; - next; - mes "[Ancient Hero's Soul]"; - mes "The apostles are cloning themselves to fill the shrine with their evil energy. They are the monsters here in this catacomb."; - next; - mes "[Ancient Hero's Soul]"; - mes "Kill the Apostles. They can only be distinguished from their clones because they will possess a ^0000FFToken of Apostle^000000..."; - next; - mes "[Ancient Hero's Soul]"; - mes "If each party member possesses a ^0000FFToken of Apostle^000000, Baphomet will not be able to perceive your entrance to the Main Altar underground."; - next; - mes "[Ancient Hero's Soul]"; - mes "If Baphomet perceives you when you pass through the sealed gate, he may release his tremendous magical power. Then, this abbey will be demolished."; - next; - mes "[Ancient Hero's Soul]"; - mes "Kill the apostles and get the ^0000FFToken of Apostle^000000."; - next; + mes("[Ancient Hero's Soul]"); + mes("At that time, it was impossible to get rid of Devil Baphomet by ourselves. After numerous heroes sacrificed their lives, we could barely seal him under this Abbey."); + next(); + mes("[Ancient Hero's Soul]"); + mes("However, Baphomet never gave up. He continuously strengthened his power. And his power has brought new life to this shrine."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Some of these monsters have magical powers. Baphomet calls them his 'Apostles'."); + next(); + mes("[Ancient Hero's Soul]"); + mes("The apostles are cloning themselves to fill the shrine with their evil energy. They are the monsters here in this catacomb."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Kill the Apostles. They can only be distinguished from their clones because they will possess a ^0000FFToken of Apostle^000000..."); + next(); + mes("[Ancient Hero's Soul]"); + mes("If each party member possesses a ^0000FFToken of Apostle^000000, Baphomet will not be able to perceive your entrance to the Main Altar underground."); + next(); + mes("[Ancient Hero's Soul]"); + mes("If Baphomet perceives you when you pass through the sealed gate, he may release his tremendous magical power. Then, this abbey will be demolished."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Kill the apostles and get the ^0000FFToken of Apostle^000000."); + next(); break; case 3: ++.@ins_baphomet_1f_3; - if (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR)) { - mes "[Ancient Hero's Soul]"; - mes "You look like the leader of this party. You need to go and get ^0000FF10 Essence of Fire^000000 from the torches."; - next; - mes "[Ancient Hero's Soul]"; - mes "Now I'll carve you the symbol which shows you're a inheritor of faith. Be aware that no one in your party but you can collect the Essence of Fire."; - next; + if (getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) { + mes("[Ancient Hero's Soul]"); + mes("You look like the leader of this party. You need to go and get ^0000FF10 Essence of Fire^000000 from the torches."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Now I'll carve you the symbol which shows you're a inheritor of faith. Be aware that no one in your party but you can collect the Essence of Fire."); + next(); specialeffect(EF_HOLYHIT, AREA, playerattached()); - mes "[Ancient Hero's Soul]"; - mes "You should also carry a ^0000FFToken of Apostle^000000, so find one for yourself too."; - next; - mes "[Ancient Hero's Soul]"; - mes "When all of you are ready to go, let me know. I'll open the sealed gate when you're ready."; - next; - } - else { - mes "[Ancient Hero's Soul]"; - mes "Make sure that your party leader has listened to my explanation of what you and your companions must do."; - next; - mes "[Ancient Hero's Soul]"; - mes "Kill the Apostles of Baphomet and find their ^0000FFToken of Apostle^000000."; - next; - mes "[Ancient Hero's Soul]"; - mes "It might be better to kill all of them because there is no way to differentiate them from their clones."; - next; - mes "[Ancient Hero's Soul]"; - mes "Are you ready?"; - mes "Make sure that you have listened to all that I have to say before saying that you are ready."; - next; + mes("[Ancient Hero's Soul]"); + mes("You should also carry a ^0000FFToken of Apostle^000000, so find one for yourself too."); + next(); + mes("[Ancient Hero's Soul]"); + mes("When all of you are ready to go, let me know. I'll open the sealed gate when you're ready."); + next(); + } else { + mes("[Ancient Hero's Soul]"); + mes("Make sure that your party leader has listened to my explanation of what you and your companions must do."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Kill the Apostles of Baphomet and find their ^0000FFToken of Apostle^000000."); + next(); + mes("[Ancient Hero's Soul]"); + mes("It might be better to kill all of them because there is no way to differentiate them from their clones."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Are you ready?"); + mes("Make sure that you have listened to all that I have to say before saying that you are ready."); + next(); } break; case 4: - if ((.@ins_baphomet_1f_1 > 0) && (.@ins_baphomet_1f_2 > 0) && (.@ins_baphomet_1f_3 > 0)) { - cutin "ins_cata_champ_n",2; - mes "[Ancient Hero's Soul]"; - mes "Are you ready to go? Then I'll open this sealed gate now."; - next; + if (.@ins_baphomet_1f_1 > 0 && .@ins_baphomet_1f_2 > 0 && .@ins_baphomet_1f_3 > 0) { + cutin("ins_cata_champ_n", 2); + mes("[Ancient Hero's Soul]"); + mes("Are you ready to go? Then I'll open this sealed gate now."); + next(); .@exitloop = 1; - } - else { - cutin "ins_cata_champ_a",2; - mes "[Ancient Hero's Soul]"; - mes "It may be difficult but I wish you luck braving the perils of this catacomb."; - next; - mes "[Ancient Hero's Soul]"; - mes "Remember, you need to collect ^0000FF10 Essence of Fire^000000 from the torches and the ^0000FFToken of Apostle^000000 from the Apostles of Baphomet."; - next; + } else { + cutin("ins_cata_champ_a", 2); + mes("[Ancient Hero's Soul]"); + mes("It may be difficult but I wish you luck braving the perils of this catacomb."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Remember, you need to collect ^0000FF10 Essence of Fire^000000 from the torches and the ^0000FFToken of Apostle^000000 from the Apostles of Baphomet."); + next(); } break; } - if (.@exitloop) break; + if (.@exitloop) + break; } - if (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR)) { - mes "[Ancient Hero's Soul]"; - mes "To remind you again, I must be substantialized within the next hour. So everyone, finish your work within that time!"; + if (getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) { + mes("[Ancient Hero's Soul]"); + mes("To remind you again, I must be substantialized within the next hour. So everyone, finish your work within that time!"); 'ins_baphomet = 3; - donpcevent instance_npcname("ins_baphomet_1f_timer")+"::OnEnable"; - donpcevent instance_npcname("ins_baphomet_lotto2")+"::OnEnable"; - donpcevent instance_npcname("ins_baphomet_lotto3")+"::OnEnable"; - } - else { - mes "[Ancient Hero's Soul]"; - mes "To remind you again, I can be substantialized for the next hour. So everyone, finish your work within that time."; + donpcevent(instance_npcname("ins_baphomet_1f_timer")+"::OnEnable"); + donpcevent(instance_npcname("ins_baphomet_lotto2")+"::OnEnable"); + donpcevent(instance_npcname("ins_baphomet_lotto3")+"::OnEnable"); + } else { + mes("[Ancient Hero's Soul]"); + mes("To remind you again, I can be substantialized for the next hour. So everyone, finish your work within that time."); //'ins_baphomet = 3; } - close2; - cutin "",255; + close2(); + cutin("", 255); end; - } - else if (('ins_baphomet == 3) && (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR))) { - cutin "ins_cata_champ_n",2; - mes "[Ancient Hero's Soul]"; - mes "Did you get 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000?"; - next; - if ((countitem(Essence_Of_Fire) > 9) && (countitem(Token_Of_Apostle) > 0)) { - delitem Essence_Of_Fire,countitem(Essence_Of_Fire); + } else if ('ins_baphomet == 3 && getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) { + cutin("ins_cata_champ_n", 2); + mes("[Ancient Hero's Soul]"); + mes("Did you get 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000?"); + next(); + if (countitem(Essence_Of_Fire) > 9 && countitem(Token_Of_Apostle) > 0) { + delitem(Essence_Of_Fire, countitem(Essence_Of_Fire)); 'ins_baphomet = 4; - mes "[Ancient Hero's Soul]"; - mes "Okay. You've done your work. Now check your companions and tell me when everyone has finished their work."; - } - else { - mes "[Ancient Hero's Soul]"; - mes "Not ready yet? You should prepare 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000."; + mes("[Ancient Hero's Soul]"); + mes("Okay. You've done your work. Now check your companions and tell me when everyone has finished their work."); + } else { + mes("[Ancient Hero's Soul]"); + mes("Not ready yet? You should prepare 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000."); } - close2; - cutin "",255; + close2(); + cutin("", 255); end; - } - else if ('ins_baphomet == 3) { - cutin "ins_cata_champ_n",2; - mes "[Ancient Hero's Soul]"; - mes "Do you have a ^0000FFToken of Apostle^000000?"; - next; + } else if ('ins_baphomet == 3) { + cutin("ins_cata_champ_n", 2); + mes("[Ancient Hero's Soul]"); + mes("Do you have a ^0000FFToken of Apostle^000000?"); + next(); if (countitem(Token_Of_Apostle) > 0) { 'ins_baphomet = 4; - mes "[Ancient Hero's Soul]"; - mes "Okay. You've done your work. Tell your representative to check your companions and come to me when everyone has finished their work."; - } - else { - mes "[Ancient Hero's Soul]"; - mes "Not ready yet? You should prepare ^0000FFToken of Apostle^000000."; + mes("[Ancient Hero's Soul]"); + mes("Okay. You've done your work. Tell your representative to check your companions and come to me when everyone has finished their work."); + } else { + mes("[Ancient Hero's Soul]"); + mes("Not ready yet? You should prepare ^0000FFToken of Apostle^000000."); } - close2; - cutin "",255; + close2(); + cutin("", 255); end; - } - else if (('ins_baphomet == 4) && (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR))) { - cutin "ins_cata_champ_n",2; - mes "[Ancient Hero's Soul]"; - mes "Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000."; - next; + } else if ('ins_baphomet == 4 && getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) { + cutin("ins_cata_champ_n", 2); + mes("[Ancient Hero's Soul]"); + mes("Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000."); + next(); 'ins_baphomet = 5; - specialeffect EF_TELEPORTATION; - enablenpc instance_npcname("ins_bapho_to_2f"); - mes "[Ancient Hero's Soul]"; - mes "Now you can go to the main altar. It is located in the bottom right corner of this floor."; - next; - mes "[Ancient Hero's Soul]"; - mes "Your real battle will begin... I'll follow you soon and find a way to help you."; - next; - mes "[Ancient Hero's Soul]"; - mes "Go ahead, warriors."; - cutin "",255; - mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : Now you can go to the Main Altar's gate. It is located in the Southeast",bc_map,"0xFFFF00"; - close; - } - else if ('ins_baphomet == 4) { - cutin "ins_cata_champ_n",2; - mes "[Ancient Hero's Soul]"; - mes "Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000."; - next; - mes "[Ancient Hero's Soul]"; - mes "I'll complete opening the sealed gate when your representative tells me that you're ready."; - cutin "",255; - close; - } - else if ('ins_baphomet == 5) { - cutin "ins_cata_champ_n",2; - mes "[Ancient Hero's Soul]"; - mes "What are you doing? The entrance of the main altar is opened now, go and fight! The entrance is near the bottom right side of this floor."; - cutin "",255; - close; - } - else { - cutin "ins_cata_champ_n",2; - mes "[Ancient Hero's Soul]"; - mes "I have nothing to say to you..."; - cutin "",255; - close; + specialeffect(EF_TELEPORTATION); + enablenpc(instance_npcname("ins_bapho_to_2f")); + mes("[Ancient Hero's Soul]"); + mes("Now you can go to the main altar. It is located in the bottom right corner of this floor."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Your real battle will begin... I'll follow you soon and find a way to help you."); + next(); + mes("[Ancient Hero's Soul]"); + mes("Go ahead, warriors."); + cutin("", 255); + mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : Now you can go to the Main Altar's gate. It is located in the Southeast"), bc_map, C_YELLOW); + close(); + } else if ('ins_baphomet == 4) { + cutin("ins_cata_champ_n", 2); + mes("[Ancient Hero's Soul]"); + mes("Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000."); + next(); + mes("[Ancient Hero's Soul]"); + mes("I'll complete opening the sealed gate when your representative tells me that you're ready."); + cutin("", 255); + close(); + } else if ('ins_baphomet == 5) { + cutin("ins_cata_champ_n", 2); + mes("[Ancient Hero's Soul]"); + mes("What are you doing? The entrance of the main altar is opened now, go and fight! The entrance is near the bottom right side of this floor."); + cutin("", 255); + close(); + } else { + cutin("ins_cata_champ_n", 2); + mes("[Ancient Hero's Soul]"); + mes("I have nothing to say to you..."); + cutin("", 255); + close(); } OnInstanceInit: - disablenpc instance_npcname("Ancient Hero's Soul#1F"); + disablenpc(instance_npcname("Ancient Hero's Soul#1F")); end; } @@ -817,38 +795,37 @@ OnInstanceInit: 1@cata,281,12,0 script ins_bapho_to_2f WARPNPC,1,1,{ OnTouch: if (countitem(Token_Of_Apostle) > 0) { - delitem Token_Of_Apostle,countitem(Token_Of_Apostle); + delitem(Token_Of_Apostle, countitem(Token_Of_Apostle)); 'ins_baphomet = 5; - warp instance_mapname("2@cata"),80,144; + warp(instance_mapname("2@cata"), 80, 144); end; - } - else { - mes "[Ancient Hero's Soul]"; - mes "Where is your Token of Apostle? I said you should carry the Token of Apostle to pass this gate."; - close; + } else { + mes("[Ancient Hero's Soul]"); + mes("Where is your Token of Apostle? I said you should carry the Token of Apostle to pass this gate."); + close(); } OnInstanceInit: - disablenpc instance_npcname("ins_bapho_to_2f"); + disablenpc(instance_npcname("ins_bapho_to_2f")); end; } //== Gravestones =========================================== - script Gravestone#SS1 FAKE_NPC,{ if ('ins_baphomet == 1) { - getitem Soul_Pendant,1; + getitem(Soul_Pendant, 1); 'ins_baphomet = 2; - mes "A small object is shining under a leaning grave."; - next; - mes "[" + strcharinfo(PC_NAME) + "]"; - mes "I think this is the pendant..."; - close; - } - else { - mes "I can only feel gloom from this Gravestone."; - close; + mes("A small object is shining under a leaning grave."); + next(); + mesf("[%s]", strcharinfo(PC_NAME)); + mes("I think this is the pendant..."); + close(); + } else { + mes("I can only feel gloom from this Gravestone."); + close(); } } + 1@cata,86,214,0 duplicate(Gravestone#SS1) Gravestone#1F_1T CLEAR_NPC 1@cata,200,209,0 duplicate(Gravestone#SS1) Gravestone#1F_2T CLEAR_NPC 1@cata,230,195,0 duplicate(Gravestone#SS1) Gravestone#1F_3T CLEAR_NPC @@ -864,9 +841,10 @@ OnInstanceInit: 1@cata,267,30,0 duplicate(Gravestone#SS1) Gravestone#1F_13T CLEAR_NPC - script Gravestone#SS2 FAKE_NPC,{ - mes "I can only feel gloom from this Gravestone."; - close; + mes("I can only feel gloom from this Gravestone."); + close(); } + 1@cata,86,214,0 duplicate(Gravestone#SS2) Gravestone#1F_1F CLEAR_NPC 1@cata,200,209,0 duplicate(Gravestone#SS2) Gravestone#1F_2F CLEAR_NPC 1@cata,230,195,0 duplicate(Gravestone#SS2) Gravestone#1F_3F CLEAR_NPC @@ -884,41 +862,39 @@ OnInstanceInit: //== Bobbing Torches ======================================= - script Bobbing Torch#SS FAKE_NPC,{ .@party_id = getcharid(CHAR_ID_PARTY); - if (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR)) { - if (('ins_baphomet == 3) && (countitem(Essence_Of_Fire) < 11)) { - mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me."; - next; - mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch."; - next; + if (getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) { + if ('ins_baphomet == 3 && countitem(Essence_Of_Fire) < 11) { + mes("A huge torch appearing as if it can burn everything is bobbing up and down in front of me."); + next(); + mes("The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch."); + next(); specialeffect(EF_HOLYHIT, AREA, playerattached()); - getitem Essence_Of_Fire,1; - mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch."; - disablenpc instance_npcname(strnpcinfo(NPC_NAME)); - close; - } - else if (('ins_baphomet == 3) && (countitem(Essence_Of_Fire) > 10)) { - mes "You have 10 Essence of Fire already, so you don't need to collect any more."; - close; - } - else { - mes "You don't need to collect Essence of Fire anymore."; - close; + getitem(Essence_Of_Fire, 1); + mes("The symbol of inheritor shines. Then a small crystal falls into my hand from the torch."); + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); + close(); + } else if ('ins_baphomet == 3 && countitem(Essence_Of_Fire) > 10) { + mes("You have 10 Essence of Fire already, so you don't need to collect any more."); + close(); + } else { + mes("You don't need to collect Essence of Fire anymore."); + close(); } - } - else { - mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.."; - next; - mes "[Unknown Voice]"; - mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands."; + } else { + mes("A huge torch appearing as if it can burn everything is bobbing up and down in front of me.."); + next(); + mes("[Unknown Voice]"); + mes("You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands."); specialeffect(EF_FIRESPLASHHIT, AREA, playerattached()); - percentheal -50,0; - close; + percentheal(-50, 0); + close(); } OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(NPC_NAME)); + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); end; } + 1@cata,267,210,0 duplicate(Bobbing Torch#SS) Bobbing Torch#1 CLEAR_NPC 1@cata,85,182,0 duplicate(Bobbing Torch#SS) Bobbing Torch#2 CLEAR_NPC 1@cata,267,154,0 duplicate(Bobbing Torch#SS) Bobbing Torch#3 CLEAR_NPC @@ -934,186 +910,193 @@ OnInstanceInit: 1@cata,1,1,0 script ins_baphomet_1f_timer FAKE_NPC,{ OnInstanceInit: - disablenpc instance_npcname("ins_baphomet_1f_timer"); + disablenpc(instance_npcname("ins_baphomet_1f_timer")); end; OnEnable: - enablenpc instance_npcname("ins_baphomet_1f_timer"); - initnpctimer; + enablenpc(instance_npcname("ins_baphomet_1f_timer")); + initnpctimer(); end; OnDisable: - disablenpc instance_npcname("ins_baphomet_1f_timer"); - stopnpctimer; + disablenpc(instance_npcname("ins_baphomet_1f_timer")); + stopnpctimer(); end; OnTimer1800000: - mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : We don't have enough time! Hurry up!",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : We don't have enough time! Hurry up!"), bc_map, C_YELLOW); end; OnTimer2400000: - mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : My body is disappearing... Hurry up!",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : My body is disappearing... Hurry up!"), bc_map, C_YELLOW); end; OnTimer3000000: - mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : Everything is over... There is no other way but to wait for the next chance...",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : Everything is over... There is no other way but to wait for the next chance..."), bc_map, C_YELLOW); end; OnTimer3050000: - mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : We failed... However... We still have a chance. I hope you will train yourselves until the time comes.",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("1@cata"), _("Ancient Hero's Soul : We failed... However... We still have a chance. I hope you will train yourselves until the time comes."), bc_map, C_YELLOW); end; OnTimer3100000: - mapannounce instance_mapname("1@cata"), "You've failed to open the seal of main altar.",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("1@cata"), _("You've failed to open the seal of main altar."), bc_map, C_YELLOW); end; OnTimer3500000: - instance_warpall "monk_test",310,150; - stopnpctimer; + instance_warpall("monk_test", 310, 150); + stopnpctimer(); end; } 2@cata,80,144,0 script ins_2f_enter FAKE_NPC,3,3,{ OnTouch: - donpcevent instance_npcname("ins_2f_enter_broad")+"::OnEnable"; - disablenpc instance_npcname("ins_2f_enter"); + donpcevent(instance_npcname("ins_2f_enter_broad")+"::OnEnable"); + disablenpc(instance_npcname("ins_2f_enter")); end; } 2@cata,1,1,0 script ins_2f_enter_broad FAKE_NPC,{ OnInstanceInit: OnDisable: - disablenpc instance_npcname("ins_2f_enter_broad"); + disablenpc(instance_npcname("ins_2f_enter_broad")); end; OnEnable: - enablenpc instance_npcname("ins_2f_enter_broad"); - initnpctimer; + enablenpc(instance_npcname("ins_2f_enter_broad")); + initnpctimer(); end; OnTimer10000: - mapannounce instance_mapname("2@cata"), "Baphomet : Humans... interfering again...",bc_map,"0xdb7093"; + mapannounce(instance_mapname("2@cata"), _("Baphomet : Humans... interfering again..."), bc_map, "0xdb7093"); end; OnTimer13000: - mapannounce instance_mapname("2@cata"), "Apostle of Baphomet : Humans! Humans have invaded our sanctum!",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Apostle of Baphomet : Humans! Humans have invaded our sanctum!"), bc_map, C_YELLOW); end; OnTimer16000: - mapannounce instance_mapname("2@cata"), "Apostle of Baphomet : Kill the humans! Do not stop the revival of our Master!",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Apostle of Baphomet : Kill the humans! Do not stop the revival of our Master!"), bc_map, C_YELLOW); end; OnTimer18000: - mapannounce instance_mapname("2@cata"), "Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us!",bc_map,"0xFFFF00"; - stopnpctimer; - disablenpc instance_npcname("ins_2f_enter_broad"); + mapannounce(instance_mapname("2@cata"), _("Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us!"), bc_map, C_YELLOW); + stopnpctimer(); + disablenpc(instance_npcname("ins_2f_enter_broad")); end; } 2@cata,50,67,0 script slave_left FAKE_NPC,5,5,{ OnTouch: .@map$ = instance_mapname("2@cata"); - mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00"; - monster .@map$,55,67,"Apostle of Baphomet",1869,1; - monster .@map$,51,67,"Apostle of Baphomet",1291,1; - monster .@map$,58,67,"Apostle of Baphomet",1292,1; - monster .@map$,53,67,"Apostle of Baphomet",1291,1; - monster .@map$,54,67,"Apostle of Baphomet",1869,1; - monster .@map$,55,67,"Apostle of Baphomet",1291,1; - monster .@map$,56,67,"Apostle of Baphomet",1117,1; - monster .@map$,58,66,"Apostle of Baphomet",1869,1; - monster .@map$,56,66,"Apostle of Baphomet",1117,1; - monster .@map$,60,66,"Apostle of Baphomet",1132,1; - monster .@map$,59,66,"Apostle of Baphomet",1117,1; - monster .@map$,54,66,"Apostle of Baphomet",1132,1; - monster .@map$,55,66,"Apostle of Baphomet",1292,1; - monster .@map$,56,66,"Apostle of Baphomet",1132,1; - monster .@map$,50,65,"Apostle of Baphomet",1867,1; - monster .@map$,61,65,"Apostle of Baphomet",1292,1; - disablenpc instance_npcname("slave_left"); + mapannounce(.@map$, _("Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!"), bc_map, C_YELLOW); + monster(.@map$, 55, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1); + monster(.@map$, 51, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1); + monster(.@map$, 58, 67, _("Apostle of Baphomet"), MINI_DEMON, 1); + monster(.@map$, 53, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1); + monster(.@map$, 54, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1); + monster(.@map$, 55, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1); + monster(.@map$, 56, 67, _("Apostle of Baphomet"), EVIL_DRUID, 1); + monster(.@map$, 58, 66, _("Apostle of Baphomet"), FLAME_SKULL, 1); + monster(.@map$, 56, 66, _("Apostle of Baphomet"), EVIL_DRUID, 1); + monster(.@map$, 60, 66, _("Apostle of Baphomet"), KHALITZBURG, 1); + monster(.@map$, 59, 66, _("Apostle of Baphomet"), EVIL_DRUID, 1); + monster(.@map$, 54, 66, _("Apostle of Baphomet"), KHALITZBURG, 1); + monster(.@map$, 55, 66, _("Apostle of Baphomet"), MINI_DEMON, 1); + monster(.@map$, 56, 66, _("Apostle of Baphomet"), KHALITZBURG, 1); + monster(.@map$, 50, 65, _("Apostle of Baphomet"), BANSHEE, 1); + monster(.@map$, 61, 65, _("Apostle of Baphomet"), MINI_DEMON, 1); + disablenpc(instance_npcname("slave_left")); end; } 2@cata,109,67,0 script slave_right FAKE_NPC,5,5,{ OnTouch: .@map$ = instance_mapname("2@cata"); - mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00"; - monster .@map$,105,67,"Apostle of Baphomet",1869,1; - monster .@map$,104,67,"Apostle of Baphomet",1291,1; - monster .@map$,107,67,"Apostle of Baphomet",1869,1; - monster .@map$,106,67,"Apostle of Baphomet",1291,1; - monster .@map$,102,67,"Apostle of Baphomet",1869,1; - monster .@map$,103,67,"Apostle of Baphomet",1291,1; - monster .@map$,103,67,"Apostle of Baphomet",1117,1; - monster .@map$,109,66,"Apostle of Baphomet",1117,1; - monster .@map$,108,66,"Apostle of Baphomet",1132,1; - monster .@map$,101,66,"Apostle of Baphomet",1117,1; - monster .@map$,106,66,"Apostle of Baphomet",1292,1; - monster .@map$,102,66,"Apostle of Baphomet",1132,1; - monster .@map$,104,66,"Apostle of Baphomet",1292,1; - monster .@map$,103,66,"Apostle of Baphomet",1132,1; - monster .@map$,109,65,"Apostle of Baphomet",1867,1; - monster .@map$,108,65,"Apostle of Baphomet",1292,1; - disablenpc instance_npcname("slave_right"); + mapannounce(.@map$, _("Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!"), bc_map, C_YELLOW); + monster(.@map$, 105, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1); + monster(.@map$, 104, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1); + monster(.@map$, 107, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1); + monster(.@map$, 106, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1); + monster(.@map$, 102, 67, _("Apostle of Baphomet"), FLAME_SKULL, 1); + monster(.@map$, 103, 67, _("Apostle of Baphomet"), WRAITH_DEAD, 1); + monster(.@map$, 103, 67, _("Apostle of Baphomet"), EVIL_DRUID, 1); + monster(.@map$, 109, 66, _("Apostle of Baphomet"), EVIL_DRUID, 1); + monster(.@map$, 108, 66, _("Apostle of Baphomet"), KHALITZBURG, 1); + monster(.@map$, 101, 66, _("Apostle of Baphomet"), EVIL_DRUID, 1); + monster(.@map$, 106, 66, _("Apostle of Baphomet"), MINI_DEMON, 1); + monster(.@map$, 102, 66, _("Apostle of Baphomet"), KHALITZBURG, 1); + monster(.@map$, 104, 66, _("Apostle of Baphomet"), MINI_DEMON, 1); + monster(.@map$, 103, 66, _("Apostle of Baphomet"), KHALITZBURG, 1); + monster(.@map$, 109, 65, _("Apostle of Baphomet"), BANSHEE, 1); + monster(.@map$, 108, 65, _("Apostle of Baphomet"), MINI_DEMON, 1); + disablenpc(instance_npcname("slave_right")); end; } 2@cata,79,39,0 script slave_down FAKE_NPC,5,5,{ OnTouch: .@map$ = instance_mapname("2@cata"); - mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00"; - monster .@map$,78,41,"Apostle of Baphomet",1869,1; - monster .@map$,79,42,"Apostle of Baphomet",1291,1; - monster .@map$,78,46,"Apostle of Baphomet",1869,1; - monster .@map$,81,41,"Apostle of Baphomet",1291,1; - monster .@map$,81,42,"Apostle of Baphomet",1869,1; - monster .@map$,79,43,"Apostle of Baphomet",1291,1; - monster .@map$,77,40,"Apostle of Baphomet",1117,1; - monster .@map$,79,41,"Apostle of Baphomet",1132,1; - monster .@map$,79,42,"Apostle of Baphomet",1117,1; - monster .@map$,79,43,"Apostle of Baphomet",1132,1; - monster .@map$,79,48,"Apostle of Baphomet",1117,1; - monster .@map$,78,49,"Apostle of Baphomet",1132,1; - monster .@map$,78,41,"Apostle of Baphomet",1292,1; - monster .@map$,74,42,"Apostle of Baphomet",1292,1; - monster .@map$,72,48,"Apostle of Baphomet",1867,1; - monster .@map$,72,38,"Apostle of Baphomet",1292,1; - disablenpc instance_npcname("slave_down"); + mapannounce(.@map$, _("Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!"), bc_map, C_YELLOW); + monster(.@map$, 78, 41, _("Apostle of Baphomet"), FLAME_SKULL, 1); + monster(.@map$, 79, 42, _("Apostle of Baphomet"), WRAITH_DEAD, 1); + monster(.@map$, 78, 46, _("Apostle of Baphomet"), FLAME_SKULL, 1); + monster(.@map$, 81, 41, _("Apostle of Baphomet"), WRAITH_DEAD, 1); + monster(.@map$, 81, 42, _("Apostle of Baphomet"), FLAME_SKULL, 1); + monster(.@map$, 79, 43, _("Apostle of Baphomet"), WRAITH_DEAD, 1); + monster(.@map$, 77, 40, _("Apostle of Baphomet"), EVIL_DRUID, 1); + monster(.@map$, 79, 41, _("Apostle of Baphomet"), KHALITZBURG, 1); + monster(.@map$, 79, 42, _("Apostle of Baphomet"), EVIL_DRUID, 1); + monster(.@map$, 79, 43, _("Apostle of Baphomet"), KHALITZBURG, 1); + monster(.@map$, 79, 48, _("Apostle of Baphomet"), EVIL_DRUID, 1); + monster(.@map$, 78, 49, _("Apostle of Baphomet"), KHALITZBURG, 1); + monster(.@map$, 78, 41, _("Apostle of Baphomet"), MINI_DEMON, 1); + monster(.@map$, 74, 42, _("Apostle of Baphomet"), MINI_DEMON, 1); + monster(.@map$, 72, 48, _("Apostle of Baphomet"), BANSHEE, 1); + monster(.@map$, 72, 38, _("Apostle of Baphomet"), MINI_DEMON, 1); + disablenpc(instance_npcname("slave_down")); end; } //== Magical Seals ========================================= - script Magical Seal#SS FAKE_NPC,{ - .@seal_check = questprogress(3041,PLAYTIME); + .@seal_check = questprogress(3041, PLAYTIME); if (.@seal_check == 1) { specialeffect(EF_SILENCEATTACK, AREA, playerattached()); - percentheal -50,0; - sc_start Eff_Stone,30000,0; - mes "Your SP has not recovered yet. You lost your SP on the altar, but it seems the power of the seal has returned."; - close; + percentheal(-50, 0); + sc_start(Eff_Stone, 30000, 0); + mes("Your SP has not recovered yet. You lost your SP on the altar, but it seems the power of the seal has returned."); + close(); } - if (.@seal_check == 2) erasequest 3041; - specialeffect EF_LEXDIVINA; - disablenpc instance_npcname(strnpcinfo(NPC_NAME)); + if (.@seal_check == 2) + erasequest(3041); + specialeffect(EF_LEXDIVINA); + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); .@map$ = instance_mapname("2@cata"); - if (strnpcinfo(NPC_NAME_HIDDEN) == "0") areamobuseskill .@map$,79,81,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0; - else if (strnpcinfo(NPC_NAME_HIDDEN) == "2") areamobuseskill .@map$,123,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0; - else if (strnpcinfo(NPC_NAME_HIDDEN) == "4") areamobuseskill .@map$,123,22,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0; - else if (strnpcinfo(NPC_NAME_HIDDEN) == "8") areamobuseskill .@map$,35,21,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0; - else if (strnpcinfo(NPC_NAME_HIDDEN) == "10") areamobuseskill .@map$,35,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0; - percentheal -50,0; - sc_start Eff_Stone,20000,0; - setquest 3041; - mapannounce .@map$, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb"; - mes "I can feel the power of the altar came back by adding magical power."; - next; - mes "But you can't use your magic for 3 minutes because you used your SP on the altar."; - close; + if (strnpcinfo(NPC_NAME_HIDDEN) == "0") + areamobuseskill(.@map$, 79, 81, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0); + else if (strnpcinfo(NPC_NAME_HIDDEN) == "2") + areamobuseskill(.@map$, 123, 109, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0); + else if (strnpcinfo(NPC_NAME_HIDDEN) == "4") + areamobuseskill(.@map$, 123, 22, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0); + else if (strnpcinfo(NPC_NAME_HIDDEN) == "8") + areamobuseskill(.@map$, 35, 21, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0); + else if (strnpcinfo(NPC_NAME_HIDDEN) == "10") + areamobuseskill(.@map$, 35, 109, 10, BAPHOMET_I, "NPC_INVINCIBLEOFF", 1, 0, 0, e_hlp, 0); + percentheal(-50, 0); + sc_start(Eff_Stone, 20000, 0); + setquest(3041); + mapannounce(.@map$, _("The seal activated by putting magical power into the altar."), bc_map, "0x87ceeb"); + mes("I can feel the power of the altar came back by adding magical power."); + next(); + mes("But you can't use your magic for 3 minutes because you used your SP on the altar."); + close(); OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(NPC_NAME)); + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); end; } + 2@cata,79,81,0 duplicate(Magical Seal#SS) Magical Seal#0 CLEAR_NPC 2@cata,123,109,0 duplicate(Magical Seal#SS) Magical Seal#2 CLEAR_NPC 2@cata,123,22,0 duplicate(Magical Seal#SS) Magical Seal#4 CLEAR_NPC @@ -1122,137 +1105,137 @@ OnInstanceInit: 2@cata,79,65,0 script The Main Altar#ss CLEAR_NPC,{ .@party_id = getcharid(CHAR_ID_PARTY); - if (('ins_baphomet == 5) && (getpartyleader(.@party_id,2) == getcharid(CHAR_ID_CHAR))) { - mes "An evil power, too terrible to describe, lies under the great altar radiating a violet color."; - next; - mes "Complicated Magical Rune letters blink rapidly, attempting to suppress the dreadful power within."; - next; - mes "The bottom of the Main Altar trembles furiously."; - next; - specialeffect EF_METEORSTORM; - specialeffect EF_METEORSTORM; - mes "[" + strcharinfo(PC_NAME) + "]"; - mes "Watch out! Something... Something is coming."; + if ('ins_baphomet == 5 && getpartyleader(.@party_id, 2) == getcharid(CHAR_ID_CHAR)) { + mes("An evil power, too terrible to describe, lies under the great altar radiating a violet color."); + next(); + mes("Complicated Magical Rune letters blink rapidly, attempting to suppress the dreadful power within."); + next(); + mes("The bottom of the Main Altar trembles furiously."); + next(); + specialeffect(EF_METEORSTORM); + specialeffect(EF_METEORSTORM); + mesf("[%s]", strcharinfo(PC_NAME)); + mes("Watch out! Something... Something is coming."); 'ins_baphomet = 6; - donpcevent instance_npcname("ins_2f_hero_broad")+"::OnEnable"; - disablenpc instance_npcname("The Main Altar#ss"); - close; - } - else { - mes "An evil power, too terrible to describe, lies under the great altar radiating a violet color."; - next; - mes "Complicated Magical Rune letters blink rapidly, attempting to suppress the dreadful power within."; - close; + donpcevent(instance_npcname("ins_2f_hero_broad")+"::OnEnable"); + disablenpc(instance_npcname("The Main Altar#ss")); + close(); + } else { + mes("An evil power, too terrible to describe, lies under the great altar radiating a violet color."); + next(); + mes("Complicated Magical Rune letters blink rapidly, attempting to suppress the dreadful power within."); + close(); } end; } 2@cata,80,63,4 script Ancient Hero's Soul#2F 4_M_CHAMPSOUL,{ - cutin "ins_cata_champ_s",2; - if (questprogress(3041)) erasequest 3041; - mes "[Ancient Hero's Soul]"; - mes "Good job, my descendants... You've finished the long-cherished task that me and my bretheren could not complete."; - next; - mes "[Ancient Hero's Soul]"; - mes "I really appreciate your help."; - mes "Our souls can finally rest in peace..."; - next; - mes "[Ancient Hero's Soul]"; - mes "The struggle for peace on this world will never end. But... my role here is finally over because there are brave heroes like you."; - next; - switch(select("Let me leave the shrine.", "Stop talking.")) { + cutin("ins_cata_champ_s", 2); + if (questprogress(3041)) + erasequest(3041); + mes("[Ancient Hero's Soul]"); + mes("Good job, my descendants... You've finished the long-cherished task that me and my bretheren could not complete."); + next(); + mes("[Ancient Hero's Soul]"); + mes("I really appreciate your help."); + mes("Our souls can finally rest in peace..."); + next(); + mes("[Ancient Hero's Soul]"); + mes("The struggle for peace on this world will never end. But... my role here is finally over because there are brave heroes like you."); + next(); + switch (select("Let me leave the shrine.", "Stop talking.")) { case 1: - mes "[Ancient Hero's Soul]"; - mes "Okay. I'll let you and your group leave here safely."; - next; - mes "[Ancient Hero's Soul]"; - mes "If you leave, please say hello to Patrick for me."; - cutin "",255; + mes("[Ancient Hero's Soul]"); + mes("Okay. I'll let you and your group leave here safely."); + next(); + mes("[Ancient Hero's Soul]"); + mes("If you leave, please say hello to Patrick for me."); + cutin("", 255); 'ins_baphomet = 0; - warp "monk_test",310,150; - close; + warp("monk_test", 310, 150); + close(); case 2: - mes "[Ancient Hero's Soul]"; - mes "Do you still have something to do here? If you're done I'll let you leave safely..."; - cutin "",255; - close; + mes("[Ancient Hero's Soul]"); + mes("Do you still have something to do here? If you're done I'll let you leave safely..."); + cutin("", 255); + close(); } OnInstanceInit: - disablenpc instance_npcname("Ancient Hero's Soul#2F"); + disablenpc(instance_npcname("Ancient Hero's Soul#2F")); end; } 2@cata,1,2,0 script ins_2f_hero_broad FAKE_NPC,{ OnEnable: - enablenpc instance_npcname("ins_2f_hero_broad"); - initnpctimer; + enablenpc(instance_npcname("ins_2f_hero_broad")); + initnpctimer(); end; OnDisable: - disablenpc instance_npcname("ins_2f_hero_broad"); + disablenpc(instance_npcname("ins_2f_hero_broad")); end; OnTimer3000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : My God! The seal of the Main Altar is weakening!",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : My God! The seal of the Main Altar is weakening!"), bc_map, C_YELLOW); end; OnTimer6000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : My descendants... Listen carefully to what I'm going to say.",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : My descendants... Listen carefully to what I'm going to say."), bc_map, C_YELLOW); end; OnTimer9000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The altars that control the Main Altar's power are located in the Northeast, Southeast, Southwest and Northwest corners of this room.",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The altars that control the Main Altar's power are located in the Northeast, Southeast, Southwest and Northwest corners of this room."), bc_map, C_YELLOW); end; OnTimer12000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Find these altars and activate their seals before Baphomet revives.",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : Find these altars and activate their seals before Baphomet revives."), bc_map, C_YELLOW); end; OnTimer15000: - mapannounce instance_mapname("2@cata"), "Baphomet : It's too late, weaklings... Now, you'll feel the despair of death!",bc_map,"0xdb7093"; + mapannounce(instance_mapname("2@cata"), _("Baphomet : It's too late, weaklings... Now, you'll feel the despair of death!"), bc_map, "0xdb7093"); end; OnTimer17000: - mapannounce instance_mapname("2@cata"), "Baphomet : No one can harm me here. You will be my first sacrifice.",bc_map,"0xdb7093"; - donpcevent instance_npcname("control_baphomet")+"::OnEnable"; - donpcevent instance_npcname("ins_2f_hero_broad2")+"::OnEnable"; - stopnpctimer; - disablenpc instance_npcname("ins_2f_hero_broad"); + mapannounce(instance_mapname("2@cata"), _("Baphomet : No one can harm me here. You will be my first sacrifice."), bc_map, "0xdb7093"); + donpcevent(instance_npcname("control_baphomet")+"::OnEnable"); + donpcevent(instance_npcname("ins_2f_hero_broad2")+"::OnEnable"); + stopnpctimer(); + disablenpc(instance_npcname("ins_2f_hero_broad")); end; } 2@cata,3,3,0 script control_baphomet FAKE_NPC,{ OnInstanceInit: OnDisable: - disablenpc instance_npcname("control_baphomet"); + disablenpc(instance_npcname("control_baphomet")); end; OnEnable: - enablenpc instance_npcname("control_baphomet"); - donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnEnable"; - monster instance_mapname("2@cata"),79,64,"Baphomet#",1929,1,instance_npcname("control_baphomet")+"::OnMyMobDead"; + enablenpc(instance_npcname("control_baphomet")); + donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnEnable"); + monster(instance_mapname("2@cata"), 79, 64, "Baphomet#", BAPHOMET_I, 1, instance_npcname("control_baphomet")+"::OnMyMobDead"); end; OnMyMobDead: .@map$ = instance_mapname("2@cata"); - if (mobcount(.@map$,instance_npcname("control_baphomet")+"::OnMyMobDead") < 1) { + if (mobcount(.@map$, instance_npcname("control_baphomet")+"::OnMyMobDead") < 1) { 'ins_baphomet = 7; - erasequest 3041; - mapannounce .@map$, "Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!...",bc_map,"0xdb7093"; - enablenpc instance_npcname("Ancient Hero's Soul#2F"); - disablenpc instance_npcname("slave_down"); - disablenpc instance_npcname("slave_left"); - disablenpc instance_npcname("slave_right"); - donpcevent instance_npcname("ins_2f_hero_broad")+"::OnDisable"; - donpcevent instance_npcname("ins_2f_hero_broad2")+"::OnDisable"; - donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable"; - donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnDisable"; - donpcevent instance_npcname("2f_callmon_pattern")+"::OnDisable"; - donpcevent instance_npcname("ins_2f_hero_pattern")+"::OnDisable"; - donpcevent instance_npcname("ins_2f_enter_broad")+"::OnDisable"; - donpcevent instance_npcname("control_baphomet")+"::OnDisable"; - disablenpc instance_npcname("control_baphomet"); + erasequest(3041); + mapannounce(.@map$, _("Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!..."), bc_map, "0xdb7093"); + enablenpc(instance_npcname("Ancient Hero's Soul#2F")); + disablenpc(instance_npcname("slave_down")); + disablenpc(instance_npcname("slave_left")); + disablenpc(instance_npcname("slave_right")); + donpcevent(instance_npcname("ins_2f_hero_broad")+"::OnDisable"); + donpcevent(instance_npcname("ins_2f_hero_broad2")+"::OnDisable"); + donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable"); + donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnDisable"); + donpcevent(instance_npcname("2f_callmon_pattern")+"::OnDisable"); + donpcevent(instance_npcname("ins_2f_hero_pattern")+"::OnDisable"); + donpcevent(instance_npcname("ins_2f_enter_broad")+"::OnDisable"); + donpcevent(instance_npcname("control_baphomet")+"::OnDisable"); + disablenpc(instance_npcname("control_baphomet")); } end; } @@ -1260,232 +1243,232 @@ OnMyMobDead: 2@cata,2,2,0 script ins_2f_hero_broad2 FAKE_NPC,{ OnInstanceInit: OnDisable: - disablenpc instance_npcname("ins_2f_hero_broad2"); + disablenpc(instance_npcname("ins_2f_hero_broad2")); end; OnEnable: - enablenpc instance_npcname("ins_2f_hero_broad2"); - initnpctimer; + enablenpc(instance_npcname("ins_2f_hero_broad2")); + initnpctimer(); end; OnTimer8000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Don't be discouraged, Baphomet can still be defeated!",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : Don't be discouraged, Baphomet can still be defeated!"), bc_map, C_YELLOW); end; OnTimer11000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Go to the altars and activate their seals.",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : Go to the altars and activate their seals."), bc_map, C_YELLOW); end; OnTimer13000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Once the seals recover their power, Baphomet will be vulnerable.",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : Once the seals recover their power, Baphomet will be vulnerable."), bc_map, C_YELLOW); end; OnTimer16000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : You should lure Baphomet to the unsealed Altars. Otherwise, your efforts will be futile.",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : You should lure Baphomet to the unsealed Altars. Otherwise, your efforts will be futile."), bc_map, C_YELLOW); end; OnTimer19000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : We have only 1 hour to stop Baphomet. If time runs out, the power of the seals will be useless.",bc_map,"0xFFFF00"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : We have only 1 hour to stop Baphomet. If time runs out, the power of the seals will be useless."), bc_map, C_YELLOW); end; OnTimer22000: - mapannounce instance_mapname("2@cata"), "Baphomet : It's useless. Make more seals. I'll crush them all. None of you will survive!",bc_map,"0xdb7093"; + mapannounce(instance_mapname("2@cata"), _("Baphomet : It's useless. Make more seals. I'll crush them all. None of you will survive!"), bc_map, "0xdb7093"); end; OnTimer26000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the central seal is running out. Go to the central seal and put the magical power.",bc_map,"0xFFFF00"; - enablenpc instance_npcname("Magical Seal#0"); - disablenpc instance_npcname("Magical Seal#2"); - disablenpc instance_npcname("Magical Seal#4"); - disablenpc instance_npcname("Magical Seal#8"); - disablenpc instance_npcname("Magical Seal#10"); - donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnEnable"; - stopnpctimer; - disablenpc instance_npcname("ins_2f_hero_broad2"); + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the central seal is running out. Go to the central seal and put the magical power."), bc_map, C_YELLOW); + enablenpc(instance_npcname("Magical Seal#0")); + disablenpc(instance_npcname("Magical Seal#2")); + disablenpc(instance_npcname("Magical Seal#4")); + disablenpc(instance_npcname("Magical Seal#8")); + disablenpc(instance_npcname("Magical Seal#10")); + donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnEnable"); + stopnpctimer(); + disablenpc(instance_npcname("ins_2f_hero_broad2")); end; } 2@cata,4,1,0 script 2f_callmon_pattern_c FAKE_NPC,{ OnInstanceInit: - disablenpc instance_npcname("2f_callmon_pattern_c"); + disablenpc(instance_npcname("2f_callmon_pattern_c")); end; OnEnable: - enablenpc instance_npcname("2f_callmon_pattern_c"); - initnpctimer; - donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnGo"; + enablenpc(instance_npcname("2f_callmon_pattern_c")); + initnpctimer(); + donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnGo"); end; OnDisable: - stopnpctimer; - disablenpc instance_npcname("2f_callmon_pattern_c"); + stopnpctimer(); + disablenpc(instance_npcname("2f_callmon_pattern_c")); end; OnGo: - donpcevent instance_npcname("2f_callmon_pattern")+"::OnEnable"; + donpcevent(instance_npcname("2f_callmon_pattern")+"::OnEnable"); end; OnTimer3600000: - donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnDisable"; + donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnDisable"); end; } 2@cata,4,2,0 script 2f_callmon_pattern FAKE_NPC,{ OnInstanceInit: - disablenpc instance_npcname("2f_callmon_pattern"); + disablenpc(instance_npcname("2f_callmon_pattern")); end; OnEnable: - enablenpc instance_npcname("2f_callmon_pattern"); - stopnpctimer; - initnpctimer; + enablenpc(instance_npcname("2f_callmon_pattern")); + stopnpctimer(); + initnpctimer(); end; OnDisable: - disablenpc instance_npcname("2f_callmon_pattern"); - stopnpctimer; + disablenpc(instance_npcname("2f_callmon_pattern")); + stopnpctimer(); end; OnTimer300000: - enablenpc instance_npcname("slave_down"); - enablenpc instance_npcname("slave_left"); - enablenpc instance_npcname("slave_right"); - donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnGo"; + enablenpc(instance_npcname("slave_down")); + enablenpc(instance_npcname("slave_left")); + enablenpc(instance_npcname("slave_right")); + donpcevent(instance_npcname("2f_callmon_pattern_c")+"::OnGo"); end; } 2@cata,3,1,0 script ins_2f_hero_pattern_c FAKE_NPC,{ OnInstanceInit: - disablenpc instance_npcname("ins_2f_hero_pattern_c"); + disablenpc(instance_npcname("ins_2f_hero_pattern_c")); end; OnEnable: - enablenpc instance_npcname("ins_2f_hero_pattern_c"); - initnpctimer; - donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnGo"; + enablenpc(instance_npcname("ins_2f_hero_pattern_c")); + initnpctimer(); + donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnGo"); end; OnGo: - donpcevent instance_npcname("ins_2f_hero_pattern")+"::OnEnable"; + donpcevent(instance_npcname("ins_2f_hero_pattern")+"::OnEnable"); end; OnDisable: - stopnpctimer; - disablenpc instance_npcname("Magical Seal#0"); - disablenpc instance_npcname("Magical Seal#2"); - disablenpc instance_npcname("Magical Seal#4"); - disablenpc instance_npcname("Magical Seal#8"); - disablenpc instance_npcname("Magical Seal#10"); - donpcevent instance_npcname("ins_2f_hero_pattern")+"::OnDisable"; - disablenpc instance_npcname("ins_2f_hero_pattern_c"); + stopnpctimer(); + disablenpc(instance_npcname("Magical Seal#0")); + disablenpc(instance_npcname("Magical Seal#2")); + disablenpc(instance_npcname("Magical Seal#4")); + disablenpc(instance_npcname("Magical Seal#8")); + disablenpc(instance_npcname("Magical Seal#10")); + donpcevent(instance_npcname("ins_2f_hero_pattern")+"::OnDisable"); + disablenpc(instance_npcname("ins_2f_hero_pattern_c")); end; OnTimer3600000: - mapannounce instance_mapname("2@cata"), "Baphomet : krrrr... Now you can't stop me with the seals. All you can do is wait for death!",bc_map,"0xdb7093"; + mapannounce(instance_mapname("2@cata"), _("Baphomet : krrrr... Now you can't stop me with the seals. All you can do is wait for death!"), bc_map, "0xdb7093"); end; OnTimer3605000: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : We can't stop Baphomet with the magical power of the seals anymore. Now everything depends on God...",bc_map,"0xFFFF00"; - donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable"; + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : We can't stop Baphomet with the magical power of the seals anymore. Now everything depends on God..."), bc_map, C_YELLOW); + donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable"); end; } 2@cata,3,2,0 script ins_2f_hero_pattern FAKE_NPC,{ OnInstanceInit: - disablenpc instance_npcname("ins_2f_hero_pattern"); + disablenpc(instance_npcname("ins_2f_hero_pattern")); end; OnEnable: - enablenpc instance_npcname("ins_2f_hero_pattern"); - initnpctimer; + enablenpc(instance_npcname("ins_2f_hero_pattern")); + initnpctimer(); end; OnDisable: - disablenpc instance_npcname("ins_2f_hero_pattern"); - stopnpctimer; + disablenpc(instance_npcname("ins_2f_hero_pattern")); + stopnpctimer(); end; OnTimer70000: - switch(rand(1,5)) { + switch (rand(1, 5)) { case 1: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!",bc_map,"0xFFFF00"; - enablenpc instance_npcname("Magical Seal#0"); - disablenpc instance_npcname("Magical Seal#2"); - disablenpc instance_npcname("Magical Seal#4"); - disablenpc instance_npcname("Magical Seal#8"); - disablenpc instance_npcname("Magical Seal#10"); + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!"), bc_map, C_YELLOW); + enablenpc(instance_npcname("Magical Seal#0")); + disablenpc(instance_npcname("Magical Seal#2")); + disablenpc(instance_npcname("Magical Seal#4")); + disablenpc(instance_npcname("Magical Seal#8")); + disablenpc(instance_npcname("Magical Seal#10")); break; case 2: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 2 o'clock is running out. Go to 2 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00"; - disablenpc instance_npcname("Magical Seal#0"); - enablenpc instance_npcname("Magical Seal#2"); - disablenpc instance_npcname("Magical Seal#4"); - disablenpc instance_npcname("Magical Seal#8"); - disablenpc instance_npcname("Magical Seal#10"); + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the seal at 2 o'clock is running out. Go to 2 o'clock and put the magical power in the seal."), bc_map, C_YELLOW); + disablenpc(instance_npcname("Magical Seal#0")); + enablenpc(instance_npcname("Magical Seal#2")); + disablenpc(instance_npcname("Magical Seal#4")); + disablenpc(instance_npcname("Magical Seal#8")); + disablenpc(instance_npcname("Magical Seal#10")); break; case 3: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 4 o'clock is running out. Go to 4 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00"; - disablenpc instance_npcname("Magical Seal#0"); - disablenpc instance_npcname("Magical Seal#2"); - enablenpc instance_npcname("Magical Seal#4"); - disablenpc instance_npcname("Magical Seal#8"); - disablenpc instance_npcname("Magical Seal#10"); + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the seal at 4 o'clock is running out. Go to 4 o'clock and put the magical power in the seal."), bc_map, C_YELLOW); + disablenpc(instance_npcname("Magical Seal#0")); + disablenpc(instance_npcname("Magical Seal#2")); + enablenpc(instance_npcname("Magical Seal#4")); + disablenpc(instance_npcname("Magical Seal#8")); + disablenpc(instance_npcname("Magical Seal#10")); break; case 4: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 8 o'clock is running out. Go to 8 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00"; - disablenpc instance_npcname("Magical Seal#0"); - disablenpc instance_npcname("Magical Seal#2"); - disablenpc instance_npcname("Magical Seal#4"); - enablenpc instance_npcname("Magical Seal#8"); - disablenpc instance_npcname("Magical Seal#10"); + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the seal at 8 o'clock is running out. Go to 8 o'clock and put the magical power in the seal."), bc_map, C_YELLOW); + disablenpc(instance_npcname("Magical Seal#0")); + disablenpc(instance_npcname("Magical Seal#2")); + disablenpc(instance_npcname("Magical Seal#4")); + enablenpc(instance_npcname("Magical Seal#8")); + disablenpc(instance_npcname("Magical Seal#10")); break; case 5: - mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 10 o'clock is running out. Go to 10 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00"; - disablenpc instance_npcname("Magical Seal#0"); - disablenpc instance_npcname("Magical Seal#2"); - disablenpc instance_npcname("Magical Seal#4"); - disablenpc instance_npcname("Magical Seal#8"); - enablenpc instance_npcname("Magical Seal#10"); + mapannounce(instance_mapname("2@cata"), _("Ancient Hero's Soul : The magical power of the seal at 10 o'clock is running out. Go to 10 o'clock and put the magical power in the seal."), bc_map, C_YELLOW); + disablenpc(instance_npcname("Magical Seal#0")); + disablenpc(instance_npcname("Magical Seal#2")); + disablenpc(instance_npcname("Magical Seal#4")); + disablenpc(instance_npcname("Magical Seal#8")); + enablenpc(instance_npcname("Magical Seal#10")); } - stopnpctimer; - donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnGo"; + stopnpctimer(); + donpcevent(instance_npcname("ins_2f_hero_pattern_c")+"::OnGo"); end; } 1@cata,1,1,0 script ins_1f_spawn_mobs FAKE_NPC,{ OnInstanceInit: .@map$ = instance_mapname("1@cata"); - monster .@map$,0,0,"Zombie Master",1298,10; - monster .@map$,0,0,"Wraith Dead",1291,10; - //monster .@map$,0,0,"Ancient Mimic",1699,10; - monster .@map$,0,0,"Flame Skull",1869,10; - monster .@map$,0,0,"Skeleton General",1290,10; - monster .@map$,0,0,"Zombie Master",1298,10; - monster .@map$,0,0,"Skeleton General",1290,10; - monster .@map$,0,0,"Flame Skull",1869,10; - monster .@map$,0,0,"Wraith Dead",1291,10; - monster .@map$,0,0,"Wraith Dead",1291,10; - monster .@map$,0,0,"Khalitzburg",1132,10; - monster .@map$,0,0,"Khalitzburg",1132,10; - monster .@map$,0,0,"Flame Skull",1869,10; - monster .@map$,0,0,"Flame Skull",1869,10; - monster .@map$,0,0,"Ancient Mimic",1699,10; - monster .@map$,0,0,"Zombie Master",1298,10; - monster .@map$,0,0,"Ancient Mimic",1699,10; - monster .@map$,0,0,"Zombie Master",1298,10; - monster .@map$,0,0,"Wraith Dead",1291,10; - monster .@map$,0,0,"Skeleton General",1290,10; - monster .@map$,0,0,"Skeleton General",1290,10; - monster .@map$,0,0,"Wind Ghost",1263,10; - monster .@map$,0,0,"Wind Ghost",1263,10; - monster .@map$,0,0,"Wind Ghost",1263,10; - monster .@map$,0,0,"Lude",1509,10; - monster .@map$,0,0,"Lude",1509,10; - monster .@map$,0,0,"Evil Druid",1117,10; - monster .@map$,0,0,"Evil Druid",1117,10; - monster .@map$,0,0,"Evil Druid",1117,10; - monster .@map$,0,0,"Banshee",1867,10; - monster .@map$,0,0,"Dark Illusion",1302,1; - disablenpc instance_npcname("ins_1f_spawn_mobs"); + monster(.@map$, 0, 0, _("Zombie Master"), ZOMBIE_MASTER, 10); + monster(.@map$, 0, 0, _("Wraith Dead"), WRAITH_DEAD, 10); + //monster(.@map$, 0, 0, _("Ancient Mimic"), ANCIENT_MIMIC, 10); + monster(.@map$, 0, 0, _("Flame Skull"), FLAME_SKULL, 10); + monster(.@map$, 0, 0, _("Skeleton General"), SKELETON_GENERAL, 10); + monster(.@map$, 0, 0, _("Zombie Master"), ZOMBIE_MASTER, 10); + monster(.@map$, 0, 0, _("Skeleton General"), SKELETON_GENERAL, 10); + monster(.@map$, 0, 0, _("Flame Skull"), FLAME_SKULL, 10); + monster(.@map$, 0, 0, _("Wraith Dead"), WRAITH_DEAD, 10); + monster(.@map$, 0, 0, _("Wraith Dead"), WRAITH_DEAD, 10); + monster(.@map$, 0, 0, _("Khalitzburg"), KHALITZBURG, 10); + monster(.@map$, 0, 0, _("Khalitzburg"), KHALITZBURG, 10); + monster(.@map$, 0, 0, _("Flame Skull"), FLAME_SKULL, 10); + monster(.@map$, 0, 0, _("Flame Skull"), FLAME_SKULL, 10); + monster(.@map$, 0, 0, _("Ancient Mimic"), ANCIENT_MIMIC, 10); + monster(.@map$, 0, 0, _("Zombie Master"), ZOMBIE_MASTER, 10); + monster(.@map$, 0, 0, _("Ancient Mimic"), ANCIENT_MIMIC, 10); + monster(.@map$, 0, 0, _("Zombie Master"), ZOMBIE_MASTER, 10); + monster(.@map$, 0, 0, _("Wraith Dead"), WRAITH_DEAD, 10); + monster(.@map$, 0, 0, _("Skeleton General"), SKELETON_GENERAL, 10); + monster(.@map$, 0, 0, _("Skeleton General"), SKELETON_GENERAL, 10); + monster(.@map$, 0, 0, _("Wind Ghost"), WIND_GHOST, 10); + monster(.@map$, 0, 0, _("Wind Ghost"), WIND_GHOST, 10); + monster(.@map$, 0, 0, _("Wind Ghost"), WIND_GHOST, 10); + monster(.@map$, 0, 0, _("Lude"), LUDE, 10); + monster(.@map$, 0, 0, _("Lude"), LUDE, 10); + monster(.@map$, 0, 0, _("Evil Druid"), EVIL_DRUID, 10); + monster(.@map$, 0, 0, _("Evil Druid"), EVIL_DRUID, 10); + monster(.@map$, 0, 0, _("Evil Druid"), EVIL_DRUID, 10); + monster(.@map$, 0, 0, _("Banshee"), BANSHEE, 10); + monster(.@map$, 0, 0, _("Dark Illusion"), DARK_ILLUSION, 1); + disablenpc(instance_npcname("ins_1f_spawn_mobs")); end; } diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt index e1e547174..90334cc6e 100644 --- a/npc/kafras/functions_kafras.txt +++ b/npc/kafras/functions_kafras.txt @@ -216,14 +216,23 @@ function script F_KafStor { // Niflheim Specific Message if (getarg(2) == 1) { mes "^666666S-s-ssoooorry,"; - mes "y-you're a-a-aaaa"; - mes "Nooviiice... N-neeeds"; - mes "B-basic sssskill l-level 6...^000000"; + if (Class == Job_Summoner) { + mes "y-you n-neeed"; + mes "N-new b-basic sssskill...^000000"; + } else { + mes "y-you're a-a-aaaa"; + mes "Nooviiice... N-neeeds"; + mes "B-basic sssskill l-level 6...^000000"; + } return; } mes "I'm sorry, but you"; - mes "need the Novice's"; - mes "Basic Skill Level 6 to"; + if (Class == Job_Summoner) { + mes "need the New Basic Skill to"; + } else { + mes "need the Novice's"; + mes "Basic Skill Level 6 to"; + } mes "use the Storage Service."; return; } diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt index bc19ff048..5a15ff1d2 100644 --- a/npc/other/Global_Functions.txt +++ b/npc/other/Global_Functions.txt @@ -269,17 +269,30 @@ function script F_GetWeaponType { // Determines equipment type by equip location function script F_GetArmorType { switch(getiteminfo(getarg(0),5)) { - case 001: return "Lower Headgear"; break; - case 2: return "Weapon"; break; + case 1: return "Lower Headgear"; break; + case 2: return callfunc("F_GetWeaponType", getarg(0)); break; case 4: return "Garment"; break; case 8: return "Accessory"; break; case 16: return "Armor"; break; case 32: return "Shield"; break; case 64: return "Shoes"; break; case 128: return "Accessory"; break; + case 136: return "Accessory"; break; case 256: return "Upper Headgear"; break; case 512: return "Middle Headgear"; break; - default: return "Unable to Determine Equip Location"; break; + case 1024: return "Costume Upper Headgear"; break; + case 2048: return "Costume Midle Headgear"; break; + case 4096: return "Costume Lower Headgear"; break; + case 8192: return "Costume Garment"; break; + case 32768: return "Ammo"; break; + case 65536: return "Shadow Armor"; break; + case 131072: return "Shadow Weapon"; break; + case 262144: return "Shadow Shield"; break; + case 524288: return "Shadow Shoes"; break; + case 1048576: return "Shadow Accessory"; break; + case 2097152: return "Shadow Accessory"; break; + case 3145728: return "Shadow Accessory"; break; + default: return "Unknown Equip Type"; break; } end; } diff --git a/npc/re/instances/ghost_palace.txt b/npc/re/instances/ghost_palace.txt index 6e77db2f8..e4ca12f99 100644 --- a/npc/re/instances/ghost_palace.txt +++ b/npc/re/instances/ghost_palace.txt @@ -35,7 +35,7 @@ dali02,44,129,5 script Unpleasent Royal Guard 4_M_SAKRAYROYAL,{ if (BaseLevel < 120) { mes("[Unpleasent Royal Guard]"); mes("Althought I need help with a task, you are not strong enough to assist me, noob~!"); - next; + next(); mes("[Unpleasent Royal Guard]"); mes("Come back after when you have done some training and are at least level 120!"); close(); @@ -50,7 +50,7 @@ dali02,44,129,5 script Unpleasent Royal Guard 4_M_SAKRAYROYAL,{ mes("[Unpleasent Royal Guard]"); mes("Did the gate close?\r" "Please enter the gate as soon as you can next time."); - erasequest 1260; + erasequest(1260); close(); } mes("[Unpleasent Royal Guard]"); @@ -64,7 +64,7 @@ dali02,44,129,5 script Unpleasent Royal Guard 4_M_SAKRAYROYAL,{ mes("This is a solo instance. Please form a solo party before continuing."); close(); } - if (getcharid(CHAR_ID_CHAR) != 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?"); @@ -72,25 +72,25 @@ dali02,44,129,5 script Unpleasent Royal Guard 4_M_SAKRAYROYAL,{ } mes("[Unpleasent Royal Guard]"); mes("I need some help, even from the likes of you."); - next; + next(); mes("[Unpleasent Royal Guard]"); mes("In the middle of the battle the princess disappeared while I was guarding the palace."); - next; + next(); mes("[Unpleasent Royal Guard]"); mes("You run ahead and i will catch up.\r" "We must save her."); - next; + next(); if (select("I will help.", "This is not a good time.") == 2) { mes("[Unpleasent Royal Guard]"); mes("Even now all the royal guards are fighting and dying to the monsters."); - next; + next(); mes("[Unpleasent Royal Guard]"); mes("We must save the princess no matter how much fear grips our hearts!"); close(); } - .@instance = instance_create("Ghost Palace", .@party_id); + .@instance = instance_create(_("Ghost Palace"), .@party_id); .@p_name$ = getpartyname(.@party_id); - .@md_name$ = "Ghost Palace"; + .@md_name$ = _("Ghost Palace"); if (.@instance < 0) { mesf("Party Name: %s", .@p_name$); mesf("Party Leader: %s", strcharinfo(PC_NAME)); @@ -100,7 +100,8 @@ dali02,44,129,5 script Unpleasent Royal Guard 4_M_SAKRAYROYAL,{ if (instance_attachmap("1@spa", .@instance) != "") { instance_set_timeout(3600, 300, .@instance); instance_init(.@instance); - if (!questprogress(1260)) setquest 1260; + if (!questprogress(1260)) + setquest(1260); mes("[Unpleasent Royal Guard]"); mes("Thank You..\r" "I will open the secret passage to ^0000FFGhost Palace.^000000\r" @@ -117,23 +118,23 @@ dali02,41,134,0 script Interdimensional Device::gpportal PORTAL,{ if (BaseLevel < 120) { mes("[Unpleasent Royal Guard]"); mes("Althought I need help with a task, you are not strong enough to assist me, noob~!"); - next; + next(); mes("[Unpleasent Royal Guard]"); mes("Come back after when you have done some training and are at least level 120!"); close(); } if (questprogress(1261)) { if (questprogress(1261, PLAYTIME) == 2) { - erasequest 1261; + erasequest(1261); if (questprogress(1260)) - erasequest 1260; + erasequest(1260); end; } mes("[Unpleasent Royal Guard]"); 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(CHAR_ID_CHAR) == 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?"); @@ -141,11 +142,11 @@ dali02,41,134,0 script Interdimensional Device::gpportal PORTAL,{ } mes("[Unpleasent Royal Guard]"); mes("I can see the secret passage into the Palace... Are you ready to save the princess?!"); - next; + next(); if (select("Enter", "Stop") == 2) { mes("[Unpleasent Royal Guard]"); mes("Even now all the royal guards are fighting and dying to the monsters."); - next; + next(); mes("[Unpleasent Royal Guard]"); mes("We must save the princess no matter how much fear grips our hearts!"); close(); @@ -155,8 +156,9 @@ dali02,41,134,0 script Interdimensional Device::gpportal PORTAL,{ close(); } 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; + if (!questprogress(1260)) + setquest(1260); + setquest(1261); warp("1@spa", 198, 188); close(); } @@ -165,35 +167,35 @@ dali02,41,134,0 script Interdimensional Device::gpportal PORTAL,{ mes("[King]"); mes("You are hereby appointed as the personal guard to Princess Tiara. I trust your loyalty above all else."); npctalk(_("You are hereby appointed as the personal guard to Princess Tiara. I trust your loyalty above all else."), instance_npcname("King#gp1")); - next; + next(); mes("[Lurid Royal Guard]"); mes("I will protect the Princess with my life."); npctalk(_("I will protect the Princess with my life."), instance_npcname("Lurid Royal Guard#gp1")); - next; + next(); mes("[King]"); mes("The marriage arrangements are going as planned. The prince is here to meet the princess."); npctalk(_("The marriage arrangements are going as planned. The prince is here to meet the princess."), instance_npcname("King#gp1")); - next; + next(); mes("[Lurid Royal Guard]"); mes("...Yes, your majesty."); npctalk(_("...Yes, your majesty."), instance_npcname("Lurid Royal Guard#gp1")); - next; + next(); mes("[King]"); mes("My gods, there are monsters in the castle! Get rid of them now!"); npctalk(_("My gods, there are monsters in the castle! Get rid of them now!"), instance_npcname("King#gp1")); close2(); - donpcevent instance_npcname("#gp1control")+"::OnStart"; + donpcevent(instance_npcname("#gp1control")+"::OnStart"); end; } 1@spa,1,1,1 script #gp1control HIDDEN_NPC,{ end; OnStart: - hideonnpc instance_npcname("Lurid Royal Guard#gp1"); - hideonnpc instance_npcname("King#gp1"); - sleep 1000; + hideonnpc(instance_npcname("Lurid Royal Guard#gp1")); + hideonnpc(instance_npcname("King#gp1")); + sleep(1000); OnSummon: - sleep 2000; + sleep(2000); .@map$ = instance_mapname("1@spa"); areamonster(.@map$, 182, 190, 214, 214, _("Cursed Sentinel"), CURSED_SENTINEL, 2, instance_npcname("#gp1control")+"::OnMyMobDead"); areamonster(.@map$, 182, 190, 214, 214, _("Cursed Solider"), CURSED_SOLDIER, 2, instance_npcname("#gp1control")+"::OnMyMobDead"); @@ -203,16 +205,16 @@ OnMyMobDead: end; if ('gp1 < 2) { ++'gp1; - donpcevent instance_npcname("#gp1control")+"::OnSummon"; + donpcevent(instance_npcname("#gp1control")+"::OnSummon"); end; } mapannounce(instance_mapname("1@spa"), _("The passage on 2nd floor in the palace of the ghost is open."), bc_map, C_YELLOW); - enablenpc instance_npcname("#gp1warp"); - disablenpc instance_npcname("#gp1control"); + enablenpc(instance_npcname("#gp1warp")); + disablenpc(instance_npcname("#gp1control")); end; OnInstanceInit: 'gp1 = 0; - disablenpc instance_npcname("#gp1warp"); + disablenpc(instance_npcname("#gp1warp")); end; } @@ -221,53 +223,53 @@ OnInstanceInit: mes("[Lurid Royal Guard]"); mes("Your Highness, the King has invited a prince from a neighboring country to be your betrothed. Be ready to meet him..."); npctalk(_("Your Highness, the King has invited a prince from a neighboring country to be your betrothed. Be ready to meet him..."), instance_npcname("Lurid Royal Guard#gp2")); - next; + next(); mes("[Princess Tiara]"); mes("If...if a marriage is arranged what should I do ?"); npctalk(_("If...if a marriage is arranged what should I do ?"), instance_npcname("Tiara Princess#gp2")); - next; + next(); mes("[Lurid Royal Guard]"); mes("The only thing I can do is protect you from physical harm."); npctalk(_("The only thing I can do is protect you from physical harm."), instance_npcname("Lurid Royal Guard#gp2")); - next; + next(); mes("[Princess Tiara]"); mes("Then, what can I do?"); npctalk(_("Then, what can I do?"), instance_npcname("Tiara Princess#gp2")); - next; + next(); mes("[Lurid Royal Guard]"); mes("......"); mes("You must decide that for yourself your highness..."); npctalk(_("You must decide that for yourself your highness..."), instance_npcname("Lurid Royal Guard#gp2")); - next; + next(); mes("[Princess Tiara]"); mes("Would it be easier for you if I were married and sent off to another country?"); npctalk(_("Would it be easier for you if I were married and sent off to another country?"), instance_npcname("Tiara Princess#gp2")); - next; + next(); cutin("", 255); mes("[Lurid Royal Guard]"); mes("I will alway stand by you and protect you forever."); npctalk(_("I will alway stand by you and protect you forever."), instance_npcname("Lurid Royal Guard#gp2")); - next; + next(); mes("[Princess Tiara]"); mes("Monsters in the castle? Protect me!"); npctalk(_("Monsters in the castle? Protect me!"), instance_npcname("Tiara Princess#gp2")); - next; + next(); mes("[Lurid Royal Guard]"); mes("Step back, Let's go!"); npctalk(_("Step back, Let's go!"), instance_npcname("Lurid Royal Guard#gp2")); close2(); - donpcevent instance_npcname("#gp2control")+"::OnStart"; + donpcevent(instance_npcname("#gp2control")+"::OnStart"); end; } 1@spa,1,1,1 script #gp2control HIDDEN_NPC,{ end; OnStart: - hideonnpc instance_npcname("Lurid Royal Guard#gp2"); - hideonnpc instance_npcname("Tiara Princess#gp2"); - sleep 1000; + hideonnpc(instance_npcname("Lurid Royal Guard#gp2")); + hideonnpc(instance_npcname("Tiara Princess#gp2")); + sleep(1000); OnSummon: - sleep 2000; + sleep(2000); .@map$ = instance_mapname("1@spa"); areamonster(.@map$, 143, 96, 94, 143, _("Broken Mind"), BROKEN_MIND, 3, instance_npcname("#gp2control")+"::OnMyMobDead"); areamonster(.@map$, 143, 96, 94, 143, _("Floating Word"), FLOATING_WORD, 4, instance_npcname("#gp2control")+"::OnMyMobDead"); @@ -277,11 +279,11 @@ OnMyMobDead: if (mobcount(instance_mapname("1@spa"), instance_npcname("#gp2control")+"::OnMyMobDead")) end; mapannounce(instance_mapname("1@spa"), _("The passage on the 3rd floor of the palace is open."), bc_map, C_YELLOW); - enablenpc instance_npcname("#gp2warp"); - disablenpc instance_npcname("#gp2control"); + enablenpc(instance_npcname("#gp2warp")); + disablenpc(instance_npcname("#gp2control")); end; OnInstanceInit: - disablenpc instance_npcname("#gp2warp"); + disablenpc(instance_npcname("#gp2warp")); end; } @@ -289,29 +291,29 @@ OnInstanceInit: mes("[King]"); mes("It was you who brought the monsters here, you want to get rid of me and have the princess for yourself?"); npctalk(_("It was you who brought the monsters here, you want to get rid of me and have the princess for yourself?"), instance_npcname("King#gp3")); - next; + next(); mes("[Lurid Royal Guard]"); mes("It's a trap, you should trust me, your majesty!"); npctalk(_("It's a trap, you should trust me, your majesty!"), instance_npcname("Lurid Royal Guard#gp3")); - next; + next(); mes("[King]"); mes("Shut up! You're betrayed me ! I trusted you... you must pay for your disgrace."); npctalk(_("Shut up! You're betrayed me ! I trusted you... you must pay for your disgrace."), instance_npcname("King#gp3")); - next; + next(); mes("[King]"); mes("You will suffer for the rest of your life."); npctalk(_("You will suffer for the rest of your life."), instance_npcname("King#gp3")); close2(); - donpcevent instance_npcname("#gp3control")+"::OnStart"; + donpcevent(instance_npcname("#gp3control")+"::OnStart"); end; } 1@spa,54,28,0 script #gp3warp WARPNPC,1,1,{ - if (!'gp5) + if (!'gp5) { warp("1@spa", 218, 186); - else { + } else { if (questprogress(40024)) - completequest 40024; + completequest(40024); mes("It is time to leave Palace of the ghost.\r" "Everything is completed.\r" "Everything will be vanished..."); @@ -332,7 +334,7 @@ OnInstanceInit: 1@spa,35,56,1 script Ominous Voice#gp3 4_TRACE,{ end; OnStart: - initnpctimer; + initnpctimer(); end; OnTimer3000: npctalk(_("Oh, faithful royal guard, you are trapped.")); @@ -356,32 +358,32 @@ OnTimer21000: npctalk(_("Kukuku... What do you want boy?")); end; OnTimer24000: - stopnpctimer; - hideonnpc instance_npcname("Ominous Voice#gp3"); - hideonnpc instance_npcname("Lurid Royal Guard#gp3"); - donpcevent instance_npcname("#gp3control")+"::OnSummon"; + stopnpctimer(); + hideonnpc(instance_npcname("Ominous Voice#gp3")); + hideonnpc(instance_npcname("Lurid Royal Guard#gp3")); + donpcevent(instance_npcname("#gp3control")+"::OnSummon"); end; } 1@spa,1,1,1 script #gp3control HIDDEN_NPC,{ end; OnStart: - hideonnpc instance_npcname("King#gp3"); - hideonnpc instance_npcname("Soldier#gp3_1"); - hideonnpc instance_npcname("Soldier#gp3_2"); - hideonnpc instance_npcname("Soldier#gp3_3"); - hideonnpc instance_npcname("Captain of the Guard#gp3"); - donpcevent instance_npcname("Ominous Voice#gp3")+"::OnStart"; + hideonnpc(instance_npcname("King#gp3")); + hideonnpc(instance_npcname("Soldier#gp3_1")); + hideonnpc(instance_npcname("Soldier#gp3_2")); + hideonnpc(instance_npcname("Soldier#gp3_3")); + hideonnpc(instance_npcname("Captain of the Guard#gp3")); + donpcevent(instance_npcname("Ominous Voice#gp3")+"::OnStart"); end; OnSummon: - initnpctimer; + initnpctimer(); .@map$ = instance_mapname("1@spa"); 'talkid[0] = areamonster(.@map$, 61, 63, 24, 24, _("Cursed Memory"), CURSED_MEMORY, 2 + 'gp3, instance_npcname("#gp3control")+"::OnMyMobDead"); 'talkid[1] = areamonster(.@map$, 61, 63, 24, 24, _("Colorless Vow"), COLORLESS_VOW, 3 + 'gp3, instance_npcname("#gp3control")+"::OnMyMobDead"); 'talkid[2] = areamonster(.@map$, 61, 63, 24, 24, _("Old Friendship"), OLD_FRIENDSHIP, 2 + 'gp3, instance_npcname("#gp3control")+"::OnMyMobDead"); end; OnTimer2000: - stopnpctimer; + stopnpctimer(); unittalk('talkid[0], _("Faithful Guards")); unittalk('talkid[1], _("Run!")); unittalk('talkid[2], _("Being framed...")); @@ -390,21 +392,21 @@ OnMyMobDead: if (mobcount(instance_mapname("1@spa"), instance_npcname("#gp3control")+"::OnMyMobDead")) end; if (!'gp3) { - mapannounce instance_mapname("1@spa"), "The passage on the 4rd floor of the palace is open.", bc_map, C_YELLOW; - enablenpc instance_npcname("#gp3warp"); - donpcevent instance_npcname("#gp4control")+"::OnSummon"; - disablenpc instance_npcname("#gp1warp"); + mapannounce(instance_mapname("1@spa"), _("The passage on the 4rd floor of the palace is open."), bc_map, C_YELLOW); + enablenpc(instance_npcname("#gp3warp")); + donpcevent(instance_npcname("#gp4control")+"::OnSummon"); + disablenpc(instance_npcname("#gp1warp")); } ++'gp3; - if ('gp3 < 5) - donpcevent instance_npcname("#gp3control")+"::OnSummon"; - else { - stopnpctimer; - disablenpc instance_npcname("#gp3control"); + if ('gp3 < 5) { + donpcevent(instance_npcname("#gp3control")+"::OnSummon"); + } else { + stopnpctimer(); + disablenpc(instance_npcname("#gp3control")); } end; OnInstanceInit: - disablenpc instance_npcname("#gp3warp"); + disablenpc(instance_npcname("#gp3warp")); 'gp3 = 0; end; } @@ -413,26 +415,26 @@ OnInstanceInit: mes("[Lurid Royal Guard]"); mes("Where is Princess Tiara?"); npctalk(_("Where is Princess Tiara?"), instance_npcname("Lurid Royal Guard#gp4")); - next; + next(); mes("[Visiting Prince]"); mes("You are too late... but you brought what I was looking for. Thanks for your help."); npctalk(_("You are too late... but you brought what I was looking for. Thanks for your help."), instance_npcname("Visiting Prince#gp4")); - next; + next(); mes("[Visiting Prince]"); mes("Cursed Thanatos Magic Trace! Are you ready to have a new master?"); npctalk(_("Cursed Thanatos Magic Trace! Are you ready to have a new master?"), instance_npcname("Visiting Prince#gp4")); - next; + next(); cutin("tartanos", 3); mes("[Thanatos Magic Trace]"); mes("How dare you!"); npctalk(_("How dare you!"), instance_npcname("Thanatos Magic Trace#gp4")); - next; + next(); mes("[Visiting Prince]"); mes("Aah, aah!!!"); npctalk(_("Aah, aah!!!"), instance_npcname("Visiting Prince#gp4")); close2(); cutin("", 255); - donpcevent instance_npcname("#gp4control")+"::OnBoss"; + donpcevent(instance_npcname("#gp4control")+"::OnBoss"); end; } @@ -442,56 +444,56 @@ OnStart: end; OnSummon: .@map$ = instance_mapname("1@spa"); - areamonster(.@map$, 182, 217, 214, 188, _("Cursed Sentinel"), CURSED_SENTINEL, rand(2,3), instance_npcname("#gp4control")+"::OnMyMobDead"); - areamonster(.@map$, 182, 217, 214, 188, _("Sweet Slaughter"), SWEET_SLAUGHTER, rand(2,3), instance_npcname("#gp4control")+"::OnMyMobDead"); + areamonster(.@map$, 182, 217, 214, 188, _("Cursed Sentinel"), CURSED_SENTINEL, rand(2, 3), instance_npcname("#gp4control")+"::OnMyMobDead"); + areamonster(.@map$, 182, 217, 214, 188, _("Sweet Slaughter"), SWEET_SLAUGHTER, rand(2, 3), instance_npcname("#gp4control")+"::OnMyMobDead"); end; OnMyMobDead: if (mobcount(instance_mapname("1@spa"), instance_npcname("#gp4control")+"::OnMyMobDead")) end; ++'gp4; if ('gp4 > 3) - donpcevent instance_npcname("#gp4control")+"::OnStory"; + donpcevent(instance_npcname("#gp4control")+"::OnStory"); else - donpcevent instance_npcname("#gp4control")+"::OnSummon"; + donpcevent(instance_npcname("#gp4control")+"::OnSummon"); end; OnStory: for(.@i = 1; .@i <= 4; ++.@i) - enablenpc instance_npcname("Soldier's Corpse#gp4_"+.@i); - enablenpc instance_npcname("Captain's Corpse#gp4"); - enablenpc instance_npcname("King's Corpse#gp4"); - enablenpc instance_npcname("Lurid Royal Guard#gp4"); - enablenpc instance_npcname("Thanatos Magic Trace#gp4"); - enablenpc instance_npcname("Visiting Prince#gp4"); + enablenpc(instance_npcname("Soldier's Corpse#gp4_"+.@i)); + enablenpc(instance_npcname("Captain's Corpse#gp4")); + enablenpc(instance_npcname("King's Corpse#gp4")); + enablenpc(instance_npcname("Lurid Royal Guard#gp4")); + enablenpc(instance_npcname("Thanatos Magic Trace#gp4")); + enablenpc(instance_npcname("Visiting Prince#gp4")); end; OnBoss: for(.@i = 1; .@i <= 4; ++.@i) - hideonnpc instance_npcname("Soldier's Corpse#gp4_"+.@i); - hideonnpc instance_npcname("Captain's Corpse#gp4"); - hideonnpc instance_npcname("King's Corpse#gp4"); - hideonnpc instance_npcname("Lurid Royal Guard#gp4"); - hideonnpc instance_npcname("Thanatos Magic Trace#gp4"); - hideonnpc instance_npcname("Visiting Prince#gp4"); - sleep 1000; + hideonnpc(instance_npcname("Soldier's Corpse#gp4_"+.@i)); + hideonnpc(instance_npcname("Captain's Corpse#gp4")); + hideonnpc(instance_npcname("King's Corpse#gp4")); + hideonnpc(instance_npcname("Lurid Royal Guard#gp4")); + hideonnpc(instance_npcname("Thanatos Magic Trace#gp4")); + hideonnpc(instance_npcname("Visiting Prince#gp4")); + sleep(1000); monster(instance_mapname("1@spa"), 197, 218, _("Torturous Redeemer"), TORTUROUS_REDEEMER, 1, instance_npcname("#gp4control")+"::OnBossDead"); end; OnBossDead: monster(instance_mapname("1@spa"), 197, 180, _("Sweet Slaughter"), SWEET_SLAUGHTER, 1, instance_npcname("#gp4control")+"::OnMobDead"); end; OnMobDead: - mapannounce instance_mapname("1@spa"), "The passage on the 5th floor of the palace is open.", bc_map, C_YELLOW; - enablenpc instance_npcname("#gp4warp"); - donpcevent instance_npcname("#gp5control")+"::OnStart"; - disablenpc instance_npcname("#gp4control"); + mapannounce(instance_mapname("1@spa"), _("The passage on the 5th floor of the palace is open."), bc_map, C_YELLOW); + enablenpc(instance_npcname("#gp4warp")); + donpcevent(instance_npcname("#gp5control")+"::OnStart"); + disablenpc(instance_npcname("#gp4control")); end; OnInstanceInit: - disablenpc instance_npcname("#gp4warp"); + disablenpc(instance_npcname("#gp4warp")); for(.@i = 1; .@i <= 4; ++.@i) - disablenpc instance_npcname("Soldier's Corpse#gp4_"+.@i); - disablenpc instance_npcname("Captain's Corpse#gp4"); - disablenpc instance_npcname("King's Corpse#gp4"); - disablenpc instance_npcname("Lurid Royal Guard#gp4"); - disablenpc instance_npcname("Thanatos Magic Trace#gp4"); - disablenpc instance_npcname("Visiting Prince#gp4"); + disablenpc(instance_npcname("Soldier's Corpse#gp4_"+.@i)); + disablenpc(instance_npcname("Captain's Corpse#gp4")); + disablenpc(instance_npcname("King's Corpse#gp4")); + disablenpc(instance_npcname("Lurid Royal Guard#gp4")); + disablenpc(instance_npcname("Thanatos Magic Trace#gp4")); + disablenpc(instance_npcname("Visiting Prince#gp4")); 'gp4 = 0; end; } @@ -500,35 +502,35 @@ OnInstanceInit: mes("[Princess Tiara]"); mes("You kept your promise."); npctalk(_("You kept your promise."), instance_npcname("Tiara Princess#gp5")); - next; + next(); mes("[Lurid Royal Guard]"); mes("princess!"); npctalk(_("princess"), instance_npcname("Lurid Royal Guard#gp5")); - next; + next(); cutin("npc-tiara", 3); mes("[Princess Tiara]"); mes("Thank you..now I can rest at beside you..."); npctalk(_("Thank you..now I can rest at beside you..."), instance_npcname("Tiara Princess#gp5")); - next; + next(); mes("[Lurid Royal Guard]"); mes("No..NO!!!!!!"); npctalk(_("No..NO!!!!!!"), instance_npcname("Lurid Royal Guard#gp5")); - next; + next(); mes("[The Voice of Princess Tiara]"); mes("I want to be with you forever in peace...forever..."); npctalk(_("I want to be with you forever in peace...forever..."), instance_npcname("Tiara Princess#gp5")); - next; + next(); cutin("b-tiara", 3); mes("[Lurid Royal Guard]"); mes("no.....Ahh ahh ahh!!!~!"); npctalk(_("no.....Ahh ahh ahh!!!~!"), instance_npcname("Lurid Royal Guard#gp5")); - next; + next(); mes("[The Voice of Princess Tiara]"); mes("I love you..."); npctalk(_("I love you..."), instance_npcname("Tiara Princess#gp5")); close2(); cutin("", 255); - donpcevent instance_npcname("#gp5control")+"::OnStart2"; + donpcevent(instance_npcname("#gp5control")+"::OnStart2"); end; } @@ -537,63 +539,63 @@ OnInstanceInit: mes("[Lurid Royal Guard]"); mes("Are you satisfied..? Thanatos Magic Trace?"); npctalk(_("Are you satisfied..? Thanatos Magic Trace?"), instance_npcname("Sakray#gp5")); - next; + next(); mes("[Thanatos Magic Trace]"); mes("I need more blood..Sakray, offer me his blood."); npctalk(_("I need more blood..Sakray, offer me his blood."), instance_npcname("Thanatos Magic Trace#gp5")); - next; + next(); mes("[Sakray]"); mes("Okay, that is good. A traveler.\r" "Did you see?"); npctalk(_("Okay, that is good. A traveler. Did you see?"), instance_npcname("Sakray#gp5")); - next; + next(); mesf("[%s]", strcharinfo(PC_NAME)); mes("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; + next(); mes("[Sakray]"); mes("Non...I did not need to make an effort to catch a novice."); npctalk(_("Non...I did not need to make an effort to catch a novice."), instance_npcname("Sakray#gp5")); - next; + next(); mesf("[%s]", strcharinfo(PC_NAME)); mes("If so... then why...?"); unittalk(getcharid(CHAR_ID_ACCOUNT), _("If so... then why...?")); - next; + next(); cutin("cry-b", 3); mes("[Sakray]"); mes("I wanted to get rid of a piece of humanity inside of me through you."); npctalk(_("I wanted to get rid of a piece of humanity inside of me through you."), instance_npcname("Sakray#gp5")); - next; + next(); mes("[Sakray]"); mes("I am quite satisfied with the result."); - next; + next(); mes("[Thanatos Magic Trace]"); mes("Sakray, offer the blood to me now!"); npctalk(_("Sakray, offer the blood to me now!"), instance_npcname("Thanatos Magic Trace#gp5")); - next; + next(); mes("[Sakray]"); mes("If you were me, what would you do?"); - next; + next(); mes("[Sakray]"); mes("Can you set yourself free from this curse?"); - next; + next(); mesf("[%s]", strcharinfo(PC_NAME)); mes("..."); unittalk(getcharid(CHAR_ID_ACCOUNT), _("...")); - next; + next(); mes("[Sakray]"); mes("Heh heh... I will keep watching you until the day you grow up enough."); - next; + next(); mes("[Sakray]"); mes("I am willing to hunt you later for Thanatos."); - next; + next(); cutin("", 255); mes("[Sakray]"); mes("Farewell then."); close2(); - donpcevent instance_npcname("#gp5control")+"::OnEnd"; - hideonnpc instance_npcname("Sakray#gp5"); - hideonnpc instance_npcname("Thanatos Magic Trace#gp5"); + donpcevent(instance_npcname("#gp5control")+"::OnEnd"); + hideonnpc(instance_npcname("Sakray#gp5")); + hideonnpc(instance_npcname("Thanatos Magic Trace#gp5")); end; } @@ -601,25 +603,25 @@ OnInstanceInit: end; OnStart: stopnpctimer instance_npcname("#gp3control"); - disablenpc instance_npcname("#gp3control"); - killmonster instance_mapname("1@spa"), "All"; - disablenpc instance_npcname("#gp3warp"); - enablenpc instance_npcname("Lurid Royal Guard#gp5"); - enablenpc instance_npcname("Tiara Princess#gp5"); + disablenpc(instance_npcname("#gp3control")); + killmonster(instance_mapname("1@spa"), "All"); + disablenpc(instance_npcname("#gp3warp")); + enablenpc(instance_npcname("Lurid Royal Guard#gp5")); + enablenpc(instance_npcname("Tiara Princess#gp5")); end; OnStart2: - hideonnpc instance_npcname("Lurid Royal Guard#gp5"); - hideonnpc instance_npcname("Tiara Princess#gp5"); - sleep 2000; + hideonnpc(instance_npcname("Lurid Royal Guard#gp5")); + hideonnpc(instance_npcname("Tiara Princess#gp5")); + sleep(2000); OnSummon: - initnpctimer; + initnpctimer(); .@map$ = instance_mapname("1@spa"); - 'talkid[0] = areamonster(.@map$, 61, 63, 24, 24, _("Forgotten Name"), FORGOTTEN_NAME, rand(1,2), instance_npcname("#gp5control")+"::OnMyMobDead"); + 'talkid[0] = areamonster(.@map$, 61, 63, 24, 24, _("Forgotten Name"), FORGOTTEN_NAME, rand(1, 2), instance_npcname("#gp5control")+"::OnMyMobDead"); 'talkid[1] = areamonster(.@map$, 61, 63, 24, 24, _("Colorless Vow"), COLORLESS_VOW, 2, instance_npcname("#gp5control")+"::OnMyMobDead"); - 'talkid[2] = areamonster(.@map$, 61, 63, 24, 24, _("Sweet Slaughter"), SWEET_SLAUGHTER, rand(1,2), instance_npcname("#gp5control")+"::OnMyMobDead"); + 'talkid[2] = areamonster(.@map$, 61, 63, 24, 24, _("Sweet Slaughter"), SWEET_SLAUGHTER, rand(1, 2), instance_npcname("#gp5control")+"::OnMyMobDead"); end; OnTimer2000: - stopnpctimer; + stopnpctimer(); unittalk('talkid[0], _("What is this..??")); unittalk('talkid[1], _("Wake up! look at us... We are monsters?")); unittalk('talkid[2], _("Sakray killed the princess!")); @@ -629,51 +631,51 @@ OnMyMobDead: end; ++'gp5; if ('gp5 > 2) - donpcevent instance_npcname("#gp5control")+"::OnStory"; + donpcevent(instance_npcname("#gp5control")+"::OnStory"); else - donpcevent instance_npcname("#gp5control")+"::OnSummon"; + donpcevent(instance_npcname("#gp5control")+"::OnSummon"); end; OnBossDead: - enablenpc instance_npcname("Sakray#gp5"); - enablenpc instance_npcname("Thanatos Magic Trace#gp5"); + enablenpc(instance_npcname("Sakray#gp5")); + enablenpc(instance_npcname("Thanatos Magic Trace#gp5")); end; OnStory: - stopnpctimer; + stopnpctimer(); 'BossID = monster(instance_mapname("1@spa"), 44, 47, _("Torturous Redeemer"), E_TORTUROUS_REDEEMER, 1, instance_npcname("#gp5control")+"::OnBossDead"); unittalk('BossID, _("Thanatos Magic Trace! I will destroy you if I can't have you... Oh no! How could this be?")); - sleep 3000; - unitkill 'BossID; + sleep(3000); + unitkill('BossID); end; OnEnd: - hideoffnpc instance_npcname("Voice of Princess Tiara"); - hideoffnpc instance_npcname("Voice of Sakray"); - hideoffnpc instance_npcname("Thanatos Magic Trace"); + hideoffnpc(instance_npcname("Voice of Princess Tiara")); + hideoffnpc(instance_npcname("Voice of Sakray")); + hideoffnpc(instance_npcname("Thanatos Magic Trace")); npctalk(_("What can I do for you?"), instance_npcname("Voice of Princess Tiara")); - sleep 3000; + sleep(3000); npctalk(_("I will always stand by you. Please reset beside me."), instance_npcname("Voice of Sakray")); - sleep 3000; + sleep(3000); npctalk(_("Your soul is mine until you find the blood that satisfies me.."), instance_npcname("Thanatos Magic Trace")); - sleep 3000; + sleep(3000); npctalk(_("Reset in the shadow with me."), instance_npcname("Voice of Sakray")); - sleep 3000; + sleep(3000); npctalk(_("In the dark forever..."), instance_npcname("Voice of Sakray")); - sleep 3000; + sleep(3000); mapannounce(instance_mapname("1@spa"), _("It is time to leave the Ghost Palace."), bc_map, C_YELLOW); - enablenpc instance_npcname("King#gpend"); - enablenpc instance_npcname("#gp3warp"); - hideonnpc instance_npcname("Voice of Princess Tiara"); - hideonnpc instance_npcname("Voice of Sakray"); - hideonnpc instance_npcname("Thanatos Magic Trace"); + enablenpc(instance_npcname("King#gpend")); + enablenpc(instance_npcname("#gp3warp")); + hideonnpc(instance_npcname("Voice of Princess Tiara")); + hideonnpc(instance_npcname("Voice of Sakray")); + hideonnpc(instance_npcname("Thanatos Magic Trace")); end; OnInstanceInit: - disablenpc instance_npcname("Lurid Royal Guard#gp5"); - disablenpc instance_npcname("Tiara Princess#gp5"); - disablenpc instance_npcname("Thanatos Magic Trace#gp5"); - disablenpc instance_npcname("Sakray#gp5"); - disablenpc instance_npcname("King#gpend"); - hideonnpc instance_npcname("Voice of Princess Tiara"); - hideonnpc instance_npcname("Voice of Sakray"); - hideonnpc instance_npcname("Thanatos Magic Trace"); + disablenpc(instance_npcname("Lurid Royal Guard#gp5")); + disablenpc(instance_npcname("Tiara Princess#gp5")); + disablenpc(instance_npcname("Thanatos Magic Trace#gp5")); + disablenpc(instance_npcname("Sakray#gp5")); + disablenpc(instance_npcname("King#gpend")); + hideonnpc(instance_npcname("Voice of Princess Tiara")); + hideonnpc(instance_npcname("Voice of Sakray")); + hideonnpc(instance_npcname("Thanatos Magic Trace")); 'gp5 = 0; end; } @@ -682,34 +684,34 @@ OnInstanceInit: mes("[King]"); mes("Hey there, are you alive?\r" "I did not expect to meet someone alive"); - next; + next(); mes("[King]"); mes("Do you possibly have ^009900Gray Piece^000000?\r" "Can you give it to me?\r" "The old memory of faithful royal guard,\r" "the memory of everyone he loved becomes broken pieces and are contained inside of them."); - next; + next(); mes("[King]"); mes("Will you give ^009900Gray Piece^000000 to me?\r" "The guilt is eating my soul.\r" "My soul is stuck in ghost palace."); - next; + next(); mes("[King]"); mes("I am collecting Sakray's abandoned memories from these shards."); - next; + next(); mes("[King]"); mes("If you give any Gray Shards to me, I can make equipment for you."); - next; + next(); mes("[King]"); mes("The cursed knight...\r" "Please help me save the soul of Sakray."); - next; + next(); setarray(.@items_list, - Thanos_Sword, Thanos_Great_Sword, Thanos_Spear, Thanos_Long_Spear, Thanos_Staff, Thanos_Rod, Thanos_Bow, - Thanos_Dagger, Thanos_Katar, Thanos_Knuckle, Thanos_Hammer, Thanos_Axe, Thanos_Violin, Thanos_Whip, Shield_Of_Gray, - Armor_Of_Gray, Gray_Robe, Cloak_Of_Gray, Boots_Of_Gray, Gray_Helmet); + Thanos_Sword, Thanos_Great_Sword, Thanos_Spear, Thanos_Long_Spear, Thanos_Staff, Thanos_Rod, Thanos_Bow, + Thanos_Dagger, Thanos_Katar, Thanos_Knuckle, Thanos_Hammer, Thanos_Axe, Thanos_Violin, Thanos_Whip, Shield_Of_Gray, + Armor_Of_Gray, Gray_Robe, Cloak_Of_Gray, Boots_Of_Gray, Gray_Helmet); - setarray .@cost, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 100, 100, 100, 100, 100, 100; + setarray(.@cost, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 100, 100, 100, 100, 100, 100); .@menulist$ = ""; for (.@i = 0; .@i < getarraysize(.@items_list); ++.@i) .@menulist$ += getitemname(.@items_list[.@i])+":"; @@ -721,19 +723,19 @@ OnInstanceInit: "I believe collecting Gray Shards is the only method to save him."); close(); } - next; + next(); mes("[King]"); mesf("to make a ^FF0000%s^000000 \r" "I need %d ^009900Gray Shard^000000", getitemname(.@items_list[.@choice]), .@cost[.@choice]); - switch (select("Cancel", "hand over "+.@cost[.@choice]+" Gray Shard.")) { + switch (select("Cancel", sprintf(_$("hand over %d Gray Shard."), .@cost[.@choice]))) { case 1: - next; + next(); mes("[King]"); mes("Someday, Sakray will get out of curse for sure. I believe"); - next; + next(); break; case 2: - next; + next(); if (countitem(Gray_Shard) < .@cost[.@choice]) { mes("[King]"); mes("You don't have enough Gray Shards."); @@ -743,20 +745,20 @@ OnInstanceInit: mes("[King]"); mesf("I will make a ^FF0000%s^000000 \r" "with %d ^009900Gray Shard^000000", getitemname(.@items_list[.@choice]), .@cost[.@choice]); - next; + next(); mes("[King]"); mes("You see a light through the folded hands of the king and it gradually takes on a shape."); - next; + next(); mes("[King]"); mesf("All right, it is done.\r" "Take this ^FF0000%s.^000000\r" "Use it to confront Sakray and Thanatos.", getitemname(.@items_list[.@choice])); - next; + next(); mes("[King]"); mes("The power requires a sacrifice.\r" "Please be careful..."); delitem(Gray_Shard, .@cost[.@choice]); - getitem .@items_list[.@choice], 1; + getitem(.@items_list[.@choice], 1); close(); } } @@ -766,27 +768,33 @@ OnInstanceInit: 1@spa,198,201,1 script Lurid Royal Guard#gp1 4_M_SAKRAYROYAL,{ end; } + 1@spa,197,217,0 warp #gp1warp 1,1,1@spa,114,120 // 2nd floor npc's 1@spa,135,125,3 script Tiara Princess#gp2 4_F_MAYSEL,{ end; } + 1@spa,117,137,0 warp #gp2warp 1,1,1@spa,60,43 // 3rd floor npc's 1@spa,30,58,5 script Lurid Royal Guard#gp3 4_M_SAKRAY_TIED,{ end; } + 1@spa,28,52,0 script Captain of the Guard#gp3 4_M_KY_KNT,{ end; } + 1@spa,30,52,0 script Soldier#gp3_1 4_M_KY_SOLD,{ end; } + 1@spa,34,53,1 script Soldier#gp3_2 4_M_CRU_SOLD,{ end; } + 1@spa,25,53,0 script Soldier#gp3_3 4_M_CRU_SOLD,{ end; } @@ -795,43 +803,54 @@ OnInstanceInit: 1@spa,201,198,1 script Soldier's Corpse#gp4_1 4_M_DIEMAN,{ end; } + 1@spa,191,207,0 script Soldier's Corpse#gp4_2 4_M_DIEMAN,{ end; } + 1@spa,206,209,0 script Soldier's Corpse#gp4_3 4_M_DIEMAN,{ end; } + 1@spa,189,193,0 script Soldier's Corpse#gp4_4 4_M_DIEMAN,{ end; } + 1@spa,211,194,4 script Captain's Corpse#gp4 4_M_LIEMAN,{ end; } + 1@spa,194,214,5 script King's Corpse#gp4 4_M_TRISTAN,{ end; } + 1@spa,197,218,5 script Visiting Prince#gp4 4_M_KNIGHT_SILVER,{ end; } + 1@spa,197,218,0 script Thanatos Magic Trace#gp4 HIDDEN_WARP_NPC,{ end; } + 1@spa,178,186,0 warp #gp4warp 1,1,1@spa,30,57 // 5th floor npc's 1@spa,60,43,3 script Tiara Princess#gp5 4_F_MAYSEL,{ end; } + 1@spa,40,44,0 script Thanatos Magic Trace#gp5 HIDDEN_WARP_NPC,{ end; } + 1@spa,40,46,0 script Voice of Princess Tiara CLEAR_NPC,{ end; } + 1@spa,42,43,0 script Voice of Sakray CLEAR_NPC,{ end; } + 1@spa,40,41,0 script Thanatos Magic Trace CLEAR_NPC,{ end; } - diff --git a/npc/re/instances/octopus_cave.txt b/npc/re/instances/octopus_cave.txt index b134742c9..e4d8d4357 100644 --- a/npc/re/instances/octopus_cave.txt +++ b/npc/re/instances/octopus_cave.txt @@ -37,51 +37,52 @@ mal_dun01,151,235,5 script Starfish 4_ASTER,{ .@party_id = getcharid(CHAR_ID_PARTY); - .@md_name$ = "Octopus Cave"; + .@md_name$ = _("Octopus Cave"); if (!.@party_id) { mes("[Starfish]"); mes("You alone is powerless, hehe! Better get someone to help you out. Make a party, and come back later."); - close; + close(); } 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; + close(); } mes("[Starfish]"); mes("I am guarding here, hehe! It is just roughly blocked for now. But someday this cave must be sealed forever, hehe!"); - next; - while(1) { + next(); + while (true) { switch (select("Ask what's going on.", "Ask to open the gate.", "Go to other location.")) { case 1: mes("[Starfish]"); mes("Lately, our Starfish lady is suffering with some issues, ooh ooh. Something bad happen in this peaceful place, hehe!"); - next; + next(); mes("[Starfish]"); mes("Weird looking limbs came out from the hole there, tried to kidnap our lady Starfish. Ooh Ooh."); - next; + next(); mes("[Starfish]"); mes("It seems those limbs belong to that ugly octopus. That monster should be taken care of,\r" "but it's hard for ourselves only to make it happen, hehe."); - next; + next(); mes("[Starfish]"); mes("I want to find someone special, and ask to punish this ugly octopus.\r" "I hope this octopus won't ever harass our lady, hehe."); - next; + next(); mes("[Starfish]"); mes("Go catch that octopus and stick it to this pick. If you bring back the pick,\r" "I will open this gate for a while. You should challenge if you are interested, hehe."); - next; + next(); break; case 2: .@playtime = questprogress(4197, PLAYTIME); if (.@playtime == 1) { mes("[Starfish]"); mes("Octopus is not around now, hehe. Please come back later."); - close; + close(); } - if (.@playtime == 2) erasequest 4197; + if (.@playtime == 2) + erasequest(4197); if (countitem(Octopus_Hunt_Stick)) { .@instance = instance_create(.@md_name$, .@party_id); if (.@instance < 0) { @@ -90,12 +91,12 @@ mal_dun01,151,235,5 script Starfish 4_ASTER,{ mesf("Party leader is... %s.", strcharinfo(PC_NAME)); mesf("^0000FF%s^000000, I cannot open now, hehe.", .@md_name$); mes("Now is not the time, please wait."); - close; + close(); } if (instance_attachmap("1@cash", .@instance) == "") { mesf("^0000FF%s^000000 - Reservation Failed!", .@md_name$); instance_destroy(.@instance); - close; + close(); } instance_set_timeout(3600, 300, .@instance); instance_init(.@instance); @@ -103,23 +104,23 @@ mal_dun01,151,235,5 script Starfish 4_ASTER,{ mes("[Starfish]"); mesf("I will open the gate for a while to ^0000FF%s^000000.", .@md_name$); mes("Please catch that pervert octopus, and come back with it sticked to the pick, hehe."); - close; + close(); } mes("[Starfish]"); mes("Prepare a pick first, so you can thread that octopus with that pick.\r" "Then, I will let you in for a while, hehe."); - close; + close(); case 3: mes("[Starfish]"); mes("This is not a good location, check someplace else."); - close; + close(); } } } mal_dun01,153,237,5 script Weird Entrance CLEAR_NPC,{ mes("There is a strange entrance blocked roughly with some boards."); - next; + next(); switch (select("Go in.", "Stop.")) { case 1: if (countitem(Octopus_Hunt_Stick)) { @@ -127,25 +128,26 @@ mal_dun01,153,237,5 script Weird Entrance CLEAR_NPC,{ if (questprogress(4197, PLAYTIME) == 1) { mes("[Starfish]"); mes("Ah, now is not the time... Would you come back later? Hehe."); - close; + close(); } mes("[Starfish]"); mes("Shhh... Weird aura is coming from that entrance. Big trouble is waiting, if you go in now."); - close; + close(); } 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; + if (!questprogress(4197)) + setquest(4197); + warp("1@cash", 199, 99); end; } mes("[Starfish]"); mes("You should definitely prepare hunting stick if you want to punish the Octopus. Or I will not let you in! Hehe."); - close; + close(); case 2: mes("[Starfish]"); mes("Yes Yes, you better quit."); - close; + close(); } } @@ -153,25 +155,25 @@ mal_dun01,153,237,5 script Weird Entrance CLEAR_NPC,{ 1@cash,199,99,0 script oct_enter HIDDEN_WARP_NPC,4,4,{ end; OnTouch: - donpcevent instance_npcname("oct_enter_broad")+"::OnEnable"; - specialeffect EF_BASH; - disablenpc instance_npcname("oct_enter"); + donpcevent(instance_npcname("oct_enter_broad")+"::OnEnable"); + specialeffect(EF_BASH); + disablenpc(instance_npcname("oct_enter")); end; } 1@cash,1,1,0 script oct_enter_broad FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_enter_broad")+"::OnDisable"; + donpcevent(instance_npcname("oct_enter_broad")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("oct_enter_broad"); - donpcevent instance_npcname("oct_foot_4")+"::OnEnable"; - donpcevent instance_npcname("oct_mob_con")+"::OnEnable"; - initnpctimer; + enablenpc(instance_npcname("oct_enter_broad")); + donpcevent(instance_npcname("oct_foot_4")+"::OnEnable"); + donpcevent(instance_npcname("oct_mob_con")+"::OnEnable"); + initnpctimer(); end; OnDisable: - disablenpc instance_npcname("oct_enter_broad"); + disablenpc(instance_npcname("oct_enter_broad")); end; OnTimer1000: mapannounce(instance_mapname("1@cash"), _("Pervert Octopus : How dare you to come inside of my place!"), bc_map, C_YELLOW); @@ -181,22 +183,22 @@ OnTimer4000: end; OnTimer7000: mapannounce(instance_mapname("1@cash"), _("Pervert Octopus : My juniors~ There is your toy! Play with it~ kakaka"), bc_map, C_YELLOW); - stopnpctimer; - donpcevent instance_npcname("oct_enter_broad")+"::OnDisable"; + stopnpctimer(); + donpcevent(instance_npcname("oct_enter_broad")+"::OnDisable"); end; } 1@cash,3,3,0 script oct_foot_4 FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_foot_4")+"::OnDisable"; + donpcevent(instance_npcname("oct_foot_4")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("oct_foot_4"); - donpcevent instance_npcname("oct_foot1")+"::OnEnable"; - donpcevent instance_npcname("oct_foot2")+"::OnEnable"; - donpcevent instance_npcname("oct_foot3")+"::OnEnable"; - donpcevent instance_npcname("oct_foot4")+"::OnEnable"; + enablenpc(instance_npcname("oct_foot_4")); + donpcevent(instance_npcname("oct_foot1")+"::OnEnable"); + donpcevent(instance_npcname("oct_foot2")+"::OnEnable"); + donpcevent(instance_npcname("oct_foot3")+"::OnEnable"); + donpcevent(instance_npcname("oct_foot4")+"::OnEnable"); .@map$ = instance_mapname("1@cash"); monster(.@map$, 20, 114, _("Octopus Leg#1"), MD_OCTOPUS_LEG, 1, instance_npcname("oct_foot_4")+"::OnMyMobDead"); monster(.@map$, 88, 190, _("Octopus Leg#2"), MD_OCTOPUS_LEG, 1, instance_npcname("oct_foot_4")+"::OnMyMobDead"); @@ -204,15 +206,15 @@ OnEnable: monster(.@map$, 372, 131, _("Octopus Leg#4"), MD_OCTOPUS_LEG, 1, instance_npcname("oct_foot_4")+"::OnMyMobDead"); end; OnDisable: - disablenpc instance_npcname("oct_foot_4"); + disablenpc(instance_npcname("oct_foot_4")); end; OnMyMobDead: .@map$ = instance_mapname("1@cash"); - if (mobcount(.@map$,instance_npcname("oct_foot_4")+"::OnMyMobDead") < 1) { - donpcevent instance_npcname("oct_boss_con")+"::OnEnable"; + if (mobcount(.@map$, instance_npcname("oct_foot_4")+"::OnMyMobDead") < 1) { + donpcevent(instance_npcname("oct_boss_con")+"::OnEnable"); mapannounce(.@map$, _("Hey you!! I'll personally take care of you all! Let's bring it on!"), bc_map, C_SPRINGGREEN); - enablenpc instance_npcname("oct_boss_warp"); - instance_warpall .@map$, 199, 99; + enablenpc(instance_npcname("oct_boss_warp")); + instance_warpall(.@map$, 199, 99); end; } mapannounce(.@map$, _("Arrgg!! That hurts!!! I need another strategy..."), bc_map, C_SPRINGGREEN); @@ -222,12 +224,12 @@ OnMyMobDead: 1@cash,20,114,0 script oct_foot1 HIDDEN_WARP_NPC,6,6,{ end; OnInstanceInit: - donpcevent instance_npcname(strnpcinfo(NPC_NAME))+"::OnDisable"; + donpcevent(instance_npcname(strnpcinfo(NPC_NAME))+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname(strnpcinfo(NPC_NAME)); + enablenpc(instance_npcname(strnpcinfo(NPC_NAME))); .@label$ = instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"; - .@i = atoi(charat(strnpcinfo(NPC_NAME),8)); + .@i = atoi(charat(strnpcinfo(NPC_NAME), 8)); .@map$ = instance_mapname("1@cash"); switch (.@i) { case 1: @@ -249,7 +251,7 @@ OnEnable: areamonster(.@map$, 123, 93, 127, 97, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); areamonster(.@map$, 113, 90, 115, 92, _("Octopus's Henchman"), MD_OCTOPUS, 2, .@label$); areamonster(.@map$, 103, 89, 105, 91, _("Octopus's Henchman"), MD_OCTOPUS, 2, .@label$); - areamonster(.@map$, 89, 90, 91,92, _("Octopus's Henchman"), MD_OCTOPUS, 2, .@label$); + areamonster(.@map$, 89, 90, 91, 92, _("Octopus's Henchman"), MD_OCTOPUS, 2, .@label$); areamonster(.@map$, 74, 104, 76, 106, _("Octopus's Henchman"), MD_OCTOPUS, 2, .@label$); areamonster(.@map$, 74, 120, 76, 122, _("Octopus's Henchman"), MD_OCTOPUS, 2, .@label$); areamonster(.@map$, 83, 131, 87, 135, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); @@ -285,56 +287,57 @@ OnEnable: } end; OnDisable: - killmonster instance_mapname("1@cash"), instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"; // Not in official script. - disablenpc instance_npcname(strnpcinfo(NPC_NAME)); + killmonster(instance_mapname("1@cash"), instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); // Not in official script. + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); end; OnTouch: - if (getd("."+strnpcinfo(NPC_NAME)+instance_id())) end; - setd "."+strnpcinfo(NPC_NAME)+instance_id(),1; - hideonnpc instance_npcname(strnpcinfo(NPC_NAME)); + if (getd("."+strnpcinfo(NPC_NAME)+instance_id())) + end; + setd("."+strnpcinfo(NPC_NAME)+instance_id(), 1); + hideonnpc(instance_npcname(strnpcinfo(NPC_NAME))); mapannounce(instance_mapname("1@cash"), _("Come out all my babies and help me out!"), bc_map, C_YELLOW); - initnpctimer; + initnpctimer(); end; OnTimer5000: .@map$ = instance_mapname("1@cash"); mapannounce(.@map$, _("Let's give them a lesson!"), bc_map, C_YELLOW); .@label$ = instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"; - .@i = atoi(charat(strnpcinfo(NPC_NAME),8)); + .@i = atoi(charat(strnpcinfo(NPC_NAME), 8)); switch (.@i) { case 1: - areamonster(.@map$, 18, 112, 22,116, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); - areamonster(.@map$, 18, 112, 22,116, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); + areamonster(.@map$, 18, 112, 22, 116, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); + areamonster(.@map$, 18, 112, 22, 116, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); break; case 2: - areamonster(.@map$, 86, 188, 90,192, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); - areamonster(.@map$, 96, 98, 100,102, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); + areamonster(.@map$, 86, 188, 90, 192, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); + areamonster(.@map$, 96, 98, 100, 102, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); break; case 3: - areamonster(.@map$, 305, 213, 309,217, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); - areamonster(.@map$, 305, 213, 309,217, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); + areamonster(.@map$, 305, 213, 309, 217, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); + areamonster(.@map$, 305, 213, 309, 217, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); break; case 4: - areamonster(.@map$, 370, 129, 374,133, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); - areamonster(.@map$, 370, 129, 374,133, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); + areamonster(.@map$, 370, 129, 374, 133, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); + areamonster(.@map$, 370, 129, 374, 133, _("Octopus's Henchman"), MD_OCTOPUS, 3, .@label$); break; } end; OnTimer30000: - setd "."+strnpcinfo(NPC_NAME)+instance_id(),0; - stopnpctimer; - .@i = atoi(charat(strnpcinfo(NPC_NAME),8)); - donpcevent instance_npcname("oct_foot_exit"+.@i)+"::OnEnable"; - donpcevent instance_npcname(strnpcinfo(NPC_NAME))+"::OnDisable"; + setd("."+strnpcinfo(NPC_NAME)+instance_id(), 0); + stopnpctimer(); + .@i = atoi(charat(strnpcinfo(NPC_NAME), 8)); + donpcevent(instance_npcname("oct_foot_exit"+.@i)+"::OnEnable"); + donpcevent(instance_npcname(strnpcinfo(NPC_NAME))+"::OnDisable"); end; OnMyMobDead: .@map$ = instance_mapname("1@cash"); - if (mobcount(.@map$,instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead") < 1) { + if (mobcount(.@map$, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead") < 1) { mapannounce(.@map$, _("You hurt my babies!!? You'll have to pay for this!!!"), bc_map, C_SPRINGGREEN); - setd "."+strnpcinfo(NPC_NAME)+instance_id(),0; - stopnpctimer; - .@i = atoi(charat(strnpcinfo(NPC_NAME),8)); - donpcevent instance_npcname("oct_foot_exit"+.@i)+"::OnEnable"; - donpcevent instance_npcname(strnpcinfo(NPC_NAME))+"::OnDisable"; + setd("."+strnpcinfo(NPC_NAME)+instance_id(), 0); + stopnpctimer(); + .@i = atoi(charat(strnpcinfo(NPC_NAME), 8)); + donpcevent(instance_npcname("oct_foot_exit"+.@i)+"::OnEnable"); + donpcevent(instance_npcname(strnpcinfo(NPC_NAME))+"::OnDisable"); end; } end; @@ -346,13 +349,13 @@ OnMyMobDead: 1@cash,16,117,0 script oct_foot_exit1 WARPNPC,2,2,{ end; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(NPC_NAME)); + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); end; OnEnable: - enablenpc instance_npcname(strnpcinfo(NPC_NAME)); + enablenpc(instance_npcname(strnpcinfo(NPC_NAME))); end; OnTouch: - warp instance_mapname("1@cash"), 198, 99; + warp(instance_mapname("1@cash"), 198, 99); end; } 1@cash,77,193,0 duplicate(oct_foot_exit1) oct_foot_exit2 WARPNPC,2,2 @@ -362,11 +365,11 @@ OnTouch: 1@cash,15,15,0 script oct_mob_con FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_mob_con")+"::OnDisable"; + donpcevent(instance_npcname("oct_mob_con")+"::OnDisable"); end; OnEnable: .@map$ = instance_mapname("1@cash"); - enablenpc instance_npcname("oct_mob_con"); + enablenpc(instance_npcname("oct_mob_con")); monster(.@map$, 32, 94, _("Hydra"), HYDRA, 1); monster(.@map$, 41, 101, _("Hydra"), HYDRA, 1); monster(.@map$, 35, 78, _("Hydra"), HYDRA, 1); @@ -410,21 +413,21 @@ OnEnable: areamonster(.@map$, 292, 97, 312, 117, _("Stapo"), STAPO, 1); areamonster(.@map$, 355, 64, 375, 84, _("Stapo"), STAPO, 1); areamonster(.@map$, 317, 17, 337, 37, _("Stapo"), STAPO, 1); - donpcevent instance_npcname("oct_backattack1")+"::OnEnable"; - donpcevent instance_npcname("oct_backattack2")+"::OnEnable"; - donpcevent instance_npcname("oct_backattack3")+"::OnEnable"; - donpcevent instance_npcname("oct_backattack4")+"::OnEnable"; - donpcevent instance_npcname("oct_mob_con")+"::OnDisable"; + donpcevent(instance_npcname("oct_backattack1")+"::OnEnable"); + donpcevent(instance_npcname("oct_backattack2")+"::OnEnable"); + donpcevent(instance_npcname("oct_backattack3")+"::OnEnable"); + donpcevent(instance_npcname("oct_backattack4")+"::OnEnable"); + donpcevent(instance_npcname("oct_mob_con")+"::OnDisable"); end; OnDisable: - disablenpc instance_npcname("oct_mob_con"); + disablenpc(instance_npcname("oct_mob_con")); end; } 1@cash,45,53,0 script oct_backattack1 HIDDEN_WARP_NPC,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_backattack1"); + disablenpc(instance_npcname("oct_backattack1")); end; OnTouch: .@map$ = instance_mapname("1@cash"); @@ -436,27 +439,28 @@ OnTouch: monster(.@map$, 49, 50, _("Hydra"), HYDRA, 1); monster(.@map$, 41, 53, _("Octopus's Henchman"), MD_OCTOPUS, 1); mapannounce(.@map$, _("Don't let them break through, stop them!!!"), bc_map, C_SPRINGGREEN); - specialeffect EF_BASH; - disablenpc instance_npcname("oct_backattack1"); + specialeffect(EF_BASH); + disablenpc(instance_npcname("oct_backattack1")); end; OnEnable: - enablenpc instance_npcname("oct_backattack1"); + enablenpc(instance_npcname("oct_backattack1")); end; } 1@cash,78,99,0 script oct_backattack2 HIDDEN_WARP_NPC,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_backattack2"); + disablenpc(instance_npcname("oct_backattack2")); end; OnTouch: - if (getd("."+instance_id())) end; - setd "."+instance_id(),1; - initnpctimer; + if (getd("."+instance_id())) + end; + setd("."+instance_id(), 1); + initnpctimer(); .@map$ = instance_mapname("1@cash"); monster(.@map$, 71, 105, _("Octopus's Henchman"), MD_OCTOPUS, 1); mapannounce(.@map$, _("Headquarters are empty, GO!!!"), bc_map, C_SPRINGGREEN); - hideonnpc instance_npcname("oct_backattack2"); + hideonnpc(instance_npcname("oct_backattack2")); end; OnTimer2000: .@map$ = instance_mapname("1@cash"); @@ -477,21 +481,22 @@ OnTimer8000: .@map$ = instance_mapname("1@cash"); monster(.@map$, 71, 105, _("Octopus's Henchman"), MD_OCTOPUS, 1); mapannounce(.@map$, _("There is no time to lose, hurry up!!!"), bc_map, C_SPRINGGREEN); - stopnpctimer; + stopnpctimer(); end; OnEnable: - enablenpc instance_npcname("oct_backattack2"); + enablenpc(instance_npcname("oct_backattack2")); end; } 1@cash,299,144,0 script oct_backattack3 HIDDEN_WARP_NPC,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_backattack3"); + disablenpc(instance_npcname("oct_backattack3")); end; OnTouch: - if (getd("."+instance_id())) end; - setd "."+instance_id(),1; + if (getd("."+instance_id())) + end; + setd("."+instance_id(), 1); .@map$ = instance_mapname("1@cash"); monster(.@map$, 293, 153, _("Octopus's Henchman"), MD_OCTOPUS, 1); monster(.@map$, 294, 152, _("Octopus's Henchman"), MD_OCTOPUS, 1); @@ -499,26 +504,27 @@ OnTouch: monster(.@map$, 293, 151, _("Octopus's Henchman"), MD_OCTOPUS, 1); monster(.@map$, 293, 152, _("Octopus's Henchman ?"), MD_MARSE, 1); mapannounce(.@map$, _("Kakaka! Suprised??!!"), bc_map, C_SPRINGGREEN); - initnpctimer; - hideonnpc instance_npcname("oct_backattack3"); + initnpctimer(); + hideonnpc(instance_npcname("oct_backattack3")); end; OnTimer5000: mapannounce(instance_mapname("1@cash"), _("... Looks like we have a spy among us."), bc_map, C_SPRINGGREEN); - stopnpctimer; + stopnpctimer(); end; OnEnable: - enablenpc instance_npcname("oct_backattack3"); + enablenpc(instance_npcname("oct_backattack3")); end; } 1@cash,336,36,0 script oct_backattack4 HIDDEN_WARP_NPC,3,3,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_backattack4"); + disablenpc(instance_npcname("oct_backattack4")); end; OnTouch: - if (getd("."+instance_id())) end; - setd "."+instance_id(),1; + if (getd("."+instance_id())) + end; + setd("."+instance_id(), 1); .@map$ = instance_mapname("1@cash"); monster(.@map$, 332, 37, _("Octopus's Henchman"), MD_OCTOPUS, 1); monster(.@map$, 332, 36, _("Octopus's Henchman"), MD_OCTOPUS, 1); @@ -534,34 +540,34 @@ OnTouch: monster(.@map$, 259, 40, _("Mercenary Squid"), MD_MARSE, 1); monster(.@map$, 261, 40, _("Mercenary Squid"), MD_MARSE, 1); mapannounce(.@map$, _("What a successful pincer tactic! The enemy is strong! Let's not lose yourselves! Anyway, where are all the mercenaries??"), bc_map, C_SPRINGGREEN); - initnpctimer; - hideonnpc instance_npcname("oct_backattack4"); + initnpctimer(); + hideonnpc(instance_npcname("oct_backattack4")); end; OnTimer5000: mapannounce(instance_mapname("1@cash"), _("Mercenary Squid : eh...eh... wrong direction. No enemies are shown in this direction."), bc_map, C_SPRINGGREEN); end; OnTimer7000: mapannounce(instance_mapname("1@cash"), _("Pervert Octopus : Fools! Can't you read the map??!! Useless!!"), bc_map, C_SPRINGGREEN); - stopnpctimer; + stopnpctimer(); end; OnEnable: - enablenpc instance_npcname("oct_backattack4"); + enablenpc(instance_npcname("oct_backattack4")); end; } 1@cash,2,2,0 script oct_boss_con FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_boss_con")+"::OnDisable"; + donpcevent(instance_npcname("oct_boss_con")+"::OnDisable"); end; OnDisable: - disablenpc instance_npcname("oct_boss_con"); + disablenpc(instance_npcname("oct_boss_con")); end; OnEnable: - enablenpc instance_npcname("oct_boss_con"); - donpcevent instance_npcname("oct_boss_foot")+"::OnEnable"; + enablenpc(instance_npcname("oct_boss_con")); + donpcevent(instance_npcname("oct_boss_foot")+"::OnEnable"); monster(instance_mapname("1@cash"), 199, 188, _("Disgusting Octopus"), MD_GIANT_OCTOPUS, 1, instance_npcname("oct_boss_con")+"::OnMyMobDead"); - initnpctimer; + initnpctimer(); end; OnTimer7000: callsub OnAnnounce, @@ -604,21 +610,21 @@ OnTimer49000: "errrrrrrrrrrrrrrrrrrrrrrrr... Cough! Cough!", "Disgusting Octopus : Violence cannot be justified in any case.", "This is my place!!!"; - stopnpctimer; - initnpctimer; + stopnpctimer(); + initnpctimer(); end; OnAnnounce: mapannounce(instance_mapname("1@cash"), sprintf(_$("Disgusting Octopus : %s"), getarg(rand(3))), bc_map, C_YELLOW); return; OnMyMobDead: .@map$ = instance_mapname("1@cash"); - if (mobcount(.@map$,instance_npcname("oct_boss_con")+"::OnMyMobDead") < 1) { + if (mobcount(.@map$, instance_npcname("oct_boss_con")+"::OnMyMobDead") < 1) { mapannounce(.@map$, _("Disgusting Octopus : That's it for the today! Next time, I will play with you badly!"), bc_map, C_YELLOW); - enablenpc instance_npcname("oct_exit_1"); - enablenpc instance_npcname("oct_exit_2"); - donpcevent instance_npcname("oct_boss_foot")+"::OnDisable"; - stopnpctimer; - donpcevent instance_npcname("oct_boss_con")+"::OnDisable"; + enablenpc(instance_npcname("oct_exit_1")); + enablenpc(instance_npcname("oct_exit_2")); + donpcevent(instance_npcname("oct_boss_foot")+"::OnDisable"); + stopnpctimer(); + donpcevent(instance_npcname("oct_boss_con")+"::OnDisable"); end; } end; @@ -627,16 +633,16 @@ OnMyMobDead: 1@cash,4,4,0 script oct_boss_foot FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("oct_boss_foot")+"::OnDisable"; + donpcevent(instance_npcname("oct_boss_foot")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("oct_boss_foot"); - initnpctimer; + enablenpc(instance_npcname("oct_boss_foot")); + initnpctimer(); end; OnCall: .@map$ = instance_mapname("1@cash"); - if (mobcount(.@map$,instance_npcname("oct_boss_foot")+"::OnMyMobDead") < 100) { - switch(rand(2)) { + if (mobcount(.@map$, instance_npcname("oct_boss_foot")+"::OnMyMobDead") < 100) { + switch (rand(2)) { case 0: mapannounce(.@map$, _("Disgusting Octopus : Do you know how many legs octopus have? It doesn't matter, I have unlimited legs!!"), bc_map, C_YELLOW); areamonster(.@map$, 192, 181, 206, 195, _("Octopus Leg"), MD_OCTOPUS_LEG, 1, instance_npcname("oct_boss_foot")+"::OnMyMobDead"); @@ -647,16 +653,16 @@ OnCall: break; } } - initnpctimer; + initnpctimer(); end; OnTimer10000: - stopnpctimer; - donpcevent instance_npcname("oct_boss_foot")+"::OnCall"; + stopnpctimer(); + donpcevent(instance_npcname("oct_boss_foot")+"::OnCall"); end; OnDisable: - stopnpctimer; - killmonster instance_mapname("1@cash"), instance_npcname("oct_boss_foot")+"::OnMyMobDead"; // Not in official script. - disablenpc instance_npcname("oct_boss_foot"); + stopnpctimer(); + killmonster(instance_mapname("1@cash"), instance_npcname("oct_boss_foot")+"::OnMyMobDead"); // Not in official script. + disablenpc(instance_npcname("oct_boss_foot")); end; OnMyMobDead: end; @@ -665,24 +671,24 @@ OnMyMobDead: 1@cash,198,116,0 script oct_boss_warp WARPNPC,2,2,{ end; OnInstanceInit: - disablenpc instance_npcname("oct_boss_warp"); + disablenpc(instance_npcname("oct_boss_warp")); end; OnTouch: - warp instance_mapname("1@cash"), 210, 172; + warp(instance_mapname("1@cash"), 210, 172); end; } 1@cash,190,208,0 script oct_exit_1 WARPNPC,2,2,{ end; OnInstanceInit: - disablenpc instance_npcname(strnpcinfo(NPC_NAME)); + disablenpc(instance_npcname(strnpcinfo(NPC_NAME))); end; OnTouch: mes("Do you want to go out from the octopus dungeon?"); - next; + next(); if (select("No!", "Yes!") == 2) - warp "mal_dun01", 153, 233; - close; + warp("mal_dun01", 153, 233); + close(); } 1@cash,198,82,0 duplicate(oct_exit_1) oct_exit_2 WARPNPC,2,2 // This is never enabled in the official script. diff --git a/npc/re/instances/saras_memory.txt b/npc/re/instances/saras_memory.txt index 38b598d5b..c9a47534b 100644 --- a/npc/re/instances/saras_memory.txt +++ b/npc/re/instances/saras_memory.txt @@ -41,113 +41,113 @@ dali,130,107,5 script Leon the Adventurer#Sara 4_M_DST_GRAND,{ // instance CD check only at the Dimensional Device mes("[Leon the Adventurer]"); if (BaseLevel < 99) { - mes("You know... this place doesn't seem to be safe for you. Please returnto me once you have achieved LV. 99"); - close; + mes("You know... this place doesn't seem to be safe for you. Please return to me once you have achieved LV. 99"); + close(); } if (!questprogress(15003)) { if (!sarainstance) { // doing the instance for the 1st time mes("Wow! I thought I was the only one who knew about this place."); - next; + next(); mes("[Leon the Adventurer]"); mes("Excuse my rudeness! I am Pon de Leon, the famous adventurer!"); - next; + next(); mes("[Leon the Adventurer]"); mes("My friend calls me Leon the Lion! For my tough appearance and attitude. Plus I have quite a bite!"); - next; + next(); mes("[Leon the Adventurer]"); mes("You know, this is such a strange location..."); - next; + next(); mes("[Leon the Adventurer]"); mes("As you explore it you start to see cracks in space and time. Each one covered by a dimensional device."); - next; + next(); mes("[Leon the Adventurer]"); mes("For example, I think I have caught glimpses of Payon through the dimensional device closest to us.\r" "But it doesn't seem right. Almost like it is a little bit older then it should be."); - next; + next(); mes("[Leon the Adventurer]"); mes("I want to explore it, but with my old age and my knees I don't seem to be quite up to the task."); - next; + next(); mes("[Leon the Adventurer]"); mes("So, I would like to ask something of you."); - next; + next(); mes("[Leon the Adventurer]"); mes("Please venture through the dimensional device and report to me what you find within."); - next; + next(); mes("[Leon the Adventurer]"); mes("Though, I should warn you. It might be unstable. Make sure you enter the first chance you get."); - close2; - setquest 15003; + close2(); + setquest(15003); end; } else { mes("You wish to relive the past again?"); - next; - if (select("Yes","No") == 2) - close; + next(); + if (select("Yes", "No") == 2) + close(); mes("[Leon the Adventurer]"); mes("Please venture through the dimensional device and report to me what you find within."); - next; + next(); mes("[Leon the Adventurer]"); mes("Though, I should warn you. It might be unstable. Make sure you enter the first chance you get."); - setquest 15003; - close; + setquest(15003); + close(); } } if (questprogress(15003) == 1) { mes("I am not sure you have fully explored the crack in space and time yet. Perhaps you should look a bit further into it."); - next; + next(); if (!sarainstance) - close; + close(); switch (select("Okay", "Give up")) { case 1: mes("[Leon the Adventurer]"); mes("I am glad to hear that! Maybe someday you can be as brave as old Leon the Lion!"); - close; + close(); case 2: mes("[Leon the Adventurer]"); mes("Well.. I can't force you. Buf if you ever find your courage pelase talk to me again."); - erasequest 15003; - close; + erasequest(15003); + close(); } } if (questprogress(15003) == 2) { if (!sarainstance) { // 1st time reward and text mes("What did you see in there?!"); - next; + next(); mes("[Leon the Adventurer]"); mes("Hrumpf, Sara Irene?! She's one of the 12 Valkyries. I didn't know her story was that tragic...."); - next; + next(); mes("[Leon the Adventurer]"); mes("It seems that you caused a huge misunderstanding between her and her father."); - next; + next(); mes("[Leon the Adventurer]"); - mes("I would not blame yourself for what occured. Or all the blood that was spilled. It seems that the\r" + mes("I would not blame yourself for what occured. Or all the blood that was spilled. It seems that the\r" "events that day were fated to happen no matter who was there."); - next; + next(); mes("[Leon the Adventurer]"); mes("Please don't tell anyone about your time traveling adventure. We can't have anyone thinking you more\r" "important then old Leon. Plus they wouldn't believe such a story anyways."); - next; + next(); mes("[Leon the Adventurer]"); mes("I think that in about 20 hours after you last entered the rift will stable enough for you to transverse it again."); sarainstance = 1; - getexp 770000, 1000000; // reward first time + getexp(770000, 1000000); // reward first time } else { // 2nd time text mes("What did you see in there?! Was there anything new?"); - next; + next(); select("Nothing has changed from the last time."); mes("[Leon the Adventurer]"); mes("I am sorry to hear that... If..."); - next; + next(); mes("[Leon the Adventurer]"); mes("If you want to try again. I think that in about 20 hours after you last entered the rift will be stable enough\r" "for you to transverse it again."); - next; + next(); mes("[Leon the Adventurer]"); mes("You should rest up. Travelling Through time would make even Leon tired!"); - getexp 550000, 550000; // reward 2nd and following + getexp(550000, 550000); // reward 2nd and following } - erasequest 15003; - close; + erasequest(15003); + close(); } } @@ -155,29 +155,29 @@ dali,138,118,0 script Dimensional Device#dimen PORTAL,{ if (!questprogress(15003)) { mes("[Leon the Adventurer]"); mes("Before you go playing around with that. Why don't you come over here and talk to me?"); - close; + close(); } .@sara_time = questprogress(15002, PLAYTIME); if (.@sara_time == 1) { mes("[Leon the Adventurer]"); mes("I think that in about 20 hours after you last entered the rift will stable enough for you to\r" "transverse it again."); - close; + close(); } else if (.@sara_time == 2) { - erasequest 15002; + erasequest(15002); end; } else if (!.@sara_time) { .@party_id = getcharid(CHAR_ID_PARTY); .@p_name$ = getpartyname(.@party_id); - .@md_name$ = "Sara's Memory"; + .@md_name$ = _("Sara's Memory"); if (!instance_check_party(.@party_id)) { mes("[Leon the Adventurer]"); mes("Before you enter you need to organize a party! Don't know how? Type /organize PARTYNAMEHERE. You\r" "can use quotes to put spaces in a party name."); - close; + close(); } if (getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id, 2)) - .@menu1$ = "Boot up the dimensional device"; + .@menu1$ = _("Boot up the dimensional device"); else .@menu1$ = ""; switch (select(.@menu1$, "Use the dimensional device", "Cancel")) { @@ -189,30 +189,30 @@ dali,138,118,0 script Dimensional Device#dimen PORTAL,{ mesf("Party Name: %s", .@p_name$); mesf("Party Leader: %s", strcharinfo(PC_NAME)); mesf("^0000FF%s^000000 - Reservation Failed!", .@md_name$); - close; + close(); } if (instance_attachmap("1@sara", .@instance) == "") { mesf("^0000FF%s^000000 - Reservation Failed!", .@md_name$); instance_destroy(.@instance); - close; + close(); } instance_set_timeout(3600, 300, .@instance); instance_init(.@instance); mes("^FF0000The dimensional boots up cleanly. Use the device to enter the crack in space and time.^000000"); - close; + close(); case 2: if (has_instance("1@sara") == "") { mesf("The memorial dungeon ^0000FF%s^000000 does not exist.\r" "The party leader did not generate the dungeon yet.", .@md_name$); - close; + close(); } mapannounce("dali", sprintf(_$("%s, member of the party %s entered the instance %s."), strcharinfo(PC_NAME), .@p_name$, .@md_name$), bc_map, C_SPRINGGREEN); - setquest 15002; - warp "1@sara", 250, 155; + setquest(15002); + warp("1@sara", 250, 155); end; break; case 3: - close; + close(); } } } @@ -223,469 +223,468 @@ dali,138,118,0 script Dimensional Device#dimen PORTAL,{ mesf("[%s]", strcharinfo(PC_NAME)); mes("Where am I?"); unittalk(getcharid(CHAR_ID_ACCOUNT), _("Where am I?")); - next; - cutin "sara_9sara1.bmp", 2; + next(); + cutin("sara_9sara1.bmp", 2); mes("[A girl]"); mes("Hello! This is the village of Payon. You don't seem to be from around here..."); npctalk(_("A girl : Hello! This is the village of Payon. You don't seem to be from around here...")); - next; + next(); mesf("[%s]", strcharinfo(PC_NAME)); mes("Are you from here? You don't seem to quite match the locals either."); unittalk(getcharid(CHAR_ID_ACCOUNT), _("Are you from here? You don't seem to quite match to locals either.")); - next; + next(); mes("[A girl]"); mes("Yes! I was born here! My name is Sara. Sara Irene!"); npctalk(_("A girl : Yes! I was born here! My name is Sara. Sara Irene!")); - next; + next(); mes("[Sara Irene]"); mes("My father is doyen of this village! I just take after my mother."); npctalk(_("My father is doyen of this village! I just take after my mother."), instance_npcname("Sara Irene#saratalk")); - next; + next(); mesf("[%s]", strcharinfo(PC_NAME)); mes("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; + next(); mes("[Sara Irene]"); mes("I am waiting for my father. He said that he will be here soon."); npctalk(_("I am waiting for my father. He said that he will be here soon."), instance_npcname("Sara Irene#saratalk")); - next; + next(); mes("^FF0000An older man exits the house. Sara's face brightens at the sight of him.^000000"); - donpcevent instance_npcname("Doyen Irene#sarains")+"::OnEnable"; - next; + donpcevent(instance_npcname("Doyen Irene#sarains")+"::OnEnable"); + next(); mes("[Sara Irene]"); mes("Hi daddy!"); npctalk(_("Hi daddy!"), instance_npcname("Sara Irene#saratalk")); - next; - cutin "sara_elder_irine1.bmp", 2; + next(); + cutin("sara_elder_irine1.bmp", 2); mes("[Doyen Irene]"); mes("Sweetheart you look so happy."); npctalk(_("Sweetheart you look so happy."), instance_npcname("Doyen Irene#sarains")); - next; - cutin "sara_9sara1.bmp", 2; + next(); + cutin("sara_9sara1.bmp", 2); mes("[Sara Irene]"); mes("You said you would come back soon! I waited for you and you lied!"); npctalk(_("You said you would come back soon! I waited for you and you lied!"), instance_npcname("Sara Irene#saratalk")); - next; - cutin "sara_elder_irine1.bmp", 2; + next(); + cutin("sara_elder_irine1.bmp", 2); mes("[Doyen Irene]"); mes("Sweetheart, I am sorry I made you wait so long. The meeting with the village elders took longer than expected."); npctalk(_("Sweetheart, I am sorry I made you wait so long. The meeting with the village elders took longer than expected."), instance_npcname("Doyen Irene#sarains")); - next; - cutin "sara_9sara1.bmp", 2; + next(); + cutin("sara_9sara1.bmp", 2); mes("[Sara Irene]"); mes("I hate those old fogeys."); npctalk(_("I hate those old fogeys."), instance_npcname("Sara Irene#saratalk")); - next; - cutin "sara_elder_irine1.bmp", 2; + next(); + cutin("sara_elder_irine1.bmp", 2); mes("[Doyen Irene]"); mes("Don't say that sweetheart... Who is this with you?"); npctalk(_("Don't say that sweetheart... Who is this with you?"), instance_npcname("Doyen Irene#sarains")); - next; + next(); mes("^FF0000Doyen Irene stares at you with fire in this eyes.^000000"); dispbottom(_("Doyen Irene stares at you with fire in this eyes.")); - next; + next(); mes("^FF0000Sara starts humming and singing softly to herself. She picks some wild flowers near by and presents\r" "them to the Doyen.^000000"); dispbottom(_("Sara starts humming and singing softly to herself. She picks some wild flowers near by and presents them to the Doyen.")); - next; - cutin "sara_9sara1.bmp", 2; + next(); + cutin("sara_9sara1.bmp", 2); mes("[Sara Irene]"); mes("Here you go daddy!"); npctalk(_("Here you go daddy!"), instance_npcname("Sara Irene#saratalk")); - next; - cutin "sara_elder_irine1.bmp", 2; + next(); + cutin("sara_elder_irine1.bmp", 2); mes("[Doyen Irene]"); mes("Oh Sara, should I have them?"); npctalk(_("Oh Sara, should I have them?"), instance_npcname("Doyen Irene#sarains")); - next; - cutin "sara_9sara1.bmp", 2; + next(); + cutin("sara_9sara1.bmp", 2); mes("[Sara Irene]"); mes("Of course silly daddy!"); npctalk(_("Of course silly daddy!"), instance_npcname("Sara Irene#saratalk")); - next; + next(); mes("^FF0000After being given the flowers the Doyen's mood seems to greatly improve.^000000"); dispbottom(_("After being given the flowers the Doyen's mood seems to greatly improve.")); - next; - cutin "sara_elder_irine1.bmp", 2; + next(); + cutin("sara_elder_irine1.bmp", 2); mes("[Doyen Irene]"); mes("Alright my princess, where should we go now?"); npctalk(_("Alright my princess, where should we go now?"), instance_npcname("Doyen Irene#sarains")); - next; - cutin "sara_9sara1.bmp", 2; + next(); + cutin("sara_9sara1.bmp", 2); mes("[Sara Irene]"); mes("Oh daddy! Let's go to the top of that hill over there!"); npctalk(_("Oh daddy! Let's go to the top of that hill over there!"), instance_npcname("Sara Irene#saratalk")); - next; - cutin "sara_elder_irine1.bmp", 2; + next(); + cutin("sara_elder_irine1.bmp", 2); mes("[Doyen Irene]"); mes("Hah! Hold onto me tight!"); npctalk(_("Hah! Hold onto me tight!"), instance_npcname("Doyen Irene#sarains")); - next; - cutin "sara_elder_irine1.bmp", 255; + next(); + cutin("sara_elder_irine1.bmp", 255); mes("^FF0000As they wander off you hear strange voices from around the corner...^000000"); - donpcevent instance_npcname("Doyen Irene#sarains")+"::OnDisable"; - donpcevent instance_npcname("A girl#sarains")+"::OnDisable"; - dispbottom(_("As they wander off you hear strange voices from around the corner...")),""; - disablenpc instance_npcname("Sara Irene#saratalk"); - next; + donpcevent(instance_npcname("Doyen Irene#sarains")+"::OnDisable"); + donpcevent(instance_npcname("A girl#sarains")+"::OnDisable"); + dispbottom(_("As they wander off you hear strange voices from around the corner..."), ""); + disablenpc(instance_npcname("Sara Irene#saratalk")); + next(); mes("[Strange Old Man A]"); mes("I can feel Sara's power growing. We cannot just stand by and let her achieve her full potential!"); npctalk(_("I can feel Sara's power growing. We cannot just stand by and let her achieve her full potential!"), instance_npcname("Strange Old Man A#stalk")); - next; + next(); mes("[Strange Old Man B]"); mes("She was born under a bad sign and her mother isn't even one of us!"); npctalk(_("She was born under a bad sign and her mother isn't even one of us!"), instance_npcname("Strange Old Man B#stalk")); - next; + next(); mes("[Strange Old Man B]"); mes("Someday she will cause blood to flow in our streets."); npctalk(_("Someday she will cause blood to flow in our streets."), instance_npcname("Strange Old Man B#stalk")); - next; + next(); mes("[Strange Old Man A]"); mes("We have to do something before the Holy creatures select her. I asked HIM to take care of it."); npctalk(_("We have to do something before the Holy creatures select her. I asked HIM to take care of it."), instance_npcname("Strange Old Man A#stalk")); - next; + next(); mes("[Strange Old Man B]"); mes("We will see... I look forward to hearing the bad news that has befallen her..."); npctalk(_("We will see... I look forward to hearing the bad news that has befallen her..."), instance_npcname("Strange Old Man B#stalk")); - next; + next(); mes("^FF0000The old man wander off it seems Sara might be in danger. We have to do something!^000000"); dispbottom(_("The old man wander off it seems Sara might be in danger. We have to do something!")); - close2; - donpcevent instance_npcname("Strange Old Man A#stalk")+"::OnDisable"; - donpcevent instance_npcname("Strange Old Man B#stalk")+"::OnDisable"; - donpcevent instance_npcname("Sara Irene#sarains1")+"::OnEnable"; - donpcevent instance_npcname("#sarawarp1")+"::OnEnable"; - viewpoint 1, 240, 145, 1, C_GREEN; - specialeffect EF_BASH; + close2(); + donpcevent(instance_npcname("Strange Old Man A#stalk")+"::OnDisable"); + donpcevent(instance_npcname("Strange Old Man B#stalk")+"::OnDisable"); + donpcevent(instance_npcname("Sara Irene#sarains1")+"::OnEnable"); + donpcevent(instance_npcname("#sarawarp1")+"::OnEnable"); + viewpoint(1, 240, 145, 1, C_GREEN); + specialeffect(EF_BASH); end; OnInstanceInit: - donpcevent instance_npcname("A girl#sarains")+"::OnEnable"; + donpcevent(instance_npcname("A girl#sarains")+"::OnEnable"); end; OnEnable: - hideoffnpc instance_npcname("A girl#sarains"); + hideoffnpc(instance_npcname("A girl#sarains")); end; OnDisable: - hideonnpc instance_npcname("A girl#sarains"); + hideonnpc(instance_npcname("A girl#sarains")); end; } 1@sara,268,158,3 script Doyen Irene#sarains 4_M_CHIEF_IRIN,{ end; OnInstanceInit: - donpcevent instance_npcname("Doyen Irene#sarains")+"::OnDisable"; + donpcevent(instance_npcname("Doyen Irene#sarains")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Doyen Irene#sarains"); + hideoffnpc(instance_npcname("Doyen Irene#sarains")); end; OnDisable: - hideonnpc instance_npcname("Doyen Irene#sarains"); + hideonnpc(instance_npcname("Doyen Irene#sarains")); end; } 1@sara,260,156,0 script Sara Irene#saratalk HIDDEN_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#saratalk")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#saratalk")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Sara Irene#saratalk"); + hideoffnpc(instance_npcname("Sara Irene#saratalk")); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#saratalk"); + hideonnpc(instance_npcname("Sara Irene#saratalk")); end; } - 1@sara,260,156,0 script Strange Old Man A#stalk FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("Strange Old Man A#stalk")+"::OnDisable"; + donpcevent(instance_npcname("Strange Old Man A#stalk")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Strange Old Man A#stalk"); + hideoffnpc(instance_npcname("Strange Old Man A#stalk")); end; OnDisable: - hideonnpc instance_npcname("Strange Old Man A#stalk"); + hideonnpc(instance_npcname("Strange Old Man A#stalk")); end; } 1@sara,260,156,0 script Strange Old Man B#stalk FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("Strange Old Man B#stalk")+"::OnDisable"; + donpcevent(instance_npcname("Strange Old Man B#stalk")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Strange Old Man B#stalk"); + hideoffnpc(instance_npcname("Strange Old Man B#stalk")); end; OnDisable: - hideonnpc instance_npcname("Strange Old Man B#stalk"); + hideonnpc(instance_npcname("Strange Old Man B#stalk")); end; } 1@sara,240,145,0 script #sarawarp1 WARPNPC,1,2,{ end; OnInstanceInit: - donpcevent instance_npcname("#sarawarp1")+"::OnDisable"; + donpcevent(instance_npcname("#sarawarp1")+"::OnDisable"); end; OnDisable: - disablenpc instance_npcname("#sarawarp1"); + disablenpc(instance_npcname("#sarawarp1")); end; OnEnable: - enablenpc instance_npcname("#sarawarp1"); + enablenpc(instance_npcname("#sarawarp1")); end; OnTouch: .@map$ = instance_mapname("1@sara"); - warp .@map$, 94, 320; + warp(.@map$, 94, 320); end; } 1@sara,209,250,0 script #sarawarp2 WARPNPC,1,2,{ end; OnInstanceInit: - donpcevent instance_npcname("#sarawarp2")+"::OnDisable"; + donpcevent(instance_npcname("#sarawarp2")+"::OnDisable"); end; OnDisable: - disablenpc instance_npcname("#sarawarp2"); + disablenpc(instance_npcname("#sarawarp2")); end; OnEnable: - enablenpc instance_npcname("#sarawarp2"); + enablenpc(instance_npcname("#sarawarp2")); end; OnTouch: .@map$ = instance_mapname("1@sara"); - warp .@map$, 230, 316; + warp(.@map$, 230, 316); end; } 1@sara,226,190,0 script #sarawarp3 WARPNPC,1,2,{ end; OnInstanceInit: - donpcevent instance_npcname("#sarawarp3")+"::OnDisable"; + donpcevent(instance_npcname("#sarawarp3")+"::OnDisable"); end; OnDisable: - disablenpc instance_npcname("#sarawarp3"); + disablenpc(instance_npcname("#sarawarp3")); end; OnEnable: - enablenpc instance_npcname("#sarawarp3"); + enablenpc(instance_npcname("#sarawarp3")); end; OnTouch: .@map$ = instance_mapname("1@sara"); - warp .@map$, 263, 94; + warp(.@map$, 263, 94); end; } 1@sara,166,67,0 script #sarawarp4 WARPNPC,1,2,{ end; OnInstanceInit: - donpcevent instance_npcname("#sarawarp4")+"::OnDisable"; + donpcevent(instance_npcname("#sarawarp4")+"::OnDisable"); end; OnDisable: - disablenpc instance_npcname("#sarawarp4"); + disablenpc(instance_npcname("#sarawarp4")); end; OnEnable: - enablenpc instance_npcname("#sarawarp4"); + enablenpc(instance_npcname("#sarawarp4")); end; OnTouch: .@map$ = instance_mapname("1@sara"); - warp .@map$, 164, 81; + warp(.@map$, 164, 81); end; } 1@sara,155,180,0 script #sarawarp5 WARPNPC,1,2,{ end; OnInstanceInit: - donpcevent instance_npcname("#sarawarp5")+"::OnDisable"; + donpcevent(instance_npcname("#sarawarp5")+"::OnDisable"); end; OnDisable: - disablenpc instance_npcname("#sarawarp5"); + disablenpc(instance_npcname("#sarawarp5")); end; OnEnable: - enablenpc instance_npcname("#sarawarp5"); + enablenpc(instance_npcname("#sarawarp5")); end; OnTouch: .@map$ = instance_mapname("1@sara"); - warp .@map$, 155, 196; + warp(.@map$, 155, 196); end; } 1@sara,88,188,0 script #sarawarp6 WARPNPC,1,2,{ end; OnInstanceInit: - donpcevent instance_npcname("#sarawarp6")+"::OnDisable"; + donpcevent(instance_npcname("#sarawarp6")+"::OnDisable"); end; OnDisable: - disablenpc instance_npcname("#sarawarp6"); + disablenpc(instance_npcname("#sarawarp6")); end; OnEnable: - enablenpc instance_npcname("#sarawarp6"); + enablenpc(instance_npcname("#sarawarp6")); end; OnTouch: .@map$ = instance_mapname("1@sara"); - warp .@map$, 89, 175; - if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY),2)) - viewpoint 1, 39, 142, 1, C_GREEN; + warp(.@map$, 89, 175); + if (getcharid(CHAR_ID_CHAR) == getpartyleader(getcharid(CHAR_ID_PARTY), 2)) + viewpoint(1, 39, 142, 1, C_GREEN); end; } 1@sara,19,143,0 script #sarawarp7 WARPNPC,1,2,{ end; OnInstanceInit: - donpcevent instance_npcname("#sarawarp7")+"::OnDisable"; + donpcevent(instance_npcname("#sarawarp7")+"::OnDisable"); end; OnDisable: - disablenpc instance_npcname("#sarawarp7"); + disablenpc(instance_npcname("#sarawarp7")); end; OnEnable: - enablenpc instance_npcname("#sarawarp7"); + enablenpc(instance_npcname("#sarawarp7")); end; OnTouch: - completequest 15003; - warp "dali", 134, 111; + completequest(15003); + warp("dali", 134, 111); end; } 1@sara,107,325,5 script Sara Irene#sarains1 4_F_SARAH_BABY,{ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2)) end; - cutin "sara_9sara1.bmp", 2; + cutin("sara_9sara1.bmp", 2); mes("[Sara Irene]"); mes("Oh! Hello again! I remember you, what's up?"); npctalk(_("Oh! Hello again! I remember you, what's up?")); - next; + next(); mes("[Sara Irene]"); mes("I am here to give flowers to my mommy!"); npctalk(_("I am here to give flowers to my mommy!")); - next; + next(); mes("^FF0000Sara leaps forward to open the door, flowers at the ready.^000000"); dispbottom(_("Sara leaps forward to open the door, flowers at the ready.")); - next; + next(); mes("[Sara Irene]"); mes("Mom! Dad! Look what I found!"); npctalk(_("Mom! Dad! Look what I found!")); - next; - cutin "sara_9sara1.bmp", 255; - cutin "sara_momdie.bmp", 4; + next(); + cutin("sara_9sara1.bmp", 255); + cutin("sara_momdie.bmp", 4); mes("^FF0000The door opens to reveal a woman laying dead on the floor and the\r" "Doyen standing over the woman with a bloody sword.^000000"); dispbottom(_("The door opens to reveal a woman laying dead on the floor and the Doyen standing over the woman with a bloody sword.")); - next; + next(); mes("[Sara Irene]"); mes("..."); npctalk("..."); - next; + next(); mes("[Sara Irene]"); mes("..."); npctalk("..."); - next; + next(); mes("[Sara Irene]"); mes("..."); npctalk("..."); mapannounce(instance_mapname("1@sara"), _("[Sara's Mother] : Sara...Ru-..away..."), bc_map, C_YELLOW); - next; + next(); mes("[Sara Irene]"); mes("..."); npctalk("..."); - next; + next(); mes("^FF0000A gem rolls from the womans hand and comes to a rest in front of\r" "Sara. Unconsciously Sara reaches down and picks up the gem.^000000"); dispbottom(_("A gem rolls from the womans hand and comes to a rest in front of Sara. Unconsciously Sara reaches down and picks up the gem.")); - next; + next(); mes("^FF0000The Doyen turns around and notices Sara.^000000"); dispbottom(_("The Doyen turns around and notices Sara.")); - next; - cutin "sara_momdie.bmp", 255; - cutin "sara_elder_irine4.bmp", 2; + next(); + cutin("sara_momdie.bmp", 255); + cutin("sara_elder_irine4.bmp", 2); mes("[Doyen Irene]"); mes("Ahh Sara! I was just looking for you..."); npctalk(_("Ahh Sara! I was just looking for you..."), instance_npcname("Doyen Irene#sarains1")); - next; - cutin "sara_9sara2.bmp", 2; + next(); + cutin("sara_9sara2.bmp", 2); mes("[Sara Irene]"); mes("..."); npctalk("..."); - next; + next(); select("Escape with Sara."); mes("[Sara Irene]"); mes("..."); npctalk("..."); - next; - cutin "sara_elder_irine3.bmp", 2; + next(); + cutin("sara_elder_irine3.bmp", 2); mes("[Doyen Irene]"); mes("Guards! GUARDS! There is a murderer here! Catch him!"); npctalk(_("Guards! GUARDS! There is a murderer here! Catch him!"), instance_npcname("Doyen Irene#sarains1")); - next; + next(); mes("^FF0000The sound of many pairs of boots can be heard running outside!^000000"); dispbottom(_("The sound of many pairs of boots can be heard running outside!")); - next; - cutin "sara_9sara3.bmp", 2; + next(); + cutin("sara_9sara3.bmp", 2); mes("[Sara Irene]"); mes("Mommy no!!!!!!!!!!!!!!!"); npctalk(_("Mommy no!!!!!!!!!!!!!!!")); - next; - cutin "sara_9sara3.bmp", 255; + next(); + cutin("sara_9sara3.bmp", 255); mes("^FF0000Sara runs aways and the sound of the guards is getting closer...^000000"); dispbottom(_("Sara runs aways and the sound of the guards is getting closer...")); - close2; - donpcevent instance_npcname("Sara Irene#sarains1")+"::OnDisable"; - donpcevent instance_npcname("Sara Irene#sarains4")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains5")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains6")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains7")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains8")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains9")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains10")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains11")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains12")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains13")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains14")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains15")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains16")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains17")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains18")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains19")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains20")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains21")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains22")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains23")+"::OnEnable"; - donpcevent instance_npcname("#controlsara")+"::OnEnable"; + close2(); + donpcevent(instance_npcname("Sara Irene#sarains1")+"::OnDisable"); + donpcevent(instance_npcname("Sara Irene#sarains4")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains5")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains6")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains7")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains8")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains9")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains10")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains11")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains12")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains13")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains14")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains15")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains16")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains17")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains18")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains19")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains20")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains21")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains22")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains23")+"::OnEnable"); + donpcevent(instance_npcname("#controlsara")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains1")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains1")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Sara Irene#sarains1"); + hideoffnpc(instance_npcname("Sara Irene#sarains1")); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains1"); + hideonnpc(instance_npcname("Sara Irene#sarains1")); end; } 1@sara,107,325,0 script Doyen Irene#sarains1 FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("Doyen Irene#sarains1")+"::OnDisable"; + donpcevent(instance_npcname("Doyen Irene#sarains1")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Doyen Irene#sarains1"); + hideoffnpc(instance_npcname("Doyen Irene#sarains1")); end; OnDisable: - hideonnpc instance_npcname("Doyen Irene#sarains1"); + hideonnpc(instance_npcname("Doyen Irene#sarains1")); end; } 1@sara,107,327,0 script #controlsara CLEAR_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("#controlsara")+"::OnDisable"; + donpcevent(instance_npcname("#controlsara")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("#controlsara"); - hideonnpc instance_npcname("#controlsara"); - initnpctimer; + enablenpc(instance_npcname("#controlsara")); + hideonnpc(instance_npcname("#controlsara")); + initnpctimer(); end; OnDisable: - disablenpc instance_npcname("#controlsara"); + disablenpc(instance_npcname("#controlsara")); end; OnTimer2000: mapannounce(instance_mapname("1@sara"), _("<SYSTEM> The guards must be defeated to gain access to the next area."), bc_map, C_YELLOW); @@ -694,12 +693,12 @@ OnTimer4000: mapannounce(instance_mapname("1@sara"), _("<SYSTEM> The guards have formed groups of their own to fight you!"), bc_map, C_YELLOW); end; OnTimer5000: - donpcevent instance_npcname("#controlsara")+"::OnRespawn"; - stopnpctimer; + donpcevent(instance_npcname("#controlsara")+"::OnRespawn"); + stopnpctimer(); end; OnRespawn: .@map$ = instance_mapname("1@sara"); - + monster(.@map$, .@x, .@y, _("Maggot"), MG_ARCLOUSE, .@mobs, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); monster(.@map$, 107, 325, _("Payon Town Guard"), PAYONSOLDIER, 1, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); monster(.@map$, 115, 325, _("Payon Town Guard"), PAYONSOLDIER, 1, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); @@ -773,11 +772,11 @@ OnMyMobDead: .@a_mob_num = mobcount(.@map$, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); .@mob_dead_num = .@callnum - .@a_mob_num; if (.@mob_dead_num > 57) { - viewpoint 1, 209, 250, 1, C_GREEN; + viewpoint(1, 209, 250, 1, C_GREEN); mapannounce(instance_mapname("1@sara"), _("<SYSTEM> Sara ran away again! You think she went in the 2 O'clock direction!"), bc_map, C_YELLOW); - donpcevent instance_npcname("#controlsara")+"::OnDisable"; - donpcevent instance_npcname("#controlsara1")+"::OnEnable"; - donpcevent instance_npcname("#sarawarp2")+"::OnEnable"; + donpcevent(instance_npcname("#controlsara")+"::OnDisable"); + donpcevent(instance_npcname("#controlsara1")+"::OnEnable"); + donpcevent(instance_npcname("#sarawarp2")+"::OnEnable"); } end; } @@ -785,15 +784,15 @@ OnMyMobDead: 1@sara,230,316,0 script #controlsara1 CLEAR_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("#controlsara1")+"::OnDisable"; + donpcevent(instance_npcname("#controlsara1")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("#controlsara1"); - hideonnpc instance_npcname("#controlsara1"); - donpcevent instance_npcname("#controlsara1")+"::OnRespawn"; + enablenpc(instance_npcname("#controlsara1")); + hideonnpc(instance_npcname("#controlsara1")); + donpcevent(instance_npcname("#controlsara1")+"::OnRespawn"); end; OnDisable: - disablenpc instance_npcname("#controlsara1"); + disablenpc(instance_npcname("#controlsara1")); end; OnRespawn: .@map$ = instance_mapname("1@sara"); @@ -825,11 +824,11 @@ OnMyMobDead: .@b_mob_num = mobcount(.@map$, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); .@mob_dead_num = .@callnum - .@b_mob_num; if (.@mob_dead_num > 15) { - viewpoint 1, 226, 190, 1, C_GREEN; + viewpoint(1, 226, 190, 1, C_GREEN); mapannounce(instance_mapname("1@sara"), _("<SYSTEM> Sara ran away yet again! You think she went in the 5 O'clock direction!"), bc_map, C_YELLOW); - donpcevent instance_npcname("#controlsara1")+"::OnDisable"; - donpcevent instance_npcname("#controlsara2")+"::OnEnable"; - donpcevent instance_npcname("#sarawarp3")+"::OnEnable"; + donpcevent(instance_npcname("#controlsara1")+"::OnDisable"); + donpcevent(instance_npcname("#controlsara2")+"::OnEnable"); + donpcevent(instance_npcname("#sarawarp3")+"::OnEnable"); } end; } @@ -837,15 +836,15 @@ OnMyMobDead: 1@sara,263,94,0 script #controlsara2 CLEAR_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("#controlsara2")+"::OnDisable"; + donpcevent(instance_npcname("#controlsara2")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("#controlsara2"); - hideonnpc instance_npcname("#controlsara2"); - donpcevent instance_npcname("#controlsara2")+"::OnRespawn"; + enablenpc(instance_npcname("#controlsara2")); + hideonnpc(instance_npcname("#controlsara2")); + donpcevent(instance_npcname("#controlsara2")+"::OnRespawn"); end; OnDisable: - disablenpc instance_npcname("#controlsara2"); + disablenpc(instance_npcname("#controlsara2")); end; OnRespawn: .@map$ = instance_mapname("1@sara"); @@ -909,11 +908,11 @@ OnMyMobDead: .@c_mob_num = mobcount(.@map$, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); .@mob_dead_num = .@callnum - .@c_mob_num; if (.@mob_dead_num > 44) { - viewpoint 1, 166, 67, 1, C_GREEN; + viewpoint(1, 166, 67, 1, C_GREEN); mapannounce(instance_mapname("1@sara"), _("<SYSTEM> Sara ran away yet again! *sigh* You think she went in the 6 O'clock direction!"), bc_map, C_YELLOW); - donpcevent instance_npcname("#controlsara2")+"::OnDisable"; - donpcevent instance_npcname("#controlsara3")+"::OnEnable"; - donpcevent instance_npcname("#sarawarp4")+"::OnEnable"; + donpcevent(instance_npcname("#controlsara2")+"::OnDisable"); + donpcevent(instance_npcname("#controlsara3")+"::OnEnable"); + donpcevent(instance_npcname("#sarawarp4")+"::OnEnable"); } end; } @@ -921,15 +920,15 @@ OnMyMobDead: 1@sara,164,81,0 script #controlsara3 CLEAR_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("#controlsara3")+"::OnDisable"; + donpcevent(instance_npcname("#controlsara3")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("#controlsara3"); - hideonnpc instance_npcname("#controlsara3"); - donpcevent instance_npcname("#controlsara3")+"::OnRespawn"; + enablenpc(instance_npcname("#controlsara3")); + hideonnpc(instance_npcname("#controlsara3")); + donpcevent(instance_npcname("#controlsara3")+"::OnRespawn"); end; OnDisable: - disablenpc instance_npcname("#controlsara3"); + disablenpc(instance_npcname("#controlsara3")); end; OnRespawn: .@map$ = instance_mapname("1@sara"); @@ -975,7 +974,7 @@ OnRespawn: monster(.@map$, 155, 180, _("Payon Town Guard"), PAYONSOLDIER2, 1, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); monster(.@map$, 157, 180, _("Payon Town Guard"), PAYONSOLDIER2, 1, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); monster(.@map$, 159, 180, _("Payon Town Guard"), PAYONSOLDIER2, 1, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); - + monster(.@map$, 173, 139, _("Payon Town Guard"), PAYONSOLDIER, 1, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); monster(.@map$, 170, 139, _("Payon Town Guard"), PAYONSOLDIER, 1, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); monster(.@map$, 167, 139, _("Payon Town Guard"), PAYONSOLDIER, 1, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); @@ -992,15 +991,15 @@ OnMyMobDead: .@d_mob_num = mobcount(.@map$, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); .@mob_dead_num = .@callnum - .@d_mob_num; if (.@mob_dead_num > 42) { - viewpoint 1, 155, 180, 1, C_GREEN; + viewpoint(1, 155, 180, 1, C_GREEN); mapannounce(instance_mapname("1@sara"), _("<SYSTEM> Sara ran away yet again! You think she went in the 12 O'clock direction!"), bc_map, C_YELLOW); - for (.@i=4; .@i<=23; .@i++) { - donpcevent instance_npcname("Sara Irene#sarains" + .@i)+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains" + .@i)+"::OnDisable"; + for (.@i = 4; .@i <= 23; .@i++) { + donpcevent(instance_npcname("Sara Irene#sarains" + .@i)+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains" + .@i)+"::OnDisable"); } - donpcevent instance_npcname("#controlsara3")+"::OnDisable"; - donpcevent instance_npcname("#sarawarp5")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains2")+"::OnEnable"; + donpcevent(instance_npcname("#controlsara3")+"::OnDisable"); + donpcevent(instance_npcname("#sarawarp5")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains2")+"::OnEnable"); } end; } @@ -1008,84 +1007,84 @@ OnMyMobDead: 1@sara,152,233,5 script Sara Irene#sarains2 4_F_SARAH_BABY,{ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2)) end; - cutin "sara_9sara2.bmp", 2; + cutin("sara_9sara2.bmp", 2); mes("[Sara Irene]"); mes("Mommy!"); npctalk(_("Mommy!")); - next; - cutin "sara_elder_irine4.bmp", 2; + next(); + cutin("sara_elder_irine4.bmp", 2); mes("[Doyen Irene]"); mes("Sara..."); npctalk(_("Sara..."), instance_npcname("Doyen Irene#sarains2")); - next; - cutin "sara_9sara2.bmp", 2; + next(); + cutin("sara_9sara2.bmp", 2); mes("[Sara Irene]"); mes("No!"); npctalk(_("No!")); - next; - cutin "sara_elder_irine4.bmp", 2; + next(); + cutin("sara_elder_irine4.bmp", 2); mes("[Doyen Irene]"); mes("I have been looking for you Sara. Please come with daddy it is very dangerous here!"); npctalk(_("I have been looking for you Sara. Please come with daddy it is very dangerous here!"), instance_npcname("Doyen Irene#sarains2")); - next; + next(); mesf("[%s]", strcharinfo(PC_NAME)); mes("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; + next(); + cutin("sara_elder_irine3.bmp", 2); mes("[Doyen Irene]"); mes("The murderer is here! Guards! We will finish him once and for all!"); npctalk(_("The murderer is here! Guards! We will finish him once and for all!"), instance_npcname("Doyen Irene#sarains2")); - next; + next(); mesf("[%s]", strcharinfo(PC_NAME)); mes("Sara... run! Save yourself!"); unittalk(getcharid(CHAR_ID_ACCOUNT), _("Sara... run! Save yourself!")); - next; - cutin "sara_9sara2.bmp", 2; + next(); + cutin("sara_9sara2.bmp", 2); mes("[Sara Irene]"); mes("...okay."); npctalk(_("...okay.")); - close2; - cutin "sara_9sara2.bmp", 255; - donpcevent instance_npcname("Sara Irene#sarains2")+"::OnDisable"; - donpcevent instance_npcname("#controlsara4")+"::OnEnable"; + close2(); + cutin("sara_9sara2.bmp", 255); + donpcevent(instance_npcname("Sara Irene#sarains2")+"::OnDisable"); + donpcevent(instance_npcname("#controlsara4")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains2")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains2")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Sara Irene#sarains2"); + hideoffnpc(instance_npcname("Sara Irene#sarains2")); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains2"); + hideonnpc(instance_npcname("Sara Irene#sarains2")); end; } 1@sara,152,233,5,0 script Doyen Irene#sarains2 FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("Doyen Irene#sarains2")+"::OnDisable"; + donpcevent(instance_npcname("Doyen Irene#sarains2")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Doyen Irene#sarains2"); + hideoffnpc(instance_npcname("Doyen Irene#sarains2")); end; OnDisable: - hideonnpc instance_npcname("Doyen Irene#sarains2"); + hideonnpc(instance_npcname("Doyen Irene#sarains2")); end; } 1@sara,152,233,0 script #controlsara4 FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("#controlsara4")+"::OnDisable"; + donpcevent(instance_npcname("#controlsara4")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("#controlsara4"); - donpcevent instance_npcname("#controlsara4")+"::OnRespawn"; + enablenpc(instance_npcname("#controlsara4")); + donpcevent(instance_npcname("#controlsara4")+"::OnRespawn"); end; OnDisable: - disablenpc instance_npcname("#controlsara4"); + disablenpc(instance_npcname("#controlsara4")); end; OnRespawn: .@map$ = instance_mapname("1@sara"); @@ -1112,9 +1111,9 @@ OnMyMobDead: .@f_mob_num = mobcount(.@map$, instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"); .@mob_dead_num = .@callnum - .@f_mob_num; if (.@mob_dead_num > 7) { - mapannounce(instance_mapname("1@sara"),_("<SYSTEM> Doyen Irene draws his blade!"), bc_map, C_YELLOW); - donpcevent instance_npcname("#controlsara4")+"::OnDisable"; - donpcevent instance_npcname("#controlsara5")+"::OnEnable"; + mapannounce(instance_mapname("1@sara"), _("<SYSTEM> Doyen Irene draws his blade!"), bc_map, C_YELLOW); + donpcevent(instance_npcname("#controlsara4")+"::OnDisable"); + donpcevent(instance_npcname("#controlsara5")+"::OnEnable"); } end; } @@ -1122,14 +1121,14 @@ OnMyMobDead: 1@sara,155,226,0 script #controlsara5 FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("#controlsara5")+"::OnDisable"; + donpcevent(instance_npcname("#controlsara5")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("#controlsara5"); - donpcevent instance_npcname("#controlsara5")+"::OnRespawn"; + enablenpc(instance_npcname("#controlsara5")); + donpcevent(instance_npcname("#controlsara5")+"::OnRespawn"); end; OnDisable: - disablenpc instance_npcname("#controlsara5"); + disablenpc(instance_npcname("#controlsara5")); end; OnRespawn: .@map$ = instance_mapname("1@sara"); @@ -1143,8 +1142,8 @@ OnMyMobDead: .@mob_dead_num = .@callnum - .@g_mob_num; if (.@mob_dead_num > 0) { mapannounce(instance_mapname("1@sara"), _("<SYSTEM> Doyen Irene has fallen."), bc_map, C_YELLOW); - donpcevent instance_npcname("#controlsara5")+"::OnDisable"; - donpcevent instance_npcname("Doyen Irene#sarains3")+"::OnEnable"; + donpcevent(instance_npcname("#controlsara5")+"::OnDisable"); + donpcevent(instance_npcname("Doyen Irene#sarains3")+"::OnEnable"); } end; } @@ -1152,82 +1151,82 @@ OnMyMobDead: 1@sara,156,236,3 script Doyen Irene#sarains3 4_M_CHIEF_IRIN,{ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2)) end; - cutin "sara_elder_irine4.bmp", 2; + cutin("sara_elder_irine4.bmp", 2); mes("[Doyen Irene]"); mes("You... were too strong for me."); npctalk(_("You... were too strong for me.")); - next; + next(); mes("[Doyen Irene]"); mes("Why.. *hack* are you trying to kill my wife and daughter?"); npctalk(_("Why.. *hack* are you trying to kill my wife and daughter?")); - next; + 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(CHAR_ID_ACCOUNT), _("What are you talking about? We saw you standing over Sara's mother with your sword COVERED in blood!")); - next; + next(); mes("[Doyen Irene]"); mes("You.. think I killed Sara's mother?"); npctalk(_("You.. think I killed Sara's mother?")); - next; + next(); mes("[Doyen Irene]"); mes("She *cough* had already been killed by an assassin. I slew him that *hack* is why my blade was covered in blood..."); npctalk(_("She *cough* had already been killed by an assassin. I slew him that *hack* is why my blade was covered in blood...")); - next; - cutin "sara_elder_irine4.bmp", 255; - cutin "sara_momdie.bmp", 4; + next(); + cutin("sara_elder_irine4.bmp", 255); + cutin("sara_momdie.bmp", 4); mes("^FF0000Thinking back you seem to recall another body laying in the left\r" "corner of the room. Maybe that was the assassin the Doyen is talking about.^000000"); dispbottom(_("Thinking back you seem to recall another body laying in the left corner of the room. Maybe that was the assassin the Doyen is talking about.")); - next; - cutin "sara_momdie.bmp", 255; - cutin "sara_elder_irine4.bmp", 2; + next(); + cutin("sara_momdie.bmp", 255); + cutin("sara_elder_irine4.bmp", 2); mes("[Doyen Irene]"); mes("If.. you are not the assassin sent to kill my wife and daughter, who are you?"); npctalk(_("If.. you are not the assassin sent to kill my wife and daughter, who are you?")); - next; + 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(CHAR_ID_ACCOUNT), _("I am just an adventurer who was passing through. I heard some men plotting their deaths and needed to intervene.")); - next; + next(); mes("[Doyen Irene]"); mes("If.. you are telling the truth...\r" "forgive me. I though you were one of them."); npctalk(_("If.. you are telling the truth... forgive me. I though you were one of them.")); - next; + next(); mes("[Doyen Irene]"); mes("Strange men... I bet they were some of the village elders. Ugh..."); npctalk(_("Strange men... I bet they were some of the village elders. Ugh...")); - next; + 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(CHAR_ID_ACCOUNT), _("There might be more assassins so we have to find Sara as fast as we can.")); - next; + next(); mesf("[%s]", strcharinfo(PC_NAME)); mes("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; + next(); mes("[Doyen Irene]"); mes("We must do our best to find her. Let's split up and search for her.\r" "Please help me find my daughter and explain everything to her."); npctalk(_("We must do our best to find her. Let's split up and search for her. Please help me find my daughter and explain everything to her.")); - close2; - cutin "sara_elder_irine4.bmp", 255; - viewpoint 1, 88, 188, 1, C_GREEN; + close2(); + cutin("sara_elder_irine4.bmp", 255); + viewpoint(1, 88, 188, 1, C_GREEN); mapannounce(instance_mapname("1@sara"), _("<SYSTEM> We must find Sara. You seem remember her running in the 8 O'clock direction."), bc_map, C_YELLOW); - donpcevent instance_npcname("Doyen Irene#sarains3")+"::OnDisable"; - donpcevent instance_npcname("#sarawarp6")+"::OnEnable"; - donpcevent instance_npcname("????-#saratalk")+"::OnEnable"; - donpcevent instance_npcname("Sara Irene#sarains3")+"::OnEnable"; + donpcevent(instance_npcname("Doyen Irene#sarains3")+"::OnDisable"); + donpcevent(instance_npcname("#sarawarp6")+"::OnEnable"); + donpcevent(instance_npcname("????-#saratalk")+"::OnEnable"); + donpcevent(instance_npcname("Sara Irene#sarains3")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Doyen Irene#sarains3")+"::OnDisable"; + donpcevent(instance_npcname("Doyen Irene#sarains3")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Doyen Irene#sarains3"); + hideoffnpc(instance_npcname("Doyen Irene#sarains3")); end; OnDisable: - hideonnpc instance_npcname("Doyen Irene#sarains3"); + hideonnpc(instance_npcname("Doyen Irene#sarains3")); end; } @@ -1236,69 +1235,69 @@ OnDisable: 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.")); - next; - cutin "sara_beholder.bmp", 2; + next(); + cutin("sara_beholder.bmp", 2); mes("[?????]"); mes("The time travellers cannot interfere any longer. You cannot stop us from meeting Sara."); npctalk(_("The time travellers cannot interfere any longer. You cannot stop us from meeting Sara."), instance_npcname("????-#saratalk")); - next; + next(); mes("[?????]"); mes("You should go back to the time where you belong."); npctalk(_("You should go back to the time where you belong."), instance_npcname("????-#saratalk")); - next; + next(); mes("^FF0000As you fall to the ground two dark figures approach Sara.^000000"); dispbottom(_("As you fall to the ground two dark figures approach Sara.")); - next; + next(); mes("[?????]"); mes("A girl full of betrayal, despair, and hate. We will guide you to your ultimate fate."); npctalk(_("A girl full of betrayal, despair, and hate. We will guide you to your ultimate fate."), instance_npcname("????-#saratalk")); - next; - cutin "sara_9sara2.bmp", 2; + next(); + cutin("sara_9sara2.bmp", 2); mes("[Sara Irene]"); mes("..."); npctalk("..."); - next; - cutin "sara_beholder.bmp", 2; + next(); + cutin("sara_beholder.bmp", 2); mes("[?????]"); mes("Sara Irene, he will make your dreams come true."); npctalk(_("Sara Irene, he will make your dreams come true."), instance_npcname("????-#saratalk")); - next; - cutin "sara_beholder.bmp", 255; + next(); + cutin("sara_beholder.bmp", 255); mes("^FF0000One of the cloaked strangers covers Sara with their cloak and all three figures disappear.^000000"); dispbottom(_("One of the cloaked strangers covers Sara with their cloak and all three figures disappear.")); - donpcevent instance_npcname("Sara Irene#sarains3")+"::OnDisable"; - next; + donpcevent(instance_npcname("Sara Irene#sarains3")+"::OnDisable"); + next(); mes("^FF0000At the same time as Sara disappearing this place begin to become unstable, just like what Leon said before.^000000"); dispbottom(_("At the same time as Sara disappearing this place begin to become unstable, just like what Leon said before.")); - next; + next(); mes("^FF0000We need to get out from this place quickly to the left. And when we at the outside let's talk to him.^000000"); dispbottom(_("We need to get out from this place quickly to the left. And when we at the outside let's talk to him.")); - close2; - donpcevent instance_npcname("????-#saratalk")+"::OnDisable"; - donpcevent instance_npcname("#sarawarp7")+"::OnEnable"; + close2(); + donpcevent(instance_npcname("????-#saratalk")+"::OnDisable"); + donpcevent(instance_npcname("#sarawarp7")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains3")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains3")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("Sara Irene#sarains3"); + hideoffnpc(instance_npcname("Sara Irene#sarains3")); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains3"); + hideonnpc(instance_npcname("Sara Irene#sarains3")); end; } 1@sara,152,233,0 script ????-#saratalk FAKE_NPC,{ end; OnInstanceInit: - donpcevent instance_npcname("????-#saratalk")+"::OnDisable"; + donpcevent(instance_npcname("????-#saratalk")+"::OnDisable"); end; OnEnable: - hideoffnpc instance_npcname("????-#saratalk"); + hideoffnpc(instance_npcname("????-#saratalk")); end; OnDisable: - hideonnpc instance_npcname("????-#saratalk"); + hideonnpc(instance_npcname("????-#saratalk")); end; } @@ -1306,23 +1305,23 @@ OnDisable: end; OnTouch: npctalk(_("Why daddy?")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains4")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains4")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains4")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains4")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains4")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains4")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains4"); - hideoffnpc instance_npcname("Sara Irene#sarains4"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains4")); + hideoffnpc(instance_npcname("Sara Irene#sarains4")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains4"); - disablenpc instance_npcname("Sara Irene#sarains4"); + hideonnpc(instance_npcname("Sara Irene#sarains4")); + disablenpc(instance_npcname("Sara Irene#sarains4")); end; } @@ -1330,23 +1329,23 @@ OnDisable: end; OnTouch: npctalk(_("Not mommy!")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains5")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains5")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains5")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains5")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains5")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains5")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains5"); - hideoffnpc instance_npcname("Sara Irene#sarains5"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains5")); + hideoffnpc(instance_npcname("Sara Irene#sarains5")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains5"); - disablenpc instance_npcname("Sara Irene#sarains5"); + hideonnpc(instance_npcname("Sara Irene#sarains5")); + disablenpc(instance_npcname("Sara Irene#sarains5")); end; } @@ -1354,23 +1353,23 @@ OnDisable: end; OnTouch: npctalk(_("Why did he do it?!")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains6")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains6")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains6")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains6")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains6")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains6")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains6"); - hideoffnpc instance_npcname("Sara Irene#sarains6"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains6")); + hideoffnpc(instance_npcname("Sara Irene#sarains6")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains6"); - disablenpc instance_npcname("Sara Irene#sarains6"); + hideonnpc(instance_npcname("Sara Irene#sarains6")); + disablenpc(instance_npcname("Sara Irene#sarains6")); end; } @@ -1378,23 +1377,23 @@ OnDisable: end; OnTouch: npctalk(_("Why.. why?!")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains7")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains7")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains7")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains7")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains7")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains7")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains7"); - hideoffnpc instance_npcname("Sara Irene#sarains7"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains7")); + hideoffnpc(instance_npcname("Sara Irene#sarains7")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains7"); - disablenpc instance_npcname("Sara Irene#sarains7"); + hideonnpc(instance_npcname("Sara Irene#sarains7")); + disablenpc(instance_npcname("Sara Irene#sarains7")); end; } @@ -1402,23 +1401,23 @@ OnDisable: end; OnTouch: npctalk(_("Noooo...")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains8")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains8")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains8")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains8")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains8")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains8")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains8"); - hideoffnpc instance_npcname("Sara Irene#sarains8"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains8")); + hideoffnpc(instance_npcname("Sara Irene#sarains8")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains8"); - disablenpc instance_npcname("Sara Irene#sarains8"); + hideonnpc(instance_npcname("Sara Irene#sarains8")); + disablenpc(instance_npcname("Sara Irene#sarains8")); end; } @@ -1426,23 +1425,23 @@ OnDisable: end; OnTouch: npctalk("..."); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains9")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains9")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains9")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains9")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains9")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains9")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains9"); - hideoffnpc instance_npcname("Sara Irene#sarains9"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains9")); + hideoffnpc(instance_npcname("Sara Irene#sarains9")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains9"); - disablenpc instance_npcname("Sara Irene#sarains9"); + hideonnpc(instance_npcname("Sara Irene#sarains9")); + disablenpc(instance_npcname("Sara Irene#sarains9")); end; } @@ -1450,23 +1449,23 @@ OnDisable: end; OnTouch: npctalk(_("Why does it hurt so much?")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains10")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains10")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains10")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains10")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains10")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains10")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains10"); - hideoffnpc instance_npcname("Sara Irene#sarains10"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains10")); + hideoffnpc(instance_npcname("Sara Irene#sarains10")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains10"); - disablenpc instance_npcname("Sara Irene#sarains10"); + hideonnpc(instance_npcname("Sara Irene#sarains10")); + disablenpc(instance_npcname("Sara Irene#sarains10")); end; } @@ -1474,23 +1473,23 @@ OnDisable: end; OnTouch: npctalk(_("........")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains11")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains11")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains11")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains11")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains11")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains11")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains11"); - hideoffnpc instance_npcname("Sara Irene#sarains11"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains11")); + hideoffnpc(instance_npcname("Sara Irene#sarains11")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains11"); - disablenpc instance_npcname("Sara Irene#sarains11"); + hideonnpc(instance_npcname("Sara Irene#sarains11")); + disablenpc(instance_npcname("Sara Irene#sarains11")); end; } @@ -1498,23 +1497,23 @@ OnDisable: end; OnTouch: npctalk(_("...Mommy")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains12")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains12")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains12")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains12")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains12")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains12")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains12"); - hideoffnpc instance_npcname("Sara Irene#sarains12"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains12")); + hideoffnpc(instance_npcname("Sara Irene#sarains12")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains12"); - disablenpc instance_npcname("Sara Irene#sarains12"); + hideonnpc(instance_npcname("Sara Irene#sarains12")); + disablenpc(instance_npcname("Sara Irene#sarains12")); end; } @@ -1522,23 +1521,23 @@ OnDisable: end; OnTouch: npctalk(_("What happened to you daddy?")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains13")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains13")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains13")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains13")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains13")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains13")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains13"); - hideoffnpc instance_npcname("Sara Irene#sarains13"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains13")); + hideoffnpc(instance_npcname("Sara Irene#sarains13")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains13"); - disablenpc instance_npcname("Sara Irene#sarains13"); + hideonnpc(instance_npcname("Sara Irene#sarains13")); + disablenpc(instance_npcname("Sara Irene#sarains13")); end; } @@ -1546,23 +1545,23 @@ OnDisable: end; OnTouch: npctalk(_("All that blood...")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains14")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains14")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains14")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains14")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains14")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains14")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains14"); - hideoffnpc instance_npcname("Sara Irene#sarains14"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains14")); + hideoffnpc(instance_npcname("Sara Irene#sarains14")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains14"); - disablenpc instance_npcname("Sara Irene#sarains14"); + hideonnpc(instance_npcname("Sara Irene#sarains14")); + disablenpc(instance_npcname("Sara Irene#sarains14")); end; } @@ -1570,23 +1569,23 @@ OnDisable: end; OnTouch: npctalk(_("Who are you?!")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains15")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains15")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains15")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains15")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains15")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains15")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains15"); - hideoffnpc instance_npcname("Sara Irene#sarains15"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains15")); + hideoffnpc(instance_npcname("Sara Irene#sarains15")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains15"); - disablenpc instance_npcname("Sara Irene#sarains15"); + hideonnpc(instance_npcname("Sara Irene#sarains15")); + disablenpc(instance_npcname("Sara Irene#sarains15")); end; } @@ -1594,23 +1593,23 @@ OnDisable: end; OnTouch: npctalk(_("I want my mommy!")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains16")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains16")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains16")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains16")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains16")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains16")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains16"); - hideoffnpc instance_npcname("Sara Irene#sarains16"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains16")); + hideoffnpc(instance_npcname("Sara Irene#sarains16")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains16"); - disablenpc instance_npcname("Sara Irene#sarains16"); + hideonnpc(instance_npcname("Sara Irene#sarains16")); + disablenpc(instance_npcname("Sara Irene#sarains16")); end; } @@ -1618,23 +1617,23 @@ OnDisable: end; OnTouch: npctalk(_("........")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains17")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains17")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains17")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains17")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains17")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains17")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains17"); - hideoffnpc instance_npcname("Sara Irene#sarains17"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains17")); + hideoffnpc(instance_npcname("Sara Irene#sarains17")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains17"); - disablenpc instance_npcname("Sara Irene#sarains17"); + hideonnpc(instance_npcname("Sara Irene#sarains17")); + disablenpc(instance_npcname("Sara Irene#sarains17")); end; } @@ -1642,23 +1641,23 @@ OnDisable: end; OnTouch: npctalk(_("Nooooo...")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains18")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains18")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains18")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains18")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains18")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains18")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains18"); - hideoffnpc instance_npcname("Sara Irene#sarains18"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains18")); + hideoffnpc(instance_npcname("Sara Irene#sarains18")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains18"); - disablenpc instance_npcname("Sara Irene#sarains18"); + hideonnpc(instance_npcname("Sara Irene#sarains18")); + disablenpc(instance_npcname("Sara Irene#sarains18")); end; } @@ -1666,23 +1665,23 @@ OnDisable: end; OnTouch: npctalk(_("Mommy!")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains19")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains19")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains19")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains19")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains19")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains19")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains19"); - hideoffnpc instance_npcname("Sara Irene#sarains19"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains19")); + hideoffnpc(instance_npcname("Sara Irene#sarains19")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains19"); - disablenpc instance_npcname("Sara Irene#sarains19"); + hideonnpc(instance_npcname("Sara Irene#sarains19")); + disablenpc(instance_npcname("Sara Irene#sarains19")); end; } @@ -1690,23 +1689,23 @@ OnDisable: end; OnTouch: npctalk("........"); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains20")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains20")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains20")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains20")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains20")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains20")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains20"); - hideoffnpc instance_npcname("Sara Irene#sarains20"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains20")); + hideoffnpc(instance_npcname("Sara Irene#sarains20")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains20"); - disablenpc instance_npcname("Sara Irene#sarains20"); + hideonnpc(instance_npcname("Sara Irene#sarains20")); + disablenpc(instance_npcname("Sara Irene#sarains20")); end; } @@ -1714,23 +1713,23 @@ OnDisable: end; OnTouch: npctalk(_("Daddy!")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains21")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains21")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains21")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains21")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains21")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains21")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains21"); - hideoffnpc instance_npcname("Sara Irene#sarains21"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains21")); + hideoffnpc(instance_npcname("Sara Irene#sarains21")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains21"); - disablenpc instance_npcname("Sara Irene#sarains21"); + hideonnpc(instance_npcname("Sara Irene#sarains21")); + disablenpc(instance_npcname("Sara Irene#sarains21")); end; } @@ -1738,23 +1737,23 @@ OnDisable: end; OnTouch: npctalk("........"); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains22")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains22")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains22")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains22")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains22")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains22")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains22"); - hideoffnpc instance_npcname("Sara Irene#sarains22"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains22")); + hideoffnpc(instance_npcname("Sara Irene#sarains22")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains22"); - disablenpc instance_npcname("Sara Irene#sarains22"); + hideonnpc(instance_npcname("Sara Irene#sarains22")); + disablenpc(instance_npcname("Sara Irene#sarains22")); end; } @@ -1762,22 +1761,22 @@ OnDisable: end; OnTouch: npctalk(_("Why?")); - initnpctimer; - donpcevent instance_npcname("Sara Irene#sarains23")+"::OnDisable"; + initnpctimer(); + donpcevent(instance_npcname("Sara Irene#sarains23")+"::OnDisable"); end; OnTimer60000: - donpcevent instance_npcname("Sara Irene#sarains23")+"::OnEnable"; + donpcevent(instance_npcname("Sara Irene#sarains23")+"::OnEnable"); end; OnInstanceInit: - donpcevent instance_npcname("Sara Irene#sarains23")+"::OnDisable"; + donpcevent(instance_npcname("Sara Irene#sarains23")+"::OnDisable"); end; OnEnable: - enablenpc instance_npcname("Sara Irene#sarains23"); - hideoffnpc instance_npcname("Sara Irene#sarains23"); - stopnpctimer; + enablenpc(instance_npcname("Sara Irene#sarains23")); + hideoffnpc(instance_npcname("Sara Irene#sarains23")); + stopnpctimer(); end; OnDisable: - hideonnpc instance_npcname("Sara Irene#sarains23"); - disablenpc instance_npcname("Sara Irene#sarains23"); + hideonnpc(instance_npcname("Sara Irene#sarains23")); + disablenpc(instance_npcname("Sara Irene#sarains23")); end; } diff --git a/src/char/int_rodex.c b/src/char/int_rodex.c index c45c88eb0..994e8110e 100644 --- a/src/char/int_rodex.c +++ b/src/char/int_rodex.c @@ -92,6 +92,19 @@ static int inter_rodex_fromsql(int char_id, int account_id, int8 opentype, int64 return -1; } break; + + case RODEX_OPENTYPE_UNSET: + if (SQL_ERROR == SQL->StmtPrepare(stmt, + "SELECT `mail_id`, `sender_name`, `sender_id`, `receiver_name`, `receiver_id`, `receiver_accountid`," + "`title`, `body`, `zeny`, `type`, `is_read`, `send_date`, `expire_date`, `weight`" + "FROM `%s` WHERE `expire_date` > '%d' AND (`receiver_id` = '%d' or `receiver_accountid` = '%d') AND `mail_id` > '%"PRId64"'" + "ORDER BY `mail_id` ASC", rodex_db, (int)time(NULL), char_id, account_id, mail_id) + ) { + SqlStmt_ShowDebug(stmt); + SQL->StmtFree(stmt); + return -1; + } + break; } if (SQL_ERROR == SQL->StmtExecute(stmt) @@ -173,7 +186,18 @@ static int inter_rodex_fromsql(int char_id, int account_id, int8 opentype, int64 msg.type &= ~MAIL_TYPE_ZENY; } +#if PACKETVER >= 20170419 + if (opentype == RODEX_OPENTYPE_UNSET) { + if (msg.receiver_id != 0) + msg.opentype = RODEX_OPENTYPE_MAIL; + else + msg.opentype = RODEX_OPENTYPE_ACCOUNT; + } else { + msg.opentype = opentype; + } +#else msg.opentype = opentype; +#endif #if PACKETVER < 20160601 // NPC Message Type isn't supported in old clients msg.type &= ~MAIL_TYPE_NPC; diff --git a/src/common/mmo.h b/src/common/mmo.h index fe67d6efb..52f68b719 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -276,7 +276,11 @@ STATIC_ASSERT(MAX_ITEM_OPTIONS <= 5, "This value is limited by the client and da #define RODEX_BODY_LENGTH (500 + 1) #define RODEX_MAX_ITEM (5) #define RODEX_EXPIRE (1 * 15 * 24 * 60 * 60) +#if PACKETVER >= 20170419 +#define RODEX_MAIL_PER_PAGE 32 +#else #define RODEX_MAIL_PER_PAGE 7 +#endif // The following system marks a different job ID system used by the map server, // which makes a lot more sense than the normal one. [Skotlex] @@ -418,7 +422,7 @@ enum e_item_bound_type { #endif }; -enum { +enum e_option { OPTION_NOTHING = 0x00000000, OPTION_SIGHT = 0x00000001, OPTION_HIDE = 0x00000002, @@ -851,6 +855,7 @@ enum rodex_opentype { RODEX_OPENTYPE_MAIL = 0, RODEX_OPENTYPE_ACCOUNT = 1, RODEX_OPENTYPE_RETURN = 2, + RODEX_OPENTYPE_UNSET = 3, }; enum MAIL_TYPE { @@ -917,7 +922,7 @@ enum { }; //These mark the ID of the jobs, as expected by the client. [Skotlex] -enum { +enum e_class { JOB_NOVICE, JOB_SWORDMAN, JOB_MAGE, diff --git a/src/login/lclif.c b/src/login/lclif.c index f32538610..47b2526c4 100644 --- a/src/login/lclif.c +++ b/src/login/lclif.c @@ -284,7 +284,7 @@ bool lclif_send_server_list(struct login_session_data *sd) packet->server_list[n].ip = htonl((subnet_char_ip) ? subnet_char_ip : server[i].ip); packet->server_list[n].port = sockt->ntows(htons(server[i].port)); // [!] LE byte order here [!] safestrncpy(packet->server_list[n].name, server[i].name, 20); - packet->server_list[n].usercount = server[i].users; + packet->server_list[n].usercount = login->convert_users_to_colors(server[i].users); if (server[i].type == CST_PAYING && sd->expiration_time > time(NULL)) packet->server_list[n].property = CST_NORMAL; diff --git a/src/login/login.c b/src/login/login.c index ae584206f..3db9558b8 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1604,7 +1604,7 @@ bool login_config_read_account(const char *filename, struct config_t *config, bo /** * Frees login->config->client_hash_nodes **/ -void clear_client_hash_nodes(void) +void login_clear_client_hash_nodes(void) { struct client_hash_node *node = login->config->client_hash_nodes; @@ -1618,7 +1618,7 @@ void clear_client_hash_nodes(void) } /** - * Reads information from login_configuration.permission.hash.md5_hashes. + * Reads information from login_configuration.permission.hash.md5_hashes (unused function) * * @param setting The setting to read from. */ @@ -1627,7 +1627,7 @@ void login_config_set_md5hash(struct config_setting_t *setting) int i; int count = libconfig->setting_length(setting); - clear_client_hash_nodes(); + login->clear_client_hash_nodes(); // There's no need to parse if it's disabled or if there's no list if (count <= 0 || !login->config->client_hash_check) @@ -1702,7 +1702,7 @@ bool login_config_read_permission_hash(const char *filename, struct config_t *co libconfig->setting_lookup_bool_real(setting, "enabled", &login->config->client_hash_check); if ((setting = libconfig->lookup(config, "login_configuration/permission/hash/MD5_hashes")) != NULL) - login_config_set_md5hash(setting); + login->config_set_md5hash(setting); return true; } @@ -1710,7 +1710,7 @@ bool login_config_read_permission_hash(const char *filename, struct config_t *co /** * Clears login->config->dnsbl_servers, freeing any allocated memory. */ -void clear_dnsbl_servers(void) +void login_clear_dnsbl_servers(void) { while (VECTOR_LENGTH(login->config->dnsbl_servers) > 0) { aFree(&VECTOR_POP(login->config->dnsbl_servers)); @@ -1728,7 +1728,7 @@ void login_config_set_dnsbl_servers(struct config_setting_t *setting) int i; int count = libconfig->setting_length(setting); - clear_dnsbl_servers(); + login->clear_dnsbl_servers(); // There's no need to parse if it's disabled if (count <= 0 || !login->config->use_dnsbl) @@ -1772,7 +1772,7 @@ bool login_config_read_permission_blacklist(const char *filename, struct config_ libconfig->setting_lookup_bool_real(setting, "enabled", &login->config->use_dnsbl); if ((setting = libconfig->lookup(config, "login_configuration/permission/DNS_blacklist/dnsbl_servers")) != NULL) - login_config_set_dnsbl_servers(setting); + login->config_set_dnsbl_servers(setting); return true; } @@ -1806,15 +1806,47 @@ bool login_config_read_permission(const char *filename, struct config_t *config, libconfig->setting_lookup_bool_real(setting, "check_client_version", &login->config->check_client_version); libconfig->setting_lookup_uint32(setting, "client_version_to_connect", &login->config->client_version_to_connect); - if (!login_config_read_permission_hash(filename, config, imported)) + if (!login->config_read_permission_hash(filename, config, imported)) retval = false; - if (!login_config_read_permission_blacklist(filename, config, imported)) + if (!login->config_read_permission_blacklist(filename, config, imported)) retval = false; return retval; } /** + * Reads 'login_configuration.users_count' and initializes required variables. + * + * @param filename Path to configuration file (used in error and warning messages). + * @param config The current config being parsed. + * @param imported Whether the current config is imported from another file. + * + * @retval false in case of error. + */ +bool login_config_read_users(const char *filename, struct config_t *config, bool imported) +{ + struct config_setting_t *setting = NULL; + bool retval = true; + + nullpo_retr(false, filename); + nullpo_retr(false, config); + + if ((setting = libconfig->lookup(config, "login_configuration/users_count")) == NULL) { + if (imported) + return true; + ShowError("login_config_read: login_configuration/users_count was not found in %s!\n", filename); + return false; + } + + libconfig->setting_lookup_bool_real(setting, "send_user_count_description", &login->config->send_user_count_description); + libconfig->setting_lookup_uint32(setting, "low", &login->config->users_low); + libconfig->setting_lookup_uint32(setting, "medium", &login->config->users_medium); + libconfig->setting_lookup_uint32(setting, "high", &login->config->users_high); + + return retval; +} + +/** * Reads the 'login-config' configuration file and initializes required variables. * * @param filename Path to configuration file. @@ -1833,15 +1865,17 @@ bool login_config_read(const char *filename, bool imported) if (!libconfig->load_file(&config, filename)) return false; // Error message is already shown by libconfig->load_file - if (!login_config_read_inter(filename, &config, imported)) + if (!login->config_read_inter(filename, &config, imported)) retval = false; - if (!login_config_read_console(filename, &config, imported)) + if (!login->config_read_console(filename, &config, imported)) retval = false; - if (!login_config_read_log(filename, &config, imported)) + if (!login->config_read_log(filename, &config, imported)) retval = false; - if (!login_config_read_account(filename, &config, imported)) + if (!login->config_read_account(filename, &config, imported)) retval = false; - if (!login_config_read_permission(filename, &config, imported)) + if (!login->config_read_permission(filename, &config, imported)) + retval = false; + if (!login->config_read_users(filename, &config, imported)) retval = false; if (!loginlog_config_read("conf/common/inter-server.conf", imported)) // Only inter-server @@ -1866,6 +1900,30 @@ bool login_config_read(const char *filename, bool imported) return retval; } +/** + * Convert users count to colors. + * + * @param users Actual users count. + * + * @retval users count or color id. + **/ +uint16 login_convert_users_to_colors(uint16 users) +{ +#if PACKETVER >= 20170726 + if (!login->config->send_user_count_description) + return 4; + if (users <= login->config->users_low) + return 0; + else if (users <= login->config->users_medium) + return 1; + else if (users <= login->config->users_high) + return 2; + return 3; +#else + return users; +#endif +} + //-------------------------------------- // Function called at exit of the server //-------------------------------------- @@ -1877,8 +1935,8 @@ int do_final(void) HPM->event(HPET_FINAL); - clear_client_hash_nodes(); - clear_dnsbl_servers(); + login->clear_client_hash_nodes(); + login->clear_dnsbl_servers(); login_log(0, "login server", 100, "login server shutdown"); @@ -2168,6 +2226,20 @@ void login_defaults(void) { login->config_set_defaults = login_config_set_defaults; login->config_read = login_config_read; + login->config_read_inter = login_config_read_inter; + login->config_read_console = login_config_read_console; + login->config_read_log = login_config_read_log; + login->config_read_account = login_config_read_account; + login->config_read_permission = login_config_read_permission; + login->config_read_permission_hash = login_config_read_permission_hash; + login->config_read_permission_blacklist = login_config_read_permission_blacklist; + login->config_read_users = login_config_read_users; + login->config_set_dnsbl_servers = login_config_set_dnsbl_servers; + + login->clear_dnsbl_servers = login_clear_dnsbl_servers; + login->clear_client_hash_nodes = login_clear_client_hash_nodes; + login->config_set_md5hash = login_config_set_md5hash; + login->convert_users_to_colors = login_convert_users_to_colors; login->LOGIN_CONF_NAME = NULL; login->NET_CONF_NAME = NULL; } diff --git a/src/login/login.h b/src/login/login.h index 5632e6529..d5c9972c0 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -32,6 +32,8 @@ struct mmo_account; struct AccountDB; +struct config_t; +struct config_setting_t; enum E_LOGINSERVER_ST { @@ -119,6 +121,11 @@ struct Login_Config { bool use_dnsbl; ///< dns blacklist blocking ? VECTOR_DECL(char *) dnsbl_servers; ///< dnsbl servers + bool send_user_count_description; + uint32 users_low; + uint32 users_medium; + uint32 users_high; + bool client_hash_check; ///< flags for checking client md5 // TODO: VECTOR candidate struct client_hash_node *client_hash_nodes; ///< linked list containg md5 hash for each gm group @@ -209,6 +216,19 @@ struct login_interface { void (*parse_request_connection) (int fd, struct login_session_data* sd, const char *ip, uint32 ipl); void (*config_set_defaults) (void); bool (*config_read) (const char *filename, bool included); + bool (*config_read_inter) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_console) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_log) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_account) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_permission) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_permission_hash) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_permission_blacklist) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_users) (const char *filename, struct config_t *config, bool imported); + void (*clear_dnsbl_servers) (void); + void (*config_set_dnsbl_servers) (struct config_setting_t *setting); + void (*clear_client_hash_nodes) (void); + void (*config_set_md5hash) (struct config_setting_t *setting); + uint16 (*convert_users_to_colors) (uint16 users); char *LOGIN_CONF_NAME; char *NET_CONF_NAME; ///< Network configuration filename }; diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 7b2c0f8b2..d9f4810ee 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3908,6 +3908,8 @@ ACMD(mapinfo) strcat(atcmd_output, msg_fd(fd,1096)); // PartyLock | if (map->list[m_id].flag.guildlock) strcat(atcmd_output, msg_fd(fd,1097)); // GuildLock | + if (map->list[m_id].flag.noautoloot) + strcat(atcmd_output, msg_fd(fd, 1063)); // NoAutoloot | if (map->list[m_id].flag.noviewid != EQP_NONE) strcat(atcmd_output, msg_fd(fd,1079)); // NoViewID | clif->message(fd, atcmd_output); @@ -4866,21 +4868,19 @@ ACMD(undisguiseguild) *------------------------------------------*/ ACMD(exp) { - char output[CHAT_SIZE_MAX]; - double nextb, nextj; - - memset(output, '\0', sizeof(output)); + double percentb = 0.0, percentj = 0.0; + uint64 nextb, nextj; nextb = pc->nextbaseexp(sd); - if (nextb) - nextb = sd->status.base_exp*100.0/nextb; + if (nextb != 0) + percentb = sd->status.base_exp * 100.0 / nextb; nextj = pc->nextjobexp(sd); - if (nextj) - nextj = sd->status.job_exp*100.0/nextj; + if (nextj != 0) + percentj = sd->status.job_exp * 100.0 / nextj; - sprintf(output, msg_fd(fd,1148), sd->status.base_level, nextb, sd->status.job_level, nextj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%) - clif->message(fd, output); + sprintf(atcmd_output, msg_fd(fd,1148), sd->status.base_level, percentb, sd->status.job_level, percentj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%) + clif->message(fd, atcmd_output); return true; } diff --git a/src/map/battle.c b/src/map/battle.c index 2861599b8..8983e93c9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -993,11 +993,7 @@ int64 battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int64 // FIXME: wflag is undocumented int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_list *target, int nk, int s_ele, int s_ele_, int64 damage, int cflag, int wflag){ struct map_session_data *sd, *tsd; -#ifdef RENEWAL - short cardfix = 100; -#else - short cardfix = 1000; -#endif + int cardfix = 1000; short t_class, s_class, s_race2, t_race2; struct status_data *sstatus, *tstatus; int i; @@ -1073,24 +1069,14 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ if( tsd->sc.data[SC_PROTECT_MDEF] ) cardfix = cardfix * ( 100 - tsd->sc.data[SC_PROTECT_MDEF]->val1 ) / 100; } -#ifdef RENEWAL - if ( cardfix != 100 ) - damage += damage * (cardfix - 100) / 100; -#else if ( cardfix != 1000 ) damage = damage * cardfix / 1000; -#endif break; case BF_WEAPON: t_race2 = status->get_race2(target); if( cflag&2 ){ if( sd && !(nk&NK_NO_CARDFIX_ATK) ){ - short cardfix_ = -#ifdef RENEWAL - 100; -#else - 1000; -#endif + int cardfix_ = 1000; if( sd->state.arrow_atk ){ cardfix = cardfix * (100 + sd->right_weapon.addrace[tstatus->race] + sd->arrow_addrace[tstatus->race]) / 100; if( !(nk&NK_NO_ELEFIX) ){ @@ -1190,16 +1176,11 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ #ifndef RENEWAL if( wflag&BF_LONG ) cardfix = cardfix * (100 + sd->bonus.long_attack_atk_rate) / 100; +#endif if( (cflag&1) && cardfix_ != 1000 ) damage = damage * cardfix_ / 1000; else if( cardfix != 1000 ) damage = damage * cardfix / 1000; -#else - if ((cflag & 1) && cardfix_ != 100) - damage += damage * (cardfix_ - 100) / 100; - else if (cardfix != 100) - damage += damage * (cardfix - 100) / 100; -#endif } }else{ // Target side @@ -1249,13 +1230,8 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ #endif if( tsd->sc.data[SC_PROTECT_DEF] ) cardfix = cardfix * (100 - tsd->sc.data[SC_PROTECT_DEF]->val1) / 100; -#ifdef RENEWAL - if ( cardfix != 100 ) - damage += damage * (cardfix - 100) / 100; -#else if( cardfix != 1000 ) damage = damage * cardfix / 1000; -#endif } } break; @@ -1287,13 +1263,8 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ cardfix = cardfix*(100 - tsd->subsize[sstatus->size]) / 100; cardfix = cardfix*(100 - tsd->subrace2[s_race2]) / 100; cardfix = cardfix * (100 - tsd->bonus.misc_def_rate) / 100; -#ifdef RENEWAL - if ( cardfix != 100 ) - damage += damage * (cardfix - 100) / 100; -#else if ( cardfix != 1000 ) damage = damage * cardfix / 1000; -#endif } break; } @@ -7096,6 +7067,7 @@ static const struct battle_data { { "vending_over_max", &battle_config.vending_over_max, 1, 0, 1, }, { "show_steal_in_same_party", &battle_config.show_steal_in_same_party, 0, 0, 1, }, { "party_hp_mode", &battle_config.party_hp_mode, 0, 0, 1, }, + { "party_change_leader_same_map", &battle_config.party_change_leader_same_map, 0, 0, 1, }, { "show_party_share_picker", &battle_config.party_show_share_picker, 1, 0, 1, }, { "show_picker_item_type", &battle_config.show_picker_item_type, 112, 0, INT_MAX, }, { "party_update_interval", &battle_config.party_update_interval, 1000, 100, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index e6129ca7c..4a63887c4 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -298,6 +298,7 @@ struct Battle_Config { int show_steal_in_same_party; int party_share_type; int party_hp_mode; + int party_change_leader_same_map; int party_show_share_picker; int show_picker_item_type; int attack_attr_none; @@ -545,7 +546,7 @@ struct Battle_Config { int player_warp_keep_direction; int atcommand_levelup_events; // Enable atcommands trigger level up events for NPCs - + int bow_unequip_arrow; int max_summoner_parameter; // Summoner Max Stats diff --git a/src/map/clif.c b/src/map/clif.c index de0f0573f..4dc36be6d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -293,7 +293,11 @@ unsigned char clif_bl_type(struct block_list *bl) case BL_NPC: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); +#if PACKETVER >= 20170726 + return CLUT_EVENT; +#else return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_EVENT; +#endif case BL_PET: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); @@ -1067,14 +1071,17 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu #endif #if PACKETVER >= 20120221 if (battle_config.show_monster_hp_bar && bl->type == BL_MOB && status_get_hp(bl) < status_get_max_hp(bl)) { - const struct mob_data *md = BL_UCCAST(BL_MOB, bl); p.maxHP = status_get_max_hp(bl); p.HP = status_get_hp(bl); - p.isBoss = (md->spawn != NULL && md->spawn->state.boss) ? 1 : 0; } else { p.maxHP = -1; p.HP = -1; - p.isBoss = 0; + } + if (bl->type == BL_MOB) { + const struct mob_data *md = BL_UCCAST(BL_MOB, bl); + p.isBoss = (md->spawn != NULL) ? md->spawn->state.boss : BTYPE_NONE; + } else { + p.isBoss = BTYPE_NONE; } #endif #if PACKETVER >= 20150513 @@ -1216,14 +1223,17 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { #endif #if PACKETVER >= 20120221 if (battle_config.show_monster_hp_bar && bl->type == BL_MOB && status_get_hp(bl) < status_get_max_hp(bl)) { - const struct mob_data *md = BL_UCCAST(BL_MOB, bl); p.maxHP = status_get_max_hp(bl); p.HP = status_get_hp(bl); - p.isBoss = (md->spawn != NULL && md->spawn->state.boss) ? 1 : 0; } else { p.maxHP = -1; p.HP = -1; - p.isBoss = 0; + } + if (bl->type == BL_MOB) { + const struct mob_data *md = BL_UCCAST(BL_MOB, bl); + p.isBoss = (md->spawn != NULL) ? md->spawn->state.boss : BTYPE_NONE; + } else { + p.isBoss = BTYPE_NONE; } #endif #if PACKETVER >= 20150513 @@ -1315,14 +1325,17 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, #endif #if PACKETVER >= 20120221 if (battle_config.show_monster_hp_bar && bl->type == BL_MOB && status_get_hp(bl) < status_get_max_hp(bl)) { - const struct mob_data *md = BL_UCCAST(BL_MOB, bl); p.maxHP = status_get_max_hp(bl); p.HP = status_get_hp(bl); - p.isBoss = (md->spawn != NULL && md->spawn->state.boss) ? 1 : 0; } else { p.maxHP = -1; p.HP = -1; - p.isBoss = 0; + } + if (bl->type == BL_MOB) { + const struct mob_data *md = BL_UCCAST(BL_MOB, bl); + p.isBoss = (md->spawn != NULL) ? md->spawn->state.boss : BTYPE_NONE; + } else { + p.isBoss = BTYPE_NONE; } #endif #if PACKETVER >= 20150513 @@ -3033,27 +3046,50 @@ void clif_updatestatus(struct map_session_data *sd,int type) WFIFOL(fd,4)=sd->status.zeny; len = packet_len(0xb1); break; +// [4144] unconfirment exact version can be from 20170405 to 20170913 +#if PACKETVER >= 20170830 case SP_BASEEXP: - WFIFOW(fd,0)=0xb1; - WFIFOL(fd,4)=(uint32)(sd->status.base_exp); + WFIFOW(fd, 0) = 0xacb; + WFIFOQ(fd, 4) = sd->status.base_exp; + len = packet_len(0xacb); + break; + case SP_JOBEXP: + WFIFOW(fd, 0) = 0xacb; + WFIFOQ(fd, 4) = sd->status.job_exp; + len = packet_len(0xacb); + break; + case SP_NEXTBASEEXP: + WFIFOW(fd, 0) = 0xacb; + WFIFOQ(fd, 4) = pc->nextbaseexp(sd); + len = packet_len(0xacb); + break; + case SP_NEXTJOBEXP: + WFIFOW(fd, 0) = 0xacb; + WFIFOQ(fd, 4) = pc->nextjobexp(sd); + len = packet_len(0xacb); + break; +#else + case SP_BASEEXP: + WFIFOW(fd, 0) = 0xb1; + WFIFOL(fd, 4) = (uint32)(sd->status.base_exp); len = packet_len(0xb1); break; case SP_JOBEXP: - WFIFOW(fd,0)=0xb1; - WFIFOL(fd,4)=(uint32)(sd->status.job_exp); + WFIFOW(fd, 0) = 0xb1; + WFIFOL(fd, 4) = (uint32)(sd->status.job_exp); len = packet_len(0xb1); break; case SP_NEXTBASEEXP: - WFIFOW(fd,0)=0xb1; - WFIFOL(fd,4)=pc->nextbaseexp(sd); + WFIFOW(fd, 0) = 0xb1; + WFIFOL(fd, 4) = (uint32)pc->nextbaseexp(sd); len = packet_len(0xb1); break; case SP_NEXTJOBEXP: - WFIFOW(fd,0)=0xb1; - WFIFOL(fd,4)=pc->nextjobexp(sd); + WFIFOW(fd, 0) = 0xb1; + WFIFOL(fd, 4) = (uint32)pc->nextjobexp(sd); len = packet_len(0xb1); break; - +#endif /** * SP_U<STAT> are used to update the amount of points necessary to increase that stat **/ @@ -3309,17 +3345,22 @@ void clif_changelook(struct block_list *bl,int type,int val) #if PACKETVER < 4 clif->sendlook(bl, bl->id, type, val, 0, target); #else - if(type == LOOK_WEAPON || type == LOOK_SHIELD) { - nullpo_retv(vd); - type = LOOK_WEAPON; - val = vd->weapon; - val2 = vd->shield; - } - if (clif->isdisguised(bl)) { - clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS); - clif->sendlook(bl, -bl->id, type, val, val2, SELF); + if (bl->type != BL_NPC) { + if(type == LOOK_WEAPON || type == LOOK_SHIELD) { + nullpo_retv(vd); + type = LOOK_WEAPON; + val = vd->weapon; + val2 = vd->shield; + } + if (clif->isdisguised(bl)) { + clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS); + clif->sendlook(bl, -bl->id, type, val, val2, SELF); + } else { + clif->sendlook(bl, bl->id, type, val, val2, target); + } } else { - clif->sendlook(bl, bl->id, type, val, val2, target); + struct npc_data *nd = BL_UCAST(BL_NPC, bl); + npc->refresh(nd); } #endif } @@ -14027,7 +14068,7 @@ void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd) /* it sends the request when the criteria doesn't match (and of course we let it fail) */ /* so restoring the old parse_globalmes method. */ if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) { - unsigned int next = pc->nextbaseexp(sd); + uint64 next = pc->nextbaseexp(sd); if( next == 0 ) next = pc->thisbaseexp(sd); if( next ) { int percent = (int)( ( (float)sd->status.base_exp/(float)next )*1000. ); @@ -16697,20 +16738,34 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat /// exp type: /// 0 = normal exp gain/loss /// 1 = quest exp gain/loss -void clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool is_quest) { +void clif_displayexp(struct map_session_data *sd, uint64 exp, char type, bool is_quest) +{ int fd; +// [4144] unconfirment exact version can be from 20170405 to 20170913 +#if PACKETVER >= 20170830 + const int cmd = 0xacc; +#else + const int cmd = 0x7f6; +#endif nullpo_retv(sd); fd = sd->fd; - WFIFOHEAD(fd, packet_len(0x7f6)); - WFIFOW(fd,0) = 0x7f6; - WFIFOL(fd,2) = sd->bl.id; - WFIFOL(fd,6) = exp; - WFIFOW(fd,10) = type; - WFIFOW(fd,12) = is_quest?1:0;// Normal exp is shown in yellow, quest exp is shown in purple. - WFIFOSET(fd,packet_len(0x7f6)); + WFIFOHEAD(fd, packet_len(cmd)); + WFIFOW(fd, 0) = cmd; + WFIFOL(fd, 2) = sd->bl.id; +// [4144] unconfirment exact version can be from 20170405 to 20170913 +#if PACKETVER >= 20170830 + WFIFOQ(fd, 6) = exp; + WFIFOW(fd, 14) = type; + WFIFOW(fd, 16) = is_quest ? 1 : 0; // Normal exp is shown in yellow, quest exp is shown in purple. +#else + WFIFOL(fd, 6) = (uint32)exp; + WFIFOW(fd, 10) = type; + WFIFOW(fd, 12) = is_quest ? 1 : 0; // Normal exp is shown in yellow, quest exp is shown in purple. +#endif + WFIFOSET(fd, packet_len(cmd)); } /// Displays digital clock digits on top of the screen (ZC_SHOWDIGIT). @@ -19433,8 +19488,9 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE); packet = WFIFOP(fd, 0); packet->PacketType = ((page_start == (VECTOR_LENGTH(sd->rodex.messages) - 1)) ? rodexmailList : rodexnextpage); +#if PACKETVER < 20170419 packet->opentype = open_type; - +#endif inner = WFIFOP(fd, size); while (page_start >= 0 && count < RODEX_MAIL_PER_PAGE) { @@ -19447,7 +19503,11 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ inner->MailID = msg->id; inner->Isread = msg->is_read == true ? 1 : 0; inner->type = msg->type; +#if PACKETVER >= 20170419 + inner->openType = msg->opentype; +#else inner->regDateTime = (int)time(NULL) - msg->send_date; +#endif inner->expireDateTime = msg->expire_date - (int)time(NULL); if (open_type == RODEX_OPENTYPE_RETURN) { inner->expireDateTime += RODEX_EXPIRE; @@ -19465,12 +19525,80 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ } packet->PacketLength = size; +#if PACKETVER < 20170419 packet->cnt = count; +#endif packet->IsEnd = page_start > 0 ? 0 : 1; WFIFOSET(fd, size); #endif } +void clif_rodex_send_mails_all(int fd, struct map_session_data *sd) +{ +#if PACKETVER >= 20170419 + struct PACKET_ZC_MAIL_LIST *packet; + struct maillistinfo *inner; + int16 size = sizeof(*packet); + int packetMailCount = 0; + int mailListCount = 0; + int mailsSize = VECTOR_LENGTH(sd->rodex.messages); + int i; + + nullpo_retv(sd); + + WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE); + packet = WFIFOP(fd, 0); + packet->PacketType = rodexmailList; + inner = WFIFOP(fd, size); + + i = mailsSize - 1; + while (i >= 0) { + struct rodex_message *msg = &VECTOR_INDEX(sd->rodex.messages, i); + --i; + + if (msg->is_deleted) + continue; + + inner->MailID = msg->id; + inner->Isread = msg->is_read == true ? 1 : 0; + inner->type = msg->type; + inner->openType = msg->opentype; + inner->expireDateTime = msg->expire_date - (int)time(NULL); + if (msg->opentype == RODEX_OPENTYPE_RETURN) { + inner->expireDateTime += RODEX_EXPIRE; + } + inner->Titlelength = (int16)strlen(msg->title) + 1; + if (msg->opentype != RODEX_OPENTYPE_RETURN) { + strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name)); + } else { + strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name)); + } + strncpy(inner->title, msg->title, inner->Titlelength); + size += sizeof(*inner) + inner->Titlelength; + inner = WFIFOP(fd, size); + packetMailCount ++; + mailListCount ++; + if (packetMailCount == RODEX_MAIL_PER_PAGE) { + packet->PacketLength = size; + packet->IsEnd = mailListCount > mailsSize ? 1 : 0; + WFIFOSET(fd, size); + WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE); + packet = WFIFOP(fd, 0); + packet->PacketType = rodexmailList; + size = sizeof(*packet); + inner = WFIFOP(fd, size); + packetMailCount = 0; + } + } + + if (packetMailCount > 0 || mailListCount == 0) { + packet->PacketLength = size; + packet->IsEnd = 1; + WFIFOSET(fd, size); + } +#endif +} + void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type, int count) { #if PACKETVER >= 20131218 @@ -19484,8 +19612,9 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE); packet = WFIFOP(fd, 0); packet->PacketType = rodexmailList; +#if PACKETVER < 20170419 packet->opentype = open_type; - +#endif inner = WFIFOP(fd, size); i = VECTOR_LENGTH(sd->rodex.messages) - 1; @@ -19500,7 +19629,11 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type inner->MailID = msg->id; inner->Isread = msg->is_read == true ? 1 : 0; inner->type = msg->type; +#if PACKETVER >= 20170419 + inner->openType = msg->opentype; +#else inner->regDateTime = (int)time(NULL) - msg->send_date; +#endif inner->expireDateTime = msg->expire_date - (int)time(NULL); if (open_type == RODEX_OPENTYPE_RETURN) { inner->expireDateTime += RODEX_EXPIRE; @@ -19518,7 +19651,9 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type } packet->PacketLength = size; +#if PACKETVER < 20170419 packet->cnt = count; +#endif packet->IsEnd = 1; WFIFOSET(fd, size); #endif @@ -19693,14 +19828,22 @@ void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd) __at void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd) { const struct PACKET_CZ_REQ_REFRESH_MAIL_LIST *packet = RFIFOP(fd, 0); +#if PACKETVER >= 20170419 + rodex->refresh(sd, RODEX_OPENTYPE_UNSET, packet->Upper_MailID); +#else rodex->refresh(sd, packet->opentype, packet->Upper_MailID); +#endif } void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd) { const struct PACKET_CZ_REQ_OPEN_MAIL *packet = RFIFOP(fd, 0); - rodex->open(sd, packet->opentype); +#if PACKETVER >= 20170419 + rodex->open(sd, RODEX_OPENTYPE_UNSET, packet->Upper_MailID); +#else + rodex->open(sd, packet->opentype, packet->Upper_MailID); +#endif rodex->clean(sd, 1); } @@ -20785,4 +20928,5 @@ void clif_defaults(void) { clif->pRodexRequestItems = clif_parse_rodex_request_items; clif->rodex_request_items = clif_rodex_request_items; clif->rodex_icon = clif_rodex_icon; + clif->rodex_send_mails_all = clif_rodex_send_mails_all; } diff --git a/src/map/clif.h b/src/map/clif.h index ac8cc8d35..851c823ea 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -385,6 +385,7 @@ enum clif_messages { MSG_SECONDS_UNTIL_USE = 0x746, ///< %d seconds left until you can use MSG_NPC_WORK_IN_PROGRESS = 0x783, // FIXME[Haru]: This seems to be 0x784 in the msgstringtable files I found. MSG_REINS_CANT_USE_MOUNTED = 0x78b, // FIXME[Haru]: This seems to be 0x785 in the msgstringtalbe files I found. + MSG_PARTY_LEADER_SAMEMAP = 0x82e, //< It is only possible to change the party leader while on the same map. }; /** @@ -783,7 +784,7 @@ struct clif_interface { void (*equiptickack) (struct map_session_data* sd, int flag); void (*viewequip_ack) (struct map_session_data* sd, struct map_session_data* tsd); void (*equpcheckbox) (struct map_session_data* sd); - void (*displayexp) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest); + void (*displayexp) (struct map_session_data *sd, uint64 exp, char type, bool is_quest); void (*font) (struct map_session_data *sd); void (*progressbar) (struct map_session_data * sd, unsigned int color, unsigned int second); void (*progressbar_abort) (struct map_session_data * sd); @@ -1377,6 +1378,7 @@ struct clif_interface { void (*rodex_send_mail_result) (int fd, struct map_session_data *sd, int8 result); void (*rodex_send_maillist) (int fd, struct map_session_data *sd, int8 open_type, int64 page_start); void (*rodex_send_refresh) (int fd, struct map_session_data *sd, int8 open_type, int count); + void (*rodex_send_mails_all) (int fd, struct map_session_data *sd); void (*pRodexReadMail) (int fd, struct map_session_data *sd); void (*rodex_read_mail) (struct map_session_data *sd, int8 opentype, struct rodex_message *msg); void (*pRodexNextMaillist) (int fd, struct map_session_data *sd); diff --git a/src/map/guild.c b/src/map/guild.c index 092e066c3..bb0484477 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1282,7 +1282,8 @@ struct DBData create_expcache(union DBKey key, va_list args) /*==================================================== * Return taxed experience from player sd to guild *---------------------------------------------------*/ -unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp) { +uint64 guild_payexp(struct map_session_data *sd, uint64 exp) +{ struct guild *g; struct guild_expcache *c; int per; diff --git a/src/map/guild.h b/src/map/guild.h index 71e989870..9296f9ec0 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -100,7 +100,7 @@ struct guild_interface { struct map_session_data *(*getavailablesd) (struct guild *g); int (*getindex) (const struct guild *g, int account_id, int char_id); int (*getposition) (struct guild *g, struct map_session_data *sd); - unsigned int (*payexp) (struct map_session_data *sd,unsigned int exp); + uint64 (*payexp) (struct map_session_data *sd, uint64 exp); int (*getexp) (struct map_session_data *sd,int exp); // [Celest] /* */ int (*create) (struct map_session_data *sd, const char *name); diff --git a/src/map/intif.c b/src/map/intif.c index 1458fc710..60edc8d8b 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -2433,7 +2433,9 @@ int intif_rodex_requestinbox(int char_id, int account_id, int8 flag, int8 openty void intif_parse_RequestRodexOpenInbox(int fd) { struct map_session_data *sd; +#if PACKETVER < 20170419 int8 opentype = RFIFOB(fd, 8); +#endif int8 flag = RFIFOB(fd, 9); int8 is_end = RFIFOB(fd, 10); int count = RFIFOL(fd, 11); @@ -2461,10 +2463,14 @@ void intif_parse_RequestRodexOpenInbox(int fd) } if (is_end == true) { +#if PACKETVER >= 20170419 + clif->rodex_send_mails_all(sd->fd, sd); +#else if (flag == 0) clif->rodex_send_maillist(sd->fd, sd, opentype, VECTOR_LENGTH(sd->rodex.messages) - 1); else clif->rodex_send_refresh(sd->fd, sd, opentype, count); +#endif } } diff --git a/src/map/map.c b/src/map/map.c index f8aebcfa6..5a647625f 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -447,6 +447,11 @@ int map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { struct status_change *sc = status->get_sc(bl); if (sc && (sc->option&OPTION_INVISIBLE)) continue; + if (bl->type == BL_NPC) { + const struct npc_data *nd = BL_UCCAST(BL_NPC, bl); + if (nd->class_ == FAKE_NPC || nd->class_ == HIDDEN_WARP_CLASS) + continue; + } } if (flag&0x1) { struct unit_data *ud = unit->bl2ud(bl); @@ -1835,7 +1840,7 @@ void map_addiddb(struct block_list *bl) struct mob_data *md = BL_UCAST(BL_MOB, bl); idb_put(map->mobid_db,bl->id,bl); - if( md->state.boss ) + if (md->state.boss == BTYPE_MVP) idb_put(map->bossid_db, bl->id, bl); } diff --git a/src/map/map.h b/src/map/map.h index d4284b3f7..5835b5abc 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -519,7 +519,7 @@ struct spawn_data { //0: Normal mob | 1: Standard summon, attacks mobs //2: Alchemist Marine Sphere | 3: Alchemist Summon Flora | 4: Summon Zanzou unsigned int dynamic : 1; ///< Whether this data is indexed by a map's dynamic mob list - unsigned int boss : 1; ///< 0: Non-boss monster | 1: Boss monster + uint8 boss; ///< 0: Non-boss monster | 1: Boss monster | 2: MVP } state; char name[NAME_LENGTH], eventname[EVENT_NAME_LENGTH]; //Name/event }; @@ -852,6 +852,7 @@ struct map_data { unsigned noknockback : 1; unsigned notomb : 1; unsigned nocashshop : 1; + unsigned noautoloot : 1; uint32 noviewid; ///< noviewid (bitmask - @see enum equip_pos) } flag; struct point save; diff --git a/src/map/mob.c b/src/map/mob.c index 98f8865a9..208617b5d 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1354,7 +1354,7 @@ int mob_unlocktarget(struct mob_data *md, int64 tick) { md->ud.target_to = 0; unit->set_target(&md->ud, 0); } - if(battle_config.official_cell_stack_limit && map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) { + if(battle_config.official_cell_stack_limit && map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 0x1 | 0x2) > battle_config.official_cell_stack_limit) { unit->walktoxy(&md->bl, md->bl.x, md->bl.y, 8); } @@ -1904,6 +1904,7 @@ void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct ite if( sd && (drop_rate <= sd->state.autoloot || pc->isautolooting(sd, ditem->item_data.nameid)) + && (!map->list[sd->bl.m].flag.noautoloot) && (battle_config.idle_no_autoloot == 0 || DIFF_TICK(sockt->last_tick, sd->idletime) < battle_config.idle_no_autoloot) && (battle_config.homunculus_autoloot?1:!flag) #ifdef AUTOLOOT_DISTANCE @@ -2685,7 +2686,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { return 5; // Note: Actually, it's 4. Oh well... // MvP tomb [GreenBox] - if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map->list[md->bl.m].flag.notomb != 1) + if (battle_config.mvp_tomb_enabled && md->spawn->state.boss == BTYPE_MVP && map->list[md->bl.m].flag.notomb != 1) mob->mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); if( !rebirth ) { diff --git a/src/map/mob.h b/src/map/mob.h index 7f2accedf..83e022899 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -69,6 +69,12 @@ struct hplugin_data_store; // Disable this to make monsters not do any path search when looking for a target (old behavior). #define ACTIVEPATHSEARCH +enum e_bosstype { + BTYPE_NONE = 0, + BTYPE_BOSS = 1, + BTYPE_MVP = 2, +}; + //Mob skill states. enum MobSkillState { MSS_ANY = -1, @@ -181,10 +187,10 @@ struct mob_data { unsigned int spotted: 1; unsigned int npc_killmonster: 1; //for new killmonster behavior unsigned int rebirth: 1; // NPC_Rebirth used - unsigned int boss : 1; enum MobSkillState skillstate; unsigned char steal_flag; //number of steal tries (to prevent steal exploit on mobs with few items) [Lupus] unsigned char attacked_count; //For rude attacked. + uint8 boss; int provoke_flag; // Celest } state; struct guardian_data* guardian_data; diff --git a/src/map/npc.c b/src/map/npc.c index 6beff2b77..0702b2525 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -114,6 +114,8 @@ bool npc_db_checkid(int id) return true; if (id >= MAX_NPC_CLASS2_START && id < MAX_NPC_CLASS2_END) // Second range return true; + if (pc->db_checkid(id)) + return true; // Anything else is invalid return false; } @@ -2706,6 +2708,7 @@ struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, u nd->area_size = AREA_SIZE + 1; nd->class_ = class_; nd->speed = 200; + nd->vd.class = 0; return nd; } @@ -3656,6 +3659,18 @@ void npc_setclass(struct npc_data* nd, short class_) { clif->spawn(&nd->bl);// fade in } +void npc_refresh(struct npc_data* nd) +{ + nullpo_retv(nd); + + if (map->list[nd->bl.m].users) { + // using here CLR_TRICKDEAD because other flags show effects. + // probably need use other flag or other way to refresh npc. + clif->clearunit_area(&nd->bl, CLR_TRICKDEAD); // fade out + clif->spawn(&nd->bl); // fade in + } +} + // @commands (script based) int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const char* message, const char* eventname) { @@ -3843,7 +3858,12 @@ const char *npc_parse_mob(const char *w1, const char *w2, const char *w3, const memset(&mobspawn, 0, sizeof(struct spawn_data)); - mobspawn.state.boss = (strcmp(w2,"boss_monster") == 0 ? 1 : 0); + if (strcmp(w2, "boss_monster") == 0) + mobspawn.state.boss = BTYPE_MVP; + else if (strcmp(w2, "miniboss_monster") == 0) + mobspawn.state.boss = BTYPE_BOSS; + else + mobspawn.state.boss = BTYPE_NONE; // w1=<map name>,<x>,<y>,<xs>,<ys> // w3=<mob name>{,<mob level>} @@ -4300,6 +4320,8 @@ const char *npc_parse_mapflag(const char *w1, const char *w2, const char *w3, co map->list[m].flag.reset=state; else if (!strcmpi(w3,"notomb")) map->list[m].flag.notomb=state; + else if (!strcmpi(w3, "noautoloot")) + map->list[m].flag.noautoloot = state; else if (!strcmpi(w3,"adjust_unit_duration")) { int skill_id, k; char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH]; @@ -4660,7 +4682,7 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) { { p = npc->parse_duplicate(w1,w2,w3,w4, p, buffer, filepath, (runOnInit?NPO_ONINIT:NPO_NONE), &success); } - else if( (strcmp(w2,"monster") == 0 || strcmp(w2,"boss_monster") == 0) ) + else if (strcmp(w2,"monster") == 0 || strcmp(w2,"boss_monster") == 0 || strcmp(w2,"miniboss_monster") == 0) { p = npc->parse_mob(w1, w2, w3, w4, p, buffer, filepath, &success); } @@ -4992,7 +5014,6 @@ int do_init_npc(bool minimal) { npc_viewdb[i].class = i; for( i = MAX_NPC_CLASS2_START; i < MAX_NPC_CLASS2_END; i++ ) npc_viewdb2[i - MAX_NPC_CLASS2_START].class = i; - npc->ev_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, EVENT_NAME_LENGTH); npc->ev_label_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, NAME_LENGTH); npc->name_db = strdb_alloc(DB_OPT_BASE, NAME_LENGTH); @@ -5187,4 +5208,5 @@ void npc_defaults(void) { npc->market_delfromsql = npc_market_delfromsql; npc->market_delfromsql_sub = npc_market_delfromsql_sub; npc->db_checkid = npc_db_checkid; + npc->refresh = npc_refresh; } diff --git a/src/map/npc.h b/src/map/npc.h index 3bd11d536..8bb38f252 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -70,7 +70,7 @@ struct npc_parse; struct npc_data { struct block_list bl; struct unit_data *ud; - struct view_data *vd; + struct view_data vd; unsigned int option; struct npc_data *master_nd; short class_; @@ -309,6 +309,7 @@ struct npc_interface { void (*market_delfromsql) (struct npc_data *nd, unsigned short index); void (*market_delfromsql_sub) (const char *npcname, unsigned short index); bool (*db_checkid) (const int id); + void (*refresh) (struct npc_data* nd); /** * For the Secure NPC Timeout option (check config/Secure.h) [RR] **/ diff --git a/src/map/packets.h b/src/map/packets.h index afa986346..3fcf1648a 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -9476,8 +9476,8 @@ packet(0x96e,-1,clif->ackmergeitems); // 2017-02-28aRagexeRE #if PACKETVER >= 20170228 // new packets - packet(0x0ac0,26); - packet(0x0ac1,26); + packet(0x0ac0,26,clif->pRodexOpenMailbox); // CZ_OPEN_RODEXBOX + packet(0x0ac1,26,clif->pRodexRefreshMaillist); // CZ_REQ_REFRESH_RODEX packet(0x0ac2,-1); packet(0x0ac3,2); packet(0x0ac4,-1); @@ -10527,4 +10527,220 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0adf,58); #endif +// 2017-09-27bRagexeRE +#if PACKETVER == 20170927 +// shuffle packets + packet(0x02c4,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x035f,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0361,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0362,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0366,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x085c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0873,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0875,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x087d,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x087e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x088b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0899,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x089a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x089b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a3,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08a5,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08a6,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08ad,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x091e,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0922,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0923,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0927,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x093b,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0942,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0945,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x094b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x094d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0959,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x095a,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND +#endif + +#if PACKETVER >= 20170927 +// new packets + packet(0x0ae0,30); +// changed packet sizes +#endif + +// 2017-10-02cRagexeRE +#if PACKETVER == 20171002 +// shuffle packets + packet(0x022d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0363,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0885,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0897,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0899,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x089d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0928,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x092d,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0934,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x093b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x093d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x093e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0943,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x095f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-10-11bRagexeRE +#if PACKETVER == 20171011 +// shuffle packets + packet(0x023b,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0882,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0950,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0954,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-10-18aRagexeRE +#if PACKETVER == 20171018 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0363,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0364,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086a,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x087a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x087e,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0889,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x089a,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x089f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08a6,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0938,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0944,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x094a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x094f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-10-25eRagexeRE +#if PACKETVER == 20171025 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a2,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-11-01bRagexeRE +#if PACKETVER == 20171101 +// shuffle packets + packet(0x022d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0368,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0369,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0438,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0835,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x085b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0860,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x086c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0872,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0876,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0886,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088e,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0890,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0895,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0899,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x089b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x089c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08a0,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08ab,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08ad,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x091b,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0939,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x094a,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0952,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0957,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x095a,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0962,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0966,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND +#endif + +// 2017-11-01bRagexeRE +#if PACKETVER >= 20171101 +// new packets + packet(0x0ae1,28); +#endif + #endif /* MAP_PACKETS_H */ diff --git a/src/map/packets_keys.h b/src/map/packets_keys.h index 424956bc9..005c3790b 100644 --- a/src/map/packets_keys.h +++ b/src/map/packets_keys.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2015 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2057,7 +2057,7 @@ packetKeys(0x03FA5A97,0x20B802D5,0x339F1977); #endif -// 2017-06-07bRagexeRE +// 2017-06-07bRagexeRE, 2017-06-07cRagexeRE #if PACKETVER == 20170607 packetKeys(0x50564ACD,0x79CA4E15,0x405F4894); #endif @@ -2132,6 +2132,37 @@ packetKeys(0x53024DA5,0x04EC212D,0x0BF87CD4); #endif +// 2017-09-27bRagexeRE, 2017-09-27dRagexeRE +#if PACKETVER == 20170927 + packetKeys(0x15624100,0x0CE1463E,0x0E5D6534); +#endif + +// 2017-10-02cRagexeRE +#if PACKETVER == 20171002 + packetKeys(0x15E1716C,0x4E765B63,0x357D2370); +#endif + +// 2017-10-11aRagexeRE, 2017-10-11bRagexeRE +#if PACKETVER == 20171011 + packetKeys(0x4F121B3E,0x12670E17,0x19896C11); +#endif + +// 2017-10-18aRagexeRE +#if PACKETVER == 20171018 + packetKeys(0x2CAA109C,0x158C1EC2,0x7A5E58F3); +#endif + +// 2017-10-25bRagexeRE, 2017-10-25cRagexeRE, 2017-10-25dRagexeRE, 2017-10-25eRagexeRE +#if PACKETVER == 20171025 + packetKeys(0x165C565C,0x565C565C,0x565C565C); +#endif + +// 2017-11-01bRagexeRE +#if PACKETVER == 20171101 + packetKeys(0x7056317F,0x7EEE0589,0x02672373); +#endif + + #if defined(OBFUSCATIONKEY1) && defined(OBFUSCATIONKEY2) && defined(OBFUSCATIONKEY3) packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3); #endif diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 207c345da..03b555e2b 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -318,10 +318,12 @@ enum packet_headers { rodexadditem = 0x0A05, rodexremoveitem = 0x0A07, rodexopenwrite = 0x0A12, -#if PACKETVER < 20160600 +#if PACKETVER < 20160601 rodexmailList = 0x09F0, -#else // PACKETVER >= 20160600 +#elif PACKETVER < 20170419 rodexmailList = 0x0A7D, +#else // PACKETVER >= 20170419 + rodexmailList = 0x0Ac2, #endif #if PACKETVER < 20160316 rodexcheckplayer = 0x0A14, @@ -1369,11 +1371,16 @@ struct PACKET_ZC_NOTIFY_UNREADMAIL { } __attribute__((packed)); struct maillistinfo { +#if PACKETVER >= 20170419 + uint8 openType; +#endif int64 MailID; int8 Isread; uint8 type; char SenderName[24]; +#if PACKETVER < 20170419 int32 regDateTime; +#endif int32 expireDateTime; int16 Titlelength; char title[]; @@ -1382,8 +1389,10 @@ struct maillistinfo { struct PACKET_ZC_MAIL_LIST { int16 PacketType; int16 PacketLength; +#if PACKETVER < 20170419 int8 opentype; int8 cnt; +#endif int8 IsEnd; } __attribute__((packed)); @@ -1395,8 +1404,13 @@ struct PACKET_CZ_REQ_NEXT_MAIL_LIST { struct PACKET_CZ_REQ_OPEN_MAIL { int16 PacketType; +#if PACKETVER >= 20170419 + int64 Upper_MailID; + int8 unknown[16]; +#else int8 opentype; int64 Upper_MailID; +#endif } __attribute__((packed)); struct PACKET_CZ_REQ_READ_MAIL { @@ -1429,8 +1443,13 @@ struct PACKET_ZC_ACK_DELETE_MAIL { struct PACKET_CZ_REQ_REFRESH_MAIL_LIST { int16 PacketType; +#if PACKETVER >= 20170419 + int64 Upper_MailID; + int8 unknown[16]; +#else int8 opentype; int64 Upper_MailID; +#endif } __attribute__((packed)); struct PACKET_CZ_REQ_ZENY_FROM_MAIL { diff --git a/src/map/party.c b/src/map/party.c index 26b4bae8b..a4a7e6dca 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -731,6 +731,11 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts return false; } + if (battle_config.party_change_leader_same_map && sd->bl.m != tsd->bl.m) { + clif->msgtable(sd, MSG_PARTY_LEADER_SAMEMAP); // It is only possible to change the party leader while on the same map. + return false; + } + if( map->list[sd->bl.m].flag.partylock ) { clif->message(sd->fd, msg_sd(sd,287)); // You cannot change party leaders in this map. return false; diff --git a/src/map/pc.c b/src/map/pc.c index a4a32545b..0636ebafa 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6698,8 +6698,9 @@ int pc_follow(struct map_session_data *sd,int target_id) { return 0; } -int pc_checkbaselevelup(struct map_session_data *sd) { - unsigned int next = pc->nextbaseexp(sd); +int pc_checkbaselevelup(struct map_session_data *sd) +{ + uint64 next = pc->nextbaseexp(sd); nullpo_ret(sd); if (!next || sd->status.base_exp < next) @@ -6763,7 +6764,7 @@ void pc_baselevelchanged(struct map_session_data *sd) { int pc_checkjoblevelup(struct map_session_data *sd) { - unsigned int next = pc->nextjobexp(sd); + uint64 next = pc->nextjobexp(sd); nullpo_ret(sd); if(!next || sd->status.job_exp < next) @@ -6796,7 +6797,7 @@ int pc_checkjoblevelup(struct map_session_data *sd) /** * Alters EXP based on self bonuses that do not get shared with the party **/ -void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) { +void pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src) { int buff_ratio = 0, buff_job_ratio = 0, race_ratio = 0, pk_ratio = 0; int64 jexp, bexp; @@ -6861,8 +6862,8 @@ void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned in bexp += apply_percentrate64(bexp, buff_ratio, 100); jexp += apply_percentrate64(jexp, buff_ratio + buff_job_ratio, 100); - *job_exp = (unsigned int)cap_value(jexp, 1, UINT_MAX); - *base_exp = (unsigned int)cap_value(bexp, 1, UINT_MAX); + *job_exp = cap_value(jexp, 1, UINT64_MAX); + *base_exp = cap_value(bexp, 1, UINT64_MAX); } /** @@ -6871,9 +6872,10 @@ void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned in * @param is_quest Used to let client know that the EXP was from a quest (clif->displayexp) PACKETVER >= 20091027 * @retval true success **/ -bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp,bool is_quest) { - float nextbp=0, nextjp=0; - unsigned int nextb=0, nextj=0; +bool pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest) +{ + float nextbp = 0, nextjp = 0; + uint64 nextb = 0, nextj = 0; nullpo_ret(sd); if (sd->bl.prev == NULL || pc_isdead(sd)) @@ -6889,7 +6891,7 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in pc->calcexp(sd, &base_exp, &job_exp, src); if (sd->status.guild_id > 0) - base_exp -= guild->payexp(sd,base_exp); + base_exp -= guild->payexp(sd, base_exp); nextb = pc->nextbaseexp(sd); nextj = pc->nextjobexp(sd); @@ -6900,16 +6902,16 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in if (nextj > 0) nextjp = (float) job_exp / (float) nextj; - if(battle_config.max_exp_gain_rate) { + if (battle_config.max_exp_gain_rate) { if (nextbp > battle_config.max_exp_gain_rate/1000.) { //Note that this value should never be greater than the original //base_exp, therefore no overflow checks are needed. [Skotlex] - base_exp = (unsigned int)(battle_config.max_exp_gain_rate/1000.*nextb); + base_exp = (uint64)(battle_config.max_exp_gain_rate / 1000. * nextb); if (sd->state.showexp) nextbp = (float) base_exp / (float) nextb; } if (nextjp > battle_config.max_exp_gain_rate/1000.) { - job_exp = (unsigned int)(battle_config.max_exp_gain_rate/1000.*nextj); + job_exp = (uint64)(battle_config.max_exp_gain_rate / 1000. * nextj); if (sd->state.showexp) nextjp = (float) job_exp / (float) nextj; } @@ -6919,23 +6921,23 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in // Cap exp to the level up requirement of the previous level when you are at max level, // otherwise cap at UINT_MAX (this is required for some S. Novice bonuses). [Skotlex] if (base_exp) { - nextb = nextb?UINT_MAX:pc->thisbaseexp(sd); - if(sd->status.base_exp > nextb - base_exp) + nextb = nextb ? UINT64_MAX : pc->thisbaseexp(sd); + if (sd->status.base_exp > nextb - base_exp) sd->status.base_exp = nextb; else sd->status.base_exp += base_exp; pc->checkbaselevelup(sd); - clif->updatestatus(sd,SP_BASEEXP); + clif->updatestatus(sd, SP_BASEEXP); } if (job_exp) { - nextj = nextj?UINT_MAX:pc->thisjobexp(sd); - if(sd->status.job_exp > nextj - job_exp) + nextj = nextj ? UINT64_MAX : pc->thisjobexp(sd); + if (sd->status.job_exp > nextj - job_exp) sd->status.job_exp = nextj; else sd->status.job_exp += job_exp; pc->checkjoblevelup(sd); - clif->updatestatus(sd,SP_JOBEXP); + clif->updatestatus(sd, SP_JOBEXP); } #if PACKETVER >= 20091027 @@ -6948,7 +6950,8 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in if(sd->state.showexp) { char output[256]; sprintf(output, - "Experience Gained Base:%u (%.2f%%) Job:%u (%.2f%%)",base_exp,nextbp*(float)100,job_exp,nextjp*(float)100); + "Experience Gained Base:%"PRIu64" (%.2f%%) Job:%"PRIu64" (%.2f%%)", + base_exp, nextbp * (float)100, job_exp, nextjp * (float)100); clif_disp_onlyself(sd, output); } @@ -6973,7 +6976,7 @@ int pc_maxjoblv(const struct map_session_data *sd) *------------------------------------------*/ //Base exp needed for next level. -unsigned int pc_nextbaseexp(const struct map_session_data *sd) +uint64 pc_nextbaseexp(const struct map_session_data *sd) { nullpo_ret(sd); @@ -6984,7 +6987,7 @@ unsigned int pc_nextbaseexp(const struct map_session_data *sd) } //Base exp needed for this level. -unsigned int pc_thisbaseexp(const struct map_session_data *sd) +uint64 pc_thisbaseexp(const struct map_session_data *sd) { if (sd->status.base_level > pc->maxbaselv(sd) || sd->status.base_level <= 1) return 0; @@ -7000,7 +7003,7 @@ unsigned int pc_thisbaseexp(const struct map_session_data *sd) *------------------------------------------*/ //Job exp needed for next level. -unsigned int pc_nextjobexp(const struct map_session_data *sd) +uint64 pc_nextjobexp(const struct map_session_data *sd) { nullpo_ret(sd); @@ -7010,7 +7013,7 @@ unsigned int pc_nextjobexp(const struct map_session_data *sd) } //Job exp needed for this level. -unsigned int pc_thisjobexp(const struct map_session_data *sd) +uint64 pc_thisjobexp(const struct map_session_data *sd) { if (sd->status.job_level > pc->maxjoblv(sd) || sd->status.job_level <= 1) return 0; @@ -7958,7 +7961,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { // activate Steel body if a super novice dies at 99+% exp [celest] if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && !sd->state.snovice_dead_flag) { - unsigned int next = pc->nextbaseexp(sd); + uint64 next = pc->nextbaseexp(sd); if( next == 0 ) next = pc->thisbaseexp(sd); if (get_percentage64(sd->status.base_exp, next) >= 99) { sd->state.snovice_dead_flag = 1; @@ -8329,7 +8332,7 @@ int pc_setparam(struct map_session_data *sd, int type, int64 val) if (val >= sd->status.job_level) { if (val > pc->maxjoblv(sd)) val = pc->maxjoblv(sd); - sd->status.skill_point += val - sd->status.job_level; + sd->status.skill_point += (int)val - sd->status.job_level; clif->updatestatus(sd, SP_SKILLPOINT); } sd->status.job_level = (int32)val; @@ -8410,28 +8413,28 @@ int pc_setparam(struct map_session_data *sd, int type, int64 val) } break; case SP_STR: - sd->status.str = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.str = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_AGI: - sd->status.agi = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.agi = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_VIT: - sd->status.vit = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.vit = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_INT: - sd->status.int_ = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.int_ = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_DEX: - sd->status.dex = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.dex = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_LUK: - sd->status.luk = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.luk = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_KARMA: - sd->status.karma = val; + sd->status.karma = (int)val; break; case SP_MANNER: - sd->status.manner = val; + sd->status.manner = (int)val; if( val < 0 ) sc_start(NULL, &sd->bl, SC_NOCHAT, 100, 0, 0); else { @@ -10988,6 +10991,35 @@ int pc_split_atoui(char* str, unsigned int* val, char sep, int max) return i; } +int pc_split_atoui64(char* str, uint64* val, char sep, int max) +{ + static int warning=0; + int i,j; + nullpo_ret(val); + for (i=0; i<max; i++) { + double f; + if (!str) break; + f = atof(str); + if (f < 0) + val[i] = 0; + else if (f > UINT64_MAX) { + val[i] = UINT64_MAX; + if (!warning) { + warning = 1; + ShowWarning("pc_readdb (exp.txt): Required exp per level is capped to %"PRIu64"\n", UINT64_MAX); + } + } else + val[i] = (uint64)f; + str = strchr(str,sep); + if (str) + *str++=0; + } + //Zero up the remaining. + for(j=i; j < max; j++) + val[j] = 0; + return i; +} + /** * Parses the skill tree config file. * @@ -11295,7 +11327,7 @@ int pc_readdb(void) { count++; job = jobs[0] = pc->class2idx(job_id); //We send one less and then one more because the last entry in the exp array should hold 0. - pc->max_level[job][type] = pc_split_atoui(split[3], pc->exp_table[job][type],',',maxlv-1)+1; + pc->max_level[job][type] = pc_split_atoui64(split[3], pc->exp_table[job][type], ',', maxlv - 1) + 1; //Reverse check in case the array has a bunch of trailing zeros... [Skotlex] //The reasoning behind the -2 is this... if the max level is 5, then the array //should look like this: @@ -11932,7 +11964,7 @@ bool pc_process_chat_message(struct map_session_data *sd, const char *message) */ void pc_check_supernovice_call(struct map_session_data *sd, const char *message) { - unsigned int next = pc->nextbaseexp(sd); + uint64 next = pc->nextbaseexp(sd); int percent = 0; nullpo_retv(sd); diff --git a/src/map/pc.h b/src/map/pc.h index 46aafa5e5..50cb1b68e 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -829,7 +829,7 @@ struct pc_interface { /* */ BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when status_defaults() is executed */ - unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; + uint64 exp_table[CLASS_COUNT][2][MAX_LEVEL]; int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; @@ -949,11 +949,11 @@ END_ZEROED_BLOCK; /* End */ int (*maxjoblv) (const struct map_session_data *sd); int (*checkbaselevelup) (struct map_session_data *sd); int (*checkjoblevelup) (struct map_session_data *sd); - bool (*gainexp) (struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); - unsigned int (*nextbaseexp) (const struct map_session_data *sd); - unsigned int (*thisbaseexp) (const struct map_session_data *sd); - unsigned int (*nextjobexp) (const struct map_session_data *sd); - unsigned int (*thisjobexp) (const struct map_session_data *sd); + bool (*gainexp) (struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); + uint64 (*nextbaseexp) (const struct map_session_data *sd); + uint64 (*thisbaseexp) (const struct map_session_data *sd); + uint64 (*nextjobexp) (const struct map_session_data *sd); + uint64 (*thisjobexp) (const struct map_session_data *sd); int (*gets_status_point) (int level); int (*need_status_point) (struct map_session_data *sd,int type,int val); int (*maxparameterincrease) (struct map_session_data* sd, int type); @@ -1079,7 +1079,7 @@ END_ZEROED_BLOCK; /* End */ int (*bonus_addeff) (struct s_addeffect* effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration); int (*bonus_addeff_onskill) (struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target); int (*bonus_item_drop) (struct s_add_drop *drop, const short max, short id, short group, int race, int rate); - void (*calcexp) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); + void (*calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); int (*respawn_timer) (int tid, int64 tick, int id, intptr_t data); int (*jobchange_killclone) (struct block_list *bl, va_list ap); int (*getstat) (struct map_session_data* sd, int type); diff --git a/src/map/rodex.c b/src/map/rodex.c index 63d7242db..dcecb6b8f 100644 --- a/src/map/rodex.c +++ b/src/map/rodex.c @@ -547,13 +547,18 @@ void rodex_clean(struct map_session_data *sd, int8 flag) /// User request to open rodex, load mails from char-server /// @param sd : Who's requesting /// @param open_type : Box Type (see RODEX_OPENTYPE) -void rodex_open(struct map_session_data *sd, int8 open_type) +void rodex_open(struct map_session_data *sd, int8 open_type, int64 first_mail_id) { +#if PACKETVER >= 20170419 + const int type = 1; +#else + const int type = 0; +#endif nullpo_retv(sd); if (open_type == RODEX_OPENTYPE_ACCOUNT && battle_config.feature_rodex_use_accountmail == false) open_type = RODEX_OPENTYPE_MAIL; - intif->rodex_requestinbox(sd->status.char_id, sd->status.account_id, 0, open_type, 0); + intif->rodex_requestinbox(sd->status.char_id, sd->status.account_id, type, open_type, first_mail_id); } /// User request to read next page of mails @@ -568,7 +573,7 @@ void rodex_next_page(struct map_session_data *sd, int8 open_type, int64 last_mai if (open_type == RODEX_OPENTYPE_ACCOUNT && battle_config.feature_rodex_use_accountmail == false) { // Should not happen open_type = RODEX_OPENTYPE_MAIL; - rodex->open(sd, open_type); + rodex->open(sd, open_type, 0); return; } diff --git a/src/map/rodex.h b/src/map/rodex.h index 18ecd91d6..ddf7cb32b 100644 --- a/src/map/rodex.h +++ b/src/map/rodex.h @@ -60,7 +60,7 @@ struct rodex_interface { void (*final) (void); bool (*isenabled) (void); - void (*open) (struct map_session_data *sd, int8 open_type); + void (*open) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); void (*next_page) (struct map_session_data *sd, int8 open_type, int64 last_mail_id); void (*refresh) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); void (*add_item) (struct map_session_data *sd, int16 idx, int16 amount); diff --git a/src/map/script.c b/src/map/script.c index 367c9927d..1dc02bf82 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -12779,6 +12779,76 @@ BUILDIN(setmapflagnosave) { return true; } +enum mapinfo_info { + MAPINFO_NAME, + MAPINFO_ID, + MAPINFO_SIZE_X, + MAPINFO_SIZE_Y, + MAPINFO_ZONE +}; + +BUILDIN(getmapinfo) +{ + enum mapinfo_info mode = script_getnum(st, 2); + int16 m; + + if (script_hasdata(st, 3)) { + if (script_isstringtype(st, 3)) { + const char *str = script_getstr(st, 3); + m = map->mapname2mapid(str); + } else { + m = script_getnum(st, 3); + } + } else { + struct block_list *bl = NULL; + + if (st->oid) { + bl = map->id2bl(st->oid); + } else if (st->rid) { + bl = map->id2bl(st->rid); + } + + if (bl == NULL) { + ShowError("script:getmapinfo: map not supplied and NPC/PC not attached!\n"); + script_pushint(st, -3); + return false; + } + + m = bl->m; + } + + if (m < 0) { + // here we don't throw an error, so the command can be used + // to detect whether or not a map exists + script_pushint(st, -1); + return true; + } + + switch (mode) { + case MAPINFO_NAME: + script_pushconststr(st, map->list[m].name); + break; + case MAPINFO_ID: + script_pushint(st, m); + break; + case MAPINFO_SIZE_X: + script_pushint(st, map->list[m].xs); + break; + case MAPINFO_SIZE_Y: + script_pushint(st, map->list[m].ys); + break; + case MAPINFO_ZONE: + script_pushstrcopy(st, map->list[m].zone->name); + break; + default: + ShowError("script:getmapinfo: unknown option in second argument (%u).\n", mode); + script_pushint(st, -2); + return false; + } + + return true; +} + BUILDIN(getmapflag) { int16 m,i; @@ -12841,6 +12911,7 @@ BUILDIN(getmapflag) case MF_RESET: script_pushint(st,map->list[m].flag.reset); break; case MF_NOTOMB: script_pushint(st,map->list[m].flag.notomb); break; case MF_NOCASHSHOP: script_pushint(st,map->list[m].flag.nocashshop); break; + case MF_NOAUTOLOOT: script_pushint(st, map->list[m].flag.noautoloot); break; case MF_NOVIEWID: script_pushint(st,map->list[m].flag.noviewid); break; } } @@ -12965,6 +13036,7 @@ BUILDIN(setmapflag) { case MF_RESET: map->list[m].flag.reset = 1; break; case MF_NOTOMB: map->list[m].flag.notomb = 1; break; case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 1; break; + case MF_NOAUTOLOOT: map->list[m].flag.noautoloot = 1; break; case MF_NOVIEWID: map->list[m].flag.noviewid = (val <= 0) ? EQP_NONE : val; break; } } @@ -13052,6 +13124,7 @@ BUILDIN(removemapflag) { case MF_RESET: map->list[m].flag.reset = 0; break; case MF_NOTOMB: map->list[m].flag.notomb = 0; break; case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 0; break; + case MF_NOAUTOLOOT: map->list[m].flag.noautoloot = 0; break; case MF_NOVIEWID: map->list[m].flag.noviewid = EQP_NONE; break; } } @@ -14197,31 +14270,36 @@ BUILDIN(setequipoption) if (equip_index > 0 && equip_index <= ARRAYLENGTH(script->equip)) { if ((i = pc->checkequip(sd, script->equip[equip_index - 1])) == -1) { - ShowError("buildin_setequipoptioninfo: No equipment is equipped in the given index %d.\n", equip_index); + ShowError("buildin_setequipoption: No equipment is equipped in the given index %d.\n", equip_index); script_pushint(st, 0); return false; } } else { - ShowError("buildin_setequipoptioninfo: Invalid equipment index %d provided.\n", equip_index); + ShowError("buildin_setequipoption: Invalid equipment index %d provided.\n", equip_index); script_pushint(st, 0); return false; } if (sd->status.inventory[i].nameid != 0) { - - if ((ito = itemdb->option_exists(opt_index)) == NULL) { - script_pushint(st, 0); - ShowError("buildin_setequipotion: Option index %d does not exist!\n", opt_index); - return false; - } else if (value < -INT16_MAX || value > INT16_MAX) { - script_pushint(st, 0); - ShowError("buildin_setequipotion: Option value %d exceeds maximum limit (%d to %d) for type!\n", value, -INT16_MAX, INT16_MAX); - return false; + if (opt_index == 0) { + // Remove the option + sd->status.inventory[i].option[slot-1].index = 0; + sd->status.inventory[i].option[slot-1].value = 0; + } else { + if ((ito = itemdb->option_exists(opt_index)) == NULL) { + script_pushint(st, 0); + ShowError("buildin_setequipotion: Option index %d does not exist!\n", opt_index); + return false; + } else if (value < -INT16_MAX || value > INT16_MAX) { + script_pushint(st, 0); + ShowError("buildin_setequipotion: Option value %d exceeds maximum limit (%d to %d) for type!\n", value, -INT16_MAX, INT16_MAX); + return false; + } + /* Add Option Index */ + sd->status.inventory[i].option[slot-1].index = ito->index; + /* Add Option Value */ + sd->status.inventory[i].option[slot-1].value = value; } - /* Add Option Index */ - sd->status.inventory[i].option[slot-1].index = ito->index; - /* Add Option Value */ - sd->status.inventory[i].option[slot-1].value = value; /* Unequip and simulate deletion of the item. */ pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); // status calc will happen in pc->equipitem() below @@ -15785,19 +15863,38 @@ BUILDIN(getmapxy) return true; } +enum logmes_type { + LOGMES_NPC, + LOGMES_ATCOMMAND +}; + /*========================================== - * Allows player to write NPC logs (i.e. Bank NPC, etc) [Lupus] + * Allows player to write logs (i.e. Bank NPC, etc) [Lupus] *------------------------------------------*/ BUILDIN(logmes) { - const char *str; + const char *str = script_getstr(st, 2); struct map_session_data *sd = script->rid2sd(st); + enum logmes_type type = LOGMES_NPC; + nullpo_retr(false, sd); - if (sd == NULL) - return true; + if (script_hasdata(st, 3)) { + type = script_getnum(st, 3); + } + + switch (type) { + case LOGMES_ATCOMMAND: + logs->atcommand(sd, str); + break; + case LOGMES_NPC: + logs->npc(sd, str); + break; + default: + ShowError("script:logmes: Unknown log type!\n"); + st->state = END; + return false; + } - str = script_getstr(st,2); - logs->npc(sd,str); return true; } @@ -18120,6 +18217,8 @@ BUILDIN(setunitdata) case UDT_INTIMACY: case UDT_LIFETIME: case UDT_MERC_KILLCOUNT: + case UDT_ROBE: + case UDT_BODY2: setunitdata_check_min(4, 0); break; case UDT_MASTERAID: @@ -19058,6 +19157,40 @@ BUILDIN(setunitdata) case UDT_DMOTION: nd->status.dmotion = (unsigned short) val; break; + case UDT_SEX: + nd->vd.sex = (char)val; + npc->refresh(nd); + break; + case UDT_HAIRSTYLE: + clif->changelook(bl, LOOK_HAIR, val); + break; + case UDT_HAIRCOLOR: + clif->changelook(bl, LOOK_HAIR_COLOR, val); + break; + case UDT_HEADBOTTOM: + clif->changelook(bl, LOOK_HEAD_BOTTOM, val); + break; + case UDT_HEADMIDDLE: + clif->changelook(bl, LOOK_HEAD_MID, val); + break; + case UDT_HEADTOP: + clif->changelook(bl, LOOK_HEAD_TOP, val); + break; + case UDT_CLOTHCOLOR: + clif->changelook(bl, LOOK_CLOTHES_COLOR, val); + break; + case UDT_SHIELD: + clif->changelook(bl, LOOK_SHIELD, val); + break; + case UDT_WEAPON: + clif->changelook(bl, LOOK_WEAPON, val); + break; + case UDT_ROBE: + clif->changelook(bl, LOOK_ROBE, val); + break; + case UDT_BODY2: + clif->changelook(bl, LOOK_BODY2, val); + break; default: ShowWarning("buildin_setunitdata: Invalid data type '%s' for NPC unit.\n", udtype); script_pushint(st, 0); @@ -19468,6 +19601,18 @@ BUILDIN(getunitdata) case UDT_AMOTION: script_pushint(st, nd->status.amotion); break; case UDT_ADELAY: script_pushint(st, nd->status.adelay); break; case UDT_DMOTION: script_pushint(st, nd->status.dmotion); break; + case UDT_SEX: script_pushint(st, nd->vd.sex); break; + case UDT_CLASS: script_pushint(st, nd->vd.class); break; + case UDT_HAIRSTYLE: script_pushint(st, nd->vd.hair_style); break; + case UDT_HAIRCOLOR: script_pushint(st, nd->vd.hair_color); break; + case UDT_HEADBOTTOM: script_pushint(st, nd->vd.head_bottom); break; + case UDT_HEADMIDDLE: script_pushint(st, nd->vd.head_mid); break; + case UDT_HEADTOP: script_pushint(st, nd->vd.head_top); break; + case UDT_CLOTHCOLOR: script_pushint(st, nd->vd.cloth_color); break; + case UDT_SHIELD: script_pushint(st, nd->vd.shield); break; + case UDT_WEAPON: script_pushint(st, nd->vd.weapon); break; + case UDT_ROBE: script_pushint(st, nd->vd.robe); break; + case UDT_BODY2: script_pushint(st, nd->vd.body_style); break; default: ShowWarning("buildin_getunitdata: Invalid data type '%s' for NPC unit.\n", udtype); script_pushint(st, 0); @@ -20355,15 +20500,18 @@ BUILDIN(questinfo) quest_id = script_getnum(st, 2); icon = script_getnum(st, 3); - #if PACKETVER >= 20120410 - if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7) - icon = 9999; // Default to nothing if icon id is invalid. - #else - if(icon < 0 || icon > 7) - icon = 0; - else - icon = icon + 1; - #endif +#if PACKETVER >= 20170315 + if (icon < 0 || (icon > 10 && icon != 9999)) + icon = 9999; +#elif PACKETVER >= 20120410 + if (icon < 0 || (icon > 8 && icon != 9999) || icon == 7) + icon = 9999; // Default to nothing if icon id is invalid. +#else + if (icon < 0 || icon > 7) + icon = 0; + else + icon = icon + 1; +#endif qi.quest_id = quest_id; qi.icon = (unsigned char)icon; @@ -20557,15 +20705,18 @@ BUILDIN(showevent) } } - #if PACKETVER >= 20120410 - if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7) - icon = 9999; // Default to nothing if icon id is invalid. - #else - if(icon < 0 || icon > 7) - icon = 0; - else - icon = icon + 1; - #endif +#if PACKETVER >= 20170315 + if (icon < 0 || (icon > 10 && icon != 9999)) + icon = 9999; +#elif PACKETVER >= 20120410 + if (icon < 0 || (icon > 8 && icon != 9999) || icon == 7) + icon = 9999; // Default to nothing if icon id is invalid. +#else + if (icon < 0 || icon > 7) + icon = 0; + else + icon = icon + 1; +#endif clif->quest_show_event(sd, &nd->bl, icon, color); return true; @@ -21037,72 +21188,90 @@ BUILDIN(has_instance) const char *str; int16 m; int instance_id = -1; + int i = 0, j = 0; bool type = strcmp(script->getfuncname(st),"has_instance2") == 0 ? true : false; str = script_getstr(st, 2); - if( (m = map->mapname2mapid(str)) < 0 ) { - if( type ) + if ((m = map->mapname2mapid(str)) < 0) { + if (type) { script_pushint(st, -1); - else + } else { script_pushconststr(st, ""); + } return true; } - if( script_hasdata(st, 3) ) + if (script_hasdata(st, 3)) instance_id = script_getnum(st, 3); - else if( st->instance_id >= 0 ) + else if (st->instance_id >= 0) instance_id = st->instance_id; - else if( (sd = script->rid2sd(st)) != NULL ) { + else if ((sd = script->rid2sd(st)) != NULL) { struct party_data *p; - int i = 0, j = 0; - if( sd->instances ) { - for( i = 0; i < sd->instances; i++ ) { - if( sd->instance[i] >= 0 ) { + if (sd->instances) { + for (i = 0; i < sd->instances; i++) { + if (sd->instance[i] >= 0) { ARR_FIND(0, instance->list[sd->instance[i]].num_map, j, map->list[instance->list[sd->instance[i]].map[j]].instance_src_map == m); - if( j != instance->list[sd->instance[i]].num_map ) + if (j != instance->list[sd->instance[i]].num_map) break; } } - if( i != sd->instances ) + if (i != sd->instances) { instance_id = sd->instance[i]; + } } if (instance_id == -1 && sd->status.party_id && (p = party->search(sd->status.party_id)) != NULL && p->instances) { - for( i = 0; i < p->instances; i++ ) { - if( p->instance[i] >= 0 ) { + for (i = 0; i < p->instances; i++) { + if (p->instance[i] >= 0) { ARR_FIND(0, instance->list[p->instance[i]].num_map, j, map->list[instance->list[p->instance[i]].map[j]].instance_src_map == m); - if( j != instance->list[p->instance[i]].num_map ) + if (j != instance->list[p->instance[i]].num_map) break; } } - if( i != p->instances ) + if (i != p->instances) { instance_id = p->instance[i]; + } } - if( instance_id == -1 && sd->guild && sd->guild->instances ) { - for( i = 0; i < sd->guild->instances; i++ ) { - if( sd->guild->instance[i] >= 0 ) { + if (instance_id == -1 && sd->guild && sd->guild->instances) { + for (i = 0; i < sd->guild->instances; i++) { + if (sd->guild->instance[i] >= 0) { ARR_FIND(0, instance->list[sd->guild->instance[i]].num_map, j, map->list[instance->list[sd->guild->instance[i]].map[j]].instance_src_map == m); - if( j != instance->list[sd->guild->instance[i]].num_map ) + if (j != instance->list[sd->guild->instance[i]].num_map) break; } } - if( i != sd->guild->instances ) + if (i != sd->guild->instances) instance_id = sd->guild->instance[i]; } } - if( !instance->valid(instance_id) || (m = instance->map2imap(m, instance_id)) < 0 ) { - if( type ) + if (instance_id == -1) { + for (i = 0; i < instance->instances; i++) { + if (instance->list[i].state != INSTANCE_FREE && instance->list[i].owner_type == IOT_NONE && instance->list[i].num_map > 0) { + ARR_FIND(0, instance->list[i].num_map, j, map->list[instance->list[i].map[j]].instance_src_map == m); + if (j != instance->list[i].num_map) + break; + } + } + if (i != instance->instances) { + instance_id = instance->list[i].id; + } + } + + if (!instance->valid(instance_id) || (m = instance->map2imap(m, instance_id)) < 0) { + if (type) { script_pushint(st, -1); - else + } else { script_pushconststr(st, ""); + } return true; } - if( type ) + if (type) { script_pushint(st, instance_id); - else + } else { script_pushconststr(st, map->list[m].name); + } return true; } @@ -23414,7 +23583,7 @@ BUILDIN(dressroom) clif->dressroom_open(sd, 0); break; default: - ShowWarning("script:dressroom: unknown mode (%i).\n", mode); + ShowWarning("script:dressroom: unknown mode (%u).\n", mode); script_pushint(st, 0); return false; } @@ -23994,6 +24163,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(isloggedin,"i?"), BUILDIN_DEF(setmapflagnosave,"ssii"), BUILDIN_DEF(getmapflag,"si"), + BUILDIN_DEF(getmapinfo,"i?"), BUILDIN_DEF(setmapflag,"si?"), BUILDIN_DEF(removemapflag,"si"), BUILDIN_DEF(pvpon,"s"), @@ -24070,7 +24240,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(checkoption2,"i?"), BUILDIN_DEF(guildgetexp,"i"), BUILDIN_DEF(guildchangegm,"is"), - BUILDIN_DEF(logmes,"s"), //this command actls as MES but rints info into LOG file either SQL/TXT [Lupus] + BUILDIN_DEF(logmes,"s?"), //this command actls as MES but rints info into LOG file either SQL/TXT [Lupus] BUILDIN_DEF(summon,"si??"), // summons a slave monster [Celest] BUILDIN_DEF(isnight,""), // check whether it is night time [Celest] BUILDIN_DEF(isequipped,"i*"), // check whether another item/card has been equipped [Celest] @@ -24597,6 +24767,10 @@ void script_hardcoded_constants(void) script->set_constant("DATATYPE_VAR", DATATYPE_VAR, false, false); script->set_constant("DATATYPE_LABEL", DATATYPE_LABEL, false, false); + script->constdb_comment("Logmes types"); + script->set_constant("LOGMES_NPC", LOGMES_NPC, false, false); + script->set_constant("LOGMES_ATCOMMAND", LOGMES_ATCOMMAND, false, false); + script->constdb_comment("Item Subtypes (Weapon types)"); script->set_constant("W_FIST", W_FIST, false, false); script->set_constant("W_DAGGER", W_DAGGER, false, false); @@ -24648,6 +24822,13 @@ void script_hardcoded_constants(void) script->set_constant("DRESSROOM_OPEN", DRESSROOM_OPEN, false, false); script->set_constant("DRESSROOM_CLOSE", DRESSROOM_CLOSE, false, false); + script->constdb_comment("getmapinfo options"); + script->set_constant("MAPINFO_NAME", MAPINFO_NAME, false, false); + script->set_constant("MAPINFO_ID", MAPINFO_ID, false, false); + script->set_constant("MAPINFO_SIZE_X", MAPINFO_SIZE_X, false, false); + script->set_constant("MAPINFO_SIZE_Y", MAPINFO_SIZE_Y, false, false); + script->set_constant("MAPINFO_ZONE", MAPINFO_ZONE, false, false); + script->constdb_comment("Renewal"); #ifdef RENEWAL script->set_constant("RENEWAL", 1, false, false); diff --git a/src/map/script.h b/src/map/script.h index 189122230..b2ab7510c 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -336,6 +336,7 @@ enum { MF_RESET, MF_NOTOMB, MF_NOCASHSHOP, + MF_NOAUTOLOOT, MF_NOVIEWID }; @@ -422,6 +423,8 @@ enum script_unit_data_types { UDT_LIFETIME, UDT_MERC_KILLCOUNT, UDT_STATPOINT, + UDT_ROBE, + UDT_BODY2, UDT_MAX }; diff --git a/src/map/skill.c b/src/map/skill.c index a84955377..726deaa9a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13832,8 +13832,8 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id break; case PR_REDEMPTIO: { - int exp; - if( ((exp = pc->nextbaseexp(sd)) > 0 && get_percentage64(sd->status.base_exp, exp) < 1) || + int64 exp; + if (((exp = pc->nextbaseexp(sd)) > 0 && get_percentage64(sd->status.base_exp, exp) < 1) || ((exp = pc->nextjobexp(sd)) > 0 && get_percentage64(sd->status.job_exp, exp) < 1)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); //Not enough exp. return 0; @@ -18984,7 +18984,8 @@ void skill_init_unit_layout (void) void skill_init_unit_layout_unknown(int skill_idx) { - ShowError("unknown unit layout at skill %d\n", skill_idx); + Assert_retv(skill_idx >= 0 && skill_idx < MAX_SKILL_DB); + ShowError("unknown unit layout at skill %d\n", skill->dbs->db[skill_idx].nameid); } int skill_block_check(struct block_list *bl, sc_type type , uint16 skill_id) diff --git a/src/map/status.c b/src/map/status.c index e0893aa36..ccd1e6b11 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6809,7 +6809,7 @@ struct view_data *status_get_viewdata(struct block_list *bl) case BL_PC: return &BL_UCAST(BL_PC, bl)->vd; case BL_MOB: return BL_UCAST(BL_MOB, bl)->vd; case BL_PET: return &BL_UCAST(BL_PET, bl)->vd; - case BL_NPC: return BL_UCAST(BL_NPC, bl)->vd; + case BL_NPC: return &BL_UCAST(BL_NPC, bl)->vd; case BL_HOM: return BL_UCAST(BL_HOM, bl)->vd; case BL_MER: return BL_UCAST(BL_MER, bl)->vd; case BL_ELEM: return BL_UCAST(BL_ELEM, bl)->vd; @@ -6927,10 +6927,14 @@ void status_set_viewdata(struct block_list *bl, int class_) case BL_NPC: { struct npc_data *nd = BL_UCAST(BL_NPC, bl); - if (vd != NULL) - nd->vd = vd; - else + if (vd != NULL) { + memcpy(&nd->vd, vd, sizeof(struct view_data)); + } else if (pc->db_checkid(class_)) { + memset(&nd->vd, 0, sizeof(struct view_data)); + nd->vd.class = class_; + } else { ShowError("status_set_viewdata (NPC): No view data for class %d (name=%s)\n", class_, nd->name); + } } break; case BL_HOM: //[blackhole89] diff --git a/src/map/status.h b/src/map/status.h index eb3cf491b..a104c66ab 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1927,7 +1927,7 @@ enum e_mode //who were not on your field of sight when it happened) //opt1: Non stackable status changes. -enum { +enum e_opt1 { OPT1_STONE = 1, //Petrified OPT1_FREEZE, OPT1_STUN, @@ -1940,7 +1940,7 @@ enum { }; //opt2: Stackable status changes. -enum { +enum e_opt2 { OPT2_POISON = 0x0001, OPT2_CURSE = 0x0002, OPT2_SILENCE = 0x0004, @@ -1953,7 +1953,7 @@ enum { }; //opt3: (SHOW_EFST_*) -enum { +enum e_opt3 { OPT3_NORMAL = 0x00000000, OPT3_QUICKEN = 0x00000001, OPT3_OVERTHRUST = 0x00000002, diff --git a/src/map/unit.c b/src/map/unit.c index 00c78054b..0b5b21caf 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -474,7 +474,7 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) ud->to_x = bl->x; ud->to_y = bl->y; - if(battle_config.official_cell_stack_limit && map->count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) { + if (battle_config.official_cell_stack_limit && map->count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 0x1 | 0x2) > battle_config.official_cell_stack_limit) { //Walked on occupied cell, call unit_walktoxy again if(ud->steptimer != INVALID_TIMER) { //Execute step timer on next step instead diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index cbd11e1b8..9482e6c15 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1180,8 +1180,8 @@ typedef void (*HPMHOOK_pre_clif_viewequip_ack) (struct map_session_data **sd, st typedef void (*HPMHOOK_post_clif_viewequip_ack) (struct map_session_data *sd, struct map_session_data *tsd); typedef void (*HPMHOOK_pre_clif_equpcheckbox) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_equpcheckbox) (struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_displayexp) (struct map_session_data **sd, unsigned int *exp, char *type, bool *is_quest); -typedef void (*HPMHOOK_post_clif_displayexp) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest); +typedef void (*HPMHOOK_pre_clif_displayexp) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest); +typedef void (*HPMHOOK_post_clif_displayexp) (struct map_session_data *sd, uint64 exp, char type, bool is_quest); typedef void (*HPMHOOK_pre_clif_font) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_font) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_progressbar) (struct map_session_data **sd, unsigned int *color, unsigned int *second); @@ -2260,6 +2260,8 @@ typedef void (*HPMHOOK_pre_clif_rodex_send_maillist) (int *fd, struct map_sessio typedef void (*HPMHOOK_post_clif_rodex_send_maillist) (int fd, struct map_session_data *sd, int8 open_type, int64 page_start); typedef void (*HPMHOOK_pre_clif_rodex_send_refresh) (int *fd, struct map_session_data **sd, int8 *open_type, int *count); typedef void (*HPMHOOK_post_clif_rodex_send_refresh) (int fd, struct map_session_data *sd, int8 open_type, int count); +typedef void (*HPMHOOK_pre_clif_rodex_send_mails_all) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_rodex_send_mails_all) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pRodexReadMail) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexReadMail) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_rodex_read_mail) (struct map_session_data **sd, int8 *opentype, struct rodex_message **msg); @@ -2508,8 +2510,8 @@ typedef int (*HPMHOOK_pre_guild_getindex) (const struct guild **g, int *account_ typedef int (*HPMHOOK_post_guild_getindex) (int retVal___, const struct guild *g, int account_id, int char_id); typedef int (*HPMHOOK_pre_guild_getposition) (struct guild **g, struct map_session_data **sd); typedef int (*HPMHOOK_post_guild_getposition) (int retVal___, struct guild *g, struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_guild_payexp) (struct map_session_data **sd, unsigned int *exp); -typedef unsigned int (*HPMHOOK_post_guild_payexp) (unsigned int retVal___, struct map_session_data *sd, unsigned int exp); +typedef uint64 (*HPMHOOK_pre_guild_payexp) (struct map_session_data **sd, uint64 *exp); +typedef uint64 (*HPMHOOK_post_guild_payexp) (uint64 retVal___, struct map_session_data *sd, uint64 exp); typedef int (*HPMHOOK_pre_guild_getexp) (struct map_session_data **sd, int *exp); typedef int (*HPMHOOK_post_guild_getexp) (int retVal___, struct map_session_data *sd, int exp); typedef int (*HPMHOOK_pre_guild_create) (struct map_session_data **sd, const char **name); @@ -3846,6 +3848,32 @@ typedef void (*HPMHOOK_pre_login_config_set_defaults) (void); typedef void (*HPMHOOK_post_login_config_set_defaults) (void); typedef bool (*HPMHOOK_pre_login_config_read) (const char **filename, bool *included); typedef bool (*HPMHOOK_post_login_config_read) (bool retVal___, const char *filename, bool included); +typedef bool (*HPMHOOK_pre_login_config_read_inter) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_inter) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_console) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_console) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_log) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_log) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_account) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_account) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission_hash) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission_hash) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission_blacklist) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission_blacklist) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_users) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_users) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef void (*HPMHOOK_pre_login_clear_dnsbl_servers) (void); +typedef void (*HPMHOOK_post_login_clear_dnsbl_servers) (void); +typedef void (*HPMHOOK_pre_login_config_set_dnsbl_servers) (struct config_setting_t **setting); +typedef void (*HPMHOOK_post_login_config_set_dnsbl_servers) (struct config_setting_t *setting); +typedef void (*HPMHOOK_pre_login_clear_client_hash_nodes) (void); +typedef void (*HPMHOOK_post_login_clear_client_hash_nodes) (void); +typedef void (*HPMHOOK_pre_login_config_set_md5hash) (struct config_setting_t **setting); +typedef void (*HPMHOOK_post_login_config_set_md5hash) (struct config_setting_t *setting); +typedef uint16 (*HPMHOOK_pre_login_convert_users_to_colors) (uint16 *users); +typedef uint16 (*HPMHOOK_post_login_convert_users_to_colors) (uint16 retVal___, uint16 users); #endif // LOGIN_LOGIN_H #ifdef CHAR_LOGINIF_H /* loginif */ typedef void (*HPMHOOK_pre_loginif_init) (void); @@ -5122,6 +5150,8 @@ typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, uns typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, unsigned short index); typedef bool (*HPMHOOK_pre_npc_db_checkid) (const int *id); typedef bool (*HPMHOOK_post_npc_db_checkid) (bool retVal___, const int id); +typedef void (*HPMHOOK_pre_npc_refresh) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_refresh) (struct npc_data *nd); typedef int (*HPMHOOK_pre_npc_secure_timeout_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_npc_secure_timeout_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); #endif // MAP_NPC_H @@ -5418,16 +5448,16 @@ typedef int (*HPMHOOK_pre_pc_checkbaselevelup) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkbaselevelup) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_checkjoblevelup) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkjoblevelup) (int retVal___, struct map_session_data *sd); -typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); -typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); -typedef unsigned int (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_nextbaseexp) (unsigned int retVal___, const struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_thisbaseexp) (unsigned int retVal___, const struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_pc_nextjobexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_nextjobexp) (unsigned int retVal___, const struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_pc_thisjobexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_thisjobexp) (unsigned int retVal___, const struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); +typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); +typedef uint64 (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_nextbaseexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_thisbaseexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_nextjobexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_nextjobexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_thisjobexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_thisjobexp) (uint64 retVal___, const struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_gets_status_point) (int *level); typedef int (*HPMHOOK_post_pc_gets_status_point) (int retVal___, int level); typedef int (*HPMHOOK_pre_pc_need_status_point) (struct map_session_data **sd, int *type, int *val); @@ -5634,8 +5664,8 @@ typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill ** typedef int (*HPMHOOK_post_pc_bonus_addeff_onskill) (int retVal___, struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target); typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate); typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, short id, short group, int race, int rate); -typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, unsigned int **base_exp, unsigned int **job_exp, struct block_list **src); -typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); +typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); +typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); typedef int (*HPMHOOK_pre_pc_respawn_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_pc_respawn_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_pc_jobchange_killclone) (struct block_list **bl, va_list ap); @@ -5892,8 +5922,8 @@ typedef void (*HPMHOOK_pre_rodex_final) (void); typedef void (*HPMHOOK_post_rodex_final) (void); typedef bool (*HPMHOOK_pre_rodex_isenabled) (void); typedef bool (*HPMHOOK_post_rodex_isenabled) (bool retVal___); -typedef void (*HPMHOOK_pre_rodex_open) (struct map_session_data **sd, int8 *open_type); -typedef void (*HPMHOOK_post_rodex_open) (struct map_session_data *sd, int8 open_type); +typedef void (*HPMHOOK_pre_rodex_open) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); +typedef void (*HPMHOOK_post_rodex_open) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); typedef void (*HPMHOOK_pre_rodex_next_page) (struct map_session_data **sd, int8 *open_type, int64 *last_mail_id); typedef void (*HPMHOOK_post_rodex_next_page) (struct map_session_data *sd, int8 open_type, int64 last_mail_id); typedef void (*HPMHOOK_pre_rodex_refresh) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc index 57c1e0233..9c38c0c4c 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -376,6 +376,32 @@ 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_login_config_read_inter_pre; + struct HPMHookPoint *HP_login_config_read_inter_post; + struct HPMHookPoint *HP_login_config_read_console_pre; + struct HPMHookPoint *HP_login_config_read_console_post; + struct HPMHookPoint *HP_login_config_read_log_pre; + struct HPMHookPoint *HP_login_config_read_log_post; + struct HPMHookPoint *HP_login_config_read_account_pre; + struct HPMHookPoint *HP_login_config_read_account_post; + struct HPMHookPoint *HP_login_config_read_permission_pre; + struct HPMHookPoint *HP_login_config_read_permission_post; + struct HPMHookPoint *HP_login_config_read_permission_hash_pre; + struct HPMHookPoint *HP_login_config_read_permission_hash_post; + struct HPMHookPoint *HP_login_config_read_permission_blacklist_pre; + struct HPMHookPoint *HP_login_config_read_permission_blacklist_post; + struct HPMHookPoint *HP_login_config_read_users_pre; + struct HPMHookPoint *HP_login_config_read_users_post; + struct HPMHookPoint *HP_login_clear_dnsbl_servers_pre; + struct HPMHookPoint *HP_login_clear_dnsbl_servers_post; + struct HPMHookPoint *HP_login_config_set_dnsbl_servers_pre; + struct HPMHookPoint *HP_login_config_set_dnsbl_servers_post; + struct HPMHookPoint *HP_login_clear_client_hash_nodes_pre; + struct HPMHookPoint *HP_login_clear_client_hash_nodes_post; + struct HPMHookPoint *HP_login_config_set_md5hash_pre; + struct HPMHookPoint *HP_login_config_set_md5hash_post; + struct HPMHookPoint *HP_login_convert_users_to_colors_pre; + struct HPMHookPoint *HP_login_convert_users_to_colors_post; struct HPMHookPoint *HP_md5_string_pre; struct HPMHookPoint *HP_md5_string_post; struct HPMHookPoint *HP_md5_binary_pre; @@ -1049,6 +1075,32 @@ struct { int HP_login_config_set_defaults_post; int HP_login_config_read_pre; int HP_login_config_read_post; + int HP_login_config_read_inter_pre; + int HP_login_config_read_inter_post; + int HP_login_config_read_console_pre; + int HP_login_config_read_console_post; + int HP_login_config_read_log_pre; + int HP_login_config_read_log_post; + int HP_login_config_read_account_pre; + int HP_login_config_read_account_post; + int HP_login_config_read_permission_pre; + int HP_login_config_read_permission_post; + int HP_login_config_read_permission_hash_pre; + int HP_login_config_read_permission_hash_post; + int HP_login_config_read_permission_blacklist_pre; + int HP_login_config_read_permission_blacklist_post; + int HP_login_config_read_users_pre; + int HP_login_config_read_users_post; + int HP_login_clear_dnsbl_servers_pre; + int HP_login_clear_dnsbl_servers_post; + int HP_login_config_set_dnsbl_servers_pre; + int HP_login_config_set_dnsbl_servers_post; + int HP_login_clear_client_hash_nodes_pre; + int HP_login_clear_client_hash_nodes_post; + int HP_login_config_set_md5hash_pre; + int HP_login_config_set_md5hash_post; + int HP_login_convert_users_to_colors_pre; + int HP_login_convert_users_to_colors_post; int HP_md5_string_pre; int HP_md5_string_post; int HP_md5_binary_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc index 125c54a12..ba4b941a9 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -211,6 +211,19 @@ 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) }, + { HP_POP(login->config_read_inter, HP_login_config_read_inter) }, + { HP_POP(login->config_read_console, HP_login_config_read_console) }, + { HP_POP(login->config_read_log, HP_login_config_read_log) }, + { HP_POP(login->config_read_account, HP_login_config_read_account) }, + { HP_POP(login->config_read_permission, HP_login_config_read_permission) }, + { HP_POP(login->config_read_permission_hash, HP_login_config_read_permission_hash) }, + { HP_POP(login->config_read_permission_blacklist, HP_login_config_read_permission_blacklist) }, + { HP_POP(login->config_read_users, HP_login_config_read_users) }, + { HP_POP(login->clear_dnsbl_servers, HP_login_clear_dnsbl_servers) }, + { HP_POP(login->config_set_dnsbl_servers, HP_login_config_set_dnsbl_servers) }, + { HP_POP(login->clear_client_hash_nodes, HP_login_clear_client_hash_nodes) }, + { HP_POP(login->config_set_md5hash, HP_login_config_set_md5hash) }, + { HP_POP(login->convert_users_to_colors, HP_login_convert_users_to_colors) }, /* 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 964d46b0a..0dbf2e5ae 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -4716,6 +4716,353 @@ bool HP_login_config_read(const char *filename, bool included) { } return retVal___; } +bool HP_login_config_read_inter(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_inter_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_inter_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_inter(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_inter_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_inter_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_console(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_console_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_console_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_console(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_console_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_console_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_log(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_log_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_log_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_log(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_log_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_log_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_account(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_account_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_account_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_account(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_account_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_account_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_permission(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_permission(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_permission_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_permission_hash(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_hash_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_permission_hash(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_permission_hash_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_permission_blacklist(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_blacklist_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_permission_blacklist(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_permission_blacklist_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_users(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_users_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_users_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_users(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_users_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_users_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +void HP_login_clear_dnsbl_servers(void) { + int hIndex = 0; + if (HPMHooks.count.HP_login_clear_dnsbl_servers_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.clear_dnsbl_servers(); + } + if (HPMHooks.count.HP_login_clear_dnsbl_servers_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_login_config_set_dnsbl_servers(struct config_setting_t *setting) { + int hIndex = 0; + if (HPMHooks.count.HP_login_config_set_dnsbl_servers_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_pre[hIndex].func; + preHookFunc(&setting); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.config_set_dnsbl_servers(setting); + } + if (HPMHooks.count.HP_login_config_set_dnsbl_servers_post > 0) { + void (*postHookFunc) (struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_post[hIndex].func; + postHookFunc(setting); + } + } + return; +} +void HP_login_clear_client_hash_nodes(void) { + int hIndex = 0; + if (HPMHooks.count.HP_login_clear_client_hash_nodes_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.clear_client_hash_nodes(); + } + if (HPMHooks.count.HP_login_clear_client_hash_nodes_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_login_config_set_md5hash(struct config_setting_t *setting) { + int hIndex = 0; + if (HPMHooks.count.HP_login_config_set_md5hash_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_set_md5hash_pre[hIndex].func; + preHookFunc(&setting); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.config_set_md5hash(setting); + } + if (HPMHooks.count.HP_login_config_set_md5hash_post > 0) { + void (*postHookFunc) (struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_set_md5hash_post[hIndex].func; + postHookFunc(setting); + } + } + return; +} +uint16 HP_login_convert_users_to_colors(uint16 users) { + int hIndex = 0; + uint16 retVal___ = 0; + if (HPMHooks.count.HP_login_convert_users_to_colors_pre > 0) { + uint16 (*preHookFunc) (uint16 *users); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_pre[hIndex].func; + retVal___ = preHookFunc(&users); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.convert_users_to_colors(users); + } + if (HPMHooks.count.HP_login_convert_users_to_colors_post > 0) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 users); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_post[hIndex].func; + retVal___ = postHookFunc(retVal___, users); + } + } + return retVal___; +} /* md5_interface */ void HP_md5_string(const char *string, char *output) { int hIndex = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index e2494067c..c3e6d5529 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1896,6 +1896,8 @@ struct { struct HPMHookPoint *HP_clif_rodex_send_maillist_post; struct HPMHookPoint *HP_clif_rodex_send_refresh_pre; struct HPMHookPoint *HP_clif_rodex_send_refresh_post; + struct HPMHookPoint *HP_clif_rodex_send_mails_all_pre; + struct HPMHookPoint *HP_clif_rodex_send_mails_all_post; struct HPMHookPoint *HP_clif_pRodexReadMail_pre; struct HPMHookPoint *HP_clif_pRodexReadMail_post; struct HPMHookPoint *HP_clif_rodex_read_mail_pre; @@ -3916,6 +3918,8 @@ struct { struct HPMHookPoint *HP_npc_market_delfromsql_sub_post; struct HPMHookPoint *HP_npc_db_checkid_pre; struct HPMHookPoint *HP_npc_db_checkid_post; + struct HPMHookPoint *HP_npc_refresh_pre; + struct HPMHookPoint *HP_npc_refresh_post; struct HPMHookPoint *HP_npc_secure_timeout_timer_pre; struct HPMHookPoint *HP_npc_secure_timeout_timer_post; struct HPMHookPoint *HP_nullpo_assert_report_pre; @@ -8093,6 +8097,8 @@ struct { int HP_clif_rodex_send_maillist_post; int HP_clif_rodex_send_refresh_pre; int HP_clif_rodex_send_refresh_post; + int HP_clif_rodex_send_mails_all_pre; + int HP_clif_rodex_send_mails_all_post; int HP_clif_pRodexReadMail_pre; int HP_clif_pRodexReadMail_post; int HP_clif_rodex_read_mail_pre; @@ -10113,6 +10119,8 @@ struct { int HP_npc_market_delfromsql_sub_post; int HP_npc_db_checkid_pre; int HP_npc_db_checkid_post; + int HP_npc_refresh_pre; + int HP_npc_refresh_post; int HP_npc_secure_timeout_timer_pre; int HP_npc_secure_timeout_timer_post; int HP_nullpo_assert_report_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index b094fa841..15052b7f1 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -970,6 +970,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->rodex_send_mail_result, HP_clif_rodex_send_mail_result) }, { HP_POP(clif->rodex_send_maillist, HP_clif_rodex_send_maillist) }, { HP_POP(clif->rodex_send_refresh, HP_clif_rodex_send_refresh) }, + { HP_POP(clif->rodex_send_mails_all, HP_clif_rodex_send_mails_all) }, { HP_POP(clif->pRodexReadMail, HP_clif_pRodexReadMail) }, { HP_POP(clif->rodex_read_mail, HP_clif_rodex_read_mail) }, { HP_POP(clif->pRodexNextMaillist, HP_clif_pRodexNextMaillist) }, @@ -2008,6 +2009,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->market_delfromsql, HP_npc_market_delfromsql) }, { HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) }, { HP_POP(npc->db_checkid, HP_npc_db_checkid) }, + { HP_POP(npc->refresh, HP_npc_refresh) }, { HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) }, /* nullpo_interface */ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 786536aea..69658949c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -10602,10 +10602,10 @@ void HP_clif_equpcheckbox(struct map_session_data *sd) { } return; } -void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool is_quest) { +void HP_clif_displayexp(struct map_session_data *sd, uint64 exp, char type, bool is_quest) { int hIndex = 0; if (HPMHooks.count.HP_clif_displayexp_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned int *exp, char *type, bool *is_quest); + void (*preHookFunc) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_displayexp_pre[hIndex].func; @@ -10620,7 +10620,7 @@ void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type HPMHooks.source.clif.displayexp(sd, exp, type, is_quest); } if (HPMHooks.count.HP_clif_displayexp_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest); + void (*postHookFunc) (struct map_session_data *sd, uint64 exp, char type, bool is_quest); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_displayexp_post[hIndex].func; postHookFunc(sd, exp, type, is_quest); @@ -24671,6 +24671,32 @@ void HP_clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_t } return; } +void HP_clif_rodex_send_mails_all(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_mails_all_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mails_all_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_mails_all_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_mails_all(fd, sd); + } + if (HPMHooks.count.HP_clif_rodex_send_mails_all_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mails_all_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_mails_all_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} void HP_clif_pRodexReadMail(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pRodexReadMail_pre > 0) { @@ -27645,11 +27671,11 @@ int HP_guild_getposition(struct guild *g, struct map_session_data *sd) { } return retVal___; } -unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) { +uint64 HP_guild_payexp(struct map_session_data *sd, uint64 exp) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_guild_payexp_pre > 0) { - unsigned int (*preHookFunc) (struct map_session_data **sd, unsigned int *exp); + uint64 (*preHookFunc) (struct map_session_data **sd, uint64 *exp); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_payexp_pre[hIndex].func; @@ -27664,7 +27690,7 @@ unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) { retVal___ = HPMHooks.source.guild.payexp(sd, exp); } if (HPMHooks.count.HP_guild_payexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, unsigned int exp); + uint64 (*postHookFunc) (uint64 retVal___, struct map_session_data *sd, uint64 exp); for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_payexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, exp); @@ -52063,6 +52089,32 @@ bool HP_npc_db_checkid(const int id) { } return retVal___; } +void HP_npc_refresh(struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_refresh_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_refresh_pre[hIndex].func; + preHookFunc(&nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.refresh(nd); + } + if (HPMHooks.count.HP_npc_refresh_post > 0) { + void (*postHookFunc) (struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_refresh_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; @@ -55930,11 +55982,11 @@ int HP_pc_checkjoblevelup(struct map_session_data *sd) { } return retVal___; } -bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) { +bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_pc_gainexp_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); + bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_gainexp_pre[hIndex].func; @@ -55949,7 +56001,7 @@ bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest); } if (HPMHooks.count.HP_pc_gainexp_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_gainexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, src, base_exp, job_exp, is_quest); @@ -55957,11 +56009,11 @@ bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned } return retVal___; } -unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) { +uint64 HP_pc_nextbaseexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_pc_nextbaseexp_pre > 0) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_nextbaseexp_pre[hIndex].func; @@ -55976,7 +56028,7 @@ unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) { retVal___ = HPMHooks.source.pc.nextbaseexp(sd); } if (HPMHooks.count.HP_pc_nextbaseexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); + uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_nextbaseexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); @@ -55984,11 +56036,11 @@ unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) { } return retVal___; } -unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) { +uint64 HP_pc_thisbaseexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_pc_thisbaseexp_pre > 0) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_thisbaseexp_pre[hIndex].func; @@ -56003,7 +56055,7 @@ unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) { retVal___ = HPMHooks.source.pc.thisbaseexp(sd); } if (HPMHooks.count.HP_pc_thisbaseexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); + uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_thisbaseexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); @@ -56011,11 +56063,11 @@ unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) { } return retVal___; } -unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) { +uint64 HP_pc_nextjobexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_pc_nextjobexp_pre > 0) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_nextjobexp_pre[hIndex].func; @@ -56030,7 +56082,7 @@ unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) { retVal___ = HPMHooks.source.pc.nextjobexp(sd); } if (HPMHooks.count.HP_pc_nextjobexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); + uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_nextjobexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); @@ -56038,11 +56090,11 @@ unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) { } return retVal___; } -unsigned int HP_pc_thisjobexp(const struct map_session_data *sd) { +uint64 HP_pc_thisjobexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; + uint64 retVal___ = 0; if (HPMHooks.count.HP_pc_thisjobexp_pre > 0) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_thisjobexp_pre[hIndex].func; @@ -56057,7 +56109,7 @@ unsigned int HP_pc_thisjobexp(const struct map_session_data *sd) { retVal___ = HPMHooks.source.pc.thisjobexp(sd); } if (HPMHooks.count.HP_pc_thisjobexp_post > 0) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); + uint64 (*postHookFunc) (uint64 retVal___, const struct map_session_data *sd); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_thisjobexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); @@ -58826,10 +58878,10 @@ int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, sh } return retVal___; } -void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) { +void HP_pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src) { int hIndex = 0; if (HPMHooks.count.HP_pc_calcexp_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, unsigned int **base_exp, unsigned int **job_exp, struct block_list **src); + void (*preHookFunc) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_calcexp_pre[hIndex].func; @@ -58844,7 +58896,7 @@ void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned HPMHooks.source.pc.calcexp(sd, base_exp, job_exp, src); } if (HPMHooks.count.HP_pc_calcexp_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); + void (*postHookFunc) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_calcexp_post[hIndex].func; postHookFunc(sd, base_exp, job_exp, src); @@ -61893,14 +61945,14 @@ bool HP_rodex_isenabled(void) { } return retVal___; } -void HP_rodex_open(struct map_session_data *sd, int8 open_type) { +void HP_rodex_open(struct map_session_data *sd, int8 open_type, int64 first_mail_id) { int hIndex = 0; if (HPMHooks.count.HP_rodex_open_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int8 *open_type); + void (*preHookFunc) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rodex_open_pre[hIndex].func; - preHookFunc(&sd, &open_type); + preHookFunc(&sd, &open_type, &first_mail_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -61908,13 +61960,13 @@ void HP_rodex_open(struct map_session_data *sd, int8 open_type) { } } { - HPMHooks.source.rodex.open(sd, open_type); + HPMHooks.source.rodex.open(sd, open_type, first_mail_id); } if (HPMHooks.count.HP_rodex_open_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int8 open_type); + void (*postHookFunc) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rodex_open_post[hIndex].func; - postHookFunc(sd, open_type); + postHookFunc(sd, open_type, first_mail_id); } } return; |