Okay, I have been playing around trying to figure out why this doesn't work for me. As far as I can tell, either the gump buttons are not passing the values to the OnResponse section of code (sorry, not sure what that is called and I am new to C#, am old, and its about 2 hours past my bedtime).

If that is not the case, then the OnResponse is not being called at all.

For the [ListInvasions command, I believe that the Invasions variable is not being set and therefore there is nothing to count and the result is a null value, and there isn't an IF statement to handle the null. I tried modifying the IF statement from

"if (Invasions.Count == 0)"
to
"if ((Invasions.Count == 0) || (Invasions.Count == null))"

But that also did not cause the gump to be shown when called. Am I missing something here?

PS. How do you get the "Code (C#):" boxes? I don't see that option. Apologies if this is not more clear. I'll try editing in the morning if I can make if sound better after some coffee. I am still trying to learn C# so any pointers would be appreciated.
 
are you adding 30 minutes to the time it first shows when creating the invasion or are you changing it to your local time + 30 minutes?

this system uses UTC (Coordinated Universal Time) which is several hours ahead of any time zone in the US
 
I am adding thirty minutes to the UTC time. But, I think I have something figured out here.

The part that is giving me issues is the:
AddGroup(x); lines in the code.
If I comment them out, the code works (though I can only chose one radio button) but, the randomize button does allow me to schedule an invasion.

With these lines in as normal, I can select ANY and all radio buttons, and the Okay / Cancel buttons do nothing.

I have changed the groups to start at 0 (0,1,2) instead of (1,2,3) and I can select only one city now, but type and champ are still multiselectable, and the okay / cancel buttons do nothing.
 
Last edited:
I have not, but that should be easy to add. I've sent you the updated one if you don't mind testing it a bit.

If you say its working good, I'll release it here. In the meantime, I'll figure out a way to do a progress bar. I know I could do a nice one with supergumps but I'm trying not to make the system dependent on VitaNex.

Code:
var progress = 100.0;
var required = 1000.0;
var width = (int)Math.Ceiling(300 * (progress / required));

AddImageTiled(0, 0, 300, 10, 2624);
AddImageTiled(0, 0, width, 10, 9274);

// Optional label
AddHtml(0, 0, 300, 40, "<basefont color=#FFFFFF><center>" + progress + " / " required + "</center>", false, false);
// >= 40 height prevents scrolling with mouse wheel

Code:
var progress = 100.0;
var required = 1000.0;
var width = (int)Math.Ceiling(300 * (progress / required));

AddHtml(0, 0, 300, 10, "<bodybgcolor=#000000> ", false, false);
AddHtml(0, 0, width, 10, "<bodybgcolor=#00FF00> ", false, false);

// Optional label
AddHtml(0, 0, 300, 40, "<basefont color=#FFFFFF><center>" + progress + " / " required + "</center>", false, false);
// >= 40 height prevents scrolling with mouse wheel
 
I have noted the advice about Persistence and Re-compiling the Server. The recompiling issue has me concerned because I am a newb at that level and not sure if it will cause a problem with a live shard or not.

My eight year old shard is running with RunUO - Version 2.1, Build 4511.11456 Core: Running on .NET Framework Version 4.0.30319

Did anyone get a version of this Invasion running on RunUO 2.1 ?

Thanks
 
I have noted the advice about Persistence and Re-compiling the Server. The recompiling issue has me concerned because I am a newb at that level and not sure if it will cause a problem with a live shard or not.

My eight year old shard is running with RunUO - Version 2.1, Build 4511.11456 Core: Running on .NET Framework Version 4.0.30319

Did anyone get a version of this Invasion running on RunUO 2.1 ?

Thanks

I run it on my server and its RunUO 2.2
 
Thank you for the encouraging information. Can you tell me if you needed to recompile your server.exe or simply reboot the server.

If this is not a simple edit and reboot then I need help. I am unsure how to recompile the server.exe

Sorry folks . . appreciate the help.
 
No, doesnt need to recompile to use the invasion system. I feel like maybe you are missing an assembly reference?

post errors
 
No, doesnt need to recompile to use the invasion system. I feel like maybe you are missing an assembly reference?

post errors

he was refering to the part where RunUO does not have the Persistence.cs file. Yes you'd need to drop it in and recompile the core to use persistence.
 
Than you Greystar . . that is the way I was reading it too.

I have heard bits and pieces about recompiling a Core before but I have no idea what is involved or how to do it. Also not sure if it is a risky thing to do on a live shard.

Sorry . . not intending to hijack this thread but as it is part of what is involved for the release to be used on RunUO . . any advice on this would really help.

*bows*
 
Thank you Aschnyder . . I appreciate that and especially found the batch file interesting.

My shard is highly customized so a lot of the files sent have been heavily edited on my end. Having said that . . . I dropped in your RunUO.exe and your Persistence files. Then with fingers crossed I ran it all and got these errors.

Code:
Errors:
 + Customs/Xml Spawner/XmlSpawner2.cs:
    CS0246: Line 1959: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
 + Regions/Spawning/SpawnDefinition.cs:
    CS0246: Line 18: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 113: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 125: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 177: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 240: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 379: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
 + Regions/Spawning/SpawnEntry.cs:
    CS0246: Line 38: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 53: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 113: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 123: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)

