Thanks for the reply ossi0110
The following is what i've thrown into nhide.c:
[cbox]
#include <stdio.h>
#include <string.h>
#include "../common/HPMi.h"
#include "../map/script.h"
#include "../map/clif.h"
#include "../map/pc.h"
#include "../map/atcommand.h"
HPExport struct hplugin_info pinfo = {
"nhide", // 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)
};
ACMD(hide)
{
if (sd->sc.option & OPTION_INVISIBLE) {
sd->sc.option &= ~OPTION_INVISIBLE;
if (sd->disguise != -1 )
status->set_viewdata(&sd->bl, sd->disguise);
else
status->set_viewdata(&sd->bl, sd->status.class_);
clif->specialeffect(&sd->bl, 587, ALL_CLIENT); // Smoke effect
clif->specialeffect(&sd->bl, 589, ALL_CLIENT); // Smoke effect
clif->message(fd, msg_txt(10)); // Invisible: Off
// increment the number of pvp players on the map
map->list[sd->bl.m].users_pvp++;
if( map->list[sd->bl.m].flag.pvp && !map->list[sd->bl.m].flag.pvp_nocalcrank ) {
// register the player for ranking calculations
sd->pvp_timer = timer->add( timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0 );
}
//bugreport:2266
map->foreachinmovearea(clif->insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl);
} else {
sd->sc.option |= OPTION_INVISIBLE;
sd->vd.class_ = INVISIBLE_CLASS;
clif->specialeffect(&sd->bl, 587, ALL_CLIENT); // Smoke effect
clif->specialeffect(&sd->bl, 589, ALL_CLIENT); // Smoke effect
clif->message(fd, msg_txt(11)); // Invisible: On
// decrement the number of pvp players on the map
map->list[sd->bl.m].users_pvp--;
if( map->list[sd->bl.m].flag.pvp && !map->list[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ) {
// unregister the player for ranking
timer->delete( sd->pvp_timer, pc->calc_pvprank_timer );
sd->pvp_timer = INVALID_TIMER;
}
}
clif->changeoption(&sd->bl);
return true;
}
/* Server Startup */
HPExport void plugin_init (void)
{
clif = GET_SYMBOL("clif");
script = GET_SYMBOL("script");
pc = GET_SYMBOL("pc");
atcommand = GET_SYMBOL("atcommand");
if( HPMi->addCommand != NULL ) {//link our '@sample' command
HPMi->addCommand("hide",ACMD_A(nhide));
}
}[/cbox]
Basically all i've done is copied the original @hide code and added two smoke effects. The source version i have from 4-5 years ago obviously wouldn't work with Hercules, so i've tried to just slot them into this instead. I'm trying to use it as a plugin so i can turn it off and on without having to recompile everytime i want to stop the purple smoke from showing.
p.s. i've -never- played with the source before, so i'm a big nab @.@