Page 1 of 1
Help with invite macro
Posted: Mon Aug 23, 2004 2:31 am
by FliPsY
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
Posted: Mon Aug 23, 2004 2:35 am
by Night Hawk
I suggest you read over the Custom Events section in the readme including with the MQ zip.
Posted: Mon Aug 23, 2004 5:04 am
by Goofmester1
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.
Posted: Mon Aug 23, 2004 5:11 am
by blueninja
Variable names are case sensitive.. You declared Invitee (with a capital I) but you target invitee (lowercase).
Posted: Mon Aug 23, 2004 9:49 am
by FliPsY
thanks blue
Posted: Mon Aug 23, 2004 3:41 pm
by FliPsY
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.
Posted: Mon Aug 23, 2004 6:16 pm
by Mimatas
#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.