RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Daat99's Custom OWLTR (Ore\Wood\Leather\Tokens\Recipes)

daat99

Moderator
Staff member
X-SirSly-X said:
Daat what about BoD's for carp & bowcraft?
That's in my TODO list, no idea when it'll be out tho.
I'm compiling a reward list so I'll apretiate some reward ideas for it.


Greystar said:
I'm sure I saw a reference to this when you first added the control stone, but the one that is in Tokuno at 0,0,0 that can go anywhere right? It doesnt have to stay in Tokuno?
Why you want to move it from tokuno ? nobody see it there.
Just leave it where it is and [addowltr anywhere you want it to show up.
 

Greystar

Wanderer
daat99 said:
That's in my TODO list, no idea when it'll be out tho.
I'm compiling a reward list so I'll apretiate some reward ideas for it.



Why you want to move it from tokuno ? nobody see it there.
Just leave it where it is and [addowltr anywhere you want it to show up.


I know no one will see it, but thats not the point. I'm moving all of them to someplace im not already using... I noticed when I was wandering around that where you had them spawn I happened to have something at in both Felucca and Trammel. So I was just wondering in general. I don't have to move it from 0,0,0 in Tokuno I just wanted to know if it would affect anything if I did, no other reason then that.
 

daat99

Moderator
Staff member
Greystar said:
I know no one will see it, but thats not the point. I'm moving all of them to someplace im not already using... I noticed when I was wandering around that where you had them spawn I happened to have something at in both Felucca and Trammel. So I was just wondering in general. I don't have to move it from 0,0,0 in Tokuno I just wanted to know if it would affect anything if I did, no other reason then that.
Well as long as you have 1 owltr control center somewhere in your shard you'll be ok.
The reason I suggest not to move it from tokuno is because sometimes people forget and do [clearfacet or something like that and then they won't have 1.
This will cause major crashes.

Like I said, you need 1 anywhere in the world, doesn't matter if people see it or where it is AS LONG as you have atleast 1.
 

daat99

Moderator
Staff member
MrsTerra said:
I keep getting errors saying "The type or namespace name 'Daat99OWLTR' could not be found (are you missing a using directive or an assembly reference?)" and
" The type or namespace name 'OWLTR' could not be found (are you missing a using directive or an assembly reference?)" In many of the files at server startup. I installed just as mentioned, so not sure what is going on. This is frusterating. Any Idea's? :confused:
I have the best idea ever.
Follow the installation instructions!!!
That's all I can help you with.
 

Kiki

Wanderer
I'm pretty sure I got everything installed properly, but I'm still having problems with a few things... maybe they are bugs, maybe they aren't.

1) The New OWLTR Gump:
Prior to this release I really liked your gumps, they were nice and clean and didn't have to much on them except what NEEDED to be there. I appreciated that. Now, I'll probably just tweak that to my specifications, but I'm also having 2 problems.
a) Custom Craftables : There are 4 choices here, they all say they need Custom Craftables to be enabled to use them, and it seems that BankHive is where thats toggling on and off from. I want runic houses, tool keys and such, but I don't want Bank Hives.. If I turn bankhives off, I lose ALL custom craftables. OOPS.. Fixed this one, I didn't see them because of the recipe scripts.. not a gump problem, Sorry!! :eek:
b) Recipe Crafting : It says you can enable/disable each type manually and gives a lot of buttons down the right side, with "Currently Enabled" after them. I imagine to the left of those buttons it should say something, telling you which type is which, but its not showing up. Perhaps theres a hue problem? Or its not implemented yet?​

2) BOD Runics:
In testing, I recieved a spined leather runic sewingkit with 95 uses from a smalltailorbod. I've never seen uses that high on runics before, especially not sewingkits. Are these randomized or preset? How do I go about changing these if I don't want such long-lasted runics on my shard? Perhaps these values are modified because of an expanded runic table?​

3) System Information and Help:
I appreciate all the work that goes into this system, and that you have made it available to everyone to use, but I'd really like to see some more indepth details of what your system entails. I seem to be finding new things in it everyday, and I've been updating since the OWL system was publically released.​

4) Stuff I'd like to see implemented:
Some things, I'll probably be adding myself, but I imagine I can't be the only one intrested in seeing something a lil cleaner in the token system (this is one of those places I could have used more readme's or help files, figuring out how everything worked). I'd really appreciate a nonmovable chest or something that could be placed at the bank, like the TrashChest that gives users tokens back. There was a trash reward system on OSI even way back in the day, something to that effect.​

Again, I'd like to thank you for sharing your scripts with the community, and all those that helped make it possible. Thanks for listening..

Kiki, A shard owner.
 

Kiki

Wanderer
Code:
//alchemy
			AddHtml( 260, 135, 145, 20, String.Format( "<basefont color=#000000>{0}:</font>", OwltOps[17].Title ), false, false );
			if (b_ForStaff) AddButton( 415, 135, 2511, 2510, 18, GumpButtonType.Reply, 0 );
			if (OwltOps[17].Setting == true)
				AddHtml( 435, 135, 145, 20, String.Format( "<basefont color=#008800>Currently enabled.</font>" ), false, false );
			else
				AddHtml( 435, 135, 145, 20, String.Format( "<basefont color=#ff0000>Currently disabled.</font>" ), false, false );

This is the script for that section of the OWLTR Gump dealing with recipe's. I only included the snipit regarding the first toggle. Obviously, its Alchemy, I imagine that something in there (<basefont color=#000000>{0}:</font>) is "supposed" to pull the world Alchemy into the gump... but its not doing that. Can we just change that to text to solve the problem?
 

daat99

Moderator
Staff member
MrsTerra please DELETE the post with the errors!!!
Click the edit button select delete in the top on the edit window and then click the button to delete it.

I do NOT support compile errors since they're due to improper installation.

Kiki, please don't offer compile errors assistance here.
 

MrsTerra

Wanderer
First of All Daat. Don't be so frigging rude. I came here for help, and you make me feel stupid. That is not polite. I will not post anymore on your scripts. I will delete the prior post, but I ONLY posted due to one asking me with a desire to better help, than you! In fact all my posts have been deleted. Hope your happy for adding MORE stress to my already stressful day! :mad: :mad: :mad:
 

daat99

Moderator
Staff member
Kiki said:
I'm pretty sure I got everything installed properly, but I'm still having problems with a few things... maybe they are bugs, maybe they aren't.

1) The New OWLTR Gump:
Prior to this release I really liked your gumps, they were nice and clean and didn't have to much on them except what NEEDED to be there. I appreciated that. Now, I'll probably just tweak that to my specifications, but I'm also having 2 problems.
I don't mind if you change stuff in the gumps except the Hall of Helpers.
If someone will edit the Hall of Helpers section it'll mean imidiate removal of this system from the net and no more updates.
Sorry but I forgot to add this warning in the scripts themself.