Not sure but . . I suspect I will need to run the server compilation on my own files at my end. Do you think your batch file will do the job on my system or is is something that changes from one computer set up to another?
 
Thank you Aschnyder . . I appreciate that and especially found the batch file interesting.

My shard is highly customized so a lot of the files sent have been heavily edited on my end. Having said that . . . I dropped in your RunUO.exe and your Persistence files. Then with fingers crossed I ran it all and got these errors.

Code:
Errors:
+ Customs/Xml Spawner/XmlSpawner2.cs:
    CS0246: Line 1959: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
+ Regions/Spawning/SpawnDefinition.cs:
    CS0246: Line 18: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 113: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 125: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 177: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 240: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 379: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
+ Regions/Spawning/SpawnEntry.cs:
    CS0246: Line 38: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 53: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 113: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 123: The type or namespace name 'ISpawnable' could not be found (are you missing a using directive or an assembly reference?)

Not sure but . . I suspect I will need to run the server compilation on my own files at my end. Do you think your batch file will do the job on my system or is is something that changes from one computer set up to another?

You should only need to drop in the runuo.exe to your shard. No other files. Make sure to back up your files first. The batch file is a standard compiler batch for runuo. If you have the core files in "server" folder on your system then yes the batch file should work for your files.
 
Thank you friend *bows*

I will try this in the morning and see how it all goes.
[doublepost=1543309130][/doublepost]Well Aschnyder that *with your help* worked. I appreciate it and I know my players will too.

Thanks again

*bows*
 
Sorry I've been away so much. I have the next release being beta tested so hopefully will release soon. It will have a progress gump for players (Thanks @Voxpire ), cleaner spawning mechanism, and an easier way to schedule invasions (set the actual date and time or how many minutes from now).

Next and hopefully final release will have the damageable gates to win the invasion instead of just killing the spawn to win.
 
Those changes sound great. I love the idea of changing the mechanics so the 'Win' can work a bit different from a normal Champ. I look forward to seeing it when it is available. *nice work*

With Aschnyder's help on the server re-compiling I have your original running on a Test Server. I am currently making custom mobs and bosses for it to best fit our shard and to give it all a slightly different feel from normal Champs.

Your efforts on behalf of the community are appreciated by all.

Cheers
 
Oh this is a vast improvement on the original invasion script I found which didn't work for me. This one is almost perfect for a quick invasion. Is there any way to make the mobs spawn more slowly - ie. not all at once ? If they spawned one a second or something instead of BLAM! it would be a lot less dramatic for players who happened to be in town at that time. <grin>
 
