command mapping table?

Moderator: MacroQuest Developers

User avatar
billthecat
a lesser mummy
a lesser mummy
Posts: 64
Joined: Sun Jan 30, 2005 8:58 pm

command mapping table?

Post by billthecat » Sat May 21, 2005 10:34 pm

I've been comparing things where I can in the docs to map the MQ2 commands to Lavishscript commands, but it would be great if there was a table somewhere that would give me the direct translations or at least the closest match. Something like:
  • Sub <name>(args) --> function <name>(args) {
    /return --> return }
    /if (<expression>) --> if "<expression"
    /call --> call
    /declare --> declare (although the Wiki seems to dispute this translation)
    /varset --> varset
    /doevents --> ExecuteQueued
    #event <PartialFunctionName> "#*# word1 #1# word2 #*#" --> addtrigger <CompleteFunctionName> "word1 @VarName@ word2"
    /NormalEQCommand --> EQExecute /NormalEQCommand
    /delay <SecondTenth> ${<expression>}--> Wait <SecondTenth> ${<expression>}
    /keypress --> ??
    /ini --> ??
    /doortarget --> ??
    /face --> ??
    /look --> ??
    /alias --> ??
If such a table exists and I missed, great! Please send me a pointer and I'll leave you alone for awhile.

Otherwise, does anyone have some notes or materials I could use to create one?

I'll post it when I get it put together.
"If you think nobody cares, try missing a couple of payments"

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 May 21, 2005 11:14 pm

You can be the one to make such a guide ;) In general, it's not going to be amazingly useful -- most people dont know anything about MQ2 scripting. However, it would be good to have here in this forum for the people that do.

A few of those you mention are not right, for example..
/return would read:
/return <text> --> return <text>
There's absolutely no difference, except for not having a slash.
/declare --> DeclareVariable -- as with MQ2, you can use short names to mean the same thing. /dec in MQ2 will do /declare, the same as Dec in LavishScript will do DeclareVariable (and so will Declare)

AddTrigger doesnt use variable names. The syntax of the match text is almost exactly the same as MQ2, it's Blech. The differences are # is @, and | is %. Additionally, whatever is in the @xxx@ with LS is ignored, it simply makes one parameter to the sub for each @@, as well as the entire line for the first param.

As far as EQ-specific commands like /face, /doortarget, etc, all you're going to be doing is removing the slash for the most part. That stuff would be found in the ISXEQ wiki on ISMods, rather than in the IS or LS wiki portions on lavishsoft.com.

Also, your info on /delay isnt entirely accurate, the ${<expression>} would just be <expression>, absolutely no different from If.

/alias has no direct translation. Alias is a LavishScript command, and you would have to use EQExecute with it in order to alias a normal EQ command (but of course, not for an IS command).

A lot of things will be like that, where there is no direct translation, but instead one or more similar methods. Or there's some cases where there is a direct translation, but other methods that may be easier are available. VarSet and VarCalc for example are nearly deprecated by data type methods. VarCalc X ${X}+1 is simplified into "X:Inc" -- that is a valid command for an int variable, or it can also be used in a data sequence like .. while "${X:Inc}<=10". Or X:Set[360+${Math.Sin[12]}] is effectively VarCalc X 360+${Math.Sin[12]}.
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 » Sun May 22, 2005 8:37 pm

ok, I will warn you:
VarCalc, VarSet, and VarData are being deprecated in LavishScript as of next release (which will be LavishScript v1.20, in Inner Space 0.94). Using them will spam a message in the console about being deprecated.

With that being said, all types that allow variables will be expected to provide a "Set" method. In the current release version, there is no string:Set. Actually, there never will be. Instead, there is an additional string type called mutablestring, which is automatically used in place of "string" for declared variables. You do not need to explicitly say mutablestring, scripts that use "string" do not have to be changed, and in fact I would recommend NOT explicitly using mutablestring in your variable declarations. However, be aware that it is happening (this will be documented). The mutablestring type in next release has 4 methods, and there will likely be more later. Set, Concat, ToUpper, ToLower.

So, anywhere VarCalc, VarData, or VarSet are used, try switching to x:Set[y] instead. If there is a case where it does not work correctly for anything that does provide Set (int, byte, float, etc), please let me know and I'll correct it asap -- potential problems will likely be limited to arrays.
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 » Sun May 22, 2005 9:05 pm

Note: I've verified that it works fine with arrays.

The above changes are going live tonight or tomorrow
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

User avatar
billthecat
a lesser mummy
a lesser mummy
Posts: 64
Joined: Sun Jan 30, 2005 8:58 pm

Post by billthecat » Fri May 27, 2005 1:43 pm

an example of the new form would be:

varset MobID ${Spawn[pc ${MasterName}].NearestSpawn[pet radius ${MeleeRadius} zradius 10].ID

to

MobID:Set[${Spawn[pc ${MasterName}].NearestSpawn[pet radius ${MeleeRadius} zradius 10].ID]

correct?
"If you think nobody cares, try missing a couple of payments"

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 » Fri May 27, 2005 2:03 pm

Well, other than your varset being bad in the first place (missing the final }) which transfered into your :Set, yes that is correct.

This could be done with regex search/replace, but dont ask me exactly how.
varset VARIABLE ANYTHING
becomes
VARIABLE:Set[ANYTHING]

varcalc VARIABLE ANYTHING
also becomes
VARIABLE:Set[ANYTHING]

vardata VARIABLE ANYTHING
becomes
VARIABLE:Set[${ANYTHING}]

Various varcalcs can be replaced with other things, such as
varcalc VARIABLE VARIABLE+1
becomes
VARIABLE:Inc
or if it's not +1, then
varcalc VARIABLE VARIABLE+ANYTHING
VARIABLE:Inc[ANYTHING]

and so on
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

User avatar
billthecat
a lesser mummy
a lesser mummy
Posts: 64
Joined: Sun Jan 30, 2005 8:58 pm

Post by billthecat » Fri May 27, 2005 2:35 pm

hehehe cut and paste error there, yeah. :oops:

I had been using search and replace to do the initial changes in my genbot conversion, but with the new syntax changes I can see I'll need to get a little more sophisticated and dust off my oreilly perl/regex books.

On a different subject though, have you had a chance to look at the advpath include routines? A number of things I've read about the new navigation and waypoint system in IS would seem to replace the need for advpath. Does the IS navigation system have something like /stick too?
"If you think nobody cares, try missing a couple of payments"

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 » Fri May 27, 2005 2:54 pm

Nope, the navigation system is only for storing points and searching within them. Anything that doesn't involve that (such as performing the actual movements, or sticking to a target) must be done another way
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: command mapping table?

Post by xyilla » Mon May 19, 2025 10:58 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: command mapping table?

Post by xyilla » Mon May 19, 2025 10:59 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: command mapping table?

Post by xyilla » Mon May 19, 2025 11:00 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: command mapping table?

Post by xyilla » Mon May 19, 2025 11:37 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: command mapping table?

Post by xyilla » Mon May 19, 2025 11:38 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: command mapping table?

Post by xyilla » Mon May 19, 2025 11:39 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: command mapping table?

Post by xyilla » Mon May 19, 2025 12:16 pm