root/npc/custom/eAAC_Scripts/kafraExpress/readme.txt @ 1

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