Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Blacklisted

Pages: 1 [2] 3 4 5
16
Stealth Client / Re: C# how to determine if buff is active
« on: June 06, 2016, 08:26:42 AM »
dam is a wonder you have time for anything else, I'll take a look at the git its probably a bit out of my programming ability tho.
Thanks for taking to time to answer my questions.

17
Stealth Client / Re: C# how to determine if buff is active
« on: June 06, 2016, 07:43:59 AM »
Thanks Crome969, ill keep bashing away it and post the code if I getting working.
is the shard you run Rebirth?

18
Stealth Client / Re: C# how to determine if buff is active
« on: June 06, 2016, 06:24:09 AM »
Ahh I see thanks, so is there another method in Stealth that can tell all current buffs active or would we have to write our own to handle that?
I guess a way to do would be to start a timer for each buff when it becomes active then set a bool to say if its active or not.

Then again that would not work if you had like two or three debuffs like curse, weaken, strangle as there is only ever one event in the Stealth.Client.GetBuffBarInfo() list
 

19
Stealth Client / Re: C# how to determine if buff is active
« on: June 05, 2016, 05:52:22 PM »
Thanks for replying Crome969
I've re written my ChecksBuffs method but it seems like there is only ever one buff in the list at a time.
Not sure if its a bug or my code. :)

Code: [Select]
public void CheckBuffs(object sender, Buff_DebuffSystemEventArgs e)
        {
            this.Dispatcher.Invoke((Action)(() =>
            {
                buffIcons = Stealth.Client.GetBuffBarInfo();
                foreach (var buffIcon in buffIcons)
                {
                    lbBuffs.Items.Add(buffIcon.Attribute_ID);
                    if (buffIcons.Exists(bi => buffIcon.Attribute_ID == 1082))
                    {
                        tbBuff.Text = "CW IN LIST";
                        CanCastDivineFury = true;
                    }

                    if (!buffIcons.Exists(bi => buffIcon.Attribute_ID == 1082))
                    {
                        tbBuff.Text = "CW NOT IN LIST";
                        CanCastDivineFury = false;
                    }

                    if (buffIcons.Exists(biA => buffIcon.Attribute_ID == 1010) && buffIcons.Exists(biB => buffIcon.Attribute_ID == 1082))
                    {
                        tbBuff.Text = "CW AND DF IN LIST";
                        CanCastDivineFury = false;
                    }
                }
            }));
        }

20
Stealth Client / Re: C# how to determine if buff is active
« on: June 04, 2016, 10:56:13 AM »
I added in some code to check for Divine Fury and it seems like its working ok but I'm pretty wet behind the ears when it comes to programming

Code: [Select]
public void CheckBuff(object sender, Buff_DebuffSystemEventArgs e)
        {
            this.Dispatcher.Invoke((Action)(() =>
            {
                String buffstatus = (e.IsEnabled) ? "Active" : "NotActive";
                String DFStatus = (e.IsEnabled) ? "Active" : "NotActive";                
                if (buffstatus == "Active")
                {
                    CWBuff = new Buff_DebuffSystemEventArgs(44878, 1082, true);
                }
                else
                {
                    CWBuff = new Buff_DebuffSystemEventArgs(44878, 1082, false);
                }

                if (DFStatus == "Active")
                {
                    DFBuff = new Buff_DebuffSystemEventArgs(44878, 1010, true);
                }
                else
                {
                    DFBuff = new Buff_DebuffSystemEventArgs(44878, 1010, false);
                }                
            }));
        }

21
Stealth Client / Re: C# how to determine if buff is active
« on: June 04, 2016, 09:09:31 AM »
Ok so I have it working but it may be an awkward way of handing it so any advice on how I could do it better?

Code: [Select]
public void AttackRoutine()
{
      Stealth.Client.Buff_DebuffSystem += CheckBuff;
      var spellname = string.Empty;
      do
      {
           if (player.WarMode)
           {
               if (blah.IsEnabled)
               {
                    spellname = "Divine Fury";
                    player.Cast(spellname);
                    response(spellname, player.Name);
                    Stealth.Client.Wait(1000);
                }
                else
                {
                   spellname = "Consecrate Weapon";
                   player.Cast(spellname);
                   response(spellname, player.Name);
                   Stealth.Client.Wait(1000);
                }
            }
       } while (!player.Dead)
}



Code: [Select]
public void CheckBuff(object sender, Buff_DebuffSystemEventArgs e)
        {
            this.Dispatcher.Invoke((Action)(() =>
            {
                String buffStatus = (e.IsEnabled) ? "Active" : "NotActive";
                
                if (buffStatus == "Active")
                {
                    blah = new Buff_DebuffSystemEventArgs(44878, 1082, true);
                }
                else
                {
                    blah = new Buff_DebuffSystemEventArgs(44878, 1082, false);
                }
                
            }));
        }

22
Stealth Client / C# how to determine if buff is active
« on: June 04, 2016, 06:05:28 AM »
I am trying to cast Divine Fury only if the buff Consecrate Weapon is Active.
However the buff is always set to false.

I understand that this is because im setting cwBuff to false using

Code: [Select]
Buff_DebuffSystemEventArgs cwBuff = new Buff_DebuffSystemEventArgs(44878, 1082, false);

