Resource icon

Invasion System 1.0

No permission to download

oldman80

Citizen
Oct 4, 2018
6
1
3
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.
 

zerodowned

Moderator
ServUO Developer
Jun 28, 2014
1,825
248
63
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
 

oldman80

Citizen
Oct 4, 2018
6
1
3
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:

Vorspire

Vita-Nex: Core
Admin
ServUO Developer
Jul 29, 2013
1,164
269
83
33
United Kingdom
core.vita-nex.com
Shard Name
Ultima Shards: Multiverse
Donate
Donate money to this user
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
 
  • Like
Reactions: DPSGnome

PigPen

Citizen
Jan 19, 2017
45
5
8
70
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
 

Aschnyder26

Squire
Jul 6, 2016
257
25
28
Atlanta, GA
www.kalvasflam.org
Shard Name
Kal Vas Flam
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
 
  • Like
Reactions: PigPen

PigPen

Citizen
Jan 19, 2017
45
5
8
70
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.
 

sahisahi

Knight
Jan 13, 2016
832
79
28
No, doesnt need to recompile to use the invasion system. I feel like maybe you are missing an assembly reference?

post errors
 

Greystar

Rookie
Feb 20, 2014
68
3
8
46
IL, US
Shard Name
Shadow Realm
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.
 
  • Like
Reactions: PigPen

PigPen

Citizen
Jan 19, 2017
45
5
8
70
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*
 

PigPen

Citizen
Jan 19, 2017
45
5
8
70
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?
 

Aschnyder26

Squire
Jul 6, 2016
257
25
28
Atlanta, GA
www.kalvasflam.org
Shard Name
Kal Vas Flam
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.
 
  • Like
Reactions: PigPen

PigPen

Citizen
Jan 19, 2017
45
5
8
70
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*
 

Ravenwolfe

Moderator
ServUO Developer
Sep 7, 2013
1,165
147
63
Texas
www.ultimaonlinephoenix.com
Shard Name
UO Phoenix
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 @Vorspire ), 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.
 

PigPen

Citizen
Jan 19, 2017
45
5
8
70
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