Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |