viewing paste topic/7023- dispbottomcolor.c | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
//===== Hercules Plugin ======================================
//= *dispbottomcolor Script Command
//===== By: ==================================================
//= AnnieRuru
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: ===================================== 
//= Hercules 2015-12-20
//===== Description: =========================================
//= just dispbottom with colors ... what else ?
//===== Topic ================================================
//= http://hercules.ws/board/topic/7023-dispbottomcolor/
//===== Additional Comments: =================================  
//= dispbottomcolor <message>,<color code>{,<account_id>};
//============================================================
 
#include "common/hercules.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "map/pc.h"
#include "map/script.h"
#include "common/HPMDataCheck.h"
 
HPExport struct hplugin_info pinfo = {
    "dispbottomcolor",
    SERVER_TYPE_MAP,
    "1.2",
    HPM_VERSION,
};
 
BUILDIN(dispbottomcolor) {
    TBL_PC *sd = script_hasdata(st,4)? map->id2sd( script_getnum(st,4) ) : script->rid2sd(st);
    if (sd)
        clif->messagecolor_self( sd->fd, script_getnum(st,3), script_getstr(st,2) );
    return true;
}
 
HPExport void plugin_init (void) {
    addScriptCommand( "dispbottomcolor", "si?", dispbottomcolor );
}
Viewed 1232 times, submitted by AnnieRuru.