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!

Resource icon

[2.x] XmlSpawner 2 Version 4.0 Revision 21

No permission to download

fwiffo

Sorceror
Uhm, I don't have something like this in my SVN, where did you get those things?

Code:
public virtual void OnWeaponHit(Mobile attacker, Mobile defender, BaseWeapon weapon, int damageGiven)
        {
        }
void OnWeaponHit(Mobile attacker, Mobile defender, BaseWeapon weapon, int damageGiven);
 

Hexon

Sorceror
I pulled it from the precompressed image you posted on there as I was a bit too lazy to pull from the trunk lol.
Edit:

Sorry, been mucking around with VS13, just got my hands on it >.>. Anyways, that code you just posted was from Core\XmlAttach\XmlAttachment.cs, my edit was for Core\XmlAttach\XmlAttach.cs
 

fwiffo

Sorceror
Please, give a look here --> https://code.google.com/p/xmlspawner/source/browse/trunk/Installation SVN or 2.4.txt

I've updated the file to set modification accordingly to latest svn source, as well as the mod to XmlAttach, there is no need to do that, you just have to fix the value passed by the onhit method, since by passing the "ref" damageGiven to many Attachments, there may be the need to get the unmodified original damage, unmodified even by weapon properties in the passage...test it anyway.
 

fwiffo

Sorceror
Please, always remember to look at Help from inside the XmlSpawner Gump, this is the sole updated full documentation of every command available for use inside a spawner or inside a XmlQuestNpc or relative items, this is the only way.

The other way to look at every specific command is by looking inside BaseXmlSpawner.cs in XmlSpawner Core (Harder initially, but maybe easier if you want to fully understand the Spawner logic).
 

Sadistik

Sorceror
I am going throught the additional steps for this on RunUO 2.3r987 ( latest version i can find ) and i also get the error

onweaponhit takes "4" arguments

changing the onweaponhit method did not help :/ . anyway i can fix this ?

