Go Back   RunUO - Ultima Online Emulation > RunUO > General Discussion

General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT!

Reply
 
Thread Tools Display Modes
Old 12-21-2003, 03:35 AM   #1 (permalink)
 
Join Date: Nov 2002
Posts: 636
Default Pub 21- Healing Algorithm

[code:1]The amount of damage restored when using bandage-healing has been lowered. (ex. If you have 100 Healing and 100 Anatomy, and your fingers have not slipped, then you can expect to heal about 31-49 damage).
[/code:1]

Does anyone know exact healing algorithm on OSI currently? What i could think of is something simple:
[code:1]
RandomMinMax((Healing/4+Anatomy/15),(Healing/3+Anatomy/6))
[/code:1]

Has anyone tested the amount of healed damage on different Healing/Anat skills?

Also any information about delay times would be great. (6 seconds at 100 dex)
Ceday is offline   Reply With Quote
Old 12-21-2003, 04:24 AM   #2 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

If you provided two different statistics for healing, then a linear algorithm (or formula) could be used.

For example how much to expect a 50, 50, or 100, 50, or 50, 100 skill amounts respectively.

On the note of algorithms.. anyone know how self repair works?
XxSP1DERxX is offline   Reply With Quote
Old 12-21-2003, 05:01 AM   #3 (permalink)
 
Join Date: Nov 2002
Posts: 636
Default

Knowing a few numbers doesnt help much. Its a range and it has to be tested a lot to find a min and max number.

If someone has a chance to test it with 50 healing & 50 anat, that would be really helpfull. (Someone who has any empty slot)
Ceday is offline   Reply With Quote
Old 12-22-2003, 05:40 PM   #4 (permalink)
Lurker
 
Join Date: Oct 2002
Posts: 20
Default Results...

I tested healing with 50 healing and 50 anatomy. I used 53 bandages in the process. I might update soon with more numbers if I have time. These numbers are the amount of damage healed. Would a list (26,22,25,...) be more useful or preferable?
26
22
25
32
25
24
21
21
28
31
21
23
23
28
28
22
21
28
34
22
29
24
31
23
31
27
32
23
28
elbaron is offline   Reply With Quote
Old 12-23-2003, 05:49 AM   #5 (permalink)
 
Join Date: Nov 2002
Posts: 636
Default

hmz, those numbers are a little higher than i expected..but thx anyway..
Ceday is offline   Reply With Quote
Old 12-23-2003, 04:14 PM   #6 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

21-34

I would do one more test run if its not too much trouble. Also remember that food could be a factor (and it could not.. I dont know).
XxSP1DERxX is offline   Reply With Quote
Old 12-25-2003, 07:53 PM   #7 (permalink)
Forum Expert
 
IHaveRegistered's Avatar
 
Join Date: Jun 2003
Location: Ontario
Age: 20
Posts: 4,522
Send a message via MSN to IHaveRegistered
Default Healing!

