Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 10-20-2005, 04:14 PM   #1 (permalink)
 
Join Date: Jun 2004
Age: 22
Posts: 173
Default Treasure of Tokuno 1.02

Current Version 1.02

This script makes evrey monster in Tokuno have a chance of dropping a lesser tokuno artifact. This is, you must have a already spawned Tokuno map, and artifacts. Also theres a mob called Ihara Soko The Finance Minister of Tokuno, if you give him 10 lesser artifacts, you will get a artifact deed which will give you a greater artifact... I did it kinda fast and there prob bugs left, currently it doesn't have Greater Pigments in it!

You have to do a PlayerMobile mod, so if you don't know much about Serialization/Deserialization I don't recommend using this!

Here are some screenshots.











Okay, the files you have to change.
In BaseCreature.cs

Search for:

Code:
						if ( m_Paragon )
							if ( Paragon.CheckArtifactChance( ds.m_Mobile, this ) )
								Paragon.GiveArtifactTo( ds.m_Mobile );
UNDER it add

Code:
						if ( this.Map == Map.Tokuno || ( this.Map != null && MalasDungeons( this.Location, this.Map ) ) )
							if ( BaseTokunoMonster.CheckArtifactChance( ds.m_Mobile, this ) )
								BaseTokunoMonster.GiveArtifactTo( ds.m_Mobile );
Add Anywhere

Code:
		public static bool MalasDungeons( Point3D loc, Map map )
		{
			if ( map == Map.Malas )
			{
				if ( loc.X >= 0 && loc.Y >= 0 && loc.X <= 516 && loc.Y <= 2036 )
				{
					Region r = Region.Find( loc, map );

					if ( !(r is MalasDungeon))
						return true;
				}
			}
			
			return false;
		}
In PlayerMobile.cs

Search for
Code:
		private int m_Profession;
UNDER it add

Code:
// Tokuno
		private int m_Artifacts;

		[CommandProperty( AccessLevel.Administrator )]
		public int Artifacts
		{
			get{ return m_Artifacts; }
			set{ m_Artifacts = value; }
		}
// Tokuno
In the deserialization, if you are running a clean distro file with no other modification from PlayerMobile.cs look for

Code:
				case 18:
				{
					m_SolenFriendship = (SolenFriendship) reader.ReadEncodedInt();

					goto case 17;
				}
>>>BEFORE<<< It add

Code:
				case 19:
				{
					m_Artifacts = reader.ReadInt();
					goto case 18;
				}
But if you have something else there, for example

Code:
				case 20:
				{
					m_Wins = reader.ReadInt();
					m_Loses = reader.ReadInt();
					goto case 19;
				}
				case 19:
				{
					m_TempMount = (BaseMount) reader.ReadMobile();
					isinchal = reader.ReadBool();
					canbechal = reader.ReadBool();
					goto case 18;
				}
				case 18:
				{
					m_SolenFriendship = (SolenFriendship) reader.ReadEncodedInt();

					goto case 17;
				}
It has to be you last case + 1, and the goto case must be the one going to your last case.

Code:
				case 21:
				{
					m_Artifacts = reader.ReadInt();
					goto case 20;
				}
Right, now if you have a clean distro file search for

Code:
			base.Serialize( writer );
			
			writer.Write( (int) 18 ); // version
Replace it with

Code:
			base.Serialize( writer );
			
			writer.Write( (int) 19 ); // version

			writer.Write( (int) m_Artifacts );
If you don't, look for

Code:
			writer.Write( (int) X ); // version
And replace that wth X + 1

So for exmaple if it was 238, it now has to be 239

And add under it

Code:
			writer.Write( (int) m_Artifacts );
Okay, that's for the modifications, if you are using autumntwilights artifact deed, remove it, and use mine.

