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 - unisharp

Pages: 1 ... 10 11 [12] 13 14
166
Stealth archive / Corpse Looting Help
« on: March 28, 2015, 08:11:08 AM »
I'm really close to getting this program done but I've been stuck on getting the loot routine for a couple days now...

Does GetTooltip work correctly?  It either hangs the program or I get back a very odd-looking string of different names of items with odd characters.

Example: ""ded gorget7?\0\0\0studded sleeves8?\0\0\0studded leggings9?\0\0\r\0studded tunic:?\0\0\0studded leggings;?\0\0\r\0studded tunic<?\0\0\0studded sleeves=?\0\0\0studded gloves>?\0\0\0studded sleeves??\0\0\0studded le""



I looked at Crome696's SpeedLooter for example, GetCliloc no longer exists in ScriptDotNet2, so I'm assuming it was replaced by GetClilocByID.

GetCliocByID(item.ID) returns ""

Maybe I'm not doing something right?

Code: [Select]
Container lootContainer = new Container(corpse.ID);
lootContainer.Open();

List<Item> foundList = lootContainer.Inventory();

foreach (Item item in foundList)
{
if (lootTypes.Contains(item.Type))
{
response("Item found in list: " + item.Type);

string toolTip = Stealth.Default.GetTooltip(item.ID);

response("tooltip: " + toolTip);


//string itemProperties = Stealth.Default.GetClilocByID(item.ID);
//string toolTip = item.Tooltip;

//response("tooltip: " + item.Tooltip);
/*response("tooltip: " + item.Tooltip);
response("Properties: " + itemProperties);*/
}
}

167
Stealth archive / Re: Stealth Client for Linux?
« on: March 25, 2015, 03:08:37 AM »
Ya I had a feeling it would run under WINE (a Windows emulator for Linux.)  Still needing the graphic environment crushes my dreams though ;P

If Stealth had a command line Linux binary... I would have an army with me everywhere I went in UO haha

168
Stealth archive / Re: c# help - handling multiple stealth profiles?
« on: March 24, 2015, 09:02:10 AM »
Yup! working on routine and methods too  ;)

169
Stealth archive / Re: c# help - handling multiple stealth profiles?
« on: March 24, 2015, 05:45:55 AM »
Ahh thanks!

I think I may have to hold off on development and wait for that new API so I don't have to repeat my work later on :)

170
Stealth archive / c# help - handling multiple stealth profiles?
« on: March 24, 2015, 04:59:25 AM »
I'm writing an application that deals with multiple concurrent stealth profiles.  Wanted to check on this before I continued....

Stealth.Default <-  what's default?

Is this what ChangeProfile changes?

I'm guessing it's referring to a profile but I'm unsure

Basically I need to know if there is a way to call methods from a profile without having to actually ChangeProfile

171
Stealth archive / Stealth Client for Linux?
« on: March 23, 2015, 06:51:34 AM »
Are there any Stealth Client builds for Linux, or plans for it?  It would be awesome to run Stealth UO from a VPS.  Maybe no GUI needed, just upload bin and config files then interface with it via web interface.

EDIT: I'm planning on making a web interface using PHP & Zend Framework and there's multiple ways I could do this.  Running the Stealth client directly on the server would be a huge benefit of course :)

172
Stealth archive / Re: c# scripting problem
« on: March 22, 2015, 03:39:28 PM »
This works with the latest version of Stealth, ScriptAPI.cs and ScriptDotNet2

Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace firstMacro
{
    using ScriptDotNet2;
    using ScriptAPI;

    class Program
    {

        public static void BandageSelf(Item Bandage)
        {
            Bandage.Use();
            Stealth.Default.WaitTargetSelf();
            Console.WriteLine("Bandaging self...");
            Stealth.Default.WaitJournalLine(DateTime.Now, "You finish applying the bandages|You apply the bandages, but they barely help|You heal what little damage your patient had|You did not stay close enough to heal your patient|That is too far away", 15000);
        }

        static void Main(string[] args)
        {
            List<Item> Bandages = Find.FindItems(3617, Self.Backpack.ID);

            if (Bandages.Count == 0)
            {
                Console.WriteLine("No bandages found.");
                Environment.Exit(0);
            }

            Item Bandage = Bandages[0];


            while (Profile.IsConnected)
                if (Self.HP < Self.MaxHP)
                    BandageSelf(Bandage);
        }

    }
}

You can get the latest version of Stealth and ScriptDotNet2 here: http://www.scriptuo.com/index.php?topic=13054.msg108171#msg108171
Latest version of ScriptAPI.cs here: http://www.scriptuo.com/index.php?topic=13054.msg108167#msg108167

It started bandaging as soon as it took any damage and retries until full health.

EDIT: If anyone reads this and sees a way to shorten/improve on code please post so I learn! :)

173
Stealth archive / Re: ScriptAPI.cs - updated for ScriptDotNet2
« on: March 22, 2015, 10:32:41 AM »
I modified the ScriptAPI.cs from Orich's oRune, but it doesn't have any information at the top of it so I'm not sure whose code it is?

