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

[PB] How to store current condition for futher while\if conditions

Infernik

Member
Joined
Dec 23, 2010
Messages
295
Reaction score
3
Hi, i need to get current zone name or other condition to use it later in a profile when this condition will be false. For ex. i'm in Uldum and when i'll be in Stormwind i need to use Deepholme portal, and if i'm in Deepholme i need to use Uldum portal in Stormwind. I'm pretty sure that's possible but my coding skills are quite low to figure it out even looking through highivoltz multiprofile.
 
From what I remember (am at work atm)
var1 = Me.ZoneId;

if ((int)var1 == 1667)
blah
blah

Me.ZoneId...... am not fully sure that is accurate. Look in the help info in PB to clarify.
 
So i need to put it at the start of profile and this condition will be stored for whole profile duration? What about stopping the bot and changing it botbase?
 
From what understand, I think it will be stored for the duration of the profile, even if you change botbase during the profile. If you stop and start HB it will be reset.

I may be wrong tho. A simple test would be :

var1 = "Hello";
Change BotBase
Log(var1.ToString());
 
I'm getting an error when using this.

Code:
Err: If Condition: ((int)var1 == 1519) ,Err:System.InvalidCastException: Specified cast is not valid.
   at CodeDriver.Code1461295636(Object context)
    at HighVoltz.Composites.If.CanRun(Object context) in c:\Buddiesr\Buddy 5740\Bots\Professionbuddy\Composites\If.cs:line 85
 
I think maybe you need (uint) instead of (int)
 
Thank you very much for the help! :) But i have another question :3 Is it possible to get condition from profile name? Something like ProfileNameContainsKey :P ?
 
Last edited:
Back
Top