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

Blackette

Wanderer
My gawd! Someone has documented and actually . . . : gasp :

COMMENTED THEIR WORK!!!!!

This will be the end of all scripting as we know it in the emu community!!! OH THE HUMANITY!!!!




Talrol, thank you for the scripts!!!! :)
 
This script appears to be exactly what I'm looking for. Looking over it before installing, I am confused by one thing. A quote from your Hunger.cs...

// In ThirstDecay( Mobile m ) add:
// {
// if ( m.Thirst >= 1 )
// {
// m.Thirst -= 1;
// // added to give thirst value a real meaning.
// if ( m.Hunger < 5 )
// m.SendMessage( "You are extremely thirsty." );
// else if ( m.Hunger < 10 )
// m.SendMessage( "You are getting thirsty." );
// }
// else
// {
// if ( m.Stam > 5 )
// m.Stam -= 5;
// m.SendMessage( "You are exhausted from thirst" );

(end quote)

Should this routine be checking m.Thirst for these messages, rather than m.Hunger?
 

Talrol

Wanderer
jeryxian_bard said:
This script appears to be exactly what I'm looking for. Looking over it before installing, I am confused by one thing. A quote from your Hunger.cs...

// In ThirstDecay( Mobile m ) add:
// {
// if ( m.Thirst >= 1 )
// {
// m.Thirst -= 1;
// // added to give thirst value a real meaning.
// if ( m.Hunger < 5 )
// m.SendMessage( "You are extremely thirsty." );
// else if ( m.Hunger < 10 )
// m.SendMessage( "You are getting thirsty." );
// }
// else
// {
// if ( m.Stam > 5 )
// m.Stam -= 5;
// m.SendMessage( "You are exhausted from thirst" );

(end quote)

Should this routine be checking m.Thirst for these messages, rather than m.Hunger?

OMG, I've had this script running on my shard for a long time now and not once has anyone mentioned anything strange with it. Yes, you are correct, and I will modify that in the instructions and upload a corrected version.

Thank you for pointing this out :eek:
 
Happy to be of help, but newbie that I am, I am confused once again. I see that pitchers, mugs, etc. are fillable from the addon water troughs, as they are flagged IWaterSource. I have added the same flag to the addon stone fountains and they work fine now too, but the existing fountains dont. I'm trying to make it so existing stone fountains and water barrels can also be used to refill beverage containers, and have not the first clue where to begin. Are such things even objects I can address with scripts, or statics that must be removed from the muls and replaced with my own addons?

I tried to copy and mod the routine you have for the witches swampwater quest to work for fountain and barrel tiles, but this didnt work and in some cases crashed my shard. Probably something to do with them being item tiles and not land is my best guess, but I am officially stymied here. Can anyone advise?
 

Talrol

Wanderer
You should probably post this in script support along with what you have tried so far. As to what you are trying to do, my guess is that you are correct and what you are trying to do are actually static tiles. There IS a way that you can rescript the containers to accept being filled from static and/or land tiles, however this would take some time to explain. If you look through the script support forum you'll see many posts about using land tiles for things.
 

akrondar

Wanderer
I guess adding some thirst and hungry points in charactercreation.cs i think something like m.thirst or m.hungry = 15; .. :)
 

Talrol

Wanderer
Twlizer said:
When New Players Log in There to Fatgued to move how is this fixed?

Modify your charactercreation.cs script to include thirst = 20; You'll find a line in there somewhere that says hunger = 20; just put it under or over that. You might also want to add a pitcher of water or two to their pack as well.

Sorry I can't give you the exact line number to add that to, because my character creation is far from distro.
 

Kalpon777

Wanderer
Code:
Scripts: Compiling C# scripts...failed (12 errors, 0 warnings)
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 13, column 14) The names
pace 'Server.Items' already contains a definition for 'BeverageType'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 23, column 19) The names
pace 'Server.Items' already contains a definition for 'IHasQuantity'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 28, column 19) The names
pace 'Server.Items' already contains a definition for 'IWaterSource'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 35, column 15) The names
pace 'Server.Items' already contains a definition for 'BeverageBottle'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 112, column 15) The name
space 'Server.Items' already contains a definition for 'Jug'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 151, column 15) The name
space 'Server.Items' already contains a definition for 'CeramicMug'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 197, column 15) The name
space 'Server.Items' already contains a definition for 'PewterMug'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 241, column 15) The name
space 'Server.Items' already contains a definition for 'Goblet'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 287, column 15) The name
space 'Server.Items' already contains a definition for 'GlassMug'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 388, column 15) The name
space 'Server.Items' already contains a definition for 'Pitcher'
 - Error: Scripts\Items\Food\Beverage.cs: CS0101: (line 534, column 24) The name
space 'Server.Items' already contains a definition for 'BaseBeverage'
 - Error: Scripts\Misc\FoodDecay.cs: CS0101: (line 7, column 15) The namespace '
Server.Misc' already contains a definition for 'FoodDecayTimer'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

Any help?
 

Talrol

Wanderer
Appreciate you offering support on my script Twizler. I'll look into the installation docs included in the zip and see if I missed that ;)
 

Hexon

Sorceror
I get this problem when i patch up my server with the Bevrage.cs and i did what the readme told me to do can someone help?



- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 13, column 14) The n
amespace 'Server.Items' already contains a definition for 'BeverageType'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 23, column 19) The n
amespace 'Server.Items' already contains a definition for 'IHasQuantity'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 28, column 19) The n
amespace 'Server.Items' already contains a definition for 'IWaterSource'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 35, column 15) The n
amespace 'Server.Items' already contains a definition for 'BeverageBottle'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 112, column 15) The
namespace 'Server.Items' already contains a definition for 'Jug'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 151, column 15) The
namespace 'Server.Items' already contains a definition for 'CeramicMug'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 197, column 15) The
namespace 'Server.Items' already contains a definition for 'PewterMug'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 241, column 15) The
namespace 'Server.Items' already contains a definition for 'Goblet'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 287, column 15) The
namespace 'Server.Items' already contains a definition for 'GlassMug'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 388, column 15) The
namespace 'Server.Items' already contains a definition for 'Pitcher'
- Error: Scripts\Customs\hunger\Beverage.cs: CS0101: (line 534, column 24) The
namespace 'Server.Items' already contains a definition for 'BaseBeverage'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
H

hudel

Guest
You have two copies of this files in your scripts-folder. Search the originals and deaktivate them. Then it should run.
 
Top