summaryrefslogtreecommitdiff
path: root/npc/guilds
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-14 14:10:28 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-14 14:10:28 -0300
commit8990e4fae71b152ff78308f83b43c9a2083419d2 (patch)
tree12c4066fbabf19ad63781748028ebc143ec5f700 /npc/guilds
parent2c090b90f74d4b1cfc5d43cb9556f99d5bb86d0a (diff)
downloadserverdata-8990e4fae71b152ff78308f83b43c9a2083419d2.tar.gz
serverdata-8990e4fae71b152ff78308f83b43c9a2083419d2.tar.bz2
serverdata-8990e4fae71b152ff78308f83b43c9a2083419d2.tar.xz
serverdata-8990e4fae71b152ff78308f83b43c9a2083419d2.zip
Add all (or most of) Guild Utils, except for guild average player level.
More feature is required, and recipes list are still ToDo. Guild Hall cannot be accessed (yet).
Diffstat (limited to 'npc/guilds')
-rw-r--r--npc/guilds/_import.txt5
-rw-r--r--npc/guilds/alchemy.txt29
-rw-r--r--npc/guilds/forge.txt30
-rw-r--r--npc/guilds/logs.txt15
-rw-r--r--npc/guilds/management.txt82
-rw-r--r--npc/guilds/storage.txt26
6 files changed, 187 insertions, 0 deletions
diff --git a/npc/guilds/_import.txt b/npc/guilds/_import.txt
index a89482936..d61814f7e 100644
--- a/npc/guilds/_import.txt
+++ b/npc/guilds/_import.txt
@@ -1,2 +1,7 @@
// Map guilds: Guild Hall
// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/guilds/alchemy.txt",
+"npc/guilds/forge.txt",
+"npc/guilds/logs.txt",
+"npc/guilds/management.txt",
+"npc/guilds/storage.txt",
diff --git a/npc/guilds/alchemy.txt b/npc/guilds/alchemy.txt
new file mode 100644
index 000000000..008e2c2b6
--- /dev/null
+++ b/npc/guilds/alchemy.txt
@@ -0,0 +1,29 @@
+// Moubootaur Legends Script
+// Author:
+// Jesusalva
+// Description:
+// Guild Facility - Alchemy Table
+
+guilds,24,35,0 script Guild Chemistry NPC_NO_SPRITE,{
+ do
+ {
+ mesc l("What will you brew today?");
+ if (AlchemySystem(CRAFT_GUILD))
+ {
+ mesc l("Success!"), 3;
+ next;
+ }
+ else
+ {
+ mesc l("That didn't work!"), 1;
+ next;
+ }
+ mesc l("Try again?");
+ } while (askyesno() == ASK_YES);
+ close;
+
+OnInit:
+ .distance=2;
+ end;
+}
+
diff --git a/npc/guilds/forge.txt b/npc/guilds/forge.txt
new file mode 100644
index 000000000..55924656e
--- /dev/null
+++ b/npc/guilds/forge.txt
@@ -0,0 +1,30 @@
+// Moubootaur Legends Script
+// Author:
+// Jesusalva
+// Description:
+// Guild Facility - Blacksmith Area
+
+guilds,24,27,0 script Guild Blacksmith NPC_NO_SPRITE,{
+ do
+ {
+ mesc l("What will you forge today?");
+ mesc l("You might need to have a @@ equipped for some recipes!", getitemlink(Knife));
+ if (SmithSystem(CRAFT_GUILD))
+ {
+ mesc l("Success!"), 3;
+ next;
+ }
+ else
+ {
+ mesc l("That didn't work!"), 1;
+ next;
+ }
+ mesc l("Try again?");
+ } while (askyesno() == ASK_YES);
+ close;
+
+OnInit:
+ .distance=2;
+ end;
+}
+
diff --git a/npc/guilds/logs.txt b/npc/guilds/logs.txt
new file mode 100644
index 000000000..142109b23
--- /dev/null
+++ b/npc/guilds/logs.txt
@@ -0,0 +1,15 @@
+// Moubootaur Legends Script
+// Author:
+// Jesusalva
+// Description:
+// Guild Facility - Contains recipe list
+
+guilds,47,39,0 script Guild Logs NPC_NO_SPRITE,{
+ mesc l("Your guild doesn't know any recipes."), 1;
+ close;
+
+OnInit:
+ .distance=2;
+ end;
+}
+
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;
+}
+
diff --git a/npc/guilds/storage.txt b/npc/guilds/storage.txt
new file mode 100644
index 000000000..97218fbb1
--- /dev/null
+++ b/npc/guilds/storage.txt
@@ -0,0 +1,26 @@
+// Moubootaur Legends Script
+// Author:
+// Jesusalva
+// Description:
+// Guild Facility - Guild Storage
+
+guilds,33,28,0 script Guild Storage NPC_NO_SPRITE,{
+ .@gid=getcharid(2);
+ if (getguildlvl(.@gid) < 2)
+ {
+ npctalkonce l("Your guild need to have at least level 2 to use storage feature.");
+ }
+ else
+ {
+ if (guildopenstorage())
+ {
+ npctalkonce l("Someone else is using the guild storage right now. Please wait.");
+ }
+ }
+ end;
+
+OnInit:
+ .distance=2;
+ end;
+}
+