Browse Source

* Documented 'consumeitem' command from r17137.
* Added 'consumeitem' to all applicable scripts.
* Moved "Catalog Magician" to Renewal path.
* Created "Pet Commands" and "Homunculus Commands" sections in script_commands.txt.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17138 54d463be-8e91-2dee-dedb-b68131a5f0ec

euphyy 12 years ago
parent
commit
8c2ff84055

+ 248 - 216
doc/script_commands.txt

@@ -995,7 +995,9 @@ From here on, we will have the commands sorted as follow:
 7.- Instance commands.
 7.- Instance commands.
 8.- Quest Log commands.
 8.- Quest Log commands.
 9.- Battleground commands.
 9.- Battleground commands.
-10.- Mercenary commands.
+10.- Pet commands.
+11.- Homunculus commands.
+12.- Mercenary commands.
 
 
 =====================
 =====================
 |1.- Basic commands.|
 |1.- Basic commands.|
@@ -3148,53 +3150,6 @@ skills a character has.
 
 
 ---------------------------------------
 ---------------------------------------
 
 
-*getpetinfo(<type>)
-
-This function will return pet information for the pet the invoking character 
-currently has active. Valid types are:
-
- 0 - Unique pet ID number as stored by the char server and distinguishing it 
-     from all other pets the characters actually have. This value is currently 
-     useless, at most you can use it to tell pets apart reliably.
- 1 - Pet class number as per 'db/pet_db.txt' - will tell you what kind of a pet it 
-     is.
- 2 - Pet name. Will return "null" if there's no pet. 
- 3 - Pet friendly level (intimacy score). 1000 is full loyalty.
- 4 - Pet hungry level. 100 is completely full.
- 5 - Pet rename flag. 0 means this pet has not been named yet.
-
----------------------------------------
-
-*gethominfo(<type>)
-
-This function works as a direct counterpart of 'getpetinfo':
- 0 - Homunculus unique ID
- 1 - Homunculus Class
- 2 - Name
- 3 - Friendly level (intimacy score). 100000 is full loyalty.
- 4 - Hungry level. 100 is completely full.
- 5 - Rename flag. 0 means this homunculus has not been named yet.
- 6 - Homunculus level
-
----------------------------------------
-
-*petstat(<flag>)
-
-Returns current pet status, all are integers except name.
-Returns 0 or "" if the player doesn't have pets.
-
-Flags usable >>
-PET_CLASS
-PET_NAME
-PET_LEVEL
-PET_HUNGRY
-PET_INTIMATE
-
-Example:
-	set @i, petstat(PET_CLASS);
-
----------------------------------------
-
 *getmonsterinfo(<mob ID>,<type>)
 *getmonsterinfo(<mob ID>,<type>)
 
 
 This function will look up the monster with the specified ID number in the
 This function will look up the monster with the specified ID number in the
@@ -3961,6 +3916,7 @@ job number which doesn't has a eA Job value equivalent.
 For more information on the eA Job System, see the docs/ea_job_system.txt file.
 For more information on the eA Job System, see the docs/ea_job_system.txt file.
 
 
 ---------------------------------------
 ---------------------------------------
+
 *roclass <job number> {,<gender>}
 *roclass <job number> {,<gender>}
 
 
 Does the opposite of eaclass. That is, given a eA Job class, it returns which is the corresponding RO class number. 
 Does the opposite of eaclass. That is, given a eA Job class, it returns which is the corresponding RO class number. 
@@ -4458,15 +4414,24 @@ effect is still in effect).
 *itemskill <skill id>,<skill level>;
 *itemskill <skill id>,<skill level>;
 *itemskill "<skill name>",<skill level>;
 *itemskill "<skill name>",<skill level>;
 
 
-This command meant for item scripts to replicate single-use skills in usable
-items. It will not work properly, if there is a visible dialog window or menu.
-If the skill is self or auto-targeting, it will be used immediately otherwise a
+This command is meant for item scripts to replicate single-use skills in usable
+items. It will not work properly if there is a visible dialog window or menu.
+If the skill is self or auto-targeting, it will be used immediately; otherwise a
 target cursor is shown.
 target cursor is shown.
 
 
 // When Anodyne is used, it will cast Endure (8), Level 1, as if the actual
 // When Anodyne is used, it will cast Endure (8), Level 1, as if the actual
 // skill has been used from skill tree.
 // skill has been used from skill tree.
 605,Anodyne,Anodyne,11,2000,0,100,,,,,10477567,2,,,,,{ itemskill 8,1; },{}
 605,Anodyne,Anodyne,11,2000,0,100,,,,,10477567,2,,,,,{ itemskill 8,1; },{}
 
 
+---------------------------------------
+
+*consumeitem <item id>;
+*consumeitem "<item name>";
+
+This command will run the item script of the specified item on the invoking
+character. The character does not need to possess the item, and the item will
+not be deleted. While this command is intended for usable items, it will run
+for any item type.
 
 
 ---------------------------------------
 ---------------------------------------
 
 
@@ -4474,7 +4439,7 @@ target cursor is shown.
 
 
 This command will open a crafting window on the client connected to the invoking 
 This command will open a crafting window on the client connected to the invoking 
 character. The 'item level' is a number which determines what kind of a crafting 
 character. The 'item level' is a number which determines what kind of a crafting 
-window will pop-up. 
+window will pop-up.
 
 
 You can see the full list of such item levels in 'db/produce_db.txt' which determines 
 You can see the full list of such item levels in 'db/produce_db.txt' which determines 
 what can actually be produced. The window will not be empty only if the invoking 
 what can actually be produced. The window will not be empty only if the invoking 
@@ -5422,31 +5387,6 @@ summon "--ja--",-1;
 
 
 ---------------------------------------
 ---------------------------------------
 
 
