Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to publish them under the GPL licensing terms. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 05-04-2009, 01:39 AM   #1 (permalink)
Forum Expert
 
Vorspire's Avatar
 
Join Date: Jan 2005
Location: Newcastle, United Kingdom
Age: 23
Posts: 3,158
Send a message via ICQ to Vorspire Send a message via MSN to Vorspire Send a message via Skype™ to Vorspire
Cool [RUO X] World of Warcraft Level System Utility/SDK Implimentation Guide


Before you continue to read this post, make sure you have read and installed this script:
[RUO X] World of Warcraft Level System Utility/SDK


This guide is written based on the assumption of the reader having a common undestanding of C# termanology, key words and member placement, as well as the RunUO 2.0 API and serializing/deserializing methods.

The scale used for deciding the WoW-Style XP Zone is;


Trammel: Azeroth
Felucca: Azeroth
Ilshenar: Outland
Malas: Northrend
Tokuno: Northrend
Internal: Northrend


This guide will provide the following information:
  • Editing PlayerMobile
  • Editing BaseCreature
  • Editing BaseWeapon and BaseArmor (Level Requirements)
  • Creating a Cheque for Experience
  • Creating a Command to View Level Status

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////


All edits are to be made to: PlayerMobile.cs

Assembly Reference:


<PlayerMobile>: CREATE
Code:
using System.Collections;
using System.Collections.Generic;

using Server.WoW;

Property Declarations:


<PlayerMobile>.m_Level: CREATE
<PlayerMobile>.m_LevelCap: CREATE
<PlayerMobile>.m_Experience: CREATE
<PlayerMobile>.m_Rested: CREATE
<PlayerMobile>.m_RestedCap: CREATE
<PlayerMobile>.m_LastOnline: CREATE
Code:
private int
    m_Level = 1,
    m_LevelCap = 80,
    m_Experience = 0,
    m_Rested = 0,
    m_RestedCap = 8;

private DateTime
    m_LastOnline = DateTime.Now;

Command Properties:


<PlayerMobile>.LastOnline: CREATE
Code:
[CommandProperty(AccessLevel.GameMaster)]
public DateTime LastOnline
{
	get
	{
		return m_LastOnline;
	}
	set
	{
		m_LastOnline = value;
	}
}
<PlayerMobile>.Rested: CREATE
Code:
[CommandProperty(AccessLevel.GameMaster)]
public int Rested
{
	get
	{
		if( m_Rested > m_RestedCap )
			m_Rested = m_RestedCap;
		else if( m_Rested < 0 )
			m_Rested = 0;

		return m_Rested;
	}
	set
	{
		if (value == m_Rested)
			return;
		else
		{
			if (value > m_RestedCap)
				m_Rested = m_RestedCap;
			else
			{
				m_Rested = value;

				if (m_Rested > 0 && m_Rested < m_RestedCap)
					SendMessage(0x55, String.Format("You feel rested. Experience gained from killing monsters is increased by {0}% for {1} hours.", LevelUtility.RestedXPFactor * 100, m_Rested));
				else if (m_Rested >= m_RestedCap)
					SendMessage(0x55, String.Format("You are fully rested. Experience gained from killing monsters is increased by {0}% for {1} Hours.", LevelUtility.RestedXPFactor * 100, m_Rested));
				else if (m_Rested == 0)
					SendMessage(0x55, String.Format("You feel normal. Experience gained from killing monsters is now normal."));
			}
		}
	}
}
<PlayerMobile>.RestedCap: CREATE
Code:
[CommandProperty(AccessLevel.Administrator)]
public int RestedCap
{
    get
    {
	if (m_RestedCap < 0)
		m_RestedCap = 0;

	return m_RestedCap;
    }
    set
    {
        m_RestedCap = value; 
    }
}
<PlayerMobile>.Level: CREATE
Code:
[CommandProperty( AccessLevel.Administrator )]
public int Level
{
    get
    {
        if (m_Level < 1)
            m_Level = 1;

        return m_Level;
    }
    set
    {
        if (value == m_Level)
            return;
        else if (value > m_Level)
        {
            int diff = value - m_Level;

            LevelUp( diff );
        }
        else if (value < m_Level)
        {
            int diff = m_Level - value;

            LevelDown( diff );
        }
    }
}
<PlayerMobile>.Experience: CREATE
Code:
[CommandProperty(AccessLevel.Administrator)]
public int Experience
{
    get
    {
	if (m_Experience < 0)
		m_Experience = 0;

	return m_Experience;
    }
    set
    {
        if (value == m_Experience)
            return;
        else
        {
            SetExperience( value );
        }
    }
}
<PlayerMobile>.ExperienceReq: CREATE
Code:
[CommandProperty(AccessLevel.Administrator)]
public int ExperienceReq
{
    get
    {
        ZoneXPBase xpBase = GetXPZone( true );
        
        return LevelUtility.ComputeExperienceReq( m_Level, xpBase );
    }    
}

