Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 05-20-2004, 08:16 PM   #1 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Post Custom NecroMage AI - RunUO 1.0 RC0

Summary:

Customised Necromage AI V1.0 Beta for RunUO 1.0 RC0:

Used for necromage npcs. This Ai enables you to create Necromage npcs, that cast necromancer and magic spells while in combat. A good complement to any customised shard, looking for extra hardness and heavy challenges.

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 ).

Custom Necromancer AI ( as a component, but its optional ).

Description:

Customised Necromage AI V1.0 Beta:

Uses parts of the Custom Necromacer AI coded by myself.
Used parts of the standard RunUO MageAI.cs

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 ( see smaple npc code on how to add this to loot ).

Components needed:

These items below are needed, as just like the players, a npc must have the necessary components to use a skill:
  • Necromancer spellbook - See sample npc to find out how to insert.
  • Necromancer Regs, or bag of Necro reagents
  • Magic Reagents, or bag of Mage Reagents
  • Magic spellbook ( optional )
  • Necromancy, Spirit Speak, & Poisoning skills in NPC code
  • Magery, Meditation, & Evaluate Intelligence skills in NPC code.


Features:

- Npcs will cast Necromancer and Mage spells when attacking.
- Npcs use Spirit Speak & healing spells as a healing method.
- Npcs usage of high end spells such as Wither & Vengeful Spirit
- Npcs usage of spell combos, combining magery with necromancy spells.
- Npcs will teleport to target, dispel, and cure themselves from Poison.
- Improved healing performance based on Spirit Speak & Greater Heal or Heal
mage spells.

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 the idea for developing this customised AI go to Sidsid.

Download packages:

Download the NecromageAI.zip if you are not using my Custom Necromancer AI script.

Download the NecromageAI_Pack_for_necromancerAI_Users.zip, if you already have my Custom necromancer script installed on your shard. This pack includes not only the sample custom npc, but also the modified BaseAI.cs & BaseCreature.cs pre-modified to enable the use of both my AI's by a simple over-writting of the existing files.


Enjoy.


Installation:

Installation Instructions:

To install proceed as follows:

On the file BaseAI.cs:

Under line 26, insert the following or under line 27 ( below the necromancer Ai entry if you are using it ):

AI_Necromage

Under line 250, insert the following ( only do this if you are not using my Custom Necromancer AI script already ):

SkillName.Necromancy


On BaseCreature.cs:

Under line 1616, insert the following ( if you arent using my custom necromancer Ai script ) or under line 1621 ( if you are using my custom necromancer AI already ):

/////////////////NECROMAGEAI//////////////
case AIType.AI_Necromage:
m_AI = new NecromageAI(this);
break;
/////////////////NECROMAGEAI//////////////


Final steps:

After this is done, put the NecromageAI.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_Necromage, FightMode.Closest, 10, 1, 0.2, 0.4 )

The files contained on the second zip file, named "NecromageAI_Pack_for_necromancerAI_Users.zip" should not be downloaded unless you have previously installed my Custom Necromancer AI script package.

You may find my other scripts in these forums in the "others" and "systems" sections:

Custom Necromancer AI v1.0 Final - RunUO 1.0 RC0

Custom Paladin AI v1.0 Beta - RunUO 1.0 RC0

Enjoy.
Attached Files
File Type: zip NecroMageAI.zip (6.2 KB, 547 views)
File Type: zip NecroMageAI_Pack_for_necromancerAI_Users.zip (39.6 KB, 431 views)
Final Realms is offline   Reply With Quote
Old 05-21-2004, 02:26 PM   #2 (permalink)
Greatwizard
 
sidsid's Avatar
 
Join Date: Mar 2004
Location: orange county, CA
Age: 27
Posts: 1,111
Post

Hooray! The necromage AI. It is very fun!

Final Realms If you dont mind I will post the link to my submission of mobs that use this AI.

http://www.runuo.com/forum/showthrea...807#post270807
__________________
-deadened with the helium of converses!
sidsid is offline   Reply With Quote
Old 05-23-2004, 10:35 AM   #3 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Default

Quote:
Originally Posted by sidsid
Hooray! The necromage AI. It is very fun!

Final Realms If you dont mind I will post the link to my submission of mobs that use this AI.

http://www.runuo.com/forum/showthrea...807#post270807
Your are more than welcome Sidsid
Final Realms is offline   Reply With Quote
Old 05-27-2004, 03:09 AM   #4 (permalink)
Forum Expert
 