Let's all hope this answers your nice question! :D
http://uo.stratics.com/content/skills/healing.shtml
As i quote from the website (So you don't have to go there)
Minimum amount healed = Anatomy/5 + Healing/5 + 3
Maximum amount healed = Anatomy/5 + Healing/2 + 10

A minimum level of 60 for both Anatomy and Healing will give a chance of 80% to cure someone who is poisoned.
A minimum level of 80 for both Anatomy and Healing will give a chance of 25% to resurrect a ghost.
Healing others has a 5 second delay. Healing yourself has a 9 to 16 second delay, depending on your dexterity.
Curing others has a 6 second delay. Curing yourself has a 9 to 15 second delay, depending on your dexterity.
The formula to calculate healing delay is:
delay in seconds = 9.4 + (0.6 * ((120 - dex) / 10))
Resurrecting others has a 10 second delay. It is not possible to resurrect yourself.
The healer has to stay close to the person he is healing.
If the healer is interrupted during the healing process then the amount of damage healed will decrease.
Healing someone can only result in gaining karma, never a loss of karma.
__________________
IHaveRegistered is offline   Reply With Quote
Old 12-26-2003, 01:55 AM   #8 (permalink)
 
Join Date: Nov 2002
Posts: 636
Default

uo.stratics is out of date.
those numbers are for the old healing algorithm, its changed with Pub21..
Ceday is offline   Reply With Quote
Old 12-26-2003, 09:55 AM   #9 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
Default

Ceday is correct: That's the old system. It shows 80 damage healed at 100 Anat and 100 Healing.

Here's the section about healing from the Pub 21 Release Info(http://update.uo.com/design_482.html):
Quote:
The amount of damage restored when using bandage-healing has been lowered. (Ex. If you have 100 Healing and 100 Anatomy, and your fingers have not slipped, then you can expect to heal about 36-60 damage).
Increased the distance allowed between the person healing with bandages and the person being healed from 1 tile to 2 tiles.
It is now more difficult to interrupt bandage-healing—your fingers will not slip if you take less then 26 damage while bandaging. However, if interruption & slipping does occur, the amount healed will be reduced by about 35%.
Now I HAVE noticed that on RunUO, even if you're hit for 2 damage, you get the message "Your fingers have slipped"...
__________________
psz
Demise' Creator (Retired)
The RunUO.com Forum Moderator Team
Former Official RunUO Scripter (Retired)
Websites:
My 360 Blog
My Gaming Site(Old Link)
My Gaming Site(New Link)
psz is offline   Reply With Quote
Old 12-26-2003, 01:12 PM   #10 (permalink)
 
Join Date: Nov 2002
Posts: 636
Default

i have changed necessary things for the update a few days ago. it is woking just fine. here is what you need to do:

in Bandage.cs

for Bandage Class:

find the line:
[code:1]
if ( from.InRange( GetWorldLocation(), 1 ) )
[/code:1]
change to:
[code:1]
if ( from.InRange( GetWorldLocation(), 2 ) )
[/code:1]

--------------------
find the line:
[code:1]
if ( from.InRange( m_Bandage.GetWorldLocation(), 1 ) )
[/code:1]
change to:
[code:1]
if ( from.InRange( m_Bandage.GetWorldLocation(), 2 ) )
[/code:1]

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

for BandageContext Class:
add a variable:
[code:1]
private bool m_HalfHeal;
public bool HalfHeal { get{ return m_HalfHeal;} set{ m_HalfHeal = value;}}
[/code:1]

find the method and change it to:
[code:1]
public void Slip()
{
m_Healer.SendLocalizedMessage( 500961 ); // Your fingers slip!
++m_Slips;
m_HalfHeal=true;
}
[/code:1]

Find the method EndHeal():
There is a part about how much it should heal, you should find there and change to:
[code:1]
if ( chance > Utility.RandomDouble() )
{
healerNumber = 500969; // You finish applying the bandages.
double toHeal;
if ( m_Patient.Body.IsMonster || m_Patient.Body.IsAnimal )
{
double min = (anatomy / 5.0) + (healing / 5.0) + 3.0;
double max = (anatomy / 5.0) + (healing / 2.0) + 10.0;
toHeal = min + (Utility.RandomDouble() * (max - min));
toHeal += m_Patient.HitsMax / 100;
toHeal -= m_Slips * 4;
}
else
{
toHeal=Utility.RandomMinMax((int)(healing/4+anatomy/15),(int)(healing/3+anatomy/6)); //you can change this if you want..
if (m_HalfHeal)
toHeal /= 2;
}
if ( toHeal < 1 )
toHeal = 1;
m_Patient.Heal( (int) toHeal );
}
else
{
healerNumber = 500968; // You apply the bandages, but they barely help.
playSound = false;
}

[/code:1]



find the method:
public static BandageContext BeginHeal( Mobile healer, Mobile patient )

find and change to:
[code:1]
if ( onSelf )
{
//seconds = 9.4 + (0.6 * ((double)(120 - dex) / 10)); Old one
seconds= 12 - ( dex*0.06 );//i am using this one for the moment..
}
[/code:1]




In PlayerMobile.cs

find and change to:
[code:1]
public override void OnDamage( int amount, Mobile from, bool willKill )
{
if ( amount >= 20 )
{
BandageContext c = BandageContext.GetContext( this );
if ( c != null )
c.Slip();
}
else if ( amount > 0)
{
BandageContext bc= BandageContext.GetContext ( this );
if (bc != null && (bc.Patient.Body.IsAnimal || c.Patient.Body.IsMonster))
bc.Slip();
}

WeightOverloading.FatigueOnDamage( this, amount );
base.OnDamage( amount, from, willKill );
}
[/code:1]


If you follow the instructions exactly, everything will be fine..
Good luck :)
Ceday is offline   Reply With Quote
Old 12-26-2003, 01:45 PM   #11 (permalink)
 