Methods:


<PlayerMobile>.GetXPZone( bool byLevel ): CREATE
Code:
public ZoneXPBase GetXPZone( bool byLevel )
{
	if( byLevel )
	{
		if( m_Level <= 59 )
			return ZoneXPBase.Azeroth;
		else if( m_Level <= 69 )
			return ZoneXPBase.Outland;
		else
			return ZoneXPBase.Northrend;
	}
	else
	{
		if( Map == Map.Felucca || Map == Map.Trammel )
			return ZoneXPBase.Azeroth;
		else if( Map == Map.Ilshenar )
			return ZoneXPBase.Outland;
		else
			return ZoneXPBase.Northrend;
	}
}
<PlayerMobile>.SetExperience( int value ): CREATE
Code:
public void SetExperience( int value )
{
	int difference = value - m_Experience;

	if (m_Experience != value)
		m_Experience = value;

	if ((Math.Abs(difference) > 0))
	{
		SendMessage((difference > 0 ? 57 : 37), "You {0} {1} XP", (difference > 0 ? "gained" : "lost"), Math.Abs(difference));

		CheckLevelGain( );
	}
}
<PlayerMobile>.CheckLevelGain( ): CREATE
Code:
public void CheckLevelGain( )
{
	int count = 0;

	ZoneXPBase xpBase = GetXPZone( true );

	while (m_Experience >= ComputeExperienceReq(m_Level, m_Level + (count + 1), xpBase))
	{
		count++;
	}

	if (count > 0)
	{
		LevelUp(count);
	}
}
<PlayerMobile>.LevelUp( int count ): CREATE
Code:
public void LevelUp( int count )
{
	if (m_Level + count > m_LevelCap)
		count = m_LevelCap - m_Level;

	m_Experience = 0;
	m_Level += count;
}
<PlayerMobile>.LevelDown( int count ): CREATE
Code:
public void LevelDown( int count )
{
	if (m_Level - count < 1)
		count = m_Level - 1;

	m_Experience = 0;
	m_Level -= count;
}
<PlayerMobile>.AwardExperience( int count ): CREATE
Code:
public void AwardExperience( BaseCreature killed, int bonus, int split )
{
	if (split < 1)
		split = 1;

	double baseXP = 0.0;

	if (killed != null)
	{
		if (killed.ControlMaster != null || killed.SummonMaster != null || killed.IsBonded || killed.Summoned)
			return;

		ZoneXPBase xpBase = GetXPZone( false );

		baseXP = LevelUtility.XPFromNPC( m_Level, killed.Level, xpBase );

		if (killed.IsElite)
			baseXP *= LevelUtility.EliteXPFactor;

		if (m_Rested > 0)
		{
			TimeSpan span = DateTime.Now.Subtract(m_LastOnline);
			int hours = (int)Math.Floor(span.TotalHours);

			if (hours > 0)
				m_Rested = m_Rested - hours;

			baseXP *= LevelUtility.RestedXPFactor;
		}
	}

	int final = (int)Math.Floor((double)((baseXP + bonus) / split));

	Experience += final;
}
<PlayerMobile>.OnLogout( LogoutEventArgs e ): EDIT
Code:
m_LastOnline = DateTime.Now;
<PlayerMobile>.Serialize( GenericWriter writer ): EDIT
Code:
writer.Write( (int) m_Level );
writer.Write( (int) m_LevelCap );
writer.Write( (int) m_Experience );
writer.Write( (int) m_Rested );
writer.Write( (int) m_RestedCap );
writer.Write( (DateTime) m_LastOnline );
<PlayerMobile>.Deserialize( GenericReader reader ): EDIT
Code:
m_Level = reader.ReadInt( );
m_LevelCap = reader.ReadInt( );
m_Experience = reader.ReadInt( );
m_Rested = reader.ReadInt( );
m_RestedCap = reader.ReadInt( );
m_LastOnline = reader.ReadDateTime( );

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////


