diff options
Diffstat (limited to 'npc/guilds/management.txt')
-rw-r--r-- | npc/guilds/management.txt | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/npc/guilds/management.txt b/npc/guilds/management.txt new file mode 100644 index 000000000..4b099adee --- /dev/null +++ b/npc/guilds/management.txt @@ -0,0 +1,82 @@ +// Moubootaur Legends Script +// Author: +// Jesusalva +// Description: +// Guild Facility - Guild Settings (for guildmaster) + +guilds,35,30,0 script Guild Management NPC_NO_SPRITE,{ + function gmaster; + .@gid=getcharid(2); + mesc (".:: "+getguildname(.@gid)+" ::."), 1; + mesc l("Guild Master: @@", getguildmaster(.@gid)), 3; + if (getguildnxp(.@gid) > 0) + mesc l("Guild Lv @@, @@/@@ EXP to level up", getguildlvl(.@gid), getguildexp(.@gid), getguildnxp(.@gid)); + else + mesc l("Guild Lv @@, @@/@@ EXP to level up", getguildlvl(.@gid), getguildexp(.@gid), "???"); + + // I forgot a function to get player title and allow any guildmaster to change this + if (strcharinfo(0) == getguildmaster(.@gid)) + { + do + { + gmaster(); + next; + mesc l("Do you want to do something else?"); + } while (askyesno() == ASK_YES); + } + close; + + 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 "setguildrole(%d,%d,%d,%d,\"%s\")", .@gid, .@idx, .@perm, .@exptax, .@name$; + setguildrole(.@gid, .@idx, .@perm, .@exptax, .@name$); + mesc l("Done!"), 3; + return; + } + +OnInit: + .distance=1; + end; +} + |