|
||
|
|||||||
| 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 |
|
|
#52 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
what script do i add this to and where. did notice if it worked ? |
|
|
|
|
#54 (permalink) |
|
Master of the Internet
|
it does delete the ones that belong to it (or i assume the ones that belong to it)
I still have yet to see if i get an extra set upon boot up though - have not rebooted since i put the change in
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#56 (permalink) |
|
Master of the Internet
|
and there are no extras after a restart either - so i think problem is fixed
![]()
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#57 (permalink) |
|
Forum Novice
Join Date: Jul 2006
Age: 30
Posts: 746
|
Ok I just found a problem tonight. When a player attempted to use the "Gate Travel" from a rune located on page 8 of any of the 51 books . It pops a gump up asking if you want to remove the book instead of casting the Gate Travel spell. I tried it on all 51 and it is only page 8 of each book once added to the master rune book that the problem happens.
__________________
Friends Come and go but Enemies accumulate |
|
|
|
|
|
#58 (permalink) | |
|
Forum Expert
|
Quote:
Thanks for pointing this out. I have discovered the error. I was actually tripping over Gate Travel AND Sacred Journey. (options 96 and 97.) A new set of scripts will be posted shortly.
__________________
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-27-2007 at 07:14 AM. |
|
|
|
|
|
|
#61 (permalink) | |
|
Forum Expert
|
Quote:
Code:
private void AddIndex()
{
// Index
AddPage(1);
// Scroll Button (for adding Recall Scrolls)
//AddButton(236, 39, 5402, 5402, 97, GumpButtonType.Reply, 0);
AddButton(236, 34, 2510, 2510, 197, GumpButtonType.Reply, 0);
AddItem(221, 32, 8012);
// Remove Button (for dropping Runebook)
AddItem(350, 30, 0x22C5, 0x461);
AddButton(380, 36, 2181, 2181, 196, GumpButtonType.Reply, 0);
// List of entries
ArrayList entries = m_Book.Entries;
for (int i = 0; i < 16; ++i)
{
string desc;
int hue;
if (i < entries.Count)
{
desc = GetName(((RunebookEntry)entries[i]).Description);
hue = GetMapHue(((RunebookEntry)entries[i]).Map);
}
else
{
desc = "Empty";
hue = 0;
}
// Use charge button
AddButton(130 + ((i / 8) * 160), 65 + ((i % 8) * 15), 2103, 2104, 2 + (i * 6) + 0, GumpButtonType.Reply, 0);
if (i == entries.Count)
{
// (Button for adding Recall Rune for new Location)
AddButton(145 + ((i / 8) * 160), 62 + ((i % 8) * 15), 2510, 2510, 198, GumpButtonType.Reply, 0); //or 30087 or 4202
AddItem(129 + ((i / 8) * 160), 65 + ((i % 8) * 15), 7959);
}
else
// Description label
AddLabelCropped(145 + ((i / 8) * 160), 60 + ((i % 8) * 15), 115, 17, hue, desc);
}
// Turn page button
//AddButton(393, 14, 2206, 2206, 0, GumpButtonType.Page, 2);
}
private void AddDetails(int index, int half)
{
// Use charge button
AddButton(130 + (half * 160), 65, 2103, 2104, 2 + (index * 6) + 0, GumpButtonType.Reply, 0);
string desc;
int hue;
if (index < m_Book.Entries.Count)
{
RunebookEntry e = (RunebookEntry)m_Book.Entries[index];
desc = GetName(e.Description);
hue = GetMapHue(e.Map);
// Location labels
int xLong = 0, yLat = 0;
int xMins = 0, yMins = 0;
bool xEast = false, ySouth = false;
if (Sextant.Format(e.Location, e.Map, ref xLong, ref yLat, ref xMins, ref yMins, ref xEast, ref ySouth))
{
AddLabel(135 + (half * 160), 80, 0, String.Format("{0}° {1}'{2}", yLat, yMins, ySouth ? "S" : "N"));
AddLabel(135 + (half * 160), 95, 0, String.Format("{0}° {1}'{2}", xLong, xMins, xEast ? "E" : "W"));
}
// Drop rune button
AddButton(135 + (half * 160), 115, 2437, 2438, 2 + (index * 6) + 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(150 + (half * 160), 115, 100, 18, 1011298, false, false); // Drop rune
if (Core.AOS)
{
AddButton(135 + (half * 160), 140, 2103, 2104, 2 + (index * 6) + 3, GumpButtonType.Reply, 0);
AddHtmlLocalized(150 + (half * 160), 136, 110, 20, 1062722, false, false); // Recall
AddButton(135 + (half * 160), 158, 2103, 2104, 2 + (index * 6) + 4, GumpButtonType.Reply, 0);
AddHtmlLocalized(150 + (half * 160), 154, 110, 20, 1062723, false, false); // Gate Travel
AddButton(135 + (half * 160), 176, 2103, 2104, 2 + (index * 6) + 5, GumpButtonType.Reply, 0);
AddHtmlLocalized(150 + (half * 160), 172, 110, 20, 1062724, false, false); // Sacred Journey
}
else
{
// Recall button
AddButton(135 + (half * 160), 140, 2271, 2271, 2 + (index * 6) + 3, GumpButtonType.Reply, 0);
// Gate button
AddButton(205 + (half * 160), 140, 2291, 2291, 2 + (index * 6) + 4, GumpButtonType.Reply, 0);
}
}
else
{
desc = "Empty";
hue = 0;
}
// Description label
AddLabelCropped(145 + (half * 160), 60, 115, 17, hue, desc);
}
public InternalRunebookGump(Mobile from, InternalRunebook book, MasterRunebook masterbook, int booknum)
: base(150, 200)
{
m_Book = book;
m_MasterBook = masterbook;
m_BookNum = booknum;
AddBackground();
AddLabel(137, 12, 0, m_Book.Name);
AddLabel(312, 32, 0, "Return");
AddButton(288, 34, 2223, 2223, 199, GumpButtonType.Reply, 0);
if (booknum > 0)
{
AddButton(283, 14, 9766, 9767, booknum + 199, GumpButtonType.Reply, 0);
AddLabel(303, 12, 0, string.Format("{0}", ((int)(booknum)).ToString()));
}
if (booknum < 50)
{
AddButton(407, 14, 9762, 9763, booknum + 201, GumpButtonType.Reply, 0);
AddLabel(387, 12, 0, string.Format("{0}", ((int)(booknum + 2)).ToString()));
}
AddIndex();
for (int page = 0; page < 8; ++page)
{
AddPage(2 + page);
//AddButton(125, 14, 2205, 2205, 0, GumpButtonType.Page, 1 + page);
//if (page < 7)
// AddButton(393, 14, 2206, 2206, 0, GumpButtonType.Page, 3 + page);
for (int half = 0; half < 2; ++half)
AddDetails((page * 2) + half, half);
}
}
public static bool HasSpell(Mobile from, int spellID)
{
Spellbook book = Spellbook.Find(from, spellID);
return (book != null && book.HasSpell(spellID));
}
public override void OnResponse(NetState state, RelayInfo info)
{
Mobile from = state.Mobile;
if (m_MasterBook.Deleted || !from.InRange(m_MasterBook.GetWorldLocation(), 1) || !Multis.DesignContext.Check(from))
return;
int buttonID = info.ButtonID;
if (buttonID == 196)
{
from.CloseGump(typeof(InternalRunebookGump));
from.SendGump(new OKTargetGump("Remove Runebook?", 16777215,
"Are you sure you want to remove this Runebook?",
16777215, 300, 300, new GenericOKCallback(RemoveRunebook_Callback), m_MasterBook, m_Book, m_BookNum));
}
else
if (buttonID == 197)
{
from.CloseGump(typeof(InternalRunebookGump));
from.SendGump(new InternalRunebookGump(from, m_Book, m_MasterBook, m_BookNum));
from.SendMessage("Target a Recall Scroll to add charges.");
from.Target = new InternalTarget(m_Book, m_MasterBook, m_BookNum);
}
else
if (buttonID == 198)
{
from.CloseGump(typeof(InternalRunebookGump));
from.SendGump(new InternalRunebookGump(from, m_Book, m_MasterBook, m_BookNum));
from.SendMessage("Target a Recall Rune to add a destination.");
from.Target = new InternalRuneTarget(m_Book, m_MasterBook, m_BookNum);
}
else
if (buttonID == 199)
{
from.CloseGump(typeof(InternalRunebookGump));
from.SendGump(new MasterRunebookGump(from, m_MasterBook));
}
else
if (buttonID > 199)
{
from.CloseGump(typeof(InternalRunebookGump));
from.SendGump(new InternalRunebookGump(from, m_MasterBook.Books[buttonID - 200], m_MasterBook, buttonID - 200));
}
Just noticed one I missed, The very last one in Purple, I am changing that one now. (oops.) |
|
|
|
|
|
|
#62 (permalink) |
|
Newbie
|
When I first put in the Master Recall Book, it worked fine. Then today it when my other admin and I tried using it, it started causing the shard to crash. Below is the crash report I keep getting whenever we try to use the book:
Server Crash Report =================== RunUO Version 2.0, Build 2357.32527 Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2 .NET Framework: 2.0.50727.832 Time: 9/19/2007 9:05:07 PM Mobiles: 7163 Items: 167935 Clients: - Count: 2 + 68.214.210.142: (account = Scoobie) (mobile = 0xF8C 'WildOrchid') + 70.90.114.90: (account = purplehaze) (mobile = 0x7 'Platinum Kyss') Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Server.Gumps.MasterRunebookGump.OnResponse(NetStat e state, RelayInfo info) at Server.Network.PacketHandlers.DisplayGumpResponse( NetState state, PacketReader pvSrc) at Server.Network.MessagePump.HandleReceive(NetState ns) at Server.Network.MessagePump.Slice() at Server.Core.Main(String[] args) Any idea's what could be causing this? I did search your posts and didn't see anything else regarding this. Thank you Platinum Kyss/ Peg Crystal Blue Persuasion |
|
|
|
|
|
#63 (permalink) |
|
Forum Expert
|
@Paggylee
Sorry this is so late. I have been away a while. Since nobody else has reported this, and I never saw this while testing, I am not sure right off what it could be. Can you run the Server in -debug mode and post the crash log again? This way it will show the exact line where the null reference is found. Thanks. |
|
|
|
|
|
#64 (permalink) |
|
Newbie
|
Ummm Debug mode? what is that and how do I do it? Once I go into this debug mode, how do I get out of it and please tell me exactly what I need to do. Do I do this right after I have the crash report?
Thank you for answering and that is alright that it took you a while. I am still looking for a job, so I have time on my hands till then.. Peg Last edited by paggylee; 09-26-2007 at 09:50 AM. |
|
|
|
|
|
#65 (permalink) |
|
Newbie
|
ok I found the instructions, just want to know if the following is what I am suppose to put in cause I am getting nada:
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Peg> cd ../../ C:\>cd C:\Program Files\RunUO 2.0\RunUO-2.--RC1 The system cannot find the path specified. C:\>server.exe -debug 'server.exe' is not recognized as an internal or external command, operable program or batch file. C:\> Sorry, but as you can tell. I know very little about this type stuff. Thank you Peg Last edited by paggylee; 09-26-2007 at 10:29 AM. |
|
|
|
|
|
#66 (permalink) |
|
Forum Expert
|
1. Go to the folder where you server is located.
2. Right-click, and click NEW -> Text Document. 3. Open it, and type the following on the first line: Server.exe -debug 4. Save it as debug.bat (make sure it does not save it as a ".TXT" file. You want the extension at the end to be .BAT, not .TXT or else it will not work. 5. Double-click on debug.bat instead of Server.exe to run in debug mode. If you prefer, you can use this simple batch file I am attaching here. Simply unzip it and run it in the same directory that has your Server.exe file. It is interactive, and lets you choose to run in Service Mode or Debug Mode or both. |
|
|
|
|
|
#67 (permalink) |
|
Newbie
Join Date: Feb 2007
Posts: 41
|
Ok first of all I love the idea of this but I have a few questions.
1. Have you fixed all the memory leaks in the posted distro? 2. I wanted to use this for players to replace the commen rune libs. that players make but I have found that players can't open it if its locked down in a house. Can that be fixed if so how?
__________________
Sar Dain Co-Owner Unicorn Heaven |
|
|
|
|
|
#68 (permalink) | ||
|
Forum Expert
|
Quote:
Quote:
|
||
|
|
|
|
|
#70 (permalink) |
|
Forum Novice
Join Date: Oct 2003
Posts: 161
|
I've experienced a few issues with this. When clicking next to get to nextpage then clicking the top runebook, it'll open book #1. If you click the 2nd book on 2nd page, it'll open book #2 instead of #19. Second problem is that every once in awhile, it crashes shard(every 4-5 weeks or so, this is likely because only a select few players have it) The last time the player said they clicked a book on 1st page
Code:
Server Crash Report =================== RunUO Version 2.0, Build 2702.22364 Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2 .NET Framework: 2.0.50727.832 Time: 1/17/2008 9:45:42 PM Mobiles: 6628 Items: 284187 Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array. at Server.Gumps.MasterRunebookGump.OnResponse(NetState state, RelayInfo info) in c:OasisSVNScriptsCustomMasterrunebookMasterRunebookGump.cs:line 71 at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc) at Server.Network.MessagePump.HandleReceive(NetState ns) at Server.Network.MessagePump.Slice() at Server.Core.Main(String[] args) |
|
|
|
|
|
#71 (permalink) | |
|
Forum Expert
|
Quote:
Change this: Code:
AddButton(XposB, YposB, 1802, 1802, bk, GumpButtonType.Reply, 0); Code:
AddButton(XposB, YposB, 1802, 1802, bk + (17 * x), GumpButtonType.Reply, 0); |
|
|
|
|
|
|
#72 (permalink) |
|
Forum Novice
Join Date: Jan 2003
Location: (Near) Atlanta, GA
Posts: 527
|
Loki,
I'm in the process of upgrading my SVN #187 shard to the latest, ast SVN #295. I'm getting the following error: Code:
Errors:
+ Custom/Custom Items/Loki's Master Runebooks 2.0/InternalRunebookGump.cs:
CS0029: Line 103: Cannot implicitly convert type 'System.Collections.Generic
.List<Server.Items.RunebookEntry>' to 'System.Collections.ArrayList'
|
|
|
|
|
|
#73 (permalink) | |
|
Forum Expert
|
Quote:
[RunUO 2.0 RC2] *Updated* Master Runebook It should fix the ArrayList to List<> issue. On a 2nd and completely personal note, why shorten my name by one letter? ![]() |
|
|
|
|
|
|
#75 (permalink) |
|
Forum Novice
Join Date: Aug 2003
Location: Malas
Age: 42
Posts: 270
|
Server Crash when deleting a Master Rune book, started when i was deleting old accounts so i went and removed the book from there bag and then tried to delete it myself and crashed again.
Code:
RunUO Version 2.0, Build 2959.20979 Operating System: Microsoft Windows NT 5.1.2600 Service Pack 3 .NET Framework: 2.0.50727.1433 Time: 1/15/2009 2:06:31 PM Mobiles: 4875 Items: 124595 Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Server.Items.MasterRunebook.OnDelete() at Server.Item.Delete() at Server.Commands.Generic.DeleteCommand.Execute(CommandEventArgs e, Object obj) at Server.Commands.Generic.BaseCommandImplementor.RunCommand(Mobile from, Object obj, BaseCommand command, String[] args) at Server.Commands.Generic.SingleCommandImplementor.OnTarget(Mobile from, Object targeted, Object state) at Server.Mobile.SimpleStateTarget.OnTarget(Mobile from, Object targeted) at Server.Targeting.Target.Invoke(Mobile from, Object targeted) at Server.Network.PacketHandlers.TargetResponse(NetState state, PacketReader pvSrc) at Server.Network.MessagePump.HandleReceive(NetState ns) at Server.Network.MessagePump.Slice() at Server.Core.Main(String[] args) Clients: - Count: 1
__________________
Save the flames for your own personal life |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|