Lets see what that might look like:
Alias that pre-loads the userdata trigger functions:
Pattern: load
Code: Select all
gwc.userdata.triggers = {
no_such_creature: function(){},
too_heavy: function(){},
you_killed: function(){}
};
Trigger for "You killed "
Code: Select all
gwc.userdata.triggers.no_such_creature();
After that, you would then have a "profile"-like alias that sets the triggers for a given situation:
Alias that loads situational trigger usage:
Pattern: orc_killer
Code: Select all
gwc.userdata.triggers.no_such_creature = function(){
gwc.connection.send('kill orc');
}
Now, whenever one kills something, it will immediately try to attack an orc in the area. This is very useful for individuals that know for a fact that they will be needing specific responses for a special case that they are doing that they will have to either turn off or completely alter in the near future. This has the added bonus of using the "load" alias in order to remove any loaded profiles without having to do so by hand. Any number of profiles can then be made and be used to quickswap triggers.