Put IharaSoko.cs , TokunoArtifactDeed.cs and Tokuno.cs in your custom folder.
Start the server and now [add IharaSoko somewhere and give him cloth cuz i couldn't be arsed giving him cloth.


Remember you have to get the Tokuno Artifacts yourself though.

I recommend autumntwilight's Treasures Of Tokuno Phase 2 Artifact Set + Deed! which can be found here :
My coder left and now i got problems...

Remember, don't use the Artifact Deed from autumn! ( well you can use it too )

And the lesser treasures by sidsid

Levers, help

Furthermore I suggest using Nerun's Distro

Char Appearance (osi style)

Have fun ( btw I made this without any info about OSI, so it's not OSI correct. )

Update 1.01: It now also gives tokuno treasures for the dungeons in Malas, however it doesn't in Doom and Gauntlet.

If you are updating from Version 1.0.0, go to BaseCreature.cs and look for


Code:
						if ( this.Map == Map.Tokuno )							if ( BaseTokunoMonster.CheckArtifactChance( ds.m_Mobile, this ) )
								BaseTokunoMonster.GiveArtifactTo( ds.m_Mobile );
Replace it with


Code:
						if ( this.Map == Map.Tokuno || ( this.Map != null && MalasDungeons( this.Location, this.Map ) ) )
							if ( BaseTokunoMonster.CheckArtifactChance( ds.m_Mobile, this ) )
								BaseTokunoMonster.GiveArtifactTo( ds.m_Mobile );
AND Also add this somewhere in basecreature.cs

Code:
		public static bool MalasDungeons( Point3D loc, Map map )
		{
			if ( map == Map.Malas )
			{
				if ( loc.X >= 0 && loc.Y >= 0 && loc.X <= 516 && loc.Y <= 2036 )
				{
					Region r = Region.Find( loc, map );

					if ( !(r is MalasDungeon))
						return true;
				}
			}
			
			return false;
		}
Update 1.01: added support for dungeons in malas
Update 1.01.5: added some pictures
Update 1.02: serialization update
Attached Files
File Type: rar ToT.rar (3.6 KB, 568 views)
__________________
Treasures of Tokuno 1.1

Last edited by Zero_X; 06-07-2006 at 05:56 AM.
Zero_X is offline  
Old 10-20-2005, 07:43 PM   #2 (permalink)
Forum Newbie
 
Join Date: Nov 2003
Age: 33
Posts: 66
Default

One problem I see with that is the creatures in the dungeons in Tokuno wont drop artifacts considering those dungeons use the Malas map. Good job though.
homedogg is offline  
Old 10-20-2005, 08:00 PM   #3 (permalink)
 
Join Date: Jun 2004
Age: 22
Posts: 173
Default

Yes, uhm, but Malas seems to have alot of places that doesn't seem to be a part of Samurai Empire or Malas... If someone could tell me what locations exactly are, I could fix it
__________________
Treasures of Tokuno 1.1
Zero_X is offline  
Old 10-20-2005, 09:35 PM   #4 (permalink)
Forum Expert
 
Lucid Nagual's Avatar
 
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 37
Posts: 3,509
Thumbs up

Thank you. Looks like a wonderful addition. I am looking forward to the Malas update ++Karma
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment.

Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse."


My Customs:
Lucid Nagual is offline  
Old 10-20-2005, 10:09 PM   #5 (permalink)
Forum Novice
 
Join Date: Mar 2004
Location: Emerald Triangle (im all covert-ops in Clearlake right now)
Age: 31
Posts: 217
Send a message via ICQ to twig Send a message via AIM to twig Send a message via MSN to twig Send a message via Yahoo to twig
Default

looks great so far.. keep up the great job
twig is offline  
Old 10-21-2005, 09:01 AM   #6 (permalink)
 
Join Date: Jun 2004
Age: 22
Posts: 173
Default

So anyway, I just made the whole landscape of Malas (the dungeon areas ) into a tokuno arty drop zone, besides Doom and Gauntlet... and what do you mean with karma? o0
__________________
Treasures of Tokuno 1.1
Zero_X is offline  
Old 10-21-2005, 11:32 AM   #7 (permalink)
Forum Newbie
 
Join Date: Nov 2003
Age: 33
Posts: 66
Default

Quote:
Right, now search for


Code:
Code:
			base.Serialize( writer );
			
			writer.Write( (int) 18 ); // version
UNDER it add


Code:
Code:
			writer.Write( (int) m_Artifacts );
Also you need to add one to the version or it will cause an exception error. And you will have to delete your player mobiles.
homedogg is offline  
Old 10-21-2005, 11:39 AM   #8 (permalink)
 
Join Date: Jun 2004
Age: 22
Posts: 173
Default

Aye, indeed, I did it too fast :P

Thanks for telling, fixed in the original post
__________________
Treasures of Tokuno 1.1
Zero_X is offline  
Old 10-21-2005, 09:47 PM   #9 (permalink)
Account Terminated
 
Join Date: Apr 2004
Location: Titusville PA
Age: 26
Posts: 975
Default

Ihara soko is the minister of trade on OSI. I could probably redo your gump to look like the OSI one too when I get time other than that about all you need are the greater pigments I have a version you can look at that work like the oSi pigments but you would need to modify them a little to work with your system.
evil lord kirby is offline  
Old 10-26-2005, 12:11 PM   #10 (permalink)
Forum Newbie
 
Join Date: Jan 2004
Posts: 55
Default

Hmm the drop rate seems to high... i took my tamer out and killed onis and lesser hiryus for about 3 hour... had myself 4 lesser artis... i havent played Tokuno on OSI but it seems to hight?
i can lower it myself but if it is OSI accurate now i will keep it.. so anyone knows?
Hegge is offline  
Old 10-27-2005, 06:32 AM   #11 (permalink)
Forum Novice
 
Join Date: Jun 2005
Age: 30
Posts: 111
Default Thats actually low. Compared to OSI

Thats actually low. Compared to OSI. I used to get 3-4 an hour on OSI
Dave1969 is offline  
Old 10-28-2005, 09:03 AM   #12 (permalink)
Forum Newbie
 
Join Date: Jan 2004
Posts: 55
Default

Ah oki well then i will keep it as it is=)
thanks for the info.
Hegge is offline  
Old 10-28-2005, 08:18 PM   #13 (permalink)
 
Join Date: Jun 2004
Age: 22
Posts: 173
Default

if you wanne change it, you can also change the fame of your monsters... your hiryus and onis might not have alot of fame...
__________________
Treasures of Tokuno 1.1
Zero_X is offline  
Old 11-29-2005, 01:22 AM   #14 (permalink)
 
Join Date: Jun 2004
Posts: 132
Default

The chance for this isn't based as on OSI - OSI is a cumulative fame - IE you gain 5000 fame and get a minor treasure. The harder the monsters are the more you will get.
This system is using the paragon chance formula wich uses fame and the players luck.
Code:
double chance = 1 / ( Math.Max( 10, 100 * ( 0.83 - Math.Round( Math.Log( Math.Round( fame / 6000, 3 ) + 0.001, 10 ), 3 ) ) ) * ( 100 - Math.Sqrt( m.Luck ) ) / 100.0 );
You can tweak the rate in the last part to increase drop rate:
Code:
( 100 - Math.Sqrt( m.Luck ) ) / 100.0 )
to
Code:
( 100 - Math.Sqrt( m.Luck ) ) / 1000.0 )
Would be better if anyone could/can update this to a cumulative fame count to a specified point then drop the arti and reset to start over.
HotBird is offline  
Old 12-02-2005, 12:40 PM   #15 (permalink)
Forum Expert
 
