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

Pages: [1] 2 3
1
Stealth Client / Re: NPC Shop problem
« on: January 23, 2016, 08:13:10 PM »
Thanks for your reply.

I just PM the information to you.

2
Stealth Client / Re: NPC Shop problem
« on: January 22, 2016, 07:31:04 AM »
did you find any solution on this problem ?

if you can contact Vizit0r, would you please suggest to provide a function to clear all AutoBuy / AutoSell?
On the develop stage, It make me lots of trouble due to forget the reset the list of AutoBuy items...

Furthermore, can AutoBuy / AutoBuy to omit the Color? I need to call twice on buy items if the Color is vary on the vendor(Tailor).

And i don't really understand the AutoBuyDelay? It delay the Buy process after receive shop list?

Sorry for  so many questions... :P

3
Stealth Client / Re: [C#] Raw_Move
« on: January 22, 2016, 07:18:28 AM »
i use it for moving on the Orc ship. I try to use NewMoveXY fail because some tile on the ship show as Water, thus it will return false on it.

4
Stealth Client / Re: [C#] Raw_Move
« on: January 21, 2016, 04:54:01 PM »
Actually I can't find that under Stealth.Client

5
Stealth Client / [C#] Raw_Move
« on: January 20, 2016, 09:44:03 PM »
Does ScriptSDK support Raw_Move command?
I can't use Step / StepQ on the ship...

6
Stealth Client / Re: {c#} Use a Runebook in Stealth
« on: January 14, 2016, 07:53:16 AM »
Code: [Select]
using System;
using ScriptSDK.Items;
using ScriptSDK.API;
using ScriptSDK.Data;
using ScriptSDK.Engines;
using ScriptSDK.Gumps;

namespace ScriptSDK.Items
{
    [QuerySearch(new ushort[] { 0x22C5 })]
    public class RuneBook : Item
    {
        private ushort _point;

        public RuneBook(Serial serial)
            : base(serial)
        {
            this.UpdateLocalizedProperties();
            this._point = 0;
        }

        public RuneBook(uint ObjectID) : base(ObjectID)
        {
            this.UpdateLocalizedProperties();
            this._point = 0;
        }

        public string Name
        {
            get
            {

                var n = ClilocHelper.GetParams(this.Properties, 1070722);
                if (n.Count > 0)
                    return n[0];
                else
                    return "";
            }
        }

        public bool Exceptional
        {
            get
            {
                if (ClilocHelper.GetIndex(this.Properties, 1060636) > -1)
                    return true;
                else
                    return false;

            }
        }

        public string CraftedBy
        {
            get
            {
                var n = ClilocHelper.GetParams(this.Properties, 1050043);
                if (n.Count > 0) return n[0]; else return "";
            }
        }

        public bool Open(double MaxDelay = 2000)
        {
            DateTime dateTime = DateTime.UtcNow.AddMilliseconds(MaxDelay);
            this.DoubleClick();
            Stealth.Client.Wait(1000);
            do
            {
                for (ushort i = 0; i < GumpHelper.Count(); i++)
                {
                    if (Stealth.Client.GetGumpSerial(i).Equals(this.Serial.Value))
                    {
                        return true;
                    }
                }


            } while (DateTime.UtcNow < dateTime);
            return false;
        }

        public bool Next()
        {
            this._point = (ushort)(this._point + 1);
            if (this._point > 16) { this._point = 1; }
            Console.WriteLine("Go to Point " + this._point);
            return this.Recall(this._point);
        }

        public bool Recall(ushort Point, double MaxDelay = 5000)
        {
            DateTime dateTime = DateTime.UtcNow.AddMilliseconds(MaxDelay);

            int CurX = Stealth.Client.GetX(Stealth.Client.GetSelfID());
            int CurY = Stealth.Client.GetY(Stealth.Client.GetSelfID());

            if (this.Open() == false) { return false; }

            GumpHelper.SendClick(this.Serial, 49 + Point); // Start From 50
            do
            {
                Console.WriteLine("Going...");
                Stealth.Client.Wait(500);
                if (dateTime < DateTime.UtcNow) { return false; }
            } while (Stealth.Client.GetX(Stealth.Client.GetSelfID()) == CurX &&
                     Stealth.Client.GetY(Stealth.Client.GetSelfID()) == CurY);

            return true;
        }
    }
}


Not completed...just do for what i need... ;)

7
Stealth Client / Re: [C#] ContextMenus Question
« on: January 13, 2016, 11:51:40 PM »
Code: [Select]
Mobile b = new Mobile(new Serial(0x00B14FC5));
ScriptSDK.Configuration.ContextOptions.Initialize();
Console.WriteLine(b.ContextMenu.Parse());
Console.WriteLine(b.ContextMenu.Entries.Count);

Console.WriteLine(b.ContextMenu.Click(3006123));  // True;
Console.WriteLine(a.ContextMenu.Click(3006123));  // False;

I add initialize() to make "b" work but "a" will lost the contextmenu

8
Stealth Client / Re: NPC Shop problem
« on: January 13, 2016, 11:42:53 PM »
yes, the problem can be reproduce in pascal...

9
Stealth Client / NPC Shop problem
« on: January 13, 2016, 07:50:42 PM »
Using GetShopList() to get string of ShopList
Code: [Select]
№: 13|ID:|$4074BD4D|type|$0DF0|Color|$0000|Name|black staff|Price|13|Cliloc||Quantity|19
....
№: 79|ID:|$408EBEA7|type|$0DF0|Color|$0000|Name|black staff|Price|13|Cliloc||Quantity|40 <-- this item's quantity should be 1 (that is I sell back to the vendor)

Also, if the shop have more than 1 item with same type and color like above. You may buy more item that you set in AutoBuy(type,color,quantity)

In above case, if you AutoBuy(0x0DF0, 0x0000, 1) , you will buy 2 items.



10
Stealth Client / [C#] ContextMenus Question
« on: January 13, 2016, 07:34:23 PM »
Code: [Select]
Console.WriteLine("Start");
Console.WriteLine("SDK Version : "+SDK.Revision);
ScriptSDK.SDK.Initialize();
Mobile a = new Mobile(new Serial(0x004230E2));
a.ContextMenu.Parse();
Console.WriteLine(a.ContextMenu.Entries.Count);

Mobile b = new Mobile(new Serial(0x00B14FC5));
b.AttachContextMenu();
Console.WriteLine(b.ContextMenu.Parse()); // Return False ?
Console.WriteLine(b.ContextMenu.Entries.Count);

a.ContextMenu.Click(3006123);           
Console.WriteLine("End");
Console.ReadKey();

Code: [Select]
SDK Version : 0.9.0
4
False
0

How can i do to parse the context menu of b?

11
Stealth Client / Re: [C#] Buff Event Question
« on: December 30, 2015, 06:25:08 PM »
Code: [Select]
namespace ScriptSDK.API
{
  public class Buff_DebuffSystemEventArgs : ObjectEventArgs
  {
    public ushort AttributeId { get; private set; }

    public bool IsEnabled { get; private set; }

    public Buff_DebuffSystemEventArgs(uint objectId, ushort attributeId, bool isEnabled)
      : base(objectId)
    {
      this.AttributeId = attributeId;
      this.IsEnabled = this.IsEnabled;
      // Is it the reason why the return value incorrect?
      // this.IsEnabled = isEnabled?
    }
  }
}

12
Stealth Client / [C#] Buff Event Question
« on: December 30, 2015, 05:57:10 PM »
Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ScriptSDK.API;

namespace StealthUO
{
    class Program
    {       
        static void Main(string[] args)
        {
            Stealth.Client.Buff_DebuffSystem += _onBuff;           
            Stealth.Client.CastSpell("Lightning Strike");  // Toggle On
            Stealth.Client.CastSpell("Lightning Strike");  // Toggle Off
           
            Console.ReadKey();
        }

        public static void _onBuff(object sender, Buff_DebuffSystemEventArgs e)
        {
            Console.WriteLine(e.AttributeId);
            Console.WriteLine(e.IsEnabled);           
        }
    }
}

I expected the about code shoud return
Code: [Select]
1096
True
1096
False
But the result is
Code: [Select]
1096
False
1096
False

Anyone knows what the problem is?

13
Stealth archive / Stealth.Script_GetLandTileData
« on: December 18, 2013, 07:52:45 PM »
When i try to use
Code: [Select]
TLandTileData _tiledata = Stealth.Script_GetLandTileData(169);


Error on debug window

Code: [Select]
A first chance exception of type 'System.AccessViolationException' occurred in mscorlib.dll

14
Stealth archive / Re: Stealth 6.1.5
« on: December 15, 2013, 02:36:21 AM »
its OK..Enjoy your X'mas... ;)

15
Stealth archive / Stealth.Script_SetContextMenuHook()
« on: December 08, 2013, 07:19:32 PM »
Code: [Select]
520|3006123|Open Paperdoll|0|0
918|1115022|Open Titles Menu|0|0
915|1049594|Loyalty Rating|0|0
302|3006145|Open Backpack|0|0
416|1114299|Open Item Insurance Menu|0|0
418|3006201|Toggle Item Insurance|0|0
801|3006169|Toggle Quest Item|0|0
1014|1154113|Refuse Trades|0|0

Stealth.Script_SetContextMenuHook(id,Entry Number)
Is Entry Number using the first split value? e.g. Stealth.Script_SetContextMenuHook(Self.ID,302) for Open Backpack?
But it will over flow...

Pages: [1] 2 3