Few Questions :)

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

Moderator: MacroQuest Developers

kabl2k
a hill giant
a hill giant
Posts: 168
Joined: Fri Feb 20, 2004 6:25 pm

Few Questions :)

Post by kabl2k » Thu May 06, 2004 7:46 pm

Code: Select all

#define SnareSpell        "Embracing Darkness"


Sub Main

    /declare SnareTimer timer outer
    /varset SnareTimer ${Math.Calc[${Spell[SnareSpell].Duration.Seconds}*10].Int}
    /echo ${SnareTimer}
    /delay 100
    /echo ${SnareTimer}

/return
Why isnt that working? the echos return a 0 both times....

also whats the attack animation number?
was tryin something like this
!${Me.Pet.Animation[#]} would that work for determining if pet is attacking?

thanx in advance guys :)

Edit : Spelling ...

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Thu May 06, 2004 8:43 pm

Code: Select all

#define SnareSpell        "Embracing Darkness" 
Sub Main 
    /declare SnareTimer timer outer 
    /varset SnareTimer ${Math.Calc[${Spell[[color=red]${SnareSpell}[/color]].Duration.Seconds}*10].Int} 
    /echo ${SnareTimer} 
    /delay 100 
    /echo ${SnareTimer} 
/return 
This is if I'm not completely stupid today. :wink:

Edit: Just to save my non-existant rep. Have I mentioned that I never use #define? :lol:
Last edited by Preocts on Fri May 07, 2004 8:36 am, edited 1 time in total.

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

Post by ml2517 » Thu May 06, 2004 8:49 pm

Nah he's using a #define.

Try this and post the result:

/echo ${Math.Calc[${Spell[SnareSpell].Duration.Seconds}*10].Int}

You can also get a guaranteed duration by referencing the Gem and not using Spell (Using ${Spell[]} might be returning the incorrect spell ID and hence, the wrong information).

See if this works for you, :

Code: Select all

#define SnareSpell "Embracing Darkness" 
Sub Main 
    /declare SnareTimer timer outer 
    /varset SnareTimer ${Math.Calc[${Me.Gem[SnareSpell].Duration.Seconds}*10].Int} 
    /echo ${SnareTimer} 
    /delay 100 
    /echo ${SnareTimer} 
/return 

kabl2k
a hill giant
a hill giant
Posts: 168
Joined: Fri Feb 20, 2004 6:25 pm

Post by kabl2k » Thu May 06, 2004 9:49 pm

ok i switched to the Me.Gem method but i cant feed that method a spell name needs to be gem # wich isnt a huge deal. But something isnt right with certain spells

.Duration for embracing darkness returns 20 which is in ticks but Duration.Seconds returns 0

But for blood of thule both work fine with valid results, another one that doesnt work with .Seconds is Saryrn's Kiss...

Btw is there a list of animations #'s posted somewhere?

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

Post by ml2517 » Thu May 06, 2004 10:02 pm

Hmm try .Duration.TotalSeconds

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

Post by ml2517 » Thu May 06, 2004 10:16 pm

Ok it looks like ${Me.Gem[spell name]} returns the spell slot and ${Me.Gem[gem number]} returns spell info so try this. I'm not at a eq machine right now so sorry if it doesn't work.

Code: Select all


#define SnareSpell "Embracing Darkness" 
Sub Main 
    /declare SnareTimer timer outer 
    /varset SnareTimer ${Math.Calc[${Me.Gem[${Me.Gem[SnareSpell]}].Duration.TotalSeconds}*10]}
    /echo ${SnareTimer}
    /delay 100
    /echo ${SnareTimer}
/return 

kabl2k
a hill giant
a hill giant
Posts: 168
Joined: Fri Feb 20, 2004 6:25 pm

Post by kabl2k » Fri May 07, 2004 7:25 am

works perfect thanx Ml2517, any idea on the animation numbers?

Edit: Another Problem ive ran into is ${Macroquest.Server} is returning NULL for my char

is that the correct syntex or am i useing it wrong?