my onhit method :
Code:
        public virtual void OnHit( Mobile attacker, Mobile defender, double damageBonus )
        {
            if ( MirrorImage.HasClone( defender ) && (defender.Skills.Ninjitsu.Value / 150.0) > Utility.RandomDouble() )
            {
                Clone bc;
 
                foreach ( Mobile m in defender.GetMobilesInRange( 4 ) )
                {
                    bc = m as Clone;
 
                    if ( bc != null && bc.Summoned && bc.SummonMaster == defender )
                    {
                        attacker.SendLocalizedMessage( 1063141 ); // Your attack has been diverted to a nearby mirror image of your target!
                        defender.SendLocalizedMessage( 1063140 ); // You manage to divert the attack onto one of your nearby mirror images.
 
                        /*
                        * TODO: What happens if the Clone parries a blow?
                        * And what about if the attacker is using Honorable Execution
                        * and kills it?
                        */
 
                        defender = m;
                        break;
                    }
                }
            }
 
            PlaySwingAnimation( attacker );
            PlayHurtAnimation( defender );
 
            attacker.PlaySound( GetHitAttackSound( attacker, defender ) );
            defender.PlaySound( GetHitDefendSound( attacker, defender ) );
 
            int damage = ComputeDamage( attacker, defender );
 
            #region Damage Multipliers
            /*
            * The following damage bonuses multiply damage by a factor.
            * Capped at x3 (300%).
            */
            int percentageBonus = 0;
 
            WeaponAbility a = WeaponAbility.GetCurrentAbility( attacker );
            SpecialMove move = SpecialMove.GetCurrentMove( attacker );
 
            if( a != null )
            {
                percentageBonus += (int)(a.DamageScalar * 100) - 100;
            }
 
            if( move != null )
            {
                percentageBonus += (int)(move.GetDamageScalar( attacker, defender ) * 100) - 100;
            }
 
            percentageBonus += (int)(damageBonus * 100) - 100;
 
            CheckSlayerResult cs = CheckSlayers( attacker, defender );
 
            if ( cs != CheckSlayerResult.None )
            {
                if ( cs == CheckSlayerResult.Slayer )
                    defender.FixedEffect( 0x37B9, 10, 5 );
 
                percentageBonus += 100;
            }
 
            if ( !attacker.Player )
            {
                if ( defender is PlayerMobile )
                {
                    PlayerMobile pm = (PlayerMobile)defender;
 
                    if( pm.EnemyOfOneType != null && pm.EnemyOfOneType != attacker.GetType() )
                    {
                        percentageBonus += 100;
                    }
                }
            }
            else if ( !defender.Player )
            {
                if ( attacker is PlayerMobile )
                {
                    PlayerMobile pm = (PlayerMobile)attacker;
 
                    if ( pm.WaitingForEnemy )
                    {
                        pm.EnemyOfOneType = defender.GetType();
                        pm.WaitingForEnemy = false;
                    }
 
                    if ( pm.EnemyOfOneType == defender.GetType() )
                    {
                        defender.FixedEffect( 0x37B9, 10, 5, 1160, 0 );
 
                        percentageBonus += 50;
                    }
                }
            }
 
            int packInstinctBonus = GetPackInstinctBonus( attacker, defender );
 
            if( packInstinctBonus != 0 )
            {
                percentageBonus += packInstinctBonus;
            }
 
            if( m_InDoubleStrike )
            {
                percentageBonus -= 10;
            }
 
            TransformContext context = TransformationSpellHelper.GetContext( defender );
 
            if( (m_Slayer == SlayerName.Silver || m_Slayer2 == SlayerName.Silver) && context != null && context.Spell is NecromancerSpell && context.Type != typeof( HorrificBeastSpell ) )
            {
                // Every necromancer transformation other than horrific beast takes an additional 25% damage
                percentageBonus += 25;
            }
 
            if ( attacker is PlayerMobile && !(Core.ML && defender is PlayerMobile ))
            {
                PlayerMobile pmAttacker = (PlayerMobile) attacker;
 
                if( pmAttacker.HonorActive && pmAttacker.InRange( defender, 1 ) )
                {
                    percentageBonus += 25;
                }
 
                if( pmAttacker.SentHonorContext != null && pmAttacker.SentHonorContext.Target == defender )
                {
                    percentageBonus += pmAttacker.SentHonorContext.PerfectionDamageBonus;
                }
            }
 
            BaseTalisman talisman = attacker.Talisman as BaseTalisman;
 
            if ( talisman != null && talisman.Killer != null )
                percentageBonus += talisman.Killer.DamageBonus( defender );
 
            percentageBonus = Math.Min( percentageBonus, 300 );
 
            damage = AOS.Scale( damage, 100 + percentageBonus );
            #endregion
 
            if ( attacker is BaseCreature )
                ((BaseCreature)attacker).AlterMeleeDamageTo( defender, ref damage );
 
            if ( defender is BaseCreature )
                ((BaseCreature)defender).AlterMeleeDamageFrom( attacker, ref damage );
 
            damage = AbsorbDamage( attacker, defender, damage );
 
            if ( !Core.AOS && damage < 1 )
                damage = 1;
            else if ( Core.AOS && damage == 0 ) // parried
            {
                if ( a != null && a.Validate( attacker ) /*&& a.CheckMana( attacker, true )*/ ) // Parried special moves have no mana cost
                {
                    a = null;
                    WeaponAbility.ClearCurrentAbility( attacker );
 
                    attacker.SendLocalizedMessage( 1061140 ); // Your attack was parried!
                }
            }
 
            AddBlood( attacker, defender, damage );
 
            int phys, fire, cold, pois, nrgy, chaos, direct;
 
            GetDamageTypes( attacker, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );
 
            if ( Core.ML && this is BaseRanged )
            {
                BaseQuiver quiver = attacker.FindItemOnLayer( Layer.Cloak ) as BaseQuiver;
 
                if ( quiver != null )
                    quiver.AlterBowDamage( ref phys, ref fire, ref cold, ref pois, ref nrgy, ref chaos, ref direct );
            }
 
            if ( m_Consecrated )
            {
                phys = defender.PhysicalResistance;
                fire = defender.FireResistance;
                cold = defender.ColdResistance;
                pois = defender.PoisonResistance;
                nrgy = defender.EnergyResistance;
 
                int low = phys, type = 0;
 
                if ( fire < low ){ low = fire; type = 1; }
                if ( cold < low ){ low = cold; type = 2; }
                if ( pois < low ){ low = pois; type = 3; }
                if ( nrgy < low ){ low = nrgy; type = 4; }
 
                phys = fire = cold = pois = nrgy = chaos = direct = 0;
 
                if ( type == 0 ) phys = 100;
                else if ( type == 1 ) fire = 100;
                else if ( type == 2 ) cold = 100;
                else if ( type == 3 ) pois = 100;
                else if ( type == 4 ) nrgy = 100;
            }
 
            // TODO: Scale damage, alongside the leech effects below, to weapon speed.
            if ( ImmolatingWeaponSpell.IsImmolating( this ) && damage > 0 )
                ImmolatingWeaponSpell.DoEffect( this, defender );
 
            int damageGiven = damage;
 
            if ( a != null && !a.OnBeforeDamage( attacker, defender ) )
            {
                WeaponAbility.ClearCurrentAbility( attacker );
                a = null;
            }
 
            if ( move != null && !move.OnBeforeDamage( attacker, defender ) )
            {
                SpecialMove.ClearCurrentMove( attacker );
                move = null;
            }
 
            bool ignoreArmor = ( a is ArmorIgnore || (move != null && move.IgnoreArmor( attacker )) );
 
            damageGiven = AOS.Damage( defender, attacker, damage, ignoreArmor, phys, fire, cold, pois, nrgy, chaos, direct, false, this is BaseRanged, false );
 
            double propertyBonus = ( move == null ) ? 1.0 : move.GetPropertyBonus( attacker );
 
            if ( Core.AOS )
            {
                int lifeLeech = 0;
                int stamLeech = 0;
                int manaLeech = 0;
                int wraithLeech = 0;
 
                if ( (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLeechHits ) * propertyBonus) > Utility.Random( 100 ) )
                    lifeLeech += 30; // HitLeechHits% chance to leech 30% of damage as hit points
 
                if ( (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLeechStam ) * propertyBonus) > Utility.Random( 100 ) )
                    stamLeech += 100; // HitLeechStam% chance to leech 100% of damage as stamina
 
                if ( (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLeechMana ) * propertyBonus) > Utility.Random( 100 ) )
                    manaLeech += 40; // HitLeechMana% chance to leech 40% of damage as mana
 
                if ( m_Cursed )
                    lifeLeech += 50; // Additional 50% life leech for cursed weapons (necro spell)
 
                context = TransformationSpellHelper.GetContext( attacker );
 
                if ( context != null && context.Type == typeof( VampiricEmbraceSpell ) )
                    lifeLeech += 20; // Vampiric embrace gives an additional 20% life leech
 
                if ( context != null && context.Type == typeof( WraithFormSpell ) )
                {
                    wraithLeech = (5 + (int)((15 * attacker.Skills.SpiritSpeak.Value) / 100)); // Wraith form gives an additional 5-20% mana leech
 
                    // Mana leeched by the Wraith Form spell is actually stolen, not just leeched.
                    defender.Mana -= AOS.Scale( damageGiven, wraithLeech );
 
                    manaLeech += wraithLeech;
                }
 
                if ( lifeLeech != 0 )
                    attacker.Hits += AOS.Scale( damageGiven, lifeLeech );
 
                if ( stamLeech != 0 )
                    attacker.Stam += AOS.Scale( damageGiven, stamLeech );
 
                if ( manaLeech != 0 )
                    attacker.Mana += AOS.Scale( damageGiven, manaLeech );
 
                if ( lifeLeech != 0 || stamLeech != 0 || manaLeech != 0 )
                    attacker.PlaySound( 0x44D );
            }
 
            if ( m_MaxHits > 0 && ((MaxRange <= 1 && (defender is Slime || defender is AcidElemental)) || Utility.Random( 25 ) == 0) ) // Stratics says 50% chance, seems more like 4%..
            {
                if ( MaxRange <= 1 && (defender is Slime || defender is AcidElemental) )
                    attacker.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500263 ); // *Acid blood scars your weapon!*
 
                if ( Core.AOS && m_AosWeaponAttributes.SelfRepair > Utility.Random( 10 ) )
                {
                    HitPoints += 2;
                }
                else
                {
                    if ( m_Hits > 0 )
                    {
                        --HitPoints;
                    }
                    else if ( m_MaxHits > 1 )
                    {
                        --MaxHitPoints;
 
                        if ( Parent is Mobile )
                            ((Mobile)Parent).LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061121 ); // Your equipment is severely damaged.
                    }
                    else
                    {
                        Delete();
                    }
                }
            }
 
            if ( attacker is VampireBatFamiliar )
            {
                BaseCreature bc = (BaseCreature)attacker;
                Mobile caster = bc.ControlMaster;
 
                if ( caster == null )
                    caster = bc.SummonMaster;
 
                if ( caster != null && caster.Map == bc.Map && caster.InRange( bc, 2 ) )
                    caster.Hits += damage;
                else
                    bc.Hits += damage;
            }
 
            if ( Core.AOS )
            {
                int physChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitPhysicalArea ) * propertyBonus);
                int fireChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitFireArea ) * propertyBonus);
                int coldChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitColdArea ) * propertyBonus);
                int poisChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitPoisonArea ) * propertyBonus);
                int nrgyChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitEnergyArea ) * propertyBonus);
 
                if ( physChance != 0 && physChance > Utility.Random( 100 ) )
                    DoAreaAttack( attacker, defender, 0x10E,  50, 100, 0, 0, 0, 0 );
 
                if ( fireChance != 0 && fireChance > Utility.Random( 100 ) )
                    DoAreaAttack( attacker, defender, 0x11D, 1160, 0, 100, 0, 0, 0 );
 
                if ( coldChance != 0 && coldChance > Utility.Random( 100 ) )
                    DoAreaAttack( attacker, defender, 0x0FC, 2100, 0, 0, 100, 0, 0 );
 
                if ( poisChance != 0 && poisChance > Utility.Random( 100 ) )
                    DoAreaAttack( attacker, defender, 0x205, 1166, 0, 0, 0, 100, 0 );
 
                if ( nrgyChance != 0 && nrgyChance > Utility.Random( 100 ) )
                    DoAreaAttack( attacker, defender, 0x1F1,  120, 0, 0, 0, 0, 100 );
 
                int maChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitMagicArrow ) * propertyBonus);
                int harmChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitHarm ) * propertyBonus);
                int fireballChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitFireball ) * propertyBonus);
                int lightningChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLightning ) * propertyBonus);
                int dispelChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitDispel ) * propertyBonus);
 
                if ( maChance != 0 && maChance > Utility.Random( 100 ) )
                    DoMagicArrow( attacker, defender );
 
                if ( harmChance != 0 && harmChance > Utility.Random( 100 ) )
                    DoHarm( attacker, defender );
 
                if ( fireballChance != 0 && fireballChance > Utility.Random( 100 ) )
                    DoFireball( attacker, defender );
 
                if ( lightningChance != 0 && lightningChance > Utility.Random( 100 ) )
                    DoLightning( attacker, defender );
 
                if ( dispelChance != 0 && dispelChance > Utility.Random( 100 ) )
                    DoDispel( attacker, defender );
 
                int laChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLowerAttack ) * propertyBonus);
                int ldChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLowerDefend ) * propertyBonus);
 
                if ( laChance != 0 && laChance > Utility.Random( 100 ) )
                    DoLowerAttack( attacker, defender );
 
                if ( ldChance != 0 && ldChance > Utility.Random( 100 ) )
                    DoLowerDefense( attacker, defender );
            }
 
            if ( attacker is BaseCreature )
                ((BaseCreature)attacker).OnGaveMeleeAttack( defender );
 
            if ( defender is BaseCreature )
                ((BaseCreature)defender).OnGotMeleeAttack( attacker );
 
            if ( a != null )
                a.OnHit( attacker, defender, damage );
 
            if ( move != null )
                move.OnHit( attacker, defender, damage );
 
            if ( defender is IHonorTarget && ((IHonorTarget)defender).ReceivedHonorContext != null )
                ((IHonorTarget)defender).ReceivedHonorContext.OnTargetHit( attacker );
 
            if ( !(this is BaseRanged) )
            {
                if ( AnimalForm.UnderTransformation( attacker, typeof( GiantSerpent ) ) )
                    defender.ApplyPoison( attacker, Poison.Lesser );
 
                if ( AnimalForm.UnderTransformation( defender, typeof( BullFrog ) ) )
                    attacker.ApplyPoison( defender, Poison.Regular );
            }
            // hook for attachment OnWeaponHit method
            Server.Engines.XmlSpawner2.XmlAttach.OnWeaponHit(this, attacker, defender, damageGiven);
        }
 