Ravenal's Avatar
 
Join Date: Oct 2003
Location: Spokane Valley, WA
Age: 24
Posts: 1,528
Default

Attcually the true necromage ai that was built was mine =/ it is more used and more interesting and more fun to fight againts a necro/mage... Not trying to make it sound bad, this script works great =) <:P? Anyway... Execept the only way to get my Necromage type of AI is downloading the whole VampirePack lol... So this is good for someone just wanting the AI itself... SO good job =) And btw, I never even looked at this script how it was done, i just dug into how the Mage_AI worked and started tuning things up and now my AI_Vampire does both Either Spirit Speak or Healing and other such at a random based, instead of just Spiritspeak at 100% of the time so its a 50/50 chance for either greater heal, spiritspeak and such =P

Good job =)
__________________
Creator of Genesis :: genesisworlds.com
-- Genesis is the next replacement program for UO Landscaper & Dragon
Ravenal is offline   Reply With Quote
Old 05-27-2004, 08:01 AM   #5 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Default

Quote:
Originally Posted by awakenlands
Attcually the true necromage ai that was built was mine =/ it is more used and more interesting and more fun to fight againts a necro/mage... Not trying to make it sound bad, this script works great =) <:P? Anyway... Execept the only way to get my Necromage type of AI is downloading the whole VampirePack lol... So this is good for someone just wanting the AI itself... SO good job =) And btw, I never even looked at this script how it was done, i just dug into how the Mage_AI worked and started tuning things up and now my AI_Vampire does both Either Spirit Speak or Healing and other such at a random based, instead of just Spiritspeak at 100% of the time so its a 50/50 chance for either greater heal, spiritspeak and such =P

Good job =)
I dont want to start a flame war, so I'll just point out 2 obvious factors to anyone that codes and knows how to read code and the forums:

1.- Date of release of my script, compared to yours.

2.- Compare the code and comments in both scripts ( check the comments in the code.. funny how my own typos are all there, etc... ).

You based yourself on my script, which is fine by me, but pls, dont claim your is better, etc.

And modifications wise, you only added a second check to your script, to use healing based on a necro + magery calculation, and then implemeted it on my methods who where in turn based on the RunUO Mage distro AI, by the RunUO Dev Team, and the Necromancer AI I released.

Obviously each person chooses the method they think, fits best their scripts, I chose spirit speak as a healing method because I felt it was more OSI like, and closer to the necromancers I did before.

The least you could do, is thank RunUO dev team for their work, like I did, and admit on whom you based yourself.

As to sounding bad, yes you do sound badly, not that I care but you do.

Thnxs for the praise though, Im glad you also think its a good job, and good job to you too on those npcs, as well as good luck on your quest scripting.
Final Realms is offline   Reply With Quote
Old 05-27-2004, 10:29 AM   #6 (permalink)
Forum Expert
 
Ravenal's Avatar
 
Join Date: Oct 2003
Location: Spokane Valley, WA
Age: 24
Posts: 1,528
Default

maybe i was alittle out of hand on my topics =P... I mean to not try to be offended, yes i see what you mean, but again, I didn't just add the method and do new mathimathical equations for magery and necromancy... I attcually made new combos, that would look good in the format of fighting, and yes I agree... Everyone has their own style of coding, so... We both had our own way, so none of the scripts were really claimed ours, it was a duplicate of the others, and the real thanks goes to the RunUO Derv, I agree.... Again.. My bad on crossing alittle to much...

And YEs this Vampire Quest has gotten Very big, in fact it comes with a generation that i am making for it to save alot of Admin's Time from having to form it, i even made a warning gump to warn them and show them where the 6 locations that is going to be using to create this MASSIVE new Vampirc Dungoen =P
__________________
Creator of Genesis :: genesisworlds.com
-- Genesis is the next replacement program for UO Landscaper & Dragon
Ravenal is offline   Reply With Quote
Old 05-27-2004, 10:35 AM   #7 (permalink)
Forum Expert
 
Ravenal's Avatar
 
Join Date: Oct 2003
Location: Spokane Valley, WA
Age: 24
Posts: 1,528
Default

I don't see how ours is the same and how i copied yours at all =/ I coppied the Magery List, and then worked my way from there...

