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!

Craftable Fireworks

LordHogFred

Knight
Craftable Fireworks

Just something that I made for my shard a while ago but thought other people may like it.

It's basically a set of craftable fireworks, you need alchemy to make them and each firework has a different colour depending on which reagent you make it from. To craft the fireworks you'll need a Pyrotechnic Kit which I sell on my alchemists for 5k. All of these are my own work the only thing I copied lsightly was the rocket from the distro fireworks wand apart from that all the rest are my own work. Especially the fountains they took me ages to get right :p.


Fireworks include:

Small sparklers
Large sparklers
Rockets
Fountains


Reagent Colours:

Bloodmoss - Red
Garlic - White
Ginseng - Yellow
Spider Silk - Purple/Pink
Nightshade - Purple
Black Pearl - Blue
Sulfurous Ash - Explosion
Mandrake Root - Green


Have fun :),
 

Attachments

  • Fireworks.zip
    29.7 KB · Views: 597

Froman2686

Wanderer
this is great stuff.

Quick note: It reads "Carpentry Menu" instead of "Toy Craft Menu"

More fun stuff to put into my Invention System...if you don't mind, that is.
 

LordHogFred

Knight
Froman2686 said:
this is great stuff.

Quick note: It reads "Carpentry Menu" instead of "Toy Craft Menu"

More fun stuff to put into my Invention System...if you don't mind, that is.


No go for it. I did take the very basics of the custom crafting meny form the toy craft system but only the outline of how it works.
I'm actually trying to add a custom header to the craft menu but without any luck so far.
 

Crepti

Wanderer
Very nice script! I'm making the PyroTechnic Kits into reward items for tournaments.

Well done :) Thanks!

One thing though, I don't know whether this is intentional or not.

When you use a Fountain Firework, the firework stays in your pack until the animation's completed, and you can use it multiple times in different places until the first animation has died down.
 

LordHogFred

Knight
Crepti said:
Very nice script! I'm making the PyroTechnic Kits into reward items for tournaments.

Well done :) Thanks!

One thing though, I don't know whether this is intentional or not.

When you use a Fountain Firework, the firework stays in your pack until the animation's completed, and you can use it multiple times in different places until the first animation has died down.

Oh I didnt know that. The fountains are supposed to be dropped on the floor and then used becasue they become set to immovable when used so they cant be taken. I will check that and see if I can make it them un usable inside your backpack. Thanks for pointing that out.

Chz :),
 
Script is crashing my shard.

This is the CrashLog

Code:
Server Crash Report
===================
RunUO Version 2.1, Build 3581.36459
Operating System: Microsoft Windows NT 6.0.6002 Service Pack 2
.NET Framework: 2.0.50727.4206
Time: 04/02/2011 7:56:31 AM
Mobiles: 22596
Items: 372682
Exception:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
   at Server.Engines.Craft.CraftItemCol.GetAt(Int32 index) in d:\aUOT Main Server\Scripts\Engines\Craft\Core\CraftItemCol.cs:line 29
   at Server.Engines.Craft.CraftSystem.AddSkill(Int32 index, SkillName skillToMake, Double minSkill, Double maxSkill) in d:\aUOT Main Server\Scripts\Engines\Craft\Core\CraftSystem.cs:line 243
   at Server.Engines.Craft.DefFirework.InitCraftList() in d:\aUOT Main Server\Scripts\Customs\Crafting - Fireworks\DefFirework.cs:line 94
   at Server.Engines.Craft.CraftSystem..ctor(Int32 minCraftEffect, Int32 maxCraftEffect, Double delay) in d:\aUOT Main Server\Scripts\Engines\Craft\Core\CraftSystem.cs:line 117
   at Server.Engines.Craft.DefFirework..ctor() in d:\aUOT Main Server\Scripts\Customs\Crafting - Fireworks\DefFirework.cs:line 42
   at Server.Engines.Craft.DefFirework.get_CraftSystem() in d:\aUOT Main Server\Scripts\Customs\Crafting - Fireworks\DefFirework.cs:line 31
   at Server.Items.PyroTechnicKit.get_CraftSystem() in d:\aUOT Main Server\Scripts\Customs\Crafting - Fireworks\PyroTechnicKit.cs:line 10
   at Server.Items.BaseTool.OnDoubleClick(Mobile from) in d:\aUOT Main Server\Scripts\Items\Skill Items\Tools\BaseTool.cs:line 129
   at Server.Mobile.Use(Item item)
   at Server.Engines.XmlSpawner2.XmlAttach.UseReq(NetState state, PacketReader pvSrc) in d:\aUOT Main Server\Scripts\Customs\Xml Spawner\XmlAttach\XmlAttach.cs:line 2352
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
Clients:
- Count: 1
+ 127.0.0.1: (account = PigPen) (mobile = 0x1 'PigPen')