Kiki said:
a) Custom Craftables : There are 4 choices here, they all say they need Custom Craftables to be enabled to use them, and it seems that BankHive is where thats toggling on and off from. I want runic houses, tool keys and such, but I don't want Bank Hives.. If I turn bankhives off, I lose ALL custom craftables. OOPS.. Fixed this one, I didn't see them because of the recipe scripts.. not a gump problem, Sorry!! :eek:
There's no global settings for all the craftables anymore, it was needed in the previus releases when you had to restart for the changes to take effect.


Kiki said:
b) Recipe Crafting : It says you can enable/disable each type manually and gives a lot of buttons down the right side, with "Currently Enabled" after them. I imagine to the left of those buttons it should say something, telling you which type is which, but its not showing up. Perhaps theres a hue problem? Or its not implemented yet?
Check the screenshot in my website, if it doesn't look like that then post here a screen shot of what it looks like in your shard.

Kiki said:
2) BOD Runics:
In testing, I recieved a spined leather runic sewingkit with 95 uses from a smalltailorbod. I've never seen uses that high on runics before, especially not sewingkits. Are these randomized or preset? How do I go about changing these if I don't want such long-lasted runics on my shard? Perhaps these values are modified because of an expanded runic table?​
The amount of uses is due to the extended resources.
You can tweak it in the rewards.cs file but keep in mind that those runics are a lot weaker then OSI runics.

Kiki said:
3) System Information and Help:
I appreciate all the work that goes into this system, and that you have made it available to everyone to use, but I'd really like to see some more indepth details of what your system entails. I seem to be finding new things in it everyday, and I've been updating since the OWL system was publically released.​
The lack of detailes is due to lack of time, if anyone want to write some detail file and send it to me I'll go over it and post it in my website.