-*homevolution;
-
-This command will try to evolve the current player's homunculus.
-If it doesn't work, the /swt emotion is shown.
-
-To evolve a homunculus, the invoking player must have a homunculus,
-the homunculus must not be the last evolution and
-the homunculus must have above 91000 intimacy with its owner.
-
----------------------------------------
-
-*hommutate {<ID>};
-
-This command will try to evolve the current player's homunculus into the
-new Homunculus S. If it doesn't work, the /swt emotion is shown.
-
-To mutate a homunculus, the invoking player must have an evolved
-homunculus and it must be at least level 99.
-
-If the optional parameter <ID> is set, the invoking player's homunculus will
-change into the given homunculus ID. Otherwise, a random Homunculus S
-will be chosen.
-
----------------------------------------
-
 *unitwalk <GID>,<x>,<y>;
 *unitwalk <GID>,<x>,<y>;
 *unitwalk <GID>,<mapid>;
 *unitwalk <GID>,<mapid>;
 
 
@@ -6464,17 +6404,6 @@ must be used.
 
 
 ---------------------------------------
 ---------------------------------------
 
 
-*pet <pet id>;
-
-This command is used in all the item scripts for taming items. Running this 
-command will make the pet catching cursor appear on the client connected to the 
-invoking character, usable on the monsters with the specified pet ID number. It 
-will still work outside an item script.
-
-A full list of pet IDs can be found inside 'db/pet_db.txt'
-
----------------------------------------
-
 *emotion <emotion number>{,<target>{,"<target name>"}};
 *emotion <emotion number>{,<target>{,"<target name>"}};
 
 
 This command makes an object display an emotion sprite above their own as 
 This command makes an object display an emotion sprite above their own as 
@@ -7104,115 +7033,6 @@ script command does not have the optional parameter.
 
 
 ---------------------------------------
 ---------------------------------------
 
 
-* The Pet AI commands
-
-These commands will only work if the invoking character has a pet, and are meant 
-to be executed from pet scripts. They will modify the pet AI decision-making for 
-the current pet of the invoking character, and will NOT have any independent 
-effect by themselves, which is why only one of them each may be in effect at any 
-time for a specific pet. A pet may have 'petloot', 'petskillbonus', 
-'petskillattack' OR 'petpetskillattack2' and 'petskillsupport' OR 'petheal' at 
-the same time. 'petheal' is deprecated and is no longer used in the default pet 
-scripts. 
-
-*petskillbonus <bonus type>,<value>,<duration>,<delay>;
-
-This command will make the pet give a bonus to the owner's stat (bonus type -
-bInt,bVit,bDex,bAgi,bLuk,bStr,bSpeedRate - for a full list, see the values 
-starting with 'b' in 'db/const.txt')
-
-*petrecovery <status type>,<delay>;
-
-This command will make the pet cure a specified status condition. The curing 
-actions will occur once every Delay seconds. For a full list of status 
-conditions that can be cured, see the list of 'SC_' status condition constants 
-in 'db/const.txt'
-
-*petloot <max items>;
-
-This command will turn on pet looting, with a maximum number of items to loot 
-specified. Pet will store items and return them when the maximum is reached or 
-when pet performance is activated.
-
-*petskillsupport <skill id>,<skill level>,<delay>,<percent hp>,<percent sp>;
-*petskillsupport "<skill name>",<skill level>,<delay>,<percent hp>,<percent sp>;
-*petheal <level>,<delay>,<percent hp>,<percent sp>;
-
-This will make the pet use a specified support skill on the owner whenever the 
-HP and SP are below the given percent values, with a specified delay time 
-between activations. The skill numbers are as per 'db/(pre-)re/skill_db.txt'.
-'petheal' works the same as 'petskillsupport' but has the skill ID hard-coded to 
-28 (Heal). This command is deprecated.
-It's not quite certain who's stats will be used for the skills cast, the 
-character's or the pets. Probably, Skotlex can answer that question.
-
-*petskillattack <skill id>,<skill level>,<rate>,<bonusrate>;
-*petskillattack "<skill name>",<skill level>,<rate>,<bonusrate>;
-*petskillattack2 <skill id>,<damage>,<number of attacks>,<rate>,<bonusrate>;
-*petskillattack2 "<skill name>",<damage>,<number of attacks>,<rate>,<bonusrate>;
-
-These two commands will make the pet cast an attack skill on the enemy the pet's 
-owner is currently fighting. Skill IDs and levels are as per 'petskillsupport'. 
-'petskillattack2' will make the pet cast the skill with a fixed amount of damage 
-inflicted and the specified number of attacks.
-
-All commands with delays and durations will only make the behavior active for 
-the specified duration of seconds, with a delay of the specified number of 
-seconds between activations. Rates are a chance of the effect occurring and are 
-given in percent. 'bonusrate' is added to the normal rate if the pet intimacy is 
-at the maximum possible.
-
-The behavior modified with the above mentioned commands will only be exhibited if 
-the pet is loyal and appropriate configuration options are set in 
-'battle_athena.conf'.
-
-Pet scripts in the database normally run whenever a pet of that type hatches 
-from the egg. Other commands usable in item scripts (see 'bonus') will also 
-happily run from pet scripts. Apparently, the pet-specific commands will also 
-work in NPC scripts and modify the behavior of the current pet up until the pet 
-is hatched again. (Which will also occur when the character is logged in again 
-with the pet still out of the egg.) It is not certain for how long the effect of 
-such command running from an NPC script will eventually persist, but apparently, 
-it is possible to usefully employ them in usable item scripts to create pet 
-buffing items.
-
-Nobody tried this before, so you're essentially on your own here.
-
----------------------------------------
-
-*bpet;
-
-This command opens up a pet hatching window on the client connected to the 
-invoking character. It is used in item script for the pet incubators and will 
-let the player hatch an owned egg. If the character has no eggs, it will just 
-open up an empty incubator window.
-This is still usable outside item scripts.
-
----------------------------------------
-
-*makepet <pet id>;
-
-This command will create a pet egg and put it in the invoking character's 
-inventory. The kind of pet is specified by pet ID numbers listed in 
-'db/pet_db.txt'. The egg is created exactly as if the character just successfully 
-caught a pet in the normal way.
-
-    // This will make you a poring:
-    makepet 1002;
-
-Notice that you absolutely have to create pet eggs with this command. If you try 
-to give a pet egg with 'getitem', pet data will not be created by the char 
-server and the egg will disappear when anyone tries to hatch it.
-
----------------------------------------
-
-*homshuffle;
-
-This will recalculate the homunculus stats according to its level, of the 
-current invoking character.
-
----------------------------------------
-
 *setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>;
 *setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>;
 
 
 Each map cell has several 'flags' that specify the properties of that cell.
 Each map cell has several 'flags' that specify the properties of that cell.
