|
||
|
|||||||
| 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: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Killable Guards (GS Version)
Version 1.1.1 final? Exerpt from Readme.txt Quote:
Files included in this package are as follows. \Scripts\Regions\GuardedRegion.cs \Scripts\Mobiles\Guards\WarriorGuard.cs \Scripts\Mobiles\Guards\ArcherGuard.cs \Scripts\Mobiles\Guards\PaladinGuard.cs \Scripts\Engines\AI\Creatures\BaseCreature.cs \Scripts\Engines\AI\AI\BaseAI.cs \Scripts\Engines\AI\AI\PaladinAI.cs \Scripts\Mobiles\Animals\Mounts\BaseMount.cs Plus several txt files. Update 1.0.4a: Fixes compatibility issues with Faction Guards... Oops sorry about that Update 1.0.4b: Fixes typos from above compatibility issues with Faction Guards... Oops sorry again Update 1.0.5: Fixes infinitly called guard loop also added Dismount guardcall prevention others may not have experienced this but I have on my shard. Main changes occured in BaseMount.cs GuardedRegion.cs and BaseGuard.cs no other files affected by this mod. Update 1.0.6 Fixes the last unexplained crash when guards are called, at this point I think its bugless, although I could be wrong. Only files affected in this change are, BaseCreature.cs and GuardedRegion.cs. Update 1.0.7 Fixes a couple of minor bugs that most people would probably never expereince and removes more legacy (old code) from the InstaKill guards that was autokilling the guards IF they where disarmed or spawned UNarmed which was instakilling the MageGuards since they spawn weaponless. Also removed my AI_Guard untill its finished so those of you who have it already feel free to change your scripts to match. It has been removed from all files that would be affected in this pack. A couple minor crash prevention pieces of code where added and something I changed in basecreature has been changed back, cause it allowed things like Bears and Cats and other miscellaneous animals in guardedregions to call for the guards on Red (Murdering) players if you didnt allow reds in town. Update 1.0.8: Discovered a bug when a red entered town when Reds where not allowed in town which caused a null reference error, it is now fixxed. (I THINK) Pointed out by Evil Jason (my first bug in link 6 months). 1.1.0 Updated Guards will only come 1 at a time even if multiple vendors see you. (Not fully tested but works in a test environment) Random Guards now possible. All guards types have been updated to support the new random guards 1.1.1 Updated Only change includes some removing old code I was no longer using and removed some debug code no longer needed. Also includes the spot that XxSP1DERxX brought to my attention, only file affected by this is BaseGuard.cs. (Features/Bugs) Guard backup comes in 3s this wont be removed. If you dont like it find the Revenge stuff and remove it (or change the Iteration from 3 to 1 or from 3 to 5 if you really want). Extra Details not involving Installation: This version contains some mods for prevention of guards attacking guards. Although you can still make them start. If you choose not to use my BaseAI.cs then you atleast need to add changes marked with Greystar -- <more text follows> since thats how I decided to label everything. Also if guards are right next to each other when you force them to fight they will fight untill their timers run out. Other changes are just error correcting. As I mentioned before this PaladinAI.cs is exactly the same as the one already provided on the RunUO forums. I just included it with this package incase people who download my guardpackage do not already have that file. I will add credits to the file once I find who wrote it so I can properly give them the credit they deserve for writing them. You may still be able to call multiple guards even if guards are present Added a toggle allowing you to turn on and off AllowReds From in game, similair to the enable/disable guardedregions toggle. PS: anyone who downloaded this previously may want to download this again. EDIT: There has been some drastic changes to these Killable Guards to make them work EXACTLY as intended. I am almost positive All bugs are gone, but hey no one is perfect. So if I missed anything please feel free to post suggestions or ideas in the main thread. Thanks for the support. Using mods from this will also fix a potential crashbug in regular InstaKill guards in dealing with their built in spawner. SIDENOTE: This basemount does include the option to make it so every mount in game will start with a pack if you want that included just remove the /**/ or // from the areas inside the #region #endregion tag if you get an already defined error after doing that its cause you uncommented the extra OnBeforeDeath in the Pack Animal Methods. This should be the final installation of this version of the guards, there will still be additional guard types added to the package, but there should be no more need for any major changes to any scripts. Although If you have an Evo type of creature or I think one of Ronin's BioCreatures then they can still be guard targets OR Evo style pets they may still be guardtargets if summoned inside of a guarded region. I am not precisely sure why this happens, although have been able to fix it on one shard that used a Custom EvoDragon they made ***NOTICE*** If I start getting problems like I did before and people give me any kind of hard time about this script I will remove it again and I will not provide support for it on RunUO. ***NOTICE*** ***ERRORS***If you are going to post errors make sure tha you can duplicated them and provide you crashlog in debugmode so I can get the details I need. Plus describe in as much detail what was going on around the area where the guards where involved. Also the method you used to install my guards (did you use my code straight from the zip or did you use winmerge)***ERRORS*** ***SPECIAL NOTE*** Unless a mod someone does is added to my code by me it is not supported by me, the person supplying the mod should offer support for it. I do not care if it's posted here or not, as long as they offer support for their changes Decided to Upload this, it is no longer supported because I simply don't have the desire to do so anymore.
__________________
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." Last edited by Greystar; 11-17-2006 at 06:52 PM. |
||
|
|
|
|
#2 (permalink) | |
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Future Ideas: (not currently in development)
It's just an Idea I have and I started working on it but when I got fed up with some things that where going on I scrapped the project and deleted the code I was working on.
__________________
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." |
|
|
|
|
|
#5 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
__________________
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." |
||
|
|
|
|
#6 (permalink) |
|
Forum Master
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,261
|
I've been using this script for about 3 months, and it's been great. To my knowledge, if one guard that is called gets killed, then three more come. If each of them get killed, no more come. This has posed a bit of an issue for me... I modified the system a bit so that a random guard type would be selected, instead of there being a certain type for each region. I'd post them but they use my custom resources. Anyways, with the modification that I did, all four of the guards (the first one that gets killed and the three that follow) are the same type. It would be cool if you added a randomize type option, and if it would actually randomize each one instead of just the type of each call. Here's my modification to GuardedRegion.cs:
Code:
public override void MakeGuard( Mobile focus )
{
BaseGuard useGuard = null;
foreach ( Mobile m in focus.GetMobilesInRange( 14 ) )
{
if ( m is BaseGuard )
{
BaseGuard g = (BaseGuard)m;
if ( g.Focus == null ) // idling
{
useGuard = g;
break;
}
}
}
if ( useGuard != null )
{
useGuard.Focus = focus;
}
else
{
Type guardType = m_GuardType;
switch (Utility.Random(4))
{
case 0: guardType = typeof( WarriorGuard ); break;
case 1: guardType = typeof( ArcherGuard ); break;
case 2: guardType = typeof( MageGuard ); ; break;
default: guardType = typeof( PaladinGuard ); break;
}
m_GuardParams[0] = focus;
// Greystar -- This is the only change made in this part of the file
BaseGuard m_Guard = (BaseGuard)Activator.CreateInstance( guardType, m_GuardParams );
m_Guard.BackUP = false;
}
}
|
|
|
|
|
#7 (permalink) | ||
|
Forum Novice
Join Date: Jan 2005
Location: The People's Republic of Massachusetts
Age: 34
Posts: 158
|
Hey Greystar. I just want to say this is a killer script but whenever a red player attacks a guard i get this error and the shard crashes. This isn't an isolated issue, it happens every time a red attacks a guard.
Quote:
~Jason
__________________
So long and thanks for all the fish. :D 時々私poop Quote:
|
||
|
|
|
|
#8 (permalink) | |||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
Quote:
__________________
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." Last edited by Greystar; 02-20-2006 at 11:11 PM. |
|||
|
|
|
|
#9 (permalink) |
|
Forum Newbie
Join Date: Dec 2005
Posts: 19
|
if i try to put GuardedRegionStone.cs in my custom directory i got this problem:
Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Server.Items.GuardedRegionStone.OnLoad(ServerListE ventArgs e) at Server.ServerListEventHandler.Invoke(ServerListEve ntArgs e) at Server.Network.PacketHandlers.AccountLogin_ReplyAc k(NetState state) at Server.Network.PacketHandlers.AccountLogin(NetStat e state, PacketReader pvSrc) at Server.Network.MessagePump.HandleReceive(NetState ns) at Server.Network.MessagePump.Slice() at Server.Core.Main(String[] args) in other words when someone try to log in the server crash and gives this error ![]() thank's |
|
|
|
|
#10 (permalink) | |
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Unless I discover Evil Jason's Problem is different then the one I just found (don't know why it never occured before) I think I fixxed it. I will be posting the fix in one of the top threads and the BaseCreature I had to change will be fixxed in the Zip... Heh guess version 1.0.7 wasn't final.
__________________
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." |
|
|
|
|
|
#11 (permalink) |
|
Forum Novice
|
I've been using your guard since I launched my shard. I've been very pleased with them. You did solicit suggestions though, so I thought about it and decided to give you one... I think a [Global SetAllowReds command would really be a nice feature. If I was a better scripter, I would do it... unfortunately, I am not. Anyway, your killable guards are a great addition to my shard- my players love them. Actually, now that I think about it, I have a question for you... I created a mount based off of the distro Beetle.cs. It uses the same AI. I added them to the SBAnimalTrainer.cs. When a player would buy it, the guards would appear, and begin attacking it, even though it was blue... any ideas on what might've caused that? I have coincidently removed them from the Animal Trainers inventory, so it's no big deal, I'm just curious. Thanks for the great scripts!
|
|
|
|
|
#12 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
I'll look into the Global settings for changing some settings I'm not exactly sure how to allow the Global (or Multi or any of those others) work so I have to figure that out before I can get it to work with the command. It's probably something simple, but I really had no use for it so never looked into it, usually when someone sets one of those its for whatever town they want as apposed to all of them). However I will look into that, in the mean time if you want all your Towns to not allow reds up near the top is the redifinition of the m_AllowReds variable and you can see that says Core.AOS to change that you can either put false or !Core.AOS that means that if you turn AOS off then Reds Will be allowed into town as opposed to when AOS is on reds are allowed in town. Code:
private bool m_AllowReds = Core.AOS; Code:
private bool m_AllowReds = !Core.AOS; //this one just remember when you disable AOS then this becomes true. Code:
private bool m_AllowReds = false; //this one will turn off the AllowReds setting making it so reds are not allowed in anytown (except BucksDen which isnt guarded) by default [Global set Allowed false or maybe [Global set Allowed false where GuardedRegion not sure if either of those would work but its a thought. I think im going to create a distribution system for my GuardedRegionStone as soon as I get that crashlog from the person having problems so I know if it was the stone itself or it was misplaced. Just keep in mind though that even if either one works and you restart your shard it will reset back to whatever m_AllowReds equal to by default.
__________________
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." |
||
|
|
|
|
#14 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
__________________
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." |
||
|
|
|
|
#16 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
__________________
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." |
||
|
|
|
|
#17 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
I haven't had time to take a look at your script, however I would say that something good to add is the ability to limit the amount of guards called on a person within a certain interval, lets say three times in 10 minutes. This way a guard doesn't poof as soon as they are killed.
I was interested in not instakill for my shard, but limiting the guards to how many are actually spawned in the region. That means that if you killed the guards, or they are all taking care of crimes, then you could potentially get away with something. The guards would poof, or run from a spawn within the region, as apposed to being summoned from nowhere. |
|
|
|
|
#18 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
Example: 3 vendors see a player then they are going to get 3 guards and those 3 guards will each get 3 backups if the player manages to kill those guards. However after that there is a delay (that the instalkill guards used to have) that will prevent any more guards from being called. Which is about 15 seconds. That was never one I edited, because of how it works in BaseCreature I haven't been able to get it to stop calling guards if multiple vendors see the player. If I could figure out a way to stop the vendors from calling multiple guards I would. Right now I decided to work in Joeku's idea, I think I have it working more or less that this point, just need to do some more testing.
__________________
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." |
||
|
|
|
|
#19 (permalink) | |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
Quote:
if ( m_Table[m] > 3 ) return false; inside of a function called CanCallGuards( Mobile m ) or something similar. Run that through the function that calls the speech and the guard system for vendors, and you will have it limited how you want it. |
|
|
|
|
|
#20 (permalink) | |
|
Forum Novice
|
Quote:
The other thing you talked about was the ability to hire guards, could the be achieved by simply adding hireling scripts for guards, or editing the guards to act like hirelings when not whacking away? Anyway I'm going to give your guard system a try, it may be a pain since I think I had to edit some of those scripts for XMLSpawner add-ons. -Viront --- My first post please don't flame... too much. |
|
|
|
|
|
#21 (permalink) | |
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
how I intend them to work is simply this. 1) I created an Item to use as the spawner (basically a guard only spawner) 2) Settings on spawner
5) don't know if I intended anything else. The guards themselves aren't actually hirable the stone (item) will be purchasable via deed just like the old guild deeds. If the player doesnt have enough money in their bankbox then the stone shuts down (actually just doesnt spawn any guards or despawns them if waypoints where set) Can't really think of anything else I was (or am) going to do with this at this time. (maybe charge a little more of the guard is mounted). EDIT: I don't flame my sig was in reference to other people. The only reason I'd flame anyone is if I needed combustible material for my fireplace.
__________________ Quote:
< |