Suggestions for macro parser additions here please

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Suggestions for macro parser additions here please

Post by Amadeus » Tue Jun 03, 2003 4:54 pm

I had a couple ideas myself for adding some new variables and other parser functionality to the macro parsing code (ie, new $char() stuff, etc..)

I thought I'd ask here if anyone had anything on their wishlist while I was at it. A good way of seeing if something is possible would be to look through the STRUCTS in MQ.h...if you see a variable for something, then it can probably be added to the parser :)

However, I'm not opposed to suggestions on adding more to the parser itself as a scripting language if folks have suggestions.

AlphaBeta
a ghoul
a ghoul
Posts: 126
Joined: Sat Nov 09, 2002 12:35 am

Post by AlphaBeta » Wed Jun 04, 2003 1:36 pm

$bazaar(<item name>,xxx) where xxx is

"price" - average price (based on items [ie if 100 are for sale at 3p from player A and another is sold for 1pp at player B, it will be a little under 3000...]) (returns value in copper...)
"price,average,item" - see above (in cp)
"price,average,player" - in the above example, if only two players had the item, the average would be 2000, not a little under 3000 (in cp)
"price,lowest" - lowest price available for an item (in cp)
"price,highest" - Highest price available for an item (in cp)
"seller" - name of the seller selling the item
"seller,id" - so we can use $spawn(id,xxx) :p


also things from $item([pack,]slot,xxx) are usable
returns:

thing its supposed to
-1 if item is not found
-2 if some weird error occurs (i dunno... item has no price? or someting?)

Would be nifty if you could read/write to the bazzar .ini file to change prices on the fly. This might require exiting trader mode and restarting it.


Also would be nice if we could store prices in a historical database for trending data and to spot great deals on items etc.

merkzu
a ghoul
a ghoul
Posts: 99
Joined: Wed May 14, 2003 2:08 pm

Post by merkzu » Fri Jun 13, 2003 1:50 pm

Not sure if this is in the scope of what you are asking, but it would be cool if when an event was triggered, the string that triggered it was passed to the sub routine for that event.

so we could do things like this:

Code: Select all

#event CASTING "You begin casting"

Sub Event_CASTING
  /echo You are casting $mid(18,$calc($strlen($p0)-18),$p0)
/return

fwiggles
a hill giant
a hill giant
Posts: 161
Joined: Mon Jun 17, 2002 8:29 pm

Post by fwiggles » Fri Jun 13, 2003 9:26 pm

i don't believe that would work, however i'm not certain. Because if you triggered one thing right after the other wouldn't it have to leave one sub routine before the other was finished? If i'm not mistaked MQ can only do one thing at once when it comes to the macros although i'm not really sure...
[color=red]Latest survey shows that 3 out of 4 people make up 75% of the world's population.[/color]

merkzu
a ghoul
a ghoul
Posts: 99
Joined: Wed May 14, 2003 2:08 pm

Post by merkzu » Wed Jun 18, 2003 11:39 pm

It wouldnt have to do two things at once..

When an event is triggered, MQ obviously has to know the string that triggered it, since it had to compare this to the strings you set up with #event. When one matches, it runs the Sub for the matching event, just like any other sub. Normally when you call a sub, it can be passed arguments wich can be accessed within the sub using $p0 $p1 etc. I just wish that MQ would pass along the string that triggered the event to the Sub as an argument.

Instead of just doing:
/call Event_Whatever

It would do:
/call Event_Whatever "This is the string that matched the event."

User avatar
BlueSkies
a ghoul
a ghoul
Posts: 132
Joined: Tue Oct 01, 2002 6:22 pm

Post by BlueSkies » Thu Jun 19, 2003 12:44 pm

I think it already does this...
Sub Event_name: Custom event callback defined by #event
$p0 - Line that triggered event
From the 'Macro Fundamentals / Subrourintes' section of the manual. I don't have EQ or MQ with me right now (still on vacation in Cali), so I don't know if that isn't working, or something, but it's definately in the manual.
Live your dreams! Blue Skies everyone

merkzu
a ghoul
a ghoul
Posts: 99
Joined: Wed May 14, 2003 2:08 pm

Post by merkzu » Thu Jun 19, 2003 1:16 pm

Oh man I'm an Idiot. :roll:

Thanks blue =)

User avatar
BlueSkies
a ghoul
a ghoul
Posts: 132
Joined: Tue Oct 01, 2002 6:22 pm

Post by BlueSkies » Thu Jun 19, 2003 2:53 pm

Not a problem. :)
Live your dreams! Blue Skies everyone

Darkhearted_Wizard
orc pawn
orc pawn
Posts: 22
Joined: Fri Jun 20, 2003 7:14 pm

Post by Darkhearted_Wizard » Fri Jun 20, 2003 7:45 pm

Quick request brought on by some thoughts about ZEM. Would it be possible to get some sort of functionality for showing zone exp modifiers? Noticed you(Amadeus) posted the offsets on the ShowEQ board, so maybe you could integrate that :) I'd do it but I don't know C++ :D