From 88dc4a7284df27223602f679c25efaa00502081f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 Oct 2014 11:34:32 +0300 Subject: Remove conf dir. --- doc/item_bonus.txt | 440 -- doc/item_db.txt | 309 -- doc/mob_db_mode_list.txt | 110 - doc/permissions.txt | 39 - doc/sample/bank_test.txt | 80 - doc/sample/basejob_baseclass_upper.txt | 18 - doc/sample/checkoption.txt | 19 - doc/sample/delitem2.txt | 39 - doc/sample/getequipcardid.txt | 26 - doc/sample/getequipid.txt | 16 - doc/sample/getiteminfo.txt | 23 - doc/sample/getmonsterinfo.txt | 23 - doc/sample/gstorage_test.txt | 36 - doc/sample/localized_npc.txt | 148 - doc/sample/npc_dynamic_shop.txt | 93 - doc/sample/npc_extend_shop.txt | 351 -- doc/sample/npc_live_dialogues.txt | 53 - doc/sample/npc_test_array.txt | 43 - doc/sample/npc_test_chat.txt | 37 - doc/sample/npc_test_checkweight.txt | 158 - doc/sample/npc_test_duplicate.txt | 33 - doc/sample/npc_test_func.txt | 35 - doc/sample/npc_test_npctimer.txt | 42 - doc/sample/npc_test_npctimer2.txt | 23 - doc/sample/npc_test_pcre.txt | 402 -- doc/sample/npc_test_quest.txt | 52 - doc/sample/npc_test_setitemx.txt | 44 - doc/sample/npc_test_setmapflag.txt | 32 - doc/sample/npc_test_skill.txt | 37 - doc/sample/npc_test_time.txt | 25 - doc/sample/npc_trader_sample.txt | 58 - doc/script_commands.txt | 9042 -------------------------------- 32 files changed, 11886 deletions(-) delete mode 100644 doc/item_bonus.txt delete mode 100644 doc/item_db.txt delete mode 100644 doc/mob_db_mode_list.txt delete mode 100644 doc/permissions.txt delete mode 100644 doc/sample/bank_test.txt delete mode 100644 doc/sample/basejob_baseclass_upper.txt delete mode 100644 doc/sample/checkoption.txt delete mode 100644 doc/sample/delitem2.txt delete mode 100644 doc/sample/getequipcardid.txt delete mode 100644 doc/sample/getequipid.txt delete mode 100644 doc/sample/getiteminfo.txt delete mode 100644 doc/sample/getmonsterinfo.txt delete mode 100644 doc/sample/gstorage_test.txt delete mode 100644 doc/sample/localized_npc.txt delete mode 100644 doc/sample/npc_dynamic_shop.txt delete mode 100644 doc/sample/npc_extend_shop.txt delete mode 100644 doc/sample/npc_live_dialogues.txt delete mode 100644 doc/sample/npc_test_array.txt delete mode 100644 doc/sample/npc_test_chat.txt delete mode 100644 doc/sample/npc_test_checkweight.txt delete mode 100644 doc/sample/npc_test_duplicate.txt delete mode 100644 doc/sample/npc_test_func.txt delete mode 100644 doc/sample/npc_test_npctimer.txt delete mode 100644 doc/sample/npc_test_npctimer2.txt delete mode 100644 doc/sample/npc_test_pcre.txt delete mode 100644 doc/sample/npc_test_quest.txt delete mode 100644 doc/sample/npc_test_setitemx.txt delete mode 100644 doc/sample/npc_test_setmapflag.txt delete mode 100644 doc/sample/npc_test_skill.txt delete mode 100644 doc/sample/npc_test_time.txt delete mode 100644 doc/sample/npc_trader_sample.txt delete mode 100644 doc/script_commands.txt (limited to 'doc') diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt deleted file mode 100644 index 2d29165a8..000000000 --- a/doc/item_bonus.txt +++ /dev/null @@ -1,440 +0,0 @@ -//===== Hercules Documentation =============================== -//= Hercules Item Bonuses List -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20150624 -//===== Description: ========================================= -//= List of script instructions used in item bonuses, -//= mainly bonus/bonus2/bonus3/bonus4/bonus5 arguments. -//============================================================ - -Constants ---------- -This list contains all available constants referenced in the 'bonus' commands. - -* Status effect (eff) - Eff_Stone, Eff_Freeze, Eff_Stun, Eff_Sleep, Eff_Poison, Eff_Curse, Eff_Silence, - Eff_Confusion, Eff_Blind, Eff_Bleeding, Eff_DPoison, Eff_Fear, Eff_Cold, - Eff_Burning, Eff_Deepsleep - -* Element (e) - Ele_Neutral, Ele_Water, Ele_Earth, Ele_Fire, Ele_Wind, Ele_Poison, - Ele_Holy, Ele_Dark, Ele_Ghost, Ele_Undead, Ele_All - -* Race (r) - RC_Formless, RC_Undead, RC_Brute, RC_Plant, RC_Insect, RC_Fish, - RC_Demon, RC_DemiHuman, RC_Angel, RC_Dragon, RC_Player, RC_Boss, - RC_NonBoss, RC_NonDemiHuman, RC_NonPlayer, RC_DemiPlayer, - RC_NonDemiPlayer, RC_All - -* Monster Race (mr) - RC2_Goblin, RC2_Kobold, RC2_Orc, RC2_Golem, RC2_Guardian, RC2_Ninja, - RC2_Scaraba, RC2_Turtle - -* Size (s) - Size_Small, Size_Medium, Size_Large - -* Trigger criteria (bf) - BF_WEAPON: Trigger on weapon skills - BF_MAGIC: Trigger on magic skills - BF_MISC: Trigger on misc skills - (Default: BF_WEAPON) - - BF_SHORT: Trigger on melee attacks - BF_LONG: Trigger on ranged attacks - (Default: BF_SHORT+BF_LONG) - - BF_NORMAL: Trigger on normal attacks - BF_SKILL: Trigger on skills - (Default: BF_SKILL if type is BF_MISC or BF_MAGIC, BF_NORMAL if type is BF_WEAPON) - -* Attack Trigger Criteria (abf) - ATF_SELF: Trigger on self - ATF_TARGET: Trigger on target - (Default: ATF_TARGET) - - ATF_SHORT: Trigger on melee attack - ATF_LONG: Trigger on ranged attack - (Default: ATF_SHORT+ATF_LONG) - - ATF_WEAPON: Trigger on Weapon Skills - ATF_MAGIC: Trigger on magic attacks - ATF_MISC: Trigger on misc skills - ATF_SKILL: Trigger on skill attack - (Default: ATF_WEAPON) - -ATF_SELF: Trigger effect on self. - ATF_TARGET: Trigger effect on target (default) - ATF_SHORT: Trigger on melee attacks - ATF_LONG: Trigger in ranged attacks (default: trigger on all attacks) -* Other values: - Skill (sk): see 'db/(pre-)re/skill_db.txt' (NOTE: Both skill IDs and names, with and without quotes, are supported.) - Monster id (mid): see 'db/(pre-)re/mob_db.txt' - Item id (id): see 'db/(pre-)re/item_db.conf' - Item chain (ic): see 'db/(pre-)re/item_chain.conf' (Only Constants) - Item group (ig): see 'db/(pre-)re/item_group.conf' (ItemID) - Weapon type (w): see 'doc/item_db.txt' -> View -> Weapons - Class (c): see 'db/(pre-re)/mob_db.txt' -> For Players, c = JobID - -Bonuses -------- -The format of bonuses listed in this file is as follows: - 1. Basic Bonuses - 2. Extended Bonuses - 3. Group-specific Bonuses - 4. Status-related Bonuses - 5. AutoSpell Bonuses - 6. Misc Bonuses - -==================== -| 1. Basic Bonuses | -==================== - -Base Stats ----------- -bonus bStr,n; STR + n -bonus bAgi,n; AGI + n -bonus bVit,n; VIT + n -bonus bInt,n; INT + n -bonus bDex,n; DEX + n -bonus bLuk,n; LUK + n -bonus bAgiVit,n; AGI + n, VIT + n -bonus bAgiDexStr,n; STR + n, AGI + n, DEX + n -bonus bAllStats,n; STR + n, AGI + n, VIT + n, INT + n, DEX + n, LUK + n - -HP/SP ------ -bonus bMaxHP,n; MaxHP + n -bonus bMaxHPrate,n; MaxHP + n% -bonus bMaxSP,n; MaxSP + n -bonus bMaxSPrate,n; MaxSP + n% - -Attack/Def ----------- -bonus bAtk,n; ATK + n -bonus bAtk2,n; ATK2 + n -bonus bAtkRate,n; Attack Power + n% -bonus bBaseAtk,n; Basic Attack Power + n -bonus bDef,n; Equipment DEF + n -bonus bDef2,n; VIT based DEF + n -bonus bDefRate,n; Equipment DEF + n% -bonus bDef2Rate,n; VIT based DEF + n% - -Magic Attack/Def ----------------- -bonus bMatk,n; Magical attack power + n -bonus bMatkRate,n; Magical attack power + n% -bonus bMdef,n; Equipment MDEF + n -bonus bMdef2,n; INT based MDEF + n -bonus bMdefRate,n; Equipment MDEF + n% -bonus bMdef2Rate,n; INT based MDEF + n% - -Other Stats ------------ -bonus bHit,n; Hit + n -bonus bHitRate,n; Hit + n% -bonus bCritical,n; Critical + n -bonus bCriticalRate,n; Critical + n% -bonus bFlee,n; Flee + n -bonus bFleeRate,n; Flee + n% -bonus bFlee2,n; Perfect Dodge + n -bonus bFlee2Rate,n; Perfect Dodge + n% -bonus bPerfectHitRate,n; On-target impact attack probability n% (only the highest among all is applied) -bonus bPerfectHitAddRate,n; On-target impact attack probability + n% -bonus bSpeedRate,n; Moving speed + n% (only the highest among all is applied) -bonus bSpeedAddRate,n; Moving speed + n% -bonus bAspd,n; Attack speed + n -bonus bAspdRate,n; Attack speed + n% -bonus bAtkRange,n; Attack range + n - -======================= -| 2. Extended Bonuses | -======================= - -HP --- -bonus bHPrecovRate,n; Natural HP recovery ratio + n% -bonus2 bHPRegenRate,n,t; Gain n HP every t milliseconds -bonus2 bHPLossRate,n,t; Lose n HP every t millisecond - -SP --- -bonus bSPrecovRate,n; Natural SP recovery ratio + n% -bonus2 bSPRegenRate,n,t; Gain n SP every t milliseconds -bonus2 bSPLossRate,n,t; Lose n SP every t milliseconds -bonus bUseSPrate,n; SP consumption + n% -bonus2 bSkillUseSP,sk,n; Reduces SP consumption of skill sk by n. -bonus2 bSkillUseSPrate,sk,n; Reduces SP consumption of skill sk by n% -bonus bNoRegen,x; Stops regeneration for x (x: 1=HP, 2=SP) - -Attack/Def ----------- -bonus bNearAtkDef,n; Adds n% damage reduction against melee physical attacks -bonus bLongAtkDef,n; Adds n% damage reduction against ranged physical attacks -bonus bMagicAtkDef,n; Adds n% damage reduction against magical attacks -bonus bMiscAtkDef,n; Adds n% damage reduction against MISC attacks (traps, falcon, ...) -bonus bCriticalDef,n; Decreases Chance of being hit by critical by n% - -bonus2 bSkillAtk,sk,n; Increase damage of skill sk by n% -bonus2 bWeaponAtk,w,n; Adds n ATK when weapon of type w is equipped -bonus2 bWeaponAtkRate,w,n; Adds n% damage to weapon attacks when weapon of type w is equipped -bonus bLongAtkRate,n; Increases damage of ranged attacks by n% -bonus bCritAtkRate,n; Increase critical damage by +n% - -bonus bNoWeaponDamage,n; Prevents from receiving n% physical damage -bonus bNoMagicDamage,n; Prevents from receiving n% magical effect (Attack, Healing, Support spells are all blocked) -bonus bNoMiscDamage,n; Adds n% reduction to received misc damage - -Heal ----- -bonus bHealPower,n; Increase heal amount of all heal skills by n% -bonus bHealPower2,n; Increase heal amount if you are healed by any skills by n% - -bonus2 bSkillHeal,sk,n; Increase heal amount of skill sk by n% -bonus2 bSkillHeal2,sk,n; Increase heal amount if you are healed by skill sk by n% - -bonus bAddItemHealRate,n; Increases HP recovered by n% for healing items. -bonus2 bAddItemHealRate,id,n; Increases HP recovered by n% for item id/ig - -Skill Cast ----------- -bonus bCastrate,n; Skill casting time rate + n% -bonus2 bCastrate,sk,n; Adjust casting time of skill sk by n% - -bonus bFixedCastrate,n; Increases fixed cast time of all skills by n% -bonus2 bFixedCastrate,s,n; Increases fixed cast time of skill sk by n% -bonus bFixedCast,t; Increases fixed cast time of all skills by t milliseconds -bonus2 bSkillFixedCast,sk,t; Increases fixed cast time of skill sk by t milliseconds - -bonus bVariableCastrate,n; Increases variable cast time of all skills by n% -bonus2 bVariableCastrate,sk,n; Increases variable cast time of skill sk by n% -bonus bVariableCast,t; Increases variable cast time of all skills by t milliseconds -bonus2 bSkillVariableCast,sk,t; Increases variable cast time of skill sk by t milliseconds - -bonus bNoCastCancel,n; Prevents casting from being interrupted when hit (does not work in GvG | n is meaningless) -bonus bNoCastCancel2,n; Prevents casting from being interrupted when hit (works even in GvG | n is meaningless) - -bonus bDelayrate,n; Increases skill delay by n% -bonus2 bSkillCooldown,sk,t; Increases cooldown of skill sk by t milliseconds - -============================= -| 3. Group-specific Bonuses | -============================= - -Damage Modifiers ----------------- -bonus2 bAddSize,s,n; +n% Physical damage against size s -bonus2 bMagicAddSize,s,n; +n% Magical damage against size s -bonus2 bSubSize,s,n; +n% Damage reduction against size s - -bonus2 bAddRaceTolerance,r,n; +n% tolerance against race r (Renewal Only) - -bonus2 bAddRace,r,n; +n% Physical damage against race r -bonus2 bMagicAddRace,n,x; +n% Magical damage against race r -bonus2 bSubRace,r,n; +n% Damage reduction against race r - -bonus2 bAddRace2,mr,n; +n% Damage Against monster race mr -bonus2 bSubRace2,mr,n; +n% Damage reduction against monster race mr - -bonus2 bAddEle,e,n; +n% Physical damage against element e -bonus2 bMagicAddEle,e,n; +n% Magical damage against element e -bonus2 bMagicAtkEle,e,n; Increases damage of element e magic by n% -bonus3 bAddEle,e,n,bf; +n% physical damage against element e -bonus2 bSubEle,e,n; +n% Damage reduction against element e -bonus3 bSubEle,e,n,bf; +n% Damage reduction against element e. - -bonus2 bAddDamageClass,c,x; +n% extra physical damage against monsters of class c -bonus2 bAddMagicDamageClass,c,x; +n% extra magical damage against monsters of class c -bonus2 bAddDefClass,c,x; +n% physical damage reduction against monsters of class c -bonus2 bAddMDefClass,c,x; +n% magical damage reduction against monsters of class c -bonus2 bCriticalAddRace,r,n; +n Critical Against race r - -Attack/Def ----------- -bonus bAtkEle,e; Gives the player's attacks element e -bonus bDefEle,e; Gives the player's defense element e - -bonus bDefRatioAtkEle,e; Deals more damage to enemies of element e with higher defense -bonus bDefRatioAtkRace,r; Deals more damage to enemies of race r with higher defense - -bonus4 bSetDefRace,r,n,t,y; Set DEF to y of an enemy of race r at n/100% for t milliseconds with normal attack -bonus4 bSetMDefRace,r,n,t,y; Set MDEF to y of an enemy of race r at n/100% for t milliseconds with normal attack - -Ignore Def ----------- -bonus bIgnoreDefRace,r; Disregard DEF against enemies of race r -bonus bIgnoreMDefRace,r; Disregard MDEF against enemies of race r - -bonus bIgnoreDefEle,e; Disregard DEF against enemies of element e -bonus bIgnoreMDefEle,e; Disregard MDEF against enemies of element e - -bonus2 bIgnoreDefRate,r,n; Disregard n% of the target's DEF if the target belongs to race r -bonus2 bIgnoreMdefRate,r,n; Disregard n% of the target's MDEF if the target belongs to race r - -bonus bIgnoreMdefRate,n; Disregard n% of the target's MDEF - -Experience ----------- -bonus2 bExpAddRace,r,n; +n% Experience from enemies of race r - -============================= -| 4. Status-related Bonuses | -============================= -bonus2 bResEff,e,n; Adds a n/100% tolerance to effect e -bonus2 bAddEff,eff,n; Adds a n/100% chance to cause effect eff to the target when attacking -bonus2 bAddEff2,eff,n; Adds a n/100% chance to cause effect eff on self when attacking. -bonus3 bAddEff,eff,n,abf; Adds a n/100% chance to cause effect eff to the target when attacking for target abf -bonus4 bAddEff,eff,n,abf,t; Adds a n/100% chance to cause effect eff to the target when attacking for target abf for t milliseconds - (Note:The effect can't be avoided nor its duration reduced. Duration: 0-65535) -bonus3 bAddEffOnSkill,sk,eff,n; Adds a n/100% chance to cause effect eff on enemy when using skill sk -bonus4 bAddEffOnSkill,sk,eff,n,abf; Adds a n/100% chance to cause effect eff when using skill sk - -bonus2 bAddEffWhenHit,eff,n; n/100% chance to cause effect eff to the enemy when being hit by physical damage -bonus3 bAddEffWhenHit,eff,n,abf; Adds a n/100% chance to cause effect eff to the enemy when being hit by physical damage - -bonus2 bWeaponComaRace,r,n; Adds a n/100% chance to cause Coma when attacking a monster of race r with a weapon attack -bonus2 bWeaponComaEle,e,n; Adds a n/100% chance to cause Coma when attacking a monster of element e with weapon attack - -======================== -| 5. AutoSpell Bonuses | -======================== -NOTES: - - For all AutoSpell bonuses, target must be within the spell's range to go off. - - By default, AutoSpell skills are casted on target unless it is a self or support skill (inf = 4/16). - -bonus4 bAutoSpellOnSkill,sk,x,y,n; Adds a n/10% chance to autospell skill x at level y when using skill sk -bonus5 bAutoSpellOnSkill,sk,x,y,n,i; Adds a n/10% chance to autospell skill x at level y when using skill sk - i: Flags (bitfield) - &1: Forces the skill to be casted on self, rather than on the target of skill sk - &2: Random skill level between 1 and l is chosen. - -bonus4 bAutoSpell,sk,y,n,i; n/10% chance to cast skill sk of level y when attacking -bonus5 bAutoSpell,sk,y,n,bf,i; n/10% chance to cast skill sk of level y when attacking -bonus4 bAutoSpellWhenHit,sk,y,n,i; n/10% chance to cast skill sk of level y when being hit by a direct attack -bonus5 bAutoSpellWhenHit,sk,y,n,bf,i; n/10% chance to cast skill sk of level y when being hit by a direct attack - i: - 0 = cast on self - 1 = cast on enemy, not on self - 2 = use random skill lv in [1..y] - 3 = 1+2 (random lv on enemy) - -bonus3 bAutoSpellWhenHit,sk,x,n; n/10% chance to cast skill sk of level x on attacker when being hit by a direct attack -bonus3 bAutoSpell,sk,x,n; Auto Spell casting on attack of spell sk at level x with n/10% chance - -=================== -| 6. Misc Bonuses | -=================== - -HP/SP Drain ------------ -bonus bHPDrainValue,n; Heals +n HP with weapon attack. -bonus2 bHPDrainValue,n,x; Heals +n HP with weapon attack. When x is non-zero, the HP is drained instead. -bonus2 bHPDrainRate,n,x; n/10% probability to drain x% HP when attacking - -bonus bSPDrainValue,n; When hitting a monster by physical attack, you gain n SP -bonus2 bSPDrainRate,n,x; n/10% probability to drain x% SP when attacking -bonus2 bSPDrainValue,n,x; When hitting a monster by physical attack - x: - 0: Gain n SP - 1: drain n SP from target -bonus3 bSPDrainRate,n,x,y; When attacking there is a n/10% chance to either gain SP equivalent to x% of damage dealt, - OR drain the amount of sp from the enemy. - y: - 0: Gain SP - 1: Drain SP from target - -bonus2 bHPDrainValueRace,r,n; Heals +n HP when attacking a monster of race r with weapon attack. -bonus2 bSPDrainValueRace,r,n; Heals +n SP when attacking a monster of race r with weapon attack. - -bonus3 bHPDrainRateRace,r,n,x; Adds a n/10% chance to receive x% of damage dealt as HP from a monster of race r with weapon attack. -bonus3 bSPDrainRateRace,r,n,x; Adds a n/10% chance to receive x% of damage dealt as SP from a monster of race r with weapon attack. - -HP/SP Vanish ------------- -bonus2 bSPVanishRate,n,x; Add the (n/10)% chance of decreasing enemy SP amount by x% when attacking -bonus3 bSPVanishRate,n,x,bf; Add the (n/10)% chance of decreasing enemy SP amount by x% when attacking for criteria bf - -HP/SP Gain ----------- -bonus bHPGainValue,n; When killing a monster by physical attack, you gain n HP -bonus bSPGainValue,n; When killing a monster by physical attack, you gain n SP - -bonus bMagicHPGainValue,n; Gains +n HP when killing an enemy with magic attack -bonus bMagicSPGainValue,n; Gains +n SP when killing an enemy with magic attack - -bonus2 bHPGainRaceAttack,r,n; Heals n HP when attacking Race r on every hit -bonus2 bSPGainRaceAttack,r,n; Heals n SP when attacking Race r on every hit - -bonus2 bSPGainRace,r,n; When killing a monster of race r by physical attack gain n SP - -Damage return -------------- -bonus bMagicDamageReturn,n; Adds a n% chance to reflect targetted magic spells back to the enemy that caused it -bonus bShortWeaponDamageReturn,n; Reflects n% of received melee damage back to the enemy that caused it -bonus bLongWeaponDamageReturn,n; Reflects n% of received ranged damage back to the enemy that caused it - -Strip/Break equipment ---------------------- -NOTE: - - n is meaningless if not mentioned. -bonus bUnstripable,n; Equipment cannot be taken off via strip skills -bonus bUnstripableWeapon,n; Weapon cannot be taken off via Strip skills -bonus bUnstripableArmor,n; Armor cannot be taken off via Strip skills -bonus bUnstripableHelm,n; Helm cannot be taken off via Strip skills -bonus bUnstripableShield,n; Shield cannot be taken off via Strip skills - -bonus bUnbreakable,n; Reduces the break chance of all equipped equipment by n%. -bonus bUnbreakableGarment,n; Garment cannot be damaged/broken by any means -bonus bUnbreakableWeapon,n; Weapon cannot be damaged/broken by any means -bonus bUnbreakableArmor,n; Armor cannot be damaged/broken by any means -bonus bUnbreakableHelm,n; Helm cannot be damaged/broken by any means -bonus bUnbreakableShield,n; Shield cannot be damaged/broken by any means -bonus bUnbreakableShoes,n; Shoes cannot be damaged/broken by any means - -bonus bBreakWeaponRate,n; Adds a n/100% chance to break enemy's weapon while attacking (Stackable) -bonus bBreakArmorRate,n; Adds a n/100% chance to break enemy's armor while attacking (Stackable) - -Monster Related ---------------- -bonus3 bAddClassDropItem,id,c,n; Adds a n/100% chance of dropping item id when killing monster mid - -bonus2 bAddMonsterDropItem,id,n; Adds a n/100% chance for item id to be dropped, when killing any monster. -bonus3 bAddMonsterDropItem,id,r,n; Adds a n/100% chance for item id to be dropped, when killing any monster of race r. - If 'n' is negative value, then it's a part of formula - chance = -y*(killed_mob_level/10)+1 - -bonus bAddMonsterDropChainItem,ic; Able to get Item of chain ic when you kill a monster -bonus2 bAddMonsterDropChainItem,ic,r; Able to get item of chain ic when you kill a monster of race r - -bonus2 bGetZenyNum,x,n; When killing a monster, there is a n% chance of gaining 1~x zeny (only the highest among all is applied). -bonus2 bAddGetZenyNum,x,n; When killing a monster, there is a n% chance of gaining 1~x zeny (Stackable) - x: - < 0: Max Zeny gain is (-x*monster_level) - -Misc effects ------------- -skill i,n; Gives skill #i at level n - -bonus bDoubleRate,n; Double Attack probability +n% (works with all weapons | only the highest among all is applied) -bonus bDoubleAddRate,n; Double Attack probability +n% (works with all weapons) - -bonus bSplashRange,n; Splash attack radius +n (highest is applied) -bonus bSplashAddRange,n; Splash attack radius + n (e.g. n=1 makes a 3*3 cells area, n=2 a 5*5 area, etc) - n: - 1: 3*3 Area - 2: 5*5 Area - ... - -bonus bClassChange,n; Gives a n/100% chance to change the attacked monster's class with normal attack. -bonus bAddStealRate,n; n/100% increase to Steal skill success chance -bonus bRestartFullRecover,n; When reviving, HP and SP are fully healed -bonus bNoSizeFix,n; The attack revision with the size of the monster is not received -bonus bNoGemStone,n; Skills requiring Gemstones do no require them (Hocus Pocus will still require 1 Yellow Gemstone) -bonus bIntravision,n; Always see Hiding and Cloaking players/mobs - n: is meaningless - -bonus2 bAddSkillBlow,sk,n; Knockbacks the target by n cells when using skill sk -bonus bNoKnockback,n; Character is no longer knocked back by enemy skills with such effect (n is meaningless) - -bonus bPerfectHide,n; Hidden/cloaked character is no longer detected by monsters with 'detector' mode (n is meaningless). diff --git a/doc/item_db.txt b/doc/item_db.txt deleted file mode 100644 index 6b34b8daf..000000000 --- a/doc/item_db.txt +++ /dev/null @@ -1,309 +0,0 @@ -//===== Hercules Documentation =============================== -//= Item Database -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20120904 -//===== Description: ========================================= -//= Explanation of the item_db.conf file and structure. -//============================================================ - -item_db: ( -{ - // =================== Mandatory fields =============================== - Id: ID (int) - AegisName: "Aegis_Name" (string, optional if Inherit: true) - Name: "Item Name" (string, optional if Inherit: true) - // =================== Optional fields ================================ - Type: Item Type (int, defaults to 3 = etc item) - Buy: Buy Price (int, defaults to Sell * 2) - Sell: Sell Price (int, defaults to Buy / 2) - Weight: Item Weight (int, defaults to 0, units in Weight/10 ) - Atk: Attack (int, defaults to 0) - Matk: Magical Attack (int, defaults to 0, ignored in pre-re) - Def: Defense (int, defaults to 0) - Range: Attack Range (int, defaults to 0) - Slots: Slots (int, defaults to 0) - Job: Job mask (int, defaults to all jobs = 0xFFFFFFFF) - Upper: Upper mask (int, defaults to any = 0x3f) - Gender: Gender (int, defaults to both = 2) - Loc: Equip location (int, required value for equipment) - WeaponLv: Weapon Level (int, defaults to 0) - EquipLv: Equip required level (int, defaults to 0) - EquipLv: [min, max] (alternative syntax with min / max level) - Refine: Refineable (boolean, defaults to true) - View: View ID (int, defaults to 0) - BindOnEquip: true/false (boolean, defaults to false) - BuyingStore: true/false (boolean, defaults to false) - Delay: Delay to use item (int, defaults to 0) - KeepAfterUse: true/false (boolean, defaults to false) - Trade: { (defaults to no restrictions) - override: GroupID (int, defaults to 100) - nodrop: true/false (boolean, defaults to false) - notrade: true/false (boolean, defaults to false) - partneroverride: true/false (boolean, defaults to false) - noselltonpc: true/false (boolean, defaults to false) - nocart: true/false (boolean, defaults to false) - nostorage: true/false (boolean, defaults to false) - nogstorage: true/false (boolean, defaults to false) - nomail: true/false (boolean, defaults to false) - noauction: true/false (boolean, defaults to false) - } - Nouse: { (defaults to no restrictions) - override: GroupID (int, defaults to 100) - sitting: true/false (boolean, defaults to false) - } - Stack: [amount, flag] (int, defaults to 0) - Sprite: SpriteID (int, defaults to 0) - Script: <" - Script - (it can be multi-line) - "> - OnEquipScript: <" OnEquip Script (can also be multi-line) "> - OnUnequipScript: <" OnUnequip Script (can also be multi-line) "> - // =================== Optional fields (item_db2 only) ================ - Inherit: true/false (boolean, if true, inherit the values - that weren't specified, from item_db.conf, - else override it and use default values) -}, -... -) - -Id: Item id - -AegisName: Server name to reference the item in scripts and lookups, - should use no spaces. - -Name: Name in English for displaying as output for @ and script commands. - -Type: - 0 Healing item. - 2 Usable item. - 3 Etc item - 4 Weapon - 5 Armor/Garment/Boots/Headgear - 6 Card - 7 Pet egg - 8 Pet equipment - 10 Ammo (Arrows/Bullets/etc) - 11 Usable with delayed consumption (item is lost from inventory - after selecting a target, for use with skills and pet lures) - 18 Another delayed consume that requires user confirmation before - using item. - -Buy: Default buying price. When not specified, becomes double the sell price. - -Sell: Default selling price. When not specified, becomes half the buy price. - -Weight: Item's weight. Each 10 is 1 weight. When not specified, becomes 0. - -Atk: Weapon's attack. When not specified, becomes 0. - -Matk: Weapon's magical attack (only used in renewal mode, ignored in - pre-renewal). When not specified, becomes 0. - -Def: Armor's defense. When not specified, becomes 0. - -Range: Weapon's attack range. When not specified, becomes 0. - -Slots: Amount of slots the item possesses. When not specified, becomes 0. - -Job: Equippable jobs. Uses the following bitmask table: - - (S.) Novice (2^00): 0x00000001 - Swordman (2^01): 0x00000002 - Magician (2^02): 0x00000004 - Archer (2^03): 0x00000008 - Acolyte (2^04): 0x00000010 - Merchant (2^05): 0x00000020 - Thief (2^06): 0x00000040 - Knight (2^07): 0x00000080 - Priest (2^08): 0x00000100 - Wizard (2^09): 0x00000200 - Blacksmith (2^10): 0x00000400 - Hunter (2^11): 0x00000800 - Assassin (2^12): 0x00001000 - Unused (2^13): 0x00002000 - Crusader (2^14): 0x00004000 - Monk (2^15): 0x00008000 - Sage (2^16): 0x00010000 - Rogue (2^17): 0x00020000 - Alchemist (2^18): 0x00040000 - Bard/Dancer (2^19): 0x00080000 - Unused (2^20): 0x00100000 - Taekwon (2^21): 0x00200000 - Star Gladiator (2^22): 0x00400000 - Soul Linker (2^23): 0x00800000 - Gunslinger (2^24): 0x01000000 - Ninja (2^25): 0x02000000 - Gangsi (2^26): 0x04000000 - Death Knight (2^27): 0x08000000 - Dark Collector (2^28): 0x10000000 - Kagerou/Oboro (2^29): 0x20000000 - Rebellion (2^30): 0x40000000 - Some other commonly used values: - All except novice: 0xFFFFFFFE - All (default value): 0xFFFFFFFF - -Upper: Equippable upper-types. Uses the following bitmasks: - Normal jobs: 0x01 (1) - Upper jobs: 0x02 (2) - Baby jobs: 0x04 (4) - Third jobs: 0x08 (8) - Upper Third jobs: 0x10 (16) - Baby Third jobs: 0x20 (32) - - Under pre-re mode third classes are considered upper, making use of - the 8 and above masks is therefore not necessary unless in renewal - mode. When no value is specified, all classes (mask 0x3f) are able to - equip the item. - -Gender: Gender restriction. 0 is female, 1 is male, 2 for both (default value). - -Loc: Equipment's placement. A value needs to be specified if the item is an - equipment piece. Values are: - - 2^0 001 = Lower Headgear - 2^1 002 = Weapon - 2^2 004 = Garment - 2^3 008 = Accessory 1 - 2^4 016 = Armor - 2^5 032 = Shield - 2^6 064 = Footgear - 2^7 128 = Accessory 2 - 2^8 256 = Upper Headgear - 2^9 512 = Middle Headgear - 2^10 1024 = Costume Top Headgear - 2^11 2048 = Costume Mid Headgear - 2^12 4096 = Costume Low Headgear - 2^13 8192 = Costume Garment/Robe - 2^16 65536 = Shadow Armor - 2^17 131072 = Shadow Weapon - 2^18 262144 = Shadow Shield - 2^18 524288 = Shadow Shoes - 2^20 1048576 = Shadow Accessory 2 - 2^21 2097152 = Shadow Accessory 1 - -WeaponLv: Weapon level. Becomes 0 when not specified. - -EquipLv: Base level required to be able to equip. It is possible to specify - two values, if an item has a maximum level, by using the following - syntax: - - EquipLv: [minLv, maxLv] - - If only one value is specified, maxLv becomes the current server's - MAX_LEVEL. If no values are specified, minLv becomes 0. - -Refineable: true if the item can be refined, false otherwise. If no value is - specified, it defaults to true. - -View: For normal items, defines a replacement view-sprite for the item (eg: - Making apples look like apple juice). The special case are weapons - and ammo where this value indicates the weapon-class of the item. - - For weapons, the types are: - 0: bare fist - 1: Daggers - 2: One-handed swords - 3: Two-handed swords - 4: One-handed spears - 5: Two-handed spears - 6: One-handed axes - 7: Two-handed axes - 8: Maces - 9: Unused - 10: Staves - 11: Bows - 12: Knuckles - 13: Musical Instruments - 14: Whips - 15: Books - 16: Katars - 17: Revolvers - 18: Rifles - 19: Gatling guns - 20: Shotguns - 21: Grenade launchers - 22: Fuuma Shurikens - - For ammo, the types are: - 1: Arrows - 2: Throwable daggers - 3: Bullets - 4: Shells - 5: Grenades - 6: Shuriken - 7: Kunai - 8: Cannonballs - 9: Throwable Items (Sling Item) - -BindOnEquip: Whether the item will automatically bind to the character when it - is equipped for the first time. An item that has this field set, - will display a confirmation dialog the first time it is equipped, - and, if accepted, the item will become character-bound. - -BuyingStore: Whether the item can be sold via buyingstore, one must also edit - data\buyingstoreitemlist.txt for client to accept item. - -Delay: Delay for an item to be used again. Value is in milliseconds. - There is a max concurrent number of entries modifiable in - src/map/itemdb.h as MAX_ITEMDELAYS. - -Trade: Item trade restrictions. If this block is omitted, the item will have no - trade restrictions. - All the settings in this group are boolean values, unless otherwise - specified. Default value is false (restriction not set) for any missing - setting. - - Allowed settings in this block are: - override: If specified and in the interval [1:100], sets the - minimum GM Group ID that can bypass the defined trade - restrictions. This is an integer value. - nodrop: Item can't be dropped. - notrade: Item can't be traded (nor vended). - partneroverride: Wedded partners can override the notrade setting. - noselltonpc: Item can't be sold to NPCs. - nocart: Item can't be placed in the cart. - nostorage: Item can't be placed in the storage. - nogstorage: Item can't be placed in the guild storage. - nomail: Item can't be attached to mail messages. - noauction: Item can't be auctioned. - -Nouse: Defines if an item cannot be used under certain circumstances. If this - block is omitted, there will be no usage restrictions. - All the settings in this group are boolean values, unless otherwise - specified. Default value is false (restriction not set) for any missing - setting. - - Allowed settings in this block are: - override: If specified and in the interval [1:100], sets the - minimum GM Group ID that can bypass the defined usage - restrictions. This is an integer value. - sitting: Item can't be used while sitting. - -Stack: Prevents an item to be stacked more than x times in given - inventory types. Generally used by 3rd class related skill items. - Syntax: [amount, type] - Available types: - 1: Character inventory restriction - 2: Character cart restriction - 4: Account storage restriction - 8: Guild storage restriction - Note: Stack limit of 0 will disable a restriction. - -Sprite: SpriteID will be sent to the client instead of ItemID. - NOTE: Replaces an item client-side while keeping them separate server-side. - Think of it as a way to disguise items. - -Script: Script to execute when the item is used/equipped. - -OnEquipScript: Script to execute when the item is equipped. - Warning, not all item bonuses will work here as expected. - -OnUnequipScript: Script to execute when the item is unequipped. - Warning, not all item bonuses will work here as expected. - -Inherit: This can be used only in item_db2.conf, and if set to true, and the - item already exists in item_db.conf, all the missing fields will be - inherited from there rather than using their default values. diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt deleted file mode 100644 index 08abf800d..000000000 --- a/doc/mob_db_mode_list.txt +++ /dev/null @@ -1,110 +0,0 @@ -//===== Hercules Documentation =============================== -//= Hercules Monster Modes Reference -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20120630 -//===== Description: ========================================= -//= A reference description of Hercules' mob_db 'mode' field. -//============================================================ - -Bit Legend: -------------------------------------------------------------------------------- - -MD_CANMOVE | 0x0001 | 1 -MD_LOOTER | 0x0002 | 2 -MD_AGGRESSIVE | 0x0004 | 4 -MD_ASSIST | 0x0008 | 8 -MD_CASTSENSOR_IDLE | 0x0010 | 16 -MD_BOSS | 0x0020 | 32 -MD_PLANT | 0x0040 | 64 -MD_CANATTACK | 0x0080 | 128 -MD_DETECTOR | 0x0100 | 256 -MD_CASTSENSOR_CHASE | 0x0200 | 512 -MD_CHANGECHASE | 0x0400 | 1024 -MD_ANGRY | 0x0800 | 2048 -MD_CHANGETARGET_MELEE | 0x1000 | 4096 -MD_CHANGETARGET_CHASE | 0x2000 | 8192 -MD_TARGETWEAK | 0x4000 | 16384 -MD_RANDOMTARGET | 0x8000 | 32768 (not implemented) - -Explanation for modes: -------------------------------------------------------------------------------- - -CanMove: Enables the mob to move/chase characters. - -CanAttack: Enables the mob to attack/retaliate when you are within attack - range. Note that this only enables them to use normal attacks, skills are - always allowed. - -Looter: The mob will loot up nearby items on the ground when it's on idle state. - -Aggressive: normal aggressive mob, will look for a close-by player to attack. - -Assist: When a nearby mob of the same class attacks, assist types will join them. - -Cast Sensor Idle: Will go after characters who start casting on them if idle - or walking (without a target). - -Cast Sensor Chase: Will go after characters who start casting on them if idle - or chasing other players (they switch chase targets) - -Boss: Special flag which makes mobs immune to certain status changes and skills. - -Plant: Always receives 1 damage from attacks. - -Detector: Enables mob to detect and attack characters who are in hiding/cloak. - -ChangeChase: Allows chasing mobs to switch targets if another player happens - to be within attack range (handy on ranged attackers, for example) - -Angry: These mobs are "hyper-active". Apart from "chase"/"attack", they have - the states "follow"/"angry". Once hit, they stop using these states and use - the normal ones. The new states are used to determine a different skill-set - for their "before attacked" and "after attacked" states. Also, when - "following", they automatically switch to whoever character is closest. - -Change Target Melee: Enables a mob to switch targets when attacked while - attacking someone else. - -Change Target Chase: Enables a mob to switch targets when attacked while - chasing another character. - -Target Weak: Allows aggressive monsters to only be aggressive against - characters that are five levels below it's own level. - For example, a monster of level 104 will not pick fights with a level 99. - -Random Target: Picks a new random target in range on each attack / skill. - (not implemented) - -Aegis Mob Types: -------------------------------------------------------------------------------- - -What Aegis has are mob-types, where each type represents an AI behavior that -is mimicked by a group of eA mode bits. This is the table to convert from one -to another: - -Aegis/eA (description) -01: 0x0081 (passive) -02: 0x0083 (passive, looter) -03: 0x1089 (passive, assist and change-target melee) -04: 0x3885 (angry, change-target melee/chase) -05: 0x2085 (aggressive, change-target chase) -06: 0x0000 (passive, immobile, can't attack) [plants] -07: 0x108B (passive, looter, assist, change-target melee) -08: 0x6085 (aggressive, change-target chase, target weak enemies) -09: 0x3095 (aggressive, change-target melee/chase, cast sensor idle) [Guardian] -10: 0x0084 (aggressive, immobile) -11: 0x0084 (aggressive, immobile) [Guardian] -12: 0x2085 (aggressive, change-target chase) [Guardian] -13: 0x308D (aggressive, change-target melee/chase, assist) -17: 0x0091 (passive, cast sensor idle) -19: 0x3095 (aggressive, change-target melee/chase, cast sensor idle) -20: 0x3295 (aggressive, change-target melee/chase, cast sensor idle/chase) -21: 0x3695 (aggressive, change-target melee/chase, cast sensor idle/chase, chase-change target) -25: 0x0001 (passive, can't attack) [Pet] -26: 0xB695 (aggressive, change-target melee/chase, cast sensor idle/chase, chase-change target, random target) -27: 0x8084 (aggressive, immobile, random target) - -- Note that the detector bit due to being Insect/Demon, plant and Boss mode - bits need to be added independently of this list. diff --git a/doc/permissions.txt b/doc/permissions.txt deleted file mode 100644 index a656f8bcf..000000000 --- a/doc/permissions.txt +++ /dev/null @@ -1,39 +0,0 @@ -//===== Hercules Documentation =============================== -//= Permission List -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131031 -//===== Description: ========================================= -//= Player group permissions, configured in /conf/groups.conf. -//============================================================ - -can_trade : Ability to trade or otherwise distribute items (drop, storage, vending etc...). -can_party : Ability to join parties. -all_skill : Ability to use all skills. -all_equipment : Ability to equip anything (can cause client errors). -skill_unconditional : Ability to use skills without meeting the required conditions (SP, items, etc...). -join_chat : Ability to join a password protected chatrooms. -kick_chat : Protection from being kicked from a chat. -hide_session : Hides player session from being displayed by @commands. -who_display_aid : Ability to see GMs and Account/Char IDs in the @who command. -hack_info : Ability to receive all informations about any player that try to hack, spoof a name, etc. -any_warp : Ability to bypass nowarp, nowarpto, noteleport and nomemo mapflags. - This option is mainly used in commands which modify a character's - map/coordinates (like @memo, @mapmove, @go, @jump, etc...). -view_hpmeter : Ability to see HP bar of every player. -view_equipment : Ability to view players equipment regardless of their setting. -use_check : Ability to use client command /check (display character status). -use_changemaptype : Ability to use client command /changemaptype. -all_commands : Ability to use all atcommands and charcommands. -receive_requests : Ability to receive @requests. -show_bossmobs : Ability to see boss mobs with @showmobs. -disable_pvm : Ability to disable Player vs. Monster. -disable_pvp : Ability to disable Player vs. Player. -disable_commands_when_dead : Ability to disable @command usage when dead. -can_trade_bound: Ability to trade or otherwise distribute bound items (drop, storage, vending etc...). -hchsys_admin : Hercules Chat System Admin (Ability to modify channel settings regardless of ownership and join password-protected channels without requiring a password.) -disable_pickup: Ability to disable the player from picking up any item from ground, they can still receive items picked up by others means like party share píck. -disable_exp: Ability to disable the player from gaining any experience point. -disable_store: Ability to disable the player from using/openning npc and player stores. -disable_skill_usage: Ability to disable the player from using any skill. diff --git a/doc/sample/bank_test.txt b/doc/sample/bank_test.txt deleted file mode 100644 index 5cdf319ca..000000000 --- a/doc/sample/bank_test.txt +++ /dev/null @@ -1,80 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Bank Test -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Contains commands needed for a basic bank. -//============================================================ - -prontera,162,188,1 script Bank Test 4_F_KAFRA6,{ - cutin "kafra_06",2; - - mes "[Bank Test]"; - mes "Welcome to Prontera's Bank Test."; - mes "You can only deposit a minimal of"; - mes "1000z. What do you want to do?"; - next; - switch (select("Deposit","Withdraw","Exit")) { - case 1: - mes "[Bank Test]"; - mes "How much do you want to deposit?"; - next; - input .@kafrabank; - - if (.@kafrabank < 1000) { - mes "[Bank Test]"; - mes "The minimum deposit is 1000z"; - next; - break; - } - if (.@kafrabank > Zeny) { - mes "[Bank Test]"; - mes "You don't have enough money."; - next; - break; - } - Zeny -= .@kafrabank; - #kafrabank += .@kafrabank; - mes "[Bank Test]"; - mes "You now have ^135445" + Zeny + "z^000000"; - mes "and your bank account ^135445" + #kafrabank + "z^000000"; - next; - break; - case 2: - if (#kafrabank == 0) { - mes "[Bank Test]"; - mes "Your bank account is currently empty, you can't withdraw."; - next; - break; - } - mes "[Bank Test]"; - mes "Current balance: ^135445" + #kafrabank + "^000000z"; - mes "How much do you want to withdraw?"; - next; - input .@kafrabank; - - if (.@kafrabank < 1) - break; - if (.@kafrabank > #kafrabank) { - mes "[Bank Test]"; - mes "You can't withdraw more than ^135445"+ #kafrabank + "^000000z."; - next; - break; - } - #kafrabank -= .@kafrabank; - Zeny += .@kafrabank; - mes "[Bank Test]"; - mes "You now have ^135445" + Zeny + "z^000000"; - mes "and your bank account ^135445" + #kafrabank + "z^000000"; - next; - break; - case 3: - break; - } - - mes "Good bye!"; - cutin "kafra_06",255; - close; -} diff --git a/doc/sample/basejob_baseclass_upper.txt b/doc/sample/basejob_baseclass_upper.txt deleted file mode 100644 index 80cc23fc7..000000000 --- a/doc/sample/basejob_baseclass_upper.txt +++ /dev/null @@ -1,18 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Class Constants -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Outputs the values of class constants. -//============================================================ - -prontera,155,177,1 script Tell Me 4_F_JOB_ASSASSIN,{ - mes "[Tell Me]"; - mes "Class: " + Class; - mes "BaseClass: " + BaseClass; - mes "BaseJob: " + BaseJob; - mes "Upper: " + Upper; - close; -} diff --git a/doc/sample/checkoption.txt b/doc/sample/checkoption.txt deleted file mode 100644 index 77c0a3105..000000000 --- a/doc/sample/checkoption.txt +++ /dev/null @@ -1,19 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Checkoption -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates the 'checkoption' command. -//============================================================ - -prontera,156,89,6 script test_checkoption 4_F_KAFRA1,{ - mes "Please enter a value of type!"; - input .@value; - if(checkoption(.@value) == 1) - mes "True!"; - else if(checkoption(.@value) == 0) - mes "False!"; - close; -} diff --git a/doc/sample/delitem2.txt b/doc/sample/delitem2.txt deleted file mode 100644 index 46e3e42c7..000000000 --- a/doc/sample/delitem2.txt +++ /dev/null @@ -1,39 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Delitem2 -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates the 'delitem2' command. -//============================================================ - -prontera,160,182,5 script Delitem2 1_M_BARD,{ - mes "Item ID?"; - next; - input .@nameid; - mes "Amount?"; - next; - input .@amount; - mes "Identified? (0:no, 1:yes)"; - next; - input .@iden; - mes "Refined how many times?"; - next; - input .@ref; - mes "Attribute? (0:normal, 1:broken)"; - next; - input .@attr; - mes "4 cards (one after another)..."; - next; - input .@c1; - input .@c2; - input .@c3; - input .@c4; - mes "Your command is:"; - mes "delitem2 "+.@nameid+","+.@amount+","+.@iden+","+.@ref+","+.@attr+","+.@c1+","+.@c2+","+.@c3+","+.@c4; - next; - delitem2 .@nameid,.@amount,.@iden,.@ref,.@attr,.@c1,.@c2,.@c3,.@c4; - mes "And here is the moment when your item should disappear! :P"; - close; -} diff --git a/doc/sample/getequipcardid.txt b/doc/sample/getequipcardid.txt deleted file mode 100644 index 8f7d7f27d..000000000 --- a/doc/sample/getequipcardid.txt +++ /dev/null @@ -1,26 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Getequipcardid -//===== By: ================================================== -//= Lupus -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates the 'getequipcardid' command. -//============================================================ - -prontera,155,177,4 script Check My Hat 1_M_SIGNROGUE,{ - mes "Checking your head..."; - if (getequipisequiped(1)) { - .@id = getequipid(1); - .@ref = getequiprefinerycnt(1); - mes "Your hat is... "+getitemname(.@id)+"..."; - if(.@ref) - mes "It has been refined "+.@ref+" times."; - mes "Card Slot 0:"+getequipcardid(1,0)+" 1:"+getequipcardid(1,1); - mes "Card Slot 2:"+getequipcardid(1,2)+" 3:"+getequipcardid(1,3); - close; - } - mes "Nothing?"; - emotion e_hmm; - close; -} diff --git a/doc/sample/getequipid.txt b/doc/sample/getequipid.txt deleted file mode 100644 index 6543d7932..000000000 --- a/doc/sample/getequipid.txt +++ /dev/null @@ -1,16 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Getequipid -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates the 'getequipid' command. -//============================================================ - -prontera,161,181,6 script getequipid Sample 8W_SOLDIER,{ - mes "[GetEquipID Sample]"; - for (.@i = 1; .@i < 11; ++.@i) - mes "getequipid(" + .@i + ") : " + getequipid(1); - close; -} diff --git a/doc/sample/getiteminfo.txt b/doc/sample/getiteminfo.txt deleted file mode 100644 index 89f9a66b5..000000000 --- a/doc/sample/getiteminfo.txt +++ /dev/null @@ -1,23 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Getiteminfo -//===== By: ================================================== -//= Lupus -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates the 'getiteminfo' command. -//============================================================ - -prontera,156,179,6 script test_getiteminfo 4_F_KAFRA1,{ - mes "Please enter an item ID."; - input .@value; - - // This line uses an INTERNAL function of your client to show item name by its ID! - // ^nItemID^XXXX -> Item Name - mes "Item ID: "+.@value+" ^nItemID^"+.@value; - - mes "Current item info:"; - for (.@id = 0; .@id < 14; ++.@id) - mes " getiteminfo("+.@value+","+.@id+") = "+getiteminfo(.@value,.@id); - close; -} diff --git a/doc/sample/getmonsterinfo.txt b/doc/sample/getmonsterinfo.txt deleted file mode 100644 index 064f1fc71..000000000 --- a/doc/sample/getmonsterinfo.txt +++ /dev/null @@ -1,23 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Getmonsterinfo -//===== By: ================================================== -//= Lupus -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates the 'getmonsterinfo' command. -//============================================================ - -prontera,156,179,6 script test_getmonsterinfo 4_F_KAFRA1,{ - mes "Please enter a monster ID."; - input .@value; - if(getmonsterinfo(.@value,MOB_LV)<0 || getmonsterinfo(.@value,MOB_NAME)=="Dummy") { - mes "Invalid monster ID."; - close; - } - mes "Monster ID: "+.@value+" '"+getmonsterinfo(.@value,MOB_NAME)+"'"; - mes "Current Monster info:"; - for (.@id = 0; .@id < 23; ++.@id) - mes " getmonsterinfo("+.@value+","+@id+") = "+getmonsterinfo(.@value,@id); - close; -} diff --git a/doc/sample/gstorage_test.txt b/doc/sample/gstorage_test.txt deleted file mode 100644 index 8b1a1c0e6..000000000 --- a/doc/sample/gstorage_test.txt +++ /dev/null @@ -1,36 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Guild Storage Test -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Contains commands needed for a guild warehouse NPC. -//============================================================ - -prontera,165,188,4 script Guild Warehouse 4_F_KAFRA6,{ - cutin "kafra_06",2; - - mes "[Guild Warehouse Coupler]"; - mes "This is the guild warehouse coupler service."; - mes "You will not receive zeny for this is a test."; - next; - if (select("Access Guild Warehouse","Exit") != 1) { - mes "[Guild Warehouser]"; - mes "Come back whenever you want."; - cutin "kafra_06", 255; - close; - } - - .@flag = guildopenstorage; - if (.@flag == 1) { - mes "[Guild Warehouse]"; - mes "The guild warehouse is being used right now."; - mes "Please wait a while, then come back."; - } else if(.@flag == 2) { - mes "[Guild Warehouse]"; - mes "You can't use this service if you're not in a guild!"; - } - cutin "kafra_06",255; - close; -} diff --git a/doc/sample/localized_npc.txt b/doc/sample/localized_npc.txt deleted file mode 100644 index 82a08fa35..000000000 --- a/doc/sample/localized_npc.txt +++ /dev/null @@ -1,148 +0,0 @@ -//===== Hercules Script ====================================== -//= Sample localized NPC -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= v1.1 -//===== Description: ========================================= -//= Example of a localized NPC. -//= -//= There are many ways to do it, this is just one option. -//= The player has a global account variable ##_langid_ that -//= identifies the it's language. -//= -//= The default language should always have langid 0. -//= When a message isn't found for the player's langid -//= (strlen = 0), the message from langid 0 is used instead. -//= -//= Each message is identified by a string that must only -//= contain valid variable name characters. -//= -//= void setlang(int langid) -//= - sets the player's language -//= int getlang(void) -//= - returns the player's language -//= void setmes2(string name,int langid,string text) -//= - sets the localized text for name -//= string getmes2(string name,int langid) -//= - returns the localized text of name -//= void mes2(string name) -//= - displays the localized text of name -//= -//===== Additional Comments: ================================= -//= To use this globally, just put the functions in Global_Functions.txt -//============================================================ - -////////////////////////////////////////////////////////////// -/// Sets the language of the player account. -/// @param langid Languange identifier (0 for default) -function script setlang { - ##_langid_ = getarg(0); - return; -} - -////////////////////////////////////////////////////////////// -/// Returns the language identifier of the player -function script getlang { - return ##_langid_; -} - -////////////////////////////////////////////////////////////// -/// Sets a localized text entry. -/// Does not need a RID attached. -/// @param name Message identifier -/// @param langid Language identifier (0 for default) -/// @param text Text message -function script setmes2 { - .@mes2_name$ = getarg(0); - .@mes2_langid = getarg(1); - .@mes2_text$ = getarg(2); - .@mes2_var$ = "$@__"+ .@mes2_name$ +"_"+ .@mes2_langid +"$"; - - //debugmes "setmes2 \""+ .@mes2_var$ +"\", \""+ .@mes2_text$ +"\";"; - - // set the localized text - setd .@mes2_var$, .@mes2_text$; - return; -} - -////////////////////////////////////////////////////////////// -/// Sets a localized text entry. -/// Does not need a RID attached. -/// @param name Message identifier -/// @param langid Language identifier (0 for default) -/// @return Text message -function script getmes2 { - .@mes2_name$ = getarg(0); - .@mes2_langid = getarg(1); - .@mes2_var$ = "$@__"+ .@mes2_name$ +"_"+ .@mes2_langid +"$"; - .@mes2_text$ = getd(.@mes2_var$); - - //debugmes "getmes2(\""+ .@mes2_var$ +"\")=\""+ .@mes2_text$ +"\""; - - return .@mes2_text$; -} - -////////////////////////////////////////////////////////////// -/// mes for localized text. -/// index should be a unique string, made up only of characters -/// that are valis as a variable name -/// @param index Message identifier -function script mes2 { - .@mes2_index$ = getarg(0); - - if( getstrlen(.@mes2_index$) == 0 ) - return; // invalid index - - // print localized text - .@mes2_text$ = callfunc("getmes2",.@mes2_index$,##_langid_); - if( getstrlen(.@mes2_text$) == 0 ) { - if( ##_langid_ != 0 ) { - // revert to default language - .@mes2_text$ = callfunc("getmes2",.@mes2_index$,0); - if( getstrlen(.@mes2_text$) != 0 ) - mes .@mes2_text$; // default text - } - } else - mes .@mes2_text$; // localized text - return; -} - -////////////////////////////////////////////////////////////// -/// Sample localized NPC -prontera,155,183,4 script LocalizedNPC 4_M_GEF_SOLDIER,{ - // Get text for specific languages - .@menu1$ = callfunc("getmes2","LNPC_lang",0); - .@menu2$ = callfunc("getmes2","LNPC_lang",1); - do { - // get text that fallbacks to language 0 - callfunc "mes2", "LNPC_name"; - // localized mes - callfunc "mes2", "LNPC_lang"; - callfunc "mes2", "LNPC_text"; - next; - - switch(select(.@menu1$,.@menu2$,"Cancel")) - { - case 1: - case 2: - // Set player language - callfunc "setlang",@menu-1; - break; - } - } while( @menu != 3 ); - close; - end; - -OnInterIfInitOnce: - // Load the localized text. - // This can be anywhere, as long as it's executed before the coresponding getmes2/mes2 calls - // 0 - English (default) - // 1 - Portuguese - callfunc "setmes2", "LNPC_name", 0, "[LocalizedNPC]"; - callfunc "setmes2", "LNPC_lang", 0, "EN"; - callfunc "setmes2", "LNPC_lang", 1, "PT"; - callfunc "setmes2", "LNPC_text", 0, "Something in english"; - callfunc "setmes2", "LNPC_text", 1, "Algo em portugus"; - end; -} diff --git a/doc/sample/npc_dynamic_shop.txt b/doc/sample/npc_dynamic_shop.txt deleted file mode 100644 index 1e4ac77e4..000000000 --- a/doc/sample/npc_dynamic_shop.txt +++ /dev/null @@ -1,93 +0,0 @@ -//===== Hercules Script ====================================== -//= Sample: Dynamic Shop -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Contains commands needed for a dynamic shop. -//============================================================ - -// Dummy shop to insert items into: -- shop dyn_shop1 -1,501:50. - -prontera,181,200,4 script Dynamic Shop 2_F_MAGICMASTER,{ - callshop "dyn_shop1",0; - npcshopattach "dyn_shop1"; - end; - -OnSellItem: - for (.@i = 0; .@i < getarraysize(@sold_nameid); ++.@i) { - if(countitem(@sold_nameid[.@i]) < @sold_quantity[.@i] || @sold_quantity[.@i] <= 0) { - mes "omgh4x!"; - close; - } else if (@sold_nameid[.@i] == Red_Potion) { - delitem Red_Potion, @sold_quantity[.@i]; - $@rpotsleft += @sold_quantity[.@i]; - Zeny += @sold_quantity[.@i]*20; - } else if (@sold_nameid[.@i] == Orange_Potion){ - delitem Orange_Potion, @sold_quantity[.@i]; - $@opotsleft += @sold_quantity[.@i]; - Zeny += @sold_quantity[.@i]*100; - } else { - mes "Sorry, I don't need your items."; - close; - } - } - deletearray @sold_quantity, getarraysize(@sold_quantity); - deletearray @sold_nameid, getarraysize(@sold_nameid); - mes "Deal completed."; - close; - -OnBuyItem: - for (.@i = 0; .@i < getarraysize(@bought_nameid); ++.@i) { - if (@bought_quantity[.@i] <= 0) { - mes "omgh4x!"; - close; - } else if (@bought_nameid[.@i] == Red_Potion) { - if (@bought_quantity[.@i] > $@rpotsleft) { - if($@rpotsleft > 0) { - @bought_quantity[.@i] = $@rpotsleft; - } else { - mes "We are out of red potions!"; - close; - } - } - if(Zeny >= 40*@bought_quantity[.@i]) { - Zeny -= 40*@bought_quantity[.@i]; - getitem Red_Potion, @bought_quantity[.@i]; - $@rpotsleft -= @bought_quantity[.@i]; - } else { - mes "You have insufficient cash."; - close; - } - } else /*if (@bought_nameid[.@i] == Orange_Potion)*/ { - if(@bought_quantity[.@i] > $@opotsleft) { - if($@opotsleft > 0) { - @bought_quantity[.@i] = $@opotsleft; - } else { - mes "We are out of orange potions!"; - close; - } - } - if(Zeny >= 200*@bought_quantity[.@i]) { - Zeny -= 200*@bought_quantity[.@i]; - getitem Orange_Potion, @bought_quantity[.@i]; - $@opotsleft -= @bought_quantity[.@i]; - } else { - mes "You have insufficient cash."; - close; - } - } - } - deletearray @bought_quantity, getarraysize(@bought_quantity); - deletearray @bought_nameid, getarraysize(@bought_nameid); - mes "Trade done."; - close; - -OnInit: - npcshopitem "dyn_shop1", Red_Potion, 40, Orange_Potion, 200; - $@rpotsleft = 10; - $@opotsleft = 10; - end; -} diff --git a/doc/sample/npc_extend_shop.txt b/doc/sample/npc_extend_shop.txt deleted file mode 100644 index 31ed0af43..000000000 --- a/doc/sample/npc_extend_shop.txt +++ /dev/null @@ -1,351 +0,0 @@ -//===== Hercules Script ====================================== -//= Sample: Extended Shops -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= An example of shop NPCs. -//============================================================ - -prontera,182,213,3 trader Super Novice Shop 4_M_KID2,{ -OnInit: - sellitem Novice_Knife; - sellitem Novice_Guard; - sellitem Novice_Breast; - sellitem Novice_Plate; - sellitem Novice_Boots; - sellitem Novice_Hood; - sellitem Novice_Armlet; - sellitem Novice_Egg_Cap; -} -prontera,149,139,5 trader Whips Merchant 1_M_MERCHANT,{ -OnInit: - sellitem Rope_; - sellitem Line_; - sellitem Wire_; - sellitem Rante_; - sellitem Tail_; - sellitem Whip_; - sellitem Lariat; - sellitem Rapture_Rose; - sellitem Chemeti; -} -prontera,162,175,3 trader Headgears Merchant 1 1_F_MERCHANT_01,{ -OnInit: - sellitem Ribbon_; - sellitem Hair_Band; - sellitem Bandana; - sellitem Hat_; - sellitem Turban_; - sellitem Biretta_; - sellitem Cap_; - sellitem Gemmed_Sallet_; - sellitem Goggle_; - sellitem Helm_; -} -prontera,162,172,3 trader Headgears Merchant 2 1_F_MERCHANT_01,{ -OnInit: - sellitem Glasses; - sellitem Eye_Bandage; - sellitem Flu_Mask; - sellitem One_Eyed_Glass; - sellitem Granpa_Beard; - sellitem Luxury_Sunglasses; - sellitem Spinning_Eyes; - sellitem Gangster_Patch; - sellitem Ganster_Mask; - sellitem Eagle_Eyes; - sellitem Mr_Scream; - sellitem Masquerade; - sellitem Goblini_Mask; -} -prontera,162,169,3 trader Armours Merchant 1_F_MERCHANT_01,{ -OnInit: - sellitem Mink_Coat; - sellitem Padded_Armor_; - sellitem Chain_Mail_; - sellitem Plate_Armor_; - sellitem Clothes_Of_The_Lord; - sellitem Formal_Suit; - sellitem Silk_Robe_; - sellitem Scapulare_; - sellitem Saint_Robe_; - sellitem Holy_Robe; - sellitem Wooden_Mail_; - sellitem Tights_; - sellitem Mage_Coat; - sellitem Thief_Clothes_; - sellitem Ninja_Suit; - sellitem Full_Plate_Armor_; -} -prontera,162,166,3 trader Shields Merchant 1_F_MERCHANT_01,{ -OnInit: - sellitem Guard_; - sellitem Buckler_; - sellitem Shield_; - sellitem Mirror_Shield_; - sellitem Memorize_Book; - sellitem Holy_Guard; - sellitem Herald_Of_GOD; -} -prontera,162,163,3 trader Boots Merchant 1_F_MERCHANT_01,{ -OnInit: - sellitem Sandals_; - sellitem Shoes_; - sellitem Boots_; - sellitem Chrystal_Pumps; - sellitem Grave_; - sellitem Safty_Boots; -} -prontera,162,160,3 trader Robes Merchant 1_F_MERCHANT_01,{ -OnInit: - sellitem Hood_; - sellitem Muffler_; - sellitem Manteau_; - sellitem Cape_Of_Ancient_Lord; - sellitem Ragamuffin_Cape; - sellitem Clack_Of_Servival; -} -prontera,162,157,3 trader Accessory Merchant 1_F_MERCHANT_01,{ -OnInit: - sellitem Ring; - sellitem Earring; - sellitem Necklace; - sellitem Glove; - sellitem Brooch; - sellitem Clip; - sellitem Rosary; - sellitem Safety_Ring; - sellitem Critical_Ring; - sellitem Matyr's_Flea_Guard; - sellitem Thimble_Of_Archer; -} -prontera,162,154,3 trader Arrows Merchant 1_F_MERCHANT_01,{ -OnInit: - sellitem Arrow; - sellitem Silver_Arrow; - sellitem Fire_Arrow; - sellitem Steel_Arrow; - sellitem Crystal_Arrow; - sellitem Arrow_Of_Wind; - sellitem Stone_Arrow; - sellitem Immatrial_Arrow; - sellitem Stun_Arrow; - sellitem Freezing_Arrow; - sellitem Flash_Arrow; - sellitem Curse_Arrow; - sellitem Rusty_Arrow; - sellitem Poison_Arrow; - sellitem Incisive_Arrow; - sellitem Oridecon_Arrow; - sellitem Arrow_Of_Counter_Evil; - sellitem Arrow_Of_Shadow; - sellitem Sleep_Arrow; - sellitem Silence_Arrow; -} -prontera,162,151,3 trader Alchemist Shop 1_F_MERCHANT_01,{ -OnInit: - sellitem Alcol_Create_Book; - sellitem FireBottle_Create_Book; - sellitem Acid_Create_Book; - sellitem Plant_Create_Book; - sellitem Mine_Create_Book; - sellitem Coating_Create_Book; - sellitem Slim_Potion_Create_Book; - sellitem Normal_Potion_Book; - sellitem Medicine_Bowl; - sellitem Empty_Potion; -} -prontera,162,148,3 trader Taming Merchant 1_F_MERCHANT_01,{ -OnInit: - sellitem Unripe_Apple; - sellitem Orange_Juice; - sellitem Bitter_Herb; - sellitem Rainbow_Carrot; - sellitem Earthworm_The_Dude; - sellitem Rotten_Fish; - sellitem Lusty_Iron; - sellitem Monster_Juice; - sellitem Sweet_Milk; - sellitem Well_Dried_Bone; - sellitem Singing_Flower; - sellitem Dew_Laden_Moss; - sellitem Deadly_Noxious_Herb; - sellitem Fatty_Chubby_Earthworm; - sellitem Baked_Yam; - sellitem Tropical_Banana; - sellitem Horror_Of_Tribe; - sellitem No_Recipient; - sellitem Old_Broom; - sellitem Silver_Knife_Of_Chaste; - sellitem Armlet_Of_Obedience; - sellitem Shining_Stone; - sellitem Contracts_In_Shadow; - sellitem Book_Of_Devil; - sellitem Heart_Of_Her; -} -prontera,162,145,3 trader Pet Equipment 1_F_MERCHANT_01,{ -OnInit: - sellitem Skull_Helm; - sellitem Monster_Oxygen_Mask; - sellitem Transparent_Headgear; - sellitem Pacifier; - sellitem Wig; - sellitem Queen's_Hair_Ornament; - sellitem Silk_Ribbon; - sellitem Punisher; - sellitem Wild_Flower; - sellitem Battered_Pot; - sellitem Stellar_Hairpin; - sellitem Tiny_Egg_Shell; - sellitem Backpack; - sellitem Rocker_Glasses; - sellitem Green_Lace; - sellitem Golden_Bell; - sellitem Bark_Shorts; - sellitem Monkey_Circlet; - sellitem Red_Muffler; - sellitem Sword_Of_Grave_Keeper; -} -prontera,148,234,5 trader Weapon Card Merchant 1_F_PUBGIRL,{ -OnInit: - sellitem Drops_Card, 100000; - sellitem Andre_Larva_Card, 100000; - sellitem Skeleton_Card, 100000; - sellitem Thief_Bug_Female_Card, 100000; - sellitem Hornet_Card, 100000; - sellitem Wolf_Card, 100000; - sellitem Andre_Card, 100000; - sellitem Savage_Babe_Card, 100000; - sellitem Farmiliar_Card, 100000; - sellitem Plankton_Card, 100000; - sellitem Snake_Card, 100000; - sellitem Marina_Card, 100000; - sellitem Metaller_Card, 100000; - sellitem Magnolia_Card, 100000; - sellitem Zenorc_Card, 100000; - sellitem Requiem_Card, 100000; - sellitem Mandragora_Card, 100000; - sellitem Vadon_Card, 100000; - sellitem Anacondaq_Card, 100000; - sellitem Drainliar_Card, 100000; - sellitem Orc_Skeleton_Card, 100000; - sellitem Pecopeco_Egg_Card, 100000; - sellitem Goblin_Card, 100000; - sellitem Caramel_Card, 100000; - sellitem Scorpion_Card, 100000; - sellitem Flora_Card, 100000; - sellitem Archer_Skeleton_Card, 100000; - sellitem Strouf_Card, 100000; - sellitem Petit_Card, 100000; - sellitem Desert_Wolf_Card, 20700; - sellitem Skel_Worker_Card, 100000; - sellitem Minorous_Card, 100000; - sellitem Golem_Card, 100000; - sellitem Hunter_Fly_Card, 100000; - sellitem Hydra_Card, 100000; - sellitem Soldier_Skeleton_Card, 100000; - sellitem Mummy_Card, 100000; - sellitem Side_Winder_Card, 100000; - sellitem Deviace_Card, 100000; -} -prontera,148,231,5 trader Headgear Card Merchant 1_F_PUBGIRL,{ -OnInit: - sellitem Wilow_Card, 100000; - sellitem Stainer_Card, 100000; - sellitem Martin_Card, 100000; - sellitem Elder_Wilow_Card, 100000; - sellitem Giearth_Card, 100000; - sellitem Ghoul_Card, 100000; - sellitem Marduk_Card, 100000; - sellitem Deviruchi_Card, 100000; - sellitem Nightmare_Card, 100000; -} -prontera,146,229,5 trader Armor Card Merchant 1_F_PUBGIRL,{ -OnInit: - sellitem Pupa_Card, 100000; - sellitem Picky_Card, 100000; - sellitem Picky__Card, 100000; - sellitem Roda_Frog_Card, 100000; - sellitem Thief_Bug_Card, 100000; - sellitem Rocker_Card, 100000; - sellitem Desert_Wolf_Babe_Card, 100000; - sellitem Pecopeco_Card, 100000; - sellitem Savage_Card, 100000; - sellitem Sword_Fish_Card, 100000; - sellitem Dokebi_Card, 100000; - sellitem Pasana_Card, 100000; - sellitem Sand_Man_Card, 100000; - sellitem Argiope_Card, 100000; - sellitem Bathory_Card, 100000; - sellitem Evil_Druid_Card, 100000; - sellitem Cornutus_Card, 100000; - sellitem Marc_Card, 100000; -} -prontera,144,227,5 trader Shield Card Merchant 1_F_PUBGIRL,{ -OnInit: - sellitem Andre_Egg_Card, 100000; - sellitem Ambernite_Card, 100000; - sellitem Thara_Frog_Card, 100000; - sellitem Soldier_Andre_Card, 100000; - sellitem Orc_Warrior_Card, 100000; - sellitem BigFoot_Card, 100000; - sellitem Rafflesia_Card, 100000; - sellitem Petit__Card, 100000; - sellitem Medusa_Card, 100000; - sellitem Khalitzburg_Card, 100000; - sellitem Anubis_Card, 100000; - sellitem Horn_Card, 100000; - sellitem Megalodon_Card, 100000; - sellitem Argos_Card, 100000; - sellitem Munak_Card, 100000; -} -prontera,142,225,5 trader Robe Card Merchant 1_F_PUBGIRL,{ -OnInit: - sellitem Dustiness_Card, 100000; - sellitem Orc_Zombie_Card, 100000; - sellitem Hode_Card, 100000; - sellitem Marse_Card, 100000; - sellitem Myst_Card, 100000; - sellitem Jakk_Card, 100000; - sellitem Marionette_Card, 100000; - sellitem Isis_Card, 100000; - sellitem Daydric_Card, 100000; - sellitem Condor_Card, 100000; - sellitem Frilldora_Card, 100000; - sellitem Whisper_Card, 100000; - sellitem Baphomet__Card, 100000; -} -prontera,140,223,5 trader Shoes Card Merchant 1_F_PUBGIRL,{ -OnInit: - sellitem Chonchon_Card, 100000; - sellitem Zombie_Card, 100000; - sellitem Thief_Bug_Male_Card, 100000; - sellitem Eggyra_Card, 100000; - sellitem Matyr_Card, 100000; - sellitem Sohee_Card, 100000; - sellitem Verit_Card, 100000; -} -prontera,138,221,5 trader Accessory Card Merchant 1_F_PUBGIRL,{ -OnInit: - sellitem Spore_Card, 100500; - sellitem Kukre_Card, 100500; - sellitem Tarou_Card, 100500; - sellitem Worm_Tail_Card, 100500; - sellitem Yoyo_Card, 100500; - sellitem Zerom_Card, 100500; - sellitem Kobold_Card, 100500; - sellitem Mantis_Card, 100500; - sellitem Poporing_Card, 100500; - sellitem Creamy_Card, 100500; - sellitem Smokie_Card, 100500; - sellitem Poison_Spore_Card, 100500; - sellitem Vitata_Card, 100500; - sellitem Pirate_Skel_Card, 100500; - sellitem Phen_Card, 100500; - sellitem Marine_Sphere_Card, 100500; - sellitem Obeaune_Card, 100500; - sellitem Horong_Card, 100500; - sellitem Joker_Card, 100500; -} diff --git a/doc/sample/npc_live_dialogues.txt b/doc/sample/npc_live_dialogues.txt deleted file mode 100644 index 9ce628c30..000000000 --- a/doc/sample/npc_live_dialogues.txt +++ /dev/null @@ -1,53 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Live Dialogue -//===== By: ================================================== -//= Lupus -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= An example of an NPC with live dialogue. -//= Note: This relies on Global_Functions.txt to run. -//============================================================ - -prontera,167,177,5 script Luppy DESERT_WOLF_B,{ - mes "[Luppy]"; - - // Say a random greeting from Global_Functions.txt - mes callfunc("F_Hi"); - - // Say a compliment according to player's gender - // 1st string is for FEMALE, 2nd for MALE - mes callfunc("F_Sex","What a beautiful lady!","What a handsome man!"); - - // Add some random greeting and goodbye into the menu - if (select(callfunc("F_Hi"), callfunc("F_Bye")) != 1) { - mes "[Luppy]"; - // Add some random goodbye from Global_Functions.txt - mes callfunc("F_Bye"); - close; - } - - mes "[Luppy]"; - // Give a random prize from set list of items - if (@gotstuff) { - // Again, say stuff according to player's gender - mes "I like "+callfunc("F_Sex","smiling ladies!","bloody pirates!"); - - // Show one of 3 emotion from the list (we added ,1 to show emotion over PLAYER's head) - emotion callfunc("F_RandMes", 3, e_scissors, e_kis, e_pat), 1; - close; - } - - // We set a temp var to give present just once. Player can get more by relogging. - @gotstuff = 1; - - // Get item ID from the list of presents: Apple, Mastela Fruit, Yggdrasil Seed or Orange Juice - .@itemIDfromList = callfunc("F_RandMes", 4, Apple, Fruit_Of_Mastela, Seed_Of_Yggdrasil, Orange_Juice); - - // Again, say stuff according to player's gender - mes "Hey, "+callfunc("F_Sex","sister!","brother!")+" I have "+getitemname(.@itemIDfromList)+" for you!"; - - // Get the item from the list - getitem .@itemIDfromList, 1; - close; -} diff --git a/doc/sample/npc_test_array.txt b/doc/sample/npc_test_array.txt deleted file mode 100644 index a429ffb93..000000000 --- a/doc/sample/npc_test_array.txt +++ /dev/null @@ -1,43 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Array Test -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates array commands. -//============================================================ - -prontera,164,190,1 script Array Test 4_F_KAFRA6,{ - .@hoge[0] = 1; - .@hoge[1] = 5; - mes "Please enter a value for hoge[2]."; - next; - input .@hoge[2]; - mes "hoge => " + .@hoge; - mes "hoge[0]=> " + .@hoge[0]; - mes "hoge[1]=> " + .@hoge[1]; - mes "hoge[2]=> " + .@hoge[2]; - next; - setarray .@hoge[1],2,3,4,5; - mes "true: 5,1,2,3,4"; - mes "hoge size = "+ getarraysize(.@hoge); - mes "hoge[0]=> " + .@hoge[0]; - mes "hoge[1]=> " + .@hoge[1]; - mes "hoge[2]=> " + .@hoge[2]; - mes "hoge[3]=> " + .@hoge[3]; - next; - copyarray .@fuga[0],.@hoge[2],2; - mes "true: 3,4,0"; - mes "fuga[0]=> " + .@fuga[0]; - mes "fuga[1]=> " + .@fuga[1]; - mes "fuga[2]=> " + .@fuga[2]; - next; - deletearray .@hoge[1],2; - mes "true: 1,4,5,0"; - mes "hoge[0]=> " + .@hoge[0]; - mes "hoge[1]=> " + .@hoge[1]; - mes "hoge[2]=> " + .@hoge[2]; - mes "hoge[3]=> " + .@hoge[3]; - close; -} diff --git a/doc/sample/npc_test_chat.txt b/doc/sample/npc_test_chat.txt deleted file mode 100644 index adc53c763..000000000 --- a/doc/sample/npc_test_chat.txt +++ /dev/null @@ -1,37 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Chat Test -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20121003 -//===== Description: ========================================= -//= Demonstrates waitingroom commands. -//============================================================ - -prontera,158,182,0 script Chat Test::test0001 4_F_KAFRA2,{ - mes "Trigger Number: " + getwaitingroomstate(2); - mes "Trigger State: " + getwaitingroomstate(3); - switch(select("Enable:Disable:Delete:Create")) { - case 1: - enablewaitingroomevent; - close; - case 2: - disablewaitingroomevent; - close; - case 3: - delwaitingroom; - close; - case 4: - waitingroom "Test",15,"test0001::OnChatEvent",1; - close; - } - -OnInit: - waitingroom "Test",15,"test0001::OnChatEvent",1; - end; - -OnChatEvent: - disablewaitingroomevent; - warpwaitingpc "prontera",160,180; - end; -} diff --git a/doc/sample/npc_test_checkweight.txt b/doc/sample/npc_test_checkweight.txt deleted file mode 100644 index 0f383ffe4..000000000 --- a/doc/sample/npc_test_checkweight.txt +++ /dev/null @@ -1,158 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: CheckWeight -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates 'checkweight' command. -//============================================================ - -prontera,161,181,6 script ChkSpace 4_M_JPN,{ - function ChkResult; - function FinalReport; - - // Reset - resetlvl(1); - getinventorylist; - for (.@i = 0; .@i < @inventorylist_count; ++.@i) { - delitem(@inventorylist_id[.@i], @inventorylist_amount[.@i]); //clear inventory - } - - //basic backward chk - .@testid = 0; - .@succes = 0; - .@ret = checkweight(Apple, 10); - .@succes += ChkResult(.@testid++, 1, .@ret); //should be success - .@ret = checkweight("Apple", 10); - .@succes += ChkResult(.@testid++, 1, .@ret); //should be success - .@ret = checkweight(Premium_Reset_Stone, 33000); - .@succes += ChkResult(.@testid++, 0, .@ret); //should be failure too many item amount item weight=0 - .@ret = checkweight("Premium_Reset_Stone", 33000); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure too many item amount - .@ret = checkweight(Blue_Gemstone, 500); - .@success += ChkResult(.@testid++, 1, .@ret); //should be success weight based on max weight=2030 - .@ret = checkweight(Blue_Gemstone, 1000); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure weight based on max weight=2030 - .@ret = checkweight(Magic_Stone_Ring, 100); - .@success += ChkResult(.@testid++, 1, .@ret); //should be success - .@ret = checkweight(Magic_Stone_Ring, 101); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure (with MAX_INVENTORY = 100) - .@ret = checkweight(-1, 1); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid item id - .@ret = checkweight(Apple, 0); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid amount - - debugmes "End backward test"; - FinalReport(.@testid, .@succes); - - //update using list test - .@testid = 0; - .@succes = 0; - - .@ret = checkweight(Apple, 10, Banana, 10); - .@success += ChkResult(.@testid++, 1, .@ret); //should be success - .@ret = checkweight("Apple", 10, "Banana", 10); - .@success += ChkResult(.@testid++, 1, .@ret); //should be success - .@ret = checkweight(Apple, 80, Banana, 33000); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure - .@ret = checkweight("Apple", 80, "Banana", 33000); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure too many item amount - .@ret = checkweight("Apple", 10, "Banana", 21, Apple); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid nb of args - .@ret = checkweight(Blue_Gemstone, 500, Red_Gemstone, 100); - .@success += ChkResult(.@testid++, 1, .@ret); //should be succes weight 1800/2030 - .@ret = checkweight(Blue_Gemstone, 500, Red_Gemstone, 500); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure weight 3000/2030 - .@ret = checkweight(Magic_Stone_Ring, 95, Green_Apple_Ring, 5); - .@success += ChkResult(.@testid++, 1, .@ret); //should be success - .@ret = checkweight(Magic_Stone_Ring, 95, Green_Apple_Ring, 10); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure (with MAX_INVENTORY = 100) - .@ret = checkweight(Apple, 1, -1, 1); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid item id - .@ret = checkweight(Apple, 1, Banana, 0); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid amount - .@ret = checkweight(Premium_Reset_Stone, 31000, Premium_Reset_Stone, 2000); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure overamount inventory - .@ret = checkweight(Apple, 1, Banana, 1, Grape, 1, Carrot, 1); - .@success += ChkResult(.@testid++, 1, .@ret); //should be sucess - - debugmes "End update by list tests"; - FinalReport(.@testid, .@succes); - - //update using array tests - .@testid = 0; - .@succes = 0; - - setarray .@item[0], Apple, Banana, Grape, Carrot; - setarray .@count[0], 1, 5, 9, 12; - .@ret = checkweight2(.@item, .@count); - .@success += ChkResult(.@testid++, 1, .@ret); //should be sucess - cleararray .@item[0], 0, 4; - cleararray .@count[0], 0, 4; - setarray .@item[0], Apple, Banana, Grape, Carrot; - setarray .@count[0], 1, 5, -1, 12; - .@ret = checkweight2(.@item, .@count); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, invalid amout - cleararray .@item[0], 0, 4; - cleararray .@count[0], 0, 4; - setarray .@item[0], Apple, Banana, Grape, -1; - setarray .@count[0], 1, 5, 15, 12; - .@ret = checkweight2(.@item, .@count); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, invalid id - cleararray .@item[0], 0, 4; - cleararray .@count[0], 0, 4; - setarray .@item[0], Blue_Gemstone, Yellow_Gemstone, Red_Gemstone, Emperium; - setarray .@count[0], 300, 300, 300, 300; - .@ret = checkweight2(.@item, .@count); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, total by weight - cleararray .@item[0], 0, 4; - cleararray .@count[0], 0, 4; - setarray .@item[0], Premium_Reset_Stone, Premium_Reset_Stone; - setarray .@count[0], 31000, 2000; - .@ret = checkweight2(.@item, .@count); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, total by weight - cleararray .@item[0], 0, 2; - cleararray .@count[0], 0, 2; - setarray .@item[0], Magic_Stone_Ring, Green_Apple_Ring; - setarray .@count[0], 95, 5; - .@ret = checkweight2(.@item, .@count); - .@success += ChkResult(.@testid++, 1, .@ret); //should be success - setarray .@count[0], 95, 10; - .@ret = checkweight2(.@item, .@count); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure overamount item - cleararray .@item[0], 0, 2; - cleararray .@count[0], 0, 2; - setarray .@item[0], Premium_Reset_Stone, Premium_Reset_Stone, Apple; - setarray .@count[0], 1, 3; - .@ret = checkweight2(.@item, .@count); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, size mistmatch - cleararray .@item[0], 0, 3; - cleararray .@count[0], 0, 2; - setarray .@item[0], Premium_Reset_Stone, Premium_Reset_Stone; - setarray .@count[0], 1, 3, 5; - .@ret = checkweight2(.@item, .@count); - .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, size mistmatch - - debugmes "End update by array tests"; - FinalReport(.@testid, .@succes); - - end; - - function ChkResult { - .@tid = getarg(0); - .@expected = getarg(1); - .@ret = getarg(2); - .@sucess = (.@ret==.@expected); - debugmes "Test "+.@tid+" = "+(.@sucess?"Sucess":"Fail"); - return .@sucess; - } - - function FinalReport { - .@tdone = getarg(0); - .@succes = getarg(1); - debugmes "Results = Pass : "+.@succes+"/"+.@tdone+" Fails : "+(.@tdone-.@succes)+"/"+.@tdone; - if(.@succes != .@tdone) { debugmes "Some failure as occured, enable chkresult print to found out"; } - return; - } -} diff --git a/doc/sample/npc_test_duplicate.txt b/doc/sample/npc_test_duplicate.txt deleted file mode 100644 index 55d64bc7b..000000000 --- a/doc/sample/npc_test_duplicate.txt +++ /dev/null @@ -1,33 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Duplicate Test -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20140320 -//===== Description: ========================================= -//= An example of how duplicate NPCs are handled: -//= NPC variables are shared between all duplicates. -//= In this sample, to get the NPC coordinate, has to trigger OnTouch -//= Duplicates always override the source NPC's trigger area (even 0x0). -//= 'OnInit' loads the main npc last, for some reason. (check with debugmes) -//============================================================ - -- script Test Script -1,1,1,{ - mes "Hi."; - mes "My coords are "+ .map$ +", "+ .x +"/" +.y ; - close; - -OnInit: - getmapxy(.map$, .x, .y, 1); - debugmes strnpcinfo(0); - end; - -OnTouch: - getmapxy(.map$, .x, .y, 1); - emotion e_scissors; - end; -} - -prontera,150,175,4 duplicate(Test Script) Test1 4_PORING -prontera,155,175,4 duplicate(Test Script) Test2 4_PORING,2,2 -prontera,160,175,4 duplicate(Test Script) Test3 4_PORING,3,3 diff --git a/doc/sample/npc_test_func.txt b/doc/sample/npc_test_func.txt deleted file mode 100644 index a57b6cfb1..000000000 --- a/doc/sample/npc_test_func.txt +++ /dev/null @@ -1,35 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Functions -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates use of functions. -//============================================================ - -// Define the function func001 -function script func001 { - mes "Hello there!"; - next; - return; // Return to script -} - -// Define the function func002 -function script func002 { - return "I'm a function"; -} - -// Uses 3 different methods of displaying dialogue from both internal and external sources. -prontera,168,189,1 script Functions 4_F_KAFRA6,{ - callfunc "func001"; // Calls func001 and displays "Hello there!" - mes callfunc("func002"); // Calls func002 and displays "I'm a function" - next; - callsub L_SUB001; // Calls the label L_SUB001 and displays "I'm a label" - close; - end; - -L_SUB001: - mes "I'm a label"; - return; -} diff --git a/doc/sample/npc_test_npctimer.txt b/doc/sample/npc_test_npctimer.txt deleted file mode 100644 index 6c9b85a0e..000000000 --- a/doc/sample/npc_test_npctimer.txt +++ /dev/null @@ -1,42 +0,0 @@ -//===== Hercules Script ====================================== -//= Sample: NPC Timers -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates NPC timer commands. -//============================================================ - -prontera,156,183,0 script NPCtimerTest::npctimerX0000 4_F_KAFRA2,{ - mes "Timer value" + getnpctimer(0); - mes "State timer" + getnpctimer(1,"npctimerX0000"); - mes "Number of events" + getnpctimer(2); - switch(select("Initialization:Stop:Start:Settings")) { - case 1: - initnpctimer; - close; - case 2: - stopnpctimer; - close; - case 3: - startnpctimer; - close; - case 4: - input .@temp; - setnpctimer .@temp; - close; - } - -OnTimer1000: - npctalk "After a second..."; - end; - -OnTimer5000: - npctalk "After 5 seconds..."; - end; - -OnTimer10000: - npctalk "After 10 seconds..."; - end; -} diff --git a/doc/sample/npc_test_npctimer2.txt b/doc/sample/npc_test_npctimer2.txt deleted file mode 100644 index b325c0c90..000000000 --- a/doc/sample/npc_test_npctimer2.txt +++ /dev/null @@ -1,23 +0,0 @@ -//===== Hercules Script ====================================== -//= Sample: Attached NPC Timers -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates attached NPC timer commands. -//============================================================ - -prontera,156,183,0 script NPCtimerTest::npctimerX0000 4_F_KAFRA2,{ - mes "What would you like to know?"; - select("Tell me my level."); - mes "I need time to think..."; - initnpctimer; - attachnpctimer; - close; - -OnTimer5000: - mes "Ah, your level is " + readparam(11) + "!"; - detachnpctimer; - close; -} diff --git a/doc/sample/npc_test_pcre.txt b/doc/sample/npc_test_pcre.txt deleted file mode 100644 index 1306d1798..000000000 --- a/doc/sample/npc_test_pcre.txt +++ /dev/null @@ -1,402 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: PCRE -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates PCRE commands. -//============================================================ - -prontera,152,181,5 script MouseJstr 4_M_JPN,{ - -// hello -Lquote0: - npctalk "How do you do. Please state your problem."; - end; - -// computer -Lquote1: - switch(rand(4)) { - case 0: npctalk "Do computers worry you?"; break; - case 1: npctalk "What do you think about machines?"; break; - case 2: npctalk "Why do you mention computers?"; break; - case 3: npctalk "What do you think machines have to do with your problem?"; break; - } - end; - -// name -Lquote2: - npctalk "I am not interested in names"; - end; - -// sorry -Lquote3: - switch(rand(3)) { - case 0: npctalk "Please don't apologize"; break; - case 1: npctalk "Apologies are not necessary"; break; - case 2: npctalk "What feelings do you have when you apologize"; break; - } - end; - -// I remember $@p2$ -Lquote4: - switch(rand(6)) { - case 0: npctalk "Do you often think of "+$@p2$+"?"; break; - case 1: npctalk "Does thinking of "+$@p2$+" bring anything else to mind?"; break; - case 2: npctalk "What else do you remember?"; break; - case 3: npctalk "Why do you recall "+$@p2$+" right now?"; break; - case 4: npctalk "What in the present situation reminds you of "+$@p2$+"?"; break; - case 5: npctalk "What is the connection between me and "+$@p2$+"?"; break; - } - end; - -// do you remember -Lquote5: - switch (rand(4)) { - case 0: npctalk "Did you think I would forget "+$@p2$+" ?"; break; - case 1: npctalk "Why do you think I should recall "+$@p2$+" now"; break; - case 2: npctalk "What about "+$@p2$+""; break; - case 3: npctalk "You mentioned "+$@p2$+""; break; - } - end; - -// if -Lquote6: - switch(rand(4)) { - case 0: npctalk "Do you really think its likely that "+$@p2$+""; break; - case 1: npctalk "Do you wish that "+$@p2$+"?"; break; - case 2: npctalk "What do you think about "+$@p2$+"?"; break; - case 3: npctalk "Really-- if "+$@p2$+"?"; break; - } - end; - -// i dreamt -Lquote7: - switch(rand(3)) { - case 0: npctalk "Really-- "+$@p2$+""; break; - case 1: npctalk "Have you ever fantasized "+$@p2$+" while you were awake?"; break; - case 2: npctalk "Have you dreamt "+$@p2$+" before?"; break; - } - end; - -// dream about -Lquote8: - npctalk "How do you feel about "+$@p2$+" in reality?"; - end; - -// dream -Lquote9: - switch(rand(4)) { - case 0: npctalk "What does this dream suggest to you?"; break; - case 1: npctalk "Do you dream often?"; break; - case 2: npctalk "What persons appear in your dreams?"; break; - case 3: npctalk "Don't you believe that dream has to do with your problem?"; break; - } - end; - -// my mother -Lquote10: - switch(rand(2)) { - case 0: npctalk "Who else in your family "+$@p2$+""; break; - case 1: npctalk "Tell me more about your family"; break; - } - end; - -// my father -Lquote11: - switch(rand(3)) { - case 0: npctalk "Your father"; break; - case 1: npctalk "Does he influence you strongly?"; break; - case 2: npctalk "What else comes to mind when you think of your father?"; break; - } - end; - -// I want -Lquote12: - switch(rand(3)) { - case 0: npctalk "What would it mean if you got "+$@p2$+""; break; - case 1: npctalk "Why do you want "+$@p2$+""; break; - case 2: npctalk "Suppose you got "+$@p2$+" soon"; break; - } - end; - -// I am glad -Lquote13: - switch(rand(3)) { - case 0: npctalk "How have I helped you to be "+$@p2$+""; break; - case 1: npctalk "What makes you happy just now"; break; - case 2: npctalk "Can you explain why you are suddenly "+$@p2$+""; break; - } - end; - -// I am sad -Lquote14: - switch(rand(2)) { - case 0: npctalk "I am sorry to hear you are depressed"; break; - case 1: npctalk "I'm sure its not pleasant to be sad"; break; - } - end; - -// $@p2 are like "+$@p3$+" -Lquote15: - npctalk "What resemblance do you see between "+$@p2$+" and "+$@p3$+""; - end; - -// "+$@p2$+" is like "+$@p3$+" -Lquote16: - switch(rand(4)) { - case 0: npctalk "In what way is it that "+$@p2$+" is like "+$@p3$+""; break; - case 1: npctalk "What resemblance do you see?"; break; - case 2: npctalk "Could there really be some connection?"; break; - case 3: npctalk "How?"; break; - } - end; - -// alike -Lquote17: - switch(rand(2)) { - case 0: npctalk "In what way?"; break; - case 1: npctalk "What similarities are there?"; break; - } - end; - -// same -Lquote18: - npctalk "What other connections do you see?"; - end; - -// I was "+$@p2$+" -Lquote19: - switch(rand(3)) { - case 0: npctalk "Were you really?"; break; - case 1: npctalk "Perhaps I already knew you were "+$@p2$+""; break; - case 2: npctalk "Why do you tell me you were "+$@p2$+" now?"; break; - } - end; - -// was I -Lquote20: - switch(rand(3)) { - case 0: npctalk "What if you were "+$@p2$+" ?"; break; - case 1: npctalk "Do you thin you were "+$@p2$+""; break; - case 2: npctalk "What would it mean if you were "+$@p2$+""; break; - } - end; - -// I am -Lquote21: - switch(rand(2)) { - case 0: npctalk "In what way are you "+$@p2$+""; break; - case 1: npctalk "Do you want to be "+$@p2$+" ?"; break; - } - end; - -// am I -Lquote22: - switch(rand(4)) { - case 0: npctalk "Do you believe you are "+$@p2$+""; break; - case 1: npctalk "Would you want to be "+$@p2$+""; break; - case 2: npctalk "You wish I would tell you you are "+$@p2$+""; break; - case 3: npctalk "What would it mean if you were "+$@p2$+""; break; - } - end; - -// am -Lquote23: - switch(rand(2)) { - case 0: npctalk "Why do you say AM?"; break; - case 1: npctalk "I don't understand that"; break; - } - end; - -// are you -Lquote24: - switch(rand(3)) { - case 0: npctalk "Why are you interested in whether I am "+$@p2$+" or not?"; break; - case 1: npctalk "Would you prefer if I weren't "+$@p2$+""; break; - case 2: npctalk "Perhaps I am "+$@p2$+" in your fantasies"; break; - } - end; - -// you are -Lquote25: - npctalk "What makes you think I am "+$@p2$+" ?"; - end; - -// because -Lquote26: - switch(rand(3)) { - case 0: npctalk "Is that the real reason?"; break; - case 1: npctalk "What other reasons might there be?"; break; - case 2: npctalk "Does that reason seem to explain anything else?"; break; - } - end; - -// were you -Lquote27: - switch(rand(3)) { - case 0: npctalk "Perhaps I was "+$@p2$+""; break; - case 1: npctalk "What do you think?"; break; - case 2: npctalk "What if I had been "+$@p2$+""; break; - } - end; - -// I can't -Lquote28: - switch(rand(2)) { - case 0: npctalk "Maybe you could "+$@p3$+" now"; break; - case 1: npctalk "What if you could "+$@p3$+" ?"; break; - } - end; - -// I feel -Lquote29: - npctalk "Do you often feel "+$@p2$+" ?"; - end; - -// I felt -Lquote30: - npctalk "What other feelings do you have?"; - end; - -// $@p1$ I $@p2$ you $@p3$ -Lquote31: - npctalk "Perhaps in your fantasy we "+$@p3$+" each other?"; - end; - -// why don't you -Lquote32: - switch(rand(3)) { - case 0: npctalk "Should you "+$@p3$+" yourself?"; break; - case 1: npctalk "Do you believe I don't "+$@p3$+""; break; - case 2: npctalk "Perhaps I will "+$@p3$+" in good time"; break; - } - end; - -// yes -Lquote33: - switch(rand(3)) { - case 0: npctalk "You seem quite positive"; break; - case 1: npctalk "You are sure?"; break; - case 2: npctalk "I understand"; break; - } - end; - -// no -Lquote34: - switch(rand(3)) { - case 0: npctalk "Why not?"; break; - case 1: npctalk "You are being a bit negative"; break; - case 2: npctalk "Are you saying NO just to be negative?"; break; - } - end; - -// someone -Lquote35: - npctalk "Can you be more specific?"; - end; - -// everyone -Lquote36: - switch(rand(4)) { - case 0: npctalk "surely not everyone"; break; - case 1: npctalk "Can you think of anyone in particular?"; break; - case 2: npctalk "Who for example?"; break; - case 3: npctalk "You are thinking of a special person?"; break; - } - end; - -// always -Lquote37: - switch(rand(4)) { - case 0: npctalk "Can you think of a specific example?"; break; - case 1: npctalk "When?"; break; - case 2: npctalk "What incident are you thinking of?"; break; - case 3: npctalk "Really-- always?"; break; - } - end; - -// what -Lquote38: - switch(rand(5)) { - case 0: npctalk "Why do you ask?"; break; - case 1: npctalk "Does that question interest you?"; break; - case 2: npctalk "What is it you really want to know?"; break; - case 3: npctalk "What do you think?"; break; - case 4: npctalk "What comes to your mind when you ask that?"; break; - } - end; - -// perhaps -Lquote39: - npctalk "You do not seem quite certain"; - end; - -// are -Lquote40: - switch(rand(2)) { - case 0: npctalk "Did you think they might not be "+$@p2$+""; break; - case 1: npctalk "Possibly they are "+$@p2$; break; - } - end; - -// default -Lquote41: - switch(rand(6)) { - case 0: npctalk "Very interesting"; break; - case 1: npctalk "I am not sure I understand you fully"; break; - case 2: npctalk "What does that suggest to you?"; break; - case 3: npctalk "Please continue"; break; - case 4: npctalk "Go on"; break; - case 5: npctalk "Do you feel strongly about discussing such things?"; break; - } - end; - -OnInit: - defpattern 1, "([^:]+):.*\\shello.*", "Lquote0"; - defpattern 1, "([^:]+):.*\\scomputer.*", "Lquote1"; - defpattern 1, "([^:]+):.*\\sname.*", "Lquote2"; - defpattern 1, "([^:]+):.*\\ssorry.*", "Lquote3"; - defpattern 1, "([^:]+):.*\\si\\s+remember\\s+(.*)", "Lquote4"; - defpattern 1, "([^:]+):.*\\sdo\\s+you\\s+remember\\s+(.*)", "Lquote5"; - defpattern 1, "([^:]+):.*\\sif\\s+(.*)", "Lquote6"; - defpattern 1, "([^:]+):.*\\si\\s+dreamt\\s+(.*)", "Lquote7"; - defpattern 1, "([^:]+):.*\\sdream\\s+about\\s+(.*)", "Lquote8"; - defpattern 1, "([^:]+):.*\\sdream\\s+(.*)", "Lquote9"; - defpattern 1, "([^:]+):.*\\smy\\s+mother\\s+(.*)", "Lquote10"; - defpattern 1, "([^:]+):.*\\smy\\s+father\\s+(.*)", "Lquote11"; - defpattern 1, "([^:]+):.*\\si\\s+want\\s+(.*)", "Lquote12"; - defpattern 1, "([^:]+):.*\\si\\s+am\\s+glad\\s+(.*)", "Lquote13"; - defpattern 1, "([^:]+):\\s+(.*)\\s+i\\s+am\\s+sad\\s+(.*)", "Lquote14"; - defpattern 1, "([^:]+):\\s+(.*)\\s+are\\s+like\\s+(.*)", "Lquote15"; - defpattern 1, "([^:]+):\\s+(.*)\\s+is\\s+like\\s+(.*)", "Lquote16"; - defpattern 1, "([^:]+):.*\\salike\\s+(.*)", "Lquote17"; - defpattern 1, "([^:]+):.*\\ssame\\s+(.*)", "Lquote18"; - defpattern 1, "([^:]+):.*\\si\\s+was\\s+(.*)", "Lquote19"; - defpattern 1, "([^:]+):.*\\swas\\s+i\\s+(.*)", "Lquote20"; - defpattern 1, "([^:]+):.*\\si\\s+am\\s+(.*)", "Lquote21"; - defpattern 1, "([^:]+):.*\\sam\\s+i\\s+(.*)", "Lquote22"; - defpattern 1, "([^:]+):.*\\sam\\s+(.*)", "Lquote23"; - defpattern 1, "([^:]+):.*\\sare\\s+you\\s+(.*)", "Lquote24"; - defpattern 1, "([^:]+):.*\\syou\\s+are\\s+(.*)", "Lquote25"; - defpattern 1, "([^:]+):.*\\sbecause\\s+(.*)", "Lquote26"; - defpattern 1, "([^:]+):.*\\swere\\s+you\\s+(.*)", "Lquote27"; - defpattern 1, "([^:]+):.*\\si\\s+(cant|can't|cannot)\\s+(.*)", "Lquote28"; - defpattern 1, "([^:]+):.*\\si\\s+feel\\s+(.*)", "Lquote29"; - defpattern 1, "([^:]+):.*\\si\\s+felt\\s+(.*)", "Lquote30"; - defpattern 1, "([^:]+):.*\\si\\s+(.*)\\s+you\\s+(.*)", "Lquote31"; - defpattern 1, "([^:]+):.*\\swhy\\s+(don't|dont)\\s+you\\s+(.*)", "Lquote32"; - defpattern 1, "([^:]+):.*\\syes\\s+(.*)", "Lquote33"; - defpattern 1, "([^:]+):.*\\sno\\s+(.*)", "Lquote34"; - defpattern 1, "([^:]+):.*\\ssomeone\\s+(.*)", "Lquote35"; - defpattern 1, "([^:]+):.*\\severyone\\s+(.*)", "Lquote36"; - defpattern 1, "([^:]+):.*\\salways\\s+(.*)", "Lquote37"; - defpattern 1, "([^:]+):.*\\swhat\\s+(.*)", "Lquote38"; - defpattern 1, "([^:]+):.*\\sperhaps\\s+(.*)", "Lquote39"; - defpattern 1, "([^:]+):.*\\sare\\s+(.*)", "Lquote40"; - defpattern 1, "([^:]+):(.*)", "Lquote41"; - - activatepset 1; - end; -} diff --git a/doc/sample/npc_test_quest.txt b/doc/sample/npc_test_quest.txt deleted file mode 100644 index 90659aa10..000000000 --- a/doc/sample/npc_test_quest.txt +++ /dev/null @@ -1,52 +0,0 @@ -//===== Hercules Script ====================================== -//= Sample: Quest Test -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates quest commands. -//============================================================ - -// Before installing an NPC like the one below, you would -// need to add the quest to /db/quest_db.txt - e.g: -// 70000,0,1002,3,0,0,0,0,"3 Splats Please!" - -prontera,90,95,1 script Jelly 2_F_MAGICMASTER,{ - if (!questprogress(70000)) { - // Quest not yet started. - mes "[Jelly]"; - mes "Hey there! Would you help me?"; - next; - switch(select("I'd rather not:What's up?")){ - case 1: - mes "[Jelly]"; - mes "I didn't want your help anyway!"; - close; - case 2: - mes "[Jelly]"; - mes "Those Porings are weirding me out."; - mes "Would you kill 3 for me?"; - setquest 70000; // Adds the quest to your Quest Window. - close; - } - } else if (questprogress(70000,HUNTING) == 2) { - // All monsters killed. - mes "[Jelly]"; - mes "Awesome! Thank you!"; - getexp 10000,0; - dispbottom "You have been rewarded with 10,000 Base Exp."; - completequest 70000; // Sets quest status to "complete". - close; - } else if (questprogress(70000) == 1) { - // Quest is active. - mes "[Jelly]"; - mes "Keep going, almost there!"; - close; - } else if (questprogress(70000) == 2) { - // Quest finished. - mes "[Jelly]"; - mes "Thanks again for doing that for me!"; - close; - } -} diff --git a/doc/sample/npc_test_setitemx.txt b/doc/sample/npc_test_setitemx.txt deleted file mode 100644 index a06f0dc9f..000000000 --- a/doc/sample/npc_test_setitemx.txt +++ /dev/null @@ -1,44 +0,0 @@ -//===== Hercules Script ====================================== -//= Sample: Setiteminfo & Setitemscript -//===== By: ================================================== -//= Lupus -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates 'setiteminfo' and 'setitemscript' commands. -//============================================================ - -prontera,164,161,5 script Lupus WOLF,{ - mes "Please choose an option:"; - next; - switch (select("Make Knife[3] Edible", "Make Apple Equippable", "Edible Knife = Full SP", "Knife = Weapon + 3 Notes")) { - case 1: - mes "Ok. We made Knife[3] edible."; - setiteminfo(Knife, 2, IT_HEALING); //type = 0 : potion - setitemscript(Knife, "{dispbottom \"* You used Knife[3]\";}"); - break; - case 2: - mes "Ok. We made Apple equippable."; - setiteminfo(Apple, 2, IT_ARMOR); //item type -> headgear (type = 5 -> IT_ARMOR) - setiteminfo(Apple, 5, 512); //where to equip to (equip = 512) - setiteminfo(Apple, 11, 256); //set as headgear location (loc = 256) - setiteminfo(Apple, 14, 85); //set Headgear Sprite ID (view id = 85) - setitemscript(Apple, "{dispbottom \"* Other item's changed\";}", 0); - setitemscript(Apple, "{dispbottom \"* Equipped\";}", 1); - setitemscript(Apple, "{dispbottom \"* Unequipped\";}", 2); - break; - case 3: - mes "Ok. Now edible Knife[3] restores your SP."; - setitemscript(Knife, 2, 0); - setitemscript(Knife, "{dispbottom \"* You ate Knife[3] + Full SP\"; percentheal 0,100;}"); - break; - case 4: - mes "Ok. We made Knife a weapon, but added 3 notes."; - setiteminfo(Knife, 2, IT_WEAPON); //type = 4 -> IT_WEAPON - setitemscript(Knife, "{dispbottom \"* 1 Used\";}", 0); - setitemscript(Knife, "{dispbottom \"* 2 Equipped\";}", 1); - setitemscript(Knife, "{dispbottom \"* 3 Unequipped\";}", 2); - break; - } - close; -} diff --git a/doc/sample/npc_test_setmapflag.txt b/doc/sample/npc_test_setmapflag.txt deleted file mode 100644 index 44137bef0..000000000 --- a/doc/sample/npc_test_setmapflag.txt +++ /dev/null @@ -1,32 +0,0 @@ -//===== Hercules Script ====================================== -//= Sample: Mapflag Test -//===== By: ================================================== -//= Jbain -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates mapflag commands. -//============================================================ - -prontera,165,145,0 script EXPflagtest 2_F_MAGICMASTER,{ - mes "[EXPflagtest]"; - mes "Set up the map rates:"; - switch(select("Job EXP:Base EXP:PVP on:Reset all flags")) { - case 1: - input .@rate; - setmapflag "prontera",mf_jexp,.@rate; - close; - case 2: - input .@rate; - setmapflag "prontera",mf_bexp,.@rate; - close; - case 3: - setmapflag "prontera",mf_pvp; - close; - case 4: - removemapflag "prontera",mf_bexp; - removemapflag "prontera",mf_jexp; - removemapflag "prontera",mf_pvp; - close; - } -} diff --git a/doc/sample/npc_test_skill.txt b/doc/sample/npc_test_skill.txt deleted file mode 100644 index c26ed1b62..000000000 --- a/doc/sample/npc_test_skill.txt +++ /dev/null @@ -1,37 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Skill -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates the 'skill' command. -//============================================================ - -// skill ,{,}; -// flag=0 Grants the skill permanently -// flag=1 Grants the skill temporarily -// flag=2 Level bonus, stackable -// flag=3 Grants the skill permanently even after skill resets/job changes -// If flag is undefined, it defaults to 1 -// View db/(pre-)re/skill_db.txt for skill IDs - -prontera,157,182,0 script Skills 4_F_KAFRA2,{ - mes "What skill would you like?"; - switch(select("First Aid:Play Dead:Heal:Sight:None")) { - case 1: - skill NV_FIRSTAID,1,0; // Permanently gives player level 1 First Aid - close; - case 2: - skill NV_TRICKDEAD,1,0; // Permanently gives player level 1 Play Dead - close; - case 3: - skill AL_HEAL,3,1; // Temporarily gives player level 3 Heal - close; - case 4: - skill MG_SIGHT,1,3; // Permanently gives player level 1 Sight, even after skill resets/job changes - close; - case 5: - close; - } -} diff --git a/doc/sample/npc_test_time.txt b/doc/sample/npc_test_time.txt deleted file mode 100644 index 2af1dadd8..000000000 --- a/doc/sample/npc_test_time.txt +++ /dev/null @@ -1,25 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: Time Test -//===== By: ================================================== -//= rAthena Dev Team -//===== Current Version: ===================================== -//= 20070315 -//===== Description: ========================================= -//= Demonstrates time commands. -//============================================================ - -prontera,157,181,6 script Time Sample 8W_SOLDIER,{ - mes "[Time Sample]"; - mes "System Tick : " + gettimetick(0); - mes " Time Tick : " + gettimetick(1); - mes " GetTime(0) : " + gettime(0); - mes " GetTime(1) : " + gettime(1) + " (Sec)"; - mes " GetTime(2) : " + gettime(2) + " (Min)"; - mes " GetTime(3) : " + gettime(3) + " (Hour)"; - mes " GetTime(4) : " + gettime(4) + " (WeekDay)"; - mes " GetTime(5) : " + gettime(5) + " (MonthDay)"; - mes " GetTime(6) : " + gettime(6) + " (Month)"; - mes " GetTime(7) : " + gettime(7) + " (Year)"; - mes " GetTimeStr : " + gettimestr("%Y-%m/%d %H:%M:%S",19); - close; -} diff --git a/doc/sample/npc_trader_sample.txt b/doc/sample/npc_trader_sample.txt deleted file mode 100644 index 0d50af8c5..000000000 --- a/doc/sample/npc_trader_sample.txt +++ /dev/null @@ -1,58 +0,0 @@ -//===== Hercules Script ======================================= -//= Sample: NPC Trader -//===== By: ================================================== -//= Hercules Dev Team -//===== Current Version: ===================================== -//= 20131225 -//===== Description: ========================================= -//= Demonstrates NPC Trader. -//============================================================ - -/* ordinary zeny trader */ -prontera,152,151,1 trader TestTrader 4_F_EDEN_OFFICER,{ - OnInit: - sellitem Valkyrja's_Shield; - end; -} -/* ordinary cash trader */ -prontera,152,152,1 trader TestTraderCash 4_F_EDEN_OFFICER,{ - OnInit: - tradertype(NST_CASH); - sellitem Valkyrja's_Shield; - end; -} -/* custom npc trader */ -prontera,153,152,1 trader TestCustom2 4_F_EDEN_OFFICER,{ - OnInit: - tradertype(NST_CUSTOM); - sellitem Red_Potion,2; - end; - -/* allows currency to be item 501 and 502 */ -OnCountFunds: - setcurrency(countitem(Red_Potion),countitem(Orange_Potion)); - end; - -/* receives @price (total cost) and @points (the secondary input field for cash windows) */ -OnPayFunds: - dispbottom "Hi: price="+@price+" and points="+@points; - if( countitem(Orange_Potion) < @points || countitem(Red_Potion) < @price-@points ) - end; - delitem Orange_Potion,@points; - delitem Red_Potion,@price-@points; - purchaseok(); - end; -} -/* demonstrates Market Trader */ -prontera,150,160,6 trader HaiMarket 4_F_EDEN_OFFICER,{ -OnInit: - tradertype(NST_MARKET); - sellitem Red_Potion,-1,49; - end; - -OnClock0000://resupplies red potions on midnight -OnMyResupply: - if( shopcount(Red_Potion) < 20 ) - sellitem Red_Potion,-1,49; - end; -} diff --git a/doc/script_commands.txt b/doc/script_commands.txt deleted file mode 100644 index 0726630df..000000000 --- a/doc/script_commands.txt +++ /dev/null @@ -1,9042 +0,0 @@ -//===== Hercules Documentation =============================== -//= Hercules Script Commands -//===== By: ================================================== -//= Hercules Dev Team -//===== Description: ========================================= -//= A reference manual for the Hercules scripting language. -//= Commands are sorted depending on their functionality. -//============================================================ - -This document is a reference manual for all the scripting commands and -functions available in current Hercules GIT. It is not a simple tutorial. -When people tell you to "Read The F***ing Manual", they mean this. - -The information was mostly acquired through looking up how things actually -work in the source code of the server, which was written by many people -over time, and lots of them don't speak English and never left any notes - -or are otherwise not available for comments. As such, anything written in -here might not be correct, it is only correct to the best of our -knowledge, which is limited. - -This is not a place to teach you basic programming. This document will not -teach you basic programming by itself. It's more of a reference for those -who have at least a vague idea of what they want to do and want to know -what tools they have available to do it. We've tried to keep it as simple -as feasible, but if you don't understand it, getting a clear book on -programming in general will help better than yelling around the forum for -help. - -A little learning never caused anyone's head to explode. - -Structure ---------- - -The commands and functions are listed in no particular order: - -*Name of the command and how to call it. - -Descriptive text - - Small example if possible. Will usually be incomplete, it's there just - to give you an idea of how it works in practice. - -To find a specific command, use Ctrl+F, (or whatever keys call up a search -function in whatever you're reading this with) put an * followed by the -command name, and it should find the command description for you. - -If you find anything omitted, please tell us. :) - -Syntax ------- - -Throughout this document, wherever a command wants an argument, it is -given in . This doesn't mean you should type the angle -brackets. :) If an argument of a command is optional, it is given in -{curly brackets}. You've doubtlessly seen this convention somewhere, if -you didn't, get used to it, that's how big boys do it. If a command can -optionally take an unspecified number of arguments, you'll see a list like -this: - -command {,...} - -This still means they will want to be separated by commas. - -Where a command wants a string, it will be given in "quotes", if it's a -number, it will be given without them. Normally, you can put an -expression, like a bunch of functions or operators returning a value, in -(round brackets) instead of most numbers. Round brackets will not always -be required, but they're often a good idea. - -Wherever you refer to a map, use 'mapname' instead of 'mapname.gat'. - - -Script loading structure ------------------------- - -Scripts are loaded by the map server as referenced in the -'conf/map-server.conf' configuration file, but in the default -configuration, it doesn't load any script files itself. Instead, it loads -the file 'npc/scripts_main.conf' which itself contains references to other -files. The actual scripts are loaded from txt files, which are linked up -like this: - -npc: - -Any line like this, invoked, ultimately, by 'map-server.conf' will load up -the script contained in this file, which will make the script available. -No file will get loaded twice, to prevent possible errors. - -Another configuration file option of relevance is: - -delnpc: - -This will unload a specified script filename from memory, which, while -seemingly useless, may sometimes be required. - -Whenever '//' is encountered in a line upon reading, everything beyond -this on that line is considered to be a comment and is ignored. This works -wherever you place it. - -// This line will be ignored when processing the script. - -Block comments can also be used, where you can place /* and */ between any -text you wish Hercules to ignore. - -Example: -/* This text, - * no matter which new line you start - * is ignored, until the following - * symbol is encountered: */ - -The asterisks (*) in front of each line is a personal preference, and is -not required. - -Upon loading all the files, the server will execute all the top-level -commands in them. No variables exist yet at this point, no commands can be -called other than those given in this section. These commands set up the -basic server script structure - create NPC objects, spawn monster objects, -set map flags, etc. No code is actually executed at this point except -them. The top-level commands the scripting are pretty confusing, since -they aren't structured like you would expect commands, command name first, -but rather, normally start with a map name. - -What's more confusing about the top-level commands is that most of them -use a tab symbol to divide their arguments. - -To prevent problems and confusion, the tab symbols are written as '%TAB%' -or '' throughout this document, even though this makes the text a bit -less readable. Using an invisible symbol to denote arguments is one of the -bad things about this language, but we're stuck with it for now. :) - -Here is a list of valid top-level commands: - -** Set a map flag: - -%TAB%mapflag%TAB% - -This will, upon loading, set a specified map flag on a map you like. These -are normally in files inside 'npc/mapflag' and are loaded first, so by the -time the server's up, all the maps have the flags they should have. Map -flags determine the behavior of the map regarding various common problems, -for a better explanation, see 'setmapflag'. - -** Create a permanent monster spawn: - -,,,,%TAB%monster%TAB%%TAB%,,,,{,,} - -Map name is the name of the map the monsters will spawn on. X,Y are the -coordinates where the mob should spawn. If X's and Y's are non-zero, they -specify the 'radius' of a spawn-rectangle area centered at x,y. Putting -zeros instead of these coordinates will spawn the monsters randomly. Note -this is only the initial spawn zone, as mobs random-walk, they are free to -move away from their specified spawn region. - -Monster name is the name the monsters will have on screen, and has no -relation whatsoever to their names anywhere else. It's the mob id that -counts, which identifies monster record in 'mob_db.txt' database of -monsters. If the mob name is given as "--ja--", the 'japanese name' field -from the monster database is used, (which, in Hercules, actually contains -an English name) if it's "--en--", it's the 'english name' from the -monster database (which contains an uppercase name used to summon the -monster with a GM command). - -Amount is the amount of monsters that will be spawned when this command is -executed, it is affected by spawn rates in 'battle.conf'. - -Delay1 and delay2 control monster respawn delays - the first one is the -fixed base respawn time, and the second is random variance on top of the -base time. Both values are given in milliseconds (1000 = 1 second). Note -that the server also enforces a minimum respawn delay of 5 seconds. - -You can specify a custom level to use for the mob different from the one -of the database by adjoining the level after the name with a comma. eg: -"Poring,50" for a name will spawn a monster with name Poring and level 50. - -Event is a script event to be executed when the mob is killed. The event -must be in the form "NPCName::OnEventName" to execute, and the event name -label should start with "On". As with all events, if the NPC is an -on-touch NPC, the player who triggers the script must be within 'trigger' -range for the event to work. - -There are two optional fields for monster size and AI. Size can be 0 -(medium), 1 (small), or 2 (big). AI can be 0 (default), 1 -(attack/friendly), 2 (sphere), 3 (flora), or 4 (zanzou). - -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). - -** NPC names - -/!\ WARNING: this applies to warps, NPCs, duplicates and shops /!\ - -NPC names are kinda special and are formatted this way: - -{::} - -All NPCs need to have a unique name that is used for identification -purposes. When you have to identify a NPC by it's name, you should use -. If is not provided, use -instead. - -The client has a special feature when displaying names: if the display -name contains a '#' character, it hides that part of the name. -Ex: if your NPC is named 'Hunter#hunter1', it will be displayed as 'Hunter' - - must be at most 24 characters in length. - must be at most 24 characters in length. - -** Define a warp point - -,,{,}%TAB%warp%TAB%%TAB%,,,, - -This will define a warp NPC that will warp a player between maps, and -while most arguments of that are obvious, some deserve special mention. - -SpanX and SpanY will make the warp sensitive to a character who didn't -step directly on it, but walked into a zone which is centered on the warp -from coordinates and is SpanX in each direction across the X axis and -SpanY in each direction across the Y axis. - -Warp NPC objects also have a name, because you can use it to refer to them -later with 'enablenpc'/'disablenpc'. - -Facing of a warp object is irrelevant, it is not used in the code and all -current scripts have a zero in there. - -** Define an NPC object. - -,,,%TAB%script%TAB%%TAB%,{} -,,,%TAB%script%TAB%%TAB%,,,{} - -This will place an NPC object on a specified map at the specified -location, and is a top-level command you will use the most in your custom -scripting. The NPCs are triggered by clicking on them, and/or by walking -in their trigger area, if defined. See that below. - -Facing is a direction the NPC sprite will face in. Not all NPC sprites -have different images depending on the direction you look from, so for -some facing will be meaningless. Facings are counted counterclockwise in -increments of 45 degrees, where 0 means facing towards the top of the map. -(So to turn the sprite towards the bottom of the map, you use facing 4, -and to make it look southeast it's facing 5.) - -Sprite is the sprite identifier used to display this particular NPC. For a -full list of sprite numbers see http://kalen.s79.xrea.com/npc/npce.shtml as -well as db/const.txt. -You may also use a monster's ID constant instead to display a monster sprite -for this NPC, in npcs that have view ids of mobs it's encouraged to use -OnTouch events with a 2,2 range and with an 'end' after the header to avoid -bugs (for more info on why see npc_click@map/npc.c). It is possible to use a job -sprite as well, but you must first define it as a monster sprite in 'mob_avail.txt', -a full description on how to do this is not in the scope of this manual. -A '-1' sprite will make the NPC invisible (and unclickable). -A 'HIDDEN_NPC' sprite will make an NPC which does not have a sprite, but is -still clickable, which is useful if you want to make a clickable object of -the 3D terrain. - -TriggerX and triggerY, if given, will define an area, centered on NPC and -spanning triggerX cells in every direction across X and triggerY in every -direction across Y. Walking into that area will trigger the NPC. If no -'OnTouch:' special label is present in the NPC code, the execution will -start from the beginning of the script, otherwise, it will start from the -'OnTouch:' label. Monsters can also trigger the NPC, though the label -'OnTouchNPC:' is used in this case. If player left area npc will called -if present label 'OnUnTouch'. - -The code part is the script code that will execute whenever the NPC is -triggered. It may contain commands and function calls, descriptions of -which compose most of this document. It has to be in curly brackets, -unlike elsewhere where we use curly brackets, these do NOT signify an -optional parameter. - -** Define a 'floating' NPC object. - --%TAB%script%TAB%%TAB%-1,{} - -This will define an NPC object not triggerable by normal means. This would -normally mean it's pointless since it can't do anything, but there are -exceptions, mostly related to running scripts at specified time, which is -what these floating NPC objects are for. More on that below. - -** Define a shop/cashshop NPC. - --%TAB%shop%TAB%%TAB%,:{,:...} -,,,%TAB%shop%TAB%%TAB%,:{,:...} - -This will define a shop NPC, which, when triggered (which can only be done -by clicking) will cause a shop window to come up. No code whatsoever runs -in shop NPCs and you can't change the prices otherwise than by editing the -script itself (no variables even exist at this point of scripting, so -don't even bother trying to use them). - -The item id is the number of item in the 'item_db.txt' database. If Price -is set to -1, the 'buy price' given in the item database will be used. -Otherwise, the price you gave will be used for this item, which is how you -create differing prices for items in different shops. - -You can alternatively use "cashshop" in place of "shop" to use the Cash -Shop interface, allowing you to buy items with special points (Currently -stored as account vars in #CASHPOINTS and #KAFRAPOINTS). This -type of shop will not allow you to sell items at it, you may only purchase -items here. The layout used to define sale items still count, and -"" refers to how many points will be spent purchasing the them. - -** Define a trader NPC -,,,%TAB%trader%TAB%%TAB%,{} --%TAB%trader%TAB%%TAB%-1,{} - -All the standards that are valid to script objects are also valid for trader objects -(see ** Define an NPC object for more information). -This will define a trader NPC, which can cause a shop, cashshop or market window -to come up when clicked or called by other means. Unlike shop/cashshop NPCs this -type will run a code and can change the items that are being sold over time without -other NPC objects. -The types that a trader object can have are the following: -- NST_ZENY (0) Normal Zeny Shop (shop) -- NST_CASH (1) Normal Cash Shop (cashshop) -- NST_MARKET (2) Normal NPC Market Shop (where items have limited availability - and need to be refurbished) -- NST_CUSTOM (3) Custom Shop (any currency, item/var/etca, check sample) -Unless otherwise specified via *tradertype an trader object will be defined as -NST_ZENY. - -Note: NST_MARKET is only available with PACKETVER 20131223 or newer. -See '12 - NPC Trader-Related Commands' and /doc/sample/npc_trader_sample.txt for -more information regarding how to use this NPC type. - -** Define an warp/shop/cashshop/NPC duplicate. - -warp: ,,{,}%TAB%duplicate(