Join Date: Nov 2002
Posts: 636
Default

Hmzz, i have updated scripts according to the information here:
http://www.runuo.com/forum/viewtopic.php?t=24799

psz, do you know which one is latest?

Maybe, the numbers elbaron wrote are higher because of the "update"..
Ceday is offline   Reply With Quote
Old 12-26-2003, 01:46 PM   #12 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
Default

I was going off of the pub release on uo.com... The one with blue "updated" text and all... Same one that's on stratics.
__________________
psz
Demise' Creator (Retired)
The RunUO.com Forum Moderator Team
Former Official RunUO Scripter (Retired)
Websites:
My 360 Blog
My Gaming Site(Old Link)
My Gaming Site(New Link)
psz is offline   Reply With Quote
Old 12-27-2003, 07:50 PM   #13 (permalink)
 
Join Date: Dec 2003
Posts: 12
Default

This proposed formulae is healing from 15 to 25 at 50 anatomy and 50 healing and from 31 to 50 at 100 anatomy 100 healing...

It is much below what has been implemented with Pub 21.

The Healing change needs also all the other modifications as well:
1. dex significantly affecting bandaging speed;
2. only 35% reduction on healing after fingers slipping
3. no interrupt on healing if you take less than 26 dmg
4. increased range on healing

Publish 21 Changes to Healing:
Quote:
Decreased the amount of time it takes to heal yourself with bandages—between 5 – 10 seconds, based upon the character’s Dexterity.
The amount of damage restored when using bandage-healing has been lowered. (Ex. If you have 100 Healing and 100 Anatomy, and your fingers have not slipped, then you can expect to heal about 36-60 damage).
Increased the distance allowed between the person healing with bandages and the person being healed from 1 tile to 2 tiles.
It is now more difficult to interrupt bandage-healing—your fingers will not slip if you take less then 26 damage while bandaging. However, if interruption & slipping does occur, the amount healed will be reduced by about 35%.
You can read the entire update here: http://update.uo.com/design_482.html

It seems the ammount the formula above is healing doesn't match either the real in-game implementation nor it matches what has been told by the Publish 21 changes.

I would advise against implementing only the reduction on bandage-healing without countering it with the other changes. By doing so, you would get with a healing system that isn't what it was and that isn't the new system.
RFaul is offline   Reply With Quote
Old 12-28-2003, 01:35 AM   #14 (permalink)
 
Join Date: Nov 2002
Posts: 636
Default

Well, if you look the code above, you can see it includes all the changes..

The only thing you should do is updating code..( a few numbers)
Ceday is offline   Reply With Quote
Old 03-27-2004, 08:05 PM   #15 (permalink)
Forum Novice
 
nerun's Avatar
 
Join Date: Jun 2003
Location: Brazil
Age: 29
Posts: 800
Default Good job

Good job Ceday!

Somethings you wrote are wrong, there is some html code inside C# code, lke < or &, and in PlayerMobile, you wrote in some part just "c" instead of "bc", but i correct it and change the bandage.cs. All the people need to do is download it from here. And, course, change PlayerMobile.cs.

