summaryrefslogtreecommitdiff
path: root/src/emap/script_buildins.c
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-10-19 22:49:18 -0300
committerJesusaves <cpntb1@ymail.com>2019-10-19 22:49:18 -0300
commit14faa4b22f37a7c7b75b3937efd1da71ce1ef5cb (patch)
treec42b0461d9d170cf6bb9e492061bbb141bb59860 /src/emap/script_buildins.c
parent2b1948fb9004a66450192405f3ebd258d0b22837 (diff)
downloadevol-hercules-14faa4b22f37a7c7b75b3937efd1da71ce1ef5cb.tar.gz
evol-hercules-14faa4b22f37a7c7b75b3937efd1da71ce1ef5cb.tar.bz2
evol-hercules-14faa4b22f37a7c7b75b3937efd1da71ce1ef5cb.tar.xz
evol-hercules-14faa4b22f37a7c7b75b3937efd1da71ce1ef5cb.zip
Add a function to retrieve EXP tax for a certain guild role.
There's a prototype (WIP) to retrieve the configured role name. That would allow us in a future to allow guild role name customization
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r--src/emap/script_buildins.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index 89c2aab..23de383 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -2614,6 +2614,60 @@ BUILDIN(getguildnxp)
/*==========================================
+ * Return the EXP tax for (guild, position)
+ * -1 if not found
+ *------------------------------------------*/
+BUILDIN(getguildpostax)
+{
+ int guild_id, gpos;
+ struct guild* g;
+
+ guild_id = script_getnum(st,2);
+ gpos = script_getnum(st,3);
+
+ if( ( g = guild->search(guild_id) ) != NULL )
+ {
+ script_pushint(st,g->position[gpos].exp_mode);
+ }
+ else
+ {
+ script_pushint(st,-1);
+ }
+ return true;
+}
+
+
+/*==========================================
+ * Return the title (guild, position)
+ * "" if not found
+ *------------------------------------------*/
+BUILDIN(getguildpostitle)
+{
+ ShowError("getguildpostitle is NOT working - Or rather, it is, but with a free error. So DO NOT USE.\n");
+ script_pushstr(st,"NotYetImplemented");
+ return true;
+
+ int guild_id, gpos;
+ struct guild* g;
+ char* pname;
+
+ guild_id = script_getnum(st,2);
+ gpos = script_getnum(st,3);
+
+ if( ( g = guild->search(guild_id) ) != NULL )
+ {
+ pname=g->position[gpos].name;
+ script_pushstr(st, pname);
+ }
+ else
+ {
+ script_pushstr(st,"");
+ }
+ return true;
+}
+
+
+/*==========================================
* Change a position for the @guild_id
* -1 if not found
* This will be superseed by ManaPlus eventually