CUSTOM EVENTS CHANGE COMING

For questions regarding conversion of scripts from the old, parm style to the new MQ2Data format. Conversion questions only!

Moderator: MacroQuest Developers

Skye
a lesser mummy
a lesser mummy
Posts: 33
Joined: Thu Jan 08, 2004 10:17 pm

Post by Skye » Sat May 08, 2004 4:15 pm

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.

nahsalot
orc pawn
orc pawn
Posts: 27
Joined: Fri Apr 02, 2004 11:38 am

Post by nahsalot » Sat May 08, 2004 5:52 pm

Lax, I must say, you fucking own.

Not sure if there's anything else to add.

apollo5145
orc pawn
orc pawn
Posts: 26
Joined: Wed Feb 25, 2004 8:14 pm

Post by apollo5145 » Sun May 09, 2004 5:07 am

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?

Vituz
decaying skeleton
decaying skeleton
Posts: 4
Joined: Mon Mar 29, 2004 2:34 pm

Post by Vituz » Sun May 09, 2004 5:25 am

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 :)

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Sun May 09, 2004 2:13 pm

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 :D

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
}

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun May 09, 2004 11:12 pm

Active as of May 9th zip
Enjoy
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Skye
a lesser mummy
a lesser mummy
Posts: 33
Joined: Thu Jan 08, 2004 10:17 pm

Post by Skye » Mon May 10, 2004 10:32 pm

Thanks, Lax - really looking forward to this addition.

fryfrog
a hill giant
a hill giant
Posts: 271
Joined: Fri Jun 20, 2003 5:37 am

Post by fryfrog » Thu May 13, 2004 12:41 am

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

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Thu May 13, 2004 12:45 am

I'll double check it, your syntax looks like it should be fine.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

fryfrog
a hill giant
a hill giant
Posts: 271
Joined: Fri Jun 20, 2003 5:37 am

Post by fryfrog » Thu May 13, 2004 12:49 am

Thanks :)

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Thu May 13, 2004 1:04 am

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)
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

fryfrog
a hill giant
a hill giant
Posts: 271
Joined: Fri Jun 20, 2003 5:37 am

Post by fryfrog » Thu May 13, 2004 1:17 am

Ha, so easy :)

Now I just gotta get my string compare working. Is there a "String[].Contains[]?

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Thu May 13, 2004 1:19 am

close. string.Find[whatever]
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Thu May 13, 2004 1:44 am

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
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Thu May 13, 2004 1:46 am

I only see one problem with this example.

It gave me the urge to touch myself.