Here is the code for unibot.mac
|** Filename: UNIBOT.mac v.BETA[11-15-2002]
** Author: Gonezo
** Assists:m0nk for inspritation from his bitchbot code! Plazmaic for explaing so many things
** to me! Ooak for listening!
** State: BETA
** WHAT: This is the begining of my Universal Robot macro. I hope I finish it one day /sigh
** =0/
** USEAGE: /macro UNIBOT.mac "master name"
**|
|**Definitions**|
#include spellcast.mac
#include spellmem.mac
#define MASTER v99
#chat tell
Sub Main
/mqlog ======UniBot Activated======
/varset MASTER "$p0"
|**opening commands**|
/press CTRL
/press shift
/press alt
|**Verifies to the user that they are MASTER**|
/tell $MASTER You are THE Master bro!!!
|**Bot Sits!**|
/sit
|**This goes to the Events and starts to do them**|
:Loop
/if n $spawn($id("$MASTER"),hp,pct)<30 /call HEALNOW
/if n $spawn($spawn($id("$MASTER"),pet),hp,pct)<30 /call HEALNOW
/doevents
/goto :Loop
/return
Sub GATENOW
|~~~~~I DO NOT THINK THIS IS THE BEST WAY TO DO THIS BUT IT GETS THE JOB DONE~~~~~
/if "$char(gem,1)"=="Gate" /goto :spellismemed
/if "$char(gem,2)"=="Gate" /goto :spellismemed
/if "$char(gem,3)"=="Gate" /goto :spellismemed
/if "$char(gem,4)"=="Gate" /goto :spellismemed
/if "$char(gem,5)"=="Gate" /goto :spellismemed
/if "$char(gem,6)"=="Gate" /goto :spellismemed
/if "$char(gem,7)"=="Gate" /goto :spellismemed
/if "$char(gem,8)"=="Gate" /goto :spellismemed
|~~~~~the above code is horrid but it is the only way I could think of doing it on my own.
|~~~~~Sorry I am a newbie
/call loadspell "1" "gate"
:spellismemed
/call cast "gate"
/return
Sub HEALNOW
|~~~~For right now this is hard coded to the best heal spell my has hehe
|~~~~Change this as you need
/if "$char(gem,1)"=="Superior Healing" /goto :spellismemed
/if "$char(gem,2)"=="Superior Healing" /goto :spellismemed
/if "$char(gem,3)"=="Superior Healing" /goto :spellismemed
/if "$char(gem,4)"=="Superior Healing" /goto :spellismemed
/if "$char(gem,5)"=="Superior Healing" /goto :spellismemed
/if "$char(gem,6)"=="Superior Healing" /goto :spellismemed
/if "$char(gem,7)"=="Superior Healing" /goto :spellismemed
/if "$char(gem,8)"=="Superior Healing" /goto :spellismemed
/call loadspell "1" "Superior Healing"
:spellismemed
/call cast "Superior Healing"
|~~~~~~~~~~~~~~~~~|
| COMMANDS |
|~~~~~~~~~~~~~~~~~|
Sub Event_Chat
/if "$p1"!="$MASTER" /return |Checks to see if from master then do other /if's which
|hold the bot's commands
/if "$p2"~~"sit" /sit |commands bot to sit
/if "$p2"=="gate" /call GATENOW |commands bot to gate
/return
and spellmem.mac[the error occured here]
|** Filename: spellmem.mac v.BETA[11-14-2002]
** Author: Gonezo
** Assists:Phantal hehe he wrote this
** State: BETA
** WHAT: This forgets and mems spells for you
** USEAGE: /call loadspell "gem#" "spellname" can list 5 spells
** NOTE: When you use this you need to use the exact name of the spell in
the book
**|
Sub Main
Sub loadspell
/if "$p0"=="" /return
/if "$p1"=="" /return
/book
/call Memorize $p0 $p1
/if "$p2"!="" {
/call WaitSpellLoad $p0
/call Memorize $p2 $p3
} else /return
/if "$p4"!="" {
/call WaitSpellLoad $p2
/call memorize $p4 $p5
} else /return
/if "$p6"!="" {
/call WaitSpellLoad $p4
/call Memorize $p6 $p7
} else /return
/if "$p6"!="" {
/call WaitSpellLoad $p6
/call Memorize $p8 $p9
} else /return
/return
Sub Memorize
/if "$p0"=="" /return
/if "$p1"=="" /return
/click right 104 $int($p0*38-11)
/memspell $p0 "$p1"
/return
Sub WaitSpellLoad
:KeepWaiting
/if "$char(gem,$p0)"=="NULL" {
/delay 2
/goto :KeepWaiting
}
/if "$char(gem,$p0)"=="" {
/delay 2
/goto :KeepWaiting
}
/return
On the test of the unibot.mac with this execution line
"/macro unibot.mac "<classified charactername>"
this error was given to me
"Couldn't parse 'Sub loadspell'
Any ideas or help would be great I will be pondering about this.
-Gonezo