Kiki said:
4) Stuff I'd like to see implemented:
Some things, I'll probably be adding myself, but I imagine I can't be the only one intrested in seeing something a lil cleaner in the token system (this is one of those places I could have used more readme's or help files, figuring out how everything worked).
Just give the players Token Ledger and tell them to keep it in the backpack.
Everything else is explained in the [owltr gump in the tokens enable\disable settings.

Kiki said:
I'd really appreciate a nonmovable chest or something that could be placed at the bank, like the TrashChest that gives users tokens back. There was a trash reward system on OSI even way back in the day, something to that effect.
Just make the trash4tokens backpack nonmovable and give it to players.

Kiki said:
Again, I'd like to thank you for sharing your scripts with the community, and all those that helped make it possible. Thanks for listening..

Kiki, A shard owner.
It's my pleasure ;)
 

daat99

Moderator
Staff member
MrsTerra said:
First of All Daat. Don't be so frigging rude. I came here for help, and you make me feel stupid. That is not polite. I will not post anymore on your scripts. I will delete the prior post, but I ONLY posted due to one asking me with a desire to better help, than you! In fact all my posts have been deleted. Hope your happy for adding MORE stress to my already stressful day! :mad: :mad: :mad:
The very first post in this thread tell you to read the F.A.Q in my site.
The very first question in my F.A.Q tell you what to do in you get compile errors.

If you were following my instructions then you should've read it and know what to do to solve it.

Since you came here and posted a question about compile errors it kinda tells me you didn't bothered reading my post and following my instructions.

I'm sorry if I added stress to your life but you kinda added stress to mine as well.

I don't support people that don't read and follow my instructions, it's as simple as that.

Want help??? Follow the instructions!!!

P.S.
ty for deleting your error post.
 

RANCID77

Wanderer
Gump pic

Ok here is a screen shot of the text that i see on the gump.. shouldnt there be a list to the left of all those Currently enabled??
 

Attachments

  • Gump.png
    Gump.png
    84.5 KB · Views: 72

MrsTerra

Wanderer
And you obviously ignored Everything I said. I had followed everything your faq and instructions stated, therefore I asked for more help. You know what? I will be the better of the two of us, Thank you so very much for your lack of help. :)
 

daat99

Moderator
Staff member
RANCID77 said:
Ok here is a screen shot of the text that i see on the gump.. shouldnt there be a list to the left of all those Currently enabled??
Please post this file:
Daat99 OWLT Control Center.cs
 

RANCID77

Wanderer
OWLT control center

ok here is the script you asked me to post i have made no changes to the script itself..


Code:
using System; 
using System.Collections;
using Server; 
using Server.daat99;
using Server.Gumps; 
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Engines.BulkOrders;

namespace Server.daat99
{
	public class OWLTR //Custom OWLTR == Ores Wood Leather Tokens Recipes
	{
		public static readonly bool UbberResources = false;
		public static readonly bool Daat99Mining = true;
		public static readonly bool Daat99Lumberjacking = true;
		public static readonly bool A_Li_NCleanChamp = true;
		public static readonly bool A_Li_NSaveCleanChampGold = true;
		public static readonly bool RecipeCraft = false;
		public static readonly bool CraftingBankHive = true;
		public static readonly bool CraftingToolRunicHouse = true;
		public static readonly bool CraftingMobileForge = true;
		public static readonly bool CraftingResourceKeys = true;
		public static readonly bool MuleForge = true;
		public static readonly bool CraftRunicJewlery = true;
		public static readonly bool UseSpellcastersKeyReagents = true;
		public static readonly bool MonsterGiveTokens = true;
		public static readonly bool BodGiveTokens = true;
		public static readonly bool HarvestGiveTokens = true;
		public static readonly bool CraftGiveTokens = true;
		public static readonly bool Alchemy = true;
		public static readonly bool Blacksmithy = true;
		public static readonly bool BowFletching = true;
		public static readonly bool Carpentry = true;
		public static readonly bool Cooking = true;
		public static readonly bool Glassblowing = true;
		public static readonly bool Inscription = true;
		public static readonly bool Masonry = true;
		public static readonly bool Tailoring = true;
		public static readonly bool Tinkering = true;
		public static readonly bool RecipeHarvesting = true;
	}

	public class Daat99OWLTR : Item 
	{
		[Constructable] 
		public Daat99OWLTR() : base( 10900 ) 
		{ 
			Hue = 2; 
			Name = "Daat99's OWLTR Control and Information Center";
			Movable = false;
			Light = LightType.Circle300;
		} 

		public override void OnDoubleClick( Mobile from ) 
		{ 
			from.CloseGump( typeof( Daat99CustomOWLTRGump ) );
			if (Ops == null)
				GenOWLTRSettings();
			if ( !from.Player ) 
				return; 
			if (from.AccessLevel == AccessLevel.Administrator)
				from.SendGump( new Daat99CustomOWLTRGump((PlayerMobile)from) );
			else
				from.SendGump( new Daat99CustomOWLTRGump((PlayerMobile)from) );
		}

		public static OwltOps[] Ops;

		public static void Initialize()
		{
			Server.Commands.Register( "OWLTR", AccessLevel.Player, new CommandEventHandler( OWLTR_OnCommand ) );
			if ( Core.AOS )
				Server.Commands.Register( "OWLTRBOD", AccessLevel.Player, new CommandEventHandler( OWLTRBOD_OnCommand ) );

			if (Ops == null)
				GenOWLTR();
		}

		[Usage( "OWLTR" )]
		[Description( "Open the OWLTR Control Center Gump." )]
		public static void OWLTR_OnCommand( CommandEventArgs e )
		{
			if (!(e.Mobile is PlayerMobile))
				return;
			if (Daat99OWLTR.Ops != null)
			{
			}
			if (e.Mobile.AccessLevel == AccessLevel.Administrator)
				e.Mobile.SendGump(new Daat99CustomOWLTRGump((PlayerMobile)e.Mobile));
			else
				e.Mobile.SendGump(new Daat99CustomOWLTRGump((PlayerMobile)e.Mobile));
		}
		
		[Usage( "OWLTRBOD" )]
		[Description( "Open the bods request Gump." )]
		public static void OWLTRBOD_OnCommand( CommandEventArgs e )
		{
			if (e.Mobile is PlayerMobile)
				e.Mobile.SendGump(new OWLTRbod((PlayerMobile)e.Mobile));
		}

		public static void GenOWLTR()
		{
			Daat99OWLTR dowl = new Daat99OWLTR();
			dowl.MoveToWorld( new Point3D(1434,1707,18), Map.Trammel );
			Daat99OWLTR dowl2 = new Daat99OWLTR();
			dowl2.MoveToWorld( new Point3D(1434,1707,18), Map.Felucca );
			Daat99OWLTR dowl3 = new Daat99OWLTR();
			dowl3.Visible = false;
			dowl3.MoveToWorld( new Point3D(0,0,0), Map.Tokuno );
			GenOWLTRSettings();
		}

		public static string[] s_Titles = new string[]
		{
/*0*/		"Ubber Resources",
/*1*/		"Daat99 Mining",
/*2*/		"Daat99 Lumberjacking",
/*3*/		"A_Li_N CleanChamp",
/*4*/		"Save CleanChamp Gold",
/*5*/		"Recipe Craft",
/*6*/		"Crafting BankHive",
/*7*/		"Crafting Tool Runic House",
/*8*/		"Crafting Mobile Forge",
/*9*/		"Crafting Resource Keys",
/*10*/		"Mule Forge",
/*11*/		"Craft Runic Jewlery",
/*12*/		"Use Spellcasters Key Reagents",
/*13*/		"Monster Give Tokens",
/*14*/		"Bod Give Tokens",
/*15*/		"Harvest Give Tokens",
/*16*/		"Craft Give Tokens",
/*17*/		"Alchemy",
/*18*/		"Blacksmithy",
/*19*/		"BowFletching",
/*20*/		"Carpentry",
/*21*/		"Cooking",
/*22*/		"Glassblowing",
/*23*/		"Inscription",
/*24*/		"Masonry",
/*25*/		"Tailoring",
/*26*/		"Tinkering",
/*27*/		"Recipe Harvesting"
		};

		public static string[] s_Descriptions = new string[]
		{
/*0*/		"Enabling Ubber Resources will make the armor hold the max resists and the runics will be more powerfull. Disabling it will make the armor take random resists and less powerfull runics.",
/*1*/		"Enabling Daat99 Mining will Make the players mine random ores (acording to their skills) everywhere. Disabling it will use the standard OSI vein mining system (they could camp platinum vein 24/7).",
/*2*/		"Enabling Daat99 Lumberjacking will Make the players lumberjack random woods (acording to their skills) everywhere. Disabling it will use the standard OSI vein lumberjacking system (they could camp petrified vein 24/7).",
/*3*/		"Enabling A_Li_N CleanChamp will delete all the corpses every time a new white skull will be spawned in the champ. It will not delete players corpses or bonded pets.",
/*4*/		"Enabling A_Li_N Save Clean Champ Gold will save the gold from the corpses it delete and spawn it when the champion spawns (need A_Li_N CleanChamp enabled to work).",
/*5*/		"Enabling Recipe Craft will make the players need to learn how to craft items and how to harvest ores from crafting recipies.",
/*6*/		"Enabling Crafting Bank Hive will enable the bank hive to be craftable in the tinkering menu (need custom craftables to be enabled).",
/*7*/		"Enabling Crafting Tool Runic House will enable the tool and runic houses to be craftable in the tinkering menu (need custom craftables to be enabled).",
/*8*/		"Enabling Crafting Mobile Forge will enable the mobile forge to be craftable in the tinkering menu (need custom craftables to be enabled).",
/*9*/		"Enabling Crafting Resource Keys will enable the resource keys to be craftable in the tinkering menu (need custom craftables to be enabled).",
/*10*/		"Enabling Mule Forge will enable the mules that spawned with master of the arts to smelt ores just like normal forge, dclick the ore and target the mule that you own.",
/*11*/		"Enabling Craft Runic Jewlery will enable players to craft runic jewlery (rings, bracelets, earings) with runic tinker tools.",
/*12*/		"Enabling Use Spellcasters Key Reagents will check the Spellcasters Key for reagents when the players cast a spell after looking at their backpack.",
/*13*/		"Enabling Monster Give Tokens add tokens to players token ledger (assuming they have one that belong to them in their pack) when they kill monsters.",
/*14*/		"Enabling Bod Give Tokens add tokens to players token ledger (assuming they have one that belong to them in their pack) when they return a full bod to the apropriate vendor.",
/*15*/		"Enabling Harvest Give Tokens will add tokens to the players token ledger (assuming they have one that belong to them in their pack) when they successfully mine ores or lumberjack wood, Only work with random ores/woods. if ores set to vein you can't get tokens for mining and if lumberjacking is set to vein you won't get tokens for lumberjacking. Players will get 50% more tokens when harvesting in Felucca.",
/*16*/		"Enabling Craft Give Tokens will add tokens to the players token ledger (assuming they have one that belong to them in their pack) when they successfully craft items. Tokens amount will be based on the amount of the main resource, the type of the main resource and a bonus if the item is exceptional, When the player repair an item he'll get 0-4 tokens.",
/*17*/		"Alchemy",
/*18*/		"Blacksmithy",
/*19*/		"BowFletching",
/*20*/		"Carpentry",
/*21*/		"Cooking",
/*22*/		"Glassblowing",
/*23*/		"Inscription",
/*24*/		"Masonry",
/*25*/		"Tailoring",
/*26*/		"Tinkering",
/*27*/		"Recipe Harvesting"
		};

		public static void GenOWLTRSettings()
		{
			Ops = new OwltOps[28]; //don't forget to update this when you add new switches
			Ops[0] = new OwltOps(s_Titles[0], OWLTR.UbberResources, s_Descriptions[0] );
			Ops[1] = new OwltOps(s_Titles[1], OWLTR.Daat99Mining, s_Descriptions[1] );
			Ops[2] = new OwltOps(s_Titles[2], OWLTR.Daat99Lumberjacking, s_Descriptions[2] );
			Ops[3] = new OwltOps(s_Titles[3], OWLTR.A_Li_NCleanChamp, s_Descriptions[3] );
			Ops[4] = new OwltOps(s_Titles[4], OWLTR.A_Li_NSaveCleanChampGold, s_Descriptions[4] );
			Ops[5] = new OwltOps(s_Titles[5], OWLTR.RecipeCraft, s_Descriptions[5] );
			Ops[6] = new OwltOps(s_Titles[6], OWLTR.CraftingBankHive, s_Descriptions[6] );
			Ops[7] = new OwltOps(s_Titles[7], OWLTR.CraftingToolRunicHouse, s_Descriptions[7] );
			Ops[8] = new OwltOps(s_Titles[8], OWLTR.CraftingMobileForge, s_Descriptions[8] );
			Ops[9] = new OwltOps(s_Titles[9], OWLTR.CraftingResourceKeys, s_Descriptions[9] );
			Ops[10] = new OwltOps(s_Titles[10], OWLTR.MuleForge, s_Descriptions[10] );
			Ops[11] = new OwltOps(s_Titles[11], OWLTR.CraftRunicJewlery, s_Descriptions[11] );
			Ops[12] = new OwltOps(s_Titles[12], OWLTR.UseSpellcastersKeyReagents, s_Descriptions[12] );
			Ops[13] = new OwltOps(s_Titles[13], OWLTR.MonsterGiveTokens, s_Descriptions[13] );
			Ops[14] = new OwltOps(s_Titles[14], OWLTR.BodGiveTokens, s_Descriptions[14] );
			Ops[15] = new OwltOps(s_Titles[15], OWLTR.HarvestGiveTokens, s_Descriptions[15] );
			Ops[16] = new OwltOps(s_Titles[16], OWLTR.CraftGiveTokens, s_Descriptions[16] );
			Ops[17] = new OwltOps(s_Titles[17], OWLTR.Alchemy, s_Descriptions[17] );
			Ops[18] = new OwltOps(s_Titles[18], OWLTR.Blacksmithy, s_Descriptions[18] );
			Ops[19] = new OwltOps(s_Titles[19], OWLTR.BowFletching, s_Descriptions[19] );
			Ops[20] = new OwltOps(s_Titles[20], OWLTR.Carpentry, s_Descriptions[20] );
			Ops[21] = new OwltOps(s_Titles[21], OWLTR.Cooking, s_Descriptions[21] );
			Ops[22] = new OwltOps(s_Titles[22], OWLTR.Glassblowing, s_Descriptions[22] );
			Ops[23] = new OwltOps(s_Titles[23], OWLTR.Inscription, s_Descriptions[23] );
			Ops[24] = new OwltOps(s_Titles[24], OWLTR.Masonry, s_Descriptions[24] );
			Ops[25] = new OwltOps(s_Titles[25], OWLTR.Tailoring, s_Descriptions[25] );
			Ops[26] = new OwltOps(s_Titles[26], OWLTR.Tinkering, s_Descriptions[26] );
			Ops[27] = new OwltOps(s_Titles[27], OWLTR.RecipeHarvesting, s_Descriptions[27] );
		}

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

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

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

			OwltOps[] OwltOps = Ops;
			writer.Write( (int) OwltOps.Length ); //ops lenght
			foreach( OwltOps ops in OwltOps )
			{
				writer.Write( (bool)ops.Setting );
			}
		}

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

			int version = reader.ReadInt(); 

			int i_Limit = reader.ReadInt();

			switch (i_Limit) //this will increase the array size when needed.
			{
				case 27: Ops = new OwltOps[28]; break;
				default: Ops = new OwltOps[i_Limit]; break;
			}

			for (int i = 0; i < i_Limit; i++)
			{
				Ops[i] = new OwltOps(s_Titles[i], reader.ReadBool(), s_Descriptions[i] );
			}

			if (i_Limit == 27) //this will add the new setting
				Ops[28] = new OwltOps(s_Titles[28], OWLTR.RecipeHarvesting,		s_Descriptions[28] );
			
			if (Ops == null)
				GenOWLTRSettings();
		}
		
		public class OwltOps
		{
			private string s_Title;
			private bool b_Setting;
			private string s_Desctiption;
			public string Title{ get{ return s_Title;} set{ s_Title = value;} }
			public bool Setting{ get{ return b_Setting;} set{ b_Setting= value;} }
			public string Desctiption{ get{ return s_Desctiption;} set{ s_Desctiption= value;} }
			
			public OwltOps(string name, bool setting, string desc)
			{
				s_Title = name;
				b_Setting = setting;
				s_Desctiption = desc;
			}
		}
	}
}
 