@@ -7542,7 +7362,7 @@ color can be:
 	3 = an MVP flag
 	3 = an MVP flag
 	other values show a transparent mark in the mini-map.
 	other values show a transparent mark in the mini-map.
 
 
-----------------------------------------
+---------------------------------------
 
 
 ============================
 ============================
 |9.- Battleground commands.|
 |9.- Battleground commands.|
@@ -7573,7 +7393,7 @@ Example:
 	set $@KvM01BG_id1, waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
 	set $@KvM01BG_id1, waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
 	end;
 	end;
 
 
-----------------------------------------
+---------------------------------------
 
 
 *bg_team_setxy <Battle Group ID>,<x>,<y>;
 *bg_team_setxy <Battle Group ID>,<x>,<y>;
 
 
@@ -7584,7 +7404,7 @@ Example:
 	mapannounce "bat_a01", "Group [1] has taken the work shop, and will now respawn there.",bc_map,"0xFFCE00";
 	mapannounce "bat_a01", "Group [1] has taken the work shop, and will now respawn there.",bc_map,"0xFFCE00";
 	end;
 	end;
 
 
-----------------------------------------
+---------------------------------------
 
 
 *bg_warp <Battle Group>,"<Mapname>",<x>,<y>;
 *bg_warp <Battle Group>,"<Mapname>",<x>,<y>;
 
 
@@ -7596,7 +7416,7 @@ Example:
 	bg_warp $@TierraBG1_id1,"bat_a01",352,342;
 	bg_warp $@TierraBG1_id1,"bat_a01",352,342;
 	end;
 	end;
 
 
-----------------------------------------
+---------------------------------------
 
 
 *bg_monster <Battle Group>,"<map name>",<x>,<y>,"<name to show>",<mob id>,"<event label>";
 *bg_monster <Battle Group>,"<map name>",<x>,<y>,"<name to show>",<mob id>,"<event label>";
 *bg_monster(<Battle Group>,"<map name>",<x>,<y>,"<name to show>",<mob id>,"<event label>");
 *bg_monster(<Battle Group>,"<map name>",<x>,<y>,"<name to show>",<mob id>,"<event label>");
@@ -7616,7 +7436,7 @@ Example:
 	set $@Guardian_3, bg_monster($@TierraBG1_id2,"bat_a01",268,204,"Guardian",1949,"NPCNAME::OnMyMobDead");
 	set $@Guardian_3, bg_monster($@TierraBG1_id2,"bat_a01",268,204,"Guardian",1949,"NPCNAME::OnMyMobDead");
 	end;
 	end;
 
 
-----------------------------------------
+---------------------------------------
 
 
 *bg_monster_set_team <GID>,<Battle Group>;
 *bg_monster_set_team <GID>,<Battle Group>;
 
 
@@ -7639,19 +7459,19 @@ OnTimer1000:
 	bg_monster_set_team $@Guardian, $@BG_1;
 	bg_monster_set_team $@Guardian, $@BG_1;
 	end;
 	end;
 
 
-----------------------------------------
+---------------------------------------
 
 
 *bg_leave;
 *bg_leave;
 
 
 Removes attached player from their Battle Group.
 Removes attached player from their Battle Group.
 
 
-----------------------------------------
+---------------------------------------
 
 
 *bg_destroy <Batte Group>;
 *bg_destroy <Batte Group>;
 
 
 As the name says, destroys the battle group created for that battle ground.
 As the name says, destroys the battle group created for that battle ground.
 
 
-----------------------------------------
+---------------------------------------
 
 
 *areapercentheal "<mapname>",<x1>,<y1>,<x2>,<y2>,<hp>,<sp>;
 *areapercentheal "<mapname>",<x1>,<y1>,<x2>,<y2>,<hp>,<sp>;
 
 
@@ -7661,7 +7481,7 @@ Example:
 	areapercentheal "bat_a01",52,208,61,217,100,100;
 	areapercentheal "bat_a01",52,208,61,217,100,100;
 	end;
 	end;
 
 
-----------------------------------------
+---------------------------------------
 
 
 *bg_get_data(<Battle Group>,<type>);
 *bg_get_data(<Battle Group>,<type>);
 
 
@@ -7669,14 +7489,13 @@ Retrieves data related to given battle group. Type can be one of the following:
 
 
     0 - Amount of players currently belonging to the group.
     0 - Amount of players currently belonging to the group.
 
 
-----------------------------------------
-
+---------------------------------------
 *bg_getareausers(<battle group>,<map name>,<x0>,<y0>,<x1>,<y1>);
 *bg_getareausers(<battle group>,<map name>,<x0>,<y0>,<x1>,<y1>);
 
 
 Retrieves amount of players belonging to given battle group on given
 Retrieves amount of players belonging to given battle group on given
 map within an specified rectangular area.
 map within an specified rectangular area.
 
 
-----------------------------------------
+---------------------------------------
 
 
 *bg_updatescore "<mapname>",<Guillaume Score>,<Croix Score>;
 *bg_updatescore "<mapname>",<Guillaume Score>,<Croix Score>;
 
 
