all right?

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Juzeph
New User
Posts: 23
Joined: Sun Apr 15, 2007 5:58 pm

all right?

Post 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
Last edited by Juzeph on Fri Jun 29, 2007 9:02 pm, edited 1 time in total.
Juzeph
New User
Posts: 23
Joined: Sun Apr 15, 2007 5:58 pm

Post by Juzeph »

Then??
Last edited by Juzeph on Fri Jun 29, 2007 9:02 pm, edited 1 time in total.
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

What was your original question?
Juzeph
New User
Posts: 23
Joined: Sun Apr 15, 2007 5:58 pm

Post by Juzeph »

:o

Why it doesn't work ?
Last edited by Juzeph on Fri Jun 29, 2007 9:05 pm, edited 1 time in total.
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post 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.
Juzeph
New User
Posts: 23
Joined: Sun Apr 15, 2007 5:58 pm

Post by Juzeph »

:(

...

Sorry...
Post Reply