readme.txt 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % Kafra Express Script Package Documentation %
  3. % - by Skotlex %
  4. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  5. This file's purpose is to give an indepth explanation about setting up, and
  6. configuring the Kafra Express Script Package (KESP). It is intended to be
  7. viewed by a text editor using fixed-width font and 80-character long lines.
  8. Document Version v2.0 (27/September/2006)
  9. ////////////////////////////////////////////////////////////////////////////////
  10. Table of Contents
  11. ////////////////////////////////////////////////////////////////////////////////
  12. [00] Including the NPC files and menu editing
  13. [01] Intro to module configuring and general options (config.txt)
  14. [02] Module: Main Core (ke_main.txt)
  15. [03] Module: Bank (ke_bank.txt)
  16. [04] Module: Broadcast (ke_broadcast.txt)
  17. [05] Module: Stylist (ke_dye.txt)
  18. [06] Module: Job Changer (ke_jobchange.txt)
  19. [07] Module: Job Swapper (ke_jobswap.txt)
  20. [08] Module: Smithery (ke_refine.txt)
  21. [09] Module: Renting (ke_refine.txt)
  22. [10] Module: Kafra Shop (ke_shop.txt)
  23. [11] Module: Stat/Skill Market (ke_statmarket.txt)
  24. [12] Module: Stat/Skill Resets/Raising (ke_stats.txt)
  25. [13] Module: Uncarding (ke_uncard.txt)
  26. [14] Module: Town Warping (ke_warp_town.txt)
  27. [15] Module: Dungeon Warping (ke_warp_dungeon.txt)
  28. [16] Module: PvP Warping (ke_warp_pvp.txt)
  29. [17] Module: WoE Warping (ke_warp_woe.txt)
  30. [18] The kafras.txt file: About Kafra Definitions
  31. ////////////////////////////////////////////////////////////////////////////////
  32. [00] Including the NPC files and menu editing
  33. ////////////////////////////////////////////////////////////////////////////////
  34. Because of the script's complexity, placing everything in a single file
  35. is out of the question, therefore the KESP comes bundled in different
  36. files. Because of the dynamic nature of the script, there are two things
  37. you need to do in order to enable/disable a particular service:
  38. 1. Include the txt file with the corresponding module.
  39. To include the txt files, you need to know two things: where are the script
  40. files located, and which is the configuration file where you place the npc
  41. includes. We'll assume on this guide that you unpacked the KESP in
  42. npc/custom/kafraExpress. The configuration file for scripts is
  43. conf/map_athena.conf for eA1.0rc5, and npcs/scripts_custom.txt for current eA
  44. SVN versions. Add the files you want in the following manner:
  45. npc: npc/custom/kafraExpress/ke_main.txt
  46. //npc: npc/custom/kafraExpress/ke_rent.txt
  47. The first line is including the file ke_main.,txt, while the following
  48. excludes ke_rent from being used. Placing the "//" at the beginning of the
  49. line is known as commenting, and it's a useful way of quickly toggling a
  50. certain script on/off. The following is the list of all files that come
  51. bundled in the package:
  52. npc: npc/custom/kafraExpress/kafras.txt
  53. npc: npc/custom/kafraExpress/config.txt
  54. npc: npc/custom/kafraExpress/ke_main.txt
  55. npc: npc/custom/kafraExpress/ke_bank.txt
  56. npc: npc/custom/kafraExpress/ke_broadcast.txt
  57. npc: npc/custom/kafraExpress/ke_dye.txt
  58. npc: npc/custom/kafraExpress/ke_jobchange.txt
  59. npc: npc/custom/kafraExpress/ke_jobswap.txt
  60. npc: npc/custom/kafraExpress/ke_rent.txt
  61. npc: npc/custom/kafraExpress/ke_shop.txt
  62. npc: npc/custom/kafraExpress/ke_statmarket.txt
  63. npc: npc/custom/kafraExpress/ke_stats.txt
  64. npc: npc/custom/kafraExpress/ke_refine.txt
  65. npc: npc/custom/kafraExpress/ke_uncard.txt
  66. npc: npc/custom/kafraExpress/ke_warp_dungeon.txt
  67. npc: npc/custom/kafraExpress/ke_warp_pvp.txt
  68. npc: npc/custom/kafraExpress/ke_warp_town.txt
  69. npc: npc/custom/kafraExpress/ke_warp_woe.txt
  70. What files can be commented, which files you want to include? On the minimum,
  71. you need ke_main.txt, kafras.txt and config.txt to have the bare-bones functionality.
  72. Refer to the table of context to see the relation between files and the
  73. services they offer.
  74. 2. Configure the Menus
  75. The second part of the configuration is adding/removing the menu entries that
  76. lead to the specific services. Failure to do this can either A. leave you with
  77. menu entries that lead to "Function Not found!" errors on the map server, or
  78. B. Services that were included, but you can't pick because they don't show up
  79. in the menu. The main file where you should configure the menus is ke_main.txt.
  80. From the main module, ke_main.txt, you must pick which services are available.
  81. The file contains eight menu sections, which is made up of two pairs of
  82. identitical menus. The only difference is that the first menu is displayed on
  83. Kafras placed on towns, while the second menu is for Kafras placed on fields and
  84. dungeons. The menu roughly looks like this:
  85. menu
  86. "- Leave",L_END,
  87. "- Heal Service ("<some code here>"z/10SP)",L_HEAL,
  88. "- Warp Service",L_WARP,
  89. // "- Use Storage ("<some code here>"z)",L_STORAGE,
  90. // "- Use Guild Storage ("<some code here>"z)",L_GUILD_STORAGE,
  91. "- Job Services",M_JOB,
  92. "- Other Services",M_OTHER,
  93. "- Save Respawn point",L_SAVE;
  94. This is the main menu, as you can see the only service unavailable is to use
  95. the storage. Like in the npc/config file, you can comment the lines of the
  96. services you do not want.
  97. WARNING: If you need to comment the last option of a menu, remember to replace
  98. the comma for a semi-colon on the next-to-last option or script parsing errors
  99. will occur.
  100. The "Warp Service" leads to the second pair of menus you can configure:
  101. menu
  102. "- Return",-,
  103. "- Dungeons",L_DUNGEON,
  104. // "- PvP Arena",L_PVP,
  105. // "- Guild Wars",L_GUILD_DUNGEON,
  106. "- Towns",L_TOWN;
  107. goto M_INIT;
  108. As before, you can comment/uncomment the features you want or not. Likewise,
  109. the third menu under "Job Services" contains features related to job changing,
  110. stats/skills and renting. The fourth pair is the "Other Services" menu which
  111. contains the rest of modules which are probably not going to be used
  112. frequently.
  113. For your convenience, the following is the list of all the menu options and the file(s) required for it to work:
  114. //Main Menu (under labels M_INIT/MD_INIT)
  115. "- Heal Service" -> ke_main.txt
  116. "- Warp Service"
  117. "- Use Storage" -> ke_main.txt
  118. "- Use Guild Storage" -> ke_main.txt
  119. "- Job Services"
  120. "- Other Services"
  121. "- Save Respawn point" -> ke_main.txt
  122. //Warp Menu (under labels M_WARP/MD_WARP)
  123. "- Dungeons" -> ke_warp_dungeon.txt
  124. "- PvP Arena" -> ke_warp_pvp.txt
  125. "- Guild Wars" -> ke_warp_gvg.txt
  126. "- Towns" -> ke_warp_town.txt
  127. //Job Services Menu (under labels M_JOB/MD_JOB)
  128. "- Change Job" -> ke_jobchange.txt
  129. "- Swap Job" -> ke_jobswap.txt
  130. "- Stat/Skill Services" -> ke_stats.txt
  131. "- Stat/Skill Market" -> ke_statmarket.txt
  132. "- Rental Service" -> ke_rent.txt
  133. //Other Services Menu (under labels M_OTHER/MD_OTHER)
  134. "- Bank Services" -> ke_bank.txt
  135. "- Use Kafra Shop" -> ke_shop.txt
  136. "- Broadcast a message" -> ke_broadcast.txt
  137. "- Refine Services" -> ke_refine.txt
  138. "- Uncard Services" -> ke_uncard.txt
  139. "- Stylist Service" -> ke_dye.txt
  140. "- Use a Kafra Pass" -> ke_main.txt
  141. ////////////////////////////////////////////////////////////////////////////////
  142. [01] Intro to individual module configuration.
  143. ////////////////////////////////////////////////////////////////////////////////
  144. For portability reasons, the configure options for every module is in the file
  145. config.txt, which lets you upgrade to future versions without having to
  146. readjust your settings every time.
  147. The config file has the options separated per module to make it easier to
  148. read. There may be bits of code in each section to avoid parsing configure
  149. options for unneeded variables which should be left alone. In some rare
  150. occassions variables from one module will be used in a different module (ie:
  151. Broadcasting PvP messages uses the variables from the pvp module). all variables
  152. follow the standard "ke<module initials>_variablename", so a variable called
  153. "kewd_discount" refers to the discount variable in the deep warps module (wd).
  154. For example, the renting module's configuration segment is:
  155. //-------------------------------------------------------------------------------
  156. //Config for the Renting Module
  157. //-------------------------------------------------------------------------------
  158. OnLoadRent:
  159. set $@kert_cartOnly, 0; //Set to 1 to enable only cart rental, 0 enables all add-ons.
  160. set $@kert_cartCost, 2000; //Cost to rent a Cart.
  161. set $@kert_falconCost, 2000; //Cost to rent a Falcon.
  162. set $@kert_pecoCost, 2000; //Cost to rent a PecoPeco.
  163. end;
  164. Variables are usually of two types: Exact value based or Percentage based.
  165. Exact value variables are often price for different services, while the
  166. percentage based are things like 30% discount when using Kafra Passes.
  167. Percentage values are expressed per-hundredth (that is, 10 = 10%, 100 = 100%)
  168. unless otherwise specified.
  169. Each variable has a small description next to it, hence the need of this
  170. document. In this document the variable type is identified next to it by: (1)
  171. when it's boolean, (%) when it's a percentage, ($) when it's a price, (#) for
  172. numbers and (") for strings.
  173. ////////////////////////////////////////////////////////////////////////////////
  174. [02] Module: Main Core (ke_main.txt)
  175. ////////////////////////////////////////////////////////////////////////////////
  176. Description
  177. ================================================================================
  178. This module offers the core functionality of the Kafra Express. Contains the
  179. main menu and handles the Kafra Pass Reserve Points system.
  180. Variables
  181. ================================================================================
  182. (1) ke_saveOnSpot
  183. -----------------
  184. When 1, a character's respawn point is saved exactly where they are standing.
  185. otherwise, the respawn point is specified by the kafra definition (see Section
  186. 18).
  187. ($) keh_hpCost
  188. ($) keh_spCost
  189. --------------
  190. The cost of healing sp per every 10 sp. For example, if the cost is 1, it
  191. costs 100z to heal 1000.
  192. ($) kes_cost
  193. ($) kegs_cost
  194. -------------
  195. The cost of using the storage, guild storage (respectively)
  196. (#) kekp_reset
  197. --------------
  198. For Kafra Passes. When set, the Pass expires after starting a chat with the
  199. Kafra the amount of times specified. Otherwise the variable remains active a
  200. pretty long time (probably all session). For example, if set to 2, after
  201. activating the pass and opening the storage, the Pass will still be active
  202. the next time you speak to a kafra, it will expire on the "third" time you
  203. speak to her.
  204. ($) kekp_reserveCost
  205. --------------------
  206. The cost in zeny of reserve points. When using a Kafra Pass many services will
  207. be cheaper, the amount of zeny saved is "used" to grant the player reserve
  208. points. For example, if the reserve cost is 100, for every 100z the player
  209. saves, he'll earn 1 reserve points. Reserve points can be used in scripts, and
  210. by default is used in the Al De Baran Kafra Headquarters to gain items. Use a
  211. value of 0 to disable Reserve Point gaining.
  212. (#) kekp_minReserve
  213. (#) kekp_maxReserve
  214. ---------------
  215. What is the minimum/maximum reserve points the player can gain when using a
  216. Kafra Pass per transaction? This only applies when the player has saved at
  217. least 1z.
  218. (") ked_users
  219. -------------
  220. Certain modules (in particular, the warping ones) have the ability to display
  221. the number of players related to the function (ie: number of users in a
  222. dungeon), in such cases this variable is used to display the 'unit' of said
  223. count. For example, if ked_users is "kids" then the related modules might
  224. display things like "- Glast Heim (6 kids)".
  225. ////////////////////////////////////////////////////////////////////////////////
  226. [03] Module: Bank (ke_bank.txt)
  227. ////////////////////////////////////////////////////////////////////////////////
  228. Description
  229. ================================================================================
  230. This modules enables characters to "store" zeny on a virtual bank account
  231. which is shared among characters of the same account. There can be deposits,
  232. withdrawals, which can have transactions fees associated.
  233. It is also possible to establish a monthly maintenance fee that has to be
  234. payed, when the player does not has enough money in the account to pay this
  235. fee, they stop gaining interests until they deposit enough to pay it up.
  236. Finally, all fees charged by the bank can be stored in a server-wide variable
  237. which may be used by other custom scripts.
  238. Variables
  239. ================================================================================
  240. (%) kebk_depositCost
  241. (%) kebk_withdrawCost
  242. ---------------------
  243. The Fee in % charged whenever a player does a deposit/withdrawal. For example,
  244. when a player deposits 100z and the fee is 3%, only 97z are deposited, and 3z
  245. are charged. Likewise, if a player withdraws 100z when the fee is of 5%,
  246. they'll withdraw 100z and an additional 5z will be removed from their accounts
  247. as fee cost.
  248. ($) kebk_minTransact
  249. ($) kebk_maxTransact
  250. --------------------
  251. The minimum/maximum values of a single transaction (deposit or withdrawal)
  252. ($) kebk_capacity
  253. -----------------
  254. Indicates what is the bank account capacity for players. That is, what is the
  255. maximum zeny their account can hold. You can't deposit anymore once the max
  256. has been reached, and daily interests are lost while maxed.
  257. (%) kebk_dayInterest
  258. --------------------
  259. The daily interests that the account makes. The value is in 0.01% units, so a
  260. value of 100 equals 1% daily interests.
  261. ($) kebk_monMaintenance
  262. -----------------------
  263. Monthly flat fee charged for maintenance.
  264. (1) kebk_useGlobalBank
  265. ----------------------
  266. When 1, every fee charged from the player goes into a server variable
  267. ($ke_globalbank), which can then be used by other scripts. is 0 by default
  268. because none of the Kafra Express modules uses it.
  269. ////////////////////////////////////////////////////////////////////////////////
  270. [04] Module: Broadcast (ke_broadcast.txt)
  271. ////////////////////////////////////////////////////////////////////////////////
  272. Description
  273. ================================================================================
  274. Provides broadcasting services for players. Broadcasts can be local (current
  275. map only) or global (server announce), there are also four types of broadcast:
  276. Requests for a party, PvP Challenge invitations, General Broadcasts (player
  277. input the string they want to say) and General Anonymous Broadcasts (player
  278. name is not displayed when doing the broadcast).
  279. Note that the variables from ke_warp_pvp.txt will be used for auto-configuring
  280. the pvp broadcasts.
  281. Variables:
  282. ================================================================================
  283. (1) kebc_showOnline
  284. -------------------
  285. When 1, the total count of players will be displayed in the menu (map users
  286. next to the local broadcast entry, server users next to the global broadcast
  287. entry).
  288. ($) kebc_partyCost
  289. ($) kebc_pvpCost
  290. ($) kebc_cost
  291. ($) kebc_anonCost
  292. ------------------
  293. Respective base costs for doing Party-Requests/Pvp Challenge/General/Anonymous
  294. broadcasts.
  295. (%) kebc_globalFactor
  296. ---------------------
  297. When the broadcast is global, the base cost is multipled by this factor. If
  298. the factor is 500, then global broadcasts cost 5x times the cost of the map's
  299. broadcast.
  300. (%) kebc_discount
  301. -----------------
  302. Discount on broadcast prices when the Kafra Pass is active.
  303. ////////////////////////////////////////////////////////////////////////////////
  304. [05] Module: Stylist (ke_dye.txt)
  305. ////////////////////////////////////////////////////////////////////////////////
  306. Description
  307. ================================================================================
  308. Offers cloth dye, hair dye and hair style changes, both by input and by wheel
  309. browsing. Does not consumes dyestuffs because it is designed for custom dye
  310. packages.
  311. Variables
  312. ================================================================================
  313. (1) kedy_enableHairstyle
  314. ------------------------
  315. If one, the menu will include hair-style changing options, otherwise only
  316. dye-changes are offered
  317. (#) kedy_styles
  318. ---------------
  319. Specifies the number of available hair styles
  320. (#) kedy_hair
  321. -------------
  322. Specificies the number of hair dyes
  323. (#) kedy_clothJN
  324. (#) kedy_clothJ1ST
  325. (#) kedy_clothJ2ND
  326. (#) kedy_clothJSN
  327. ------------------
  328. Specifies the number of cloth dyes based on job-type: Novices, First Classes,
  329. Second Classes, Super Novices.
  330. Note that special classes like Xmas or Wedding tend to not have palettes, and
  331. it should be handled server-side so that switching palettes with this module
  332. will not cause you client crashes.
  333. ////////////////////////////////////////////////////////////////////////////////
  334. [06] Module: Job Changer (ke_jobchange.txt)
  335. ////////////////////////////////////////////////////////////////////////////////
  336. Description
  337. ================================================================================
  338. Offers job changing, including rebirth and baby classes. The rebirth system
  339. can allow people free changing through a different path, or forcing the
  340. correct path. Zeny can be charged/granted as well as weapons on job-change.
  341. Remaining Skill Points can be wiped, ignored or prevent the change from
  342. happening. Before changing players can review the consequences of doing so,
  343. including weapons to gain.
  344. Finally, there's an option that makes it possible to skip the novice class
  345. altogether and change directly to first jobs.
  346. Variables
  347. ================================================================================
  348. (#) kejc_skillsPolicy
  349. ---------------------
  350. Determines what to do with remaining skill points upon change:
  351. 0: No job changing until points are used.
  352. 1: Extra Skill Points are wiped.
  353. 2: Extra skill points are conserved.
  354. (#) kejc_upperPolicy
  355. --------------------
  356. What to do about the advanced classes?
  357. 0: Free for all, players can pick any advanced job regardless of the previous.
  358. 1: Force mode, classes are auto-selected from the previous path. In the
  359. case the path could not be determined (players changed jobs previously
  360. using other npcs), players will be able to select their next job.
  361. (#) kejc_disable
  362. ----------------
  363. Permits disabling some job trees from the changer (add as required):
  364. 1: You can't change to a S. Novice
  365. 2: You can't change to Taekwon (but if you are a Taekwon already, you can
  366. still change to Soul Linker/Star Gladiator)
  367. 4: Can't change to GunSlinger
  368. 8: Can't change to Ninja
  369. (1) kejc_announce
  370. -----------------
  371. When 1, a global announce will be done upon change.
  372. (1) kejc_resetDye
  373. -----------------
  374. If one, the cloth dye is reset upon changing.
  375. (1) kejc_skipNovice
  376. -------------------
  377. If one, players can skip the novice class and directly into their first job.
  378. Exploit proof, skills are wiped when changing to a 1st class this way, and
  379. their basic skill level is set to 9.
  380. (#) kejc_baseSN
  381. ---------------
  382. Base Level required before changing into a Super Novice.
  383. (#) kejc_base2ND
  384. (#) kejc_job2ND
  385. (#) kejc_cost2ND
  386. ----------------
  387. Base level, Job level and zeny required to change into a second job. If the
  388. cost is below zero, zeny will be given to the player instead of charged.
  389. (#) kejc_baseRebirth
  390. (#) kejc_jobRebirth
  391. (#) kejc_costRebirth
  392. --------------------
  393. Base level, Job level and zeny required before doing a rebirth (change to High
  394. Novice).
  395. (1) kejc_rebirthReset
  396. ---------------------
  397. If 1, when changing into a HighNovice characters will have their level reset
  398. to 1 (with the additional 100 stat points)
  399. (1) kejc_weaponPolicy
  400. ---------------------
  401. If 1, characters will get a weapon upon job change. For each first&second
  402. class there are two weapons to specify, the standard weapon and the "premium"
  403. one.
  404. (#) kejc_wBonusLv
  405. -----------------
  406. When characters reach this job level, they will receive the premium weapon instead of the normal one. If 0, premium weapons are disabled.
  407. (#) kejc_weapon1[]
  408. (#) kejc_weapon_21[]
  409. (#) kejc_weapon_22[]
  410. -----------------------
  411. These arrays contain the IDs of the normal weapons received upon job change
  412. for first, 2-1 and 2-2 classes (if weapon policy is in effect). Refer to the
  413. comments in the config file for identifying which position is for which job.
  414. (#) kejc_weapon2_21[]
  415. (#) kejc_weapon2_22[]
  416. --------------------
  417. These arrays contain the ID of the premium weapons received upon job change
  418. (if bonus weapon policy is in effect). Note that first classes can't get a
  419. bonus weapon, and that Bard/Dancers both receive the same weapon. Refer to the
  420. comments in the config file for identifying which position is for which job.
  421. ////////////////////////////////////////////////////////////////////////////////
  422. [07] Module: Job Swapper (ke_jobswap.txt)
  423. ////////////////////////////////////////////////////////////////////////////////
  424. Description
  425. ================================================================================
  426. Permits characters to change jobs among other jobs of their same "level".
  427. This is, between first classes or between second classes. It is also possible
  428. to store the last job used and revert to it at a later date. Dye, Job Level
  429. and Skill Point count is saved, however the skill-tree is not saved and skills
  430. need be reallocated. When reverting to the previous class, characters might be
  431. able to return from an adv class to a normal one, but if they are baby
  432. classes, they can't change back to a normal one.
  433. Variables
  434. ================================================================================
  435. (#) kejs_disable
  436. -----------------
  437. You can disable some classes from swapping using this setting (add numbers as
  438. appropiate):
  439. 1: Super Novices may not swap/swap to.
  440. 2: Disable swapping for Taekwon/Star Gladiator/Soul Linker classes.
  441. 4: Disable swapping to/from GunSlinger.
  442. 8: Disable swapping to/from Ninja.
  443. For example, if you set it to 12 (8+4), the swap menu will not include
  444. Gunslinger nor Ninja, and they will find that they can't swap to other classes
  445. neither.
  446. (#) kejs_revertPolicy
  447. ---------------------
  448. Determines if Reverting classes is possible and when:
  449. 0: Cannot go back to the previous job.
  450. 1: Can only go back if the previous job belongs to the same type as the
  451. first (is also a 1st/2nd job and is the same normal/adv/baby category).
  452. 2: Can return to the previous job regardless (exception: when one of the
  453. two jobs is a baby job and the other is not).
  454. (1) kejs_announce
  455. -----------------
  456. If 1 does a server announce when swapping jobs.
  457. ($) kejs_revertCost
  458. -------------------
  459. Cost of changing to the previous job.
  460. (1) kejs_saveDye
  461. ----------------
  462. If one, the dye is saved when swapping and restored upon revert.
  463. (1) kejs_resetDye
  464. -----------------
  465. If 1 the clothe dye is reset upon swap.
  466. (%) kejs_swapDiscount
  467. (%) kejs_revertDiscount
  468. -----------------------
  469. Discount % to apply when the kafra pass is active for swapping/reverting.
  470. (#) kejs_job1ST
  471. (#) kejs_job2ND
  472. ---------------
  473. Minimum job level before being able to swap among 1st/2nd classes.
  474. ($) kejs_cost1ST
  475. ($) kejs_cost2ND
  476. ----------------
  477. Base cost of swaping jobs.
  478. (%) kejs_discount1ST
  479. (%) kejs_discount2ND
  480. --------------------
  481. Discount % to apply to the base cost for every job level above the minimum
  482. required. For example, if the discount is 1% per level and you change when you
  483. have +10 level more than the min necessary, you get a 10% discount.
  484. (%) kejs_preserve1ST
  485. (%) kejs_preserve2ND
  486. --------------------
  487. Indicates how much of the previous job level to preserve when changing. For
  488. example, if the preserve value is 50 (50%) and you change from a level 40
  489. Knight into Priest, you'll become a lv 20 Priest. Skill points are adjusted
  490. accordingly so it's exploit-free.
  491. ////////////////////////////////////////////////////////////////////////////////
  492. [08] Module: Smithery (ke_refine.txt)
  493. ////////////////////////////////////////////////////////////////////////////////
  494. Description
  495. ================================================================================
  496. Offers the services usually found in the town smithery and then some more:
  497. Item refining, Item Repairing, Ore Purification (rough oris -> pure ones).
  498. Also sells Phracon and Emveretarcon.
  499. Item refining can follow all the rules of normal refining, but it can also
  500. override them to refine everything, or safe refines up to max level.
  501. Ore Purification can be extended to include all the rough materials that
  502. blacksmiths can purify (star dust -> star crumbs, for example).
  503. Variables
  504. ================================================================================
  505. (#) kerf_maxLv
  506. --------------
  507. Maximum refinement level of equipment.
  508. (1) kerf_safe
  509. -------------
  510. If 1 success chances are ignoring and refining never fails.
  511. (1) kerf_showChance
  512. -------------------
  513. If 1 the chance of success/failure is actually shown before confirming.
  514. (1) kerf_refineAll
  515. ------------------
  516. If 1 then unrefinable items will be refined too (like accesories)
  517. (%) kerf_discount
  518. -----------------
  519. Discount rate to be applied during forging when the Kafra Pass is active.
  520. ($) kerf_armorCost
  521. ($) kerf_weaponLv1Cost
  522. ($) kerf_weaponLv2Cost
  523. ($) kerf_weaponLv3Cost
  524. ($) kerf_weaponLv4Cost
  525. ----------------------
  526. Cost per level to refine armors, and level 1/2/3/4 weapons.
  527. (1) kerf_purifyAll
  528. ------------------
  529. If 1, the extended purify menu will be used, which shows how to purify steels,
  530. star crumbs, etc; otherwise, just elus and oris are available.
  531. ($) kerf_repairCost
  532. -------------------
  533. Cost of repairing a broken weapon.
  534. (%) kerf_repairDiscount
  535. -----------------------
  536. Repair Discount% when the kafra pass is active.
  537. (1) kerf_repairSteel
  538. --------------------
  539. If 1, a steel will be required to repair items.
  540. ////////////////////////////////////////////////////////////////////////////////
  541. [09] Module: Renting (ke_refine.txt)
  542. ////////////////////////////////////////////////////////////////////////////////
  543. Description
  544. ================================================================================
  545. Allows renting of Cart/Falcon/PecoPeco. Note that the only restriction applied
  546. is whether the character has "PushCart", "Falcon Taming" or "PecoPeco Riding",
  547. it does not checks for the character's class.
  548. It must also be noted that renting is free while the Kafra Pass is active.
  549. Variables
  550. ================================================================================
  551. (1) kert_cartOnly
  552. -----------------
  553. If 1, this module only offers cart rentals. Otherwise you can rent any of the three.
  554. ($) kert_cartCost
  555. ($) kert_falconCost
  556. ($) kert_pecoCost
  557. -------------------
  558. Cost for renting carts/falcons/pecos.
  559. ////////////////////////////////////////////////////////////////////////////////
  560. [10] Module: Kafra Shop (ke_shop.txt)
  561. ////////////////////////////////////////////////////////////////////////////////
  562. Description
  563. ================================================================================
  564. Allows invoking of a shop from the Kafra. Note that the shops must be of
  565. invisible type (ke_shop.txt has an example of two such shops). The config
  566. enables you to select whether the shop will allow buying, selling or
  567. both, as well as the name of the shops to use in towns or dungeons (if you
  568. want to use a custom shop defined elsewhere or want to use the same shop for
  569. both).
  570. Variables
  571. ================================================================================
  572. (#) $@kesh_towntype
  573. (#) $@kesh_duntype
  574. -------------------
  575. Specifies the type of transaction allowed at the shop. Use 1 to enable only
  576. buying of items, 2 for only selling, or any other value for both.
  577. (#) $@kesh_townshop$
  578. (#) $@kesh_dunshop$
  579. --------------------
  580. Specifies the name of the shop to use for buying/selling of items. By default
  581. the file includes two such shops which you can use, or you can disable them
  582. and specify your own in the config changing these variables.
  583. ////////////////////////////////////////////////////////////////////////////////
  584. [11] Module: Stat/Skill Market (ke_statmarket.txt)
  585. ////////////////////////////////////////////////////////////////////////////////
  586. Description
  587. ================================================================================
  588. Not really a "market", this module lets players sell and buy stat/skill
  589. points. Also allows for direct trading between stats/skills.
  590. NOTE: Selling stat points can lead to zeny exploits if your server uses the
  591. stat_db.txt file, because players can then sell all their stat points, do a
  592. reset and get them back! To prevent this, set the following battle config
  593. option:
  594. use_statpoint_table: no
  595. Alternatively, you can set the selling point of statpoints to be 0z.
  596. Variables
  597. ================================================================================
  598. ($) kesm_stBuyPrice
  599. ($) kesm_stSellPrice
  600. --------------------
  601. Price for every stat point to be bought/sold.
  602. ($) kesm_skBuyPrice
  603. ($) kesm_skSellPrice
  604. --------------------
  605. Price for every skill point to be bought/sold.
  606. (%) kesm_discount
  607. -----------------
  608. Discount price when kafra pass is active. Only applies to buying stats/skills.
  609. (#) kesm_skTradePrice
  610. (#) kesm_stTradePrice
  611. ---------------------
  612. These two define how many stat points are traded per each skill point when
  613. doing a direct conversion between stats/skills. The idea is that trading
  614. directly one for the other should be cheaper than selling them and then buying
  615. from the other. You can set both to the same value and the trading will have
  616. no loss.
  617. Notice that skTradePrice is the cost for converting stats to skills and
  618. stTradePrice is the cost for converting skills to stats. So... NEVER set
  619. stTradePrice higher than skTradePrice or you allow an easy exploit of infinite
  620. stats/skills!
  621. ////////////////////////////////////////////////////////////////////////////////
  622. [11] Module: Stat/Skill Resets/Raising (ke_stats.txt)
  623. ////////////////////////////////////////////////////////////////////////////////
  624. Description
  625. ================================================================================
  626. Does stat/skills resets, and additionally helps characters raise their basic
  627. stats faster. Optionally, skill resets will not touch the basic-skill level.
  628. Price have two components: base fee and per level fee, so characters with
  629. higher levels will have to pay more for a reset than low level ones.
  630. For stat resetting, base level is taken into account. For skill resets, job
  631. levels. For a dual reset, the addition of both is considered. Also, when taken
  632. into consideration job level for second classes, the job-level at which one
  633. changed jobs is also considered. So a Job level 1 Knight actually has job
  634. level of 41~51.
  635. NOTE: Be careful with quest skills. If your server is configured to reset
  636. quest skills and players can get their quest skills for free, you are letting
  637. them exploit the system and get unlimited skill points! (even worse if they
  638. can sell'em in the Stat/Skills market module). Be sure to either remove free
  639. quest skills npcs or make quest skills not resetable.
  640. Variables:
  641. ================================================================================
  642. ($) kest_stResetCost
  643. --------------------
  644. Base cost of doing a stat reset.
  645. ($) kest_skResetCost
  646. --------------------
  647. Base cost of doing a skill reset.
  648. ($) kest_resetCost
  649. ------------------
  650. Base cost of a dual reset.
  651. ($) kest_BaseLvCost
  652. -------------------
  653. Cost per Base level for doing a stat reset.
  654. ($) kest_JobLvCost
  655. ------------------
  656. Cost per Job level for doing a skill reset.
  657. ($) kest_BothLvCost
  658. -------------------
  659. Cost per Base+Job level for doing a dual reset.
  660. (%) kest_discount
  661. -----------------
  662. Discount % applied when Kafra Pass is active.
  663. (1) kest_resetBasic
  664. -------------------
  665. If 1, the skill "basic skill" is also reset.
  666. ////////////////////////////////////////////////////////////////////////////////
  667. [12] Module: Uncarding (ke_uncard.txt)
  668. ////////////////////////////////////////////////////////////////////////////////
  669. Description
  670. ================================================================================
  671. This module allows people to remove cards from their equipped items. Prices
  672. are modified by the item type, the amount of cards and the refine level of the
  673. item. There's also a chance the removal will fail and: Nothing is lost, the
  674. card or item is lost, both are lost. The procedure may also require up to two
  675. different items (and each one with their own specified qty).
  676. Variables:
  677. ================================================================================
  678. ($) keuc_BaseCost
  679. -----------------
  680. Base cost of uncarding, modified by the following conditions:
  681. ($) keuc_CardCost
  682. -----------------
  683. Each card to be removed increases the total by this value.
  684. ($) keuc_UpgradeCostA
  685. ($) keuc_UpgradeCostW1
  686. ($) keuc_UpgradeCostW2
  687. ($) keuc_UpgradeCostW3
  688. ($) keuc_UpgradeCostW4
  689. ----------------------
  690. These indicate the price increase per refine level for armors and weapons
  691. levels 1/2/3/4. A +10 armor gets a price increases of ten times
  692. keuc_UpgradeCostA.
  693. (%) keuc_discount
  694. -----------------
  695. Discount % to apply when kafra pass is active.
  696. (#) keuc_Mat1
  697. (#) keuc_Qty1
  698. -------------
  699. Id and Qty of the first material that is needed to uncard. If the qty is zero,
  700. then it's disabled.
  701. (#) keuc_Mat2
  702. (#) keuc_Qty2
  703. -------------
  704. id & Qty of the second material to use. Only valid if the first material was
  705. also defined, use qty=0 to disable.
  706. (%) keuc_Fail0Chance
  707. --------------------
  708. This is the safe failure chance (0-1000, where 1000 = 100.0%). A Safe failure
  709. means the original item remains intact, but you are still charged the money
  710. and the materials. Use 0 to disable this type of failure.
  711. (%) keuc_Fail1Chance
  712. --------------------
  713. This is the partial failure chance (0-1000). Partial failures are when either
  714. the cards or the item is lost. The player gets to choose which one is more
  715. important before proceeding. Use 0 to disable.
  716. (%) keuc_Fail2Chance
  717. --------------------
  718. Total failure chance (0-1000). When this triggers, both item and cards are
  719. lost. Use 0 to disable.
  720. ////////////////////////////////////////////////////////////////////////////////
  721. [14] Module: Town Warping (ke_warp_town.txt)
  722. ////////////////////////////////////////////////////////////////////////////////
  723. Description
  724. ================================================================================
  725. This module enables warping to towns. Currently all towns have the same
  726. warping cost, independent of how far away they are placed. The only exception
  727. is Niflheim, which is more of a dungeon than a town.
  728. Variables
  729. ================================================================================
  730. (1) kewt_showOnline
  731. -------------------
  732. If set to 1, the menus will display the online count of players in
  733. towns.
  734. ($) kewt_cost
  735. -------------
  736. Cost of warping to a town.
  737. ($) kewt_niflCost
  738. -----------------
  739. Cost of warping to Niflheim. Different cost since Niflheim is more of a
  740. dungeon than a city. Also, players can't warp to Niflheim until they do the
  741. Niflheim Piano Key Quest.
  742. (#) kewt_travel
  743. ---------------
  744. Allows enabling the traveller system. The traveller system makes it so you can't
  745. warp to a town until you have been there first by some other means (usually
  746. walking) and saved with the Kafra Express in that town.
  747. There are three valid values for this variable: 0, 1, 2.
  748. 0 - Disables this mode.
  749. 1 - Uses the mode on a per character basis; that is, each character needs to
  750. travel to that town and save and that unlocks warping only for that
  751. character.
  752. 2 - Uses the mode on a per account basis; that is, once a character has saved
  753. on a town, all other (and future) characters from the same account have the
  754. warp unlocked.
  755. (1) kewt_free
  756. -------------
  757. If 1, players will be able to warp to towns even if they run out of money.
  758. Niflheim excepted.
  759. (%) kewt_discount
  760. -----------------
  761. Discount % to apply when warping while the Kafra Pass is active.
  762. ////////////////////////////////////////////////////////////////////////////////
  763. [15] Module: Dungeon Warping (ke_warp_dungeon.txt)
  764. ////////////////////////////////////////////////////////////////////////////////
  765. Description
  766. ================================================================================
  767. Offers warps to all dungeons. Dungeon warping has two main operation modes:
  768. Deep Dungeon Warping and Short Dungeon Warping. Deep Dungeon warping enables
  769. players to warp to any level of any dungeon, while Short Dungeon Warping is
  770. restricted to warping only to the entrance of the dungeon. Traveller's mode is
  771. also available for dungeons.
  772. Variables
  773. ================================================================================
  774. (1) kewd_showOnline
  775. -------------------
  776. If set to 1, the menus will display the online online count of characters in
  777. the dungeons.
  778. (%) kewd_discount
  779. -----------------
  780. Discount % to apply when warping while the Kafra Pass is active.
  781. (#) kewd_travel
  782. ---------------
  783. Enables the traveller system. Just like the traveller's system for towns,
  784. you can't warp to any dungeon to which you have not visited first on foot and
  785. saved with the corresponding Kafra Express first.
  786. If 1, traveller's mode is enabled on a per character basis (so once a
  787. character saves, only that character has unlocked the warp).
  788. If 2, traveller's mode is enabled on a per account basis (so once a character
  789. saves, all charaters of the corresponding account have the warp unlocked).
  790. (1) kewd_deep
  791. -------------
  792. This variable decides whether deep or short warps will be used. As explained
  793. on the description, enabling deep warps allows warping to any dungeon level.
  794. (%) kewd_levelCost
  795. ------------------
  796. This variable only applies to deep warps. It indicates in percentage the cost
  797. increase per level. For example, if the dungeon costs 1000z to warp to, and
  798. the levelCost increase is of 50 (50%) then warping to level 2 costs 1500, lv3
  799. costs 2000, and so on.
  800. (%) kewd_entryDiscount
  801. ----------------------
  802. The discount for using the Kafra in the dungeon entrance to warp within the
  803. dungeon. For example, if you use the Kafra next to Payon dungeon to warp to
  804. Payon Dungeon lv5, this discount is then applied. This variable only makes
  805. sense on deep warp mode.
  806. (1) kewd_turtleCave
  807. -------------------
  808. Only used on short warps. If 1, then warping to Turtle Dungeon should lead
  809. directly to the cave's entrance, otherwise it warps you to the Island's
  810. entrance.
  811. ($) kewd_<dungeon name>
  812. ---------------------
  813. There is a config variable for every dungeon, it specifies the base cost of
  814. warping to that dungeon (which is, the entrance level cost).
  815. ////////////////////////////////////////////////////////////////////////////////
  816. [16] Module: PvP Warping (ke_pvp.txt)
  817. ////////////////////////////////////////////////////////////////////////////////
  818. Description
  819. ================================================================================
  820. The PvP warping module leads to the pvp maps named pvp_n_*-*. It has two
  821. modes: simple and advanced. On simple mode, every player of every level gets
  822. thrown into the pvp_n_1-* maps to nuke it out, on advanced mode each of
  823. the map groups gets their own range of permissible levels to enter. Since
  824. there is no sure way how characters should escape from a pvp map, they are
  825. currently given a butterfly wing when they warp.
  826. Variables
  827. ================================================================================
  828. (1) kewp_showOnline
  829. -------------------
  830. If 1, the menu entries will display the online count of players of each entry.
  831. (1) kewp_advanced
  832. -----------------
  833. Use the advanced pvp system if 1 (see module description)
  834. ($) kewp_cost
  835. -------------
  836. Cost of warping to the pvp rooms used in non-advanced rooms and "free for all"
  837. in advanced mode.
  838. ($) kewp_cost1
  839. ($) kewp_cost2
  840. ($) kewp_cost3
  841. ($) kewp_cost4
  842. ($) kewp_cost5
  843. ($) kewp_cost6
  844. ($) kewp_cost7
  845. --------------
  846. The costs for each of the pvp room groups in advanced mode.
  847. (#) kewp_baseLv1
  848. (#) kewp_baseLv2
  849. (#) kewp_baseLv3
  850. (#) kewp_baseLv4
  851. (#) kewp_baseLv5
  852. (#) kewp_baseLv6
  853. (#) kewp_baseLv7
  854. ----------------
  855. These indicate the nominal base level for each room (which base level should
  856. characters be around to join it). Applicable only to advanced mode.
  857. (#) kewp_range
  858. --------------
  859. Specifies how far away the character's level can be from the nominal value to
  860. still be allowed within the room. If the nominal level is 50 and the range is
  861. 3, only characters with levels 47-53 may join.
  862. ////////////////////////////////////////////////////////////////////////////////
  863. [17] Module: WoE Warps (warp_woe.txt)
  864. ////////////////////////////////////////////////////////////////////////////////
  865. Description
  866. ================================================================================
  867. This module allows characters to warp into the WoE grounds during (or out of)
  868. War of Emperium times. Players may warp directly into the Guild Dungeons if
  869. the proper lines are uncommented on the warp menu (See warp_woe.txt's header
  870. for the location of the menu entries):
  871. menu "- Cancel",-,
  872. // "- Guild Dungeons",M_DUNGEON,
  873. "- Al De Baran Guild ("<some code>"z)",L_ALDEBARAN,
  874. "- Geffen Guild ("<some code>"z)",L_GEFFEN,
  875. "- Payon Guild ("<some code>"z)",L_PAYON,
  876. "- Prontera Guild ("<some code>"z)",L_PRONTERA;
  877. return;
  878. Variables
  879. ================================================================================
  880. (1) kewg_check
  881. --------------
  882. Does a guild check. If 1, only characters who belong to a guild can use these
  883. warps.
  884. (1) kewg_checkAgit
  885. ------------------
  886. Does the WoE times check. If 1, only during War of Emperium the warps will be
  887. active.
  888. (1) kewg_showOnline
  889. -------------------
  890. Set to 1 to display in the menus the online count of players in each of the
  891. guild areas. It also adds a menu entry that displays the summary of players
  892. within each castle and guild grounds.
  893. (%) kewg_discount
  894. -----------------
  895. Discount % to be applied for warps while the Kafra Pass is active.
  896. ($) kewg_baldur
  897. ($) kewg_luina
  898. ($) kewg_valkyrie
  899. ($) kewg_britoniah
  900. ------------------
  901. Costs to the respective guild dungeons when enabled.
  902. ($) kewg_alDeBaran
  903. ($) kewg_geffen
  904. ($) kewg_payon
  905. ($) kewg_prontera
  906. ------------------
  907. Costs to each of the guild grounds.
  908. ////////////////////////////////////////////////////////////////////////////////
  909. [18] The kafras.txt file: About Kafra Definitions
  910. ////////////////////////////////////////////////////////////////////////////////
  911. The file kafras.txt contains the definition of the Kafras, which is the actual
  912. sprite on-screen that characters speak with. An enabled kafra may look like
  913. this:
  914. //Alberta
  915. alberta,113,53,7 script Kafra Express 116,{
  916. callfunc "F_KafraExpress","Kafra Express","kafra_02",0,"alberta",116,57;
  917. }
  918. And a disabled/commented Kafra would look like this:
  919. //Prontera Guild Grounds
  920. //prt_gld,127,163,5 script Kafra Express 115,{
  921. // callfunc "F_KafraExpress","Kafra Express","kafra_03",1,"prt_gld",129,170;
  922. //}
  923. For scripters, the way to define an NPC is not new, and beyond the scope of
  924. this document, so I'll only document the function "F_KafraExpress":
  925. F_KafraExpress (String "Kafra's name", String "kafra image file", int location, String map, int x, int save y)
  926. The first parameter, the Kafra's name, is the name that will be displayed all
  927. over the dialogue windows. The Kafra Image file is the image that is to be
  928. displayed on the screen during the npc chat (without the extension). You can
  929. use "" to disable the image.
  930. Location refers to the type of Kafra. Type=0 refers to Kafras in towns while
  931. Type=1 refers to Kafras placed in the wild, ie: in dungeons. Type=2 is for
  932. Kafras that should count as both town & dungeon. Under these situations, the
  933. menus displayed are those of the town, the type is used for the traveller's
  934. warping mode. Finally, Type=3 is a special type used only for the Niflheim
  935. Kafra.
  936. The last three Parameters are used to define the save location when you save
  937. your respawn. They are not needed if you use the "Save-on-spot" feature, but
  938. it's recommended to pass them nevertheless. Note that the map name will still
  939. be used when using traveller's mode.