daat99

Moderator
Staff member
RANCID77 said:
ok here is the script you asked me to post i have made no changes to the script itself..


Code:
using System; 
using System.Collections;
using Server; 
using Server.daat99;
using Server.Gumps; 
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Engines.BulkOrders;

namespace Server.daat99
{
	public class OWLTR //Custom OWLTR == Ores Wood Leather Tokens Recipes
	{
		public static readonly bool UbberResources = false;
		public static readonly bool Daat99Mining = true;
		public static readonly bool Daat99Lumberjacking = true;
		public static readonly bool A_Li_NCleanChamp = true;
		public static readonly bool A_Li_NSaveCleanChampGold = true;
		public static readonly bool RecipeCraft = false;
		public static readonly bool CraftingBankHive = true;
		public static readonly bool CraftingToolRunicHouse = true;
		public static readonly bool CraftingMobileForge = true;
		public static readonly bool CraftingResourceKeys = true;
		public static readonly bool MuleForge = true;
		public static readonly bool CraftRunicJewlery = true;
		public static readonly bool UseSpellcastersKeyReagents = true;
		public static readonly bool MonsterGiveTokens = true;
		public static readonly bool BodGiveTokens = true;
		public static readonly bool HarvestGiveTokens = true;
		public static readonly bool CraftGiveTokens = true;
		public static readonly bool Alchemy = true;
		public static readonly bool Blacksmithy = true;
		public static readonly bool BowFletching = true;
		public static readonly bool Carpentry = true;
		public static readonly bool Cooking = true;
		public static readonly bool Glassblowing = true;
		public static readonly bool Inscription = true;
		public static readonly bool Masonry = true;
		public static readonly bool Tailoring = true;
		public static readonly bool Tinkering = true;
		public static readonly bool RecipeHarvesting = true;
	}