fwiffo

Sorceror
I see that the ref at the moment isn't necessary, I'll remove it in the next revision.

* Edited the revision and the text file to help in installation of the steps accordingly, I'll update soon
 

Sperg

Sorceror
This is what I am getting, I followed all directions in the installation 2.4 included in the package. Fresh install w/ Nerun's Distro - r136

Code:
RunUO - [www.runuo.com] Version 2.2, Build 4782.3756
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 4 64-bit processors
Scripts: Compiling C# scripts...failed (4 errors, 0 warnings)
Errors:
+ Items/Armor/BaseArmor.cs:
CS1513: Line 1234: } expected
+ Items/Jewels/BaseJewel.cs:
CS1519: Line 196: Invalid token 'if' in class, struct, or interface member d
eclaration
CS1519: Line 196: Invalid token 'is' in class, struct, or interface member d
eclaration
CS1519: Line 196: Invalid token ')' in class, struct, or interface member de
claration
CS1519: Line 198: Invalid token '(' in class, struct, or interface member de
claration
CS1519: Line 198: Invalid token ')' in class, struct, or interface member de
claration
CS1519: Line 198: Invalid token ')' in class, struct, or interface member de
claration
CS1519: Line 200: Invalid token '(' in class, struct, or interface member de
claration
CS1519: Line 200: Invalid token ')' in class, struct, or interface member de
claration
CS1519: Line 200: Invalid token ')' in class, struct, or interface member de
claration
CS0116: Line 201: A namespace does not directly contain members such as fiel
ds or methods
CS1022: Line 206: Type or namespace definition, or end-of-file expected
+ Items/Weapons/BaseWeapon.cs:
CS1518: Line 622: Expected class, delegate, enum, interface, or struct
CS1518: Line 624: Expected class, delegate, enum, interface, or struct
CS1518: Line 637: Expected class, delegate, enum, interface, or struct
CS1518: Line 640: Expected class, delegate, enum, interface, or struct
CS1518: Line 643: Expected class, delegate, enum, interface, or struct
CS0116: Line 646: A namespace does not directly contain members such as fiel
ds or methods
CS1518: Line 653: Expected class, delegate, enum, interface, or struct
CS1022: Line 655: Type or namespace definition, or end-of-file expected
+ Mobiles/BaseCreature.cs:
CS1518: Line 5624: Expected class, delegate, enum, interface, or struct
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

