readme.txt 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173
  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 v1.8 (05/February/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. (1) kekp_reset
  197. --------------
  198. For Kafra Passes. When 1, the Pass expires when starting a chat with the
  199. Kafra. Otherwise the variable remains active a pretty long time (probably all
  200. session).
  201. ($) kekp_reserveCost
  202. --------------------
  203. The cost in zeny of reserve points. When using a Kafra Pass many services will
  204. be cheaper, the amount of zeny saved is "used" to grant the player reserve
  205. points. For example, if the reserve cost is 100, for every 100z the player
  206. saves, he'll earn 1 reserve points. Reserve points can be used in scripts, and
  207. by default is used in the Al De Baran Kafra Headquarters to gain items. Use a
  208. value of 0 to disable Reserve Point gaining.
  209. (#) kekp_minReserve
  210. (#) kekp_maxReserve
  211. ---------------
  212. What is the minimum/maximum reserve points the player can gain when using a
  213. Kafra Pass per transaction? This only applies when the player has saved at
  214. least 1z.
  215. (") ked_users
  216. -------------
  217. Certain modules (in particular, the warping ones) have the ability to display
  218. the number of players related to the function (ie: number of users in a
  219. dungeon), in such cases this variable is used to display the 'unit' of said
  220. count. For example, if ked_users is "kids" then the related modules might
  221. display things like "- Glast Heim (6 kids)".
  222. ////////////////////////////////////////////////////////////////////////////////
  223. [03] Module: Bank (ke_bank.txt)
  224. ////////////////////////////////////////////////////////////////////////////////
  225. Description
  226. ================================================================================
  227. This modules enables characters to "store" zeny on a virtual bank account
  228. which is shared among characters of the same account. There can be deposits,
  229. withdrawals, which can have transactions fees associated.
  230. It is also possible to establish a monthly maintenance fee that has to be
  231. payed, when the player does not has enough money in the account to pay this
  232. fee, they stop gaining interests until they deposit enough to pay it up.
  233. Finally, all fees charged by the bank can be stored in a server-wide variable
  234. which may be used by other custom scripts.
  235. Variables
  236. ================================================================================
  237. (%) kebk_depositCost
  238. (%) kebk_withdrawCost
  239. ---------------------
  240. The Fee in % charged whenever a player does a deposit/withdrawal. For example,
  241. when a player deposits 100z and the fee is 3%, only 97z are deposited, and 3z
  242. are charged. Likewise, if a player withdraws 100z when the fee is of 5%,
  243. they'll withdraw 100z and an additional 5z will be removed from their accounts
  244. as fee cost.
  245. ($) kebk_minTransact
  246. ($) kebk_maxTransact
  247. --------------------
  248. The minimum/maximum values of a single transaction (deposit or withdrawal)
  249. ($) kebk_capacity
  250. -----------------
  251. Indicates what is the bank account capacity for players. That is, what is the
  252. maximum zeny their account can hold. You can't deposit anymore once the max
  253. has been reached, and daily interests are lost while maxed.
  254. (%) kebk_dayInterest
  255. --------------------
  256. The daily interests that the account makes. The value is in 0.01% units, so a
  257. value of 100 equals 1% daily interests.
  258. ($) kebk_monMaintenance
  259. -----------------------
  260. Monthly flat fee charged for maintenance.
  261. (1) kebk_useGlobalBank
  262. ----------------------
  263. When 1, every fee charged from the player goes into a server variable
  264. ($ke_globalbank), which can then be used by other scripts. is 0 by default
  265. because none of the Kafra Express modules uses it.
  266. ////////////////////////////////////////////////////////////////////////////////
  267. [04] Module: Broadcast (ke_broadcast.txt)
  268. ////////////////////////////////////////////////////////////////////////////////
  269. Description
  270. ================================================================================
  271. Provides broadcasting services for players. Broadcasts can be local (current
  272. map only) or global (server announce), there are also four types of broadcast:
  273. Requests for a party, PvP Challenge invitations, General Broadcasts (player
  274. input the string they want to say) and General Anonymous Broadcasts (player
  275. name is not displayed when doing the broadcast).
  276. Note that the variables from ke_warp_pvp.txt will be used for auto-configuring
  277. the pvp broadcasts.
  278. Variables:
  279. ================================================================================
  280. (1) kebc_showOnline
  281. -------------------
  282. When 1, the total count of players will be displayed in the menu (map users
  283. next to the local broadcast entry, server users next to the global broadcast
  284. entry).
  285. ($) kebc_partyCost
  286. ($) kebc_pvpCost
  287. ($) kebc_cost
  288. ($) kebc_anonCost
  289. ------------------
  290. Respective base costs for doing Party-Requests/Pvp Challenge/General/Anonymous
  291. broadcasts.
  292. (%) kebc_globalFactor
  293. ---------------------
  294. When the broadcast is global, the base cost is multipled by this factor. If
  295. the factor is 500, then global broadcasts cost 5x times the cost of the map's
  296. broadcast.
  297. (%) kebc_discount
  298. -----------------
  299. Discount on broadcast prices when the Kafra Pass is active.
  300. ////////////////////////////////////////////////////////////////////////////////
  301. [05] Module: Stylist (ke_dye.txt)
  302. ////////////////////////////////////////////////////////////////////////////////
  303. Description
  304. ================================================================================
  305. Offers cloth dye, hair dye and hair style changes, both by input and by wheel
  306. browsing. Does not consumes dyestuffs because it is designed for custom dye
  307. packages.
  308. Variables
  309. ================================================================================
  310. (1) kedy_enableHairstyle
  311. ------------------------
  312. If one, the menu will include hair-style changing options, otherwise only
  313. dye-changes are offered
  314. (#) kedy_styles
  315. ---------------
  316. Specifies the number of available hair styles
  317. (#) kedy_hair
  318. -------------
  319. Specificies the number of hair dyes
  320. (#) kedy_clothJN
  321. (#) kedy_clothJ1ST
  322. (#) kedy_clothJ2ND
  323. (#) kedy_clothJSN
  324. (#) kedy_clothJWED
  325. ------------------
  326. Specifies the number of cloth dyes based on job-type: Novices, First Classes,
  327. Second Classes, Super Novices, Wedding Class.
  328. ////////////////////////////////////////////////////////////////////////////////
  329. [06] Module: Job Changer (ke_jobchange.txt)
  330. ////////////////////////////////////////////////////////////////////////////////
  331. Description
  332. ================================================================================
  333. Offers job changing, including rebirth and baby classes. The rebirth system
  334. can allow people free changing through a different path, or forcing the
  335. correct path. Zeny can be charged/granted as well as weapons on job-change.
  336. Remaining Skill Points can be wiped, ignored or prevent the change from
  337. happening. Before changing players can review the consequences of doing so,
  338. including weapons to gain.
  339. Finally, there's an option that makes it possible to skip the novice class
  340. altogether and change directly to first jobs.
  341. Variables
  342. ================================================================================
  343. (#) kejc_skillsPolicy
  344. ---------------------
  345. Determines what to do with remaining skill points upon change:
  346. 0: No job changing until points are used.
  347. 1: Extra Skill Points are wiped.
  348. 2: Extra skill points are conserved.
  349. (#) kejc_upperPolicy
  350. --------------------
  351. What to do about the advanced classes?
  352. 0: Free for all, players can pick any advanced job regardless of the previous.
  353. 1: Force mode, classes are auto-selected from the previous path. In the
  354. case the path could not be determined (players changed jobs previously
  355. using other npcs), players will be able to select their next job.
  356. (1) kejc_announce
  357. -----------------
  358. When 1, a global announce will be done upon change.
  359. (1) kejc_resetDye
  360. -----------------
  361. If one, the cloth dye is reset upon changing.
  362. (1) kejc_skipNovice
  363. -------------------
  364. If one, players can skip the novice class and directly into their first job.
  365. Exploit proof, skills are wiped when changing to a 1st class this way, and
  366. their basic skill level is set to 9.
  367. (#) kejc_baseSN
  368. ---------------
  369. Base Level required before changing into a Super Novice.
  370. (#) kejc_base2ND
  371. (#) kejc_job2ND
  372. (#) kejc_cost2ND
  373. ----------------
  374. Base level, Job level and zeny required to change into a second job. If the
  375. cost is below zero, zeny will be given to the player instead of charged.
  376. (#) kejc_baseRebirth
  377. (#) kejc_jobRebirth
  378. (#) kejc_costRebirth
  379. --------------------
  380. Base level, Job level and zeny required before doing a rebirth (change to High
  381. Novice).
  382. (1) kejc_rebirthReset
  383. ---------------------
  384. If 1, when changing into a HighNovice characters will have their level reset
  385. to 1 (with the additional 100 stat points)
  386. (1) kejc_weaponPolicy
  387. ---------------------
  388. If 1, characters will get a weapon upon job change. For each first&second
  389. class there are two weapons to specify, the standard weapon and the "premium"
  390. one.
  391. (#) kejc_wBonusLv
  392. -----------------
  393. When characters reach this job level, they will receive the premium weapon instead of the normal one. If 0, premium weapons are disabled.
  394. (#) kejc_wAcolyte
  395. (#) kejc_wArcher
  396. (#) kejc_wMage
  397. (#) kejc_wMerchant
  398. (#) kejc_wSwordman
  399. (#) kejc_wThief
  400. (#) kejc_wSuperNovice
  401. (#) kejc_wPriest
  402. (#) kejc_wMonk
  403. (#) kejc_wHunter
  404. (#) kejc_wBard
  405. (#) kejc_wDancer
  406. (#) kejc_wWizard
  407. (#) kejc_wSage
  408. (#) kejc_wBlacksmith
  409. (#) kejc_wAlchemist
  410. (#) kejc_wKnight
  411. (#) kejc_wCrusader
  412. (#) kejc_wAssassin
  413. (#) kejc_wRogue
  414. -----------------------
  415. ID of the normal weapons received upon job change (if weapon policy is in
  416. effect).
  417. (#) kejc_w2Priest
  418. (#) kejc_w2Monk
  419. (#) kejc_w2Hunter
  420. (#) kejc_w2Bard
  421. (#) kejc_w2Dancer
  422. (#) kejc_w2Wizard
  423. (#) kejc_w2Sage
  424. (#) kejc_w2Blacksmith
  425. (#) kejc_w2Alchemist
  426. (#) kejc_w2Knight
  427. (#) kejc_w2Crusader
  428. (#) kejc_w2Assassin
  429. (#) kejc_w2Rogue
  430. --------------------
  431. ID of the premium weapons received upon job chane (if bonus weapon policy is
  432. in effect). Note that first classes can't get a bonus weapon.
  433. ////////////////////////////////////////////////////////////////////////////////
  434. [07] Module: Job Swapper (ke_jobswap.txt)
  435. ////////////////////////////////////////////////////////////////////////////////
  436. Description
  437. ================================================================================
  438. Permits characters to change jobs among other jobs of their same "level".
  439. This is, between first classes or between second classes. It is also possible
  440. to store the last job used and revert to it at a later date. Dye, Job Level
  441. and Skill Point count is saved, however the skill-tree is not saved and skills
  442. need be reallocated. When reverting to the previous class, characters might be
  443. able to return from an adv class to a normal one, but if they are baby
  444. classes, they can't change back to a normal one.
  445. Variables
  446. ================================================================================
  447. (1) kejs_SNpolicy
  448. -----------------
  449. Determines what to do with Super Novices. if 0, they can't swap jobs, if 1,
  450. they are considered first classes.
  451. (#) kejs_revertPolicy
  452. ---------------------
  453. Determines if Reverting classes is possible and when:
  454. 0: Cannot go back to the previous job.
  455. 1: Can only go back if the previous job belongs to the same type as the
  456. first (is also a 1st/2nd job and is the same normal/adv/baby category).
  457. 2: Can return to the previous job regardless (exception: when one of the
  458. two jobs is a baby job and the other is not).
  459. (1) kejs_announce
  460. -----------------
  461. If 1 does a server announce when swapping jobs.
  462. ($) kejs_revertCost
  463. -------------------
  464. Cost of changing to the previous job.
  465. (1) kejs_saveDye
  466. ----------------
  467. If one, the dye is saved when swapping and restored upon revert.
  468. (1) kejs_resetDye
  469. -----------------
  470. If 1 the clothe dye is reset upon swap.
  471. (%) kejs_swapDiscount
  472. (%) kejs_revertDiscount
  473. -----------------------
  474. Discount % to apply when the kafra pass is active for swapping/reverting.
  475. (#) kejs_job1ST
  476. (#) kejs_job2ND
  477. ---------------
  478. Minimum job level before being able to swap among 1st/2nd classes.
  479. ($) kejs_cost1ST
  480. ($) kejs_cost2ND
  481. ----------------
  482. Base cost of swaping jobs.
  483. (%) kejs_discount1ST
  484. (%) kejs_discount2ND
  485. --------------------
  486. Discount % to apply to the base cost for every job level above the minimum
  487. required. For example, if the discount is 1% per level and you change when you
  488. have +10 level more than the min necessary, you get a 10% discount.
  489. (%) kejs_preserve1ST
  490. (%) kejs_preserve2ND
  491. --------------------
  492. Indicates how much of the previous job level to preserve when changing. For
  493. example, if the preserve value is 50 (50%) and you change from a level 40
  494. Knight into Priest, you'll become a lv 20 Priest. Skill points are adjusted
  495. accordingly so it's exploit-free.
  496. ////////////////////////////////////////////////////////////////////////////////
  497. [08] Module: Smithery (ke_refine.txt)
  498. ////////////////////////////////////////////////////////////////////////////////
  499. Description
  500. ================================================================================
  501. Offers the services usually found in the town smithery and then some more:
  502. Item refining, Item Repairing, Ore Purification (rough oris -> pure ones).
  503. Also sells Phracon and Emveretarcon.
  504. Item refining can follow all the rules of normal refining, but it can also
  505. override them to refine everything, or safe refines up to max level.
  506. Ore Purification can be extended to include all the rough materials that
  507. blacksmiths can purify (star dust -> star crumbs, for example).
  508. Variables
  509. ================================================================================
  510. (#) kerf_maxLv
  511. --------------
  512. Maximum refinement level of equipment.
  513. (1) kerf_safe
  514. -------------
  515. If 1 success chances are ignoring and refining never fails.
  516. (1) kerf_showChance
  517. -------------------
  518. If 1 the chance of success/failure is actually shown before confirming.
  519. (1) kerf_refineAll
  520. ------------------
  521. If 1 then unrefinable items will be refined too (like accesories)
  522. (%) kerf_discount
  523. -----------------
  524. Discount rate to be applied during forging when the Kafra Pass is active.
  525. ($) kerf_armorCost
  526. ($) kerf_weaponLv1Cost
  527. ($) kerf_weaponLv2Cost
  528. ($) kerf_weaponLv3Cost
  529. ($) kerf_weaponLv4Cost
  530. ----------------------
  531. Cost per level to refine armors, and level 1/2/3/4 weapons.
  532. (1) kerf_purifyAll
  533. ------------------
  534. If 1, the extended purify menu will be used, which shows how to purify steels,
  535. star crumbs, etc; otherwise, just elus and oris are available.
  536. ($) kerf_repairCost
  537. -------------------
  538. Cost of repairing a broken weapon.
  539. (%) kerf_repairDiscount
  540. -----------------------
  541. Repair Discount% when the kafra pass is active.
  542. (1) kerf_repairSteel
  543. --------------------
  544. If 1, a steel will be required to repair items.
  545. ////////////////////////////////////////////////////////////////////////////////
  546. [09] Module: Renting (ke_refine.txt)
  547. ////////////////////////////////////////////////////////////////////////////////
  548. Description
  549. ================================================================================
  550. Allows renting of Cart/Falcon/PecoPeco. Note that the only restriction applied
  551. is whether the character has "PushCart", "Falcon Taming" or "PecoPeco Riding",
  552. it does not checks for the character's class.
  553. It must also be noted that renting is free while the Kafra Pass is active.
  554. Variables
  555. ================================================================================
  556. (1) kert_cartOnly
  557. -----------------
  558. If 1, this module only offers cart rentals. Otherwise you can rent any of the three.
  559. ($) kert_cartCost
  560. ($) kert_falconCost
  561. ($) kert_pecoCost
  562. -------------------
  563. Cost for renting carts/falcons/pecos.
  564. ////////////////////////////////////////////////////////////////////////////////
  565. [10] Module: Kafra Shop (ke_shop.txt)
  566. ////////////////////////////////////////////////////////////////////////////////
  567. Description
  568. ================================================================================
  569. Allows invoking of a shop from the Kafra. Note that the shops must be of
  570. invisible type (ke_shop.txt has an example of two such shops). The config
  571. enables you to select whether the shop will allow buying, selling or
  572. both, as well as the name of the shops to use in towns or dungeons (if you
  573. want to use a custom shop defined elsewhere or want to use the same shop for
  574. both).
  575. Variables
  576. ================================================================================
  577. (#) $@kesh_towntype
  578. (#) $@kesh_duntype
  579. -------------------
  580. Specifies the type of transaction allowed at the shop. Use 1 to enable only
  581. buying of items, 2 for only selling, or any other value for both.
  582. (#) $@kesh_townshop$
  583. (#) $@kesh_dunshop$
  584. --------------------
  585. Specifies the name of the shop to use for buying/selling of items. By default
  586. the file includes two such shops which you can use, or you can disable them
  587. and specify your own in the config changing these variables.
  588. ////////////////////////////////////////////////////////////////////////////////
  589. [11] Module: Stat/Skill Market (ke_statmarket.txt)
  590. ////////////////////////////////////////////////////////////////////////////////
  591. Description
  592. ================================================================================
  593. Not really a "market", this module lets players sell and buy stat/skill
  594. points. Also allows for direct trading between stats/skills.
  595. NOTE: Selling stat points can lead to zeny exploits if your server uses the
  596. stat_db.txt file, because players can then sell all their stat points, do a
  597. reset and get them back! To prevent this, set the following battle config
  598. option:
  599. use_statpoint_table: no
  600. Alternatively, you can set the selling point of statpoints to be 0z.
  601. Variables
  602. ================================================================================
  603. ($) kesm_stBuyPrice
  604. ($) kesm_stSellPrice
  605. --------------------
  606. Price for every stat point to be bought/sold.
  607. ($) kesm_skBuyPrice
  608. ($) kesm_skSellPrice
  609. --------------------
  610. Price for every skill point to be bought/sold.
  611. (%) kesm_discount
  612. -----------------
  613. Discount price when kafra pass is active. Only applies to buying stats/skills.
  614. (#) kesm_skTradePrice
  615. (#) kesm_stTradePrice
  616. ---------------------
  617. These two define how many stat points are traded per each skill point when
  618. doing a direct conversion between stats/skills. The idea is that trading
  619. directly one for the other should be cheaper than selling them and then buying
  620. from the other. You can set both to the same value and the trading will have
  621. no loss.
  622. Notice that skTradePrice is the cost for converting stats to skills and
  623. stTradePrice is the cost for converting skills to stats. So... NEVER set
  624. stTradePrice higher than skTradePrice or you allow an easy exploit of infinite
  625. stats/skills!
  626. ////////////////////////////////////////////////////////////////////////////////
  627. [11] Module: Stat/Skill Resets/Raising (ke_stats.txt)
  628. ////////////////////////////////////////////////////////////////////////////////
  629. Description
  630. ================================================================================
  631. Does stat/skills resets, and additionally helps characters raise their basic
  632. stats faster. Optionally, skill resets will not touch the basic-skill level.
  633. Price have two components: base fee and per level fee, so characters with
  634. higher levels will have to pay more for a reset than low level ones.
  635. For stat resetting, base level is taken into account. For skill resets, job
  636. levels. For a dual reset, the addition of both is considered. Also, when taken
  637. into consideration job level for second classes, the job-level at which one
  638. changed jobs is also considered. So a Job level 1 Knight actually has job
  639. level of 41~51.
  640. NOTE: Be careful with quest skills. If your server is configured to reset
  641. quest skills and players can get their quest skills for free, you are letting
  642. them exploit the system and get unlimited skill points! (even worse if they
  643. can sell'em in the Stat/Skills market module). Be sure to either remove free
  644. quest skills npcs or make quest skills not resetable.
  645. Variables:
  646. ================================================================================
  647. ($) kest_stResetCost
  648. --------------------
  649. Base cost of doing a stat reset.
  650. ($) kest_skResetCost
  651. --------------------
  652. Base cost of doing a skill reset.
  653. ($) kest_resetCost
  654. ------------------
  655. Base cost of a dual reset.
  656. ($) kest_BaseLvCost
  657. -------------------
  658. Cost per Base level for doing a stat reset.
  659. ($) kest_JobLvCost
  660. ------------------
  661. Cost per Job level for doing a skill reset.
  662. ($) kest_BothLvCost
  663. -------------------
  664. Cost per Base+Job level for doing a dual reset.
  665. (%) kest_discount
  666. -----------------
  667. Discount % applied when Kafra Pass is active.
  668. (1) kest_resetBasic
  669. -------------------
  670. If 1, the skill "basic skill" is also reset.
  671. ////////////////////////////////////////////////////////////////////////////////
  672. [12] Module: Uncarding (ke_uncard.txt)
  673. ////////////////////////////////////////////////////////////////////////////////
  674. Description
  675. ================================================================================
  676. This module allows people to remove cards from their equipped items. Prices
  677. are modified by the item type, the amount of cards and the refine level of the
  678. item. There's also a chance the removal will fail and: Nothing is lost, the
  679. card or item is lost, both are lost. The procedure may also require up to two
  680. different items (and each one with their own specified qty).
  681. Variables:
  682. ================================================================================
  683. ($) keuc_BaseCost
  684. -----------------
  685. Base cost of uncarding, modified by the following conditions:
  686. ($) keuc_CardCost
  687. -----------------
  688. Each card to be removed increases the total by this value.
  689. ($) keuc_UpgradeCostA
  690. ($) keuc_UpgradeCostW1
  691. ($) keuc_UpgradeCostW2
  692. ($) keuc_UpgradeCostW3
  693. ($) keuc_UpgradeCostW4
  694. ----------------------
  695. These indicate the price increase per refine level for armors and weapons
  696. levels 1/2/3/4. A +10 armor gets a price increases of ten times
  697. keuc_UpgradeCostA.
  698. (%) keuc_discount
  699. -----------------
  700. Discount % to apply when kafra pass is active.
  701. (#) keuc_Mat1
  702. (#) keuc_Qty1
  703. -------------
  704. Id and Qty of the first material that is needed to uncard. If the qty is zero,
  705. then it's disabled.
  706. (#) keuc_Mat2
  707. (#) keuc_Qty2
  708. -------------
  709. id & Qty of the second material to use. Only valid if the first material was
  710. also defined, use qty=0 to disable.
  711. (%) keuc_Fail0Chance
  712. --------------------
  713. This is the safe failure chance (0-1000, where 1000 = 100.0%). A Safe failure
  714. means the original item remains intact, but you are still charged the money
  715. and the materials. Use 0 to disable this type of failure.
  716. (%) keuc_Fail1Chance
  717. --------------------
  718. This is the partial failure chance (0-1000). Partial failures are when either
  719. the cards or the item is lost. The player gets to choose which one is more
  720. important before proceeding. Use 0 to disable.
  721. (%) keuc_Fail2Chance
  722. --------------------
  723. Total failure chance (0-1000). When this triggers, both item and cards are
  724. lost. Use 0 to disable.
  725. ////////////////////////////////////////////////////////////////////////////////
  726. [14] Module: Town Warping (ke_warp_town.txt)
  727. ////////////////////////////////////////////////////////////////////////////////
  728. Description
  729. ================================================================================
  730. This module enables warping to towns. Currently all towns have the same
  731. warping cost, independent of how far away they are placed. The only exception
  732. is Niflheim, which is more of a dungeon than a town.
  733. Variables
  734. ================================================================================
  735. (1) kewt_showOnline
  736. -------------------
  737. If set to 1, the menus will display the online count of players in
  738. towns.
  739. ($) kewt_cost
  740. -------------
  741. Cost of warping to a town.
  742. ($) kewt_niflCost
  743. -----------------
  744. Cost of warping to Niflheim. Different cost since Niflheim is more of a
  745. dungeon than a city. Also, players can't warp to Niflheim until they do the
  746. Niflheim Piano Key Quest.
  747. (#) kewt_travel
  748. ---------------
  749. Allows enabling the traveller system. The traveller system makes it so you can't
  750. warp to a town until you have been there first by some other means (usually
  751. walking) and saved with the Kafra Express in that town.
  752. There are three valid values for this variable: 0, 1, 2.
  753. 0 - Disables this mode.
  754. 1 - Uses the mode on a per character basis; that is, each character needs to
  755. travel to that town and save and that unlocks warping only for that
  756. character (note that this mode can mean up to 15+ variables per character,
  757. which can become quite the overload on a large server).
  758. 2 - Uses the mode on a per account basis; that is, once a character has saved
  759. on a town, all other (and future) characters from the same account have the
  760. warp unlocked (uses up to 15+ variables per account).
  761. (1) kewt_free
  762. -------------
  763. If 1, players will be able to warp to towns even if they run out of money.
  764. Niflheim excepted.
  765. (%) kewt_discount
  766. -----------------
  767. Discount % to apply when warping while the Kafra Pass is active.
  768. ////////////////////////////////////////////////////////////////////////////////
  769. [15] Module: Dungeon Warping (ke_warp_dungeon.txt)
  770. ////////////////////////////////////////////////////////////////////////////////
  771. Description
  772. ================================================================================
  773. Offers warps to all dungeons. Dungeon warping has two main operation modes:
  774. Deep Dungeon Warping and Short Dungeon Warping. Deep Dungeon warping enables
  775. players to warp to any level of any dungeon, while Short Dungeon Warping is
  776. restricted to warping only to the entrance of the dungeon. Traveller's mode is
  777. also available for dungeons.
  778. Variables
  779. ================================================================================
  780. (1) kewd_showOnline
  781. -------------------
  782. If set to 1, the menus will display the online online count of characters in
  783. the dungeons.
  784. (%) kewd_discount
  785. -----------------
  786. Discount % to apply when warping while the Kafra Pass is active.
  787. (#) kewd_travel
  788. ---------------
  789. Enables the traveller system. Just like the traveller's system for towns,
  790. you can't warp to any dungeon to which you have not visited first on foot and
  791. saved with the corresponding Kafra Express first.
  792. If 1, traveller's mode is enabled on a per character basis (so once a
  793. character saves, only that character has unlocked the warp). Note that this
  794. method stores up to 25 extra variables per character.
  795. If 2, traveller's mode is enabled on a per account basis (so once a character
  796. saves, all charaters of the corresponding account have the warp unlocked).
  797. Note that this method stores up to 25 extra variables per account.
  798. (1) kewd_deep
  799. -------------
  800. This variable decides whether deep or short warps will be used. There's no
  801. need to set it as it will be set automatically based on which file was
  802. included (ke_warp_short.txt or ke_warp_deep.txt).
  803. (%) kewd_levelCost
  804. ------------------
  805. This variable only applies to deep warps. It indicates in percentage the cost
  806. increase per level. For example, if the dungeon costs 1000z to warp to, and
  807. the levelCost increase is of 50 (50%) then warping to level 2 costs 1500, lv3
  808. costs 2000, and so on.
  809. (%) kewd_entryDiscount
  810. ----------------------
  811. The discount for using the Kafra in the dungeon entrance to warp within the
  812. dungeon. For example, if you use the Kafra next to Payon dungeon to warp to
  813. Payon Dungeon lv5, this discount is then applied. This variable only makes
  814. sense on deep warp mode.
  815. (1) kewd_turtleCave
  816. -------------------
  817. Only used on short warps. If 1, then warping to Turtle Dungeon should lead
  818. directly to the cave's entrance, otherwise it warps you to the Island's
  819. entrance.
  820. ($) kewd_amatsu
  821. ($) kewd_antHell
  822. ($) kewd_ayothaya
  823. ($) kewd_byalan
  824. ($) kewd_comodo
  825. ($) kewd_clockTower
  826. ($) kewd_coalMines
  827. ($) kewd_culvert
  828. ($) kewd_gefenia
  829. ($) kewd_geffen
  830. ($) kewd_glastHeim
  831. ($) kewd_gonRyun
  832. ($) kewd_hiddenTemple
  833. ($) kewd_louYang
  834. ($) kewd_magma
  835. ($) kewd_orc
  836. ($) kewd_payon
  837. ($) kewd_pyramids
  838. ($) kewd_sphinx
  839. ($) kewd_sunkenShip
  840. ($) kewd_toyFactory
  841. ($) kewd_turtleIsland
  842. ($) kewd_umbala
  843. ---------------------
  844. Base cost of warping to each dungeon, that is, the entrance level cost.
  845. ////////////////////////////////////////////////////////////////////////////////
  846. [16] Module: PvP Warping (ke_pvp.txt)
  847. ////////////////////////////////////////////////////////////////////////////////
  848. Description
  849. ================================================================================
  850. The PvP warping module leads to the pvp maps named pvp_n_*-*.gat. It has two
  851. modes: simple and advanced. On simple mode, every player of every level gets
  852. thrown into the pvp_n_1-*.gat maps to nuke it out, on advanced mode each of
  853. the map groups gets their own range of permissible levels to enter. Since
  854. there is no sure way how characters should escape from a pvp map, they are
  855. currently given a butterfly wing when they warp.
  856. Variables
  857. ================================================================================
  858. (1) kewp_showOnline
  859. -------------------
  860. If 1, the menu entries will display the online count of players of each entry.
  861. (1) kewp_advanced
  862. -----------------
  863. Use the advanced pvp system if 1 (see module description)
  864. ($) kewp_cost
  865. -------------
  866. Cost of warping to the pvp rooms used in non-advanced rooms and "free for all"
  867. in advanced mode.
  868. ($) kewp_cost1
  869. ($) kewp_cost2
  870. ($) kewp_cost3
  871. ($) kewp_cost4
  872. ($) kewp_cost5
  873. ($) kewp_cost6
  874. ($) kewp_cost7
  875. --------------
  876. The costs for each of the pvp room groups in advanced mode.
  877. (#) kewp_baseLv1
  878. (#) kewp_baseLv2
  879. (#) kewp_baseLv3
  880. (#) kewp_baseLv4
  881. (#) kewp_baseLv5
  882. (#) kewp_baseLv6
  883. (#) kewp_baseLv7
  884. ----------------
  885. These indicate the nominal base level for each room (which base level should
  886. characters be around to join it). Applicable only to advanced mode.
  887. (#) kewp_range
  888. --------------
  889. Specifies how far away the character's level can be from the nominal value to
  890. still be allowed within the room. If the nominal level is 50 and the range is
  891. 3, only characters with levels 47-53 may join.
  892. ////////////////////////////////////////////////////////////////////////////////
  893. [17] Module: WoE Warps (warp_woe.txt)
  894. ////////////////////////////////////////////////////////////////////////////////
  895. Description
  896. ================================================================================
  897. This module allows characters to warp into the WoE grounds during (or out of)
  898. War of Emperium times. Players may warp directly into the Guild Dungeons if
  899. the proper lines are uncommented on the warp menu (See warp_woe.txt's header
  900. for the location of the menu entries):
  901. menu "- Cancel",-,
  902. // "- Guild Dungeons",M_DUNGEON,
  903. "- Al De Baran Guild ("<some code>"z)",L_ALDEBARAN,
  904. "- Geffen Guild ("<some code>"z)",L_GEFFEN,
  905. "- Payon Guild ("<some code>"z)",L_PAYON,
  906. "- Prontera Guild ("<some code>"z)",L_PRONTERA;
  907. return;
  908. Variables
  909. ================================================================================
  910. (1) kewg_check
  911. --------------
  912. Does a guild check. If 1, only characters who belong to a guild can use these
  913. warps.
  914. (1) kewg_checkAgit
  915. ------------------
  916. Does the WoE times check. If 1, only during War of Emperium the warps will be
  917. active.
  918. (1) kewg_showOnline
  919. -------------------
  920. Set to 1 to display in the menus the online count of players in each of the
  921. guild areas. It also adds a menu entry that displays the summary of players
  922. within each castle and guild grounds.
  923. (%) kewg_discount
  924. -----------------
  925. Discount % to be applied for warps while the Kafra Pass is active.
  926. ($) kewg_baldur
  927. ($) kewg_luina
  928. ($) kewg_valkyrie
  929. ($) kewg_britoniah
  930. ------------------
  931. Costs to the respective guild dungeons when enabled.
  932. ($) kewg_alDeBaran
  933. ($) kewg_geffen
  934. ($) kewg_payon
  935. ($) kewg_prontera
  936. ------------------
  937. Costs to each of the guild grounds.
  938. ////////////////////////////////////////////////////////////////////////////////
  939. [18] The kafras.txt file: About Kafra Definitions
  940. ////////////////////////////////////////////////////////////////////////////////
  941. The file kafras.txt contains the definition of the Kafras, which is the actual
  942. sprite on-screen that characters speak with. An enabled kafra may look like
  943. this:
  944. //Alberta
  945. alberta.gat,113,53,7 script Kafra Express 116,{
  946. callfunc "F_KafraExpress","Kafra Express","kafra_02",0,"alberta.gat",116,57;
  947. }
  948. And a disabled/commented Kafra would look like this:
  949. //Prontera Guild Grounds
  950. //prt_gld.gat,127,163,5 script Kafra Express 115,{
  951. // callfunc "F_KafraExpress","Kafra Express","kafra_03",1,"prt_gld.gat",129,170;
  952. //}
  953. For scripters, the way to define an NPC is not new, and beyond the scope of
  954. this document, so I'll only document the function "F_KafraExpress":
  955. F_KafraExpress (String "Kafra's name", String "kafra image file", int location, String map, int x, int save y)
  956. The first parameter, the Kafra's name, is the name that will be displayed all
  957. over the dialogue windows. The Kafra Image file is the image that is to be
  958. displayed on the screen during the npc chat (without the extension). You can
  959. use "" to disable the image.
  960. Location refers to the type of Kafra. Type=0 refers to Kafras in towns while
  961. Type=1 refers to Kafras placed in the wild, ie: in dungeons. Type=2 is for
  962. Kafras that should count as both town & dungeon. Under these situations, the
  963. menus displayed are those of the town, the type is used for the traveller's
  964. warping mode. Finally, Type=3 is a special type used only for the Niflheim
  965. Kafra.
  966. The last three Parameters are used to define the save location when you save
  967. your respawn. They are not needed if you use the "Save-on-spot" feature, but
  968. it's recommended to pass them nevertheless. Note that the map name will still
  969. be used when using traveller's mode.