Xeno

Member
ServUO Version
Publish 57
Ultima Expansion
Time Of Legends
I am trying to learn how to bypass clilocs without making any changes to distro. Lets say I want to change this from:

Original Code:
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061905); // * You eat the orange petal.  You feel more resilient! *

to

Bad code:
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, "Say whatever I want it to say!");  // * You eat the orange petal.  You feel more resilient! *

I get the following error:
CS1503: Line 80: Argument 3: cannot convert from 'string' to 'int'

I think the 0x3B2 is the font and 1061905 is the cliloc. What can I do to skip the cliloc and have it show whatever I would like it to say?

**EDIT**
I got it to work with
Still Bad Code:
from.SendMessage ("What I want it to say")
 
Last edited:
How about this string to int error

Is there an easy way to replace the cliloc info with something custom for buff icons? This is how they are used
C#:
BuffInfo.AddBuff(from, new BuffInfo(BuffIcon.Bless, 1158798, 1158797, TimeSpan.FromMinutes(1.0), from));

and I want to try something like

C#:
BuffInfo.AddBuff(from, new BuffInfo(BuffIcon.Bless, "+20", "to Intel", TimeSpan.FromMinutes(1.0), from));

but I get the error cannot convert from string to int
 
You can use an argument-based cliloc number for the secondary description and provide a custom string format for it via another argument of the BuffInfo constructor.
C#:
BuffInfo.AddBuff(from, new BuffInfo(BuffIcon.Bless, PRIMARY, SECONDARY, TimeSpan.FromMinutes(1.0), from, "CUSTOM DESCRIPTION"));

The SECONDARY should be a cliloc with a value of "~1_NOTHING~" or similar.

Lots of other buffs use the args so there are plenty of references to look at.
 
Thank you, worked great! I used the cliloc for activated for the primary then used the one for ~1_NOTHING~ and added in the "+20 Intelligence" and perfecto. It also show me some fun ways to play with some of these clilocs they have that crack me up.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back