Jump to content
Sign in to follow this  
Shikazu

[Script CMD]dispbottomcolor

Recommended Posts

Hey Guys,

 

It's just the first plugin in made for the HPM and i'm posting some more in this section, once i got everything out about the HPM :)

 

uPaste.me - http://upaste.me/8fec6054919f4fa2

 

 

#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){    clif = GET_SYMBOL("clif");    script = GET_SYMBOL("script");    if( HPMi->addScript != NULL )    {        HPMi->addScript("dispbottomcolor","s?",BUILDIN_A(dispbottomcolor));    }}

How to compile is very well explained in the Wiki, so if you running into problems, write here or in plugin support.

Edited by Shikazu

Share this post


Link to post
Share on other sites
#include <stdio.h>#include <string.h>#include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"#include "../map/clif.h"#include "../common/HPMDataCheck.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){    clif = GET_SYMBOL("clif");    script = GET_SYMBOL("script");    pc = GET_SYMBOL("pc");	        addScriptCommand("dispbottomcolor","s?",dispbottomcolor);}

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.