RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Pointing Device

unixfreak

Sorceror
Pointing Device

Updated script, character will now say at what he is pointing.

Hello

I had nothing to do, so I wanted to try out myself at scripting.
This is my first script so if you find any error/glitches feel free to point :)

Tested on RunUO SVN, but I think it should work on any RunUO versions.

Sometimes you need to point at something in game, this is where pointing device comes handy.
Basically what this thing do is when you double click "a Pointing Device" it will allow you to point at something and will place "hand cursor" at desired location.
Device has a default reuse time of 10 seconds (so people wont abuse it) and "hand cursor" will decay after 3 seconds.

Here some screenshots:



Special thanks to David, for his Tutorials here on forums :rolleyes:
 

Attachments

  • point0.png
    point0.png
    101.3 KB · Views: 280
  • PointSystem.cs
    6.5 KB · Views: 62
  • point1.png
    point1.png
    89.4 KB · Views: 185

Pure Insanity

Sorceror
This is a pretty neat idea. I already used the [point command for my shard. But this is easier, plus normal players can use this without me having to mod the point command. Like that you added a way to block them from doing it over and over. Only suggestion I could offer for something like this. Is to have it also display a message where the pointer is place. Maybe make the message say "Points at %" and have it actually fill in the name for the item. The [point command already does this, shouldn't be too hard to work some features form it, into this. But anyways, great work. I'm going to use it for my shard.
 

unixfreak

Sorceror
James420;848199 said:
This is a pretty neat idea. I already used the [point command for my shard. But this is easier, plus normal players can use this without me having to mod the point command. Like that you added a way to block them from doing it over and over. Only suggestion I could offer for something like this. Is to have it also display a message where the pointer is place. Maybe make the message say "Points at %" and have it actually fill in the name for the item. The [point command already does this, shouldn't be too hard to work some features form it, into this. But anyways, great work. I'm going to use it for my shard.

Thanks for tip, I will try to mess with it.
I'm also planning to make second version of it as a rare artifact with charges on it, just some "improved" version of it with a bit sparkles or so :)
 

unixfreak

Sorceror
vs 2010 gives this error
Code:
'Cannot access a non-static member of outer type 'Server.Items.PointDevice' via nested type 'Server.Items.PointDevice.InternalTimer'
althou runuo might compile it, but i haven' tried that one out.
 

Soteric

Knight
Ah.. I see you use it in InternalTimer class. Then you should pass a reference to PointDevice there.
Code:
Timer _it = new InternalTimer(from[color=green], this[/color]);
Code:
[color=green]private PointDevice m_Device;[/color]
public InternalTimer(Mobile from[color=green], PointDevice device[/color])
{
	[color=green]m_Device = device;[/color]
Code:
protected override void OnTick()
{
	[color=green]m_Device.reuseTime = false;[/color]
 

unixfreak

Sorceror
Soteric;848228 said:
Ah.. I see you use it in InternalTimer class. Then you should pass a reference to PointDevice there.
Code:
Timer _it = new InternalTimer(from[color=green], this[/color]);
Code:
[color=green]private PointDevice m_Device;[/color]
public InternalTimer(Mobile from[color=green], PointDevice device[/color])
{
	[color=green]m_Device = device;[/color]
Code:
protected override void OnTick()
{
	[color=green]m_Device.reuseTime = false;[/color]

Thanks, will do like that in next release.
 
Top