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!

(Updated) Bloody Bandage System

koluch

Sorceror
Question:

This is a very nice update. We use the submitted script that came with the Plague Beast Lord ( I can not find the original scripter, but Alari updated that to 1.0.0 )
Until this was posted, I had not noticed this warning:
Code:
Warning: 0x40001DE1: Amount changed for non-stackable item 'Item'. (28)
I know the script you have posted works great and this error is corrected, it just has a few more things than we would like.
I want to be sure that to correct the non stackable item warning is only this section:

Code:
public override Item Dupe( int amount )
		{
			return base.Dupe( new BloodyBandage(), amount );
		}
Yes, I tested this and the warning is gone, I just want to be sure.
Again, well done.
 

Joeku

Lord
All I did to take off the warning was remove the FlipableAttribute at the beginning of the BloodyBandage.cs script (I looked at Bandage.cs and it didn't have a FlipableAttribute, so I figured that the BloodyBandage shouldn't either).
 

Kamron

Knight
Okay after looking at your code, what you need is

(m_Bandage.Amount - 1)/10 + 1
and then compare that to how much bev.Quantity you have. Whichever is the lowest will determine how many bandages actually gets washed.

I hope this helps.
 

Kamron

Knight
What I came up with was
Code:
int consume = Math.Min( bev.Quantity, (Amount - 1) / 10 + 1 ) * 10;
from.AddtoBackpack( new Bandage( Math.Min( consume, m_Bandage.Amount ) );
m_Bandage.Amount -= consume;
if ( m_Bandage.Amount <= 0 )
m_Bandage.Delete();
 

Kamron

Knight
What I wrote can probably be done in a better way, although it does work. I have yet to hear what you think :\
 

Joeku

Lord
XxSP1DERxX said:
What I came up with was
Code:
int consume = Math.Min( bev.Quantity, (Amount - 1) / 10 + 1 ) * 10;
from.AddtoBackpack( new Bandage( Math.Min( consume, m_Bandage.Amount ) );
m_Bandage.Amount -= consume;
if ( m_Bandage.Amount <= 0 )
m_Bandage.Delete();
A day late and a dollar short... :p well what I have is really long but it works fine. Thanks anyways :)

Thistle said:
Very nice system! We just added it to our shard today and I'm sure the players will enjoy having it.
Thanks for the kind words, hope you enjoy it!
 

Kamron

Knight
A day late? You could have checked this thread on 11/24. Saw you post at least 5 times, and that was before Runuo got DDOSed ;). And a dollar short? Sometimes cliche's don't apply ;) Also, its better to use those 5 lines (even though I know I can write it better... then again I am an optimization freak), instead of your 150+ lines.
 

Kamron

Knight
Code:
int consume = Math.Min( bev.Quantity, (Amount - 1) / 10 + 1 ) * 10;
bev.Quantity -= consume / 10;
int bandagecount = Math.Min( consume, m_Bandage.Amount );
from.AddToBackpack( new Bandage( bandagecount ) );
if ( ( m_Bandage.Amount -= bandagecount ) <= 0 )
 m_Bandage.Delete();

I had to revise the code slightly... there was a line missing (I hope no one can notice). Also I wonder if the first two lines can be written better... anyone want to take a shot at it?
 

titan0051

Wanderer
I dont play OSI anymore, and was curious about this system.

What exactly does a bloody bandage do?

Same question for Enhanced Bandages.

Just wondering.. :D
 

Ryan_2005

Wanderer
Thier bandage's that you use and they give u bonus's to your anatomy and healing by [what ever the script is set for] With that it gives you a faster heal and heals more health then the normal bandages...:)
 

Joeku

Lord
1. When you use a bandage, you have a 25% chance to recover a bloody bandage.
2. When you use an enhanced bandage, you have a 50% chance to recover a bloody bandage.
3. You can wash bloody bandages in any water source to convert them to clean bandages again.

1. Enhanced bandages can only be obtained by using the "Magical Fountain." You have to enhance pre-existing bandages.
2. Enhanced bandages weigh 5x as much as normal bandages, but they heal for more and have a higher rate of healing poison.
3. You can tell that a bandage is enhanced because it is golden and has an "Enhanced" label underneath it.

Hope that helps!
 

Kamron

Knight
Once this is finished and completely optimized, I think this will be a great system. I have always loved the idea of bloody bandages actually. Then again, I am an old school person who came from sphere.. maybe thats why ;)
 

Cazruzult

Wanderer
Nice scripts, I'm wondering if you could make another "Alcohol soaked Bandage" it would heal more, and perhaps make a 10% temp resistance against poison for the killing effect of the alcohol? To make you would just pour Liqour over the clean bandage (not wine/cider being too impure?)


Just a thought. :3
 

Joeku

Lord
That's a great idea, I'll look into it more when I get some time. You can expect an update in about a week.
 

Liacs

Sorceror
Hallo Joeku,

hope you don't mind, but I just updated your system to RUNUO 2.0 and wanted to share it.

Have fun!

Lia
 

Attachments

  • BloodyAndEnhancedBandageSystem.rar
    11.4 KB · Views: 44

Angeline

Wanderer
Hello,

For bloody and enhanced bandage I have this error :

errors
CS0115: Line 83: ‘Server.items.Bandage.Dupe(int)’ : aucune méthode appropriée n’a été trouvée pour la substitution

Idem for line 59 and 90 (no suited method was found for the replacement)

I thank you for what you will be able to make to fix it

Angeline.
 

Liacs

Sorceror
you didn't download my new script and are running a 2.0 server, are you?

The ones in Joekus post don't wrk with RUNUO 2.0.

:)

Lia
 
Top