Code:
// new OSI bandage system
using System;
using System.Collections;
using Server;
using Server.Mobiles;
using Server.Items;
using Server.Network;
using Server.Targeting;
using Server.Gumps;

namespace Server.Items
{
	public class Bandage : Item, IDyable
	{
		[Constructable]
		public Bandage() : this( 1 )
		{
		}

		[Constructable]
		public Bandage( int amount ) : base( 0xE21 )
		{
			Stackable = true;
			Weight = 0.1;
			Amount = amount;
		}

		public Bandage( Serial serial ) : base( serial )
		{
		}

		public bool Dye( Mobile from, DyeTub sender )
		{
			if ( Deleted )
				return false;

			Hue = sender.DyedHue;

			return true;
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}

		public override void OnDoubleClick( Mobile from )
		{
// ----- changed tiles from 1 to 2
			if ( from.InRange( GetWorldLocation(), 2 ) )
			{
				from.RevealingAction();

				from.SendLocalizedMessage( 500948 ); // Who will you use the bandages on?

				from.Target = new InternalTarget( this );
			}
			else
			{
				from.SendLocalizedMessage( 500295 ); // You are too far away to do that.
			}
		}

		public override Item Dupe( int amount )
		{
			return base.Dupe( new Bandage(), amount );
		}

		private class InternalTarget : Target
		{
			private Bandage m_Bandage;

			public InternalTarget( Bandage bandage ) : base( 1, false, TargetFlags.Beneficial )
			{
				m_Bandage = bandage;
			}

			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( m_Bandage.Deleted )
					return;

