/
afk.c
39 lines (33 loc) · 905 Bytes
/
afk.c
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
#include <stdio.h>
#include <string.h>
#include "../common/HPMi.h"
#include "../map/script.h"
#include "../map/pc.h"
HPExport struct hplugin_info pinfo =
{
"@afk", // Plugin name
SERVER_TYPE_MAP,// Which server types this plugin works with?
"0.1a", // Plugin version
HPM_VERSION, // HPM Version (don't change, macro is automatically updated)
};
ACMD(afk)
{
sd->state.autotrade = 1;
sd->state.monster_ignore = 1;
pc_setsit(sd);
skill->sit(sd,1);
clif->sitting(&sd->bl);
clif->changelook(&sd->bl,LOOK_HEAD_TOP,471);
clif->specialeffect(&sd->bl, 234,AREA);
clif->authfail_fd(fd, 15);
// Thanks for poiting that out! (quesoph, ossi0110)
return 1;
}
/* Server Startup */
HPExport void plugin_init (void)
{
clif = GET_SYMBOL("clif");
script = GET_SYMBOL("script");
skill = GET_SYMBOL("skill");
HPMi->addCommand("afk",ACMD_A(afk));
}