Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 08-04-2006, 03:04 AM   #1 (permalink)
Forum Expert
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 35
Posts: 283
Default Crazy Hue Robe - variable speed Hue changing

The crazy hue robe can change hues so fast you would swear it was animation.
It also can change hues so slow that the mountains change faster.

I made this script to learn about timers.
( Also, i was wanting to see if i could stress the server. )

Edit:
There are now two versions of CrazyHue.
These two versions will exist together in the same server with no difficulties.
The original CrazyHueRobe's description can be found in the black text.

The prupose of the new version is to allow you to easily create CrazyHue versions of all the constructable types available in game.

I have basified the code for CrazyHue into each of the following types and provided example scripts showing how easy it is to make CrazyHue types.
CrazyHueBaseArmor - Examples: CrazyPlateChest, CrazyBoneGloves
CrazyHueBaseClothing - Examples: CrazyOuterTorso, CrazyGildedDress
CrazyHueBaseItem - Examples: CrazyBaseFloor, CrazyStonePaversLight
CrazyHueBaseMobile - Example: CrazyBlackBear
CrazyHueBaseWeapon - Examples: CrazyBaseMeleeWeapon, CrazyBaseSword, CrazyBroadSword

Each example is commented on the changes required to make a CrazyHue version of any constructable available.
I have tried to make this as easy as my current level of c# knowledge allows.
Please let me know if you have any troubles or suggestions at all.

If you modify anything on any script i have ever created, Please, please feel free to share it!

Edit #2:
There are now 3 versions of CrazyHue.
This red text is about the third version- [1.0]CrazyHueBaseTypes.zip
As the name suggests this version is exactly the same as version 2 (blue) except it is for RunUO 1.0

Hope you enjoy!

Doubleclick CrazyHueRobe while wearing it to start the hue changing.

This robe has a gump that is available via context menu to set the item's current hue, start and stop hues, speed, and if it keeps going from the start hue when it reaches the end hue.

For those shard admins that prefer the speed of the hue to be ...eye bending, i have included a bool on the item "AllowsFastSpeed" Set it to true and you have a very, very speedy hue changer on your hands...err body.

I want to thank the people and the shards that beta tested this for me.
I have heard it got passed around a bit....
But guess what... this script is now about 10x bigger and it isn't comments

Err, that is to say that while every line is commented, that isn't what i was meaning by 10x bigger.... sigh, anyways....it was bedtime about 6 hours ago...

Night!

