Page 1 of 2

DO Command on PM

Posted: 02 Nov 2008, 23:57
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...

Re: DO Command on PM

Posted: 28 Nov 2008, 16:54
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.

Re: DO Command on PM

Posted: 21 Dec 2008, 21:36
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. ^^,

Re: DO Command on PM

Posted: 08 Jul 2009, 07:42
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?

Re: DO Command on PM

Posted: 08 Jul 2009, 13:18
by Mushroom
You could try using adminpassword.

Re: DO Command on PM

Posted: 08 Jul 2009, 20:54
by muszyka
How? May you explain it clearly? What do you mean about the admin password?

Re: DO Command on PM

Posted: 12 Jul 2009, 08:03
by Darki
You should make a different macro for that, one that evals the information and then pm's it.

Re: DO Command on PM

Posted: 12 Jul 2009, 20:19
by muszyka
I dont know how to make that macros, can you do that for me?

Re: DO Command on PM

Posted: 12 Jul 2009, 20:35
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.

Re: DO Command on PM

Posted: 12 Jul 2009, 20:49
by muszyka
Thnx