Whats the proper way of handing buff events? I've had a look at the API but cant find any examples

Code: [Select]
public void AttackRoutine()
{
      Buff_DebuffSystemEventArgs cwBuff = new Buff_DebuffSystemEventArgs(44878, 1082, false);
      var spellname = string.Empty;
      do
      {
           if (player.WarMode)
           {
               if (cwBuff.IsEnabled)
               {
                    spellname = "Divine Fury";
                    player.Cast(spellname);
                    response(spellname, player.Name);
                    Stealth.Client.Wait(1000);
                }
                else
                {
                   spellname = "Consecrate Weapon";
                   player.Cast(spellname);
                   response(spellname, player.Name);
                   Stealth.Client.Wait(1000);
                }
            }
       } while (!player.Dead)
}



23
Stealth Client / Re: Getting Disconnected(Duplicates are not allowed)
« on: June 03, 2016, 08:15:38 AM »
Thanks Smitty its working now, I guess that's my weekend planned now lol

24
Stealth Client / Re: Getting Disconnected(Duplicates are not allowed)
« on: June 02, 2016, 10:05:26 AM »
I've tried using steath v7.4 ran as Administrator but im still getting a client crash when hitting the start client button.
when I debug with visual studio 2015 I get the error "Unhandled exception at 0x028171D8 (dbghelp.dll) in client.exe: 0xC0000005: Access violation writing location 0x63DB0DA0."

dbghelp.dll not loaded. but i think that is to do with the debugger not being able to access that dll so i cant give a more accurate explanation of what may be causing the crash.





25
Stealth Client / Re: Getting Disconnected(Duplicates are not allowed)
« on: June 02, 2016, 01:34:22 AM »
I was using 7.4 but it was causing the client to crash when using the graphical client. I'll give it another go tonight when I get home form work.
thanks   :D

26
Stealth Client / Re: Getting Disconnected(Duplicates are not allowed)
« on: June 01, 2016, 11:23:02 AM »
@Tidus I'm using ScriptSDK version 0.9 and stealth 6.7
no dramas, hi five

27
Hi Ghost thanks for replying I'm on ATL OSl.
I've set the client to 7.0.50.0 in the stealth settings.

28
Stealth Client / Getting Disconnected(Duplicates are not allowed)
« on: May 31, 2016, 02:38:35 PM »
i am trying out some simple code to cast consecrate weapon but I keep getting disconnected after the second cast of the spell with the message "Duplicates are not allowed"

The call stack shows

Code: [Select]
An exception raised at 23:33:40:611
Duplicates not allowed
(00882C80){Stealth.exe } [00C83C80] ClassCharacter.{System.Generics.Collections}TDictionary<System.Word,ScriptTypes.TBuffIcon>.Add (Line 1846, "System.Generics.Collections.pas")
Call stack:
  (00882C7B){Stealth.exe } [00C83C7B] ClassCharacter.{System.Generics.Collections}TDictionary<System.Word,ScriptTypes.TBuffIcon>.Add (Line 1844, "System.Generics.Collections.pas")
  (008794F9){Stealth.exe } [00C7A4F9] ClassCharacter.TCharacter.GetInfoFromPacket_0xDF (Line 10422, "ClassCharacter.pas")
  (0086DA48){Stealth.exe } [00C6EA48] ClassCharacter.TCharacter.RedirectGamePacket (Line 6457, "ClassCharacter.pas")
  (0086BF8E){Stealth.exe } [00C6CF8E] ClassCharacter.TCharacter.GameClientOnRead (Line 5863, "ClassCharacter.pas")
  (002CCE91){Stealth.exe } [006CDE91] System.Win.ScktComp.TCustomSocket.Event (Line 1903, "System.Win.ScktComp.pas")
  (002CB42E){Stealth.exe } [006CC42E] System.Win.ScktComp.TCustomWinSocket.Event (Line 1013, "System.Win.ScktComp.pas")
  (002CBA09){Stealth.exe } [006CCA09] System.Win.ScktComp.TCustomWinSocket.WndProc (Line 1201, "System.Win.ScktComp.pas")
  (000D5CAC){Stealth.exe } [004D6CAC] System.Classes.StdWndProc (Line 16600, "System.Classes.pas")

Here's my code but I cant figure out whats wrong

Code: [Select]
class Program
    {
        static void Main(string[] args)
        {
            PlayerMobile player = PlayerMobile.GetPlayer();
            int hp = player.Hits;

            var spellname = string.Empty;
            var delay = 0;
            do
            {
                if (player.WarMode)
                {
                    if (player.Mana > 35 && hp > 35)
                    {
                        spellname = "Consecrate Weapon";
                        player.Cast(spellname);
                        delay = 4000;
                        Stealth.Client.Wait(delay);
                    }
                }
            } while (!player.Dead);
        }
    }

29
Stealth archive / Re: Freeshard Login
« on: May 24, 2014, 12:38:43 AM »
Hmmm further to add, if I connect without either UOSteam or Stealth and I connect normally without any 3rd party programs I do remain connected, seems their custom client is able to detect what 3rd party programs are running.

30
Stealth archive / Re: Freeshard Login
« on: May 23, 2014, 09:43:08 AM »
ah yes ty, yep looks like some sort of verification is sent  >:(

Pages: 1 [2] 3 4 5