|
||
|
|||||||
| General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Join Date: Nov 2002
Posts: 636
|
[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) |
|
|
|
|
|
#2 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
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? |
|
|
|
|
|
#3 (permalink) |
|
Join Date: Nov 2002
Posts: 636
|
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) |
|
|
|
|
|
#4 (permalink) |
|
Lurker
Join Date: Oct 2002
Posts: 20
|
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 |
|
|
|
|
|
#7 (permalink) |
|
Forum Expert
|
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.
__________________
|
|
|
|
|
|
#9 (permalink) | |
|
UO Gamers: Demise Administrator
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
|
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:
__________________
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) |
|
|
|
|
|
|
#10 (permalink) |
|
Join Date: Nov 2002
Posts: 636
|
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 :) |
|
|
|
|
|
#11 (permalink) |
|
Join Date: Nov 2002
Posts: 636
|
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".. |
|
|
|
|
|
#12 (permalink) |
|
UO Gamers: Demise Administrator
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
|
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) |
|
|
|
|
|
#13 (permalink) | |
|
Join Date: Dec 2003
Posts: 12
|
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:
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. |
|
|
|
|
|
|
#15 (permalink) |
|
Forum Novice
Join Date: Jun 2003
Location: Brazil
Age: 29
Posts: 800
|
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;
}
}
}
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 -----
|
|
|
|
|
|
#16 (permalink) |
|
Join Date: Nov 2002
Posts: 636
|
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; 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.. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|