Help section from before the user variable changes that broke all macros
Moderator: MacroQuest Developers
-
Gonezo
- orc pawn

- Posts: 10
- Joined: Wed Nov 13, 2002 1:38 am
Post
by Gonezo » Wed Nov 13, 2002 3:09 am
Code: Select all
~~~~~~~~~UPDATED 11-13-2002 04:41HRS EST~~~~~~~~~
|** Filename: whomaster.mac v.ALPHA
** Author: Gonezo
** Assists:Dirtface
** State: ALPHA
** WHAT: This will determine who is in control of the bot. Also, it will tell them what the commands for the bot.
** USEAGE: /macro whomaster.mac "$p0", Where #p0 is the character in coltrol
**|
Sub Main
|**opening commands**|
/press CTRL
/press shift
/press alt
|**Sits down and puts up AFK up!**|
/sit
/afk
|**waits to be summoned by master!**|
:Listen
/call LISTENING
|**secrent command should be something like "i choose you <name of bot>!"**|
|**then the bot presses the "R" key and replies "pika pika" hehehehehehe**|
|**Sends a tell to the master giving commands that can be used.**|
/call COMMANDS
|**Listening to /tells from Master**|
/call LISTENING
|**Checks to see if the /tell is from a GM**|
/who all $p0
/if "$p0" == "GM"
|**if TRUE SYSTEM SPEAKER GOES OFF LIKE A MUTHER FOOKER!!**| /delay 5
/endmacro
/unloadmq
|**Check to see if /tell is from the master**|
/if "$p0" != "GM"
|**send a /tell <master> <name of PC> has sent me a tell please respond to them**|
/tell "/call CURRENTMASTER" "$p0" has send me a tell. What do I say to them?
|**read in tell message from CURRENTMASTER and send in tell from from <name of bot>**|
|**if a valid command is recieved then execute command**|
/if "$p0" == |**a command from the command list**|
/call COMMAND |**command retuns "done" when done**|
|**when "done" loop back to listening**|
/goto Listen
NOTE:COMMANDS Need to only be taken from master!!!! ALSO, BUT BACK WALL IN SO YOU CAN ALWAYS ISSUE COMMANDS
so far the commands I have thought of are:
COMMANDS
LISENTING
INVITE PLAYER
DISBAND FROM GROUP
CAST SPELL <SPELL GEM> (WITH AN OPTIONAL TARGET PARAMETER NULL = BOT AND MASTER = TRUE
LIST CURRENT SPELL GEMS
MEM SPELLS TOLD TO MEM
GO AUTOMATIC (also have parameter for specific class type too)
STOP AUTOMATIC AND (LISTEN TO MASTER AGAIN OR LOOP BACK TO MAIN)
NEW MASTER
CAMP
DOABILITIES
LIST ABILITES
LIST HOTKEYS
CHANGE HOTKEY SET
USE CERTAIN HOTKEYS
STATUS(HP, MANA, EXP, AAXP, CURRENT MASTER, ZONE, LOC)
ZONE(STOP, END MACRO, HIT THE NUM LOCK KEY0 THIS WILL REQUIRE YOU TO RESTART THE MACRO FROM THE OTHER PC BUT HEY)
WHEN AUTO-FOLLOW FAILS(IE STOP SEND TELL TO PERSON THAT BOT WAS FOLLOWING HEY COME BACK HERE)
(THEN WHEN BACK WITH IN RANGE REAUTO FOLLOW AND SEND TELL SAYING OKAY AUTO ON AGAIN)
note: this is just the begining and I am going to keep this stuctre unless I am told it can not be done remember I new. Also, ever command will be it's own mac file. I am doing this becuase the other are so hard to figure out cuz the code is thrown together.
{UPDATE 11-13-02/04:41}
I did some more thinking while my farm.mac ran and this is what I came up with. I put some code down it is not good at all and a lot of it is missing. Please post ideas and help.
{/ UPDATE 11-13-02/04:41}
Thanks
i'm
Gone.....zo
-
Gonezo
- orc pawn

- Posts: 10
- Joined: Wed Nov 13, 2002 1:38 am
Post
by Gonezo » Wed Nov 13, 2002 8:12 am
|** Filename: UNIBOT.mac v.ALPHA [PREVIOUSLY WAS CALLED whomaster.mac]
** Author: Gonezo
** Assists:Dirtface
** State: ALPHA
** WHAT: This will determine who is in control of the bot. Also, it will tell them what the commands for the bot.
** USEAGE: /macro UNIBOT.mac "$p9", "$p9" is the name of master!
**|
|**Master Definition**|
#define master $p9
Sub Main
/tell "$p0" You are THE Master bro!!! btw going AFK brb
|**opening commands**|
/press CTRL
/press shift
/press alt
|**Sits down and puts up AFK up!**|
/sit
/afk
|**waits for the master to issue a COMMAND!**|
/call LISTEN
/return
NOTE://COMMANDSor OTHER MACROS THAT NEED TO BE DONE\\ Need to only be taken from master!!!! ALSO, BUT BACK WALL IN SO YOU CAN ALWAYS ISSUE COMMANDS
so far the commands I have thought of are:
PRIORITY1 {
LISTEN
TELLCHECK
sr-GM |**Special Action here**|
sr-PC |**Alert MASTER viz tell with pcname and message**|
sr-MASTER |**Calls CMDCHECK to see if what MASTER said is in COMMANDS**|)
COMMANDS
#i-spellmem.mac
#i-spellcast.mac
sr-LISTGEMS
sr-GO AUTOMATIC (also have parameter for specific class type too)
sr-CAMP
sr-STATUS(HP, MANA, EXP, AAXP, WHOMASTER, ZONE, LOC)
sr-ZONE(STOP, END MACRO, HIT THE NUM LOCK KEY0 THIS WILL REQUIRE YOU TO RESTART THE MACRO FROM THE OTHER PC BUT HEY)
DOCOMMAND |**Takes /return from TELLCHECK
}
PRIORITY2 {
CLASSCMDS|**SPECIFIC CMDS FOR EACH PLAYER CLASS**|
AUTO-FOLLOW FAILS(IE STOP SEND TELL TO PERSON THAT BOT WAS FOLLOWING HEY COME BACK HERE)
(THEN WHEN BACK WITH IN RANGE REAUTO FOLLOW AND SEND TELL SAYING OKAY AUTO ON AGAIN)
INVITE PLAYER
DISBAND FROM GROUP
STOP AUTOMATIC AND (LISTEN TO MASTER AGAIN OR LOOP BACK TO MAIN)
NEW MASTER
DOABILITIES
LIST ABILITES
LIST HOTKEYS
CHANGE HOTKEY SET
USE CERTAIN HOTKEYS
}
HERE IS LISTEN PUSEDOCODE NEED IDEAS ON THIS I AM 100% STUMPED
|** Filename: listen.mac v.PSUEDOCODE
** Author: Gonezo
** Assists:
** State: PSUEDOCODE
** WHAT: This will loop until a /tell "$p1" "$p2" has come up on the screen. Then it evaluates.
** USEAGE: #include listen.mac [for unibot.mac]
**|
MAIN
start loop
watch the incoming /tell ONLY
keep looping until a <person> tells you,'<message>'
when a tell is received call TELLRECEIVED
TELLRECEIVED
1)put <a peron> into a $p
2)put <message> into a $p
then call TELLCHECK
TELLCHECK
/who all GM <a person>
if the result from /who all GM == <a person>
|**try to make this able to put each Gm received into a sperate var max 4**|
/beep
/beep
/beep
/beep
/beep
/delay 2
/unloadmq
if the result does not == a GM or there are no returns on /who all GM
send a tell to "master" that reads <a person> sent me this tell. Please resond
if the result of the tell is the master
run a MSGCHECK rountine to see if message contains a commmand
once all are finsihed goto the main loop
Yet another update I worked though the night cuz I am so excited about this. Here is one of many many many more updates!
thanks all
i'm Gone....zO
-
rizwank
- Huggle Police