@@ -7684,10 +7503,223 @@ This command will force the update of the displayed scoreboard.
 It is only usable when the map is defined as a Type 2 Battleground:
 It is only usable when the map is defined as a Type 2 Battleground:
 mapflag	<mapname>	battleground	2
 mapflag	<mapname>	battleground	2
 
 
-----------------------------------------
+---------------------------------------
+
+====================
+|10.- Pet commands.|
+====================
+---------------------------------------
+
+*bpet;
+
+This command opens up a pet hatching window on the client connected to the 
+invoking character. It is used in item script for the pet incubators and will 
+let the player hatch an owned egg. If the character has no eggs, it will just 
+open up an empty incubator window.
+This is still usable outside item scripts.
+
+---------------------------------------
+
+*pet <pet id>;
+
+This command is used in all the item scripts for taming items. Running this 
+command will make the pet catching cursor appear on the client connected to the 
+invoking character, usable on the monsters with the specified pet ID number. It 
+will still work outside an item script.
+
+A full list of pet IDs can be found inside 'db/pet_db.txt'
+
+---------------------------------------
+
+*makepet <pet id>;
+
+This command will create a pet egg and put it in the invoking character's 
+inventory. The kind of pet is specified by pet ID numbers listed in 
+'db/pet_db.txt'. The egg is created exactly as if the character just successfully 
+caught a pet in the normal way.
+
+    // This will make you a poring:
+    makepet 1002;
+
+Notice that you absolutely have to create pet eggs with this command. If you try 
+to give a pet egg with 'getitem', pet data will not be created by the char 
+server and the egg will disappear when anyone tries to hatch it.
+
+---------------------------------------
+
+*getpetinfo(<type>)
+
+This function will return pet information for the pet the invoking character 
+currently has active. Valid types are:
+
+ 0 - Unique pet ID number as stored by the char server and distinguishing it 
+     from all other pets the characters actually have. This value is currently 
+     useless, at most you can use it to tell pets apart reliably.
+ 1 - Pet class number as per 'db/pet_db.txt' - will tell you what kind of a pet it 
+     is.
+ 2 - Pet name. Will return "null" if there's no pet. 
+ 3 - Pet friendly level (intimacy score). 1000 is full loyalty.
+ 4 - Pet hungry level. 100 is completely full.
+ 5 - Pet rename flag. 0 means this pet has not been named yet.
+
+---------------------------------------
+
+*petstat(<flag>)
+
+Returns current pet status, all are integers except name.
+Returns 0 or "" if the player doesn't have pets.
+
+Flags usable:
+- PET_CLASS
+- PET_NAME
+- PET_LEVEL
+- PET_HUNGRY
+- PET_INTIMATE
+
+Example:
+	set @i, petstat(PET_CLASS);
+
+---------------------------------------
+
+* The Pet AI commands
+  -------------------
+
+These commands will only work if the invoking character has a pet, and are meant 
+to be executed from pet scripts. They will modify the pet AI decision-making for 
+the current pet of the invoking character, and will NOT have any independent 
+effect by themselves, which is why only one of them each may be in effect at any 
+time for a specific pet. A pet may have 'petloot', 'petskillbonus', 
+'petskillattack' OR 'petpetskillattack2' and 'petskillsupport' OR 'petheal' at 
+the same time. 'petheal' is deprecated and is no longer used in the default pet 
+scripts.
+
+All commands with delays and durations will only make the behavior active for 
+the specified duration of seconds, with a delay of the specified number of 
+seconds between activations. Rates are a chance of the effect occurring and are 
+given in percent. 'bonusrate' is added to the normal rate if the pet intimacy is 
+at the maximum possible.
+
+The behavior modified with the below mentioned commands will only be exhibited if 
+the pet is loyal and appropriate configuration options are set in 
+'battle_athena.conf'.
+
+Pet scripts in the database normally run whenever a pet of that type hatches 
+from the egg. Other commands usable in item scripts (see 'bonus') will also 
+happily run from pet scripts. Apparently, the pet-specific commands will also 
+work in NPC scripts and modify the behavior of the current pet up until the pet 
+is hatched again. (Which will also occur when the character is logged in again 
+with the pet still out of the egg.) It is not certain for how long the effect of 
+such command running from an NPC script will eventually persist, but apparently, 
+it is possible to usefully employ them in usable item scripts to create pet 
+buffing items.
+
+Nobody tried this before, so you're essentially on your own here.
+
+---------------------------------------
+
+*petskillbonus <bonus type>,<value>,<duration>,<delay>;
+
+This command will make the pet give a bonus to the owner's stat (bonus type -
+bInt,bVit,bDex,bAgi,bLuk,bStr,bSpeedRate - for a full list, see the values 
+starting with 'b' in 'db/const.txt')
+
+---------------------------------------
+
+*petrecovery <status type>,<delay>;
+
+This command will make the pet cure a specified status condition. The curing 
+actions will occur once every Delay seconds. For a full list of status 
+conditions that can be cured, see the list of 'SC_' status condition constants 
+in 'db/const.txt'
+
+---------------------------------------
+
+*petloot <max items>;
+
+This command will turn on pet looting, with a maximum number of items to loot 
+specified. Pet will store items and return them when the maximum is reached or 
+when pet performance is activated.
+
+---------------------------------------
+
+*petskillsupport <skill id>,<skill level>,<delay>,<percent hp>,<percent sp>;
+*petskillsupport "<skill name>",<skill level>,<delay>,<percent hp>,<percent sp>;
+*petheal <level>,<delay>,<percent hp>,<percent sp>;
+
+This will make the pet use a specified support skill on the owner whenever the 
+HP and SP are below the given percent values, with a specified delay time 
+between activations. The skill numbers are as per 'db/(pre-)re/skill_db.txt'.
+'petheal' works the same as 'petskillsupport' but has the skill ID hard-coded to 
+28 (Heal). This command is deprecated.
+It's not quite certain who's stats will be used for the skills cast, the 
+character's or the pets. Probably, Skotlex can answer that question.
+
+---------------------------------------
+
+*petskillattack <skill id>,<skill level>,<rate>,<bonusrate>;
+*petskillattack "<skill name>",<skill level>,<rate>,<bonusrate>;
+*petskillattack2 <skill id>,<damage>,<number of attacks>,<rate>,<bonusrate>;
+*petskillattack2 "<skill name>",<damage>,<number of attacks>,<rate>,<bonusrate>;
+
+These two commands will make the pet cast an attack skill on the enemy the pet's 
+owner is currently fighting. Skill IDs and levels are as per 'petskillsupport'. 
+'petskillattack2' will make the pet cast the skill with a fixed amount of damage 
+inflicted and the specified number of attacks.
+
+---------------------------------------
+
+===========================
+|11.- Homunculus commands.|
+===========================
+---------------------------------------
+
+*homevolution;
+
+This command will try to evolve the current player's homunculus.
+If it doesn't work, the /swt emotion is shown.
+
+To evolve a homunculus, the invoking player must have a homunculus,
+the homunculus must not be the last evolution and
+the homunculus must have above 91000 intimacy with its owner.
+
+---------------------------------------
+
+*hommutate {<ID>};
+
+This command will try to evolve the current player's homunculus into the
+new Homunculus S. If it doesn't work, the /swt emotion is shown.
+
+To mutate a homunculus, the invoking player must have an evolved
+homunculus and it must be at least level 99.
+
+If the optional parameter <ID> is set, the invoking player's homunculus will
+change into the given homunculus ID. Otherwise, a random Homunculus S
+will be chosen.
+
+---------------------------------------
+
+*gethominfo(<type>)
+
+This function works as a direct counterpart of 'getpetinfo':
+ 0 - Homunculus unique ID
+ 1 - Homunculus Class
+ 2 - Name
+ 3 - Friendly level (intimacy score). 100000 is full loyalty.
+ 4 - Hungry level. 100 is completely full.
+ 5 - Rename flag. 0 means this homunculus has not been named yet.
+ 6 - Homunculus level
+
+---------------------------------------
+
+*homshuffle;
+
+This will recalculate the homunculus stats according to its level, of the 
+current invoking character.
+
+---------------------------------------
 
 
 ==========================
 ==========================
