View Single Post
Old 05-11-2007, 01:46 PM   #1 (permalink)
Lokai
Forum Expert
 
Lokai's Avatar
 
Join Date: Aug 2003
Location: Bergen, NY (Rochester)
Age: 42
Posts: 1,493
Send a message via ICQ to Lokai Send a message via MSN to Lokai Send a message via Yahoo to Lokai
Default [2.0] House Paints - Paint just about anything...

**UPDATED**

5/14/2007 10:24AM:

Modify your BaseHouse.cs as follows to have Painted Walls automatically delete when the house is destroyed:


In BaseHouse.cs, add Lokai's House Paints Region as below:
PHP Code:
   if ( m_LockDowns != null )
   {
    for ( 
int i 0m_LockDowns.Count; ++)
    {
     
Item item = (Item)m_LockDowns[i];
     if ( 
item != null )
     {
      
item.IsLockedDown false;
      
item.IsSecure false;
      
item.Movable true;
      
item.SetLastMoved();
      
#region Lokai's House Paints
      
if (item is PaintedItem)
       
item.Delete();
      
#endregion
     

5/14/2007:

- Fixed many errors including null exceptions.
- Made it so Painted walls are movable (but you still can't move them)
- Painted walls are locked down when created.
- Users must Release the old paint in order to repaint it.
- Hopefully this will decrease Item-lag.
- Fixed targeting issues.
- Players may now paint from just outside their house, but must still target a house they own.
- GMs can still paint anywhere.
- Fixed bug allowing players to paint all over town.

KNOWN ISSUES:

- When users log in, their Client may load the Locked-down painted items before the regular house walls. This causes the paint to disappear. Not sure if the Lockdown feature will fix this. If anyone has an idea on setting a priority level or something so that the Painted walls display last, let me know.
- Painted Walls look movable. This is NOT a bug. Think of it like this: if you don't SEAL the paint job, it will wear off (ie, Decay.) Users must Secure them to prevent them from fading. (An added bonus is that this may reduce excessive painting, since it lowers the total Lockdowns available.)

************************************************** ******

Lokai's Paints and More.

I was challenged by a thread you can view here....

Script idea: House Paint

...to create a House Painting system. At first I thought, this will never work.

I should have known better...

What's included:

Paint Cans (look suspiciously like Dye Tubs...)
Paint Dyes (I should make these consumable.)
Custom Hue Pickers (these are for various types of housing materials...)

How to install:

Unzip and drop in your Scripts folder. NOTE: The file CustomHuePicker.cs has been modified, and is included in it's original folder, so if you drop these files in it will overwrite your file. (For most people this will not be a problem, since it is not a popular file to customize.) But, if you have made customizations, just add/merge the CustomHuePickers that I wrote in to your script.

How to use:

Just like Dye tubs, you add them, either by selling them in stores or resource vendors, or [add ing them in game, or giving them as Veteran Rewards. To use, double-click Paint Dyes and target the appropriate Paint Can. Then, double-click the Paint Can and target any Static house section, Custom House section, [add ed House Item, or Multi house section. By the way, I did not include any Metal doors or other similar items in the list of items that can be Painted. If you see something that you want to add, simply [props it, and add the number to the "CanPaint" method. (Sorry, no adding on the fly.)

Cans are tied to the type of material used in the house, so Wooden structures need the Wood House Paint, and Stone House Paint for the Stone houses, etc. The 'Other House Paint' is for Hides, Rattan, Bamboo and Paper. Since these materials are considered non-washable, I have made them non-redyable also. Paint Cans have 50 Uses by default.

The only exception is the GMHousePaint, which can be used on any House type. GMHousePaint is also not limited to 50 uses.

Let me know if there are bugs or improvement suggestions.
Attached Files
File Type: zip House Paints.zip (9.0 KB, 248 views)

Last edited by Lokai; 05-14-2007 at 10:25 AM. Reason: Fixed errors.
Lokai is offline   Reply With Quote