Lighting - version .5
Modified by: Oroborous Dec 28/2000

Added duration property that is used from the Change() function.  Now light sources can have a duration before they burn out.  Set the "Duration" property (not a CProp!) on the UNLIT item.  The value is in minutes.  Torch1 for example has a Duration 10, which mean 10 minutes of total burn time.  If the light is extinguished, its burn time is preserved till lit again.

After the burn time is exhausted, the item will be named "a burned out xxxx" where xxxx is the desc of the original item.  You can easily add this to lanterns and create a script for oil flasks to remove the "Duration" CProp from the item, that will allow it to be relit again once refilled.

 

Lighting - version .4
Created by Zulu Jan 15, 2000 - updated March 28, 2000

My temporary email address is zuluhotel@hotmail.com

In version .3 - I have added some new objects in the itemdesc.cfg file.

Thanks to Helldrige for his updates. He has a great PERL program that will convert all of the old items to the settings. Helldrige and I worked on making sure our two programs are in sync. Follow this link to Helldrige's website

In version .2 - I have updated the itemdesc.cfg to include all of the walls with windows. If you already installed the lighting system, then just replace the itemdesc.cfg in the \POL\pkg\opt\lighting\ directory.

This lighting system will fix all of the items that have light sources. Plus it will allow any object to be double clicked with the following result.

- the object can change to show a different image
- when the object is dclicked again, it will return to the original image
- there can be a sound effect played when the image is changing
- you can set objects that can only be changed by staff members

This system works great for touches, street lamps, etc. I have included most objects that have a light source, they are fully accessible from HOD. You can also use objects like the sleeping bag, I have included the two sleeping bags that will unroll/roll when dclicked.


Extra Effects:

If you want to see some of the new lighting system in color, do the following: Edit the uo.cfg file from the \uo\desktop\... directory NOT the \uo\ directory. Sample path is below: D:\UO\Desktop\gm\ZuluHotel\Zulu gm = the account name you are using ZuluHotel = the shard name Zulu = the char name Change ColoredLighting=off to ColoredLighting=on Save the file and restart UO.

How does it work:

In the \POL\pkg\opt\lighting\itemdesc.cfg file you can add the following items to control objects.

Cprop change i#
Cprop changesnd i#
Cprop originsnd i#
Cprop staff i1

# means replace the # with a DECIMAL number. So, if you want an object's new image to be 0x0B21, then you would have to use DECIMAL 2849 Sounds will also have to be converted to DECIMAL.

change is what graphic to change to.
changesnd is what sound to play when changing to NEW graphic.
originsnd is what sound to play when changing to OLD graphic.
staff is only used if you ONLY want staff to be able to change the item.

If you set it 3, then only GMs and Admins can change the object. Players won't be able to. A setting of 1 will allow all staff to change the object.
Counselor = 1
Seer = 2
GM = 3
Administrator = 4


How to set up the script:

This will require editing and changing files. If you are NOT that familiar with POL or editing files, maybe you not attempt this. If you decide that want try this, MAKE back ups of the following files. Do NOT skip this step, this is for your own safety.

\POL\config\itemdesc.cfg
\POL\pkg\std\decorations\itemdesc.cfg

The lighting system designed to replace any scripts that change the image. The following files are not longer required and should be deleted:

\POL\scripts\items\torch.ecl
\POL\scripts\items\torch.src

If you the following files delete them too:

\pol\pkg\std\tinkering\candlabra.src
\pol\pkg\std\tinkering\candlabra.ecl
\pol\pkg\std\tinkering\lantern.src
\pol\pkg\std\tinkering\lantern.ecl
\pol\pkg\std\tinkering\sconce.src
\pol\pkg\std\tinkering\sconce.ecl


Installing the Lighting System:

Unzip lighting.zip to \POL\pkg\opt\lighting


Editing files:

Load the \POL\config\itemdesc.cfg into notepad or any editor. Delete the following items from the script:

Item 0x0f64
{
Name Torch
Script torch
VendorSellsFor 7
VendorBuysFor 3
}

Item 0x1853
{
Name SkullWithCandle
}

Item 0x0A0F
{
Name candle
}

Item 0x0de3
{
Name campfire
SaveOnExit 0
movable 0
}

Now we have to edit some of the items. Find the following item:

Item 0x0F6C
{
Name bluemoongate
WalkOnScript moongate
SaveOnExit 0
}

Replace it with the following:

Item 0x0F6C
{
Name bluemoongate
Facing 2
WalkOnScript moongate
SaveOnExit 0
movable 0
}

Item 0x0dda
{
Name redmoongate
Facing 2
WalkOnScript moongate
SaveOnExit 0
movable 0
}

Item 0x1fd4
{
Name blackmoongate
Facing 2
WalkOnScript moongate
SaveOnExit 0
movable 0
}

Item 0x1fe7
{
Name whitemoongate
Facing 2
WalkOnScript moongate
SaveOnExit 0
movable 0
}

Find the following item:

Item 0x6002
{
Name moongate
Graphic 0x0F6C
WalkOnScript timedmoongate
SaveOnExit 1
}
Replace it with the following:

Item 0x6002
{
Name moongate
Graphic 0x0F6C
Facing 2
WalkOnScript timedmoongate
SaveOnExit 1
movable 0
}
Find the following item:

Item 0x398c
{
Name firefield
SaveOnExit 0
WalkOnScript fires
movable 0
ControlScript firecontrol
}

Item 0x3996
{
Name fire_field
SaveOnExit 0
WalkOnScript fires
movable 0
ControlScript firecontrol
}

Item 0x3946
{
Name energyfield
SaveOnExit 0
movable 0
}

Replace it with the following:

Item 0x398c
{
Name firefield
SaveOnExit 0
WalkOnScript fires
Facing 2
movable 0
ControlScript firecontrol
}

Item 0x3996
{
Name fire_field
SaveOnExit 0
WalkOnScript fires
Facing 2
movable 0
ControlScript firecontrol
}

Item 0x3946
{
Name energyfield
SaveOnExit 0
Facing 2
movable 0
}

Find the following item:

Item 0x3914
{
Name poisonfield_ns
SaveOnExit 0
WalkOnScript poisonfield
movable 0
controlscript poisoncontrol
}

Item 0x3920
{
Name poisonfield_ew
SaveOnExit 0
walkonscript poisonfield
movable 0
controlscript poisoncontrol
}

Replace it with the following:

Item 0x3914
{
Name poisonfield_ns
SaveOnExit 0
WalkOnScript poisonfield
Facing 2
movable 0
controlscript poisoncontrol
}

Item 0x3920
{
Name poisonfield_ew
SaveOnExit 0
walkonscript poisonfield
Facing 2
movable 0
controlscript poisoncontrol
}

Find the following item:

Item 0x3967
{
Name parafield1
WalkonScript walkon_parafield
saveonexit 0
movable 0
}

Item 0x3979
{
Name parafield2
WalkonScript walkon_parafield
saveonexit 0
movable 0
}

Replace it with the following:

Item 0x3967
{
Name parafield1
WalkonScript walkon_parafield
saveonexit 0
Facing 2
movable 0
}

Item 0x3979
{
Name parafield2
WalkonScript walkon_parafield
saveonexit 0
Facing 2
movable 0
}

Save the file

Load the \POL\pkg\std\decorations\itemdesc.cfg into notepad or any editor. Delete the following items from the script:

Item 0x0B26 // tall candlabra
{
Name tallcandlabra
VendorSellsFor 300
VendorBuysFor 120
}

Item 0x0E31 // brazier
{
Name brazier
VendorSellsFor 350
VendorBuysFor 140
}

Item 0x1854 // skull candle
{
Name skullcandle
VendorSellsFor 100
VendorBuysFor 20
}

Find the following item:


Item 0x0E5C // glowing "C" rune
{
Name glowingcrune
VendorSellsFor 500
VendorBuysFor 75
}

Item 0x0E5F // glowing "H" rune
{
Name glowinghrune
VendorSellsFor 500
VendorBuysFor 250
}

Item 0x0E68 // glowing "W" rune
{
Name glowingwrune
VendorSellsFor 500
VendorBuysFor 250
}

Item 0x0E62 // glowing "M" rune
{
Name glowingmrune
VendorSellsFor 500
VendorBuysFor 250
}

Item 0x0E66 // glowing "O" rune
{
Name glowingorune
VendorSellsFor 500
VendorBuysFor 250
}

Replace it with the following:


Item 0x0E5C // glowing "C" rune
{
Name glowingcrune
Facing 2
VendorSellsFor 500
VendorBuysFor 75
}

Item 0x0E5F // glowing "H" rune
{
Name glowinghrune
Facing 2
VendorSellsFor 500
VendorBuysFor 250
}

Item 0x0E68 // glowing "W" rune
{
Name glowingwrune
Facing 2
VendorSellsFor 500
VendorBuysFor 250
}

Item 0x0E62 // glowing "M" rune
{
Name glowingmrune
Facing 2
VendorSellsFor 500
VendorBuysFor 250
}

Item 0x0E66 // glowing "O" rune
{
Name glowingorune
Facing 2
VendorSellsFor 500
VendorBuysFor 250
}

Save the file and start POL.