-|10.- Mercenary commands.|
+|12.- Mercenary commands.|
 ==========================
 ==========================
 ---------------------------------------
 ---------------------------------------
 
 
@@ -7697,21 +7729,21 @@ This command summons a mercenary of given class, for given amount of
 time in milliseconds. Typically used in item scripts of mercenary
 time in milliseconds. Typically used in item scripts of mercenary
 scrolls.
 scrolls.
 
 
-----------------------------------------
+---------------------------------------
 
 
 *mercenary_heal <hp>,<sp>;
 *mercenary_heal <hp>,<sp>;
 
 
 This command works like 'heal', but affects the mercenary of the
 This command works like 'heal', but affects the mercenary of the
 currently attached character.
 currently attached character.
 
 
-----------------------------------------
+---------------------------------------
 
 
 *mercenary_sc_start <type>,<tick>,<val1>;
 *mercenary_sc_start <type>,<tick>,<val1>;
 
 
 This command works like 'sc_start', but affects the mercenary of the
 This command works like 'sc_start', but affects the mercenary of the
 currently attached character.
 currently attached character.
 
 
-----------------------------------------
+---------------------------------------
 
 
 *mercenary_get_calls(<guild>);
 *mercenary_get_calls(<guild>);
 *mercenary_set_calls <guild>,<value>;
 *mercenary_set_calls <guild>,<value>;
@@ -7723,7 +7755,7 @@ attached character. Guild can be one or the following constants:
     SPEAR_MERC_GUILD
     SPEAR_MERC_GUILD
     SWORD_MERC_GUILD
     SWORD_MERC_GUILD
 
 
-----------------------------------------
+---------------------------------------
 
 
 *mercenary_get_faith(<guild>);
 *mercenary_get_faith(<guild>);
 *mercenary_set_faith <guild>,<value>;
 *mercenary_set_faith <guild>,<value>;
@@ -7756,7 +7788,7 @@ can be one of the following:
 If the character does not have a mercenary, the command returns ""
 If the character does not have a mercenary, the command returns ""
 for name and 0 for all other types.
 for name and 0 for all other types.
 
 
-----------------------------------------
+---------------------------------------
 
 
 Whew.
 Whew.
 That's about all of them.
 That's about all of them.

+ 8 - 6
npc/cities/rachel.txt

@@ -4,7 +4,7 @@
 //= First Version: Tsuyuki and Harp
 //= First Version: Tsuyuki and Harp
 //= iRO Version: L0ne_W0lf
 //= iRO Version: L0ne_W0lf
 //===== Current Version: =====================================
 //===== Current Version: =====================================
-//= 0.9
+//= 0.9a
 //===== Compatible With: =====================================
 //===== Compatible With: =====================================
 //= rAthena SVN
 //= rAthena SVN
 //===== Description: =========================================
 //===== Description: =========================================
@@ -17,6 +17,7 @@
 //= 0.7 Total update of most if not all NPCs. [L0ne_W0lf]
 //= 0.7 Total update of most if not all NPCs. [L0ne_W0lf]
 //= 0.8 Updated "Frozen Boy" dialog. (euRO) [L0ne_W0lf]
 //= 0.8 Updated "Frozen Boy" dialog. (euRO) [L0ne_W0lf]
 //= 0.9 Replaced effect numerics with constants. [L0ne_W0lf]
 //= 0.9 Replaced effect numerics with constants. [L0ne_W0lf]
+//= 0.9a Added 'consumeitem' command. [Euphy]
 //============================================================
 //============================================================
 
 
 //===== Set 1 ================================================
 //===== Set 1 ================================================
@@ -308,11 +309,12 @@ rachel,206,30,3	script	Freya's Priest#play	920,{
 	mes "Oh? Oh! That's wonderful!";
 	mes "Oh? Oh! That's wonderful!";
 	close2;
 	close2;
 	set .@play,rand(1,10);
 	set .@play,rand(1,10);
