Go Back   RunUO - Ultima Online Emulation > RunUO > Utility Support > Ultima SDK

Ultima SDK Support for the Ultima SDK.

Reply
 
Thread Tools Display Modes
Old 07-04-2008, 09:54 PM   #1 (permalink)
Newbie
 
Join Date: Dec 2005
Posts: 29
Default Player position

is there any way to get the client position in the Map ?
to create a Map tracking


(sorry if i post in wront place)
_Epila_ is offline   Reply With Quote
Old 07-13-2008, 06:58 AM   #2 (permalink)
Lurker
 
Join Date: Dec 2005
Age: 19
Posts: 1
Default

Yep, see method Client.FindLocation
Sairon is offline   Reply With Quote
Old 07-13-2008, 11:56 AM   #3 (permalink)
Master of the Internet
 
Join Date: Mar 2006
Location: Germany
Age: 17
Posts: 14,208
Send a message via AIM to Suil Ban Send a message via MSN to Suil Ban
Default

Please note that since client version 6.0.0.0, OSI has begun using a new compiler and the locations in memory of the X, Y, and Z coordinates has changed. You will either need to use an older client version or update these locations in the SDK.
__________________
the runuo community has lost sight
Suil Ban is offline   Reply With Quote
Old 08-05-2008, 04:39 PM   #4 (permalink)
Newbie
 
Join Date: Mar 2004
Location: Finland
Age: 20
Posts: 33
Default

Sorry for my stupidity, but I don't actually get how that Client.FindLocation() works...?
What variabes should I give for it, or does it just return something...?

Yeah, just begining with this kind of stuff...


Edit:
Okey... After little googleing...
Got how ref variables works, and here's finally my code for character position:
Quote:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Ultima;


namespace UORadar
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Ultima.Client.Calibrate();

int CharX;
int CharY;
int CharZ;
int CharF;
CharX = 0;
CharY = 0;
CharZ = 0;
CharF = 0;
Ultima.Client.FindLocation(ref CharX, ref CharY, ref CharZ, ref CharF);
Bitmap radarmap = Ultima.Map.Felucca.GetImage(CharX / 8, CharY / 8, 100, 100);
pictureBox1.Image = radarmap;
xpos.Text = Convert.ToString(CharX);
ypos.Text = Convert.ToString(CharY);
}

private void button1_Click(object sender, EventArgs e)
{
string viesti = ": " + msg.Text;
Client.SendText(viesti);
}
}
}
Something like that

Last edited by JesuZ; 08-06-2008 at 11:22 AM.
JesuZ is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5