All edits are to be made to: BaseCreature.cs

Assembly Reference:


<BaseCreature>: CREATE
Code:
using System.Collections;
using System.Collections.Generic;

using Server.WoW;
using Server.Engines.PartySystem;

Property Declarations:


<BaseCreature>.m_Level: CREATE
Code:
private int
    m_Level = 1;
<BaseCreature>.m_IsElite: CREATE
Code:
private bool
    m_IsElite = false;

Command Properties:


<BaseCreature>.Level: CREATE
Code:
[CommandProperty(AccessLevel.Administrator)]
public int Level
{
    get
    {
	if (m_Level < 1)
		m_Level = 1;

	return m_Level;
    }
    set
    {
        m_Level = value;
    }
}
<BaseCreature>.IsElite: CREATE
Code:
[CommandProperty(AccessLevel.Administrator)]
public bool IsElite
{
    get
    {
	return m_IsElite;
    }
    set
    {
        SetElite( value );
    }
}

Methods:


<BaseCreature>.SetElite( bool value ): CREATE
Code:
public virtual void SetElite( bool value )
{
   m_IsElite = value;
}
<BaseCreature>.GetBonusExperience( ): CREATE
Code:
public virtual int GetBonusExperience( )
{
    return 0;
}
<BaseCreature>.OnDamage( int amount, Mobile from, bool willKill ): EDIT
Code:
if (willKill)
{
	Dictionary<PlayerMobile, int> toAward = new Dictionary<PlayerMobile, int>();
	ArrayList entries = DamageEntries;
	List<Party> cycled = new List<Party>();

	foreach (DamageEntry de in entries)
	{
		if (de.Damager == null && de.Damager.Deleted)
			continue;

		Mobile damager = de.Damager;

		if (damager == null || damager.Deleted)
			continue;

		if (damager is PlayerMobile)
		{
			Party p = Party.Get(damager);

			if (p == null)
			{
				toAward.Add((PlayerMobile)damager, 1);
			}
			else if (!cycled.Contains(p))
			{
				ArrayList members = p.Members;

				for (int foo = 0; foo < members.Count; foo++)
				{
					PlayerMobile member = members[foo] as PlayerMobile;

					if (member == null || member.Deleted)
						continue;

					if (member.InRange(Location, 25))
						toAward.Add(member, members.Count);
				}

				cycled.Add(p);
			}
		}
		else if (damager is BaseCreature)
		{
			BaseCreature creature = damager as BaseCreature;
			PlayerMobile master = null;

			if (creature.Controled)
			{
				if (creature.ControlMaster != null && creature.ControlMaster is PlayerMobile)
					master = (PlayerMobile)creature.ControlMaster;
			}
			else if (creature.Summoned)
			{
				if (creature.SummonMaster != null && creature.SummonMaster is PlayerMobile)
					master = (PlayerMobile)creature.SummonMaster;
			}

			if (master == null || master.Deleted)
				continue;

			Party p = Party.Get(master);

			if (p == null)
			{
				toAward.Add(master, 1);
			}
			else if (!cycled.Contains(p))
			{
				ArrayList members = p.Members;

				for (int foo = 0; foo < members.Count; foo++)
				{
					PlayerMobile member = members[foo] as PlayerMobile;

					if (member == null || member.Deleted)
							continue;

					if (member.InRange(Location, 25))
						toAward.Add(member, members.Count);
				}

				cycled.Add(p);
			}
		}
	}

	foreach (KeyValuePair<PlayerMobile, int> valid in toAward)
	{
		if (valid.Key == null || valid.Key.Deleted)
			continue;

		valid.Key.AwardExperience(this, GetBonusExperience(), valid.Value);
	}
}
<BaseCreature>.Serialize( GenericWriter writer ): EDIT
Code:
writer.Write( (int) m_Level );
writer.Write( (bool) m_IsElite );
<BaseCreature>.Deserialize( GenericReader reader ): EDIT
Code:
m_Level = reader.ReadInt( );
SetElite( reader.ReadBool() );

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////


All edits are to be made to: BaseArmor.cs, BaseWeapon.cs