-	if (.@play == 1) warp "Random",0,0;
-	else if (.@play == 2) warp "Random",0,0;
-	else if (.@play == 3) sc_start SC_SpeedUp1,5000,0;
-	else if (.@play == 4) sc_start SC_SpeedUp1,5000,0;
-	else sc_start SC_SlowDown,5000,0;
+	if (.@play < 3)
+		consumeitem 601; //Wing_Of_Fly
+	else if (.@play < 5)
+		consumeitem 12016; //Speed_Up_Potion
+	else
+		consumeitem 12017; //Slow_Down_Potion
 	end;
 	end;
 }
 }
 
 

+ 4 - 98
npc/merchants/buying_shops.txt

@@ -1,16 +1,17 @@
 //===== rAthena Script =======================================
 //===== rAthena Script =======================================
 //= Buying Shop Scripts
 //= Buying Shop Scripts
 //===== By: ==================================================
 //===== By: ==================================================
-//= Kisuka, skyiing, Scriptor
+//= Kisuka
 //===== Current Version: =====================================
 //===== Current Version: =====================================
-//= 1.1
+//= 1.1a
 //===== Compatible With: =====================================
 //===== Compatible With: =====================================
 //= rAthena SVN
 //= rAthena SVN
 //===== Description: =========================================
 //===== Description: =========================================
-//= Buying Shop licenses and catalogs.
+//= Buying Shop licenses.
 //===== Additional Comments: =================================
 //===== Additional Comments: =================================
 //= 1.0 First version. [Kisuka]
 //= 1.0 First version. [Kisuka]
 //= 1.1 Added Catalog Magician. [Euphy]
 //= 1.1 Added Catalog Magician. [Euphy]
+//= 1.1a Moved Catalog Magician to Renewal path. [Euphy]
 //============================================================ 
 //============================================================ 
 
 
 // Black Marketeer (Buy Licenses - Non-Merchant Classes)
 // Black Marketeer (Buy Licenses - Non-Merchant Classes)
@@ -238,98 +239,3 @@ alberta_in,58,52,4	script	Purchasing Team#Buying	59,{
 	mes "My time is solely dedicated to our customers in the Merchant industry.";
 	mes "My time is solely dedicated to our customers in the Merchant industry.";
 	close;
 	close;
 }
 }
-
-// Catalog Magician
-//============================================================ 
-moc_para01,22,16,5	script	Catalog Magician#catal01	704,{
-	if (!checkweight(1201,2)) {
-		mes "- You have too many items. Please make space. -";
-		close;
-	}
-	set .@ticket_cost, 200;
-	mes "[Catalog Magician]";
-	mes "Look... the Magic Academy";
-	mes "in Geffen is now directly";
-	mes "selling the brand new";
-	mes "^007777Universal Catalog Silver^000000!";
-	next;
-	mes "He is looking at the words";
-	mes "written on his hand.";
-	mes "Seems like he's too busy";
-	mes "to look at you.";
-	next;
-	mes "[Catalog Magician]";
-	mes "A brand new catalog";
-	mes "has just come out!";
-	mes "You can check what";
-	mes "items can be traded";
-	mes "and what items are on";
-	mes "sale from the vendor.";
-	next;
-	mes "[Catalog Magician]";
-	mes "^007777Universal Catalog Silver^000000~";
-	mes "It costs only 200z each!";
-	mes "You can buy it up to 50";
-	mes "pieces at once!";
-	next;
-	switch(select("Buy ^007777Universal Catalog Silver^000000:I don't need it!:You don't look like a vendor...")) {
-	case 1:
-		mes "[Catalog Magician]";
-		mes "You... want all 50 pieces?";
-		mes "Or how many do you need?";
-		next;
-		while (1) {
-			input .@input;
-			mes "[Catalog Magician]";
-			if (.@input == 0) {
-				mes "Trade has been stopped!";
-				mes "I don't know what to do next...";
-				mes "What should I do?";
-				emotion e_swt2,1;
-				close;
-			} else if (.@input < 1 || .@input > 50) {
-				mes "It should be less than 50 pieces.";
-				next;
-			} else break;
-		}
-		set .@sell, .@ticket_cost * .@input;
-		mes "Total number of catalog(s) that";
-		mes "you're trying to purchase is";
-		mes .@input + " pieces and it costs " + .@sell + " z.";
-		if (Zeny < .@sell) {
-			mes "It seems you don't have enough money.";
-			mes "You can sell your equips";
-			mes "to make more money... if you want.";
-			close;
-		}
-		mes "Okie, here you go.";
-		set Zeny, Zeny - .@sell;
-		getitem 12580,.@input; //Vending_Search_Scroll
-		close;
-	case 2:
-		mes "[Catalog Magician]";
-		mes "Argh... you really need this";
-		mes "item... Do you want me to";
-		mes "explain again? I don't know";
-		mes "what to do next...";
-		mes "What should I do?";
-		emotion e_swt2,1;
-		close;
-	case 3:
-		mes "[Catalog Magician]";
-		mes "My real job is a magician.";
-		mes "I was going to ask the merchant";
-		mes "guild to sell them, but they were";
-		mes "trying use them as an appendix";
-		mes "into broom sales. That's why";
-		mes "I'm selling these by myself.";
-		next;
-		mes "[Catalog Magician]";
-		mes "There are many adventurers";
-		mes "here coming and going. I'm";
-		mes "pretty sure that I can sell them";
-		mes "all soon. Don't you think so?";
-		mes "So... let's start!! Buy more of them, please! PLEASE...!";
-		close;
-	}
-}

+ 4 - 3
npc/quests/quests_13_1.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //===== By: ================================================== 
 //= L0ne_W0lf
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
 //===== Current Version: ===================================== 
-//= 2.7
+//= 2.7a
 //===== Compatible With: ===================================== 
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //= rAthena SVN
 //===== Description: ========================================= 
 //===== Description: ========================================= 
