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!

[RunUO 2.0RC1 & 1.0] Tip Command Script

Kaon

Wanderer
[RunUO 2.0RC1 & 1.0] Tip Command Script

Version : 1.1

Description :
Just a little script that allow a GM to notify a player in a "scroll form" of something.

An easy way to notify a player on a Roleplay server, without breaking the game of everybody

Note : the player can answer the GM with a reply button

Usage :
[tip <text> or just [tip

Installation :
Just put the script in your scripts folder

Changelog :
1.0 -> 1.1 :
  • RunUO2.0RC1 & 1.0 compatibility with minor changes
  • For RunUO1.0 : just uncomment the line // #define USE_RUNUO_1
    N.B. : not tested, just compiled...
  • Language support with minor changes (feel free to submit the translation for yours). Currents are French and English
  • Now, if a player get more than one tip "at the same time" (without reading them...), they are all displayed, as a stack of tip scroll in the upper left of the screen (limit of 20 unreaded tips)

Thanks to otimpyre who adapted the script (here) for RunUO2.0 first (I completly forgotted to submit it ^^)
Original post : custom script archives
 

Attachments

  • Tip_1.jpg
    Tip_1.jpg
    15.8 KB · Views: 276
  • Tip_2.jpg
    Tip_2.jpg
    58.2 KB · Views: 332
  • Tip.cs
    11.1 KB · Views: 98

Cheetah2003

Wanderer
I can't get this to compile.

Code:
Error	20	An attribute argument must be a constant expression, typeof expression or array creation expression	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Commands\Tip.cs	81	22	RunUO Core Scripts
Error	21	'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' does not contain a definition for 'Count'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Commands\Tip.cs	227	70	RunUO Core Scripts
Error	22	Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Commands\Tip.cs	229	33	RunUO Core Scripts
Error	23	Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Commands\Tip.cs	230	43	RunUO Core Scripts
 

Asmir3

Sorceror
Ihave the same problem

Cheetah2003;664968 said:
I can't get this to compile.

Code:
Error	20	An attribute argument must be a constant expression, typeof expression or array creation expression	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Commands\Tip.cs	81	22	RunUO Core Scripts
Error	21	'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' does not contain a definition for 'Count'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Commands\Tip.cs	227	70	RunUO Core Scripts
Error	22	Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Commands\Tip.cs	229	33	RunUO Core Scripts
Error	23	Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Commands\Tip.cs	230	43	RunUO Core Scripts
 

Kaon

Wanderer
Are you using RunUO 1.0 or 2.0RC1?

EDIT : I've done a small fix on the english version, I forgot it because it was commented, sorry ;)
For the second problem, System.Collections.Generic.IEnumerable<Server.Gumps.Gump>, I have to get more information of the version of RunUO used...
I compiled it without problem on RunUO2.0RC1, english and french version ...
 

Cheetah2003

Wanderer
Kaon;665150 said:
Are you using RunUO 1.0 or 2.0RC1?

EDIT : I've done a small fix on the english version, I forgot it because it was commented, sorry ;)
For the second problem, System.Collections.Generic.IEnumerable<Server.Gumps.Gump>, I have to get more information of the version of RunUO used...
I compiled it without problem on RunUO2.0RC1, english and french version ...

I'm running with RunUO 2.0 SVN 160.
 

Kaon

Wanderer
SVN 160 isn't an official release, isn't it? :)
Don't know where to find it, and since it's not considered as a stable release (as RC1), the support for this version will be hard :p

What is the type of Mobile.NetState.Gumps property? In RC1 it is List<Gump>, that's why it works... maybe it has changed :/
 

Cheetah2003

Wanderer
Kaon;665255 said:
SVN 160 isn't an official release, isn't it? :)
Don't know where to find it, and since it's not considered as a stable release (as RC1), the support for this version will be hard :p

What is the type of Mobile.NetState.Gumps property? In RC1 it is List<Gump>, that's why it works... maybe it has changed :/

Code:
		public IEnumerable<Gump> Gumps {
			get {
				return m_Gumps;
			}
		}

Full source code of current development branch: Revision 162: /devel

I prefer (as do others) the latest source, as it corrects many problems in RC1. I've never had much issue with it's stability. That is to say, I've never had the core code crash or do something so drastically out of whack to worry about it.

But on another note, I'll probably go about fixing yer code myself. :) Thanks for the submission!
 

Kaon

Wanderer
I'll fix it, this evening. I was about to do it last evening, but I must keep in mind the RunUO 1.0 compatibility ;)
 

Kaon

Wanderer
New version of the script, I guess it is now compatible with SVN 160 and still compatible with RunUO1.0 and 2.0RC1 :)
 
Excellent work man. I've been working something like this into my shard for players to communicate. It'll be nice for staff to be able to use! Thanks again.
 
Top