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!

[RUO ALL] Attackable Items

Vorspire

Knight
[RUO ALL] Attackable Items

RunUO Versions: 1.0 Final | 2.0 RC1| 2.0 RC2 | 2.0 SVN

This Package contains the means to give you an Item that is Attackable!

It uses Hits and Damage as a Mobile would, but is handled by an 'Entity' BaseCreature that creates the attack effect...

These Items are completely modifyable ingame and crash-proof tested to a certain extent.

I'm sure these will plug+play with 2.0, but I don't script for 2.0 because my shard uses 1.0 Final... All work I do is for my shard and releasing these scripts is just for general reference for others.

This Version now supports Pet Orders/Commands!
Bug with BodyValue has been worked around for best effects.

A few abilities:
{
  • 6 Levels of Strength
  • Edit Hits/MaxHits of Item (Not Mobile) - It reflects on the mobile.
  • Derivable Loot Box Modifyer!
  • Shows progression through 3 stages of HitPoint values!
  • Pet Orders/Commands supported!
}

Scripts Supplied:
{
  • BaseDesItem.cs
    {
    • class DamageableItem( int StartID, int HalfHitsID, int DestroyID )
    • class IDamageableItem( DamageableItem parent )
    }
  • DesCityWall.cs
    {
    • class DesCityWallEast( )
    • class DesCityWallSouth( )
    }
  • DesFurniture.cs
    {
    • class DesBookCaseEast( )
    • class DesBookCaseSouth( )
    }
  • DesEnergyField.cs
    {
    • class DesEnergyFieldEast( )
    • class DesEnergyFieldSouth( )
    }
  • Rubble.cs
    {
    • class Rubble( )
    • class Rubble( int itemID, string namePrefix )
    }
}


To derive from the loot box method, use this:

