What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Bug or intended in routine code?

  • Thread starter Thread starter Bender
  • Start date Start date
B

Bender

Guest
I tried playing a bit around with rogue code, to understand the bot. But there is some parts of the behavior I don't quite understand.

I know this code isn't perfect, it was mostly from me playing around, and hated bard part. The code is still very similar to hawkers with very few modifications.

Most important notice is that, in pull code, if I don't use startrangedattack, it's most times just ignoring mobs and standing there, even tho I have Quick Shot or Keen Strike, so I commented them out and just stayed with startrangedattack as it seams to be the only thing working? If someone could explain what could be going wrong?
If the pet is in combat, lets say adds, until I have cast "Rejuvenate", the bot will not target or assist pet, even if the npc is just next to me?
 
Yeah looks like .cs is not valid for this forum, so you have to make it into zip.
 
try deleting all the code you commented out and change the auto attack to:
new Action(ctx => SpellManager.CastSpell("Quick shot")),

let me know what it does
 
Wont matter much, the main problem is the bot keeps dying to " D] Invalid Session". I keep getting adds, and the bot wont target them or kill them, just stands there like a dumb thing.
 
if its really fucked, try starting again. what are you trying to do, just playing about.
 
Yea if you need help with build or rotation I can help. And MW can prolly tell you what scripting your doing wrong just need more info. What lvl what u want it for etc.
 
indeed i'd happily help with any code, if your after a marksman script i required a test bunny for one i'm currently writing. i trying to lvl my mage for the 19th :P
 
mw, well it is a code issue now, that I don't understand. When you look the the script, there is no " Invalid Session" text, so wondering where it is coming from. Its generally related to being in combat, but not picking up that it is in combat. If there was a way I could add more debug information let me know.

One thing that does bug me, is that I noticed there is lots of CreateSpellCast and the like in the code, without checking if the current soul has it (level limitations). I take it, that CreateSpellCast must have internally some check that if the user has the spell, but would it not be faster/smoother to make booleans that is then defined in SoulTreeCheck, and have each line of code more similar to:
if (_hasSpellBoom) CreateSpellCast("Boom", condition),
 
it could be the createspellcast part of the code is not finding the spell and giving you the invalid session error. it not an if statment you use its a decorator statment e.g.
new Decorator(ctx => _PillagingStone.Equals(160),
new Sequence(
new Action(ctx => Logging.Write("should cast")),
new Action(ctx => SpellManager.CastSpell("Pillaging Stone")))),
thats some test code from my mage to get pillaging stone to cast every 2 1/2 minutes

CreateSpellCast("Pillaging Stone", ctx => !GigaRift.Me.HasBuff("Pillaging Stone")),
and this is, a similar code that only casts pillaging stone if i don't have the buff. your not required to use them, but it think having the spells would help.

i think if you could tell me what your trying to active it would help me help you
 
Back
Top