(Link to original unmodified)
https://bitbucket.org/Orich/orune/src/0614685de08481f6ef9073fbaf6d8ff0790bc08a/oRune/bin/Debug/ScriptAPI.cs?at=master

174
Stealth archive / C# ScriptAPI.cs - updated for ScriptDotNet2
« on: March 22, 2015, 07:38:52 AM »
Not sure whose code this was, there was no information at the top of this.  This is not my code, I just made some changes to it to use the new ScriptDotNet2.

http://pastebin.com/CRQrU09F


----------------------------------
Updated: 3/22/2015
 *Changes and Fixes to work with ScriptDotNet2

175
Stealth archive / Re: [Release] Stealth v6.5 - Updated 06\24\14
« on: January 11, 2015, 07:21:03 AM »
Sorry not sure what I'm missing here, I added ScriptDotNet2 as a new reference in oRune, changed Program.cs and ScriptAPI.cs to now use ScriptDotNet2, but the script isn't finding the Stealth methods.

The only methods it finds under the Stealth object are a bunch of GetLayer methods (Script_GetArmsLayer, Script_GetBankLayer, etc.)  which confuses the hell out of me cause if it was able to find those methods, then why can't I access any of the other methods.

This is only for the Stealth object.  I seem to be able to refer to all the other objects and their methods under ScriptDotNet2.


EDIT:  NVM figured it out

176
Stealth archive / Re: [Release] Stealth v6.5 - Updated 06\24\14
« on: January 10, 2015, 05:41:58 AM »
Awesome ty so much for looking into this, been dieing to use some OOP to get these in game tasks done :)

I'll check back later! =D

177
Stealth archive / Re: [Release] Stealth v6.5 - Updated 06\24\14
« on: January 09, 2015, 06:21:07 AM »
Last one I promise, been workin on this one for a day can't figure it out...

Code: [Select]
An exception raised at 10:18:47:694
'$C:\Users' is not a valid integer value
(00021946){Stealth.exe } [00422946] System.SysUtils.ConvertErrorFmt (Line 5388, "System.SysUtils.pas")
Call stack:
  (00021941){Stealth.exe } [00422941] System.SysUtils.ConvertErrorFmt (Line 5387, "System.SysUtils.pas")
  (0020FB75){Stealth.exe } [00610B75] Vcl.Controls.TControl.WndProc (Line 7224, "Vcl.Controls.pas")
  (00214561){Stealth.exe } [00615561] Vcl.Controls.TWinControl.WndProc (Line 10039, "Vcl.Controls.pas")
  (001DE8B1){Stealth.exe } [005DF8B1] Vcl.Forms.TCustomForm.WndProc (Line 4388, "Vcl.Forms.pas")
  (00213BA4){Stealth.exe } [00614BA4] Vcl.Controls.TWinControl.MainWndProc (Line 9751, "Vcl.Controls.pas")
  (000B5B5C){Stealth.exe } [004B6B5C] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (0032B2C8){Stealth.exe } [0072C2C8] CoolTrayIcon.TCoolTrayIcon.HookFormProc (Line 1014, "CoolTrayIcon.pas")
  (000B5B5C){Stealth.exe } [004B6B5C] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (001E7904){Stealth.exe } [005E8904] Vcl.Forms.TApplication.ProcessMessage (Line 10267, "Vcl.Forms.pas")
  (00690532){Stealth.exe } [00A91532] Stealth.Stealth (Line 254, "")

I get this error while trying to run oRune.  I also tried a Hello World app using standard Stealth API, same error.  Maybe because there are spaces in the path where I'm running Stealth from? (doubt that's the problem.)

Here's the Hello World:
Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using ScriptDotNet;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Stealth.Script_ClientPrint("Hello World");
        }
    }
}

178
Stealth archive / Re: [Release] Stealth v6.5 - Updated 06\24\14
« on: January 08, 2015, 06:25:13 AM »
yup!  reinstalled, added profiles again.  no errors, thanks!   ;D

179
Stealth archive / Re: [Release] Stealth v6.5 - Updated 06\24\14
« on: January 07, 2015, 06:53:33 AM »
First off, thank GOD this exists.  I've been praying for this forever.  Not sure why I never saw this before.  Even after knowing it existed on the forum, I still didn't see it listed on the main forum lol...   God DAMN I wish I knew this existed 2 years ago...  Anywho, I'm getting some runtime errors.  This one I get when I try to close the application (stealth v6.5.2)