	public class Daat99OWLTR : Item 
	{
		[Constructable] 
		public Daat99OWLTR() : base( 10900 ) 
		{ 
			Hue = 2; 
			Name = "Daat99's OWLTR Control and Information Center";
			Movable = false;
			Light = LightType.Circle300;
		} 

		public override void OnDoubleClick( Mobile from ) 
		{ 
			from.CloseGump( typeof( Daat99CustomOWLTRGump ) );
			if (Ops == null)
				GenOWLTRSettings();
			if ( !from.Player ) 
				return; 
			if (from.AccessLevel == AccessLevel.Administrator)
				from.SendGump( new Daat99CustomOWLTRGump((PlayerMobile)from) );
			else
				from.SendGump( new Daat99CustomOWLTRGump((PlayerMobile)from) );
		}

		public static OwltOps[] Ops;

		public static void Initialize()
		{
			Server.Commands.Register( "OWLTR", AccessLevel.Player, new CommandEventHandler( OWLTR_OnCommand ) );
			if ( Core.AOS )
				Server.Commands.Register( "OWLTRBOD", AccessLevel.Player, new CommandEventHandler( OWLTRBOD_OnCommand ) );

			if (Ops == null)
				GenOWLTR();
		}

		[Usage( "OWLTR" )]
		[Description( "Open the OWLTR Control Center Gump." )]
		public static void OWLTR_OnCommand( CommandEventArgs e )
		{
			if (!(e.Mobile is PlayerMobile))
				return;
			if (Daat99OWLTR.Ops != null)
			{
			}
			if (e.Mobile.AccessLevel == AccessLevel.Administrator)
				e.Mobile.SendGump(new Daat99CustomOWLTRGump((PlayerMobile)e.Mobile));
			else
				e.Mobile.SendGump(new Daat99CustomOWLTRGump((PlayerMobile)e.Mobile));
		}
		
