About $v $p etc commands..

Need help running MacroQuest 1? Too bad! Use MQ2.

Moderator: MacroQuest Developers

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

About $v $p etc commands..

Post by Draekz » Fri Aug 02, 2002 3:34 pm

I was just wondering..i was looking through a lot of the macro script coding and noticed a lot use $v79 and whatnot..

But I dont really ever see anything that defines what $v79 is? Is there a hardcoded value for these numbers? Or is it defined with /varset?

And if its defined with /varset...then how do you define what $p0 is and whatnot..i see a lot of /varset $v79 p0 and whatnot

But when i go and trace the code route (well..least i think im following where the codes going) it always has $p0 but never defines what p0 is?

I dunno if that makes sense, but the way i see it is that apparently $v and $p have some sorta definition just built into the program? Because it never actually points to a subevent that defines what those digits mean?

Hope someone understands what i just said lol..

All in all, if anyone could do a short explanation of where these values are coming from and how they work (just do a short 1 or 2 liner code thing if you could) that'd be great!

I have checked out all the manuals and stuff but I dont understand what they mean when they define those values.

One last question, if the others cant be answered.. what does != mean? I was thinking equal to but i think thats == annd well i cant remember !=
mebbe it equals "and" or something? i dunno :D

If you could tell me what that means that'd help too ;) thanks!

Much appreciated

FlashG
Contributing Member
Contributing Member
Posts: 104
Joined: Thu Jul 11, 2002 6:38 pm

vars

Post by FlashG » Fri Aug 02, 2002 5:00 pm

$p0 $p1 $p2 (and more?) are parameter varibles (similar to aurgc, and argv in C++) coming into MQ these are set to whatvever the user wants to pass to the macro. Also many events (such as chat) set these varibles as they start. If you read about 'event chat chat' you will see that p0 is the name of the chat chanel, p1 is who said it, and p2 is what they said. So the first line of a event subroutine could be /if $p1=="MyFriend" /call DoWhatMyFriendWants.

v1 though v99 (and more?) and user defined varibles that can be a store numbers or charactors (similar to VOID ? in C++)\. Use /varset and calc to set them. Use "/if" and "/if n" to test them, and /echo to display them.

The != mean NOT EQUAL to, and the ~~ mean either "similar" or "contains" I'm not sure which.

I maybe off on some of this, and if so, someone correct me. I am just tying to help. GL

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Sat Aug 03, 2002 2:21 am

LOL thanks FlashG!!

That helps a lot actually!! :)

Any more info is always welcome of course ;) But now that I know how to test the $v and $p i'll be able to work with them.

One more question tho...is $p0 always the chat channel? Or is there something you type to say that $p0 = the channel?

Same as $p1 also..is it always the person who's speaking by default? or is it set somewhere in the code when u r scripting?

Thanks again :) Much appreciated!

Xaanin
a lesser mummy
a lesser mummy
Posts: 66
Joined: Fri Jun 28, 2002 6:41 am

Post by Xaanin » Sat Aug 03, 2002 4:33 am

For chat p0 is chat, p1 person and p2 message. You can also have p0 as a custom input to your macro, for example if you type

Code: Select all

 /macro myubermacro 228 
The 228 will be passed on to the macro and can then be used to /varset v?? $p0

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Sat Aug 03, 2002 4:57 pm

ohhh ok thanks Xan :)

Thats kewl ;) Im really starting to like this prog. I havent played EQ in months until i noticed these boards and thought..what the hell..its something to do.

Im totally gettin back into EQ now..not sure if thats a good thing tho as I'll end up not having a life again (by EQ'ing 24/7)..but hey! Thats what GF's are for...they get to smash open your computer when u r ignoring them gaming or scripting on the comp :P

Lataz all!