				if ( targeted is Mobile )
				{
// ----- changed tiles from 1 to 2
					if ( from.InRange( m_Bandage.GetWorldLocation(), 2 ) )
					{
						if ( BandageContext.BeginHeal( from, (Mobile)targeted ) != null )
							m_Bandage.Consume();
					}
					else
					{
						from.SendLocalizedMessage( 500295 ); // You are too far away to do that.
					}
				}
				else
				{
					from.SendLocalizedMessage( 500970 ); // Bandages can not be used on that.
				}
			}
		}
	}

	public class BandageContext
	{
		private Mobile m_Healer;
		private Mobile m_Patient;
		private int m_Slips;
		private Timer m_Timer;

// ----- OSI bandage system -----
		private bool m_HalfHeal;
		public bool HalfHeal { get{ return m_HalfHeal;} set{ m_HalfHeal = value;}}
// ----- End OSI bandage system -

		public Mobile Healer{ get{ return m_Healer; } }
		public Mobile Patient{ get{ return m_Patient; } }
		public int Slips{ get{ return m_Slips; } set{ m_Slips = value; } }
		public Timer Timer{ get{ return m_Timer; } }

// ----- OSI bandage system -----
		public void Slip()
		{
			m_Healer.SendLocalizedMessage( 500961 ); // Your fingers slip!
			++m_Slips;
			m_HalfHeal=true;
		}
/*
		public void Slip()
		{
			m_Healer.SendLocalizedMessage( 500961 ); // Your fingers slip!
			++m_Slips;
		}
*/
// ----- End OSI bandage system -

		public BandageContext( Mobile healer, Mobile patient, TimeSpan delay )
		{
			m_Healer = healer;
			m_Patient = patient;

			m_Timer = new InternalTimer( this, delay );
			m_Timer.Start();
		}

		public void StopHeal()
		{
			m_Table.Remove( m_Healer );

			if ( m_Timer != null )
				m_Timer.Stop();

			m_Timer = null;
		}

		private static Hashtable m_Table = new Hashtable();

		public static BandageContext GetContext( Mobile healer )
		{
			return (BandageContext)m_Table[healer];
		}

		public static SkillName GetPrimarySkill( Mobile m )
		{
			if ( m.Body.IsMonster || m.Body.IsAnimal )
				return SkillName.Veterinary;
			else
				return SkillName.Healing;
		}

		public static SkillName GetSecondarySkill( Mobile m )
		{
			if ( m.Body.IsMonster || m.Body.IsAnimal )
				return SkillName.AnimalLore;
			else
				return SkillName.Anatomy;
		}

		public void EndHeal()
		{
			StopHeal();

			int healerNumber = -1, patientNumber = -1;
			bool playSound = true;
			bool checkSkills = false;

			SkillName primarySkill = GetPrimarySkill( m_Patient );
			SkillName secondarySkill = GetSecondarySkill( m_Patient );

			BaseCreature petPatient = m_Patient as BaseCreature;

			if ( !m_Healer.Alive )
			{
				healerNumber = 500962; // You were unable to finish your work before you died.
				patientNumber = -1;
				playSound = false;
			}
			else if ( !m_Healer.InRange( m_Patient, 1 ) )
			{
				healerNumber = 500963; // You did not stay close enough to heal your target.
				patientNumber = -1;
				playSound = false;
			}
			else if ( !m_Patient.Alive || (petPatient != null && petPatient.IsDeadPet) )
			{
				double healing = m_Healer.Skills[primarySkill].Value;
				double anatomy = m_Healer.Skills[secondarySkill].Value;
				double chance = ((healing - 68.0) / 50.0) - (m_Slips * 0.02);

				checkSkills = true;

				if ( healing >= 80.0 && anatomy >= 80.0 && chance > Utility.RandomDouble() )
				{
					if ( m_Patient.Map == null || !m_Patient.Map.CanFit( m_Patient.Location, 16, false, false ) )
					{
						healerNumber = 501042; // Target can not be resurrected at that location.
						patientNumber = 502391; // Thou can not be resurrected there!
					}
					else
					{
						healerNumber = 500965; // You are able to resurrect your patient.
						patientNumber = -1;

						m_Patient.PlaySound( 0x214 );
						m_Patient.FixedEffect( 0x376A, 10, 16 );

						if ( petPatient != null && petPatient.IsDeadPet )
						{
							Mobile master = petPatient.ControlMaster;

							if ( master != null && master.InRange( petPatient, 3 ) )
							{
								healerNumber = 503255; // You are able to resurrect the creature.
								master.SendGump( new PetResurrectGump( m_Healer, petPatient ) );
							}
							else
							{
								healerNumber = 1049670; // The pet's owner must be nearby to attempt resurrection.
							}
						}
						else
						{
							m_Patient.SendGump( new ResurrectGump( m_Patient, m_Healer ) );
						}
					}
				}
				else
				{
					if ( petPatient != null && petPatient.IsDeadPet )
						healerNumber = 503256; // You fail to resurrect the creature.
					else
						healerNumber = 500966; // You are unable to resurrect your patient.

					patientNumber = -1;
				}
			}
			else if ( m_Patient.Poisoned )
			{
				m_Healer.SendLocalizedMessage( 500969 ); // You finish applying the bandages.

				double healing = m_Healer.Skills[primarySkill].Value;
				double anatomy = m_Healer.Skills[secondarySkill].Value;
				double chance = ((healing - 30.0) / 50.0) - (m_Patient.Poison.Level * 0.1) - (m_Slips * 0.02);

				checkSkills = true;

				if ( healing >= 60.0 && anatomy >= 60.0 && chance > Utility.RandomDouble() )
				{
					if ( m_Patient.CurePoison( m_Healer ) )
					{
						healerNumber = (m_Healer == m_Patient) ? -1 : 1010058; // You have cured the target of all poisons.
						patientNumber = 1010059; // You have been cured of all poisons.
					}
					else
					{
						healerNumber = -1;
						patientNumber = -1;
					}
				}
				else
				{
					healerNumber = 1010060; // You have failed to cure your target!
					patientNumber = -1;
				}
			}
			else if ( BleedAttack.IsBleeding( m_Patient ) )
			{
				healerNumber = -1;
				patientNumber = 1060167; // The bleeding wounds have healed, you are no longer bleeding!

				BleedAttack.EndBleed( m_Patient, true );
			}
			else if ( MortalStrike.IsWounded( m_Patient ) )
			{
				healerNumber = ( m_Healer == m_Patient ? 1005000 : 1010398 );
				patientNumber = -1;
				playSound = false;
			}
			else if ( m_Patient.Hits == m_Patient.HitsMax )
			{
				healerNumber = 500967; // You heal what little damage your patient had.
				patientNumber = -1;
			}
			else
			{
				checkSkills = true;
				patientNumber = -1;

				double healing = m_Healer.Skills[primarySkill].Value;
				double anatomy = m_Healer.Skills[secondarySkill].Value;
				double chance = ((healing + 10.0) / 100.0) - (m_Slips * 0.02);

// ----- OSI bandage system -----
				if ( chance > Utility.RandomDouble() )
				{
					healerNumber = 500969; // You finish applying the bandages.
					double toHeal;

					if ( m_Patient.Body.IsMonster || m_Patient.Body.IsAnimal )
					{
						double min = (anatomy / 5.0) + (healing / 5.0) + 3.0;
						double max = (anatomy / 5.0) + (healing / 2.0) + 10.0;
						toHeal = min + (Utility.RandomDouble() * (max - min));
						toHeal += m_Patient.HitsMax / 100;
						toHeal -= m_Slips * 4;
					}

					else
					{
						toHeal=Utility.RandomMinMax((int)(healing/4+anatomy/15),(int)(healing/3+anatomy/6)); //you can change this if you want..
						if (m_HalfHeal)
						toHeal /= 2;
					}

					if ( toHeal < 1 )
						toHeal = 1;

					m_Patient.Heal( (int) toHeal );
				}
				else
				{
					healerNumber = 500968; // You apply the bandages, but they barely help.
					playSound = false;
				}
/*
				if ( chance > Utility.RandomDouble() )
				{
					healerNumber = 500969; // You finish applying the bandages.

					double min = (anatomy / 5.0) + (healing / 5.0) + 3.0;
					double max = (anatomy / 5.0) + (healing / 2.0) + 10.0;

					double toHeal = min + (Utility.RandomDouble() * (max - min));

					if ( m_Patient.Body.IsMonster || m_Patient.Body.IsAnimal )
						toHeal += m_Patient.HitsMax / 100;

					toHeal -= m_Slips * 4;

					if ( toHeal < 1 )
						toHeal = 1;

					m_Patient.Heal( (int) toHeal );
				}
				else
				{
					healerNumber = 500968; // You apply the bandages, but they barely help.
					playSound = false;
				}
*/
// ----- End OSI bandage system -
			}

			if ( healerNumber != -1 )
				m_Healer.SendLocalizedMessage( healerNumber );

			if ( patientNumber != -1 )
				m_Patient.SendLocalizedMessage( patientNumber );

			if ( playSound )
				m_Patient.PlaySound( 0x57 );

			if ( checkSkills )
			{
				m_Healer.CheckSkill( secondarySkill, 0.0, 120.0 );
				m_Healer.CheckSkill( primarySkill, 0.0, 120.0 );
			}
		}

		private class InternalTimer : Timer
		{
			private BandageContext m_Context;

			public InternalTimer( BandageContext context, TimeSpan delay ) : base( delay )
			{
				m_Context = context;
				Priority = TimerPriority.FiftyMS;
			}

			protected override void OnTick()
			{
				m_Context.EndHeal();
			}
		}

		public static BandageContext BeginHeal( Mobile healer, Mobile patient )
		{
			bool isDeadPet = ( patient is BaseCreature && ((BaseCreature)patient).IsDeadPet );

			if ( patient is Golem )
			{
				healer.SendLocalizedMessage( 500970 ); // Bandages cannot be used on that.
			}
			else if ( patient is BaseCreature && ((BaseCreature)patient).IsAnimatedDead )
			{
				healer.SendLocalizedMessage( 500951 ); // You cannot heal that.
			}
			else if ( !patient.Poisoned && patient.Hits == patient.HitsMax && !BleedAttack.IsBleeding( patient ) && !isDeadPet )
			{
				healer.SendLocalizedMessage( 500955 ); // That being is not damaged!
			}
			else if ( !patient.Alive && (patient.Map == null || !patient.Map.CanFit( patient.Location, 16, false, false )) )
			{
				healer.SendLocalizedMessage( 501042 ); // Target cannot be resurrected at that location.
			}
			else if ( healer.CanBeBeneficial( patient, true, true ) )
			{
				healer.DoBeneficial( patient );

				bool onSelf = ( healer == patient );
				int dex = healer.Dex;

				double seconds;
				double resDelay = ( patient.Alive ? 0.0 : 5.0 );
// ----- OSI bandage system -----
				if ( onSelf )
				{
					//seconds = 9.4 + (0.6 * ((double)(120 - dex) / 10));
					seconds = 12 - ( dex*0.06 );
				}
// ----- End OSI bandage system -
				else
				{
					if ( Core.AOS && GetPrimarySkill( patient ) == SkillName.Veterinary )
					{
						if ( dex >= 40 )
							seconds = 2.0;
						else
							seconds = 3.0;
					}
					else
					{
						if ( dex >= 100 )
							seconds = 3.0 + resDelay;
						else if ( dex >= 40 )
							seconds = 4.0 + resDelay;
						else
							seconds = 5.0 + resDelay;
					}
				}

				BandageContext context = GetContext( healer );

				if ( context != null )
					context.StopHeal();

				context = new BandageContext( healer, patient, TimeSpan.FromSeconds( seconds ) );

				m_Table[healer] = context;

				if ( !onSelf )
					patient.SendLocalizedMessage( 1008078, false, healer.Name ); //  : Attempting to heal you.

				healer.SendLocalizedMessage( 500956 ); // You begin applying the bandages.
				return context;
			}

			return null;
		}
	}
}
Find public override void OnDamage( int amount, Mobile from, bool willKill ), and paste this code over it (look tha t i comment with /* and */ the old code):

