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!

Hunger and Thirst Scripts

Talrol

Wanderer
Hunger and Thirst Scripts

Due to what seems to be a common desire for hunger and/or thirst to mean something on certain shards, I have released the one that I am using on my shard for any to use. Documentation is included within the zip file as well as within the comments of the main script itself (hunger.cs).

I was unable to use the regular script submission page as it appears to not be funtioning properly, so if this needs to be moved to a new place within script submissions please feel free to do so.

* Edited the script based on a bug found by someone else. In the method ThirstDecay in the file FoodDecay.cs the lines that send the thirst message were checking for m.Hunger rather than m.Thirst meaning if your thirst was fine, but your hunger was low you would receive the thirst message as well. This has been corrected.

Thank you,
GM Jubal/Talrol
 

Attachments

  • MyHunger.zip
    9.6 KB · Views: 904

Waverian

Wanderer
Because if you rearrange the letters of his nick, they spell "Psychic" in German.

Or ...

Maybe because it was an exaggeration on the fact that he posted this script just as malgrimace was looking for one.

Not sure. The theory can go either way. Yeh know.
 

Llyrwech

Sorceror
New character initialize as not hungry, but completely parched. Might I suggest adding the following to CharacterCreation.cs:

Code:
			m.Hunger = 20;
			m.Thirst = 20;

Personally, I added it to the AddBackpack routine, since that's always called. There may be more sensical places to put this, but it serves its purpose.

Great script, by the way. Very handy for a RP shard. I just wonder whether or not this suffers from the same problem that the Vampirism script did... are my characters getting hungry on the internal map while I'm not logged in? Time shall tell.

Safe journeys,
Llyrwech
 

Talrol

Wanderer
No they are not unless the actual mobile is physically in the world (such as when you log in an area where your avatar stays for a few minutes.) Once the avatar is out then the decay ceases. Also for those that choose go afk for long periods of time they will not die from not eating, even at 0 hunger (which will slow hp regen down by 3 aka cause you to lose 2 hps per 11 seconds with no bonuses) it will not drop hits below 1. The script was not actually designed to cause any real problems with characters, but to make them have a reason to eat and drink. And yes this script is more for rp shards than anything else.
 

numatra

Wanderer
I like your script, but there were errors galore with them during compile. Can you tell me what to do about the many 'Server.Items' already contains a difinition for 'BeverageType' , IHasQuantity, IWaterSource, BeverageBottle, Jug, CeramicMug, PewterMug, Goblet, GlassMug, Pitcher, BaseBeverage.
 

Tru

Knight
numatra said:
I like your script, but there were errors galore with them during compile. Can you tell me what to do about the many 'Server.Items' already contains a difinition for 'BeverageType' , IHasQuantity, IWaterSource, BeverageBottle, Jug, CeramicMug, PewterMug, Goblet, GlassMug, Pitcher, BaseBeverage.
Did you read the ReadMe.txt that has instructions about replacing files??
You have duplicate files that need to be replaced or updated
 

Talrol

Wanderer
Yes if you use the copies of the scripts I have provided rather than editing the ones you currently use then you must rename or remove the scripts of the same name. I generally leave distro scripts where they are and just append a .bak behind the .cs so that I always have an orginal clean copy of the distros in their original location. But you may either over write (not recommended) or move those scripts to a new location outside of your scripts folder as well.
 

cward

Wanderer
Just noticed something funny. People don't read the instructions, post about errors, then are told to read the instructions. When if they had read the instructions the first time they could have saved themselves a few hours. o.0
 

Llyrwech

Sorceror
Personally, I don't find that funny. I find it just plain sad. ^_~

... and sometimes a little disheartening.

Safe journeys,
Llyrwech
 

crabby654

Wanderer
I added this to my shard and got rid of thirst, so its just hunger, but for some reason i can eat way past the 20 cap, and my vampires can drink blood way past the 20 cap also. Is there a way to make the cap work?
 

numatra

Wanderer
Here's a direct copy+paste from the HungerReadMe included in the package. Tell me exactly where it says what to do about old cs because neither I nor 3 other people see anything but instructions on how to unzip it and warnings about making backups.


HungerReadMe.txt
My Hunger command and making hunger and thirst actually mean something.

Unzip the files to a temporary folder and read the instructions included in hunger.cs. Remember to back up any files that you change. If you are running RunUO RC0 1.0 and none of these files have been modified you may use the copies of what I have included in this archive. If you have customs of these files already then you may use them to reference what you need to change.

There are several ways that what I have done could be done, I found this way to be better for the reason that it is much easier to modify the scripts for your shard with no fear of messing anything up (making it easy for those with little to no scripting knowledge.)

As I do not take a very active part in the RunUO forums please email any bug reports directly to me with as much detail as possible to [email protected].

This source is released to the public, please feel free to redistribute it as you see fit provided that all comments are kept the as they are, and any modifed versions you may come up with include my original comments along with yours.

Any and all feed back is welcome.

Thank you,
GM Jubal
Co-Admin of Ebonspire
www.ebonspire.com
 

Talrol

Wanderer
Unzip the files to a temporary folder and read the instructions included in hunger.cs.

Additional instructions are included in hunger.cs as indicated on the first line of the instructions for installation.
 

Talrol

Wanderer
No Crabby that's not how you fix it :) Sorry, that was in reply to something else...the distro script food.cs has a cap on eating already...I never modified that, so if you can eat past 20 hunger then you've changed something in that script. If you post your food.cs script to the script support forum however, I'm sure that we can help you fix it right up :)
 
Top