Yours...
Code:
private const double HealChance = 0.05; // 5% chance to heal at gm necromancy, uses spirit speak healing
		private const double TeleportChance = 0.05; // 5% chance to teleport at gm necromancy
		private const double DispelChance = 0.75; // 75% chance to dispel at gm necromancy
Code:
else if ( !m_Mobile.Summoned && (SmartAI || (ScaleByMagery( HealChance ) > Utility.RandomDouble())) )
				{
					if ( m_Mobile.Hits < (m_Mobile.HitsMax - 50) )
					{
						if ( !new GreaterHealSpell( m_Mobile, null ).Cast() )
							new HealSpell( m_Mobile, null ).Cast();
					}
					else if ( m_Mobile.Hits < (m_Mobile.HitsMax - 10) )
					{
						new HealSpell( m_Mobile, null ).Cast();
					}
				}
My Editing...
Code:
private const double HealChance = 0.10; // 10% chance to heal or spiritspeak at gm magery or gm spiritspeak
		private const double TeleportChance = 0.05; // 5% chance to teleport at gm magery
		private const double DispelChance = 0.75; // 75% chance to dispel at gm magery
Code:
else if ( !m_Mobile.Summoned && ( SmartAI || ScaleByHealing( HealChance ) > Utility.RandomDouble()))
				{
					switch( Utility.Random( 2 ) )
					{
						case 0:
							if ( m_Mobile.Hits < (m_Mobile.HitsMax - 50) )
							{
								m_Mobile.UseSkill( SkillName.SpiritSpeak );
							}
							else if ( m_Mobile.Hits < (m_Mobile.HitsMax - 10) )
							{
								m_Mobile.UseSkill( SkillName.SpiritSpeak );
							}
						break;
						case 1:
							if ( m_Mobile.Hits < (m_Mobile.HitsMax - 50) )
							{
								if ( !new GreaterHealSpell( m_Mobile, null ).Cast() )
									new HealSpell( m_Mobile, null ).Cast();
							}
							else if ( m_Mobile.Hits < (m_Mobile.HitsMax - 10) )
							{
								new HealSpell( m_Mobile, null ).Cast();
							}
						break;
					}
				}
And the HEaling format, there is Absolutly nothign in common... Lets look at the Spell Casting for single dmg...

Code:
	public virtual Spell GetRandomDamageSpell()
		{
			int maxCircle = (int)((m_Mobile.Skills[SkillName.Necromancy].Value + 50.0) / (100.0 / 7.0));
			int minCircle = (int)((m_Mobile.Skills[SkillName.Magery].Value + 50.0) / (100.0 / 7.0));

			if ( maxCircle < 2 && minCircle < 8 )
				maxCircle = 2;
				minCircle = 8;

			switch ( Utility.Random( minCircle + (maxCircle*2) ) )
			{
				case  0: return new FireballSpell( m_Mobile, null );
				case  1: return new PainSpikeSpell( m_Mobile, null );
				case  2: return new MindBlastSpell( m_Mobile, null );
				case  3: return new BloodOathSpell( m_Mobile, null );
				case  4: return new FlameStrikeSpell( m_Mobile, null );
				case  5: return new EvilOmenSpell( m_Mobile, null );
				case  6: return new CurseSpell( m_Mobile, null );
				case  7: return new MindRotSpell( m_Mobile, null );
				case  8: return new LightningSpell( m_Mobile, null );
				case  9: return new StrangleSpell( m_Mobile, null );
				case 10: return new WitherSpell( m_Mobile, null );
				case 11: return new VengefulSpiritSpell( m_Mobile, null );
				default: return new FlameStrikeSpell( m_Mobile, null );
			}
		}
That was yours heres mine

Much different...

and Uses far more Spells than yours =/ No offense thats just how i thought of it, And btw i never knew you made one until i submitted mine

