summaryrefslogtreecommitdiff
path: root/npc/kafras/functions_kafras.txt
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-11-16 16:38:21 +0100
committerHaru <haru@dotalux.com>2015-12-15 20:53:53 +0100
commitd4832df6929653561e6867149e4ecaa63a860cbe (patch)
tree2a0d54139c31f2858bf1e934c57c83bce4de626f /npc/kafras/functions_kafras.txt
parent16ffb49c0e7325ae17299c1edfa9261413c8b23a (diff)
downloadhercules-d4832df6929653561e6867149e4ecaa63a860cbe.tar.gz
hercules-d4832df6929653561e6867149e4ecaa63a860cbe.tar.bz2
hercules-d4832df6929653561e6867149e4ecaa63a860cbe.tar.xz
hercules-d4832df6929653561e6867149e4ecaa63a860cbe.zip
Standardized header in scripts (part 14)
- Now including GPL-compliant license/copyright info - Restored some missing copyrights - Other scripts folders Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc/kafras/functions_kafras.txt')
-rw-r--r--npc/kafras/functions_kafras.txt215
1 files changed, 95 insertions, 120 deletions
diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt
index eabd3f1d8..e50264c9d 100644
--- a/npc/kafras/functions_kafras.txt
+++ b/npc/kafras/functions_kafras.txt
@@ -1,75 +1,62 @@
-//===== Hercules Script ======================================
+//================= Hercules Script =======================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2012-2015 Hercules Dev Team
+//= Copyright (C) Haru
+//= Copyright (C) rAthena Dev Team
+//= Copyright (C) Euphy
+//= Copyright (C) Joseph
+//= Copyright (C) eAthena Dev Team
+//= Copyright (C) Daegaladh
+//= Copyright (C) brianluau
+//= Copyright (C) Kisuka
+//= Copyright (C) Evera
+//= Copyright (C) erKURITA
+//= Copyright (C) Silentdragon
+//= Copyright (C) Nexon
+//= Copyright (C) L0ne_W0lf
+//= Copyright (C) kobra_k88
+//= Copyright (C) Lupu
+//= Copyright (C) Syrus22
+//= Copyright (C) Darkchild
+//= Copyright (C) Darlskies
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
//= Kafra Functions
-//===== By: ==================================================
-//= rAthena Dev Team
-//= Darlskies, Darkchild, Syrus22, Lupus, kobra_k88 (2.0)
-//= L0ne_W0lf
-//===== Current Version: =====================================
+//================= Description ===========================================
+//= These functions handle save, storage, cart rental, teleport, and Free
+//= Teleport/Warp/Rent Cart options for all Kafra NPCs.
+//================= Current Version =======================================
//= 6.8
-//===== Description: =========================================
-//= These functions handle save, storage, cart rental, teleport,
-//= and Free Teleport/Warp/Rent Cart options for all Kafra NPCs.
-//=
-//= Kafra's will need a lot of work. The Welcome Message argument
-//= may become obsolete, as most kafras have a slightly differing
-//= Welcome message.
-//===== Additional Comments: =================================
-//= 1.1 Now using functions v2.1 Added Cart Rent for Classes: Whitesmith, Professor.
-//= Replaced checkoption(x) into checkcart(0) [Lupus] v2.1b Added Fix Kafra Pass Func [Kobra_k88]
-//= 2.2 Final fix of the Kafra Pass Exploit! [Lupus] a -Izlude[4] fix
-//= 2.2a Minor changes to function calls. Using agruments. Added Guild options. [kobra_k88]
-//= 2.2b This version uses arrays for the teleport option. Rearranged next statements to make menu transitions smoother. [kobra_k88]
-//= 2.3 Removed SAVE from Niflheim. [Lupus]
-//= 2.3 removed "fix" by HawkMoon RTFM and check supernovice.txt . There's a SPECIAL Kafra which gives CARTS to SN for a special proce. [Lupus]
-//= 2.4 Added Baby Class Support (Baby Novice check) Removed annoying storage feature where u had to close dialog window to be able to use your storage [Lupus]
-//= 2.5 Added Louyang official Kafra, fixes some Kafras, not letting you to Save your position [Lupus]
-//= 2.6 Reverted Dungeons Kafras (they should offer only Storage). Added temp Ayothaya Kafra
-//= 2.7 Added correct Ayothaya, Louyang & Amatsu Kafras. [Lupus]
-//= 2.8 Fixed Amatsu Storage problems [Lupus] 2.9 Fixed spelling mistakes. [Nexon]
-//= 3.0 Added special "not working teleport menu" for Einbroch Kafras [Lupus]
-//= 3.1 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
-//= 3.2 Fixed an exploit [Lupus]
-//= 4.0 Added Kafra storage password protection. [Lupus]
-//= to block Kafra Password, read comments at 350 line
-//= 5.0 Fixed the close2;....close; end; lines. Who let them slip away? =/ [erKURITA]
-//= Also, the kafra upon warp was giving back the zeny. Removed. [erKURITA]
-//= 5.1 Optimized a little, added no tele/save arg's [Evera]
-//= 5.1a Temporary? Added F_ClearGarbage to clear unused/outdated variables [Lupus]
-//= 5.2 By default commented out custom Guilds Kafra's "Guild Storage". [Lupus]
-//= 5.3 uncommented Guild Storage. Confirmed kRO feature. [Lupus]
-//= 5.4 added -Guide option (Kafra shows you nearest Guide) Work in progress.
-//= Need all coords for all guides.. and somehow pass their coords to kafra.
-//= Removed universal Kafra Pass, added 3 new Kafra Tickets [Lupus]
-//= 5.4b temporary moved "-Guide" from the 1st menu punct [Lupus]
-//= 5.5 Added proper Niflheim welcome message. [L0ne_W0lf]
-//= Cleaned up the menus a bit. Got rid of the proceeding "-" prefix.
-//= 5.5b Missed a preceeding hyphen, which was screwing up teleporting. [L0ne_W0lf]
-//= 5.6 Further dialog updates, added dynamic costs for cart and storage use. [L0ne_W0lf]
-//= Updated some functions to handle Guild Kafras the way they should.
-//= 5.6a Corrected a few wrong names in the teleport function. [L0ne_W0lf]
-//= 5.7 Correced end message no longer displaying, and the duplicate names [L0ne_W0lf]
-//= Thanks to Barron-Monster for pointing out the issues.
-//= 5.8 Fixed another double name being shown when "saving" [L0ne_W0lf]
-//= 5.9 Fixed the Kafra Welcome message for guilds. Thanks Barron-Monster. [L0ne_W0lf]
-//= 6.0 Closed Kafra Password exploit in Cool Event Corp. Storages until we got a client/packet based password support.
-//= Added 2 args into F_SetKafCode to fit it in Cool Evnt Co. NPC [Lupus]
-//= 6.1 Added menu for Turbo Track Kafra Staff. [L0ne_W0lf]
-//= 6.2 Updated/Fixed warp cords. [Kisuka]
-//= 6.3 #kafra_code is now stored as is. [brianluau]
-//= 6.4 Removed unofficial Guide function. [Daegaladh]
-//= 6.5 Optimized. [Joseph]
-//= 6.6 Added Warp Points / View Points Function. [Joseph]
-//= 6.7 Added Rune Knight Kafra. [Euphy]
-//= 6.8 Improved compatibility with Zonda Staff NPCs. Modernized syntax. [Haru]
-//============================================================
+//=========================================================================
-//=== Main Function ========================================================
-//= arg(0): Used to determine which welcome message to show.
-//= arg(1): Used to determine which menu to display.
-//= arg(2): Used to determine if the info menu is shown in F_KafInfo.
-//= arg(3): Cost to use Storage
-//= arg(4): Cost to Rent a Pushcart
-//==========================================================================
+//== Main Function =========================================
+// Arguments:
+// - 0: Used to determine which welcome message to show.
+// - 1: Used to determine which menu to display.
+// - 2: Used to determine if the info menu is shown in F_KafInfo.
+// - 3: Cost to use Storage
+// - 4: Cost to Rent a Pushcart
function script F_Kafra {
callfunc "F_ClearGarbage"; // Clear outdated, unused variables
// Display Kafra Welcome Message
@@ -196,19 +183,18 @@ function script F_Kafra {
}
}
-//===================================================
-// Storage Function
-//= arg(0): Specifies the type of storage that has been requested:
-// 0 = Regular storage
-// 1 = Guild storage
-// 2 = Regular storage, in a castle (free of charge)
-//= arg(1): Cost to use storage.
-//= arg(2): The type of NPC this is being called from. Notable values:
-// 0,2-5 = Regular Kafra
-// 1 = Niflheim Kafra (special messages)
-// 6 = Zonda/Cool Event Staff (no RESRVPTS)
-//= arg(3): NPC title to display.
-//===================================================
+//== Storage Function ======================================
+// Arguments:
+// - 0: Specifies the type of storage that has been requested:
+// 0 = Regular storage
+// 1 = Guild storage
+// 2 = Regular storage, in a castle (free of charge)
+// - 1: Cost to use storage.
+// - 2: The type of NPC this is being called from. Notable values:
+// 0,2-5 = Regular Kafra
+// 1 = Niflheim Kafra (special messages)
+// 6 = Zonda/Cool Event Staff (no RESRVPTS)
+// - 3: NPC title to display.
function script F_KafStor {
// Unable to access Guild Storage (Busy)
if (getarg(0) == 1) {
@@ -302,13 +288,12 @@ function script F_KafStor {
end;
}
-//===================================================
-// Teleport Function
-//= arg(2): The type of NPC this is being called from. Notable values:
-// 2 = Guild Castle Kafra (don't consume tickets)
-// 6 = Zonda/Cool Event Staff (no RESRVPTS)
-//= arg(1): NPC title to display.
-//===================================================
+//== Teleport Function =====================================
+// Arguments:
+// - 1: NPC title to display.
+// - 2: The type of NPC this is being called from. Notable values:
+// 2 = Guild Castle Kafra (don't consume tickets)
+// 6 = Zonda/Cool Event Staff (no RESRVPTS)
function script F_KafTele {
mes getarg(1);
mes "Please choose";
@@ -358,16 +343,14 @@ function script F_KafTele {
end;
}
-
-//===================================================
-// Cart Function
-//= arg(0): The type of NPC this is being called from. Notable values:
-// 0,1,3-5 = Regular Kafra
-// 2 = Guild Castle Kafra (don't consume tickets)
-// 6 = Zonda/Cool Event Staff (no RESRVPTS)
-//= arg(1): Cost to rent a cart.
-//= arg(2): NPC title to display.
-//===================================================
+//== Cart Function =========================================
+// Arguments:
+// - 0: The type of NPC this is being called from. Notable values:
+// 0,1,3-5 = Regular Kafra
+// 2 = Guild Castle Kafra (don't consume tickets)
+// 6 = Zonda/Cool Event Staff (no RESRVPTS)
+// - 1: Cost to rent a cart.
+// - 2: NPC title to display.
function script F_KafCart {
// Ensure that the class wanting to rent a pushcart is a merchant
if (BaseClass != Job_Merchant) {
@@ -423,9 +406,7 @@ function script F_KafCart {
return 1;
}
-//===================================================
-// Special Reserve Points Function
-//===================================================
+//== Special Reserve Points Function =======================
function script F_KafInfo {
// Uncomment next line to block Kafra Storage Protection
//.@block = 1;
@@ -463,11 +444,11 @@ function script F_KafInfo {
}
}
-// === End Function ==================================================
-// arg(0): used to determine what message to display.
-// arg(1): used to determine if save message is displayed.
-// arg(2): used to display the name of the area you're saving in.
-//===================================================================
+//== End Function ==========================================
+// Arguments:
+// - 0: used to determine what message to display.
+// - 1: used to determine if save message is displayed.
+// - 2: used to display the name of the area you're saving in.
function script F_KafEnd {
mes "[Kafra Employee]";
if (getarg(1) == 1) {
@@ -493,9 +474,7 @@ function script F_KafEnd {
end;
}
-//===================================================
-// Check Storage Password Function
-//===================================================
+//== Check Storage Password Function =======================
function script F_CheckKafCode {
if (!#kafra_code)
return;
@@ -513,10 +492,10 @@ function script F_CheckKafCode {
return;
}
-// === Set / Change / Clear Storage Password Function ===
-// getarg(0): NPC Name
-// getarg(1): Company Name
-//=======================================================
+//== Set / Change / Clear Storage Password Function ========
+// Arguments:
+// - 0: NPC Name
+// - 1: Company Name
function script F_SetKafCode {
mes getarg(0);
if (#kafra_code) {
@@ -603,9 +582,7 @@ S_SET:
return;
}
-//===================================================
-// Basic Password Validation Function
-//===================================================
+//== Basic Password Validation Function ====================
function script F_EntKafCode {
mes "Enter a number 1000~10000000:";
@code_ = 0;
@@ -625,9 +602,7 @@ function script F_EntKafCode {
return @code_;
}
-//===================================================
-// Warp Points / View Points Function
-//===================================================
+//== Warp Points / View Points Function ====================
function script F_KafSet {
deletearray @wrpC$;
deletearray @wrpD$;