Index: clif.c
===================================================================
--- clif.c (revision 14431)
+++ clif.c (working copy)
@@ -8910,6 +8910,11 @@
{
const char* text = (char*)RFIFOP(fd,4);
int textlen = RFIFOW(fd,2) - 4;
+ int i, castskill = 0;
+ const struct { char text[16]; int id; } skills[] = {
+ { "heal", 28 },
+ { "cure", 35 },
+ };
char *name, *message;
int namelen, messagelen;
@@ -8921,6 +8926,21 @@
if( is_atcommand(fd, sd, message, 1) )
return;
+ for (i=0; i < ARRAYLENGTH(skills); i++) {
+ if (strncmpi(message, skills[i].text, 16) == 0) {
+ castskill = skills[i].id;
+ break;
+ }
+ }
if( sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) )
return; //we don't want to override those
if(castskill && sd->regen.state.walk) { //let do that only if we can walk
struct npc_data* nd = npc_name2id("SkillCaster");
pc_setreg(sd,add_str("@skilltocast"),castskill);
if(nd && nd->subtype==SCRIPT) {
run_script(nd->u.scr.script, 0, sd->bl.id, nd->bl.id);
return;
}
}