Resource icon

Daat99's World Omniporter For ServUO 2.5

No permission to download

Arcadius

Gold Supporter
How do you add custom locations to the omniporter? Not add to custom locations, but add to the top level like where Malas, Trammel, and the other facets are?
 

Lokai

Moderator
That would be difficult and require a complete rewrite. Alternatively, you could rename one of the core facets, keeping the same number of them intact, and it would be considerably easier. To do that, you would need to rename it both in the declaration part starting around line 508, and also in the m_Entries array, and in the gump pages.
 

Arcadius

Gold Supporter
Umm....why would it take a complete rewrite? I'd like to see what parts of it need to be rewritten and if it can be done i'm willing to do it.
 

Visam

Rookie
If you look through WorldOmniporter.cs it has Thanimur and Sosaria setup in it already but commented out. You should be able to edit those to be able to do what your wanting to do.
 

Arcadius

Gold Supporter
This piece of code throws an error if added on to.

Code:
private static string[] m_Entries = new string[]
        {
            "Trammel", "Trammel Dungeons", "Felucca", "Felucca Dungeons",
            "Public Moongates", "Ilshenar", "Ilshenar Shrines", "Malas",
            "Tokuno", "TerMur", "Custom"
        };

Any idea why?
 

Visam

Rookie
to add more pages you also have to increase the 12 and the 13 in the following sections:
Code:
if ( page < 0 || page > 12 ) // If you add a page, you need to raise the last number here....

and:
Code:
//Change the below line every time you add a page....
            for ( int x=0; x<=13; x++ )

I'd need to see what you have in the script to be able to assist further if it still isn't working.
 

Arcadius

Gold Supporter
Its still crashing. Majorly. I attached my copy of the omniporter.
 

Attachments

  • WorldOmniporter.cs
    69.4 KB · Views: 4

Visam

Rookie
Give this a try. I ended up moving the 3 sections you wanted added over to a new file to get it to work. I'm not sure really what was wrong with the one you uploaded. I tested it out and it loads up and I can port around just fine so I think you should be good to go.

It now has "Guardia Towns" "Guardia Sites" and "Guardia Dungeons" all pointing to the "Luna Hub" that you had setup. You will need to add in the locations you want to be able to gate to (starting at line 760).
 

Attachments

  • WorldOmniporter.cs
    69.2 KB · Views: 4

Arcadius

Gold Supporter
I tried to add another facet, "Guardia Shrines" and it crashed again.
 

Attachments

  • [ServUO.com]-WorldOmniporter.cs
    73.5 KB · Views: 2

Visam

Rookie
The main thing you missed was increasing the numbers in 3 spots for the extra section. If you happen to add another one search for:
//Change the below line every time you add a page....
and you should find them just increase the larger number on the line below it and it'll add room for the new spot.

The other thing was adding in the GlobalEntries section.

I increased the numbers and added the GlobalEntries section you'll still need to add the locations you want it to go to however. (line 834)
 

Attachments

  • WorldOmniporter.cs
    73.7 KB · Views: 4

Arcadius

Gold Supporter
The main thing you missed was increasing the numbers in 3 spots for the extra section. If you happen to add another one search for:
//Change the below line every time you add a page....
and you should find them just increase the larger number on the line below it and it'll add room for the new spot.

The other thing was adding in the GlobalEntries section.

I increased the numbers and added the GlobalEntries section you'll still need to add the locations you want it to go to however. (line 834)

Change the below everytime I add a page? What am I to change it to?
I tried the fixed script and Guardia Shrines doesn't show up.
 

Lokai

Moderator
Your main problem was in the construction of your Option Flags. They operate on Bitwise values, so each position must be unique. When you use values like 401, 402, 403, what you are actually saying is 400 and 001, 400 and 002, or 400 and 003 (which is 001 and 002.) So, GuardiaSites - option 402, would be the same as Custom (400) and Trammel (002) both being True. Give me a few minutes and I will pull your custom entries together in a working script.
 

Lokai

Moderator
OK. This one works. I have included comments for readability. I used the Sosaria and Thanimur locations as examples of how to add additional locations. Everywhere something needs to be changed, I have it marked with "/// -- LOKAI CUSTOM CHANGE"
 

Attachments

  • WorldOmniporter.cs
    76 KB · Views: 20

Ishya

Citizen
When I use the custom one you made it fatally crashes my shard because I am guessing I do not have the regions you added or maybe I was just deleting to quickly and need to slow down and go over it with a comb. I will check it out and work more with it later when I understand it better, for now, I am just going to be using the simple one
 

iStealth

Citizen
Curiously i havent been able to check this out because i keep getting this error when trying to compile


+ Custom/Systems/World Omniporter v2.5/WorldOmniporter.cs:
CS0115: Line 393: 'WorldOmniporter.OnSingleClick(Mobile)': no suitable method found to override

Any ideas or helpful pushes in the right direction would be amazing. <3
 

Visam

Rookie
They recently removed onsingleclick from servuo so you should just need to comment out or delete that section.