|
||
|
|||||||
| 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
|
Linked Books, and Linked Bags
These are fun. Mordero released his Journey Books, and was wondering if the same type of thing could be done without editing the basebook script. Here is his post: [RunUO 2.0 RC1] Journey Books But these 2 scripts are actually very different. The actual scripting of them were more inspired by my own release of the Linked Gates, which you can view here: Linked Gates First, the Linked Books. The magic starts with a bag. A Bag of Linked Books. You double-click the empty bag, and you get 2 books, which are bound (no pun intended) to eachother forever. As long as the bag is empty, it will create 2 Linked Books every time you open it. (GM's only, although you can play with that part.) Each book is just like a regular book in almost every way, except when you double-click it, it toggles between showing you its own contents, and that of it's mate. The mate acts the same way. Each time you open the book it will toggle back and forth, so it acts sort of like a magic communication device, I guess. Anyway, it's fun. Next, the Linked Bags. These are a riot. They are created in the same way. You get a Bag of Linked Bags. When you double-click the bag, it creates 2 Linked Bags (with your name on it too.) The bags act like you would probably guess. When you drop something in one, it actually appears inside the other. It doesn't matter who is holding it, or where it is, if the bag can hold it, it will drop it in. (Don't worry, you can't give it to an enemy and overload him so you can PK him. It does the normal check to see if the bag can hold the contents.) Installation: Drop and go! Maintenance: If for some reason a mate gets deleted, you can target a new one by using [props. Enjoy! UPDATES: 6/16/2007 - Added Linked Gates script to downloads. - Edited Linked Books. Now you can open the 2nd book from anywhere in Read-Only mode. - Updated Linked Bags to prevent them from accepting Linked Bags.
__________________
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; 06-16-2007 at 10:48 PM. |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Jan 2003
Location: California
Age: 40
Posts: 3,260
|
Excellent. Cool rewards!
__________________
My Scripts: HoodableRobe CellarAddon SeigeUpdates Refresh/CloneMe Commands VooDoo Dolls Lost Alchemy SVN 187 Updates: Bard System + Upgrade Ultima VII |
|
|
|
|
|
#3 (permalink) |
|
Forum Master
|
Just noticed something with the books
if they are in 2 different packs - can not open the one in the other pack - it ignores the dbl click, and next time open yours again if one is in pack and 1 in house (locked down or not) - one in pack can open both, but one in house can not open one in pack and if both are in different houses and locked down - they can only open themselves and not the other one so basicaly one person can carry it and write in the book in the house, or if both in same pack can write to both, otherwise problem so any ideas on a fix?
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#4 (permalink) | |
|
Forum Expert
|
Quote:
|
|
|
|
|
|
|
#5 (permalink) |
|
Forum Expert
|
Just updated the first post.
- Edited the Linked Books so when you double-click the 2nd time, no matter where the book is in the world it will show you the contents in Read-Only mode. - Added my Linked Gates to the list of downloads, and separated the scripts into 3 zip files. |
|
|
|
|
|
#6 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
![]() |
|
|
|
|
#7 (permalink) |
|
Forum Expert
|
I added this class:
Code:
public sealed class LinkedBookHeader : Packet
{
public LinkedBookHeader(Mobile from, BaseBook book)
: base(0xD4)
{
string title = book.Title == null ? "" : book.Title;
string author = book.Author == null ? "" : book.Author;
byte[] titleBuffer = Utility.UTF8.GetBytes(title);
byte[] authorBuffer = Utility.UTF8.GetBytes(author);
EnsureCapacity(15 + titleBuffer.Length + authorBuffer.Length);
m_Stream.Write((int)book.Serial);
m_Stream.Write((bool)true);
m_Stream.Write((bool)book.Writable);
m_Stream.Write((ushort)book.PagesCount);
m_Stream.Write((ushort)(titleBuffer.Length + 1));
m_Stream.Write(titleBuffer, 0, titleBuffer.Length);
m_Stream.Write((byte)0); // terminate
m_Stream.Write((ushort)(authorBuffer.Length + 1));
m_Stream.Write(authorBuffer, 0, authorBuffer.Length);
m_Stream.Write((byte)0); // terminate
}
}
Code:
from.Send(new LinkedBookHeader(from, book)); //changed this line
from.Send(new BookPageDetails(book));
Toggle = !Toggle;
}
|
|
|
|
|
|
#8 (permalink) |
|
Forum Master
|
will give it a try
at least this way they can read it ![]() did you change linkbags at all? (i have not noticed any problem with them yet - just making sure of no changes)
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#9 (permalink) |
|
Guest
Posts: n/a
|
with the bags that is if u drop the linked bag into the other liked bag they will remove each other and become part of the internal items.
need a check to not allow u to drop the bag in one another. ![]() i like the scripts alot u the man lokai |
|
|
|
#11 (permalink) |
|
Forum Expert
|
This ought to take care of it:
Code:
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
{
if (item is LinkedBag) return false; //This line added.
__________________
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; 06-16-2007 at 10:49 PM. |
|
|
|
|
|
#14 (permalink) |
|
Forum Novice
Join Date: May 2005
Age: 28
Posts: 157
|
on line 36 of LinkedBags.cs:
Code:
if (item is LinkedBag) return false; Code:
if( item is LinkedBag || item is Gold || item is PowerScroll ) return false;
__________________
Universal Storage Keys - I won't stop until I've found a way to stick an entire shard into these things! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|