|
||
|
|||||||
| Ultima SDK Support for the Ultima SDK. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Jan 2004
Posts: 143
|
Hi, LLOLOLOLOL, My name is RHymes and I like the SDK. Its fun to make things with the SDK. I want to make LOLOLOL tutorials on how to use the SDK. I want to start off basic, then move to MAYBE a COMPLETE Client. I got lololol time and if want to read it I gots no problems, also if u use this code dont even think of saying you found out from me since I didnt write the SDK, this guy named Kros did. FIRST I never made a graphical client for UO, but I have developed a UO client that is text based for about 7 months now (finished 5 months ago) and have used the SDK to develop new compacted maps for UO and collision slash resource base maps for UO (since a client that logs in to macro doesnt need friggen 80mb lolololol map file). It was called UOLight and it has about 10 internal users (PvPers use it to auto restock themselves to get back into PvP faster).
Ok Part 1. Rendering Radar. This is EXTREMELY easy. Krrios was pretty smart in making the SDK and almost everything returns as a Bitmap. SO RADARs. 1. This tutorial was made using Visual C# Express 2005 8.0. ITS FREE, goto microsoft.com and download it FOR FREE. 2. Start a new project and make it a "Windows Application" name it "UsingRadar" 3. View the Code of the form, it looks like this: Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace UsingRadar
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
4. Now we need to include the Ultima.dll, if you dont have it, get it, you DONT need the source for it. Right click Refrences on the Solution Explorer and select Add Refrence. Goto the browse tab and goto your Ultima.dll and add it. It doesnt matter where it is really just add it. 5. Now below Ln 7 where it says "using System.Windows.Forms;" add "using Ultima;" before the "namespace UsingRadar" 6. Ok cool, now we got the Ultima SDK in our project and can play with it. 7. Now go back to your form and add a Button and PictureBox. My form now looks like this. ![]() 8. Double click the button and it lets you enter code for it. 9a. With VC# Express you can usally type a namespace then a . and get a list of functions with there return. Thats how I did most of this. 9b. This part is Important. The maps are stored in 8x8 sqaures. So if your at moonglow position 4439 and 1170, to get your radar position you would divide them by 8. So for the FIRST line of code in the button do this. Code:
Bitmap radarmap = Ultima.Map.Felucca.GetImage(4439/8, 1170/8, 25, 25); Code:
pictureBox1.Image = radarmap; Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Ultima;
namespace UsingRadar
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Bitmap radarmap = Ultima.Map.Felucca.GetImage(4439/8, 1170/8, 25, 25);
pictureBox1.Image = radarmap;
}
}
}
RHYMES lololol |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Dec 2005
Posts: 553
|
thats pretty cool. Hope you can post more tutorials like this
-2x
__________________
"On principle, having read your previous posts, I'm neg-repping you. Yer a frackin' waste of space." Last edited by Twice; 03-14-2006 at 11:22 PM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|