RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Black Lich

dianus

Wanderer
Hello :)
I am again working on this script scence I been busy all week long. I have clear many of the errors it had before but I still have 2 more lines that I can't figure out.
Error
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
 + Customes/Testing Scripts/Black Lich/NecroMageAI.cs:
    CS0029: Line 658: Cannot implicitly convert type 'System.Collections.Generic
.List<Server.AggressorInfo>' to 'System.Collections.ArrayList'
    CS0029: Line 659: Cannot implicitly convert type 'System.Collections.Generic
.List<Server.AggressorInfo>' to 'System.Collections.ArrayList'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

Lines 658 and 659
Code:
			if ( m_Mobile.Deleted || m_Mobile.Int < 95 || CanDispel( m_Mobile ) || m_Mobile.AutoDispel )
				return null;

			if ( activeOnly )
			{
				[COLOR="Red"]ArrayList aggressed = m_Mobile.Aggressed;
				ArrayList aggressors = m_Mobile.Aggressors;[/COLOR]

				Mobile active = null;
				double activePrio = 0.0;

				Mobile comb = m_Mobile.Combatant;
 

roadmaster

Sorceror
Replace this:

Code:
ArrayList aggressed = m_Mobile.Aggressed;
ArrayList aggressors = m_Mobile.Aggressors;

with this:

Code:
List<AggressorInfo> aggressed = m_Mobile.Aggressed;
List<AggressorInfo> aggressors = m_Mobile.Aggressors;

and dont forget to change the "using Server.Collections;" using statement to
"using Server.Collections.Generic;".

try that and see how that works its off the top of my head but i think its right.


roadmaster
 

Shadow_Storm

Wanderer
Roadmaster Thank you for the help it worked, by the way I was using my sister user name Dianus, now I got my own. Now my question is, are you guys OK for me to post the updates to this script? Or should I leave it as it is?
I made a couple of changes from the original, for example it drop loot random and so far I added an extra item. So I leave it up to you guys if I should post the update script.
 

roadmaster

Sorceror
are you guys OK for me to post the updates to this script? Or should I leave it as it is?

I made a couple of changes from the original,

Personnally i dont care one way or the other, however some people do.

My opinion is this:

Try to contact the original creator of the script and ask him for his permission first.

if you dont, you will have alot of people Flaming you up one side and down the other.

If the original scriptor is no longer a member of this community and you have made more than a few changes, then go ahead as long as you give credit to the original scriptor for his work.

but if you've only made a few changes i wouldnt suggest it.

Again as i said this is just my opinion.


roadmaster ;)
 

Snowlord

Sorceror
had same errors; acquire did work, thanks!.. also find that "controled" and spell it "controlled".

But still have these two errors;
CS0029: Line 657: Cannot implicitly convert type 'System.Collections.Generic
.List<Server.AggressorInfo>' to 'System.Collections.ArrayList'
CS0029: Line 658: Cannot implicitly convert type 'System.Collections.Generic
.List<Server.AggressorInfo>' to 'System.Collections.ArrayList'

Can anyone help with these?
 
Top