summaryrefslogtreecommitdiff
path: root/npc/events/nguild/nguild_treas.txt
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-08 15:01:29 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-08 15:01:29 +0000
commit5487756030da284dd45d9114e6c820154607af6c (patch)
tree6dbcf23831a365622a24d883d8ecc75c873e5881 /npc/events/nguild/nguild_treas.txt
parent28e8e5b1f2d256e6df74c4bc528910df56fedee8 (diff)
downloadhercules-5487756030da284dd45d9114e6c820154607af6c.tar.gz
hercules-5487756030da284dd45d9114e6c820154607af6c.tar.bz2
hercules-5487756030da284dd45d9114e6c820154607af6c.tar.xz
hercules-5487756030da284dd45d9114e6c820154607af6c.zip
* Various fixes to NPCs, from bugreports.
- Fixed condition error in old pharmacist. (bugreport:597) - Fixed missing function in novice WoE (bugreport:1728) - Fixed a minor errors in dancer quest (bugreport:1766) - Corrected duration of wedding status (bugreport:1775) - Fixed missing function in novice WoE (bugreport:1788) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12925 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/events/nguild/nguild_treas.txt')
-rw-r--r--npc/events/nguild/nguild_treas.txt36
1 files changed, 35 insertions, 1 deletions
diff --git a/npc/events/nguild/nguild_treas.txt b/npc/events/nguild/nguild_treas.txt
index 6c78cccad..8a1955e92 100644
--- a/npc/events/nguild/nguild_treas.txt
+++ b/npc/events/nguild/nguild_treas.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.2
+//= 1.3
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
@@ -11,9 +11,43 @@
//===== Additional Comments: =================================
//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
//= 1.2 Official treasure spawn [Lupus]
+//= 1.3 Added F_GldTreas function. (bugreport:1788) [L0ne_W0lf]
//============================================================
+//================================================
+// Treasure Spawning Function
+//================================================
+function script F_GldTreas {
+ if(getarg(10) != 1) {
+ setcastledata getarg(0),4,0;
+ setcastledata getarg(0),5,0;
+
+ // Why on earth are we killing old treasure chest spawns?
+ //killmonster getarg(0),"Treasure_"+getarg(1)+"::OnDied";
+
+ // Don't spawn treasures if Castle is empty, or Eco is greater than 100
+ if(GetCastleData(getarg(0),2) > 100 || GetCastleData(getarg(0),1) == 0) return;
+
+ // Only spawn one treasure chest for notice castles.
+ if (compare(getarg(0),"nguild"))
+ set getarg(2),1;
+ else
+ set getarg(2),GetCastleData(getarg(0),2)/5+4;
+
+ if (getarg(2) <= 0) return;
+
+ //sets the counter variable = to the box number amount
+ set getarg(3), getarg(2);
+ }
+ for (set .@i,1; .@i <= getarg(3) ; set .@i,.@i+1) {
+ // set treasure box ID
+ set getarg(4), getarg(5) + (.@i+1) % 2;
+ areamonster getarg(0),getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
+ }
+ return;
+}
+
//<=============================== Castle 1 =================================>\\
// Treasure Spawn -----------------------