Ankhesentapemkah's Avatar
 
Join Date: Oct 2003
Posts: 344
Default

I've played on OSI and it was I arti every 25 minutes when killing deathwatch beetle hatchlings (about 200-300 kills per arti).
Ankhesentapemkah is offline  
Old 12-27-2005, 12:40 AM   #16 (permalink)
Forum Novice
 
WanderingRage's Avatar
 
Join Date: Jun 2005
Location: Anniston, Alabama
Posts: 158
Send a message via ICQ to WanderingRage Send a message via AIM to WanderingRage Send a message via Yahoo to WanderingRage
Unhappy Problems

I just put this system in and it was working great but each time I restart I lose my chars can someone please help me.If there is someone out there that will help me please let me know you can write to me at turleysnake@yahoo.com and I will send you the file becasue it could not fit on here for some reason.Please help!
WanderingRage is offline  
Old 12-27-2005, 01:47 PM   #17 (permalink)
 
Join Date: Dec 2005
Posts: 6
Default Deleteing Chars

I put this in but it keeps deleteing my chars maybe someone could look at what I changed and point me in right direction

switch ( version )
{
case 20:
{
m_Artifacts = reader.ReadInt();
goto case 19;
}
case 19:
{
m_City = (CityManagementStone)reader.ReadItem();
m_CityTitle = reader.ReadString();
m_ShowCityTitle = reader.ReadBool();
m_OwesBackTaxes = reader.ReadBool();
m_BackTaxesAmount = reader.ReadInt();
goto case 18;
}
case 18:
{
m_SolenFriendship = (SolenFriendship) reader.ReadEncodedInt();

goto case 17;
}
case 17: // changed how DoneQuests is serialized
case 16:
{

OK that was the first part and this is the other

base.Serialize( writer );

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

writer.Write( (int) m_Artifacts );

writer.Write( m_City );

writer.Write( m_CityTitle );

writer.Write( m_ShowCityTitle );

writer.Write( m_OwesBackTaxes );

writer.Write( m_BackTaxesAmount );

writer.WriteEncodedInt( (int) m_SolenFriendship );

QuestSerializer.Serialize( m_Quest, writer );

Thanks for any help with this
storm1955 is offline  
Old 01-05-2006, 05:12 PM   #18 (permalink)
 
Join Date: Jun 2004
Age: 22
Posts: 173
Default

If you can post your old files and new files i can help you.
And does it want to delete it during first time you load or after you save and load again?
__________________
Treasures of Tokuno 1.1
Zero_X is offline  
Old 01-08-2006, 09:47 AM   #19 (permalink)
Forum Novice
 
Join Date: Jun 2005
Age: 30
Posts: 111
Default Errors when adding Malas areas of Tokuno Dungeons

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (8 errors, 0 warnings)
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1513: (line 4810, colum
n 57) } expected
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1519: (line 4827, colum
n 7) Invalid token 'if' in class, struct, or interface member declaration
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1519: (line 4827, colum
n 30) Invalid token ')' in class, struct, or interface member declaration
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1519: (line 4829, colum
n 25) Invalid token '=' in class, struct, or interface member declaration
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1519: (line 4830, colum
n 27) Invalid token '(' in class, struct, or interface member declaration
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1519: (line 4830, colum
n 47) Invalid token ')' in class, struct, or interface member declaration
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS0116: (line 4833, colum
n 7) A namespace does not directly contain members such as fields or methods
 - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS1022: (line 4849, colum
n 5) 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.
Dave1969 is offline  
Old 01-08-2006, 09:51 AM   #20 (permalink)
Forum Novice
 
Join Date: Jun 2005
Age: 30
Posts: 111
Default Heres my Basecreature.cs

Code:
Line 4808:	if ( this.Map == Map.Tokuno ) 
							if ( BaseTokunoMonster.CheckArtifactChance( ds.m_Mobile, this ) )
								BaseTokunoMonster.GiveArtifactTo( ds.m_Mobile );
						public static bool MalasDungeons( Point3D loc, Map map )
		{
			if ( map == Map.Malas )
			{
				if ( loc.X >= 0 && loc.Y >= 0 && loc.X <= 516 && loc.Y <= 2036 )
				{
					Region r = Region.Find( loc, map );

					if ( !(r is MalasDungeon))
						return true;
				}
			}
			
			return false;
		}
 
						if ( !givenFactionKill )
						{
							givenFactionKill = true;
							Faction.HandleDeath( this, ds.m_Mobile );
						}

						if ( givenQuestKill )
							continue;

						PlayerMobile pm = ds.m_Mobile as PlayerMobile;

						if ( pm != null )
						{
							QuestSystem qs = pm.Quest;

							if ( qs != null )
							{
								qs.OnKill( this, c );
								givenQuestKill = true;
							}
						}
					}
				}
			 
				base.OnDeath( c );

				if ( DeleteCorpseOnDeath )
					c.Delete();
			}
		}
