Respond to Camp Checks

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

dravidiankayne
Chicken Little
Posts: 61
Joined: Mon Mar 29, 2004 3:14 pm

Respond to Camp Checks

Post by dravidiankayne » Wed Jun 23, 2004 1:25 am

Okay, so I'm trying to make an auto-response system to respond to camp checks. I used to have one before the change, but unfortunately I've formatted my cpu since so I can't even ask for help converting.

Basically what I'm asking is simple: If someone, anyone, says "Camp check", then it responds by saying the camp you're camping.

Any help would be great, thanks.

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Wed Jun 23, 2004 2:03 am

How is this macro gonna know where your actually fighting.
[quote]"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."[/quote]

dok
a ghoul
a ghoul
Posts: 127
Joined: Mon Mar 15, 2004 3:38 pm

Post by dok » Wed Jun 23, 2004 3:47 am

Something like this should do it if camp names are one word, as most are. Untested, use at your own risk, etc etc. May need to modify the trigger string to return less false positives, but thats up to you.

You could always setup a loop to go through each Param to see if its not NULL and all that, but I'm too lazy for that, so you just get 1 word camp names with my example.

If you were really serious about it, you could check to make sure you only annouce your camp checks 1 time every x minutes. Maybe also an occasional /ooc announcing that your place is camped also.

Code: Select all

#event CampCheck "#*#camp#*#"

Sub Main
    /declare campname string local
    /if (!${Defined[Param0]}) {
        /echo /mac campcheck <camp name>
    } else {
        /varset campname ${Param0}
    }
    :Loop
        /doevents
        /delay 1s
    /goto :Loop
/endmac

Sub Event_CampCheck
    /delay 5s
    /ooc ${campname}
/return

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Wed Jun 23, 2004 7:01 am

i understand the comfort of having macros to make your life easier but i dont see the point of this macro, it just equates to a large arrow pointing at you with an /OOC I AM USING MACROQUEST, Please BAN Me.
[quote]"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."[/quote]