viewing paste dispbottomcolor.c | C | Private

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
#include <stdio.h>
#include <string.h>
#include "../common/HPMi.h"
#include "../map/script.h"
#include "../map/pc.h"
 
HPExport struct hplugin_info pinfo = {
    "dispbottomcolor",      // Plugin name
    SERVER_TYPE_MAP,// Which server types this plugin works with?
    "1.0",          // Plugin version
    HPM_VERSION,    // HPM Version (don't change, macro is automatically updated)
};
 
BUILDIN(dispbottomcolor) 
{
    TBL_PC *sd = script_rid2sd(st);
    const char *message;
    int color;
    
    message=script_getstr(st,2);
 
    if(script_hasdata(st,3))
        color=script_getnum(st,3);
    else 
        color = COLOR_DEFAULT;
 
    if(sd)
        clif->colormes(sd->fd,color,message);
    return true;
}
 
/* Server Startup */
HPExport void plugin_init (void) 
{
    if( HPMi->addScript != NULL ) 
    {
        HPMi->addScript("dispbottomcolor","s?",BUILDIN_A(dispbottomcolor));
    }
}
 
Viewed 394 times, submitted by Shikazu.