Dave1969 is offline  
Old 01-08-2006, 06:25 PM   #21 (permalink)
Forum Novice
 
Arwen_NightHawk's Avatar
 
Join Date: Oct 2003
Location: Missouri
Age: 33
Posts: 335
Send a message via ICQ to Arwen_NightHawk
Default

This made no sense

Code:
UNDER it add


Code:
						if ( this.Map == Map.Tokuno || ( this.Map != null && MalasDungeons( this.Location, this.Map ) ) )
							if ( BaseTokunoMonster.CheckArtifactChance( ds.m_Mobile, this ) )
								BaseTokunoMonster.GiveArtifactTo( ds.m_Mobile );
Look for


UNDER it add

Code:
		public static bool MalasDungeons( Point3D loc, Map map )
		{
			if ( map == Map.Malas )
			{
				if ( loc.X >= 0 && loc.Y >= 0 && loc.X <= 516 && loc.Y <= 2036 )
				{
					Region r = Region.Find( loc, map );

					if ( !(r is MalasDungeon))
						return true;
				}
			}
			
			return false;
		}
Look at red part in quote above. Look for what? What do I put that next code under....? It isnt there.
Arwen_NightHawk is offline  
Old 01-08-2006, 09:30 PM   #22 (permalink)
Forum Novice
 