Assembly Reference:


<BaseArmor/BaseWeapon>: CREATE
Code:
using System.Collections;
using System.Collections.Generic;

using Server.WoW;

Property Declarations:


<BaseArmor/BaseWeapon>.m_LevelReq: CREATE
Code:
private int
    m_LevelReq = 1;

Command Properties:


<BaseArmor/BaseWeapon>.LevelReq: CREATE
Code:
[CommandProperty(AccessLevel.GameMaster)]
public int LevelReq
{
	get
	{
		if( m_LevelReq < 0 )
			m_LevelReq = 0;

		return m_LevelReq;
	}
	set
	{
		m_LevelReq = value;
	}
}

Methods:


<BaseArmor/BaseWeapon>.CheckLevel( Mobile from ): CREATE
Code:
public bool CheckLevel(Mobile from)
{
	if( from == null || from.Deleted || !( from is PlayerMobile ) )
		return true;

	PlayerMobile equipee = from as PlayerMobile;

	if (m_LevelReq <= 0)
		return true;

	if (equipee.Level < m_LevelReq)
	{
		equipee.SendMessage(0x22, "You do not meet the level requirements for this item.");
		return false;
	}

	return true;
}
<BaseArmor/BaseWeapon>.CanEquip( Mobile from ): EDIT
Code:

//<ADD THIS>

else if( !CheckLevel( from ) )
{
	return false;
}

//<BEFORE THIS>


else
{
	return base.CanEquip( from );
}
<BaseArmor/BaseWeapon>.Serialize( GenericWriter writer ): EDIT
Code:
writer.Write( (int) m_LevelReq );
<BaseArmor/BaseWeapon>.Deserialize( GenericReader reader ): EDIT
Code:
m_LevelReq = reader.ReadInt( );

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////


Create a new file: ExperienceCheque.cs

Complete Script Code:


Code:
using System;

using Server;
using Server.Mobiles;
using Server.WoW;

namespace Server.Items
{    
	public class ExperienceCheque : Item
	{
		public int m_XPAmount;

		[CommandProperty( AccessLevel.GameMaster )]
		public int XPAmount
		{
			get
			{
				return m_XPAmount;
			}
			set
			{
				m_XPAmount = value;
				InvalidateProperties( );
			}
		}

		[Constructable]
		public ExperienceCheque( )
			: base( 0x14F0 )
		{
			Name = "a Blank Experience Cheque";
			m_XPAmount = 0;
		}

		[Constructable]
		public ExperienceCheque( int xpamount )
			: base( 0x14F0 )
		{
			Name = "a Cheque for " + xpamount.ToString("#,#") + " Experience";

            		m_XPAmount = xpamount;
		}

		public override void AddNameProperty( ObjectPropertyList list )
		{
			list.Add( ( m_XPAmount == 0 ) ? "a Blank Experience Cheque" : String.Format( "a Cheque for {0} Experience", m_XPAmount.ToString("#,#") ) );
		}

		public override void OnSingleClick( Mobile from )
		{
			LabelTo( from, ( m_XPAmount == 0 ) ? "a Blank Experience Cheque" : String.Format( "a Cheque for {0} XP", m_XPAmount.ToString("#,#") ) );
		}

		public override void OnDoubleClick( Mobile from )
		{
			PlayerMobile pm = from as PlayerMobile;

			if( pm != null && !pm.Deleted && pm.Alive )
			{
				if( IsChildOf( from.Backpack ) )
				{
					pm.Experience += m_XPAmount;
					Delete( );
				}
				else
				{
					from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
				}
			}
		}

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

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

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

			writer.Write( ( int )m_XPAmount );
		}

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

			int version = reader.ReadInt( );

			switch( version )
			{
				case 0:
					{
						m_XPAmount = reader.ReadInt( );
						break;
					}
			}
		}
	}
}

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////


Create a new file: LevelStatusCMD.cs

Complete Script Code:


Code:
using System;

using Server.Commands;
using Server.Mobiles;

namespace Server.WoW
{
	public class LevelStatusCMD
	{
		public static void Initialize()
		{
			CommandSystem.Register( "LevelStatus", AccessLevel.Player, new CommandEventHandler( LevelStatus_OnCommand ) );
		}

