|
||
|
|
#1 (permalink) |
|
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
|
Summary:
Customised Necromancer AI V1.0 Used for necromantic npcs. This Ai enables you to create Necromancer npcs, that cast necromancer spells while in combat. A good complement to any customised shard. To use this script you must have the following items scripted in your shard: Necromancer bag of reagents ( or if not available, necromancer reagents must be part of the npc's loot ). Full necromancer spellbook ( how to add this, is included on smaple npc code ). Works on RunUO 1.0 RC0 For support email me at: elanon@terra.es Or post on this thread. Description: Customised Necromancer AI V1.0 Used parts of the standard RunUO MageAI.cs Used for necromantic npcs. This Ai enables you to create Necromancer npcs, that cast necromancer spells while in combat. A good complement to any customised shard. To use this script you must have the following items scripted in your shard: Necromancer bag of reagents ( or if not available, necromancer reagents must be part of the npc's loot ). Full necromancer spellbook. Components needed: These items below are needed, as just like the players, a npc must have the necessary components to use a skill: Full Necromancer Spellbook ( how to add this is included on sampl npc code ). Necromancer bag of reagents, comes with the RunUO 1.0 RC0 release. Necromancer Npcs, will need the following skills for best usage of AI: Necromancy, Spirit Speak, Poisoning & Meditation skills. Features: - Npcs will cast Necromancer spells when attacking. - Npcs use Spirit Speak as a healing method. - Npcs usage of high end spells such as Wither & Vengeful Spirit - Npcs usage of spell combos - Npcs will teleport to target as Mage Npcs would - Improved healing performance but based solely on Spirit Speak. Support: Script supported only on RunUO 1.0 RC0 version. For support email me at: elanon@terra.es Or post on this thread. Thanks: My thanks for the collaboration and help for developing this customised AI go to: Darklon, and Admin Maeve from Maeve's Garden. SkyMonkey, Sidsid & GoldDraco13 from RunUo Forums for the Sample npc, and the Full Necromancer Spellbook Generation Code. Enjoy. Installation Instructions: To install proceed as follows: On the file BaseAI.cs: Under line 26, insert the following: AI_Necro Under line 250, insert the following: SkillName.Necromancy On BaseCreature.cs: Under line 1616, insert the following: /////////////////NECROAI////////////// case AIType.AI_Necro: m_AI = new NecroAI(this); break; /////////////////NECROAI////////////// Final steps: After this is done, put the NecroAi.cs file into your folder: Scripts/Engines/AI/AI Start your server after installing, normally. More info on use: To use on npcs, declare the AI normally like for any other AI: public NpcName() : base( AIType.AI_Necro, FightMode.Closest, 10, 1, 0.2, 0.4 ) Update to downloads( 05/20/2004 ): Released Single pack with all files & one bonus NPC. Pack inludes: Pre-modified BaseAI & BaseCreature scripts for a easier installation. Sample Npc, demonstrating useage of AI, how to include necro reagents, and how to include in loot a full necromancer spellbook (Sample Necromancer, by SkyMonkey ). Revised versions of the base lich npc, that now use the Necromancer AI ( Revised Lich Npcs, by GoldDraco13 ). Bonus Custom NPC - Boss type toughness - Grim Reaper. Installation directories: To use these files you must not have previously edited them to add anything, as they will overwrite completely you old ones. They contain only the modification for the use of this AI script, and have been tested on a base, clean installation of RunUO 1.0 RC0. These files should be extracted to: Scripts/Engines/AI/AI - for BaseAI.cs and Scripts/Engines/AI/Creatures - for BaseCreature.cs The NPC files should be extracted to: Scripts/Custom/Npc - for SampleNecromancer.cs Scripts/Custom/Npc - for GrimReaper.cs and for GoldDraco13's updated lich pack: Scripts/Mobiles/Monsters/Humanoid/Magic - for the AncientLich.cs, Lich.cs and LichLord.cs After these files are installed, follow the remainder of instructions to call upon the AI, as explained above, or read through the code of the official sample npc. For more advanced examples, download GoldDraco13's update to the base distribution lich npc files, also included in the distribution files. For advanced npc sample also see the bonus custom npc included, named GrimReaper.cs File includes installation instructions as posted here. For the matching AI script, the Custom Necromage AI script, you can go here: Custom Necromage AI v1.0 Beta - RunUO 1.0 RC0 For the newest AI I have released, the paladin AI, go here: Custom Paladin AI v1.0 Beta - RunUO 1.0 RC0 |
|
|
|
|
|
#2 (permalink) |
|
Join Date: Jun 2003
Age: 31
Posts: 181
|
Im surprised that this, Paladin AI, and Fight mode Good arent distro.
![]()
__________________
The original Lord of the Rings Shard -Coming back soon!- (After I get back from Iraq) Admin Tremerelord-Shard Loremaster-Steward of Gondor |
|
|
|
|
|
#6 (permalink) | |
|
Forum Novice
Join Date: Jan 2004
Posts: 105
|
Hmm I got errors, when I tried it. First I've got that error :
Code:
Scripts: Compiling C# scripts...failed (19 errors, 0 warnings) - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1513: (line 60, column 33) } exp ected - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1520: (line 67, column 4) Class, struct, or interface method must have a return type - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1031: (line 67, column 14) Type expected - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1520: (line 67, column 18) Class , struct, or interface method must have a return type - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1031: (line 67, column 26) Type expected - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1520: (line 68, column 4) Class, struct, or interface method must have a return type - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1031: (line 68, column 14) Type expected - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1519: (line 68, column 37) Inval id token ')' in class, struct, or interface member declaration - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1520: (line 69, column 4) Class, struct, or interface method must have a return type - Error: Scripts\Custom\MyCreatures\Baal.cs: CS1031: (line 69, column 16) Type expected - Error: Scripts\Engines\AI\AI\BaseAI.cs: CS1513: (line 26, column 11) } expect ed - Error: Scripts\Engines\AI\AI\BaseAI.cs: CS0116: (line 27, column 3) A namespa ce does not directly contain members such as fields or methods - Error: Scripts\Engines\AI\AI\BaseAI.cs: CS1513: (line 250, column 25) } expec ted - Error: Scripts\Engines\AI\AI\BaseAI.cs: CS1002: (line 250, column 25) ; expec ted - Error: Scripts\Engines\AI\AI\BaseAI.cs: CS1519: (line 252, column 4) Invalid token '}' in class, struct, or interface member declaration - Error: Scripts\Engines\AI\AI\BaseAI.cs: CS1518: (line 254, column 18) Expecte d class, delegate, enum, interface, or struct - Error: Scripts\Engines\AI\AI\BaseAI.cs: CS1518: (line 305, column 34) Expecte d class, delegate, enum, interface, or struct - Error: Scripts\Engines\AI\AI\BaseAI.cs: CS1518: (line 306, column 41) Expecte d class, delegate, enum, interface, or struct - Error: Scripts\Engines\AI\AI\BaseAI.cs: CS1022: (line 330, column 7) Type or namespace definition, or end-of-file expected Scripts: One or more scripts failed to compile or no script files were found. - Press return to exit, or R to try again. Quote:
|
|
|
|
|
|
|
#7 (permalink) | |
|
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
|
Quote:
You have 2 errors here, one belongs to your NPC script and is caused directly by it ( I tested it on my test server where I develop my scripts and I get the same lines reporting error that you show here for your NPC in the error log, but no errors related to the AI engines ). The second error is a installation mistake. Under line 26 of the file you must include the code I wrote. It should look like this in your file: Code:
AI_Thief, AI_Necro } The error on lines 250 and forward is because u are missing again a "}" and a ";". Your file after modifying to my instructions should look like this: Code:
SkillName.Meditation, SkillName.Necromancy }; Right now though, the only thing wrong is a bad installation, and a bugged npc script. You are missing a "(" in one of the lines, etc... If you want, and have not touched the BaseAI.cs file or the BaseCreature.cs files that come with the RunUO 1.0 RC0 base distro installation, I have uploaded the edited versions that go along with my script, for a easier installation of this AI, in the main post of the script. Install these in their proper folders, and allow them to overwrite your existing ones. These scripts should be extracted from the zip file into your: Scripts/Engines/AI/AI - for BaseAI.cs file and Scripts/Engines/AI/Creature - for BaseCreature.cs file A warning about the following procedure of overwritting original distribution files: Before overwritting or deleting your old files you must make sure you have backup copies of your original files. Do not use these files I just uploaded if your RunUO Server is not RunUO 1.0 RC0, or if you have these files customised with other AI scripts or changes. Use these only if you have not changed the base distribution ones. |
|
|
|
|
|
|
#10 (permalink) | |
|
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
|
Quote:
First set the skills needed to use necromancy, they are the same a player needs to work on to be a GM necromancer. The Skills, as per OSI standard are:
The code would look like this: Code:
// 100.0 is GM level tweak the number to more or less skill // depending on how hard u want the npc to be. SetSkill( SkillName.SpiritSpeak, 100.0 ); SetSkill( SkillName.Necromancy, 100.0 ); SetSkill( SkillName.Poisoning, 100.0 ); The code would look like so: Code:
PackNecroReg( 50, 100 );// Creates 10 to 20 of each necro reagent. Remember that you need a full necromancer spellbook as well for best results. I will not post the book's script as it is not mine, I didnt make the full spellbook script, and obviously it isnt right to post other people's work without their consent. |
|
|
|
|
|
|
#12 (permalink) | |
|
Greatwizard
Join Date: Mar 2004
Location: orange county, CA
Age: 27
Posts: 1,111
|
Quote:
|
|
|
|
|
|
|
#13 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
Don't need to make s script for a Full necro spell book: Just add this to the necro creature script: PackItem( new NecromancerSpellbook( (UInt64)0xFFFF ) ); Hope this helps ![]() |
|
|
|
|
#14 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
Code:
using System;
using System.Collections;
using Server.Items;
using Server.ContextMenus;
using Server.Misc;
using Server.Network;
namespace Server.Mobiles
{
public class Necromancer : BaseCreature
{
[Constructable]
public Necromancer() : base( AIType.AI_Necro, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
SpeechHue = Utility.RandomDyedHue();
Title = "the Necromancer";
Hue = 0x3C6;
if ( this.Female = Utility.RandomBool() )
{
this.Body = 0x191;
this.Name = NameList.RandomName( "female" );
AddItem( new Skirt( Utility.RandomRedHue() ) );
}
else
{
this.Body = 0x190;
this.Name = NameList.RandomName( "male" );
AddItem( new ShortPants( Utility.RandomRedHue() ) );
}
SetStr( 386, 400 );
SetDex( 151, 165 );
SetInt( 161, 175 );
SetDamage( 8, 10 );
SetDamageType( ResistanceType.Physical, 100 );
SetResistance( ResistanceType.Physical, 35, 45 );
SetResistance( ResistanceType.Fire, 25, 30 );
SetResistance( ResistanceType.Cold, 25, 30 );
SetResistance( ResistanceType.Poison, 10, 20 );
SetResistance( ResistanceType.Energy, 10, 20 );
SetSkill( SkillName.SpiritSpeak, 100.0 );
SetSkill( SkillName.Necromancy, 100.0 );
SetSkill( SkillName.Poisoning, 100.0 );
SetSkill( SkillName.MagicResist, 80.0, 100.0 );
Fame = 5000;
Karma = -5000;
VirtualArmor = 40;
AddItem( new Shoes( 0x151 ) );
AddItem( new Robe( 0x455 ) );
AddItem( new FancyShirt( 0x455 ) );
PackNecroReg( 50, 100 );// Creates 10 to 20 of each necro reagent.
AddItem( new NecromancerSpellbook( (UInt64)0xFFFF ) );
Item hair = new Item( Utility.RandomList( 0x203B, 0x2049, 0x2048, 0x204A ) );
hair.Hue = Utility.RandomNondyedHue();
hair.Layer = Layer.Hair;
hair.Movable = false;
AddItem( hair );
}
public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich );
AddLoot( LootPack.Meager );
}
public override bool AlwaysMurderer{ get{ return true; } }
public Necromancer( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
Just a note: Spellbooks are nubed on my shard so this bad boy doesn't drop a full necrobook every time it dies. Best to adjust accordingly (or alteast be aware that a player is going to get a FULL Necro book every time he/she kills one of these!) |
|
|
|
|
#16 (permalink) |
|
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
|
Kudos to SidSid, SkyMonkey & GoldDraco
Thnxs for posting this NPC, and extra bit of info on the Necrospellbook, it makes things a lot easier for other people to use my script thanks to your supperb imput. If you guys dont mind Id like to package all that with the Necro AI download. Once again Kudos to u guys and thnxs ![]() |
|
|
|
|
|
#19 (permalink) |
|
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
|
Updated downloads on main post, to include Skymonkey's Necromancer as the Sample Necromancer for this script.
This Npc illustrates use of the script on NPC, showing both skill use, how to add the necromancer reagents & how to create the full necromancer spellbook. Thanks again to SkyMonkey, Sidsid & GoldDraco13. |
|
|
|
|
|
#20 (permalink) |
|
Guest
Posts: n/a
|
You and anyone in this community are allowed to copy/paste/change/edit or use my scripts at will
![]() P.S. I took the liberty to change the distro lich/lich lord and ancient lich lord scripts to necro AI as they should have been in the first place(OSI Bad) =] |
|
|
|
#21 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
Oh and thanks for those updates! Will bring the fear of god back into my players First player: Hey look *yawn* ANOTHER lich. Second player: Ya lets just kill it quick and then loot it. BOTH PLAYERS: Holey crap! What is that it's casting at us?!?! Too evil! ![]() |
|
|
|
|
#23 (permalink) | ||||
|
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
|
Quote:
Actually I just visited shard using tis AI, they name the npcs, necroliche lord.. well I was invited by the GMs & Admins to see it working. It was very fun to see the payers scream in panic as the Necroliche launched a powerful combo ( wither + vengeful spirit+poison strike ) at each of them. At that point their only coments where: Quote:
I found it vastly amusing to see the effect this simple script makes on players, and how much they love the silly thing... Id never have thought it would make much of a difference. Quote:
thnxs again I'll put that file into the main downloads so everyone has them all neatly grouped in one single spot. Althoug i will soon make a single package of it all to save everyone the downloading of a lot of files ![]() Quote:
, glad you players like it, and that you guys like it.The single pack preceedes the soon to be released Custom Paladin AI, by myself. Kudos to you GoldDraco13. Thnxs for this file ![]() |
||||
|
|
|
|
|
#24 (permalink) |
|
Forum Expert
Join Date: Jun 2003
Location: Ottawa, Canada
Age: 19
Posts: 320
|
First off, thank you many times for this! Real original idea.
There is only one thing you might be able to improve. When the mana of a NecroAI mobile is low, it keeps casting pain spike, and I think you can't kill a mobile with pain spike. I'm not complaining, just a constructive comment. ![]() |
|
|