		[Usage( "OWLTRBOD" )]
		[Description( "Open the bods request Gump." )]
		public static void OWLTRBOD_OnCommand( CommandEventArgs e )
		{
			if (e.Mobile is PlayerMobile)
				e.Mobile.SendGump(new OWLTRbod((PlayerMobile)e.Mobile));
		}

		public static void GenOWLTR()
		{
			Daat99OWLTR dowl = new Daat99OWLTR();
			dowl.MoveToWorld( new Point3D(1434,1707,18), Map.Trammel );
			Daat99OWLTR dowl2 = new Daat99OWLTR();
			dowl2.MoveToWorld( new Point3D(1434,1707,18), Map.Felucca );
			Daat99OWLTR dowl3 = new Daat99OWLTR();
			dowl3.Visible = false;
			dowl3.MoveToWorld( new Point3D(0,0,0), Map.Tokuno );
			GenOWLTRSettings();
		}

		public static string[] s_Titles = new string[]
		{
/*0*/		"Ubber Resources",
/*1*/		"Daat99 Mining",
/*2*/		"Daat99 Lumberjacking",
/*3*/		"A_Li_N CleanChamp",
/*4*/		"Save CleanChamp Gold",
/*5*/		"Recipe Craft",
/*6*/		"Crafting BankHive",
/*7*/		"Crafting Tool Runic House",
/*8*/		"Crafting Mobile Forge",
/*9*/		"Crafting Resource Keys",
/*10*/		"Mule Forge",
/*11*/		"Craft Runic Jewlery",
/*12*/		"Use Spellcasters Key Reagents",
/*13*/		"Monster Give Tokens",
/*14*/		"Bod Give Tokens",
/*15*/		"Harvest Give Tokens",
/*16*/		"Craft Give Tokens",
/*17*/		"Alchemy",
/*18*/		"Blacksmithy",
/*19*/		"BowFletching",
/*20*/		"Carpentry",
/*21*/		"Cooking",
/*22*/		"Glassblowing",
/*23*/		"Inscription",
/*24*/		"Masonry",
/*25*/		"Tailoring",
/*26*/		"Tinkering",
/*27*/		"Recipe Harvesting"
		};

		public static string[] s_Descriptions = new string[]
		{
/*0*/		"Enabling Ubber Resources will make the armor hold the max resists and the runics will be more powerfull. Disabling it will make the armor take random resists and less powerfull runics.",
/*1*/		"Enabling Daat99 Mining will Make the players mine random ores (acording to their skills) everywhere. Disabling it will use the standard OSI vein mining system (they could camp platinum vein 24/7).",
/*2*/		"Enabling Daat99 Lumberjacking will Make the players lumberjack random woods (acording to their skills) everywhere. Disabling it will use the standard OSI vein lumberjacking system (they could camp petrified vein 24/7).",
/*3*/		"Enabling A_Li_N CleanChamp will delete all the corpses every time a new white skull will be spawned in the champ. It will not delete players corpses or bonded pets.",
/*4*/		"Enabling A_Li_N Save Clean Champ Gold will save the gold from the corpses it delete and spawn it when the champion spawns (need A_Li_N CleanChamp enabled to work).",
/*5*/		"Enabling Recipe Craft will make the players need to learn how to craft items and how to harvest ores from crafting recipies.",
/*6*/		"Enabling Crafting Bank Hive will enable the bank hive to be craftable in the tinkering menu (need custom craftables to be enabled).",
/*7*/		"Enabling Crafting Tool Runic House will enable the tool and runic houses to be craftable in the tinkering menu (need custom craftables to be enabled).",
/*8*/		"Enabling Crafting Mobile Forge will enable the mobile forge to be craftable in the tinkering menu (need custom craftables to be enabled).",
/*9*/		"Enabling Crafting Resource Keys will enable the resource keys to be craftable in the tinkering menu (need custom craftables to be enabled).",
/*10*/		"Enabling Mule Forge will enable the mules that spawned with master of the arts to smelt ores just like normal forge, dclick the ore and target the mule that you own.",
/*11*/		"Enabling Craft Runic Jewlery will enable players to craft runic jewlery (rings, bracelets, earings) with runic tinker tools.",
/*12*/		"Enabling Use Spellcasters Key Reagents will check the Spellcasters Key for reagents when the players cast a spell after looking at their backpack.",
/*13*/		"Enabling Monster Give Tokens add tokens to players token ledger (assuming they have one that belong to them in their pack) when they kill monsters.",
/*14*/		"Enabling Bod Give Tokens add tokens to players token ledger (assuming they have one that belong to them in their pack) when they return a full bod to the apropriate vendor.",
/*15*/		"Enabling Harvest Give Tokens will add tokens to the players token ledger (assuming they have one that belong to them in their pack) when they successfully mine ores or lumberjack wood, Only work with random ores/woods. if ores set to vein you can't get tokens for mining and if lumberjacking is set to vein you won't get tokens for lumberjacking. Players will get 50% more tokens when harvesting in Felucca.",
/*16*/		"Enabling Craft Give Tokens will add tokens to the players token ledger (assuming they have one that belong to them in their pack) when they successfully craft items. Tokens amount will be based on the amount of the main resource, the type of the main resource and a bonus if the item is exceptional, When the player repair an item he'll get 0-4 tokens.",
/*17*/		"Alchemy",
/*18*/		"Blacksmithy",
/*19*/		"BowFletching",
/*20*/		"Carpentry",
/*21*/		"Cooking",
/*22*/		"Glassblowing",
/*23*/		"Inscription",
/*24*/		"Masonry",
/*25*/		"Tailoring",
/*26*/		"Tinkering",
/*27*/		"Recipe Harvesting"
		};