@@ -46,6 +46,7 @@
 //= 2.6 Disabled "Ash Vacuum Warper" as it's no longer in iRO. [Euphy]
 //= 2.6 Disabled "Ash Vacuum Warper" as it's no longer in iRO. [Euphy]
 //= 2.6a Added 'npcskill' command. [Euphy]
 //= 2.6a Added 'npcskill' command. [Euphy]
 //= 2.7 Updated EXP rewards.
 //= 2.7 Updated EXP rewards.
+//= 2.7a Added 'consumeitem' command. [Euphy]
 //============================================================ 
 //============================================================ 
 
 
 // Onward to the New World
 // Onward to the New World
@@ -14782,7 +14783,7 @@ OnTouch:
 		set mao_morocc2,18;
 		set mao_morocc2,18;
 		changequest 7026,7027;
 		changequest 7026,7027;
 		close2;
 		close2;
-		warp "SavePoint",0,0;
+		consumeitem 602; //Wing_Of_Butterfly
 		end;
 		end;
 	}
 	}
 	else if (mao_morocc2 == 19) {
 	else if (mao_morocc2 == 19) {
@@ -14874,7 +14875,7 @@ que_dan02,115,53,3	script	Man#moc2_crazyR01	456,{
 		set mao_morocc2,20;
 		set mao_morocc2,20;
 		changequest 7028,7029;
 		changequest 7028,7029;
 		close2;
 		close2;
-		warp "SavePoint",0,0;
+		consumeitem 602; //Wing_Of_Butterfly
 		donpcevent "Mr. Kidd#moc_extra01::OnDisable";
 		donpcevent "Mr. Kidd#moc_extra01::OnDisable";
 	}
 	}
 	else {
 	else {

+ 108 - 0
npc/re/merchants/catalog.txt

@@ -0,0 +1,108 @@
+//===== rAthena Script =======================================
+//= Catalog Magician
+//===== By: ==================================================
+//= skyiing, Scriptor
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= Catalogs allow players to easily search for items in-game,
+//= and to buy/sell directly from the catalog interface.
+//===== Additional Comments: =================================
+//= 1.0 Moved from root directory. [Euphy]
+//============================================================ 
+
+moc_para01,22,16,5	script	Catalog Magician#catal01	704,{
+	if (!checkweight(1201,2)) {
+		mes "- You have too many items. Please make space. -";
+		close;
+	}
+	set .@ticket_cost, 200;
+	mes "[Catalog Magician]";
+	mes "Look... the Magic Academy";
+	mes "in Geffen is now directly";
+	mes "selling the brand new";
+	mes "^007777Universal Catalog Silver^000000!";
+	next;
+	mes "He is looking at the words";
+	mes "written on his hand.";
+	mes "Seems like he's too busy";
+	mes "to look at you.";
+	next;
+	mes "[Catalog Magician]";
+	mes "A brand new catalog";
+	mes "has just come out!";
+	mes "You can check what";
+	mes "items can be traded";
+	mes "and what items are on";
+	mes "sale from the vendor.";
+	next;
+	mes "[Catalog Magician]";
+	mes "^007777Universal Catalog Silver^000000~";
+	mes "It costs only 200z each!";
+	mes "You can buy it up to 50";
+	mes "pieces at once!";
+	next;
+	switch(select("Buy ^007777Universal Catalog Silver^000000:I don't need it!:You don't look like a vendor...")) {
+	case 1:
+		mes "[Catalog Magician]";
+		mes "You... want all 50 pieces?";
+		mes "Or how many do you need?";
+		next;
+		while (1) {
+			input .@input;
+			mes "[Catalog Magician]";
+			if (.@input == 0) {
+				mes "Trade has been stopped!";
+				mes "I don't know what to do next...";
+				mes "What should I do?";
+				emotion e_swt2,1;
+				close;
+			} else if (.@input < 1 || .@input > 50) {
+				mes "It should be less than 50 pieces.";
+				next;
+			} else
+				break;
+		}
+		set .@sell, .@ticket_cost * .@input;
+		mes "Total number of catalog(s) that";
+		mes "you're trying to purchase is";
+		mes .@input + " pieces and it costs " + .@sell + " z.";
+		if (Zeny < .@sell) {
+			mes "It seems you don't have enough money.";
+			mes "You can sell your equips";
+			mes "to make more money... if you want.";
+			close;
+		}
+		mes "Okie, here you go.";
+		set Zeny, Zeny - .@sell;
+		getitem 12580,.@input; //Vending_Search_Scroll
+		close;
+	case 2:
+		mes "[Catalog Magician]";
+		mes "Argh... you really need this";
+		mes "item... Do you want me to";
+		mes "explain again? I don't know";
+		mes "what to do next...";
+		mes "What should I do?";
+		emotion e_swt2,1;
+		close;
+	case 3:
+		mes "[Catalog Magician]";
+		mes "My real job is a magician.";
+		mes "I was going to ask the merchant";
+		mes "guild to sell them, but they were";
+		mes "trying use them as an appendix";
+		mes "into broom sales. That's why";
+		mes "I'm selling these by myself.";
+		next;
+		mes "[Catalog Magician]";
+		mes "There are many adventurers";
+		mes "here coming and going. I'm";
+		mes "pretty sure that I can sell them";
+		mes "all soon. Don't you think so?";
+		mes "So... let's start!! Buy more of them, please! PLEASE...!";
+		close;
+	}
+}

+ 15 - 14
npc/re/quests/quests_brasilis.txt

@@ -3,11 +3,11 @@
 //===== By ===================================================
 //===== By ===================================================
 //= L0ne_W0lf
 //= L0ne_W0lf
 //===== Version ==============================================
 //===== Version ==============================================
-//= 1.2
+//= 1.2a
 //===== Compatible With ======================================
 //===== Compatible With ======================================
 //= rAthena SVN
 //= rAthena SVN
 //===== Description ==========================================
 //===== Description ==========================================
-//= [Translated from the Official]
+//= [Official Conversion]
 //= Lost Puppies (Repeatable, 24 hours.)
 //= Lost Puppies (Repeatable, 24 hours.)
 //= Suspicious Beach (Repeatable, 24 hours. iRO/cRO version.)
 //= Suspicious Beach (Repeatable, 24 hours. iRO/cRO version.)
 //= Guarana Candy Quest
 //= Guarana Candy Quest
@@ -18,6 +18,7 @@
 //= 1.0 First version.
 //= 1.0 First version.
 //= 1.1 Hydra Ball (12408)
 //= 1.1 Hydra Ball (12408)
 //= 1.2 Optimization. [Euphy]
 //= 1.2 Optimization. [Euphy]
+//= 1.2a Added 'consumeitem' command. [Euphy]
 //============================================================
 //============================================================
 
 
 // Lost Puppies, Original file: dogdog.sc
 // Lost Puppies, Original file: dogdog.sc
@@ -53,7 +54,7 @@ brasilis,297,307,5	script	Angelo#br	50,{
 		erasequest 9031;
 		erasequest 9031;
 		setquest 9032;
 		setquest 9032;
 		specialeffect2 EF_ASSUMPTIO;
 		specialeffect2 EF_ASSUMPTIO;
-		percentheal 100,100;
+		consumeitem 607; //Yggdrasilberry
 		set .@rand,rand(1,10);
 		set .@rand,rand(1,10);
 		if (.@rand > 4 && .@rand < 9) getitem 504,2; //White_Potion
 		if (.@rand > 4 && .@rand < 9) getitem 504,2; //White_Potion
 		else if (.@rand > 8) getitem 608,1; //Seed_Of_Yggdrasil
 		else if (.@rand > 8) getitem 608,1; //Seed_Of_Yggdrasil
@@ -226,10 +227,10 @@ brasilis,192,133,6	script	Lucia#brasilis	478,{
 					//recall_completequest 9029;
 					//recall_completequest 9029;
 					if (.@nQState2 > -1) erasequest 9029;
 					if (.@nQState2 > -1) erasequest 9029;
 					setquest 9029;
 					setquest 9029;
-					percentheal 100,100;
-					sc_start SC_LUKFOOD, 1200000, 5; percentheal 5,2;
-					sc_start SC_VITFOOD, 1200000, 5; percentheal 10,0;
-					sc_start SC_DEXFOOD, 1200000, 5; percentheal 5,5;
+					consumeitem 607; //Yggdrasilberry
+					consumeitem 12070; //Luk_Dish05
+					consumeitem 12055; //Vit_Dish05
+					consumeitem 12065; //Dex_Dish05
 					getitem 11502,3; //Light_Blue_Pot
 					getitem 11502,3; //Light_Blue_Pot
 					close;
 					close;
 				}
 				}