No mods needed
[add CrazyHueRobe

Feedback/Improvements welcome of course!

p.s. I personally like the hue 1184 (non-changing) even stoped there, when you walk it looks like the blue shimmers on the black... really cool effect
Attached Files
File Type: zip CrazyHueRobe.zip (7.5 KB, 528 views)
File Type: zip CrazyHueBaseTypes.zip (45.3 KB, 327 views)
File Type: zip [1.0] CrazyHue BaseTypes.zip (46.2 KB, 234 views)

Last edited by Ashlar; 08-13-2006 at 10:54 AM. Reason: Added new version
Ashlar is offline   Reply With Quote
Old 08-04-2006, 07:12 AM   #2 (permalink)
Forum Newbie
 
Trinexx56's Avatar
 
Join Date: May 2006
Location: Florida
Posts: 22
Send a message via MSN to Trinexx56 Send a message via Yahoo to Trinexx56 Send a message via Skype™ to Trinexx56
Default

Wow, this is actually pretty cool O_O

No problems, seems to hang a little every so hues, but thats probably just my connection leading an alternative lifestyle.



Any plans for a full hue suit?
Trinexx56 is offline   Reply With Quote
Old 08-04-2006, 09:53 AM   #3 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,425
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default

Ugh!
I can't believe you scripted this mess!
What a complete waste of time!
*cough*wishesihadthoughtofitfirst*cough*
Anyone who would download this is crazy!
You should be stripped of your rank and flogged!



But seriously, the great thing about RunUO is the portability and cross-polination of ideas. Case in point. Someone else may see this and say, "Cool, a coat that changes colors!....um....ok." I see this, and say, "Hmmmm....what about a coat that changes with your mood? How about a coat that changes depending on if you are standing, sitting, walking or running? What if we made a coat that would change colors depending on the wearers Fame, Karma, STR, INT or wealth!?!?"

Lokai is offline   Reply With Quote
Old 08-04-2006, 08:26 PM   #4 (permalink)
Forum Expert
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 35
Posts: 283
Default

Trinexx56-
Really glad you like it

I might be wrong, but i believe that the hanging effect you see is actually that the hues.mul has large sections of black in them, and so, while the hue doesn't appear to change, it does....
If you hold your pointer over the robe as it is changing color, i have it set to show the current hue number in the properties.
You should see it changing at whatever speed you have the delay set, even if what it changing through is just black.

As for a full hue suit...
There are a LOT of different wearable tiles and i really don't want to do them all, but i will make a couple example scripts that inherit this and basearmor and baseclothing so you can make whatever you want easily... give me a couple hours though, my wife is wanting me to go with her to the store...

-----------------------------------------------------------------------

Quote:
Originally Posted by Lokai
Ugh!
I can't believe you scripted this mess!
What a complete waste of time!
*cough*wishesihadthoughtofitfirst*cough*
Anyone who would download this is crazy!
You should be stripped of your rank and flogged!

That is one of the best and humorous responses i have ever gotten...
Thanks for making my wife and i laugh It was a good start to the day.

Actually, i didn't think of it first...
A little more than a year ago my wife showed me a script that someone had done...
( I knew who it was at the time, but the script didn't have a header on it so i do not know now who it was... )
The script unfortunately had several largish problems...
It was fast, faster than this one and once it reached the max number it turned black and couldn't be restarted.
Worse, once the server saved and then reloaded it would flash back and forth between black and invis for a while and then disappear, but would still be taking up the layer it was on.

I couldn't do anything with the code in it... ( I did not and still do not understand floats )
So, i started from scratch and scripted it using methods that i did understand, keeping only the original idea.

If the person who wrote the origianl script reads this let me say... Please let me know so i can put your name in the credit header instead of the apology that is there currently and..
I am majorly sorry i don't remember who you are!


I truely agree with what you said about RunUO, Lokai.
I love how much this community has taught me about c# and how it has given me a supportive outlet for creative thoughts and ideas.

I love your ideas for this, I would love to see how the changes based on character movement and actions could be scripted... i am drawing a blank on how to do that atm...
I have heard about several other really cool uses for this code that shards are implimenting

For myself,
This code is forming the basis of my project: Custom Art display and purchase. The idea is that instead of changing the Hue, I change the itemid in a slow enough way that when you doubleclick the item you get a purchase gump for it
Ashlar is offline   Reply With Quote
Old 08-04-2006, 09:09 PM   #5 (permalink)
Forum Novice
 
Join Date: Jun 2006
Location: Lakw Worth, Fla
Age: 47
Posts: 199
Send a message via ICQ to Hanse the Insane
Default

I think this is rather a neat idea, it does teach those of us that are learning.
__________________
45 and retired, Life is good, mostly :D
Hanse the Insane is offline   Reply With Quote
Old 08-05-2006, 02:52 AM   #6 (permalink)
Forum Newbie
 
Trinexx56's Avatar
 
Join Date: May 2006
Location: Florida
Posts: 22
Send a message via MSN to Trinexx56 Send a message via Yahoo to Trinexx56 Send a message via Skype™ to Trinexx56
Default

Quote:
Originally Posted by Ashlar
Trinexx56-
Really glad you like it

I might be wrong, but i believe that the hanging effect you see is actually that the hues.mul has large sections of black in them, and so, while the hue doesn't appear to change, it does....

Nah, that wasn't it. My connection has a very bad habit of flickering on and off whenever it rains in a 50 mile radius -_-
Trinexx56 is offline   Reply With Quote
Old 08-05-2006, 02:56 AM   #7 (permalink)
Forum Newbie
 
Join Date: May 2005
Age: 19
Posts: 11
Default

lol im playing with it now, i have it set to .01 second delay, its crazy..

I love this script xD

set hue min to 1060 and max to 1100, it looks AWESOME lol

what would I modify to change it from a robe to a shroud?

Last edited by Deathbringer-hybrid; 08-05-2006 at 03:34 AM.
Deathbringer-hybrid is offline   Reply With Quote
Old 08-05-2006, 05:59 AM   #8 (permalink)
Forum Expert
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 35
Posts: 283
Default

I am planning on releasing in this thread a couple addons that will allow you to use this for multiple clothing or armor pieces easily a bit later tonight...

If you are just wanting to change the one that you have in game; just add a shroud and get the itemid from it in-game with props and then set it on the crazyrobe.

If you are wanting to do it in the script, just take that itemid and change the itemid to it in the script ( 0x1F03 is the robe...I don't remember the shroud ItemId atm)
public CrazyHueRobe() : base( 0x1F03 )



P.s. You are still going slow at 0.1 sec delay ..... 0.0000000000001 or 0 works too...
Ashlar is offline   Reply With Quote
Old 08-05-2006, 12:07 PM   #9 (permalink)
Forum Newbie
 
Trinexx56's Avatar
 
Join Date: May 2006
Location: Florida
Posts: 22
Send a message via MSN to Trinexx56 Send a message via Yahoo to Trinexx56 Send a message via Skype™ to Trinexx56
Default

I have mine on 0.001, would go lower but my CPU is lacking in power
Trinexx56 is offline   Reply With Quote
Old 08-05-2006, 02:22 PM   #10 (permalink)
Forum Novice
 
Midnightdragon's Avatar
 
Join Date: Jun 2006
Age: 29
Posts: 615
Default

Havent gotten to try this yet but the old version had a bug. It would stop changing hues after a server reboot has this one been fixed or does this still die after the server is restarted?
Midnightdragon is offline   Reply With Quote
Old 08-05-2006, 02:25 PM   #11 (permalink)
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 41
Posts: 1,425
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default

Midnight, read post #4, hehe. I think Ashlar answered your question...
Lokai is offline   Reply With Quote
Old 08-05-2006, 03:01 PM   #12 (permalink)
Forum Expert
 
Join Date: Dec 2005
Posts: 310
Default hey

Probly a stuped question but any chance you could make a GMrobe with the same power?
PhoenixDIE is offline   Reply With Quote
Old 08-06-2006, 02:47 AM   #13 (permalink)
Forum Newbie
 
Trinexx56's Avatar
 
Join Date: May 2006
Location: Florida
Posts: 22
Send a message via MSN to Trinexx56 Send a message via Yahoo to Trinexx56 Send a message via Skype™ to Trinexx56
Default

yeah, use "[set itemid 8271" on the robe. Change the layer locations along with the item id, and you can make a full suit like that. Colors won't be synched, but still looks good.
Trinexx56 is offline   Reply With Quote
Old 08-06-2006, 03:36 AM   #14 (permalink)
Forum Expert
 
BeneathTheStars's Avatar
 
Join Date: Jul 2005
Location: (South)Tip o' Texas
Posts: 1,294
Send a message via AIM to BeneathTheStars Send a message via MSN to BeneathTheStars
Default

I like how you commented everything, great for learning!
BeneathTheStars is offline   Reply With Quote
Old 08-06-2006, 04:26 AM   #15 (permalink)
Forum Newbie
 
Join Date: May 2006
Posts: 30
Default

haha, wow this is a great script! try turning the robes into different articles of clothing and set their layers for the right spots and set em all running and you really get eyebending lol.

Thanks for the script i love it!
__________________
Shard Owner = World Of Wizardlord Shard

"In view of the fact that God limited the intelligence of man, it seems unfair that he did not also limit his stupidity." -- Konrad Adenauer
imthewizardlord is offline   Reply With Quote
Old 08-06-2006, 01:56 PM   #16 (permalink)
Forum Novice
 
Midnightdragon's Avatar
 
Join Date: Jun 2006
Age: 29
Posts: 615
Default

Quote:
Originally Posted by Lokai
Midnight, read post #4, hehe. I think Ashlar answered your question...
Nah you probably havent used an older version of this from back in the day or else you would understand what I was saying.

What happened in previous versions I have seen is that it wrks great some times hangs as mentioned due to the hue file but when the server is restarted it will stop changing hues forever. For some reason it just wont start changing hues again on its own once the server is rebooted. I believe it may have been a serialization error or maybe needed a bit more code to tall it once the server restarted that it should begin switching hues but it simply stopped working.

This is why I asked does this one do the same. If so oh well if not it would be excellent though.
Midnightdragon is offline   Reply With Quote
Old 08-06-2006, 04:20 PM   #17 (permalink)
Forum Expert
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 35
Posts: 283
Default

I promise you Midnightdragon, the problems that existed with that script are completely fixed

The only thing that i know of that remains is that I want to add support for BaseClothing, BaseArmor, BaseWeapon, and all Item s.

You can currently change the robe to anything in-game and it will work... as long as you wear it to start it and then change it.

I am working it around to where you can make any of the types have the crazyhue effect but not need all the code that is in CrazyHueRobe on each item.

I have the scripts all together, but i am still debuging them and working out some odd effects on a couple things.

It turned out to be a bigger job than i thought to get this and the ReminderTimer all set up.
Daat was kind enough to point out some improvements with the ReminderTimer, but i am going to wait until i finish the crazy stuff here before reminding myself of the timer there
Ashlar is offline   Reply With Quote
Old 08-07-2006, 03:09 PM   #18 (permalink)
Forum Novice
 
Cyndrz's Avatar
 
Join Date: Aug 2003
Location: Malas
Age: 41
Posts: 242
Default

I dont use 2.0 and have yet to learn how to change something from 2.0 to 1.0 but after reading the comments I knew I had to have a copy of this to help me to better understand scripting and to learn from so I say thank you for this wonderful work you have taken the time to put together.
__________________
Save the flames for your own personal life
Cyndrz is offline   Reply With Quote
Old 08-09-2006, 05:46 PM   #19 (permalink)
Forum Expert
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 35
Posts: 283
Default

This is to let everyone know that i have updated this script into a second version that adds the ability to add CrazyHue function to any constructable type available in-script and examples showing how easy it is to do so.

I hope it was worth the wait for you all!

Cyndrz-
I am not positive, but the only things in these scripts that are not RunUO 1.0 compatable is the HasGump bool and the List<ContextMenuEntry> list thing.
.
Since i originally started this before 2.0 came out... I am pretty sure that you can convert it backwards to 1.0 quite easily.
If you try and have difficulty, please feel free to let me know as i would be happy to help.

Last edited by Ashlar; 08-09-2006 at 06:19 PM.
Ashlar is offline   Reply With Quote
Old 08-09-2006, 05:52 PM   #20 (permalink)
Forum Expert
 
Join Date: Feb 2006
Posts: 277
Send a message via ICQ to Tee312 Send a message via MSN to Tee312 Send a message via Yahoo to Tee312
Default

wow sounds awesome ashlar, imagine hiding and doing that to a players robe P theyll be like "wtf?!"
Tee312 is offline   Reply With Quote
Old 08-09-2006, 06:03 PM   #21 (permalink)
Forum Expert
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 35
Posts: 283
Default

err, well, that isn't possible right now....
This is more to make it much easier to script a CrazyHue item, mobile, armor, weapon, or clothing.

As far as i know, the way to be able to suprise a player like you are saying is either to:
Add the CrazyHueItem.cs to the core and have Item.cs inherit it,
or
to create a staff command to 'copy' the properties and flags of the item that the player is currently wearing onto a CrazyHue item and then replace the players item with the crazy one.

Sorry i wasn't more clear!
I have put pretty detailed info on what this is in an edit on the original submission post... Hope this clears it up..

Really good idea though!
Might have to work on that if no-one beats me to it
Ashlar is offline   Reply With Quote
Old 08-09-2006, 06:07 PM   #22 (permalink)
Forum Expert
 
Join Date: Feb 2006
Posts: 277
Send a message via ICQ to Tee312 Send a message via MSN to Tee312 Send a message via Yahoo to Tee312
Default

hehe well glad i gave an idea! :P would be funny to see their reactions hehe
Tee312 is offline   Reply With Quote
Old 08-09-2006, 06:17 PM   #23 (permalink)
Forum Expert
 
Join Date: Nov 2004
Location: Southeast Missouri USA
Age: 35
Posts: 283
Default

hrmmmm.....

Why is it that i am starting to feel like my todo list is never going to get smaller....

I thought i had the reminder timer done, then Daat offered suggestions that are too good to possibly avoid attempting and David suggests something so fundimental that it MUST be implimented.....

Then, just when i thought i finished CrazyHue for the second time...

*starts wondering if this is why most people seem to only work on one or two things at a time...*

Ashlar is offline   Reply With Quote
Old 08-09-2006, 06:36 PM   #24 (permalink)
Forum Expert
 
Join Date: Feb 2006
Posts: 277
Send a message via ICQ to Tee312 Send a message via MSN to Tee312 Send a message via Yahoo to Tee312
Default

haha that mountain climbing will never make it to the real world :P
Tee312 is offline   Reply With Quote
Old 08-09-2006, 06:45 PM   #25 (permalink)