DO Command on PM

Moderator: Moderators

Message
Author
RaiJin
Noob
Noob
Posts: 3
Joined: 27 Apr 2008, 20:23

DO Command on PM

#1 Post by RaiJin »

This macro was based on Do command from pm by windows98SE@thaikore on the old forums.

This macro will let a bot do a certain Do Command on a PM when the sender is on the list of allowed players.
This is useful in using bots while playing non-bots simultaneously.

Code: Select all

##  DO Command at PM  ##

automacro DOonPM {
	console /\(From: (.*)\) : do (.*)/
	run-once 1
	call {
	#Multiple IF Statements can be added for flexibility
	# Player1 is an in-game name
	# Player2 is an in-game name
	if ("$.lastMatch1" == "Player1") goto ok
	if ("$.lastMatch1" == "Player2") goto ok
	do pm "$.lastMatch1" Asa... #any message to say rejection on request...
	release DOonPM
	stop
:ok
	release DOonPM
	do $.lastMatch2
	pause 2
	do pm "$.lastMatch1" done
	stop
	}
}
Example Situation 1 (Player1 is allowed):

Player1 PMs Bot: do openshop
Bot opens the shop
Bot PMs Player1: done

Example Situation 2 (Player2 is also allowed):

Player2 PMs Bot: do e heh
Bot uses emoticon heh
Bot PMs Player2: done

Example Situation 3 (Player3 is not allowed):

Player3 PMs Bot: do relog 9999999
Bot does nothing
Bot PMs Player3: Asa...

Example Situation 4 (Player1 is allowed):

Player1 PMs Bot: do relog 9999999
Bot relogs

This macro can be a part of a more complex macro... I'm using this to manually trade and chat... Hope this helps...
Proud Pinoy Botter!

Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

Re: DO Command on PM

#2 Post by Darki »

I made a little tweak:

Code: Select all

automacro doCommand {
	console /\(From: (.*)\) : do (.*)/
	call {
		$nick = $.lastMatch1
		$auth = @eval (defined $::overallAuth{"$nick"} ? $::overallAuth{"$nick"}:"None")
		if ($auth == 1) goto auth
		do pm $.lastMatch1 Pardon...?
		stop
	:auth   
		do $.lastMatch2
		pause
		do pm $.lastMatch1 All done.
	}
}
Basically I made it check your nick on the overallAuth.txt.
With that you don't need to change the macro, just add people to the file by console commands or char password.
ImageImageImage
ImageImageImage
ImageImageImage

RaiJin
Noob
Noob
Posts: 3
Joined: 27 Apr 2008, 20:23

Re: DO Command on PM

#3 Post by RaiJin »

Darki wrote: Basically I made it check your nick on the overallAuth.txt.
With that you don't need to change the macro, just add people to the file by console commands or char password.
Nice that would make it a little easier and more functional. ^^,
Proud Pinoy Botter!

muszyka
Human
Human
Posts: 38
Joined: 05 Sep 2008, 08:45
Noob?: No
Location: Philippines

Re: DO Command on PM

#4 Post by muszyka »

Is that posible that when I pm my bot the command exp, the bot will reply all the information shown in the console?
Image

Never interrupt your enemy when he's making a mistake.
Always go on PVP. /gg

Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: DO Command on PM

#5 Post by Mushroom »

You could try using adminpassword.
Quit.

muszyka
Human
Human
Posts: 38
Joined: 05 Sep 2008, 08:45
Noob?: No
Location: Philippines

Re: DO Command on PM

#6 Post by muszyka »

How? May you explain it clearly? What do you mean about the admin password?
Image

Never interrupt your enemy when he's making a mistake.
Always go on PVP. /gg

Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

Re: DO Command on PM

#7 Post by Darki »

You should make a different macro for that, one that evals the information and then pm's it.
ImageImageImage
ImageImageImage
ImageImageImage

muszyka
Human
Human
Posts: 38
Joined: 05 Sep 2008, 08:45
Noob?: No
Location: Philippines

Re: DO Command on PM

#8 Post by muszyka »

I dont know how to make that macros, can you do that for me?
Image

Never interrupt your enemy when he's making a mistake.
Always go on PVP. /gg

User avatar
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia
Contact:

Re: DO Command on PM

#9 Post by help_us »

Open overallAuth.txt
put your char name inside with flag 1.
example :

Code: Select all

charName 1
try pm char using 'exp'.

Note : this already been implement on openkore, read openkore manual. Btw ths is share's macro topic.
Image
Image

muszyka
Human
Human
Posts: 38
Joined: 05 Sep 2008, 08:45
Noob?: No
Location: Philippines

Re: DO Command on PM

#10 Post by muszyka »

Thnx
Image

Never interrupt your enemy when he's making a mistake.
Always go on PVP. /gg

Post Reply