@Ravenwolfe @Voxpire
In the version of the Enhanced 3D game there is a problem with the OK / cancel button of the invasion configuration window. The Ok button does not work and the cancel button changes the graphics to OK after clicking and also has no effect. There is no problem in the 2D version.
 
Last edited:
Ravenwolfe . . . "Sorry I've been away so much. I have the next release being beta tested so hopefully will release soon. It will have a progress gump for players (Thanks @Voxpire ), cleaner spawning mechanism, and an easier way to schedule invasions (set the actual date and time or how many minutes from now).

Next and hopefully final release will have the damageable gates to win the invasion instead of just killing the spawn to win. "
_________________________________________________________________________________________________________________________

Does anyone know if this 'next release' was completed and if it is available anywhere.

Thanks
 
Thanks for your work on this RavenWolfe. I have it installed on my shard. Is there any plan to have it run automatically like random one invasion every 24 hours without input from the Admin?
 
Hey Milva!

Yeah, that guy goes MIA for long periods of time.

I think I did some updates that haven’t been posted. I’ve been away from it for a long time. I’ll see if I can track anything down. I’m almost positive I had it auto-scheduling a while back.
 
As far as EC, I’ve never messed with it. I’m sure it’s something with the way EC handles gumps. I definitely don’t have time to look into that. Sorry.
 
Hey Milva!

Yeah, that guy goes MIA for long periods of time.

I think I did some updates that haven’t been posted. I’ve been away from it for a long time. I’ll see if I can track anything down. I’m almost positive I had it auto-scheduling a while back.
Nice to see you!! :)
 
@Ravenwolfe
We've detected a very serious bug in City Invasions. Factions bring back the city guards - even during the invasion. As soon as the battle for altars was over, the guards returned even though they were still fighting the invasion
 
Testing on ServUO publish 57+, an error appears since the faction-feature is removed from ServUO.

Invasion Syetem Error.PNG
Post automatically merged:

Testing on ServUO publish 57+, an error appears since the faction-feature is removed from ServUO.

Invasion Syetem Error.PNG

After invalidating the 4th line in Invasion System.CS, every thing is fine by now.

Invasion Syetem Error2.PNG
 
Last edited:
@Ravenwolfe

With the new server build engine mechanism (compilator), we encountered numerous problems with custom files - which had not occurred before. I mean the current state # 4835 - compared to the version before the compiler mechanics changes.
Warning are reported in the area of Your Invasion system. I am attaching the full log from the compilation attempt (with part of Your system log).

Compile ServUO for Windows

Press any key to continue . . .

C:\ServerUO\UOMGGameTEST>dotnet build -c Release
Microsoft (R) Build Engine version 16.7.0-preview-20360-03+188921e2f for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
Restored C:\ServerUO\UOMGGameTEST\Ultima\Ultima.csproj (in 167 ms).
Restored C:\ServerUO\UOMGGameTEST\Server\Server.csproj (in 167 ms).
Restored C:\ServerUO\UOMGGameTEST\Scripts\Scripts.csproj (in 167 ms).
Ultima -> C:\ServerUO\UOMGGameTEST\Ultima\bin\Release\Ultima.dll
Server ->

Custom\Invasion System\InvasionMainGump.cs(16,23): warning CS0169: The field 'InvasionMainGump._mStartTimer' is never used [C:\ServerUO\UOMGGameTEST\Scripts\Scripts.csproj]

Custom\Invasion System\Invasion System.cs(37,22): warning CS0414: The field 'TownInvasion._AlwaysMurderer' is assigned but its value is never used [C:\ServerUO\UOMGGameTEST\Scripts\Scripts.csproj]

Time Elapsed 00:00:10.10

Press any key to continue . . .
 
@Ravenwolfe

With the new server build engine mechanism (compilator), we encountered numerous problems with custom files - which had not occurred before. I mean the current state # 4835 - compared to the version before the compiler mechanics changes.
Warning are reported in the area of Your Invasion system. I am attaching the full log from the compilation attempt (with part of Your system log).

Where do you get the #4835?The latest fix is #4834

4834.PNG
 
Back