summaryrefslogtreecommitdiff
path: root/npc/other
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-08-14 16:06:23 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-08-14 16:06:23 +0000
commitd2b18c292a3a59f785a1eb27208f7379065f6317 (patch)
treef2f09bc53aac7f4208b4c6aaa94e29df5c354a4b /npc/other
parentb1ca3ed2ab319fa5a81e24cad92fa2c9801e8806 (diff)
downloadhercules-d2b18c292a3a59f785a1eb27208f7379065f6317.tar.gz
hercules-d2b18c292a3a59f785a1eb27208f7379065f6317.tar.bz2
hercules-d2b18c292a3a59f785a1eb27208f7379065f6317.tar.xz
hercules-d2b18c292a3a59f785a1eb27208f7379065f6317.zip
* Quest log kill count now updated properly. (Added from topic 253813)
* More battleground editing, and some bug fixes. - * ALL BATTLEGROUNDS ARE NOW ACTIVE BY DEFAULT. PLEASE CONTINUE TESTING * - Rewrote the Badge Exchange NPC in bg_common.txt, is official now. - Other changes to the bg_common folder, including disabled GM NPC. - Completely rewrote Flavius for the most part, from ground up. - Moved old Flavius battlegrounds to /custom/battleground folder. - Restored original bg_common, and KVM to /custom/battleground - Fixed wall bugs in Tierra Gorge, and added an oninit to the timers. - Other minor tweaks to both Tierra Gorge and KVM scripts. - Fixed the pseudo-cooldown on KVM not working properly, I hope. - Added global time2str function which will be used later in Endless tower. * Applied Epoque's mapflag clean up, which removes flags from scripts. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14374 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/other')
-rw-r--r--npc/other/Global_Functions.txt36
-rw-r--r--npc/other/mail.txt21
2 files changed, 36 insertions, 21 deletions
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index cd18b3a22..18c384771 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -310,3 +310,39 @@ function script F_GetArmorType {
}
end;
}
+
+// Time calculation Function
+// *********************************************************************
+function script Time2Str {
+ set .@Time_Left, getarg(0) - gettimetick(2);
+
+ set .@Days, .@Time_Left / 86400;
+ set .@Time_Left, .@Time_Left - (.@Days * 86400);
+ set .@Hours, .@Time_Left / 3600;
+ set .@Time_Left, .@Time_Left - (.@Hours * 3600);
+ set .@Minutes, .@Time_Left / 60;
+ set .@Time_Left, .@Time_Left - (.@Minutes * 60);
+
+ set .@Time$, "";
+ if( .@Days > 1 )
+ set .@Time$, .@Time$ + .@Days + " days, ";
+ else if( .@Days > 0 )
+ set .@Time$, .@Time$ + .@Days + " day, ";
+
+ if( .@Hours > 1 )
+ set .@Time$, .@Time$ + .@Hours + " hours, ";
+ else if( .@Hours > 0 )
+ set .@Time$, .@Time$ + .@Hours + " hour, ";
+
+ if( .@Minutes > 1 )
+ set .@Time$, .@Time$ + .@Minutes + " minutes, ";
+ else if( .@Minutes > 0 )
+ set .@Time$, .@Time$ + .@Minutes + " minute, ";
+
+ if( .@Time_Left > 1 || .@Time_Left == 0 )
+ set .@Time$, .@Time$ + .@Time_Left + " seconds.";
+ else if( .@Time_Left == 1 )
+ set .@Time$, .@Time$ + .@Time_Left + " second.";
+
+ return .@Time$;
+}
diff --git a/npc/other/mail.txt b/npc/other/mail.txt
index 0ca900727..626efcb0b 100644
--- a/npc/other/mail.txt
+++ b/npc/other/mail.txt
@@ -21,27 +21,6 @@
// Allow Mail Inbox reading from
//============================================================
-prontera mapflag town
-izlude mapflag town
-moc_ruins mapflag town
-geffen mapflag town
-payon mapflag town
-pay_arche mapflag town
-alberta mapflag town
-aldebaran mapflag town
-yuno mapflag town
-lighthalzen mapflag town
-einbroch mapflag town
-einbech mapflag town
-comodo mapflag town
-umbala mapflag town
-amatsu mapflag town
-gonryun mapflag town
-ayothaya mapflag town
-louyang mapflag town
-hugel mapflag town
-rachel mapflag town
-veins mapflag town
// Prontera
//============================================================