Old stick to MQ2DATA

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

bonehand
a lesser mummy
a lesser mummy
Posts: 48
Joined: Tue Feb 17, 2004 5:16 pm

Old stick to MQ2DATA

Post by bonehand » Fri Apr 16, 2004 8:40 pm

I love MQ2. It is one of the best tools I have ever seen for a game since UOE for Ultima Online worked. The devs really have put in some serious time coding it and their hard work is definately appreciated. Lately though, I have lost a lot of hope in it. With the complete and utter lack of explanations for half of the new command structure, I'm finding difficulty in transfering over even the simplest of macros. I have read every thread concerning MQ2DATA which actually makes me hesitate to even post this request. Everyone in the threads but the devs are flamed as retarded, script kiddies, or just being annoying in general it seems in their eyes, no matter the problem or post. If I didn't need help, I wouldn't be here. I would be out scripting again instead of relearning everything. =/

The one macro I use more than anything, and thus decided to port over was one of m0nk's early releases of stick.mac. I was just getting into the nitty-gritty of the old Parm system then this rewrite began...it's been a real setback. I've put everything I've worked on into a holding pattern till I can at least figure out what the damn program is expecting me to tell it in the macros to do. Logical command structure seems to have been tossed out the window and replaced with something that is way over my head. I might be able to understand it quickly, but I don't take acid and smoke pot anymore...

That's my rant...now on to my request for assistance...

History: I've edited this here and there and it worked fine for my purposes...stay in range, kick and taunt the MOB so I could AFK for a second during a battle if needed.

Problems now: I'm getting logic problems in the /newif structure. The main issues involve string comparisons, but everything in general related to the new system seems like it's harder than it should be. Some return NULL, some return boolean values, others just return NULL in brackets or comprised of parentheticals and other structural components... Simply put, I just don't get it.

You don't have to rewrite the mac. Just explain to me what the hell I am missing and give an example if that's what time will allow and I might have an epiphony. I copied some of the code structure almost exactly from the few other macros that are currently being upgraded, but it's still not right so maybe I'm not the only one wanting a helping hand! HERLP!

bone

Code: Select all

#turbo 

#event EXP "experience!" 
#event rageon "has become ENRAGED." 
#event rageoff "is no longer enraged" 

sub main 
      /declare Special1 global 
      /declare Special2 global 
      /declare SpecialTime1 global 
      /declare SpecialTime2 global 
      /declare TimerSpecial1 timer 
      /declare TimerSpecial2 timer 
      /declare MaxDistance global 
      /declare MinDistance global
      /declare TooClose global
      /declare MobID global 
   :edit 
      /varset Special1 Kick 
      /varset SpecialTime1 60
      /varset Special2 Taunt
      /varset SpecialTime2 60

   :setup 
      /varset TimerSpecial1 @SpecialTime1 
      /varset TimerSpecial2 @SpecialTime2 
      /varset MaxDistance @Param1 
      /varset MinDistance @Param2
      /varset TooClose @Param3
      
   /newif ${String[@MaxDistance].Equal[NULL]} {
   	/varset MaxDistance 18
   	/varset MinDistance 10
   	/varset TooClose 4
   }

   :mainloop 
      /doevents
