Help with invite macro

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

Moderator: MacroQuest Developers

User avatar
FliPsY
decaying skeleton
decaying skeleton
Posts: 9
Joined: Fri Jul 16, 2004 1:06 pm

Help with invite macro

Post by FliPsY » Mon Aug 23, 2004 2:31 am

Ok im working on a section of a macro that when someone sends me a tell with a password in it, it targets the person who sent me a tell then invites, then tells that person follow,then clears target. when i run it, it says no spawns matching pc NULL. i need help
this is what i have so far, any help plz plz plz let me know:

Code: Select all

#event invite    "#*#tells you#*#password#*#"

Code: Select all

sub Event_invite(string line, string Invitee)
/echo group invite sent
/reply inviting
/delay 1s
/target pc ${invitee}
/delay 1s
/invite
/delay 1s
/tell ${invitee} follow
/keypress ESC
/return 
My Twist with [b][color=red]MQ2Twist[/b][/color]

[b][color=red]1.[/b][/color] [color=blue]Vilia's Chorus of Celerity[/color]
[b][color=red]2.[/b][/color] [color=blue]Cassindra's Chorus of Clarity[/color]
[b][color=red]3.[/b][/color] [color=blue]Amplification[/color]
[b][color=red]4.[/b][/color] [color=blue]Katta's Song of Sword Dancing[/color]

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Mon Aug 23, 2004 2:35 am

I suggest you read over the Custom Events section in the readme including with the MQ zip.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Mon Aug 23, 2004 5:04 am

Looks like to start with you are missing a 1 and a 2.

Code: Select all

#event invite    "#1#tells you#2#password#*#"
From there I leave you to work on the sub routine. First I see no check for you password so anyone who tells you gets an invite.

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Mon Aug 23, 2004 5:11 am

Variable names are case sensitive.. You declared Invitee (with a capital I) but you target invitee (lowercase).

User avatar
FliPsY
decaying skeleton
decaying skeleton
Posts: 9
Joined: Fri Jul 16, 2004 1:06 pm

Post by FliPsY » Mon Aug 23, 2004 9:49 am

thanks blue
My Twist with [b][color=red]MQ2Twist[/b][/color]

[b][color=red]1.[/b][/color] [color=blue]Vilia's Chorus of Celerity[/color]
[b][color=red]2.[/b][/color] [color=blue]Cassindra's Chorus of Clarity[/color]
[b][color=red]3.[/b][/color] [color=blue]Amplification[/color]
[b][color=red]4.[/b][/color] [color=blue]Katta's Song of Sword Dancing[/color]

User avatar
FliPsY
decaying skeleton
decaying skeleton
Posts: 9
Joined: Fri Jul 16, 2004 1:06 pm

Post by FliPsY » Mon Aug 23, 2004 3:41 pm

ok i fixed the capitol "I" part and im still getting the same error, ive gone through the manual and /search feature and i can not figure this out.
My Twist with [b][color=red]MQ2Twist[/b][/color]

[b][color=red]1.[/b][/color] [color=blue]Vilia's Chorus of Celerity[/color]
[b][color=red]2.[/b][/color] [color=blue]Cassindra's Chorus of Clarity[/color]
[b][color=red]3.[/b][/color] [color=blue]Amplification[/color]
[b][color=red]4.[/b][/color] [color=blue]Katta's Song of Sword Dancing[/color]

Mimatas
a hill giant
a hill giant
Posts: 262
Joined: Wed Mar 10, 2004 4:22 pm

Post by Mimatas » Mon Aug 23, 2004 6:16 pm

#event invite "#1#tells you#2#password#*#"
#1# will match the PC name.. but it will have a space on the end (since there's no space between #1# and tell). Probably doesn't matter.. but it might.

I'd recommend you take a good look at what the text looks like when it comes in.

Code: Select all

<Playername> tells you, '<what they say>' 
or something like that. The #1# tags will match ANYTHING they can. This means that if JoeCool01 did the following:

Code: Select all

 /tell yourchar 1234 password aaah! i'm being eaten by dwarves!
your params woulc match the following (minus quotes)

Code: Select all

#1#: "JoeCool01 "
#2#: ", '1234 "
#*#: " aaah! i'm being eaten by dwarves!'"
It's rather specific about that sort of thing. Make sure you take spaces and punctuation into account when defining your events. That's the best advice I can give.