Page 2 of 3
Posted: Sat May 08, 2004 4:15 pm
by Skye
Lax wrote:
i dont get the "liking to keep to standards" comment though.. perl/regex are hardly "standard"
My comment refers to the definition of a custom scripting language - which is even further from convention than adopting a known language. I realize that the motivation is to create a dumbed-down language because we are dealing with non-programmer types, although it is hard for me to empathize with that rationale.
With that said, if I can figure out most all of the major programming / scripting languages, I'm sure that I can learn yet another (MQ2-scripting) language especially when the source is provided when I need to reverse-engineer capabilities.
Carry on - just explaining my perspective - don't change a thing on my behalf. As I said, I'm not doing the work - and the work you are doing is solid and I do appreciate it.
Posted: Sat May 08, 2004 5:52 pm
by nahsalot
Lax, I must say, you fucking own.
Not sure if there's anything else to add.
Posted: Sun May 09, 2004 5:07 am
by apollo5145
EQJoe, couldn't you have just done /target by ID then compare your target's id with the one you just targeted instead of clearing your target then checking if you had one?
Posted: Sun May 09, 2004 5:25 am
by Vituz
This sounds great gonna make my life slightly easier. When is it gonna be implemented (If I missed an actual date then I'm sorry but im blind).
Great job keep up the good work so us lazy people can have it easier :)
Posted: Sun May 09, 2004 2:13 pm
by Rusty~
This new event thing looks really nice. Should make a bunch of things much easier. Can't wait for it to go live, and keep up the nice work Lax
EQJoe, couldn't you have just done /target by ID then compare your target's id with the one you just targeted instead of clearing your target then checking if you had one?
Couldn't you just do something like
Code: Select all
/if ( !${Spawn[${mobID}].ID} ) {
stuff
}
Posted: Sun May 09, 2004 11:12 pm
by Lax
Active as of May 9th zip
Enjoy
Posted: Mon May 10, 2004 10:32 pm
by Skye
Thanks, Lax - really looking forward to this addition.
Posted: Thu May 13, 2004 12:41 am
by fryfrog
I have got to be doing something wrong.... the following is a code snippet of what I am trying to do... The problem is the variable ${SpellName} (which should be the #1#) does not get filled in. If I declare it, the result for that variable is "" and if I don't, its NULL. The variable "Line" is results in the entire line if NOT declared and NULL if i do declare it.
Perhaps I am simply setting up my event line wrong?
an exampe cast would be "You begin casting Howl of Tashan." and I would hope to capture "Howl of Tashan" as #1# (or ${SpellName}). Wtf am I doing wrong? :0
The #Event Line:
Code: Select all
#event BeginCast "You begin casting #1#."
The Event:
Code: Select all
Sub Event_BeginCast(string Line, string SpellName)
/echo ${Line}
/echo ${SpellName}
/echo ${SpellsToAnnounce}
/if (${String["${SpellsToAnnounce}"].Compare["${SpellName}"]}) {
/if (${UseChat1}==1) /${Chat1} ${SpellName} on [ %t ]!
/if (${UseChat2}==1) /${Chat2} ${SpellName} on [ %t ]!
/if (${UseChat3}==1) /${Chat3} ${SpellName} on [ %t ]!
}
/return
Posted: Thu May 13, 2004 12:45 am
by Lax
I'll double check it, your syntax looks like it should be fine.
Posted: Thu May 13, 2004 12:49 am
by fryfrog
Thanks :)
Posted: Thu May 13, 2004 1:04 am
by Lax
ok figured it out. The problem is (drumroll) the space after the comma!
I'll mess with it some and make sure that isnt a problem anymore.
Code: Select all
Sub Event_BeginCast(string Line,string SpellName)
Posted: Thu May 13, 2004 1:17 am
by fryfrog
Ha, so easy :)
Now I just gotta get my string compare working. Is there a "String[].Contains[]?
Posted: Thu May 13, 2004 1:19 am
by Lax
close. string.Find[whatever]
Posted: Thu May 13, 2004 1:44 am
by Lax
ok next zip
Code: Select all
#event MyEvent "[MQ2] love #1# and #2#"
sub Main
:Loop
/doevents
/delay 1
/goto :Loop
/return
sub Event_MyEvent(string Line, string One, string Two)
/echo - MyEvent - Line='${Line}'
/echo - MyEvent - One='${One}'
/echo - MyEvent - Two='${Two}'
/return
test:
Code: Select all
/mac <macro>
/echo love tits and ass
output:
Code: Select all
[MQ2] - MyEvent - Line='[MQ2] love tits and ass'
[MQ2] - MyEvent - One='tits'
[MQ2] - MyEvent - Two='ass'
leading spaces should be fine in function parameter declarations
Posted: Thu May 13, 2004 1:46 am
by ml2517
I only see one problem with this example.
It gave me the urge to touch myself.