Attachments

  • BaseArmor.cs
    48.6 KB · Views: 0
  • BaseJewel.cs
    12.5 KB · Views: 0
  • BaseWeapon.cs
    106.6 KB · Views: 0
  • BaseCreature.cs
    137.4 KB · Views: 1

LocoDino

Sorceror
Hey I'm using 2.4 so of course I get a nasty line error in \scripts\XmlSpawner Core\XmlAttach\XmlAttach.cs, line 2371
Code:
            if (from.AccessLevel >= AccessLevel.GameMaster || DateTime.Now >= from.NextActionTime)
Changed it to
Code:
            if (from.AccessLevel >= AccessLevel.GameMaster || from.NextActionTime - Core.TickCount < 0 )

Seems to work magic, have to give many kudos to this |post| for the heads up.

P.S. I've only played with just dumping the core folder into scripts. I'll see what else breaks in a minute. xD

Edit: I just realized I could also use DateTime.UtcNow to replace DateTime.Now without touching the logic instead of Core.TickCount. Without doing any of the additional recommended steps in the readme, I can certainly say it compiles without an error.

I was not so lucky with the UTC now fix. The error I get says something about not being able to use operator >= with type 'long' for DateTime.Now, or DateTime.utcNow. Do I need to convert the data type to long for DateTime.Now, or set the from.NextActionTime to a date/time value?
 

