Page 1 of 1

all right?

Posted: Fri Jun 08, 2007 10:53 pm
by Juzeph
pkg.cfg

Code: Select all

Enabled	   1
Name       message
syshook.cfg

Code: Select all

SystemHookScript ssmessage.ecl
{
 SendSysMessage SendMessage
}
ssmessage.src

Code: Select all

use uo;
use unicode;

const TXT_FONTE := 3;
const TXT_COLOR := 50;

program ssmessage()
 return 1;
endprogram

exported function SendMessage(who, text, font := TXT_FONTE, color := TXT_COLOR, langcode := "ENG")
 return SendSysMessageUC(who, UC(text), langcode, font, color);
endfunction

function UC(strs)
 var result := array {};
  if(TypeOf(strs) != "Array")
   result := CAscZ(CStr(strs));
  else
   foreach str in (strs)
     if(TypeOf(str) != "Array")
      str := CAscZ(CStr(str));
     endif
    result := result + str;
   endforeach
  endif
 return result;
endfunction

Posted: Wed Jun 13, 2007 6:30 pm
by Juzeph
Then??

Posted: Wed Jun 13, 2007 7:49 pm
by Yukiko
What was your original question?

Posted: Wed Jun 13, 2007 9:19 pm
by Juzeph
:o

Why it doesn't work ?

Posted: Wed Jun 13, 2007 9:44 pm
by CWO
It doesn't work because you're trying to hook SendSysMessage which can't be hooked. Only CheckSkill, OpenSpellbook, GetBookPage, CombatAdvancement, ParryAdvancement, Attack, Pushthrough, and SpeechMul can be hooked.

Posted: Thu Jun 14, 2007 8:30 am
by Juzeph
:(

...

Sorry...