		[Usage( "LevelStatus" )]
		[Description( "Displays your current level status." )]
		private static void LevelStatus_OnCommand( CommandEventArgs e)
		{
			PlayerMobile pm = e.Mobile as PlayerMobile;

			if(pm != null) 
			{
				pm.SendMessage("You are currently on level {0} and have {1} experience points! You need {2} experience points to advance to the next level.", pm.Level, pm.Experience, pm.ExperienceReq );
			}
		}
	}
}
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////

Done!


OK, so hopefuly you've finished all of the edits, it wasn't too hard was it?

Now you should have a fully working level system!
Although the Level System we have just created is very basic, it should be easy enough to add in your own tweaks.

The part of the level system that handles the experience gained when killing a BaseCreature:
  • Is based on all damagers found in the BaseCreature's DamageEntries list.
  • Takes into account that the player may be a member of a party, if so, it will cycle through all of the members of the party and check if they are in range of the kill (25 tiles I think I set it to) and then distribute the experience evenly to each member. If a party has been "cycled", it will not be "cycled" again, so it will not grant more experience than it should.
  • If a damager is a BaseCreature, the system will look for the ControlMaster or SummonMaster as the main damager.

I really hope this helps everyone who posted earlier asking about how to impliment this system
I can not guarantee that the code in the guide is fully working, as a lot of last-minute edits were made in the forum post editor.
__________________
Criticism should not be the cause of anger. -Dominik Seifert

Last edited by Vorspire; 05-05-2009 at 09:52 PM.
Vorspire is offline   Reply With Quote
Old 05-04-2009, 12:10 PM   #2 (permalink)
Newbie
 
Join Date: Dec 2003
Location: Indiana
Age: 24
Posts: 94
Default

I've located a few code errors like you said you typed this up quick so here we go

<PlayerMobile>.RestedCap: CREATE

[CommandProperty(AccessLevel.Administrator)]
publicl int RestedCap

<PlayerMobile>.Experience: CREATE

[CommandProperty(AccessLevel.Administrator)]
publicl int Experience

<PlayerMobile>.ExperienceReq: CREATE

[CommandProperty(AccessLevel.Administrator)]
publicl int ExperienceReq

<BaseCreature>.Level: CREATE

[CommandProperty(AccessLevel.Administrator)]
publicl int Level

im working the bugs out of the cheque. but other than that this is a great submission to the forums.

Last edited by Holstis; 05-04-2009 at 12:12 PM. Reason: did not show up properly
Holstis is offline   Reply With Quote
Old 05-04-2009, 01:53 PM   #3 (permalink)
Forum Expert
 
Vorspire's Avatar
 
Join Date: Jan 2005
Location: Newcastle, United Kingdom
Age: 23
Posts: 3,158
Send a message via ICQ to Vorspire Send a message via MSN to Vorspire Send a message via Skype™ to Vorspire
Default

Thanks for pointing those out hehe, I was up till 6.30 AM writing this guide!

I have revised and corrected the typos.

Can you let me know what the bugs with the ExperienceCheque are, so I can update that too?

I saw this one: "using Server.WoWl;" - I'm really unsure on how this extra character has been added randomly to certain things :S
__________________
Criticism should not be the cause of anger. -Dominik Seifert
Vorspire is offline   Reply With Quote
Old 05-04-2009, 02:50 PM   #4 (permalink)
Newbie
 
Join Date: Dec 2003
Location: Indiana
Age: 24
Posts: 94
Default hmmm... its been a while

Code:
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
 + Custom/ExperienceCheque.cs.cs:
    CS1520: Line 36: Class, struct, or interface method must have a return type
    CS1002: Line 36: ; expected
    CS1519: Line 37: Invalid token ':' in class, struct, or interface member declaration
    CS1519: Line 39: Invalid token '=' in class, struct, or interface member declaration
    CS1519: Line 39: Invalid token '(' in class, struct, or interface member declaration
    CS1519: Line 41: Invalid token '=' in class, struct, or interface member declaration
    CS1519: Line 41: Invalid token ';' in class, struct, or interface member declaration
    CS1518: Line 44: Expected class, delegate, enum, interface, or struct
    CS1518: Line 49: Expected class, delegate, enum, interface, or struct
    CS1518: Line 54: Expected class, delegate, enum, interface, or struct
    CS1518: Line 72: Expected class, delegate, enum, interface, or struct
    CS1518: Line 77: Expected class, delegate, enum, interface, or struct
    CS1518: Line 86: Expected class, delegate, enum, interface, or struct
    CS1022: Line 102: Type or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