zolo888

Sorceror
Hello - When I change the container.cs and stealing.cs I get this error.... Anyone?

I am trying to enable stealable items in xmlspawner.

Running 2.3 and newest version of xmlspawner.
 

Attachments

  • error.jpg
    55.5 KB · Views: 5

Dian

Sorceror
Thanks for returning to let us know you found the problem,
It just might help someone out later :)
 

m309

Squire
Just downloaded this and getting this error:

Code:
Errors:
+ Customs/XmlSpawner/XmlSpawner Core/XmlPropsGumps/XmlSetGump.cs:
    CS1502: Line 254: The best overloaded method match for 'Server.Gumps.SetBody
Gump.SetBodyGump(System.Reflection.PropertyInfo, Server.Mobile, object, System.C
ollections.Generic.Stack<Server.Gumps.StackEntry>, int, System.Collections.Array
List)' has some invalid arguments
    CS1503: Line 254: Argument 4: cannot convert from 'System.Collections.Stack'
to 'System.Collections.Generic.Stack<Server.Gumps.StackEntry>'

It seems to be referring to this line:

Code:
m_Mobile.SendGump( new SetBodyGump( m_Property, m_Mobile, m_Object, m_Stack, m_Page, m_List ) );

Which VS is also flagging as red and saying "Argument type 'System.Collections.Stack' is not assignable to parameter type 'System.Collections.Generic.Stack<Server.Gumps.StackEntry>'


