summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-12 03:34:16 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-12 03:34:16 -0300
commit76ed7e5d407c70a63555faddacaa435dfcd02c0b (patch)
treedd7b95e7b348da1628ac75ab507ace0e9dc15589 /npc
parentb7697d99d7a1e95f6d8c769871314e37a4dbfe2b (diff)
downloadserverdata-76ed7e5d407c70a63555faddacaa435dfcd02c0b.tar.gz
serverdata-76ed7e5d407c70a63555faddacaa435dfcd02c0b.tar.bz2
serverdata-76ed7e5d407c70a63555faddacaa435dfcd02c0b.tar.xz
serverdata-76ed7e5d407c70a63555faddacaa435dfcd02c0b.zip
Add full server-side support for guilds on Estard. This draft will become
TMW2 Guild Manager. I'm amazed, everything worked as 4144 said it would. Customized EXP donation for guild roles (capped at 50%)? Check. Setting a Vice Leader (kick+invite) and a Recruiter (invite)? Check. Levelling up your Guild because Guild need levels (NYI)? Check. ...Increase Guild Maximum Member count? Oops! Not available yet. But seems like Hercules can take care of that for us, with GLvl.
Diffstat (limited to 'npc')
-rw-r--r--npc/003-2/estard.txt56
1 files changed, 55 insertions, 1 deletions
diff --git a/npc/003-2/estard.txt b/npc/003-2/estard.txt
index c809a61d5..0da03d79c 100644
--- a/npc/003-2/estard.txt
+++ b/npc/003-2/estard.txt
@@ -83,6 +83,56 @@
return;
}
+ function gmaster {
+ .@gid=getcharid(2);
+ mesn;
+ mesc l("Please select the Guild Position you want to change.");
+ menuint
+ l("Abort"), -1,
+ l("Guild Master"), GPOS_GUILDMASTER,
+ l("Vice Leader"), GPOS_VICELEADER,
+ l("Recruiter"), GPOS_RECRUITER,
+ l("Position 4"), GPOS_4,
+ l("Position 5"), GPOS_5,
+ l("Newbie"), GPOS_NEWBIE;
+ mes "";
+ .@idx=0+@menuret;
+ if (.@idx < 0)
+ return;
+ mesc l("Please write how much in percent is EXP Tax for member (range: 0~50)"), 1;
+ input .@exptax;
+ if (.@exptax < 0 || .@exptax > 50)
+ return;
+ mesc l("Applying...");
+ switch (.@idx) {
+ case GPOS_GUILDMASTER:
+ .@name$="GuildMaster";
+ .@perm=GPERM_ALL;
+ break;
+ case GPOS_VICELEADER:
+ .@name$="ViceLeader";
+ .@perm=GPERM_ALL;
+ break;
+ case GPOS_RECRUITER:
+ .@name$="Recruiter";
+ .@perm=GPERM_INVITE;
+ break;
+ case GPOS_NEWBIE:
+ .@name$="Newbie";
+ .@perm=0;
+ break;
+ default:
+ .@name$="Position "+(.@idx+1);
+ .@perm=0;
+ break;
+ }
+ debugmes "sgr(%d,%d,%d,%d,\"%s\")", .@gid, .@idx, .@perm, .@exptax, .@name$;
+ .@re=setguildrole(.@gid, .@idx, .@perm, .@exptax, .@name$);
+ mesc l("Done"), 3;
+ debugmes "Result: %d", .@re;
+ return;
+ }
+
function ginfo {
.@gid=getcharid(2);
mesn;
@@ -132,6 +182,7 @@
rif(getq(General_Guild) && getcharid(2) <= 0 && countitem(Emperium) == 0, l("I would like to create a guild.")),
rif(getq(General_Guild) && getcharid(2) > 0, l("I would like to open Guild Storage.")),
rif(is_admin() && getcharid(2) > 0, l("I would like to read Guild Information.")),
+ rif(is_admin() && getcharid(2) > 0, l("I would like to edit Roles.")),
menuaction(l("Quit"));
switch (@menu)
@@ -151,8 +202,11 @@
case 5:
ginfo;
break;
+ case 6:
+ gmaster;
+ break;
}
- } while (@menu < 6);
+ } while (@menu < 7);
closedialog;
goodbye;