|
||
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
|
Enhancement Deeds
What is it? These are deeds that can be given as rewards, sold on vendors, etc. Each deed can be created with a value or given a random amount using the built-in Utility. How to install: - Drop in customs. - IMPORTANT: ANY CHANGES YOU WANT TO MAKE SHOULD BE DONE IN THE UTILITY SCRIPT BEFORE YOU START THE SHARD. - The Enhancement Utility script has 2 secions: the "GetValues" section, and the "GetMaxValues" section. - The GetValues methods will set the VALUES OF THE DEEDS. Change these to whatever types of numbers you would like to see on the Deeds themselves, such as if you want Durability to be between 5 and 25" the code would be Utility.RandomMinMax(5, 25). - The GetMaxValues methods determine the highest value you will allow to be put on the type of Item being modified. It is based on the Attribute type however, not on the type of Item per se. For example, I have set Skills to max at 100, meaning, an item cannot be given a Skill bonus of more than 100 total for a particular Skill. You might want to change these. How to use: "[add EnhancementDeed" will add a Deed with a random Enhancement. "[add AosEnhancementDeed" will add an Aos Enhancement Deed with a Random enhancement. "[add EnhancementDeed Aos 0x0000001 15" will add an Aos Enhancement Deed, with a RegenHits bonus of +15. "[add EnhancementDeed Skill 54 75" will add a Skill Enhancement Deed with a Spellweaving bonus of +75. Double-click the deed, and target an appropriate item in your pack. NEW: If the item is enhanced more than the "MaxEnhancements" value, it will destroy the item. Includes: EnhancementDeed AosEnhancementDeed SkillEnhancementDeed ArmorEnhancementDeed WeaponEnhancementDeed ElementEnhancementDeed
__________________
Advanced Player Gate with Shard Control - My Master Runebook - Linked Books & Bags - Full Toolbar (Fubar) - XML Bible system - Music Box - Enhancement Deeds - House Paints - Light Switch Last edited by Lokai; 06-22-2007 at 12:29 PM. Reason: Completed updates. |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
|
CHANGE LOG:
6/22/2007 8:16AM - Attachment removed. I forgot to Serialize, which would mean players would have to use the deed before the shard restarts or everything would be null. (hehe) 6/22/2007 12:29 PM - Attachment updated. - New feature added: new EDStone keeps track of MaxValues, and you can [props the stone to set the values, so now you don't have to restart the shard to update the MaxValues. - New feature added: EDStone keeps track of how many times a player uses a deed, and how many times an Item has been enhanced. If an item is enhanced more times than the MaxEnhancements value (currently set at 20) then the item will be destroyed. A WARNING message will let the player know each time they enhance an item more than 15 times. - Serialization completed.
__________________
Advanced Player Gate with Shard Control - My Master Runebook - Linked Books & Bags - Full Toolbar (Fubar) - XML Bible system - Music Box - Enhancement Deeds - House Paints - Light Switch Last edited by Lokai; 06-22-2007 at 12:32 PM. |
|
|
|
|
|
#6 (permalink) |
|
Forum Novice
Join Date: Jan 2003
Location: (Near) Atlanta, GA
Posts: 500
|
KILLER SCRIPT! WE LOVE IT!
Question for you, (and maybe this isn't the right place to put it... but I figure since it involves these deeds...) I'm using The Avalon Script Creator (which is pretty cool) to make a custom monster that will drop these deeds. I've made what I call a 'Weapon Elemental' that will have a chance to drop a weapon enhancement deed. All is great, until it tries to define the loot on the monster. When I try to compile, I get this: Code:
Errors:
+ Customs/Enhancement Deeds/Deed Guardians/WeaponElemental.cs:
CS0246: Line 56: The type or namespace name 'WeaponEnhancementDeed' could no
t be found (are you missing a using directive or an assembly reference?)
CS1502: Line 56: The best overloaded method match for 'Server.Items.Containe
r.DropItem(Server.Item)' has some invalid arguments
CS1503: Line 56: Argument '1': cannot convert from 'WeaponEnhancementDeed' t
o 'Server.Item'
Here's my mobile script that was generated: Code:
/*
* Scripter : Nadious
* Author : Lord Mashadow // Avalon Team
* Generator : Avalon Script Creator
* Created at : 7/31/2007 5:08:11 PM
* Thank you for using this tool, feel free to visit our web site www.avalon.gen.tr
*/
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Mobiles
{
[CorpseName( "Weapon Elemental Corpse" )]
public class WeaponElemental : BaseCreature
{
[Constructable]
public WeaponElemental() : base( AIType.AI_Melee, FightMode.Aggressor, 30, 1, 0.3, 0.5 )
{
this.Name = "Weapon Elemental";
this.Hue = 32;
this.Body = 14;
this.BaseSoundID = 616;
this.SetStr( 300 );
this.SetDex( 150 );
this.SetInt( 160 );
this.SetHits( 160 );
this.SetDamage( 30, 60 );
this.SetDamageType( ResistanceType.Physical, 100 );
this.SetDamageType( ResistanceType.Fire, 10 );
this.SetResistance( ResistanceType.Physical, 50 );
this.SetResistance( ResistanceType.Cold, 30 );
this.SetResistance( ResistanceType.Fire, 30 );
this.SetResistance( ResistanceType.Energy, 30 );
this.SetResistance( ResistanceType.Poison, 30 );
this.Fame = 5000;
this.Karma = 4000;
this.VirtualArmor = 70;
}
public override bool AutoDispel{ get{ return true; } }
public override bool CanRummageCorpses{ get{ return true; } }
public override bool Unprovokable{ get{ return true; } }
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( 10 < Utility.Random(100))
return;
c.DropItem( new Gold(1000));
c.DropItem( new WeaponEnhancementDeed(1));
c.DropItem( new IronOre(25));
c.DropItem( new SulfurousAsh(10));
}
public override WeaponAbility GetWeaponAbility()
{
switch ( Utility.Random(3 ) )
{
default:
case 0: return WeaponAbility.ConcussionBlow;
case 1: return WeaponAbility.Dismount;
case 2: return WeaponAbility.Dismount;
}
}
public WeaponElemental( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
|
|
|
|
|
|
#8 (permalink) |
|
Forum Novice
Join Date: Jan 2003
Location: (Near) Atlanta, GA
Posts: 500
|
Lokai,
It compiles just fine when I add that. However, when I kill these monsters (even setting the drop to 100%), all the items BUT the deed shows up. I've killed about 10 of them, and all I get is ash, ore, and gold. The deed is missing. I realize that this is probably NOT the place for script support for mobiles... just wondering if maybe there was something else I might be missing that is keeping it from showing up on this mobile when I kill it. |
|
|
|
|
|
#10 (permalink) |
|
Forum Novice
Join Date: Jan 2003
Location: (Near) Atlanta, GA
Posts: 500
|
Ah! I see now. Since it's not a stackable item, you can't have it stack with more than one.
Man... I seriously wish I could have figured that one out on my own. I'm learning, though. Thanks to people like you and the rest of the wonderful community here... I'm slowly starting to get the hang of it all. Thanks so much! My players are STOKED about the addition of these deeds. They can't wait to get their grubby paws on them. ![]() |
|
|
|
|
|
#11 (permalink) |
|
Lurker
Join Date: Oct 2007
Age: 37
Posts: 5
|
I've been looking at the EnhancementUtility.cs and trying to figure out how to add Slayers to the weapon enhancement deed. The problem that I'm running into is that I don't know how to define the case of a slayer name. All the namespaces I've tried haven't worked. I tried adding the GetRandomSlayer sub from BaseRunicTool.cs but I'm missing something somewhere.
So my real question is how would you go about adding Slayers to weapon enhancement deeds? |
|
|
|
|
|
#12 (permalink) | |
|
Forum Expert
|
Quote:
![]() |
|
|
|
|
|
|
#13 (permalink) |
|
Lurker
Join Date: Oct 2007
Age: 37
Posts: 5
|
Thanks for answering Lokai. I found another option, instead of including slayers in the enhancement deed system I found slayer deeds that somebody else had done. I think part of the problem with trying to include the slayers in the enhancement deed system is that the slayer property is not the same as the other weapon enhancements... meaning the slayer property doesn't have an integer value, rather it's a string. I learned a lot while figuring out that it would be a lot of work to include the slayers in this system
![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|