Anyone have a clue on this one?
 

boba

Sorceror
change the Stack variable on XMLSetGump to Stack<StackEntry> also will have to do this with other files for it to compile

Code:
//private Stack m_Stack;
  private Stack<StackEntry> m_Stack;
line 18


Code:
    //public XmlSetGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list ) : base( GumpOffsetX, GumpOffsetY )
        public XmlSetGump( PropertyInfo prop, Mobile mobile, object o, Stack<StackEntry> stack, int page, ArrayList list ) : base( GumpOffsetX, GumpOffsetY )
line 67
 

shtoink

Sorceror
Im having a problem with xmlspawner2 and its use in servuo publish 54. I cannot use the LOOTPACK keyword inside any spawner I end up getting a message "Unable to add LOOTPACK"

Note that i am running with private static readonly Expansion Expansion = Expansion.HS;

See this area of basexmlspawner.cs is where the lootpack is handled.
Code:
 case itemKeyword.LOOTPACK:[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                    // syntax is LOOTPACK,type[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                    if (itemkeywordargs.Length == 2)[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                    {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        LootPack lootpack = null;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        string loottype = itemkeywordargs[1];[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        if (loottype.ToLower() == "poor")[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            lootpack = LootPack.Poor;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        else if (loottype.ToLower() == "meager")[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            lootpack = LootPack.Meager;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        else if (loottype.ToLower() == "average")[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            lootpack = LootPack.Average;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        else if (loottype.ToLower() == "rich")[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            lootpack = LootPack.Rich;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        else if (loottype.ToLower() == "filthyrich")[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            lootpack = LootPack.FilthyRich;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        else if (loottype.ToLower() == "ultrarich")[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            lootpack = LootPack.UltraRich;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        else if (loottype.ToLower() == "superboss")[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            lootpack = LootPack.SuperBoss;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        else[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            status_str = "Invalid LOOTPACK type: " + loottype;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            return false;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        int m_KillersLuck = 0;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        if (trigmob != null)[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            m_KillersLuck = LootPack.GetLuckChanceForKiller(trigmob);[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        bool converterror = false;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        try[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            // generate the nospawn component of the lootpack[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            lootpack.Generate(m, pack, false, m_KillersLuck);[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            // generate the spawn component (basically gold) requires a mobile and wont work in containers[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            // because Generate does a test for TryDropItem for stackables which requires a valid mob argument,[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            // any stackable generated in a container will fail[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            // so just test for a valid mobile and only do the atspawn generate for them.[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            if (m != null)[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                                lootpack.Generate(m, pack, true, m_KillersLuck);[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        catch[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            status_str = "Unable to add LOOTPACK";[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            converterror = true;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b] [/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        if (converterror)[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                            return false;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                    }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                    else[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                    {[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        status_str = "LOOTPACK takes 1 arg : " + itemtypestr;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                        return false;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                    }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                    break;[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                                }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                        }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]                    }

And also see in lootpack.cs the lack of lootpack definitions for the currentexpansion being used which is what is confusing xmlspawner I beleive.

Code:
 #region Generic accessors[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]public static LootPack Poor { get { return Core.SE ? SePoor : Core.AOS ? AosPoor : OldPoor; } }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]public static LootPack Meager { get { return Core.SE ? SeMeager : Core.AOS ? AosMeager : OldMeager; } }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]public static LootPack Average { get { return Core.SE ? SeAverage : Core.AOS ? AosAverage : OldAverage; } }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]public static LootPack Rich { get { return Core.SE ? SeRich : Core.AOS ? AosRich : OldRich; } }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]public static LootPack FilthyRich { get { return Core.SE ? SeFilthyRich : Core.AOS ? AosFilthyRich : OldFilthyRich; } }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]public static LootPack UltraRich { get { return Core.SE ? SeUltraRich : Core.AOS ? AosUltraRich : OldUltraRich; } }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]public static LootPack SuperBoss { get { return Core.SE ? SeSuperBoss : Core.AOS ? AosSuperBoss : OldSuperBoss; } }[/COLOR][/COLOR][/FONT][/SIZE]
[SIZE=15px][FONT=Georgia][COLOR=#65584b][COLOR=#ffffff]#endregion

Im certain this is something with the lootpack.cs file having some of the SA entries, similar to the same LOOTPACK keyword issues back when tokuno came out. Has anyone delt with this or have an idea what i can do to rectify? TY.
 

m309

Squire
change the Stack variable on XMLSetGump to Stack<StackEntry> also will have to do this with other files for it to compile
Code (text):

//private Stack m_Stack;
private Stack<StackEntry> m_Stack;

line 18


Code (text):
//public XmlSetGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list ) : base( GumpOffsetX, GumpOffsetY )
public XmlSetGump( PropertyInfo prop, Mobile mobile, object o, Stack<StackEntry> stack, int page, ArrayList list ) : base( GumpOffsetX, GumpOffsetY )

line 67

boba, this eventually backtracks to require the same Stack<StackEntry> changes in distro/stock files. Considering it wasn't mentioned in any of the install doc's I'm a little leery in proceeding. Has anyone else encountered this issue with the most recent revision?
 

shtoink

Sorceror
Holy convoluted copy/paste batman. I dont know what I did to screw up the code example I posted above. I apologize. However the issue I have is still ongoing and Id still like to find and share or create a fix. Basically using bone stock ServUO publish 54 breaks the LOOTPACK keyword functionality inside any xmlspawners. I am assuming this is very similar to the same problem that was around when tokuno was added (to lootpack.cs and broke LOOTPACK keyword function years ago in a simillar way) seeing as thats the major difference in servuo from runuo in this case - the stygina abyss stuff in lootpack.cs

Can someone smarter than me please point me in the correct direction?
 

shtoink

Sorceror
I just found our error with the LOOTPACK keyword and fixed it. Was related to a script we added that my oldest son had modifed, was not SERVUO or XMLSPAWNER bug, my posts in this topic should be deleted please, my apologies and ty.
 

fwiffo

Sorceror
boba, this eventually backtracks to require the same Stack<StackEntry> changes in distro/stock files. Considering it wasn't mentioned in any of the install doc's I'm a little leery in proceeding. Has anyone else encountered this issue with the most recent revision?

This is because of generics conversion, I'll investigate into this to see if it's dependant on externals in base distro.

What version of RunUO you're using, or, if you're using external fork of runuo, I need to know what it is.
 
Top