summaryrefslogtreecommitdiff
path: root/src/emap/script_buildins.c
diff options
context:
space:
mode:
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