Quote
An exception raised at 10:49:58:656
Integer overflow
(0002A420){Stealth.exe } [0042B420] System.SysUtils.ErrorHandler (Line 21673, "System.SysUtils.pas")
Call stack:
  (0002A41B){Stealth.exe } [0042B41B] System.SysUtils.ErrorHandler (Line 21672, "System.SysUtils.pas")
  (000DEDFA){Stealth.exe } [004DFDFA] System.IniFiles.TCustomIniFile.WriteBool (Line 298, "System.IniFiles.pas")
  (0028DD18){Stealth.exe } [0068ED18] SetupFiles.SaveShardsIni (Line 1292, "SetupFiles.pas")
  (0028D901){Stealth.exe } [0068E901] SetupFiles.SaveShardsList (Line 1259, "SetupFiles.pas")
  (0051EF6D){Stealth.exe } [0091FF6D] ClassMainStealth.TMainStealth.Free (Line 280, "ClassMainStealth.pas")
  (005D2DEC){Stealth.exe } [009D3DEC] main.TStealthForm.FormClose (Line 1906, "main.pas")
  (001DDE4F){Stealth.exe } [005DEE4F] Vcl.Forms.TCustomForm.DoClose (Line 3996, "Vcl.Forms.pas")
  (00214561){Stealth.exe } [00615561] Vcl.Controls.TWinControl.WndProc (Line 10039, "Vcl.Controls.pas")
  (001DE8B1){Stealth.exe } [005DF8B1] Vcl.Forms.TCustomForm.WndProc (Line 4388, "Vcl.Forms.pas")
  (00213BA4){Stealth.exe } [00614BA4] Vcl.Controls.TWinControl.MainWndProc (Line 9751, "Vcl.Controls.pas")
  (000B5B5C){Stealth.exe } [004B6B5C] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (0032B2C8){Stealth.exe } [0072C2C8] CoolTrayIcon.TCoolTrayIcon.HookFormProc (Line 1014, "CoolTrayIcon.pas")
  (000B5B5C){Stealth.exe } [004B6B5C] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (00214672){Stealth.exe } [00615672] Vcl.Controls.TWinControl.DefaultHandler (Line 10080, "Vcl.Controls.pas")
  (001E1CF5){Stealth.exe } [005E2CF5] Vcl.Forms.TCustomForm.WMSysCommand (Line 6275, "Vcl.Forms.pas")
  (00214561){Stealth.exe } [00615561] Vcl.Controls.TWinControl.WndProc (Line 10039, "Vcl.Controls.pas")
  (001DE8B1){Stealth.exe } [005DF8B1] Vcl.Forms.TCustomForm.WndProc (Line 4388, "Vcl.Forms.pas")
  (00213BA4){Stealth.exe } [00614BA4] Vcl.Controls.TWinControl.MainWndProc (Line 9751, "Vcl.Controls.pas")
  (000B5B5C){Stealth.exe } [004B6B5C] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (0032B2C8){Stealth.exe } [0072C2C8] CoolTrayIcon.TCoolTrayIcon.HookFormProc (Line 1014, "CoolTrayIcon.pas")
  (000B5B5C){Stealth.exe } [004B6B5C] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (00214672){Stealth.exe } [00615672] Vcl.Controls.TWinControl.DefaultHandler (Line 10080, "Vcl.Controls.pas")
  (00214561){Stealth.exe } [00615561] Vcl.Controls.TWinControl.WndProc (Line 10039, "Vcl.Controls.pas")
  (001DE8B1){Stealth.exe } [005DF8B1] Vcl.Forms.TCustomForm.WndProc (Line 4388, "Vcl.Forms.pas")
  (00213BA4){Stealth.exe } [00614BA4] Vcl.Controls.TWinControl.MainWndProc (Line 9751, "Vcl.Controls.pas")
  (000B5B5C){Stealth.exe } [004B6B5C] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")
  (0032B2C8){Stealth.exe } [0072C2C8] CoolTrayIcon.TCoolTrayIcon.HookFormProc (Line 1014, "CoolTrayIcon.pas")
  (000B5B5C){Stealth.exe } [004B6B5C] System.Classes.StdWndProc (Line 17013, "System.Classes.pas")

I also get errors while doing odd things with profiles (adding new ones mainly) and clients/servers.  Not 100% sure it's the same error but I'm pretty sure it is.  I know it's another integer overflow.


I'll certainly be contributing to this section as I go :)

180
_C2_ Script Library / Re: C2's Trick or Treater 2.3
« on: October 21, 2014, 06:02:08 AM »
I'm getting heads, there's supposed to be 3 new ones, haven't got one yet.

Also, I had some problems with walking back into the house.  Sometimes it would get to the door and stop there, and my client would close.  I'd log back in and the character is at the door.

So, this is now what my path-finding/door-opening script:

 
Code: [Select]
if #CHARPOSY >= %pathfindrangestart && #CHARPOSY <= %pathfindrangewindow
   {
   repeat
   event pathfind 0933 2327  ;x/y of first location (not recall point)
   until #charposx = 0933 && #charposy = 2327

   wait 30
   finditem FJC_HJC g_3
   set #lobjectid #findid
   event macro 17
   wait 30

   ;wait 80 ; because of teleporter- take out if not using teleporter
   ;do not edit below-this is your original starting point
   repeat
   event pathfind %movedx %movedy
   until #charposx = %movedx && #charposy = %movedy
   }

I have not had any problems since adding those 2 x (wait 30).

Pages: 1 ... 10 11 [12] 13 14