Add Guild MOTD GU 19.12 (Fix #316)

This commit is contained in:
AconiteX
2021-08-15 03:17:58 -04:00
parent 64c0decf3e
commit 66d6e5e0ba
3 changed files with 87 additions and 18 deletions
@@ -111,6 +111,7 @@ public class live_conversions extends script.base_script
handleCombatUpgradePlaqueReward(player);
startFactionalPresenceTrackingLoop(player);
startFactionalPresenceReportingLoop(player);
handleGuildMotd(player);
}
public void runOncePerTravelConversions(obj_id player) throws InterruptedException
{
@@ -1034,4 +1035,20 @@ public class live_conversions extends script.base_script
cancelRecurringMessageTo(player, "playerFactionalPresenceReportingHeartbeat");
}
/**
* Handles a Guild MOTD, if one is set
*/
public void handleGuildMotd(obj_id player) throws InterruptedException
{
final int id = getGuildId(player);
if(id > 0)
{
if(hasObjVar(getMasterGuildObject(), String.format(guild.VAR_GUILD_MOTD, id)))
{
final String msg = getStringObjVar(getMasterGuildObject(), String.format(guild.VAR_GUILD_MOTD, id));
sendConsoleMessage(player, String.format("\\#FFFF00***[Guild Message]:\\#. %s", msg));
}
}
}
}