summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-08-25 13:41:58 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-08-25 13:41:58 +0000
commitf15ab412ee4c82036070b48ed5ad3ae18e4dfa75 (patch)
tree0c175eb34926a08fb11ed02ba3afe6378d31b49b /src/map/script.c
parentb2cdf64e3c1c2b4bff6972d39cb1f2c5afb84b2d (diff)
downloadhercules-f15ab412ee4c82036070b48ed5ad3ae18e4dfa75.tar.gz
hercules-f15ab412ee4c82036070b48ed5ad3ae18e4dfa75.tar.bz2
hercules-f15ab412ee4c82036070b48ed5ad3ae18e4dfa75.tar.xz
hercules-f15ab412ee4c82036070b48ed5ad3ae18e4dfa75.zip
Implemented Progress Bar.(topic:207933)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14024 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index ba2c9dc51..6597b3eae 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14101,6 +14101,30 @@ BUILDIN_FUNC(areamobuseskill)
return 0;
}
+
+BUILDIN_FUNC(progressbar)
+{
+#if PACKETVER >= 20080318
+ struct map_session_data * sd = script_rid2sd(st);
+ const char * color;
+ unsigned int second;
+
+ if( !st || !sd )
+ return 0;
+
+ st->state = STOP;
+
+ color = script_getstr(st,2);
+ second = script_getnum(st,3);
+
+ sd->progressbar.npc_id = st->oid;
+ sd->progressbar.timeout = gettick() + second*1000;
+
+ clif_progressbar(sd, strtol(color, (char **)NULL, 0), second);
+#endif
+ return 0;
+}
+
// declarations that were supposed to be exported from npc_chat.c
#ifdef PCRE_SUPPORT
BUILDIN_FUNC(defpattern);
@@ -14456,6 +14480,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(readbook,"ii"),
BUILDIN_DEF(setfont,"i"),
BUILDIN_DEF(areamobuseskill,"siiiiviiiii"),
+ BUILDIN_DEF(progressbar, "si"),
// WoE SE
BUILDIN_DEF(agitstart2,""),
BUILDIN_DEF(agitend2,""),