Page 4 of 19
Ok, Here. I'm need some help with a function for genbot.
Posted: Thu Sep 16, 2004 9:55 am
by draco
Ok, I have been trying to add some code to auto summon food/drink and autoinv. The work around right now is to just use spellcast.inc and use my own routine to cast the /autoinv. This works but there is some conflict such as when a Buff has to be memmed and this routine fires. This routine takes precedence. The right way to do it is to add the spell to the queue with a flag or a special cast target that tells it to autoinv after the cast. Any suggestions, I have been racking my brain on the Spell queue code.
I would like to add code like the following.
Where the SummonFoodSpell and the toggle are defined from the ini and the event is triggered by the various low or out of food meesages. And a similar set of code for drink.
Code: Select all
Sub Event_SummonFood
/if (${DoSummonFoodAndDrink}) {
/call AddCast "${SummonFoodSpell}" autoinv
}
/return
Posted: Thu Sep 16, 2004 11:26 am
by Fippy
Why not just put some code in the main loop that checks the cursor and if you have summond food or drink on it autoinv it.
Posted: Sat Sep 18, 2004 5:44 pm
by draco
Oh, doh. Now that is what happens when you only look a problem from one vantage point.
Thanks, have it coded in 10 min
Edit:
Here it is. Works great. in case anyone interested.
Note: only /autoinv summoned items.
Code: Select all
Sub IndividualMain
|/Call MyExampleSub
|/if (${AnotherValue}) /call ConditionalExample
/if (${DoSummonFoodAndDrink} && ${Cursor.Name.Find[Summoned:]}) {
/echo Saving ${Cursor.Name}
/autoinventory
}
/return
Event Handlers
Code: Select all
Sub Event_SummonFood
/declare summonCount int local 5
/declare fcnt int local
|We don't want to stop fighting etc. to summonfood.
/if (${DoSummonFoodAndDrink} && !${CombatTargetID}) {
/echo Need to summon Food Casting ${SummonFoodSpell}
/for fcnt 1 to ${summonCount} step 1 {
/call AddCast ${SummonFoodSpell} 0
}
/next fcnt
}
/return
Sub Event_SummonDrink
/declare summonCount int local 5
/declare fcnt int local
|We don't want to stop fighting etc. to summonDrink.
/if (${DoSummonFoodAndDrink} && !${CombatTargetID}) {
/echo Need to summon Drink Casting ${SummonDrinkSpell}
/for fcnt 1 to ${summonCount} step 1 {
/call AddCast ${SummonDrinkSpell} 0
}
/next fcnt
}
/return
Event Triggers
Code: Select all
#Event SummonDrink "You are#*#drink."
#Event SummonFood "You are#*#food."
Defines
Code: Select all
/call LoadSetting DoSummonFoodAndDrink bool DoSummonFood 0
/call LoadSetting SummonFoodSpell string SummonFoodSpell "Summon Food"
/call LoadSetting SummonDrinkSpell String SummonDrinkSpell "Summon Drink"
Posted: Sun Sep 19, 2004 8:39 am
by Roentgen
Not sure if genbot bug or new MQ2 problem. when using genbot and shortcuts, since the patch it will crash to desktop. seems to work ok but if the shortcut involves multiple tasks like buffing multiple spells, bye bye.
roentgen
Posted: Sun Sep 19, 2004 9:43 am
by Roentgen
sigh correction- both this and previous versions genbot cause crash to destop with any command to cast a spell. simple commands like sit or mount still work.
Posted: Sun Sep 19, 2004 1:01 pm
by A_Druid_00
I just used this Genbot for the past 22 hours straight without a single CTD. All my shortcuts worked fine, and I have a few batch buff/debuff shortcuts that I call regularly on my various bots.
Maybe it's something with your compile of MQ2. Do you have the latest .zip freshly compiled?
Posted: Mon Sep 20, 2004 5:31 pm
by crisdan
Ok I got my "NameS" option to work for shortcut spells and items. Now I have a real easy question.
On this version of Genbot how do you define a shortcut for the bot to cast its pet spell?
I mean I have come up with a few ways that work but its not correct and comes along with a bunch of verbosity. All I want is to create a shortcut like "pet = sn True Spirit". In older versions of genbot there was a variable and you just put your spell name for your pet in there.....
Any suggestoins?
Posted: Tue Sep 21, 2004 7:02 am
by A_Druid_00
It should work the way you posted cris. I can't remember what I used to get my chanter to cast her pet spell, but it looked pretty much like that since I don't have a shortcut made for it.
Posted: Thu Sep 23, 2004 4:07 pm
by Daeas
crisdan wrote:Ok I got my "NameS" option to work for shortcut spells and items. Now I have a real easy question.
On this version of Genbot how do you define a shortcut for the bot to cast its pet spell?
I mean I have come up with a few ways that work but its not correct and comes along with a bunch of verbosity. All I want is to create a shortcut like "pet = sn True Spirit". In older versions of genbot there was a variable and you just put your spell name for your pet in there.....
Any suggestoins?
will work well because it does not need to assist. It will cast that spell on its target.
troubles
Posted: Fri Sep 24, 2004 8:41 pm
by rettus1
Im having trouble having my bot do the commands that the master gives it. I'm not getting any error messages. When i do /gb /sit , that works so the bot is working. But it dont do any commands that it receives from the master. The bot also sends tells to the master for lost invis, etc... So it is working right just not doing the commands. Any suggestions? Thank you
Posted: Fri Sep 24, 2004 10:45 pm
by A_Druid_00
do you have checkname toggled on? If you do, you need to preface all your bot commands with the bot's name.
nope
Posted: Fri Sep 24, 2004 11:00 pm
by rettus1
Nope, checkname = off. Here is my ini if it will help for troubleshooting. TY for the reply.
Code: Select all
[CORE]
AnchorRadius=6
ChatIn=Tell
ChatInChannel=Channel Name
checkname=off
MaxLootRadius=50
followmode=0
IgnGroupList=duck|say|tell|group|cmds|trade|run|backstab|taunt|evade|slam|bash|kick|flyingkick|disarm|traps|puller||
ListenChan=Name_of_channel
listenchat=off
listengroup=off
MountItem=Name of Bridle or Drum
MaxTargetRange=250
movetomode=1
relaytells=off
trap=off
Verbosity=9
DebugList=None
[ADVPATH]
FaceFast=1
SilentFlag=1
SpeedSense=15
FollowDistance=20
[EVENTS]
EventExpGained=None
EventImDead=None
EventLoosingLevitate=/botsay I'm loosing Levitate.
EventLoosingInvis=/botsay I'm loosing invis.
EventLostInvis=/botsay I'm no longer invis.
EventZoned=None
EventDefend=/botsay I've been attacked by NameS! Attacking right back!
EventGuard=/botsay Intruder alert! Attacking the trespassing NameS!
EventAttacked=None
EventProtect=/botsay How dare NameS attack my master?! I must punish this insolence!
[COMBAT]
archery=off
autobehind=off
autoengage=off
bash=off
backstab=off
disarm=off
evade=off
flyingkick=off
frenzy=off
kick=off
slam=off
taunt=off
petona=off
tauntdisc=off
WarTauntDisc=incite
GuardRadius=50
defend=off
protect=off
ProtectList=MyMaster, which u need not know the name =)
NeverKill=things you never want to attack separated by |
ProtectOrDefendCheckRadius=50
melee=off
MeleeRange=12
MeleeMaxRadius=100
[SPELL]
SelfBuffList=Buffs you wish to maintain on yourself separated with |
sitaftercast=off
DelayBeforeSit=3s
canni=off
CanniSpell=Cannibalize
CanniUntilPctHPsLessThan=40
ChainNuke=Your Chain Nuke Spells separated with |.
ChainStun=Your Chain Stun Spells separated with |.
DefaultSpellSet=Default
dobuff=off
EvacSpell=Enter the name of your Evac spell here.
LomMsg=Warning I'm running low on Mana.
reportlom=on
remem=off
DefaultSpellGem=8
yaulp=off
YaulpSpell=Yaulp
[HEALER]
doheal=off
CasterSpell=Name of heal spell autoheal uses on Non Tanks
CasterPctHeal=70
DefaultHealSpell=Name of Default Heal Spell
HealCasterMsg=Healing %t
HealPetMsg=Healing %t
healpets=off
HealTankMsg=Big Heal on %t
IsPally=0
PalGrpPct=81
PalHealPct=81
PallyGroupSpell=Name of Pally Group Heal Spell
PallyHealSpell=Name of Pally Heal Spell
PalHealMsg=Healing %t
patchheal=on
PatchHealMsg=Patch Healing %t
PatchSpell=Name of Patch Heal Spell
PetPctHeal=51
PetSpell=Name of Pet Heal Spell
ReportAutoHeal=1
TankSpell=Name of heal spell autoheal uses on Tanks
TankPctHeal=51
stopifhealed=on
stopforheals=off
TankList=Warrior|Shadow Knight|Paladin|Monk|Beastlord|Ranger|Shaman|Berserker
CasterList=Necromancer|Wizard|Enchanter|Magician|Rogue|Druid|Cleric|Bard
[SHORTCUTS]
default=/echo Put yer shortcuts in your .ini file!
Posted: Sat Sep 25, 2004 10:12 am
by A_Druid_00
Everything looks fine in the ini. As far as chat setup at least. What kind of commands are you trying to give him? You have dobuffs off, so he won't do buffs obviously. What class is the bot? I have an ini for most every class; so I could maybe post one for you to try.
Also, are you 2 boxing on the same computer? If you are; have you set your Performance to Background Settings? If you haven't your bot will majorly lag on response time.
Outside those 2 things I have no idea.
Posted: Sat Sep 25, 2004 1:27 pm
by rettus1
Nope. Im having my friends send me tells and he's set as my master. He sends commands like /tell myname /sit ... still cant get it to work. Im trying to bot a wizzard. Thank you.
Posted: Sat Sep 25, 2004 6:22 pm
by A_Druid_00
Hah; you happen to be botting the only class I don't have an ini for. Necros, Mages, Enchanters sure; but no wiz. Here's my magebot's ini for reference; tailor it to your wiz if you think it might help.
Code: Select all
[CORE]
AnchorRadius=6
ChatIn=irc
ChatInChannel=blah
checkname=off
MaxLootRadius=50
followmode=2
IgnGroupList=duck|say|tell|group|cmds|trade|run|backstab|taunt|evade|slam|bash|kick|flyingkick|disarm|traps|puller||
ListenChan=blah
listenchat=off
listengroup=off
MountItem=Black Chain Bridle
MaxTargetRange=250
movetomode=2
relaytells=on
trap=off
Verbosity=9
DebugList=None
[ADVPATH]
FaceFast=1
SilentFlag=1
SpeedSense=15
FollowDistance=20
[EVENTS]
EventExpGained=None
EventImDead=None
EventLoosingLevitate=/botsay I'm loosing Levitate.
EventLoosingInvis=/botsay I'm loosing invis.
EventLostInvis=/botsay I'm no longer invis.
EventZoned=None
EventDefend=/botsay I've been attacked by NameS! Attacking right back!
EventGuard=/botsay Intruder alert! Attacking the trespassing NameS!
EventAttacked=None
EventProtect=/botsay How dare NameS attack my master?! I must punish this insolence!
[COMBAT]
archery=off
autobehind=off
autoengage=off
bash=off
backstab=off
disarm=off
evade=off
flyingkick=off
frenzy=off
kick=off
slam=off
taunt=off
petona=on
tauntdisc=off
WarTauntDisc=incite
GuardRadius=50
defend=off
protect=off
ProtectList=BobDole
NeverKill=things you never want to attack separated by |
ProtectOrDefendCheckRadius=50
melee=off
MeleeRange=12
MeleeMaxRadius=100
[SPELL]
SelfBuffList=Shield of Maelin|Xegony's Phantasmal Guard
sitaftercast=on
DelayBeforeSit=3s
canni=off
CanniSpell=Cannibalize
CanniUntilPctHPsLessThan=40
ChainNuke=Black Steel|Shock of Steel
ChainStun=Your Chain Stun Spells separated with |.
DefaultSpellSet=Default
dobuff=on
EvacSpell=Enter the name of your Evac spell here.
LomMsg=Warning I'm running low on Mana.
reportlom=off
remem=off
DefaultSpellGem=8
yaulp=off
YaulpSpell=Yaulp
[HEALER]
doheal=off
CasterSpell=Name of heal spell autoheal uses on Non Tanks
CasterPctHeal=70
DefaultHealSpell=Name of Default Heal Spell
HealCasterMsg=Healing %t
HealPetMsg=Healing %t
healpets=off
HealTankMsg=Big Heal on %t
IsPally=0
PalGrpPct=81
PalHealPct=81
PallyGroupSpell=Name of Pally Group Heal Spell
PallyHealSpell=Name of Pally Heal Spell
PalHealMsg=Healing %t
patchheal=off
PatchHealMsg=Patch Healing %t
PatchSpell=Name of Patch Heal Spell
PetPctHeal=51
PetSpell=Name of Pet Heal Spell
ReportAutoHeal=1
TankSpell=Name of heal spell autoheal uses on Tanks
TankPctHeal=51
stopifhealed=off
stopforheals=off
TankList=Warrior|Shadow Knight|Paladin|Monk|Beastlord|Ranger|Shaman|Berserker
CasterList=Necromancer|Wizard|Enchanter|Magician|Rogue|Druid|Cleric|Bard
[SHORTCUTS]
WaterPet=snt servant of marr
COH=snt Call of the Hero on NameS