Code:
[color=blue]public override void[/color] [color=maroon]OnDestroyed[/color]( [color=blue]WoodenBox[/color] [color=#252525]lootbox[/color] )
{
    [color=#252525]lootbox[/color].[color=maroon]DropItem[/color]( [color=blue]new[/color] [color=maroon]IronOre[/color]() );
}

--------------------------------------------------------
RUNUO 2.0 SVN_ALL SUPPORT MODIFICATION
Thanks to aj9251 for posting this!

On Error:
Code:
Errors:
 + Custom/BaseDesItem.cs:
    CSXXXX: [color=red]Line 408[/color]: 'Server.Mobiles.BaseCreature' does not contain a definition for [color=red]'Controled'[/color]

Edit Line 408:

Code:
[color=green]//FROM:[/color]

[color=blue]if[/color] ( [color=#252525]bc[/color] == [color=blue]null[/color] || [color=#252525]bc[/color].[color=#252525]Deleted[/color] || ![color=#252525]bc[/color].[color=#252525]Alive[/color] || [color=red]!bc.Controled[/color] || [color=#252525]bc[/color].[color=#252525]ControlMaster[/color] != [color=#252525]from[/color] )

[color=green]//TO:[/color]

[color=blue]if[/color] ( [color=#252525]bc[/color] == [color=blue]null[/color] || [color=#252525]bc[/color].[color=#252525]Deleted[/color] || ![color=#252525]bc[/color].[color=#252525]Alive[/color] || [color=red]!bc.Controlled[/color] || [color=#252525]bc[/color].[color=#252525]ControlMaster[/color] != [color=#252525]from[/color] )

--------------------------------------------------------

Enjoy!

NOTE:These scripts are designed for RunUO 1.0 Final, only minor modifications to one or two lines should be needed to upgrade compatibility.

NOTE:Due to a busy life-style, I may be unable to answer support requests, so please try your best to edit these yourself. Please use another thread for support requests!!!

Regards, Vorspire

"Attackable Items Beta.zip" contains the original release without the ensurance of Rubble decay, as this is known to be supported by RunUO 1.0 for definate.
 

Attachments

  • AttackableWalls.jpg
    AttackableWalls.jpg
    92.7 KB · Views: 1,338
  • Attackable Items.rar
    5 KB · Views: 113
  • Attackable Items.zip
    6 KB · Views: 89
  • Attackable Items Beta.zip
    5.8 KB · Views: 59

Makaar

Sorceror
Very very very cool script indeed! This makes it possible to make the old event statue that would attack people, with a few clever tricks using XMLspawner that is. +Karma!
 

Macil

Sorceror
I see potential for this system to mimic how you could break down doors in past Ultima games like Ultima 5 (I think) and Ultima 6. And indeed Ultima Underworlds 1 and 2.

Very nice. Will have to try this later.
 

nadious

Sorceror
Has anyone tried on it RC2 / SVN yet? I haven't had a chance, was just curious if maybe someone else did it.
 

Rocko Wang

Wanderer
Very creative. :)
Would be even better if it accomodates spell damage and player ordering pet to attack (imagine a dragon bashing on city wall), which I understand require slight modification of other RunUO files.

Also I noticed this works for single tile item. Is it possible to do an attackable multi this way, say an attackable building occupying multiple tiles? If the attacker is not right next to the invisible mobile child, a melee attack wouldn't be able to initiate... bow would still work. Not sure how to solve that. But it would be super cool if a player or a pet can attack a multi.
 

Vorspire

Knight
try doing [Area Set BodyValue 1 around one of these items, and you'll quickly learn exactly what's making this work :p

The only flaw with this is that, since the BaseCreature Link has a BodyValue of 0, (invisible, but active) - all text will appear to the upper left corner of your screen, including damage... If you shoot a bow at the wall, the arrow goes to the top left corner, lol...

What I need to find, is a BodyValue that acts like 0, but lets the text appear in the normal way...

This could be modified (in the OnDamage method) to do a PrivateOverHeadMessage to the attacker for damage... but would probably not be as effective as floating damage effects...

Having the wall check when a player has ordered their pet to attack it, is possible, -but would require a lot of modding that i haven't the time to do atm (you wouldn't have to edit any other files for this) - we can retrieve the ControlOrder of the attacker/Target owner by using a simple wrapper, if the Base Class does not already contain a method for something like OnTargeted();

Also, making this work for multi's is also entirely possible, but would also require a lot of modding, and a new BaseMulti class to be written, that inherits the Root Multi Class, so we can add/change a few properties but still keep functionality... The new BaseMulti Class would have to link the Root Node Tile of the Multi to the IDamageableItem (BaseCreature) - and we would have to remove the phases of damage (crubling) BUT... who knows, a few ParticleEffects randomly within the bounds of the region and you have FIRE!

Regards
 
there is an invisable body

seems to me it was 906 or something like that

if you search through the script support or server support area (maybe was even general chat) for for the "animated sword" or simular, you should find the thread on it

in there, the person did find the body value that was humanoid actualy, and could have equipment added, etc, but was invisible

*edit - i just did a quick check of my scripts - it was body 988 i do believe
 

Vorspire

Knight
Awesome, well you can try [Area Set BodyValue 988 over the walls and start attacking, see if it makes a difference :p

I'll update the scripts after i ruun a test or two :)

Thanks for the input!
 

aj9251

Sorceror
Error:

Code:
Errors:
 + Custom/BaseDesItem.cs:
    CS0117: Line 408: 'Server.Mobiles.BaseCreature' does not contain a definitio
n for 'Controled'
Caused by spelling mistake on line 408.

Change

Code:
!bc.Controled
to

Code:
!bc.Controlled

Very nice script. well done.

i have been trying to make something like this for quite a long time now.
 

Vorspire

Knight
nadious;754068 said:
Has nobody tried this on RC2 / SVN yet?

I think this is all you have to change for runuo 2.0 compatibility:

aj9251;754050 said:
Error:

Code:
Errors:
 + Custom/BaseDesItem.cs:
    CS0117: Line 408: 'Server.Mobiles.BaseCreature' does not contain a definitio
n for 'Controled'
Caused by spelling mistake on line 408.

Change

Code:
!bc.Controled
to

Code:
!bc.Controlled

Very nice script. well done.

i have been trying to make something like this for quite a long time now.
 

Vorspire

Knight
How did it go?

Please provide screenshots ^^

Thanks for taking interest...

Please forward any future ideas to me if you wish :)
 

nadious

Sorceror
We just did some testing in Green Acres (me and my other GM), but for the most part, it went well. We figured that if you 'props' it, you can change all three states of the item in question, to make all different kinds of breakable stuff. We are planning a big event sometime soon in Khaldun, (which our players haven't gone there yet...) and we are going to use these for sections of walls that one has to break through in order to get to the next section.

Should be great. I'll try to see if I can't get some screenshots for ya.
 

Vorspire

Knight
Awesome, sounds good!

Remember to make the IDDestroyed (Destroyed ID) into a "move-over-able" object, or players won't be able to p[ass over them..

Alternatively, you can make a simple edit to the OnDestroyed method in the BaseDesItem.cs to stop it dropping the "Remains"..

Regards
 

Vorspire

Knight
Still waiting on screenshots from anyone, please? :) - they will be featured in Post#1...

Can people please rate this thread if it's not too much trouble? :)

Regards
 
Top