		public static void GenOWLTRSettings()
		{
			Ops = new OwltOps[28]; //don't forget to update this when you add new switches
			Ops[0] = new OwltOps(s_Titles[0], OWLTR.UbberResources, s_Descriptions[0] );
			Ops[1] = new OwltOps(s_Titles[1], OWLTR.Daat99Mining, s_Descriptions[1] );
			Ops[2] = new OwltOps(s_Titles[2], OWLTR.Daat99Lumberjacking, s_Descriptions[2] );
			Ops[3] = new OwltOps(s_Titles[3], OWLTR.A_Li_NCleanChamp, s_Descriptions[3] );
			Ops[4] = new OwltOps(s_Titles[4], OWLTR.A_Li_NSaveCleanChampGold, s_Descriptions[4] );
			Ops[5] = new OwltOps(s_Titles[5], OWLTR.RecipeCraft, s_Descriptions[5] );
			Ops[6] = new OwltOps(s_Titles[6], OWLTR.CraftingBankHive, s_Descriptions[6] );
			Ops[7] = new OwltOps(s_Titles[7], OWLTR.CraftingToolRunicHouse, s_Descriptions[7] );
			Ops[8] = new OwltOps(s_Titles[8], OWLTR.CraftingMobileForge, s_Descriptions[8] );
			Ops[9] = new OwltOps(s_Titles[9], OWLTR.CraftingResourceKeys, s_Descriptions[9] );
			Ops[10] = new OwltOps(s_Titles[10], OWLTR.MuleForge, s_Descriptions[10] );
			Ops[11] = new OwltOps(s_Titles[11], OWLTR.CraftRunicJewlery, s_Descriptions[11] );
			Ops[12] = new OwltOps(s_Titles[12], OWLTR.UseSpellcastersKeyReagents, s_Descriptions[12] );
			Ops[13] = new OwltOps(s_Titles[13], OWLTR.MonsterGiveTokens, s_Descriptions[13] );
			Ops[14] = new OwltOps(s_Titles[14], OWLTR.BodGiveTokens, s_Descriptions[14] );
			Ops[15] = new OwltOps(s_Titles[15], OWLTR.HarvestGiveTokens, s_Descriptions[15] );
			Ops[16] = new OwltOps(s_Titles[16], OWLTR.CraftGiveTokens, s_Descriptions[16] );
			Ops[17] = new OwltOps(s_Titles[17], OWLTR.Alchemy, s_Descriptions[17] );
			Ops[18] = new OwltOps(s_Titles[18], OWLTR.Blacksmithy, s_Descriptions[18] );
			Ops[19] = new OwltOps(s_Titles[19], OWLTR.BowFletching, s_Descriptions[19] );
			Ops[20] = new OwltOps(s_Titles[20], OWLTR.Carpentry, s_Descriptions[20] );
			Ops[21] = new OwltOps(s_Titles[21], OWLTR.Cooking, s_Descriptions[21] );
			Ops[22] = new OwltOps(s_Titles[22], OWLTR.Glassblowing, s_Descriptions[22] );
			Ops[23] = new OwltOps(s_Titles[23], OWLTR.Inscription, s_Descriptions[23] );
			Ops[24] = new OwltOps(s_Titles[24], OWLTR.Masonry, s_Descriptions[24] );
			Ops[25] = new OwltOps(s_Titles[25], OWLTR.Tailoring, s_Descriptions[25] );
			Ops[26] = new OwltOps(s_Titles[26], OWLTR.Tinkering, s_Descriptions[26] );
			Ops[27] = new OwltOps(s_Titles[27], OWLTR.RecipeHarvesting, s_Descriptions[27] );
		}

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

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

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

			OwltOps[] OwltOps = Ops;
			writer.Write( (int) OwltOps.Length ); //ops lenght
			foreach( OwltOps ops in OwltOps )
			{
				writer.Write( (bool)ops.Setting );
			}
		}

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

			int version = reader.ReadInt(); 

			int i_Limit = reader.ReadInt();

			switch (i_Limit) //this will increase the array size when needed.
			{
				case 27: Ops = new OwltOps[28]; break;
				default: Ops = new OwltOps[i_Limit]; break;
			}

			for (int i = 0; i < i_Limit; i++)
			{
				Ops[i] = new OwltOps(s_Titles[i], reader.ReadBool(), s_Descriptions[i] );
			}

			if (i_Limit == 27) //this will add the new setting
				Ops[28] = new OwltOps(s_Titles[28], OWLTR.RecipeHarvesting,		s_Descriptions[28] );
			
			if (Ops == null)
				GenOWLTRSettings();
		}
		
		public class OwltOps
		{
			private string s_Title;
			private bool b_Setting;
			private string s_Desctiption;
			public string Title{ get{ return s_Title;} set{ s_Title = value;} }
			public bool Setting{ get{ return b_Setting;} set{ b_Setting= value;} }
			public string Desctiption{ get{ return s_Desctiption;} set{ s_Desctiption= value;} }
			
			public OwltOps(string name, bool setting, string desc)
			{
				s_Title = name;
				b_Setting = setting;
				s_Desctiption = desc;
			}
		}
	}
}
On the surface it looks ok (script wise).
I can't realy explain the screenshot you posted it is working ok on several shards that I tested it on.
Can you please send me the name of your shard in pm so I can come and give it a closer look ?
 

Kiki

Wanderer
Rancid's screenshot is exactly the same as the one I'm having problems with. I believe the problem is that instead of typing out the skills, its calling the skill name from a list. Something on your test shard is different than what we have, because its not getting the list names.

