Skip to content

Commit

Permalink
Added dispbottom_all
Browse files Browse the repository at this point in the history
Send dispbottom to all players on the server.
Requires players to be attached.
This plugin can be improved to not require player at all.
  • Loading branch information
dastgir committed Nov 15, 2016
1 parent 1ff8078 commit 005e786
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions src/plugins/dispbottom_all.c
@@ -0,0 +1,61 @@
//===== Hercules Plugin ======================================
//= DispBottom All
//===== By: ==================================================
//= Dastgir/Hercules
//===== Current Version: =====================================
//= 1.0
//===== Description: =========================================
//= Adds color to dispbottom
//===== Changelog: ===========================================
//= v1.0 - Initial Release [Dastgir]
//===== Repo Link: ===========================================
//= https://github.com/dastgir/HPM-Plugins
//============================================================
#include "common/hercules.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "common/HPMi.h"
#include "common/memmgr.h"
#include "common/mmo.h"
#include "common/socket.h"
#include "common/strlib.h"
#include "map/clif.h"
#include "map/script.h"
#include "map/skill.h"
#include "map/pc.h"
#include "map/map.h"

#include "common/HPMDataCheck.h"

HPExport struct hplugin_info pinfo = {
"dispbottom All",
SERVER_TYPE_MAP,
"1.0",
HPM_VERSION,
};

BUILDIN(dispbottom_all) // Format : dispbottom_all("Message");
{
struct map_session_data *sd = script->rid2sd(st);
const char *message = script_getstr(st,2);

if (sd == NULL)
return true;

clif->disp_message(&(sd->bl), message, ALL_CLIENT);

return true;
}

HPExport void plugin_init (void)
{
addScriptCommand("dispbottom_all","s",dispbottom_all);
}

HPExport void server_online (void)
{
ShowInfo ("'%s' Plugin by Dastgir/Hercules. Version '%s'\n",pinfo.name,pinfo.version);
}

0 comments on commit 005e786

Please sign in to comment.