Code:
// ----- OSI New Bandage System ---------
		public override void OnDamage( int amount, Mobile from, bool willKill )
		{
			if ( amount >= 20 )
			{
				BandageContext c = BandageContext.GetContext( this );
				if ( c != null )
				c.Slip();
			}

			else if ( amount > 0)
			{
				BandageContext bc= BandageContext.GetContext ( this );
				if (bc != null && (bc.Patient.Body.IsAnimal || bc.Patient.Body.IsMonster))
				bc.Slip();
			}

			WeightOverloading.FatigueOnDamage( this, amount );
			base.OnDamage( amount, from, willKill );
		}
/*
		public override void OnDamage( int amount, Mobile from, bool willKill )
		{
			if ( amount > 0 )
			{
				BandageContext c = BandageContext.GetContext( this );

				if ( c != null )
					c.Slip();
			}

			WeightOverloading.FatigueOnDamage( this, amount );

			base.OnDamage( amount, from, willKill );
		}
*/
// ----- End OSI New Bandage System -----
nerun is offline   Reply With Quote
Old 03-28-2004, 07:22 PM   #16 (permalink)
 
Join Date: Nov 2002
Posts: 636
Default

Actually those symbols are because of site update. It was fine before the new coding system.

Btw, you wanna update your code according to new info.
Code:
toHeal=Utility.RandomMinMax((int)(healing/5+anatomy/8+4),(int)(healing/2.5+anatomy/6+4));//this is very close to the test info
if (m_Slipped)
toHeal *= 0.65;
m_Slipped=m_HalfHeal in that code.. i changed the variable name after the update..

btw, you should also fix the gains. i guess it is possible to find old posts by searching. it was reported in Bug Reports by me..
Ceday is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5