Page 1 of 1

Two quick questions while I'm at work. (gumps)

Posted: Fri Feb 16, 2007 1:25 am
by stranf
Probably a dumb question, but I'm braindumping at a down-time at work and thought the forums are rather quiet anyway.

Gumps....are they hard to edit in JS or rather simple? Is it difficult to make them interactive?

I was looking at some gumps that are buried in the client...WOW there are some cool stuff in there that I had no idea UO ever uses at all.

They have some sort of shrine vision for each virtue on a gump screen,

as well as an image of the Codex of Ultimate Wisdom.

These would be cool things to script, however I am unsure if it is even worth my time. I know some gumps are available for me to examine in JS (but I don't have any on this computer),

I was just wondering what you UOx3 people think, are they easy to implement?



2. Skill code. Since cartography isn't implementing I was thinking of running a cartogrophy skill check when using a sextant. That would give the cartography skill some usability on my shard. I figure it would be easy to edit the existing sextant.js (if it isn't hardcoded, if it is, could we get it exported?), and have it run a conditional statement based on your skill.

Code: Select all

say  if (RandomNumber 100 + cartography) > 60 then callFunction 'where 
or whatever it does (the sextant seems to be slightly different than the 'where command, but that is easy enough to check in .js.

The biggest question is, do I have to code the skill increase in sextant.js? How do I make sure the skill check is called properly allowing my PCs to gain in cartography through practice with the sextant?

Posted: Fri Feb 16, 2007 4:52 am
by Xuri
1) Gumps can be easy, and gumps can be hard. It all depends on how complex you make them. Incidentally, there's a decent 3rd party tool available for gump-creation: GumpStudio 1.7. Also make sure to download xir's UOX3 plugin (save to Plugins folder), which allows you to save the gumps you create as javascripts. Using GumpStudio you should be able to make some pretty whacky gumps in no time ;)

2) A simple pUser.CheckSkill( 12, minskill, maxskill); will automatically do the skillchecks & calculate skillgains for you. I just tested on my own shard using a player character, and he did indeed gain cartography skill when the skillcheck was performed.

Posted: Thu Apr 05, 2007 3:12 pm
by stranf
Finally! (I'm a bit late) I downloaded and installed the GumpStudio as well as the UOx3 plugin. The types of gumps I'm looking to create are very easy to do indeed.


However, how do you set the "hue" of a particular gump piece? GumpStudio allows you to change the hue in the program but does not save this information to .js. Either it is impossible to do in the client (which I'm not quite sure if this is true since GumpStudio allows me to play with this value), or it is impossible with our current .js commands.

What I am looking for is something like this:

Current:

Code: Select all

myGump.AddGump( 136, 103, 102 );

// adds gump at x, y, gump id
with an option like this:

Code: Select all

myGump.AddGump( 136, 103, 102, 0x15fc );

//add gump at x,y, gump id, with hue hex #