Code:
AddPage( 8 );
			//Recipe Craft
			AddHtml( 260, 35, 145, 20, String.Format( "<basefont color=#000000>{0}:</font>", OwltOps[5].Title ), false, false );
			if (b_ForStaff) AddButton( 415, 35, 2511, 2510, 6, GumpButtonType.Reply, 0 );
			if (OwltOps[5].Setting == true)
				AddHtml( 435, 35, 145, 20, String.Format( "<basefont color=#008800>Currently enabled.</font>" ), false, false );
			else
				AddHtml( 435, 35, 145, 20, String.Format( "<basefont color=#ff0000>Currently disabled.</font>" ), false, false );
			AddHtml( 260, 55, 285, 60, String.Format( "<basefont color=#0000ff>{0}</font>", OwltOps[5].Desctiption ), false, false );
			AddHtml( 260, 115, 285, 20, @"<basefont color=#ff0000>Enable\Disable each craft individualy:</font>", false, false );
			//alchemy
			AddHtml( 260, 135, 145, 20, String.Format( [COLOR=Red][B]"<basefont color=#000000>{0}:</font>", OwltOps[17].Title[/COLOR][/B] ), false, false );
			if (b_ForStaff) AddButton( 415, 135, 2511, 2510, 18, GumpButtonType.Reply, 0 );
			if (OwltOps[17].Setting == true)
				AddHtml( 435, 135, 145, 20, String.Format( "<basefont color=#008800>Currently enabled.</font>" ), false, false );
			else
				AddHtml( 435, 135, 145, 20, String.Format( "<basefont color=#ff0000>Currently disabled.</font>" ), false, false );

Thats just the first part of the gump.cs we are having trouble with.. Couldn't we just change that to

Code:
//alchemy
			AddHtml( 260, 135, 145, 20, String.Format[COLOR=Green][B]( "<basefont color=#000000>Alchemy:</font>" )[/COLOR][/B], false, false );
			if (b_ForStaff) AddButton( 415, 135, 2511, 2510, 18, GumpButtonType.Reply, 0 );
			if (OwltOps[17].Setting == true)
				AddHtml( 435, 135, 145, 20, String.Format( "<basefont color=#008800>Currently enabled.</font>" ), false, false );
			else
				AddHtml( 435, 135, 145, 20, String.Format( "<basefont color=#ff0000>Currently disabled.</font>" ), false, false );

Just on a side note, I would never remove your name, or helpers list from the gump.. thats to much like stealing for my tastes. :)
 

Freya

Wanderer
Me again.... I noticed another possible bug involving the sharpening blade.... for some reason, it will not let the char it is bonded to use it, when you lock it down it tells the player "You cannot access this" but, when I was on my staff char, and used a blade bonded to my staff char, it worked fine when locked down.... so not sure if maybe there's some problem w/the access level of who is allowed to use it or not... or maybe I did something wrong, anyone else having this problem? And any help appreciated... Thanks again *Smile*
 

daat99

Moderator
Staff member
Freya said:
Me again.... I noticed another possible bug involving the sharpening blade.... for some reason, it will not let the char it is bonded to use it, when you lock it down it tells the player "You cannot access this" but, when I was on my staff char, and used a blade bonded to my staff char, it worked fine when locked down.... so not sure if maybe there's some problem w/the access level of who is allowed to use it or not... or maybe I did something wrong, anyone else having this problem? And any help appreciated... Thanks again *Smile*
Tell the players to double click it in their backpack to be the new owner, after they are the owners they will be able to use it locked down.
 

daat99

Moderator
Staff member
Kiki said:
Rancid's screenshot is exactly the same as the one I'm having problems with. I believe the problem is that instead of typing out the skills, its calling the skill name from a list. Something on your test shard is different than what we have, because its not getting the list names.
I tested it both localy on my test shard and in 2 seperate shards that downloaded the files from this thread.
All 3 shards works great which is why I want to see it in my own eyes on your shards.
I'll apretiate it if 1 of you guys will invite me over to your shards and if you could send me the entire "new" folder zipped it'll help as well.

Kiki said:
Code:
//alchemy
			AddHtml( 260, 135, 145, 20, String.Format[COLOR=Green][B]( "<basefont color=#000000>Alchemy:</font>" )[/COLOR][/B], false, false );
			if (b_ForStaff) AddButton( 415, 135, 2511, 2510, 18, GumpButtonType.Reply, 0 );
			if (OwltOps[17].Setting == true)
				AddHtml( 435, 135, 145, 20, String.Format( "<basefont color=#008800>Currently enabled.</font>" ), false, false );
			else
				AddHtml( 435, 135, 145, 20, String.Format( "<basefont color=#ff0000>Currently disabled.</font>" ), false, false );
That's definatly NOT what you suppose to do.
If you change that they you'll fixtate the gump.
I added it as a variable in an array so it'll be modified every time the array is changed.

Kiki said:
Just on a side note, I would never remove your name, or helpers list from the gump.. thats to much like stealing for my tastes. :)
Well, some people do modify script credits.
I always give credits to people that help me out and report bugs and if I hear that someone is editing people out or adding people in without my knowledge than it'll be the last straw.
I'm doing this so the RunUO comunity in general and the players in particular will have more fun and better time.
It isn't something I'm getting paid for so don't give me reason to stop contributing (this means all the RunUO members not you in particular Kiki).
 

Memnoch

Wanderer
daat99 said:
Tell the players to double click it in their backpack to be the new owner, after they are the owners they will be able to use it locked down.

I had the same problem on my shard with getting it to work. We tried several ways of getting it to work, and only my staff char could use it, none of the players we have tried have had any luck. I was going to try with myself as a player before i was going to report this. I also wasnt sure if house ownership had anything to do since 1 was co owner, and not owner, and others were frieneded.
 
Top