View Single Post
  #4  
Old 09-24-2005, 12:23 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
Originally Posted by Velox Cruentus
function __echo(message)
{
sendtonc(player.account @ ":" @ message);
}

This overrides the default "echo" command.
PHP Code:
(target).catchEvent(Object,PreviousEvent,NewEvent); 
Ex:

NPC Code:

player.catchEvent(player,"onKeyPressed","onAttacki ngTheKeyboard");
function onAttackingTheKeyboard(code,key) {
// Various scripts.
}



This is used in Guis quite a bit to catch and rename the "onAction" function with buttons to a new function name. Useful for many buttons that do simmilar things.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight