|
||
|
|||||||
| 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
|
/************ LightSwitch.cs v.2 **********
* * (C) 2008, Lokai * * Description: (Player) house item that * will turn on BaseLights which are * locked down. Switch must be locked * down to use, also. (GameMaster) * item that will turn on BaseLights * anywhere in the world that you have * linked to the Switch. * Usage: Use the Connect or Disconnect * context menu to add or remove lights * from the group of lights that the * Switch will control. You can link * an unlimited number of lights. * *******************************************/ Light Switch What is it? Uh....it turns on the lights in the house. Version 2 also lets GMs use it anywhere in the world! How do you add it? [add LightSwitch (of course, you can also sell them on vendors, etc.) Installation: Place in scripts folder anywhere. As per what Tru said, if you want this to be accessible to anyone, make this change: in BaseHouse.cs after this Code:
else if ( item is Clock )return true; add this Code:
else if ( item is LightSwitch ) return true; - It is a Flippable Furniture item, so it can be locked down, and turned to be put facing either direction. - It will switch up(ON) and down(OFF) when double-clicked. - It will only operate your lights when it is Locked Down. - It will turn On and Off EVERY light in your house that is also Locked Down. - It does not check to see if you own the house. (After all, anyone can flip a switch, right?) ![]() EDIT: Added new download. Check it out.
__________________
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; 05-08-2008 at 10:30 AM. Reason: fixed bug in connect method |
|
|
|
|
|
#5 (permalink) |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 40
Posts: 3,260
|
Have to edit BaseHouse to be able to use it though.
![]()
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
#7 (permalink) |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 40
Posts: 3,260
|
in BaseHouse.cs after this
Code:
else if ( item is Clock ) return true; Code:
else if ( item is LightSwitch ) return true;
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
#10 (permalink) |
|
Forum Expert
|
Not sure about 1.0. I never use it any more.
Check out new download. - Fixed ItemID goof in the Switch. - Added "clap on", "clap off" support. Please comment this out if you don't like it, but I couldn't resist. It animates and shuts on and off the lights on command. ![]() |
|
|
|
|
|
#11 (permalink) |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 40
Posts: 3,260
|
Nope anyone not access level wouldnt be able to access it. I tried it initially with the owner of a house.
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
#12 (permalink) |
|
Guest
Posts: n/a
|
im getting 2 errors here any idea what i might need to change
[code] - Error: Scripts\custom\LightSwitch.cs: CS0117: (line 61, column 17) 'string' d oes not contain a definition for 'Contains' - Error: Scripts\custom\LightSwitch.cs: CS0117: (line 66, column 17) 'string' d oes not contain a definition for 'Contains' [code] |
|
|
|
#13 (permalink) | |
|
Forum Expert
|
Quote:
![]() string.Contains is a valid bool. What version of .Net are you using? |
|
|
|
|
|
|
#18 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
i think it has something to do with 1.0 and the word contains |
|
|
|
|
#19 (permalink) | ||
|
Forum Expert
|
Quote:
When you start the Server, it says exactly which versions you are running. Quote:
|
||
|
|
|
|
|
#21 (permalink) |
|
Forum Expert
Join Date: Jul 2005
Age: 32
Posts: 410
|
Very nice script, i installed it and was amazed right away......like: LET THERE BE LIGHT....and click there it IS!
lmao I have a suggestion; Maybe have in props for a timer to set on or off and time to set timer to, also maybe have it where you can alos link them to certain lights instead of all: so you'd have the choices of decoing diff rooms or even setting a path in a dungeon for players to follow..... ....just some ideas, but i'd love to see those included if you know how and have time to do it. I dont think i'd be able to script it myself - Mainly because i dont have much time anymore with new job, also dotn think im good enough scripter yet to figure that much out.
__________________
LoveTheGame...ClickHere. Owner Of SecretsOfClones Feel free to check it out so far... |
|
|
|
|
|
#22 (permalink) | |
|
Forum Expert
|
Quote:
|
|
|
|
|
|
|
#23 (permalink) |
|
Forum Novice
Join Date: Mar 2004
Location: Wisconsin
Age: 45
Posts: 813
|
We are just about to hold a House Deco Contest and many players are using types of lighting for effect - this is an excellent item to give each contestant for thier home.
Simple. Nice. Enough said! Koluch a.k.a - Hater of nightsite and removing the nice glow that was once a valuable part of the feel of UO.
__________________
If the words are coming from someone whos opinion you value, think it over, if not, consider the source.
|
|
|
|
|
|
#24 (permalink) |
|
Forum Expert
|
Just released v2 of this script:
* Description: (Player) house item that * will turn on BaseLights which are * locked down. Switch must be locked * down to use, also. (GameMaster) * item that will turn on BaseLights * anywhere in the world that you have * linked to the Switch. * Usage: Use the Connect or Disconnect * context menu to add or remove lights * from the group of lights that the * Switch will control. You can link * an unlimited number of lights. |
|
|
|
|
|
#25 (permalink) |
|
Forum Expert
|
I discovered a potential problem in the latest version of the script. It is possible for a mischievous Player to have a bit of fun with this...
If a Player were to carry his LightSwitch around with him, he could link it to BaseLights all over the world, in people's homes, dungeons, anywhere. Now, the Player himself would not be able to affect any of those lights, but if he then installed the switch in his house, and an unsuspecting GM came along, the GM could accidentally ignite or douse all of those lights all over the world by flipping the switch. oops.** EDIT ** There was also a bug allowing Players to try to flip the switch while it was not in their house, causing Null Reference errors. The problems have been corrected. New file posted.
__________________
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; 05-08-2008 at 10:29 AM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|