Sorry ive been looking at this for about two hours im a little rusty just started again currently deployed in iraq decided to try coding again. This is results of your base Experience Cheque.
Holstis is offline   Reply With Quote
Old 05-04-2009, 03:01 PM   #5 (permalink)
Forum Expert
 
Vorspire's Avatar
 
Join Date: Jan 2005
Location: Newcastle, United Kingdom
Age: 23
Posts: 3,158
Send a message via ICQ to Vorspire Send a message via MSN to Vorspire Send a message via Skype™ to Vorspire
Default

I think I found the problem I forgot to use string formatting like this:

Code:
		public override void AddNameProperty( ObjectPropertyList list )
		{
			list.Add( ( m_XPAmount == 0 ) ? "a Blank Experience Cheque" : String.Format( "a Cheque for {0} Experience", m_XPAmount.ToString("#,#") ) );
		}

		public override void OnSingleClick( Mobile from )
		{
			LabelTo( from, ( m_XPAmount == 0 ) ? "a Blank Experience Cheque" : String.Format( "a Cheque for {0} XP", m_XPAmount.ToString("#,#") ) );
		}
I have updated the original script in the guide
__________________
Criticism should not be the cause of anger. -Dominik Seifert
Vorspire is offline   Reply With Quote
Old 05-05-2009, 12:03 PM   #6 (permalink)
Newbie
 
Join Date: Dec 2003
Location: Indiana
Age: 24
Posts: 94
Default hmm

I seem to still be recieving the same errors.
Holstis is offline   Reply With Quote
Old 05-05-2009, 02:05 PM   #7 (permalink)
Forum Expert
 
Vorspire's Avatar
 
Join Date: Jan 2005
Location: Newcastle, United Kingdom
Age: 23
Posts: 3,158
Send a message via ICQ to Vorspire Send a message via MSN to Vorspire Send a message via Skype™ to Vorspire
Default

LOL, my tired eyes...

This was the problem:
Code:
		[Constructable]
		public XPCheck( int xpamount )
			: base( 0x14F0 )
		{
			Name = "a Check For " + xpamount.ToString("#,#") + " Experience";

            		m_XPAmount = xpamount;
		}
The constructor name was wrong! How the heck could I miss that?
The script was loosly based on my own server's "XPCheck" - But I updated it to incorporate proper english.
A "check" is not a "cheque" :P

Main post updated, hopefuly no more problems hehe.
__________________
Criticism should not be the cause of anger. -Dominik Seifert
Vorspire is offline   Reply With Quote
Old 05-05-2009, 02:34 PM   #8 (permalink)
Newbie
 
Join Date: Dec 2003
Location: Indiana
Age: 24
Posts: 94
Default

<PlayerMobile>.AwardExperience( int count ): CREATE

if (killed.Controled || killed.IsBonded || killed.Summoned)
return;

<BaseCreature>.OnDamage( int amount, Mobile from, bool willKill ): EDIT

BaseCreature creature = damager as BaseCreature;
PlayerMobile master = null;