Code:
public virtual Spell GetRandomDamageSpell()
		{
			int maxCircle = (int)(((m_Mobile.Skills[SkillName.Magery].Value + 20.0) / (100.0 / 7)) + (int)((m_Mobile.Skills[SkillName.Necromancy].Value + 20.0) / (100.0 / 7)));

			if ( maxCircle < 1 )
				maxCircle = 1;

			switch ( Utility.Random( maxCircle*2 ) )
			{
				case  0: case  1: return new MagicArrowSpell( m_Mobile, null );
				case  2: case  3: return new HarmSpell( m_Mobile, null );
				case  4: case  5: return new FireballSpell( m_Mobile, null );
				case  6: case  7: return new LightningSpell( m_Mobile, null );
				case  8: case  9: return new MindBlastSpell( m_Mobile, null );
				case 10: case  11: return new PainSpikeSpell( m_Mobile, null );
				case 12: case  13: return new BloodOathSpell( m_Mobile, null );
				case 14: case  15: return new EvilOmenSpell( m_Mobile, null );
				case 16: case  17: return new MindRotSpell( m_Mobile, null );
				case 18: case  19: return new StrangleSpell( m_Mobile, null );
				case 20: return new WitherSpell( m_Mobile, null );
				case 21: return new VengefulSpiritSpell( m_Mobile, null );
				case 22: return new EnergyBoltSpell( m_Mobile, null );
				case 23: return new ExplosionSpell( m_Mobile, null );
				case 24: return new PoisonStrikeSpell( m_Mobile, null );
				default: return new FlameStrikeSpell( m_Mobile, null );
			}
		}
__________________
Creator of Genesis :: genesisworlds.com
-- Genesis is the next replacement program for UO Landscaper & Dragon
Ravenal is offline   Reply With Quote
Old 05-27-2004, 10:44 AM   #8 (permalink)
Forum Expert
 
Ravenal's Avatar
 
Join Date: Oct 2003
Location: Spokane Valley, WA
Age: 24
Posts: 1,528
Default

Code:
case 5: //Combo to soften our enemies with a powerful attack while we have max mana amounts
				{
					if ( m_Mobile.Mana > 80 )
					{
						if ( Utility.Random( 2 ) == 0 && !c.Paralyzed && !c.Frozen && !c.Poisoned ) 
						{
							m_Combo = 0;
							spell = new VengefulSpiritSpell ( m_Mobile, null );
						}
						else
						{
							m_Combo = 0;
							spell = new ParalyzeSpell( m_Mobile, null );
						}
					}
				    break;
				}
This part came from your Necro AI, which is what I kinda got some of your ideas from so yes I should really be thanking you =P
__________________
Creator of Genesis :: genesisworlds.com
-- Genesis is the next replacement program for UO Landscaper & Dragon
Ravenal is offline   Reply With Quote
Old 05-27-2004, 02:18 PM   #9 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Talking

Like I said.. dont worry bout it, I dont care. Its no biggie, just thank the guys that dev runuo, they are the ones who really deserve praise, since all the rest of us do is inspired by them, and based on their work
Final Realms is offline   Reply With Quote
Old 05-28-2004, 09:50 AM   #10 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Default

Since the script seemsto have been thoroughly tested, and no bugs have been reported so far, I'll be making this the final version of the script.

Should update main post soon.
Final Realms is offline   Reply With Quote
Old 06-10-2004, 06:14 AM   #11 (permalink)
Forum Newbie
 
Join Date: Apr 2003
Location: Manila, Philippines
Age: 31
Posts: 99
Default

Alls good! The only problem I had was with the >> Under line 26, insert the following or under line 27 ( below the necromancer Ai entry if you are using it ):
AI_Necromage as I put AI_NecroMage Spent a whold 10 minutes trying to figure out what was wrong. hehe
raffy is offline   Reply With Quote
Old 06-10-2004, 09:21 AM   #12 (permalink)
 
hudel's Avatar
 
Join Date: Oct 2003
Location: Germany
Age: 38
Posts: 508
Send a message via ICQ to hudel
Default

Nice and usefull Script. Could be used for Liches, too. I Think it's better then just the Necro AI. Liches should be very dangerous .

Thanks for sharing it. It will be very great for my RP-Homeshard. My friends and I love it.
hudel is offline   Reply With Quote
Old 06-10-2004, 05:16 PM   #13 (permalink)
 
Final Realms's Avatar
 
Join Date: Jun 2003
Location: Third Rock from the sun ( Europe, Portugal )
Posts: 108
Talking

Quote:
Originally Posted by hudel
Nice and usefull Script. Could be used for Liches, too. I Think it's better then just the Necro AI. Liches should be very dangerous .
You can download Sidsid's necromage monster/npc pack that he made for this AI, the link to his post, is posted right beneath the main post, its the second post on this thread

Quote:
Originally Posted by hudel
Thanks for sharing it. It will be very great for my RP-Homeshard. My friends and I love it.
You are more than welcome Im so very glad you like it

Pls dont forget to rate it too
Final Realms is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5