Here is the script for PyroTechnicKit.cs

Code:
using System;
using Server;
using Server.Engines.Craft;
namespace Server.Items
{
[FlipableAttribute( 0x185E, 0x185D )]
public class PyroTechnicKit : BaseTool
{
public override CraftSystem CraftSystem{ get{ return DefFirework.CraftSystem; } }
[Constructable]
public PyroTechnicKit() : base( 0x185E )
{
Name = "Pyro Technic Kit";
Weight = 2.0;
}
[Constructable]
public PyroTechnicKit( int uses ) : base( uses, 0x185E )
{
Weight = 2.0;
}
public PyroTechnicKit( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

and . . . here is my DefFirework.cs

Code:
using System;
using Server.Items;
namespace Server.Engines.Craft
{
public class DefFirework : CraftSystem
{
public override SkillName MainSkill
{
get { return SkillName.Alchemy; }
}
 
public override int GumpTitleNumber
{
get { return 0; } // <CENTER>ALCHEMY MENU</CENTER>
}

public override string GumpTitleString
{
get { return "<basefont color=#FFFFFF><CENTER>FIREWORKS CRAFTING MENU</CENTER></basefont>"; }
}
private static CraftSystem m_CraftSystem;
public static CraftSystem CraftSystem
{
get
{
if ( m_CraftSystem == null )
m_CraftSystem = new DefFirework();
return m_CraftSystem;
}
}
public override double GetChanceAtMin( CraftItem item )
{
return 0.5; // 50%
}
private DefFirework() : base( 1, 1, 1.25 )// base( 1, 1, 3.0 )
{
}
public override int CanCraft( Mobile from, BaseTool tool, Type itemType )
{
if ( tool.Deleted || tool.UsesRemaining < 0 )
return 1044038; // You have worn out your tool!
return 0;
}
public override void PlayCraftEffect( Mobile from )
{
// no animation
//if ( from.Body.Type == BodyType.Human && !from.Mounted )
// from.Animate( 9, 5, 1, true, false, 0 );
from.PlaySound( 0x58 );
}
public override int PlayEndingEffect( Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality, bool makersMark, CraftItem item )
{
if ( toolBroken )
from.SendLocalizedMessage( 1044038 ); // You have worn out your tool
if ( failed )
{
if ( lostMaterial )
return 1044043; // You failed to create the item, and some of your materials are lost.
else
return 1044157; // You failed to create the item, but no materials were lost.
}
else
{
if ( quality == 0 )
return 502785; // You were barely able to make this item. It's quality is below average.
else if ( makersMark && quality == 2 )
return 1044156; // You create an exceptional quality item and affix your maker's mark.
else if ( quality == 2 )
return 1044155; // You create an exceptional quality item.
else
return 1044154; // You create the item.
}
}
public override void InitCraftList()
{
int index = -1;
//Sparklers
AddCraft( typeof( SpiderSilkSmallSparkler ), "Sparklers", "spider silk small sparkler", 42.0, 50.3, typeof( SpidersSilk ), "Spiders Silk", 7 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( SpiderSilkLargeSparkler ), "Sparklers", "spider silk large sparkler", 53.0, 70.7, typeof( SpidersSilk ), "Spiders Silk", 12 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( BlackPearlSmallSparkler ), "Sparklers", "black pearl small sparkler", 42.0, 50.3, typeof( BlackPearl ), "Black Pearl", 7 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( BlackPearlLargeSparkler ), "Sparklers", "black pearl large sparkler", 53.0, 70.7, typeof( BlackPearl ), "Black Pearl", 12 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( BloodMossSmallSparkler ), "Sparklers", "blood moss small sparkler", 42.0, 50.3, typeof( Bloodmoss ), "Blood Moss", 7 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( BloodMossLargeSparkler ), "Sparklers", "blood moss large sparkler", 53.0, 70.7, typeof( Bloodmoss ), "Blood Moss", 12 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( GinsengSmallSparkler ), "Sparklers", "ginseng small sparkler", 42.0, 50.3, typeof( Ginseng ), "Ginseng", 7 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( GinsengLargeSparkler ), "Sparklers", "ginseng large sparkler", 53.0, 70.7, typeof( Ginseng ), "Ginseng", 12 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( MandrakeRootSmallSparkler ), "Sparklers", "mandrake root small sparkler", 42.0, 50.3, typeof( MandrakeRoot ), "Mandrake Root", 7 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( MandrakeRootLargeSparkler ), "Sparklers", "mandrake root large sparkler", 53.0, 70.7, typeof( MandrakeRoot ), "Mandrake Root", 12 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( NightshadeSmallSparkler ), "Sparklers", "nightshade small sparkler", 42.0, 50.3, typeof( Nightshade ), "Nightshade", 7 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( NightshadeLargeSparkler ), "Sparklers", "nightshade large sparkler", 53.0, 70.7, typeof( Nightshade ), "Nightshade", 12 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( GarlicSmallSparkler ), "Sparklers", "garlic small sparkler", 42.0, 50.3, typeof( Garlic ), "Garlic", 7 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( GarlicLargeSparkler ), "Sparklers", "garlic large sparkler", 53.0, 70.7, typeof( Garlic ), "Garlic", 12 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( SulfurousAshSmallSparkler ), "Sparklers", "sulfurous ash small sparkler", 42.0, 50.3, typeof( SulfurousAsh ), "Sulfurous Ash", 7 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( SulfurousAshLargeSparkler ), "Sparklers", "sulfurous ash large sparkler", 53.0, 70.7, typeof( SulfurousAsh ), "Sulfurous Ash", 12 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
//Rockets
AddCraft( typeof( BlackPearlFirework ), "Rockets", "black pearl firework", 78.5, 115.8, typeof( BlackPearl ), "Black Pearl", 30 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( BloodMossFirework ), "Rockets", "blood moss firework", 78.5, 115.8, typeof( Bloodmoss ), "Blood Moss", 30 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( GinsengFirework ), "Rockets", "ginseng firework", 78.5, 115.8, typeof( Ginseng ), "Ginseng", 30 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( MandrakeRootFirework ), "Rockets", "mandrake root firework", 78.5, 115.8, typeof( MandrakeRoot ), "Mandrake Root", 30 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( NightshadeFirework ), "Rockets", "nightshade firework", 78.5, 115.8, typeof( Nightshade ), "Nightshade", 30 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( GarlicFirework ), "Rockets", "garlic firework", 78.5, 115.8, typeof( Garlic ), "Garlic", 30 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( SulfurousAshFirework ), "Rockets", "sulfurous ash firework", 78.5, 115.8, typeof( SulfurousAsh ), "Sulfurous Ash", 30 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( SpiderSilkFirework ), "Rockets", "spider silk firework", 78.5, 115.8, typeof( SpidersSilk ), "Spiders Silk", 30 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
//Fountains
AddCraft( typeof( BlackPearlFountain ), "Fountains", "black pearl fountain", 90.0, 122.3, typeof( BlackPearl ), "Black Pearl", 42 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( BloodMossFountain ), "Fountains", "blood moss fountain", 90.0, 122.3, typeof( Bloodmoss ), "Blood Moss", 42 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( GinsengFountain ), "Fountains", "ginseng fountain", 90.0, 122.3, typeof( Ginseng ), "Ginseng", 42 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( MandrakeRootFountain ), "Fountains", "mandrake root fountain", 90.0, 122.3, typeof( MandrakeRoot ), "Mandrake Root", 42 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( NightshadeFountain ), "Fountains", "nightshade fountain", 90.0, 122.3, typeof( Nightshade ), "Nightshade", 42 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( GarlicFountain ), "Fountains", "garlic fountain", 90.0, 122.3, typeof( Garlic ), "Garlic", 42 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( SulfurousAshFountain ), "Fountains", "sulfurous ash fountain", 90.0, 122.3, typeof( SulfurousAsh ), "Sulfurous Ash", 42 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
AddCraft( typeof( SpiderSilkFountain ), "Fountains", "spider silk fountain", 90.0, 122.3, typeof( SpidersSilk ), "Spiders Silk", 42 );
AddSkill( index, SkillName.Magery, 50.0, 70.0 );
MarkOption = true;
Repair = Core.AOS;
}
}
}

If all the other actual scripts are needed I can post them all *hoping for something obvious*

Any help would be appreciated.

Thx
 

PappaSmurf

Knight
This was released in 2005 for RunUO 1.0, RunUO is on 2.1 so it probably needs some serious overhauling to get it to work... Basically this script was outdated 5 years ago?
 
Top