- Posts: 524
- Joined: Tue Jul 23, 2002 12:07 am
-
Contact:
Post
by rizwank » Fri Nov 15, 2002 5:31 am
ill read over the psuedo and help out .. its a nice idea.
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy
[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]
-
Dirtface
- a lesser mummy

- Posts: 39
- Joined: Tue Nov 12, 2002 2:43 am
Post
by Dirtface » Fri Nov 15, 2002 6:22 am
Riz, I was talking to Gonezo on this, and I think one of the most important things about this macro is that it stays active even during/after zoning. The cleric.mac that I currently use halts upon zoning. Not only that, you must /end it, then call a DIFFERENT macro, then end THAT one before you can rerun it.
Is this a MQ coding problem or a problem in my script?
-
AMadMonk
- a lesser mummy

- Posts: 77
- Joined: Tue Sep 24, 2002 9:16 pm
Post
by AMadMonk » Fri Nov 15, 2002 1:56 pm
Running active macros during zoning is dangerous.
This is why most macro-bots out there halt or pause during zoning.
It's not inherently evil or bad, but there are some big risks.
-
Gonezo
- orc pawn

- Posts: 10
- Joined: Wed Nov 13, 2002 1:38 am
Post
by Gonezo » Fri Nov 15, 2002 3:04 pm
see topic I started it and if I can get it deleted that would be wonderful. The whole thing was scraped and restarted. So watch for UNIBOT.mac posts if you would like to help
-gonezo
-
Dirtface
- a lesser mummy

- Posts: 39
- Joined: Tue Nov 12, 2002 2:43 am
Post
by Dirtface » Fri Nov 15, 2002 4:56 pm
Actually, if it could pause (as opposed to halt) that would be great. Is there a set of commands I can use to pause right before zoning, and unpause after? or does zoning actually always halt it?