I noticed in the release notes for .78
- Triggers service, powered by Blech, added
- AddTrigger, RemoveTrigger commands added (scripts only)
Any examples on how to use this ? Cant find it in the Wiki. I play WoW mainly and am thinking about writing a buff bot but any example would help.
Fippy
InnerSpace Trigger Service How to ?
Moderators: Lavish Software Team, Moderators
I didnt get a good chance to put more information in the wiki yet.
If you want to do this in a script, then for the moment, what you want to look at is [[LavishScript:Designing_Scripts]], particularly the "Event Processing" portion. The example is designed for Fury, but other than not having a Speak command will work perfectly fine in IS.
This was a test script someone used for EQ1 while I was working on the IS trigger system
I'll be adding more information and examples to the wiki this week
If you want to do this in a script, then for the moment, what you want to look at is [[LavishScript:Designing_Scripts]], particularly the "Event Processing" portion. The example is designed for Fury, but other than not having a Speak command will work perfectly fine in IS.
Code: Select all
function RegisterEvents()
{
; Add each event
AddTrigger MyTrigger "@WHO@ kills YOU."
AddTrigger YouHit "You hit @WHO@ for @DAMAGE@ point@s@ of damage"
}
function main()
{
call RegisterEvents
do
{
if !${QueuedCommands}
WaitFrame
else
ExecuteQueued
}
while 1
}
;AddTrigger MyTrigger "@WHO@ kills YOU."
function MyTrigger(string Line, string Who)
{
Speak -sync You have been killed by ${Who}
}
;AddTrigger YouHit "You hit @WHO@ for @DAMAGE@ point@s@ of damage"
function YouHit(string Line, string Who, int Damage)
{
; Note that this function only has 3 parameters. the "s" value from the trigger will be ignored!
Speak You hit ${Who} for ${Damage} damage
}
Code: Select all
function main()
{
declare status string 0
AddTrigger BeginCastSpell "You begin casting @SPELL@."
AddTrigger BeginCastTest "You begin casting @SPELL@"
AddTrigger BeginCastWood "You begin @1@ Skin like Wood."
AddTrigger AllChat "@blah@"
do
{
if !${QueuedCommands}
WaitFrame
else
{
echo executing queued commands
ExecuteQueued
}
}
while 1
echo All done, shouldn't get here
}
function BeginCastSpell(string line, string spel)
{
echo "Casting ${spel}"
}
function BeginCastTest(string line)
{
echo In BeginCastTest
}
function BeginCastWood(string line, string doing)
{
echo In BeginCastWood
}
function AllChat(string line)
{
echo Got ${line}
}
Actually, it doesnt. Inner Space doesnt read log files, it's up to game-specific extensions (or simply a log reader extension) to support it. ISXEQ is the only one that does currently.
I should have mentioned this earlier I know You can request it be implemented in the extension you're using on ismods of course
I should have mentioned this earlier I know You can request it be implemented in the extension you're using on ismods of course
I am thinking a generic extension with a method of setting which logfile to use would be handy as it could be used for any game that writes to a log file.
Being a bit of a noob as far as C and C++ goes its probably too big a job for me to tackle myself but I wouldnt mind having a go if I had some idea on what would be needed.
Is this even feasible or would there be some level of game specific processing required ? If it is a simple as setting which logfile to use opening the logfile processing lines as they are written then I might have a chance but if it gets too complicated id be knackered.
Being a bit of a noob as far as C and C++ goes its probably too big a job for me to tackle myself but I wouldnt mind having a go if I had some idea on what would be needed.
Is this even feasible or would there be some level of game specific processing required ? If it is a simple as setting which logfile to use opening the logfile processing lines as they are written then I might have a chance but if it gets too complicated id be knackered.
I may be able to add part of the system Fury uses for reading log files, but Inner Space isn't really meant to be a log parser Ideally, a game-specific extension such as ISXEQ would read directly from the chat window or such, rather than waiting until the log is written and then reading that. That also gives a higher degree of accuracy -- log files in EQ for example are accurate to 1 second because of the timestamp, and log files in SWG are written like 10 seconds after the fact (or were, when I last tested it a couple years ago).
I would post your request on ISMods, and perhaps someone with a little more knowledge than yourself can add it to an existing extension.
I would post your request on ISMods, and perhaps someone with a little more knowledge than yourself can add it to an existing extension.