Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

[c# scriptSDK]Do You know how to convert to system.type

Only working scripts
Post Reply
epsilon2
Neophyte
Neophyte
Posts: 19
Joined: 15.08.2016 20:41

[c# scriptSDK]Do You know how to convert to system.type

Post by epsilon2 »

Hello,

I have some problem mit int and system.type. Do You know how to enter Mobile.Find(.....) the right Type ?

regards,

Code: Select all

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//using ScriptDotNet2;
using ScriptSDK;
using ScriptSDK.Data;
using ScriptSDK.Attributes;
using ScriptSDK.Configuration;
using ScriptSDK.Gumps;
using ScriptSDK.Targets;
using ScriptSDK.Utils;
using ScriptSDK.ContextMenus;
using ScriptSDK.Engines;
using ScriptSDK.Items;
using ScriptSDK.Mobiles;
using StealthAPI;

namespace ConsoleApplication1
{
    internal static class Program
    {
        [STAThread]
        private static void Main(string[] args)
        {
            SDK.Initialize();
            ScriptLogger.Initialize();
            ScriptLogger.LogToStealth = true;
            ScriptSDK.Configuration.ContextOptions.Initialize();

            Stealth.Client.SendTextToUO("Hello World!");
            var Player = PlayerMobile.GetPlayer();
          [b][color=#FF0080] // List<Type> Mob = ScriptSDK.Mobiles.Mobile.Find(0x0190, 0x0, true);[/color][/b]
            Stealth.Client.FindType(0x0190, Stealth.Client.GetGroundID());
            var items = Stealth.Client.GetFindList();
            foreach (var item in items)
            {
                if (!Stealth.Client.IsNPC(item))
                {
                    continue;
                }
                if (Stealth.Client.GetDistance(item) <= 3)
                {
                    ScriptLogger.WriteLine(String.Format("{0}", Stealth.Client.GetAltName(item)));
                    if (Stealth.Client.GetName(item) == "Tinker")
                    {
                        Stealth.Client.Wait(1000);
                        Stealth.Client.SendTextToUO("Hello Tinker!");
                    }
                }
            }
            Stealth.Client.Wait(1000);
            //Player.ContextMenu.Parse();
            //       var results = Scanner.Find(typeof(Necklace), Player.Backpack.Serial.Value, true);//Sends Query based on QueryGraphic
            //ScriptLogger.WriteLine(String.Format("{0}", Player.ContextMenu.Entries.ToString()));
           // Stealth.Client.Wait(1000);
            //Player.ContextMenu.Click("Check your stats");
        }
    }
}
Post Reply