|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
|
Taken this system down since it has had no complaints from the people that are using the ACC. Go there and use that.
This system has been integrated to ACC. If anyone is interested in testing, please follow this link and download and install the package. You can then delete this system (all locations will update to the new system) You will have to do [GenGates to generate the gates again. I've gotten tired of all the requests to edit the PublicMoongate script in the support forum, so I decided to make something that can be modified in game. This system is to be used with or without the normal PublicMoongates. I've hard coded in the default locations that are distro. You can chose to use these or not. Custom Public Gates Description: Custom gate system that allows a GM to add new locations on-the-fly. Allows the following settings:
Installation: Simply extract the zip to your favorite Customs directory and load the server up. Instructions: Commands:
If you want to remove a category/location, simply hit 'Edit' and erase the name and hit 'Apply'. This will remove entry. If the entry is a category, it will also remove all locations in that category. *NEW* There is a new button that allows you to add the current gate to the system. Select the category you want to add it in and hit the button (top-left of right panel) and it will add an 'Un-named Gate'. You can then go in and edit the things you want. This was added to make it easier to add gate locations. Credits: Arya - For the wonderful Auction System that I used some code from. Change Log: Closed - Only supporting ACC version now. Check Sigi or top of thread. 1.0.3a - (Hopefully) fixed a bug where players using Razor could access the Add/Edit gump and change things. - PGGump.cs, PGAddEditGump.cs 1.0.3 - Added "Add Current Gate" button to main gump. See above for info. - PGGump.cs, PGControl.cs 1.0.2a - Fixed the deleting of entries when editing categories. - PGAddEditGump.cs 1.0.2 - Gates now display the page that your current location is in when you use them. - PGGump.cs, PublicGate.cs 1.0.1b - Fixed a couple default Locations - PGControl.cs (quickfix on post 29) 1.0.1a - Fixed a crash when selecting Edit Location without selecting a Location. - PGGump.cs 1.0.1 - Added the regular checks for range/crim/factions that PublicMoongate uses. Also added the pet teleporting feature in. Thanks Demonic Seed for pointing them out. - Replace all files. 1.0.0 - Base. I've done some testing, but there always can be things I miss, so please post back any crashes/errors/changes you might have. Suggestions are always welcome. (Search Purposes - Custom Public Moongate PublicMoongate) Last edited by A_Li_N; 03-25-2006 at 06:28 AM. |
|
|
|
|
#4 (permalink) | |
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Huh, thanks for releasing this. I recently had edited my moongates to allow murderers to go where ever they like, but now I can set those back to the old scripts remove all existing gates and go with yours so that if I want to change something later I can without haveing to restart. Thats what Im trying to make happen with GuardedRegions and allowing reds or restricting reds from having guards called on them... its till in testing though.
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
|
|
|
|
|
#8 (permalink) |
|
Join Date: Dec 2003
Location: UK
Age: 24
Posts: 78
|
this isnt really that big a deal but a player can run throught the gate keep the gump open run off then from in the middle of knowhere can select location and then hit go and is back in town.
|
|
|
|
|
#13 (permalink) |
|
Join Date: Feb 2005
Posts: 37
|
Maybe im doing something wrong, but whenever i walk in a moongate then the gump pops up i click, felucca then edit and this is what happens.
RunUO Version 1.0.0, Build 36918 Operating System: Microsoft Windows NT 5.1.2600.0 .NET Framework: 1.1.4322.573 Time: 5/26/2005 8:14:49 PM Mobiles: 13269 Items: 91561 Clients: - Count: 1 + 127.0.0.1: (account = drake) (mobile = 0x92F 'Drake') Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at Server.PG.PGAddEditGump..ctor(Conditions conditions, Int32 curC, Int32 curL, PublicGate gate) at Server.PG.PGGump.OnResponse(NetState 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 whats going on? Thanks. |
|
|
|
|
#14 (permalink) |
|
Forum Expert
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
|
IDK, try running your server in debug mode, causing the crash, posting the crashlog from that, as well as your PGAddEditGump.cs and PGGump.cs in code tags.
I just loaded my server, initiated the public gates with [initpublicgates true, so it made the default locations. Went into a gate and hit Feluca and hit Edit, both on the category and locations. No crash here. |
|
|
|
|
#15 (permalink) | |
|
Join Date: Feb 2005
Posts: 37
|
Quote:
sorry for the stupid questions. thanks. |
|
|
|
|
|
#16 (permalink) |
|
Forum Expert
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
|
Debug - Create a shortcut to your server.exe. Right click on the shortcut, hit Properties. In the Target field, you have "<Path>\RunUO\Server.exe" (with quotes) At the end, outside of the quotes, put -debug and hit apply and run the shortcut.
For code tags, you do [code] CODE GOES HERE [/code] |
|
|
|
|
#17 (permalink) |
|
Join Date: Feb 2005
Posts: 37
|
Hope this is what your wanting.
RunUO - [www.runuo.com] Version 1.0.0, Build 36918 Scripts: Compiling C# scripts...done (0 errors, 0 warnings) Scripts: Compiling VB.net scripts...no files found. Scripts: Verifying...done (2074 items, 513 mobiles) World: Loading...done (90302 items, 13231 mobiles) (40.0 seconds) Reports: Loading...done Regions: Loading...done Address: 127.0.0.1:2593 Client: 127.0.0.1: Connected. [1 Online] Login: 127.0.0.1: Valid credentials for 'drake' Login: 127.0.0.1: Account 'drake' at character list Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negativ e and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at Server.PG.PGAddEditGump..ctor(Conditions conditions, Int32 curC, Int32 cur L, PublicGate gate) in c:\Documents and Settings\Main\My Documents\RunUO-1.0.0\R unUO 1.0\Scripts\Custom Scripts\A_Li_N's Public Gates 1.0.0\Gumps\PGAddEditGump. cs:line 40 at Server.PG.PGGump.OnResponse(NetState state, RelayInfo info) in c:\Document s and Settings\Main\My Documents\RunUO-1.0.0\RunUO 1.0\Scripts\Custom Scripts\A_ Li_N's Public Gates 1.0.0\Gumps\PGGump.cs:line 288 at Server.Network.PacketHandlers.DisplayGumpResponse( NetState state, PacketRe ader pvSrc) at Server.Network.MessagePump.HandleReceive(NetState ns) at Server.Network.MessagePump.Slice() at Server.Core.Main(String[] args) Crash: Backing up...done Crash: Generating report...done Crash: Restarting... PGAddEditGump.cs Code:
using System;
using Server;
using Server.Gumps;
using Server.Network;
namespace Server.PG
{
[Flags]
public enum Conditions
{
None = 0x00000000,
Adding = 0x00000001,
Category = 0x00000002,
}
public class PGAddEditGump : Gump
{
private Conditions m_Conditions;
private int m_CurCat;
private int m_CurLoc;
private PGCategory m_Cat;
private PGLocation m_Loc;
private PublicGate m_Gate;
private bool GetFlag( Conditions flag ) { return( (m_Conditions & flag) != 0 ); }
public PGAddEditGump( Conditions conditions, int curC, int curL, PublicGate gate ) : base( 0, 0 )
{
if( !PGSystem.Running )
return;
m_Conditions = conditions;
m_CurCat = curC;
m_CurLoc = curL;
m_Gate = gate;
if( !GetFlag( Conditions.Category ) || (GetFlag( Conditions.Category ) && !GetFlag( Conditions.Adding )) )
m_Cat = (PGCategory)PGSystem.Entries[curC];
if( m_Cat != null && (!GetFlag( Conditions.Category ) && !GetFlag( Conditions.Adding )) )
m_Loc = (PGLocation)m_Cat.Locations[curL];
string Name = "";
if( !GetFlag( Conditions.Adding ) )
{
if( GetFlag( Conditions.Category ) )
Name = m_Cat.Name;
else
Name = m_Loc.Name;
}
Point3D Loc = new Point3D( 0, 0, 0 );
Map Map = Map.Trammel;
bool Gen, Staff, Reds;
Gen = Staff = Reds = false;
int Hue = 0;
if( GetFlag( Conditions.Category ) && !GetFlag( Conditions.Adding ) )
{
Gen = m_Cat.GetFlag( EntryFlag.Generate );
Staff = m_Cat.GetFlag( EntryFlag.StaffOnly );
Reds = m_Cat.GetFlag( EntryFlag.Reds );
}
if( !GetFlag( Conditions.Category ) && !GetFlag( Conditions.Adding ) )
{
Loc = m_Loc.Location;
Map = m_Loc.Map;
Gen = m_Loc.GetFlag( EntryFlag.Generate );
Staff = m_Loc.GetFlag( EntryFlag.StaffOnly );
Reds = m_Loc.GetFlag( EntryFlag.Reds );
Hue = m_Loc.Hue;
}
Closable = true;
Disposable = true;
Dragable = true;
Resizable = false;
AddPage(0);
AddBackground( 530, 100, 230, 410, 2600 );
AddLabel( 602, 120, 0, string.Format("{0} {1}", (GetFlag(Conditions.Adding) ? "Add" : "Edit"), (GetFlag(Conditions.Category) ? "Category" : "Location")) );
AddLabel( 625, 145, 0, "Name :" );
AddImage( 555, 170, 2446 );
AddTextEntry( 565, 170, 160, 20, 0, 2, Name );
if( !GetFlag(Conditions.Category) )
{
AddLabel( 570, 210, 0, "X Coordinate :" );
AddImage( 670, 208, 2443 );
AddTextEntry( 674, 210, 55, 20, 0, 3, Loc.X.ToString() );
AddLabel( 570, 235, 0, "Y Coordinate :" );
AddImage( 670, 233, 2443 );
AddTextEntry( 674, 235, 55, 20, 0, 4, Loc.Y.ToString() );
AddLabel( 570, 260, 0, "Z Coordinate :" );
AddImage( 670, 258, 2443 );
AddTextEntry( 674, 260, 55, 20, 0, 5, Loc.Z.ToString() );
AddLabel( 605, 285, 0, "Hue :" );
AddImage( 650, 283, 2443 );
AddTextEntry( 654, 285, 55, 20, 0, 14, Hue.ToString() );
AddLabel( 585, 315, 0, "Trammel" );
AddRadio( 555, 315, 208, 209, (Map == Map.Trammel ? true : false), 6 );
AddLabel( 585, 340, 0, "Felucca" );
AddRadio( 555, 340, 208, 209, (Map == Map.Felucca ? true : false), 7 );
AddLabel( 685, 315, 0, "Malas" );
AddRadio( 655, 315, 208, 209, (Map == Map.Malas ? true : false), 8 );
AddLabel( 685, 345, 0, "Ilshenar" );
AddRadio( 655, 340, 208, 209, (Map == Map.Ilshenar ? true : false), 9 );
AddLabel( 585, 365, 0, "Tokuno" );
AddRadio( 555, 370, 208, 209, (Map == Map.Tokuno ? true : false), 10 );
}
AddLabel( 585, 395, 0, "Generate?" );
AddCheck( 555, 395, 210, 211, Gen, 11 );
AddLabel( 585, 420, 0, "Staff Only?" );
AddCheck( 555, 420, 210, 211, Staff, 12 );
AddLabel( 585, 445, 0, "Reds?" );
AddCheck( 555, 445, 210, 211, Reds, 13 );
AddButton( 700, 450, 1417, 1417, 1, GumpButtonType.Reply, 0 );
AddLabel( 728, 481, 69, "Apply" );
}
private EntryFlag Flags;
private void SetFlag( EntryFlag flag, bool value )
{
if( value )
Flags |= flag;
else Flags &= ~flag;
}
public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
int BID = info.ButtonID;
if( BID == 0 )
return;
SetFlag( EntryFlag.Generate, info.IsSwitched( 11 ) );
SetFlag( EntryFlag.StaffOnly, info.IsSwitched( 12 ) );
SetFlag( EntryFlag.Reds, info.IsSwitched( 13 ) );
Map Map = null;
for( int i = 0; i < info.Switches.Length; i++ )
{
int m = info.Switches[i];
switch( m )
{
case 6: Map = Map.Trammel; break;
case 7: Map = Map.Felucca; break;
case 8: Map = Map.Malas; break;
case 9: Map = Map.Ilshenar; break;
case 10: Map = Map.Tokuno; break;
}
}
TextRelay NR = info.GetTextEntry( 2 );
TextRelay XR = info.GetTextEntry( 3 );
TextRelay YR = info.GetTextEntry( 4 );
TextRelay ZR = info.GetTextEntry( 5 );
TextRelay HR = info.GetTextEntry( 14 );
string NS = (NR == null ? null : NR.Text.Trim());
string XS = (XR == null ? null : XR.Text.Trim());
string YS = (YR == null ? null : YR.Text.Trim());
string ZS = (ZR == null ? null : ZR.Text.Trim());
string HS = (HR == null ? null : HR.Text.Trim());
if( BID == 1 )
{
if( GetFlag( Conditions.Category ) )
{
if( GetFlag( Conditions.Adding ) )
{
if( NS == null || NS.Length == 0 )
{
from.SendMessage( "Please enter a name for this Category." );
from.CloseGump( typeof( PGAddEditGump ) );
from.SendGump( new PGAddEditGump( m_Conditions, m_CurCat, m_CurLoc, m_Gate ) );
return;
}
PGSystem.Entries.Add( new PGCategory( NS, Flags ) );
}
else
{
if( NS == null || NS.Length == 0 )
{
from.SendMessage( "Removed the Category." );
PGSystem.Entries.RemoveAt( m_CurCat );
m_CurCat = 0;
}
else
{
from.SendMessage( "Changed the Category." );
PGSystem.Entries[m_CurCat] = new PGCategory( NS, Flags );
}
}
}
else
{
if( NS == null || NS.Length == 0 ||
XS == null || XS.Length == 0 ||
YS == null || YS.Length == 0 ||
ZS == null || ZS.Length == 0 ||
HS == null || HS.Length == 0 )
{
if( GetFlag( Conditions.Adding ) )
{
from.SendMessage( "Please fill in each field." );
from.CloseGump( typeof( PGAddEditGump ) );
from.SendGump( new PGAddEditGump( m_Conditions, m_CurCat, m_CurLoc, m_Gate ) );
return;
}
from.SendMessage( "Removed the Location." );
((PGCategory)PGSystem.Entries[m_CurCat]).Locations.RemoveAt( m_CurLoc );
}
else if( Map == null )
{
from.SendMessage( "Please select a Map." );
from.CloseGump( typeof( PGAddEditGump ) );
from.SendGump( new PGAddEditGump( m_Conditions, m_CurCat, m_CurLoc, m_Gate ) );
return;
}
else
{
int x, y, z, h = 0;
Point3D Loc;
int Hue;
try
{
x = Int32.Parse( XS );
y = Int32.Parse( YS );
z = Int32.Parse( ZS );
h = Int32.Parse( HS );
Loc = new Point3D( x, y, z );
Hue = h;
}
catch
{
from.SendMessage( "Please enter an integer in each of the info fields. (X, Y, Z, H)" );
from.CloseGump( typeof( PGAddEditGump ) );
from.SendGump( new PGAddEditGump( m_Conditions, m_CurCat, m_CurLoc, m_Gate ) );
return;
}
PGLocation PGL = new PGLocation( NS, Flags, Loc, Map, Hue );
if( PGL == null )
{
from.SendMessage( "Bad Location information, can't add!" );
from.CloseGump( typeof( PGAddEditGump ) );
from.SendGump( new PGAddEditGump( m_Conditions, m_CurCat, m_CurLoc, m_Gate ) );
return;
}
if( GetFlag( Conditions.Adding ) )
{
from.SendMessage( "Added the Location." );
((PGCategory)PGSystem.Entries[m_CurCat]).Locations.Add( PGL );
}
else
{
from.SendMessage( "Changed the Location." );
((PGCategory)PGSystem.Entries[m_CurCat]).Locations[m_CurLoc] = PGL;
}
}
}
from.CloseGump( typeof( PGGump ) );
from.SendGump( new PGGump( from, m_CurCat, m_Gate ) );
}
}
}
}
Code:
using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Mobiles;
namespace Server.PG
{
public class PGGump : Gump
{
private Mobile m_From;
private int m_Page;
private PublicGate m_Gate;
private EntryFlag EFlags;
private void SetFlag( EntryFlag flag, bool value )
{
if( value )
EFlags |= flag;
else EFlags &= ~flag;
}
public PGGump( Mobile from, int Page, PublicGate gate ) : base( 0, 0 )
{
if( !PGSystem.Running )
return;
if( PGSystem.Entries == null || PGSystem.Entries.Count == 0 )
{
SetFlag( EntryFlag.StaffOnly, true );
SetFlag( EntryFlag.Generate, false );
PGSystem.Entries.Add( new PGCategory( "Empty System", EFlags ) );
}
m_From = from;
m_Page = Page;
m_Gate = gate;
Closable = true;
Disposable = true;
Dragable = true;
Resizable = false;
AddPage(0);
#region Categories
int Cats = CountCats();
int CStart = (250 - ((Cats / 2) * 25));
if( CStart < 0 )
CStart = 0;
AddBackground( 0, CStart, 230, 100+Cats*25, 2600 );
AddHtml( 0, CStart+15, 230, 20, "<BASEFONT SIZE=7><CENTER>Public Moongate</CENTER></BASEFONT>", false, false );
int CurC = 0;
for( int i = 0; i < PGSystem.Entries.Count; i++ )
{
PGCategory PGC = (PGCategory)PGSystem.Entries[i];
if( PGC != null )
{
if( (PGC.GetFlag( EntryFlag.StaffOnly ) && from.AccessLevel > AccessLevel.Player) ||
(!PGC.GetFlag( EntryFlag.StaffOnly ) && ((!PGC.GetFlag( EntryFlag.Reds ) && from.Kills < 5) || PGC.GetFlag( EntryFlag.Reds ))) ||
(from.AccessLevel > AccessLevel.Player) )
{
AddButton( 20, CStart+53+CurC*25, (Page == i ? 209 : 208), (Page == i ? 208 : 209), 100+i, GumpButtonType.Reply, 0);
AddLabel( 50, CStart+53+CurC*25, (Page == i ? 69 : 0), PGC.Name );
CurC++;
}
}
}
if( from.AccessLevel >= AccessLevel.GameMaster )
{
AddLabel( 75, CStart+65+Cats*25, 0, "Add" );
AddButton( 50, CStart+65+Cats*25, 208, 209, 2, GumpButtonType.Reply, 0 );
AddLabel( 125, CStart+65+Cats*25, 0, "Edit" );
AddButton( 160, CStart+65+Cats*25, 208, 209, 3, GumpButtonType.Reply, 0 );
}
#endregion //Categories
#region Locations
int Locs = CountLocs();
int LStart = (250 - ((Locs / 2) * 25));
if( LStart < 20 )
LStart = 20;
AddBackground( 230, LStart, 300, 100+Locs*25, 2600 );
int CurL = 0;
PGCategory PGCL = (PGCategory)PGSystem.Entries[m_Page];
if( PGCL != null && PGCL.Locations != null )
{
for( int i = 0; i < PGCL.Locations.Count; i++ )
{
PGLocation PGL = (PGLocation)PGCL.Locations[i];
if( PGL != null )
{
if( (PGL.GetFlag( EntryFlag.StaffOnly ) && from.AccessLevel > AccessLevel.Player) ||
(!PGL.GetFlag( EntryFlag.StaffOnly ) && ((!PGL.GetFlag( EntryFlag.Reds ) && from.Kills < 5) || PGL.GetFlag( EntryFlag.Reds ))) ||
(from.AccessLevel > AccessLevel.Player) )
{
AddRadio( 250, LStart+53+CurL*25, 208, 209, false, 200+i );
AddLabel( 280, LStart+53+CurL*25, 0, PGL.Name );
CurL++;
}
}
}
}
AddButton( 465, LStart-20, 1417, 1417, 1, GumpButtonType.Reply, 0);
AddHtml( 485, LStart+10, 40, 40, "<BODY><BASEFONT SIZE=7 COLOR=#33AA33><CENTER><I><B>GO</B></I></CENTER></BASEFONT></BODY>", false, false);
if( from.AccessLevel >= AccessLevel.GameMaster )
{
AddLabel( 305, LStart+65+Locs*25, 0, "Add" );
AddButton( 280, LStart+65+Locs*25, 208, 209, 4, GumpButtonType.Reply, 0 );
AddLabel( 430, LStart+65+Locs*25, 0, "Edit" );
AddButton( 460, LStart+65+Locs*25, 208, 209, 5, GumpButtonType.Reply, 0);
}
#endregion //Locations
}
private int CountCats()
{
int count = 0;
foreach( PGCategory PGC in PGSystem.Entries )
{
if( (PGC.GetFlag( EntryFlag.StaffOnly ) && m_From.AccessLevel > AccessLevel.Player) ||
(!PGC.GetFlag( EntryFlag.StaffOnly ) && ((!PGC.GetFlag( EntryFlag.Reds ) && m_From.Kills < 5) || PGC.GetFlag( EntryFlag.Reds ))) ||
(m_From.AccessLevel > AccessLevel.Player) )
count++;
}
return count;
}
private int CountLocs()
{
int count = 0;
PGCategory PGC = (PGCategory)PGSystem.Entries[m_Page];
if( PGC != null && PGC.Locations != null )
{
foreach( PGLocation PGL in PGC.Locations )
{
if( (PGL.GetFlag( EntryFlag.StaffOnly ) && m_From.AccessLevel > AccessLevel.Player) ||
(!PGL.GetFlag( EntryFlag.StaffOnly ) && ((!PGL.GetFlag( EntryFlag.Reds ) && m_From.Kills < 5) || PGL.GetFlag( EntryFlag.Reds ))) ||
(m_From.AccessLevel > AccessLevel.Player) )
count++;
}
}
return count;
}
private Conditions Flags;
private void SetFlag( Conditions flag, bool value )
{
if( value )
Flags |= flag;
else Flags &= ~flag;
}
public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
int BID = info.ButtonID;
int Loc = -1;
if( !PGSystem.Running )
return;
if( m_From.Deleted || m_Gate.Deleted || m_From.Map == null )
return;
if( info.Switches.Length > 0 )
Loc = info.Switches[0];
Loc -= 200;
if( BID == 0 )
{
from.SendMessage( "You chose not to go anywhere." );
return;
}
if( BID == 1 )
{
if( Loc <= -1 )
{
from.SendMessage( "You must select a location!" );
return;
}
PGCategory PGC = (PGCategory)PGSystem.Entries[m_Page];
if( PGC == null )
return;
PGLocation PGL = (PGLocation)PGC.Locations[Loc];
if( PGL == null )
return;
if ( !from.InRange( m_Gate.GetWorldLocation(), 1 ) || from.Map != m_Gate.Map )
{
from.SendLocalizedMessage( 1019002 ); // You are too far away to use the gate.
}
else if ( Factions.Sigil.ExistsOn( from ) && PGL.Map != Factions.Faction.Facet )
{
from.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
}
else if ( from.Criminal )
{
from.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
}
else if ( Server.Spells.SpellHelper.CheckCombat( from ) )
{
from.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
}
else if ( from.Spell != null )
{
from.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
}
else if ( from.Map == PGL.Map && from.InRange( PGL.Location, 1 ) )
{
from.SendLocalizedMessage( 1019003 ); // You are already there.
}
else
{
BaseCreature.TeleportPets( from, PGL.Location, PGL.Map );
from.Combatant = null;
from.Warmode = false;
from.Hidden = true;
from.MoveToWorld( PGL.Location, PGL.Map );
Effects.PlaySound( PGL.Location, PGL.Map, 0x1FE );
from.SendMessage( "You have been teleported to: " + PGL.Name );
}
}
else if( BID >= 100 )
{
from.CloseGump( typeof( PGGump ) );
from.SendGump( new PGGump( from, BID-100, m_Gate ) );
}
else if( BID == 2 )
{
SetFlag( Conditions.Adding, true );
SetFlag( Conditions.Category, true );
from.CloseGump( typeof( PGAddEditGump ) );
from.CloseGump( typeof( PGGump ) );
from.SendGump( new PGGump( from, m_Page, m_Gate ) );
from.SendGump( new PGAddEditGump( Flags, m_Page, -1, m_Gate ) );
}
else if( BID == 3 )
{
SetFlag( Conditions.Adding, false );
SetFlag( Conditions.Category, true );
from.CloseGump( typeof( PGAddEditGump ) );
from.CloseGump( typeof( PGGump ) );
from.SendGump( new PGGump( from, m_Page, m_Gate ) );
from.SendGump( new PGAddEditGump( Flags, m_Page, -1, m_Gate ) );
}
else if( BID == 4 )
{
SetFlag( Conditions.Adding, true );
SetFlag( Conditions.Category, false );
from.CloseGump( typeof( PGAddEditGump ) );
from.CloseGump( typeof( PGGump ) );
from.SendGump( new PGGump( from, m_Page, m_Gate ) );
from.SendGump( new PGAddEditGump( Flags, m_Page, Loc, m_Gate ) );
}
else if( BID == 5 )
{
SetFlag( Conditions.Adding, false );
SetFlag( Conditions.Category, false );
from.CloseGump( typeof( PGAddEditGump ) );
from.CloseGump( typeof( PGGump ) );
from.SendGump( new PGGump( from, m_Page, m_Gate ) );
from.SendGump( new PGAddEditGump( Flags, m_Page, Loc, m_Gate ) );
}
else
{
from.SendMessage( "Undefined button pressed: {0}", BID );
}
}
}
}
|
|
|
|
|
#21 (permalink) | |
|
Forum Expert
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
|
Quote:
|
|
|
|
|
|
#22 (permalink) | |
|
Join Date: Feb 2005
Posts: 37
|
Quote:
|
|
|
|
|
|
#23 (permalink) |
|
Forum Expert
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
|
The [add publicgate? I figured since it's a built in command with RunUO ([add) I didn't need to mention it. If you want to add a publicgate that is not listed in the system, you would just add a publicgate, just like publicmoongates. The system automatically makes the ones in the system, but if you want more, you would [add publicmoongate.
|
|
|
|
|
#24 (permalink) | |
|
Join Date: Feb 2005
Posts: 37
|
Quote:
i dont know ill have to try again, anyway works great now, at least i wont have to mess with the other scripts now, Thanks again |
|
|
|