|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
Join Date: Sep 2002
Posts: 49
|
In order to change anything, you have to know where to look. The following list shows which file allows you to change what. In RunUO, any *.cs file in the scripts directory is read as a script. I won’t be discussing how the actual scripts work in this article, just the basic things that you may want to change. However, just reading the lines that you are editing will help you learn, as most of the stuff in here is pretty straightforward.
We will start with the Scripts\Misc\ folder. Inside this folder we see another folder, and a bunch of .cs files. If you look in the Test Center folder you notice two .cs files. The HelpGump file contains the source code for; you guessed it, the Help Gump! Incase you don’t know what a gump is, it is a collection of artwork that is sent to a client. Things such as the guild stone menu. If you are in game and say “help” then the Help Gump is displayed for you to see an example of a gump. The SetSkills file contains the source code for the ability to set skills by saying, “set skill int” (“set magery 100”). If you don’t want a test center style shard, you can just delete the Test Center folder, and players will no longer be able to change their own skills as they wish. Back in the Misc folder we see the file AccountHandler.cs. This file is the one that allows you to change between auto-account (players can login without you verifying them, and this script will create an account if the username they entered is not being used already), or not auto account (in which case you will have to add a method of adding accounts another way). If you want to check what your current setting is, you can open the .cs file now. If you don’t have Microsoft Visual Studio.NET or SharpDevelop, I suggest you get one of the two. SharpDevelop is free. If you don’t want to get either one, you can simply use Notepad or WordPad. For right now we will ignore most of stuff in this file, simply because we aren’t ready for it yet. J. So, find this line: Code:
private static bool AutoAccountCreation = true; This is the toggle for Auto Account Creation! If you change the true to false then accounts will no longer be created automatically. So if you don’t want Auto-Account on. Change that line to look like this: Code:
private static bool AutoAccountCreation = false; Code:
private static TimeSpan m_Delay = TimeSpan.FromMinutes( 5.0 ); Code:
private static TimeSpan m_Delay = TimeSpan.FromMinutes( 30.0 ); Easy stuff so far isn’t it? This file is quite a bit larder then the ones we have looked at so far, and a lot more can be edited in it. CharacterCreation.cs contains all the information and events for when a character is created. If you are to open this file up, you will notice that it is quite long. The first line we are going to look at is this one: Code:
pack.DropItem( MakeNewbie( new Gold( 1000 ) ) ); // Starting gold can be customized here Code:
pack.DropItem( MakeNewbie( new Gold( 6000000 ) ) ); // Starting gold can be customized here On to the next line in CharacterCreation.cs that we will edit, and the last one for now. You will most likely want to come back to this file to change more things. Find this line: Code:
FillBankbox( newChar ); Code:
//FillBankbox( newChar ); Now, because older versions of client.exe can’t do everything that the newer ones can, RunUO supplies us with a simple way to make sure that our players are on the newest client. This is located in ClientVerification.cs. Code:
ClientVersion.Required = null; //ClientVersion.Required = new ClientVersion( "3.0.8q" ); Code:
//ClientVersion.Required = null; ClientVersion.Required = new ClientVersion( "3.0.8q" ); The next file is DataPath.cs. This file tells RunUO where your Ultima Online files are. By default it will search for your installed UO path. If you have a different directory that you wish to use, you can change this bit of code: Code:
Utility.DataPath = Console.ReadLine();// For a fixed path with no install, use the following line instead // Utility.DataPath = @"C:\Path\To\Ultima Online\"; Code:
//Utility.DataPath = Console.ReadLine(); // For a fixed path with no install, use the following line instead Utility.DataPath = @"C:\Program Files\UO Server Files\"; ServerList.cs is an important file. If you are behind a router then you will have to edit this file to allow users to log in to your shard. This is also the file where you can change the name of your server. This file has already been discussed on the RunUO boards in great detail. The WelcomeTimer.cs and LoginStats.cs files are also two that should be edited to suit your shard, but we have not learned about strings yet. Last edited by daat99; 01-12-2006 at 06:09 PM. |
|
|
|
|
|
#2 (permalink) |
|
Newbie
Join Date: Jan 2006
Posts: 37
|
More important scripts:
In misc\charactercreation.cs Search for this line: Code:
BankBox bank = m.BankBox; Code:
m.BankBox.MaxItems = 350; ---------------------------------- In misc\charactercreation.cs search for these lines: Code:
CityInfo city = GetStartLocation( args, young ); //CityInfo city = new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10, Map.Felucca ); *When you comment the line ( put the // in front of the line) is like the line does exist, why no is compiled by the emulator. Code:
//CityInfo city = GetStartLocation( args, young ); CityInfo city = new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10, Map.Felucca ); Is the coordenates, use the command [where in the local to take the coordenates and put int script. ----------------------------------------- In misc\charactercreation.cs search for this line: Code:
m.StatCap = 250; Code:
m.StatCap = 250; newChar.SkillsCap = 7200; If you want to change the stat cap.... *7200 why is 720.0 =) ------------------------------------ In misc\ServerList.cs search for this line: Code:
public const string ServerName = For e.g. , the name of you shard goes be: Testing Name, so: Code:
public const string ServerName = "Testing Name"; in \Misc\Test Center\TestCenter.cs search for this line: Code:
private const bool m_Enabled = false; And this variable = false, this don't work. Code:
private const bool m_Enabled = true; in misc\AutoSave.cs Code:
private static TimeSpan m_Delay = TimeSpan.FromMinutes( 5.0 ); Code:
private static TimeSpan m_Delay = TimeSpan.FromMinutes( 30.0 ); ----------------------------------- Remember: if you modify any scripts, is need to recompile all scripts. Sorry for my english.. hehehe Bye! |
|
|
|
|
|
#3 (permalink) | |
|
Forum Novice
Join Date: Apr 2006
Posts: 278
|
Quote:
[global set statcap 250 where playermobile Change the 250 to whatever cap you set in CharacterCreation.
__________________
http://www.crypticrealms.com Last edited by daat99; 05-24-2008 at 09:59 AM. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|