|
||
|
|||||||
| 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 make them public domain. 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 |
|
|
#251 (permalink) |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
|
Post your ondouble-click method. And.....what is your accesslevel? Are your accesslevels custom?
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment. Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse." My Customs:
|
|
|
|
|
|
#252 (permalink) |
|
Forum Novice
Join Date: Sep 2006
Location: Ukraine
Posts: 930
|
Ok this my doubleclick method:
Code:
public override void OnDoubleClick( Mobile from )
{
if (from.AccessLevel <= AccessLevel.GameMaster)
from.SendGump( new ClassExplainationGump( from ) );
if (from.AccessLevel == AccessLevel.Administrator)
from.SendGump( new ControlCenterGump() );
else
return;
}
Code:
/*
Special thanks to Ryan.
With RunUO we now have the ability to become our own Richard Garriott.
All Spells System created by x-SirSly-x, Admin of Land of Obsidian.
All Spells System 4.0 created & supported by Lucid Nagual, Admin of The Conjuring.
All Spells System 5.0 created by A_li_N.
All Spells Optional Restrictive System created by Alien, Daat99 and Lucid Nagual.
_________________________________
-=(_)_______________________________)=-
/ . . . ____ . ___ _/
/~ / / / / / / )2005 /
(~ (____(___/ (____ / /___/ (
\ ----------------------------- \
\ lucidnagual@gmail.com \
\_ =================== \
\ -Admin of "The Conjuring"- \
\_ =================== ~\
) All Spells System )
/~ Version [5].0 & Above _/
_/_______________________________/
-=(_)_______________________________)=-
*/
using System;
using System.Collections;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.ACC.CM;
using Server.Commands;
namespace Server.LucidNagual
{
public class ControlCenter : Item
{
//Set to false if you choose not to have restrictions.
//Can also set in game at the Control Center.
public static bool SetRestrictions = false;
//Set to false if you choose not to have skin hues.
//Can also set in game at the Control Center.
public static bool SetSkinHues = true;
//Set to false if you choose not to give books for free.
//Can also set in game at the Control Center.
public static bool SetGiveBooks = true;
//Set to false if you charge or true give skills for free.
//Can also set in game at the Control Center.
public static bool SetFreeSkills = false;
//Set to false you you do not want to use the characterization system.
//Can also set in game at the Control Center.
public static bool EnableCharacterization = true;
//Set to false you you do not want to use the characterization system.
//Can also set in game at the Control Center.
public static bool EnableNameProperties = true;
public Mobile from;
public static ControlCenter CntrlC;
public bool UnLocked = false;
private static bool TramSpawn = false;
private static bool FelSpawn = false;
private static bool TokSpawn = false;
[CommandProperty( AccessLevel.GameMaster )]
public bool BoolSetRestrictions { get { return BoolSetRestrictions; } set { SetRestrictions = value; } }
[CommandProperty( AccessLevel.GameMaster )]
public bool BoolSetSkinHues { get { return BoolSetSkinHues; } set { SetSkinHues = value; } }
[CommandProperty( AccessLevel.GameMaster )]
public bool BoolSetGiveBooks { get { return BoolSetGiveBooks; } set { SetGiveBooks = value; } }
[CommandProperty( AccessLevel.GameMaster )]
public bool BoolSetFreeSkills { get { return BoolSetFreeSkills; } set { SetFreeSkills = value; } }
[Constructable]
public ControlCenter() : base( 0x1E5E )
{
Hue = 168;
Name = "All Spells Control & Information Center";
Movable = false;
Visible = false;
Light = LightType.Circle300;
}
public override void Delete()
{
if ( UnLocked )
base.Delete();
else
return;
}
public override void OnDoubleClick( Mobile from )
{
if (from.AccessLevel <= AccessLevel.GameMaster)
from.SendGump( new ClassExplainationGump( from ) );
if (from.AccessLevel == AccessLevel.Administrator)
from.SendGump( new ControlCenterGump() );
else
return;
}
public static void Initialize()
{
CommandSystem.Register( "ASCC", AccessLevel.GameMaster, new CommandEventHandler( ASCC_OnCommand ) );
CommandSystem.Register( "CCount", AccessLevel.GameMaster, new CommandEventHandler( CCount_OnCommand ) );
CommandSystem.Register( "CClean", AccessLevel.Administrator, new CommandEventHandler( CClean_OnCommand ) );
CommandSystem.Register( "CCGen", AccessLevel.Administrator, new CommandEventHandler( CCGen_OnCommand ) );
CommandSystem.Register( "GoCC", AccessLevel.Administrator, new CommandEventHandler( GoCC_OnCommand ) );
CommandSystem.Register( "ASInfo", AccessLevel.Player, new CommandEventHandler( ASInfo_OnCommand ) );
CommandSystem.Register( "LockCC", AccessLevel.Administrator, new CommandEventHandler( LockCC_OnCommand ) );
CommandSystem.Register( "UnLockCC", AccessLevel.Administrator, new CommandEventHandler( UnLockCC_OnCommand ) );
EventSink.Login += new LoginEventHandler( OnLogin );
EventSink.Disconnected += new DisconnectedEventHandler( EventSink_Disconnected );
if ( CntrlC == null )
{
GenTramSpawn();
GenFelSpawn();
GenTokSpawn();
}
else
return;
//m_Entry[targeted] = new Characterization( m_Class, m_Race, m_Tribe, m_Deity );
}
[Usage( "ASCC" )]
[Description( "Open the All Spells Control Center Gump." )]
public static void ASCC_OnCommand( CommandEventArgs e )
{
if (!( e.Mobile is PlayerMobile ))
return;
else if ( e.Mobile.AccessLevel >= AccessLevel.GameMaster )
e.Mobile.SendGump(new ControlCenterGump( ));
else
return;
}
[Usage( "CClean" )]
[Description( "Deletes all control centers." )]
public static void CClean_OnCommand( CommandEventArgs e )
{
//Remove ControlCenters [start]
ArrayList cc = new ArrayList();
foreach (Item item in World.Items.Values)
{
if (item is ControlCenter)
cc.Add(item);
}
Console.WriteLine("There were {0} ControlCenters", cc.Count);
foreach ( Item item in cc )
item.Delete();
TramSpawn = false; FelSpawn = false; TokSpawn = false;
if ( cc.Count > 0 )
World.Broadcast( 0x35, true, "{0} Control Centers have been removed from the world.", cc.Count );
else
return;
//Remove ControlCenters [end]
//Clean Internal Map [start]
ArrayList intern = new ArrayList();
foreach (Item item in World.Items.Values)
{
if ( item is ControlCenter && item.Map == Map.Internal )
intern.Add(item);
}
foreach ( Item item in intern )
item.Delete();
if ( cc.Count > 0 )
World.Broadcast( 0x35, true, "{0} internal items have been removed from the world.", cc.Count );
else
return;
//Clean Internal Map [end]
}
[Usage( "CCount" )]
[Description( "Counts all control centers in world." )]
public static void CCount_OnCommand( CommandEventArgs e )
{
ArrayList cc = new ArrayList();
foreach (Item item in World.Items.Values)
{
if (item is ControlCenter)
cc.Add(item);
}
World.Broadcast( 0x35, true, "There are {0} Control Centers in the world.", cc.Count );
Console.WriteLine("There are {0} ControlCenters", cc.Count);
}
[Usage( "CCGen" )]
[Description( "Generate control centers." )]
public static void CCGen_OnCommand( CommandEventArgs e )
{
if ( CntrlC == null )
{
GenTramSpawn();
GenFelSpawn();
GenTokSpawn();
}
else
World.Broadcast( 0x35, true, "The control centers are already generated." );
}
[Usage( "GoCC" )]
[Description( "Recall to control center." )]
public static void GoCC_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
from.PlaySound( 0x1FC );
from.Map = Map.Felucca;
from.Location = new Point3D(1499,1586,10);
from.PlaySound( 0x1FC );
}
[Usage( "ASInfo" )]
[Description( "Info gump for players." )]
public static void ASInfo_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
from.SendGump( new ClassExplainationGump( from ) );
}
[Usage( "LockCC" )]
[Description( "Admin can lock control centers." )]
public static void LockCC_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from.AccessLevel == AccessLevel.Administrator )
{
if( CntrlC != null && CntrlC.UnLocked == true )
CntrlC.UnLocked = false;
}
else
return;
}
[Usage( "UnLockCC" )]
[Description( "Admin can unlock control centers." )]
public static void UnLockCC_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
if( from.AccessLevel == AccessLevel.Administrator )
{
if( CntrlC != null && CntrlC.UnLocked == false )
CntrlC.UnLocked = true;
}
else
return;
}
public static void GenTramSpawn()
{
if ( !TramSpawn )
{
TramSpawn = true;
ControlCenter tram_cc = new ControlCenter();
tram_cc.MoveToWorld( new Point3D(1500,1584,10), Map.Trammel );
}
else
return;
}
public static void GenFelSpawn()
{
if ( !FelSpawn )
{
FelSpawn = true;
ControlCenter fel_cc = new ControlCenter();
fel_cc.MoveToWorld( new Point3D(1500,1584,10), Map.Felucca );
}
else
return;
}
public static void GenTokSpawn()
{
if ( !TokSpawn )
{
TokSpawn = true;
ControlCenter tok_cc = new ControlCenter();
tok_cc.MoveToWorld( new Point3D(728,1271,25), Map.Tokuno );
}
else
return;
}
private static void ModuleCheckPoint( Mobile from )
{
if ( from == null )
return;
if ( ASSettings.EnableAllSystems )
{
ClassREMModule class_mod = (ClassREMModule)CentralMemory.GetModule( from.Serial, typeof( ClassREMModule ) );
RaceModule race_mod = (RaceModule)CentralMemory.GetModule( from.Serial, typeof( RaceModule ) );
LevelKeeperModule exp_mod = (LevelKeeperModule)CentralMemory.GetModule( from.Serial, typeof( LevelKeeperModule ) );
if ( class_mod == null && from.AccessLevel == AccessLevel.Player )
from.SendGump( new ClassGump( from ) );
else if ( race_mod == null && from.AccessLevel == AccessLevel.Player )
from.SendGump( new RavensRaceGump( from, RavensRacePage.Info ) );
else if ( exp_mod == null && from.AccessLevel == AccessLevel.Player )
CentralMemory.AppendModule( from.Serial, new LevelKeeperModule( from.Serial ), true );
else
return;
}
else if ( ASSettings.EnableClassSystem )
{
ClassREMModule class_mod = (ClassREMModule)CentralMemory.GetModule( from.Serial, typeof( ClassREMModule ) );
if ( class_mod == null && from.AccessLevel == AccessLevel.Player )
from.SendGump( new ClassGump( from ) );
else
return;
}
else if ( ASSettings.EnableRaceSystem )
{
RaceModule race_mod = (RaceModule)CentralMemory.GetModule( from.Serial, typeof( RaceModule ) );
if ( race_mod == null && from.AccessLevel == AccessLevel.Player )
from.SendGump( new RavensRaceGump( from, RavensRacePage.Info ) );
else
return;
}
else if ( ASSettings.EnableExperienceSystem )
{
LevelKeeperModule exp_mod = (LevelKeeperModule)CentralMemory.GetModule( from.Serial, typeof( LevelKeeperModule ) );
if ( exp_mod == null && from.AccessLevel == AccessLevel.Player )
CentralMemory.AppendModule( from.Serial, new LevelKeeperModule( from.Serial ), true );
else
return;
}
else
return;
}
private static void OnLogin( LoginEventArgs e )
{
if ( e.Mobile != null && ASSettings.EnableAllSystems || ASSettings.EnableClassSystem ||
ASSettings.EnableRaceSystem || ASSettings.EnableExperienceSystem )
{
ModuleCheckPoint( e.Mobile );
}
else
return;
}
private static void EventSink_Disconnected( DisconnectedEventArgs e )
{
Mobile from = e.Mobile;
}
public ControlCenter( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
//Version 3 [start]
writer.Write( (bool)TramSpawn );
writer.Write( (bool)FelSpawn );
writer.Write( (bool)TokSpawn );
writer.Write( (bool)UnLocked );
//Version 3 [end]
//Version 2 [start]
writer.Write( (bool)SetFreeSkills );
writer.Write( (bool)SetGiveBooks );
writer.Write( (bool)SetRestrictions );
writer.Write( (bool)SetSkinHues );
//Version 2 [end]
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
//Version 3 [start]
TramSpawn = reader.ReadBool();
FelSpawn = reader.ReadBool();
TokSpawn = reader.ReadBool();
UnLocked = reader.ReadBool();
//Version 3 [end]
//Version 2 [start]
SetFreeSkills = reader.ReadBool();
SetGiveBooks = reader.ReadBool();
SetRestrictions = reader.ReadBool();
SetSkinHues = reader.ReadBool();
//Version 2 [end]
}
}
}
|
|
|
|
|
|
#254 (permalink) | |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
|
Quote:
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment. Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse." My Customs:
|
|
|
|
|
|
|
#255 (permalink) |
|
Forum Novice
Join Date: Sep 2006
Location: Ukraine
Posts: 930
|
Hey sorry Lucid but i nothing not modifi. How i load your system yesterday so i drop it in CustomFolder... And change existing scripts.
If and i modifi something so this only here: Code:
//Set to false if you choose not to have restrictions.
//Can also set in game at the Control Center.
public static bool SetRestrictions = false;
//Set to false if you choose not to have skin hues.
//Can also set in game at the Control Center.
public static bool SetSkinHues = true;
//Set to false if you choose not to give books for free.
//Can also set in game at the Control Center.
public static bool SetGiveBooks = true;
//Set to false if you charge or true give skills for free.
//Can also set in game at the Control Center.
public static bool SetFreeSkills = false;
//Set to false you you do not want to use the characterization system.
//Can also set in game at the Control Center.
public static bool EnableCharacterization = true;
//Set to false you you do not want to use the characterization system.
//Can also set in game at the Control Center.
public static bool EnableNameProperties = true;
My acceslevel Owner. And if i correct understad you i need change Code:
if (from.AccessLevel == AccessLevel.Administrator) Code:
if (from.AccessLevel >= AccessLevel.Administrator) Ahh one more! Lucid please explain me what or where i can get TithePoints and Tithe? I cant understand Thx alot! |
|
|
|
|
|
#256 (permalink) | |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
|
Quote:
The method I provided you with is: Code:
public override void OnDoubleClick( Mobile from )
{
if ( from.AccessLevel < AccessLevel.Administrator )
from.SendGump( new ClassExplainationGump( from ) );
if ( from.AccessLevel > AccessLevel.Seer )
from.SendGump( new ControlCenterGump() );
else
return;
}
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment. Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse." My Customs:
|
|
|
|
|
|
|
#257 (permalink) | |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
|
Quote:
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment. Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse." My Customs:
|
|
|
|
|
|
|
#258 (permalink) | |
|
Forum Novice
Join Date: Sep 2006
Location: Ukraine
Posts: 930
|
Quote:
I THANKED FOR YOUR SYSTEM BUT IT.... DOWNLOAD YOUR SYSTEM FROM #1PAGE "[2[1].0]Lucid's AS [7].0.2 (b)" AND SEE IN HIM YOUR SCRIPT! AND HEREON IAM LIARS.... HERE IS YOUR ORIGINAL FILE |
|
|
|
|
|
|
#259 (permalink) | |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
|
Quote:
I thought we were working on the new one? Install the new one and post your errors.
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment. Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse." My Customs:
|
|
|
|
|
|
|
#260 (permalink) |
|
Forum Novice
Join Date: Sep 2006
Location: Ukraine
Posts: 930
|
I haven't errors. Errors is only when i say [props and target on CC. This one error.(Server close withuout any crashlog only message with SEND REPORT and DONTR SED REPORT(i was wrote this message little top))
And your system as i load as and drop in folder. Nothing not touch. U can explain where i can get Tithe? |
|
|
|
|
|
#261 (permalink) | |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
|
Quote:
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment. Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse." My Customs:
|
|
|
|
|
|
|
#262 (permalink) |
|
Forum Novice
Join Date: Sep 2006
Location: Ukraine
Posts: 930
|
Now i have this error
Code:
Errors:
+ Spells/Base/AS Control Center/ASControlCenter.cs:
CS0234: Line 29: The type or namespace name 'Messages' does not exist in the
namespace 'Server' (are you missing an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
|
|
|
|
|
|
#263 (permalink) | |
|
Forum Expert
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
|
Quote:
__________________
Leader of the Anti-OSI Movement. Inventing a new game experience in an EA Games-free environment. Don Juan Matus "The basic difference between an ordinary man and a warrior is that a warrior takes everything as a challenge, while an ordinary man takes everything as a blessing or as a curse." My Customs:
|
|
|
|
|