Join Date: Jun 2005
Age: 30
Posts: 111
Default I figured it out Awen

Put it under this part of your basecreature.cs

base.OnDeath( c );

if ( DeleteCorpseOnDeath )
c.Delete();
}
}
Dave1969 is offline  
Old 01-09-2006, 02:01 AM   #23 (permalink)
Forum Novice
 
Arwen_NightHawk's Avatar
 
Join Date: Oct 2003
Location: Missouri
Age: 33
Posts: 335
Send a message via ICQ to Arwen_NightHawk
Default

Thanks bunches Dave!
Arwen_NightHawk is offline  
Old 02-13-2006, 03:50 PM   #24 (permalink)
 
Join Date: Feb 2006
Posts: 4
Default

under what?
UNDER it add

Code:

public static bool MalasDungeons( Point3D loc, Map map ) { if ( map == Map.Malas ) { if ( loc.X >= 0 && loc.Y >= 0 && loc.X <= 516 && loc.Y <= 2036 ) { Region r = Region.Find( loc, map ); if ( !(r is MalasDungeon)) return true; } } return false; }
tony_2200 is offline  
Old 02-13-2006, 04:00 PM   #25 (permalink)
 
Join Date: Feb 2006
Posts: 4
Default

please help me i don't understand under what i add this :
UNDER it add

Code:

public static bool MalasDungeons( Point3D loc, Map map ) { if ( map == Map.Malas ) { if ( loc.X >= 0 && loc.Y >= 0 && loc.X <= 516 && loc.Y <= 2036 ) { Region r = Region.Find( loc, map ); if ( !(r is MalasDungeon)) return true; } } return false; }

help me please!!!!!!!!!!!!!!!
tony_2200 is offline  
 

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