| This part works - loops until character is in combat mode.
      /newif ${Me.Combat}==1 /newif $String($(Target{ 
          /varset MobID ${Target.ID}
          /delay 1 
          /call attack 
      } 
   /goto :mainloop 
/endmacro 

sub attack 
   :attackstart 
      /echo Attack ${Target.CleanName}
| not working - stays in attack mode even when target clears, doesn't follow target - pretty much just boggles me...
      /newif ${String{${Target.ID}.Equal[NULL]} /return 
   :attackfight 
      /newif ${String{${Target.Type}.NotEqual[NPC]}} /goto :attackend 
      /newif ${String{${Char.IsCasting}.NotEqual[TRUE]}} /face fast nolook 
      /newif ${Bool[${Target}]}!=0 /newif ${Bool[${Char.IsCasting}]}!=0 /newif ${Target.Distance}>=@MaxDistance /keypress FORWARD HOLD
      /newif ${Bool[${Target}]}!=0 /newif ${Bool[${Char.IsCasting}]}!=0 /newif ${Target.Distance}<=@MinDistance /keypress FORWARD
      /newif ${Bool[${Target}]}!=0 /newif ${Bool[${Char.IsCasting}]}!=0 /newif ${Target.Distance}<@TooClose {
      	  /keypress BACK HOLD
      	  /delay 1
      	  /keypress BACK
      }
      /doevents 
      /newif ${Target.ID}!=@MobID /goto :attackend 
      /newif ${Target.Distance}>100 /goto :attackend 
      /newif ${String[@Special1].NotEqual[NULL]} /newif @TimerSpecial1==0 /newif ${Bool${Char.IsCasting}}!=1 /newif ${Target.Distance)<=@MaxDistance /goto :attackspecial1 
      /newif ${String[@Special2].NotEqual[NULL]} /newif @TimerSpecial2==0 /newif ${Bool${Char.IsCasting}}!=1 /newif ${Target.Distance)<=@MaxDistance /goto :attackspecial2 
   /goto :attackfight 

   :attackspecial1 
      /newif ${String[@Special1].Equal[NULL]} /goto :attackfight 
      /doability "@Special1" 
      /varset TimerSpecial1 @SpecialTime1 
   /goto :attackfight 

   :attackspecial2 
      /newif ${String[@Special2].Equal[NULL]} /goto :attackfight 
      /doability "@Special2" 
      /varset TimerSpecial2 @SpecialTime2 
   /goto :attackfight 

   :attackend 
      /attack off
      /keypress FORWARD
      /endmacro 
/return 

sub event_exp 
   /echo Attack OFF !!! 
   /newif ${Target.Type}.NotEqual[CORPSE] {
   	/target id @MobID
   	/return
   }
   /attack off
   /endmacro
/return 

sub event_rageon 
   /echo Rage On 
   /attack off 
/return 

sub event_rageoff 
   /echo Rage Off 
   /attack on 
/return 

s16z
a ghoul
a ghoul
Posts: 97
Joined: Thu Apr 01, 2004 12:03 pm

Stop converting stuff!

Post by s16z » Sat Apr 17, 2004 10:20 am

Example:

Code: Select all

/newif ${String{${Target.ID}.Equal[NULL]} /return
Why do you convert the result to a string, after the comparison? /newif expects a number. Try just using:

Code: Select all

/newif ${Target.ID.Equal[NULL]} /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 » Sat Apr 17, 2004 11:46 am

Try reading the four fucking explanation topics in the god damn announcements, its a fucking easy system.

NULL, TRUE, and FALSE all get converted to numbers, this is explained many times.

This peen isn't converting the result to a string, he's converting the ID to a string. Fucking christ. NULL is semantically equal to 0.

Code: Select all

/newif !${Target.ID} /return
or

Code: Select all

/newif ${Target.ID}==NULL /return
Your problem is you assume because of the old system that you have to treat everything as strings. DONT. Like what the fuck is THIS:

Code: Select all

/newif ${String{${Char.IsCasting}.NotEqual[TRUE]}} /face fast nolook
#1 that doesnt even EXIST. Read the god damn reference.
#2 You're checking a boolean value (TRUE/FALSE), which as explained above and 57349543754389 times in the explanation topics and elsewhere are 1/0, as a string.

Code: Select all

/newif !${Me.Casting.ID} /face fast nolook
The system is fucking easy, the problem is you havent read how to use it or anything involved.

Here's another problem:
${Bool[${Target}]}!=0

Above you took a bool and converted it to string, so why are you doing it like this later? What you want is /newif ${Target.ID}

Code: Select all

/newif ${Bool[${Target}]}!=0 /newif ${Bool[${Char.IsCasting}]}!=0 /newif ${Target.Distance}>=@MaxDistance /keypress FORWARD HOLD 
This line should be like this:

Code: Select all

(/newif ${Target.ID} && {Me.Casting.ID} && ${Target.Distance}>=@MaxDistance) /keypress FORWARD HOLD
This system is EASY. You're just making it extremely hard on yourself because you havent read how to fucking use it, or looked at any examples apparently.
Last edited by Lax on Sat Apr 17, 2004 10:34 pm, edited 1 time in total.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sat Apr 17, 2004 11:53 am

Yes, I have to agree with Lax. It is easy once you get the hang of what is going on.

If you read through all of his explanations etc... in the Announcements section, it becomes quite a bit clearer.

The updated readme is coming soon, but it's taking quite a bit of change since the new system is so much more flexible.

bonehand
a lesser mummy
a lesser mummy
Posts: 48
Joined: Tue Feb 17, 2004 5:16 pm

Post by bonehand » Sat Apr 17, 2004 7:52 pm

Thanks for the help s16z, honestly, I was attempting all kinds of things to get this shit system to work properly. When I /echo something in testing and the values are all different it's a little confusing. I assumed I should compare it to the numeric/string Value, 0, 1, NULL, TRUE, or FALSE that it returned...hence the string compare to NULL when it was not working properly the other ways.

It's no big deal to me, other than basic functionality of MQ2 I can do without macros in EQ till the readme comes out. Half assed explanations in 30 threads and broken code in the "examples" is not cutting it for me and I don't have the time to put into the IRC channel to figure it out.

Nice to see Lax's endearing personality always shines through...now, where is that bar of soap?

bonehand
a lesser mummy
a lesser mummy
Posts: 48
Joined: Tue Feb 17, 2004 5:16 pm

Post by bonehand » Sat Apr 17, 2004 8:10 pm

This is exactly one of the reasons for why I'm getting so confused...

Is there a reason that Target.Distance does not have brackets? If it does not need brackets why does Me.Casting.ID?

Code: Select all

/newif ${Target.ID} && {Me.Casting.ID} && Target.Distance>=@MaxDistance /keypress FORWARD HOLD/code]

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

Post by ml2517 » Sat Apr 17, 2004 8:45 pm

Nah he just typo'd some stuff, try this:

Code: Select all

/newif ((${Target.ID})&&(${Me.Casting.ID})&&(${Target.Distance}>=@MaxDistance})) /keypress FORWARD HOLD    

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 » Sat Apr 17, 2004 10:33 pm

ok, slight typo there sorry. it does need ${} or it wont be parsed. DONT put () around every item like ml2517 suggests.

The "30 half-assed explanations" ... i dont know what to say to that, there's a complete reference post which gives every detail about syntax and ever object, theres a technical reference which gives definitions, there's an explanation of how the flow of the parser goes if you still dont get it, and there's an introduction which takes you step by step how to use the system and gives examples. If thats half-assed, then I'm not going to bother to help you in the future.

Code: Select all

/newif (${Target.ID} && {Me.Casting.ID} && ${Target.Distance}>=@MaxDistance) /keypress FORWARD HOLD
will do just fine. The only time you need parentheses is a) if you're going to use spaces in your condition or b) if you need to break things up so it's not ambiguous.. e.g. 1+2*2+1 .. basic order of operations makes that 1+(2*2)+1, so if you want (1+2)*(2+1), you use parentheses. Theyre not necessary around each part

Sorry for offering you the explanations necessary and for offering very distinct and informative references, introductions, and examples. I would assume if you knew English you would understand them. I honestly dont even believe you've gone into MQ2 Announcements and looked at the 4 of them.
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 » Sat Apr 17, 2004 10:38 pm

now where's that tire iron
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

LamahHerder
a hill giant
a hill giant
Posts: 299
Joined: Sat Jun 29, 2002 2:37 am

Post by LamahHerder » Mon Apr 19, 2004 3:21 pm

p.s. any reason you prefer useing the old one instead of the 2.25.04a one? just wondering so can improve stuff if i created an issue i didnt know about.....

Stix
orc pawn
orc pawn
Posts: 14
Joined: Tue Apr 20, 2004 12:39 am

Post by Stix » Tue Apr 20, 2004 12:45 am

moved to macro depot.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Re: Stop converting stuff!

Post by wassup » Tue Apr 20, 2004 1:29 am

s16z wrote:Example:

Code: Select all

/newif ${String{${Target.ID}.Equal[NULL]} /return
Why do you convert the result to a string, after the comparison? /newif expects a number. Try just using:

Code: Select all

/newif ${Target.ID.Equal[NULL]} /return
Better yet...

Code: Select all

/newif !${Target.ID} /return