@@ -971,7 +972,7 @@ OnTouch_:
 		set brazil_gua,8;
 		set brazil_gua,8;
 		changequest 2197,2198;
 		changequest 2197,2198;
 		close2;
 		close2;
-		sc_start SC_SpeedUp1,5000,0;
+		consumeitem 12016; //Speed_Up_Potion
 		end;
 		end;
 	}
 	}
 	else {
 	else {
@@ -3072,12 +3073,12 @@ bra_dun02,157,74,5	script	Iara#nk	478,2,2,{
 			percentheal 100,100;
 			percentheal 100,100;
 			sc_start SC_INCFLEE,3600000,20;
 			sc_start SC_INCFLEE,3600000,20;
 			sc_start SC_INCCRI,3600000,10;
 			sc_start SC_INCCRI,3600000,10;
-			sc_start SC_STRFOOD,1200000,3;
-			sc_start SC_DEXFOOD,1200000,3;
-			sc_start SC_AGIFOOD,1200000,3;
-			sc_start SC_VITFOOD,1200000,3;
-			sc_start SC_INTFOOD,1200000,3;
-			sc_start SC_LUKFOOD,1200000,3; 
+			consumeitem 12043; //Str_Dish03
+			consumeitem 12063; //Dex_Dish03
+			consumeitem 12058; //Agi_Dish03
+			consumeitem 12053; //Vit_Dish03
+			consumeitem 12048; //Int_Dish03
+			consumeitem 12068; //Luk_Dish03
 			next;
 			next;
 			mes "[Iara]";
 			mes "[Iara]";
 			mes "Ahhh~...";
 			mes "Ahhh~...";

+ 1 - 0
npc/re/scripts_athena.conf

@@ -47,6 +47,7 @@ npc: npc/re/kafras/kafras_brasilis.txt
 
 
 // -------------------------- Merchant --------------------------
 // -------------------------- Merchant --------------------------
 npc: npc/re/merchants/3rd_trader.txt
 npc: npc/re/merchants/3rd_trader.txt
+npc: npc/re/merchants/catalog.txt
 npc: npc/re/merchants/diamond.txt
 npc: npc/re/merchants/diamond.txt
 npc: npc/re/merchants/flute.txt
 npc: npc/re/merchants/flute.txt
 npc: npc/re/merchants/inn.txt
 npc: npc/re/merchants/inn.txt

+ 1 - 1
src/map/script.c

@@ -17817,7 +17817,7 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(cleanmap,"s"),
 	BUILDIN_DEF(cleanmap,"s"),
 	BUILDIN_DEF2(cleanmap,"cleanarea","siiii"),
 	BUILDIN_DEF2(cleanmap,"cleanarea","siiii"),
 	BUILDIN_DEF(npcskill,"viii"),
 	BUILDIN_DEF(npcskill,"viii"),
-	BUILDIN_DEF(consumeitem,"vi?"),
+	BUILDIN_DEF(consumeitem,"v"),
 	/**
 	/**
 	 * @commands (script based)
 	 * @commands (script based)
 	 **/
 	 **/