Convert

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

Scriptless
orc pawn
orc pawn
Posts: 16
Joined: Fri Apr 23, 2004 4:20 pm

Convert

Post by Scriptless » Fri Apr 23, 2004 4:54 pm

Since patch I have encountered some issues. It has come to the point of me willing to take a verbal lashing for some help ..so anyway

I write very simple stuff because I cannot get genbot to work, new or previous version. Yes it is my fault. If someone could convert this I'll go back in my hole.

thanks

________________________________________________________

#chat tell
#Include Spellcastk

Sub Main

/cleanup
/delay 1s
/g ok ready

:Mainloop
/if n $char(buff,"mask of the stalker")==0 /call cast "mask of the stalker"
/if n $char(buff,"bladecoat")==0 /call cast "bladecoat"
/doevents chat
/goto :Mainloop
/return

Sub Event_Chat(ChatType,Sender,ChatText)


/if "@ChatText"=="snare" {
/target @Sender
/delay 1s
/assist
/delay 1s
/call Cast "ensnare"
}

___________________________________________________________

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

Post by s16z » Fri Apr 23, 2004 5:24 pm

Code: Select all

#chat tell 
#Include Spellcastk 

Sub Main 
    /cleanup 
    /delay 1s 
    /g ok ready 

  :Mainloop 
    /if (!${Me.Buff[Mask of the Stalker]}) /call cast "Mask of the Stalker"
    /if (!${Me.Buff[Bladecoat]}) /call cast "Bladecoat"
    /doevents chat 
    /goto :Mainloop 
    /return 

Sub Event_Chat(ChatType,Sender,ChatText) 
    /if (${String[@ChatText].Equal[snare]}) { 
        /target @Sender 
        /delay 1s 
        /assist 
        /delay 1s 
        /call Cast "ensnare" 
    } 
    /return

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

Post by bob_the_builder » Fri Apr 23, 2004 6:16 pm

In some post some were, Lax told me I should do the following

Code: Select all

(!${Me.Buff[Mask of the Stalker].ID}) 
Not sure exactly why but I've seen allot of other folks been using the ID on the code. My understanding is that with out ID it responds the name which I'm no idea why that would matter unless its faster to check a number instead of a string.

Bob_has_no_clue_but_tries

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

Post by s16z » Fri Apr 23, 2004 6:20 pm

You are correct, it should be with the .ID on the end. For some reason I keep thinking non-null, non-zero = true. A result would be non-null. But that isn't how MQ2 parses, so use the .ID :)

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 Apr 23, 2004 7:03 pm

The problem is that CALCULATE can only handle NUMBERS. How do you calculate "gfdlkgjdlfgkldfglkdf" ;) The answer is you dont, and then Calculate passes the failure out to /if. The reason you use ID is it's going to give you a non-zero number if ${Me.Buff[Mask of the Stalker]} is valid. It's sort of like having ${Me.Buff[Mask of the Stalker].Valid}. The only time it will NOT work is for types that dont have ID or for types where ID could possibly equal 0 (the only one that comes to mind is doors/switches).

So, ${Me.Buff[Mask of the Stalker].ID} determines if there is an ID, and using ! reverses it so you execute the "true" branch if there is NOT an ID.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Scriptless
orc pawn
orc pawn
Posts: 16
Joined: Fri Apr 23, 2004 4:20 pm

Thank you

Post by Scriptless » Fri Apr 23, 2004 11:20 pm

Your help is much appreciated.

Now if I can figure out how the code thing works I will share my little work in the depot.

Code: Select all

bla bla