if (creature.Controled)
{

this time forgot an L in the code

Last edited by Holstis; 05-05-2009 at 02:39 PM. Reason: found another missing L
Holstis is offline   Reply With Quote
Old 05-05-2009, 03:03 PM   #9 (permalink)
Newbie
 
Join Date: Dec 2003
Location: Indiana
Age: 24
Posts: 94
Default hmmm

I'm getting a error from the player mobile edit that reads

CS0117: Line 489: 'Server.Mobiles.BaseCreature' does not contain a definition for 'IsElite'
Holstis is offline   Reply With Quote
Old 05-05-2009, 03:23 PM   #10 (permalink)
Newbie
 
Join Date: Dec 2003
Location: Indiana
Age: 24
Posts: 94
Default really quick

due to my lack of coding in the past few years i am not much help so i apologize in advance for making this more of a hassle than a blessing.
Holstis is offline   Reply With Quote
Old 05-05-2009, 09:39 PM   #11 (permalink)
Forum Expert
 
Vorspire's Avatar
 
Join Date: Jan 2005
Location: Newcastle, United Kingdom
Age: 23
Posts: 3,158
Send a message via ICQ to Vorspire Send a message via MSN to Vorspire Send a message via Skype™ to Vorspire
Default

Quote:
Originally Posted by Holstis View Post
<PlayerMobile>.AwardExperience( int count ): CREATE

if (killed.Controled || killed.IsBonded || killed.Summoned)
return;

<BaseCreature>.OnDamage( int amount, Mobile from, bool willKill ): EDIT

BaseCreature creature = damager as BaseCreature;
PlayerMobile master = null;

if (creature.Controled)
{

this time forgot an L in the code
Ahh, is that another runuo 1.0 typo that was fixed in runuo 2.0?

My own shard is actually based on 1.0 Final, stripped down and rebuilt with the fundimentals of WoW, but mostly everything is still intact, the difference is mainly that it is 1.0 Final with .NET 3.5 developing support

So, that may also be the reason for a couple of typos here and there :S

Since this guide was aimed at RunUO 2.0, I will make the change

Updated line:
Code:
if (killed.ControlMaster != null || killed.SummonMaster != null || killed.IsBonded || killed.Summoned)
and as for the missing "IsElite" property, I completely forgot to add that into the guide lol, but I have now updated it with the property and concurrent methods.

You are not being a hassle at all, it's good to have constructive critisism and to be able to accept it with honor and to understand and simply, possibly accept that it may be for the better.
As my mentor always says "Critisism should not be the cause of anger."
__________________
Criticism should not be the cause of anger. -Dominik Seifert

Last edited by Vorspire; 05-05-2009 at 09:49 PM.
Vorspire is offline   Reply With Quote
Old 06-04-2009, 09:03 PM   #12 (permalink)
Forum Novice
 
hellalex's Avatar
 
Join Date: Dec 2005
Location: Montréal
Posts: 174
Send a message via MSN to hellalex Send a message via Skype™ to hellalex
Default

I did my best to try to install your system, but this is what I get.
Any guidance on how to edit the files correctly would be greatly appreciated

Code:
Errors:
 + Custom Scripts/BaseArmor.cs:
    CS0592: Line 234: Attribute 'CommandProperty' is not valid on this declarati
on type. It is valid on 'property, indexer' declarations only.
    CS0246: Line 237: The type or namespace name 'PlayerMobile' could not be fou
nd (are you missing a using directive or an assembly reference?)
    CS0246: Line 240: The type or namespace name 'PlayerMobile' could not be fou
nd (are you missing a using directive or an assembly reference?)
    CS0246: Line 240: The type or namespace name 'PlayerMobile' could not be fou
nd (are you missing a using directive or an assembly reference?)
 + Custom Scripts/BaseCreature.cs:
    CS0029: Line 1217: Cannot implicitly convert type 'System.Collections.Generi
c.List<Server.DamageEntry>' to 'System.Collections.ArrayList'
    CS0117: Line 1232: 'object' does not contain a definition for 'Get'
    CS0117: Line 1261: 'Server.Mobiles.BaseCreature' does not contain a definiti
on for 'Controled'
    CS0117: Line 1275: 'object' does not contain a definition for 'Get'
 + Custom Scripts/BaseWeapon.cs:
    CS0592: Line 314: Attribute 'CommandProperty' is not valid on this declarati
on type. It is valid on 'property, indexer' declarations only.
 + Custom Scripts/PlayerMobile.cs:
    CS0103: Line 154: The name 'm_Rested' does not exist in the current context
    CS0103: Line 154: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 155: The name 'm_Rested' does not exist in the current context
    CS0103: Line 155: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 156: The name 'm_Rested' does not exist in the current context
    CS0103: Line 157: The name 'm_Rested' does not exist in the current context
    CS0103: Line 159: The name 'm_Rested' does not exist in the current context
    CS0103: Line 163: The name 'm_Rested' does not exist in the current context
    CS0103: Line 167: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 168: The name 'm_Rested' does not exist in the current context
    CS0103: Line 168: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 171: The name 'm_Rested' does not exist in the current context
    CS0103: Line 173: The name 'm_Rested' does not exist in the current context
    CS0103: Line 173: The name 'm_Rested' does not exist in the current context
    CS0103: Line 173: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 174: The name 'm_Rested' does not exist in the current context
    CS0103: Line 175: The name 'm_Rested' does not exist in the current context
    CS0103: Line 175: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 176: The name 'm_Rested' does not exist in the current context
    CS0103: Line 177: The name 'm_Rested' does not exist in the current context
    CS0103: Line 189: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 190: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 192: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 196: The name 'm_RestedCap' does not exist in the current conte
xt
    CS0103: Line 204: The name 'm_Level' does not exist in the current context
    CS0103: Line 205: The name 'm_Level' does not exist in the current context
    CS0103: Line 207: The name 'm_Level' does not exist in the current context
    CS0103: Line 211: The name 'm_Level' does not exist in the current context
    CS0103: Line 213: The name 'm_Level' does not exist in the current context
    CS0103: Line 215: The name 'm_Level' does not exist in the current context
    CS0103: Line 219: The name 'm_Level' does not exist in the current context
    CS0103: Line 221: The name 'm_Level' does not exist in the current context
    CS0103: Line 233: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 234: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 236: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 240: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 257: The name 'm_Level' does not exist in the current context
    CS0103: Line 461: The name 'm_Level' does not exist in the current context
    CS0103: Line 463: The name 'm_Level' does not exist in the current context
    CS0103: Line 567: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 569: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 570: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 586: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 586: The name 'ComputeExperienceReq' does not exist in the curr
ent context
    CS0103: Line 586: The name 'm_Level' does not exist in the current context
    CS0103: Line 586: The name 'm_Level' does not exist in the current context
    CS0103: Line 598: The name 'm_Level' does not exist in the current context
    CS0103: Line 598: The name 'm_LevelCap' does not exist in the current contex
t
    CS0103: Line 599: The name 'm_LevelCap' does not exist in the current contex
t
    CS0103: Line 599: The name 'm_Level' does not exist in the current context
    CS0103: Line 601: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 602: The name 'm_Level' does not exist in the current context
    CS0103: Line 606: The name 'm_Level' does not exist in the current context
    CS0103: Line 607: The name 'm_Level' does not exist in the current context
    CS0103: Line 609: The name 'm_Experience' does not exist in the current cont
ext
    CS0103: Line 610: The name 'm_Level' does not exist in the current context
    CS0103: Line 626: The name 'm_Level' does not exist in the current context
    CS0103: Line 631: The name 'm_Rested' does not exist in the current context
    CS0103: Line 637: The name 'm_Rested' does not exist in the current context
    CS0103: Line 637: The name 'm_Rested' does not exist in the current context
    CS0120: Line 1053: An object reference is required for the nonstatic field,
method, or property 'Server.Mobiles.PlayerMobile.m_LastOnline'
    CS0103: Line 2806: The name 'm_Level' does not exist in the current context
    CS0103: Line 2807: The name 'm_LevelCap' does not exist in the current conte
xt
    CS0103: Line 2808: The name 'm_Experience' does not exist in the current con
text
    CS0103: Line 2809: The name 'm_Rested' does not exist in the current context

    CS0103: Line 2810: The name 'm_RestedCap' does not exist in the current cont
ext
    CS0103: Line 2869: The name 'm_Level' does not exist in the current context
    CS0103: Line 2870: The name 'm_LevelCap' does not exist in the current conte
xt
    CS0103: Line 2871: The name 'm_Experience' does not exist in the current con
text
    CS0103: Line 2872: The name 'm_Rested' does not exist in the current context

    CS0103: Line 2873: The name 'm_RestedCap' does not exist in the current cont
ext
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

Last edited by hellalex; 06-04-2009 at 09:22 PM.
hellalex is offline   Reply With Quote
Old 06-04-2009, 09:24 PM   #13 (permalink)
Forum Novice
 
hellalex's Avatar
 
Join Date: Dec 2005
Location: Montréal
Posts: 174
Send a message via MSN to hellalex Send a message via Skype™ to hellalex
Default

Forgot to attach the files, couldn't wrap them in Code -> made my browser crash =)
Attached Files
File Type: cs BaseArmor.cs (48.5 KB, 10 views)
File Type: cs BaseCreature.cs (120.5 KB, 10 views)
File Type: cs PlayerMobile.cs (104.7 KB, 14 views)
File Type: cs BaseWeapon.cs (101.6 KB, 9 views)
hellalex is offline   Reply With Quote
Reply

Bookmarks

Tags
guide, install, level, system, wow


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 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5