if ( page < 0 || page > 12 ) // If you add a page, you need to raise the last number here....
//Change the below line every time you add a page....
for ( int x=0; x<=13; x++ )
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)
They recently removed onsingleclick from servuo so you should just need to comment out or delete that section.
Yeah pretty much anything I enjoyed about it was removed lol... xmlspawner was gutted as well.
Something like:How difficult would it be to restrict travel if carrying a town sigil? I tried looking at the publicmoongate.cs but I can't seem to wrap my head around how to copy those restrictions and apply to worldomniporter.cs
if (Factions.Sigil.ExistsOn(m))
{
m.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
}
Hey Lokai, I have been toying around with this and sadly the only thing I've been able to do is crash the server, and make the system say "You can't do that while carrying the sigil" when you open the gump and have a sigil on you. I've tried working in the factions.sigil.existson piece but I can't get it to jive. I then had the idea to add it as an "OptFlag" so I could just add it as an argument, but I don't understand where these numbers are coming from:Something like:
Code:if (Factions.Sigil.ExistsOn(m)) { m.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. }
Basically, just adding another if clause. This code was taken from Moongate.cs, so it won't just plug and play directly into the Omniporter. The variable 'm' might need to be changed to something else. You might need to insert this into the section where other "if" or "else if" conditions are being checked.
What is the error? Might just be a missing null check?
I don't use WorldOmniPorter so I don't know how it works, but I would put a new flag in there under AllowRed called AllowSigil for which the value would be 0x09000400 to allow Sigil carriers and 0x00000000 to not allow Sigil carriers. Then find the section where AllowReds is tested and add in there a section with the "ExistsOn" test from Moongates.cs which Lokai provided.
Here you are, I have done it but this is untested
Add this line under "AllowReds" in the OptFlags section
AllowSigil = 0x09000400, ///-- When 'true' transport is allowed while carrying a faction sigil
and then find the CanUse method and underneath the AllowReds line add
if ( !AllowSigil && Factions.Sigil.ExistsOn(m))
{
m.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
return false;
}
Let us know if that works.
To be honest I have no idea what they did to my flags. The flags operate on a bitwise check, so there should be a unique placeholder for each flag, and the numbers they have there with all the ones starting with 0x09.... just don't make any sense to me. Each flag should be Double the one below it. So the progression would be 1, 2, 4, 8 for each digit. In Hexadecimal, there are 16 digits, so the last one "16" is actually the 1's place of the next position to the left. This gives us 4 possible "flags" for each place value in the number, and there are 8 place values in the number, giving us 32 possible flags that can be generated. Since there are 26 flags here, they could have continued the correct sequence, but for some reason decided to break it. I have no idea why.Hey Lokai, I have been toying around with this and sadly the only thing I've been able to do is crash the server, and make the system say "You can't do that while carrying the sigil" when you open the gump and have a sigil on you. I've tried working in the factions.sigil.existson piece but I can't get it to jive. I then had the idea to add it as an "OptFlag" so I could just add it as an argument, but I don't understand where these numbers are coming from:
View attachment 16958
I didn't realise you wrote that originally. I just assumed the author left gaps for future expansion. I looked at it years ago when I changed my moongates from the era-accurate random destination, to the menu system. It was too complex for me to get my head around at that time though! More recently I put in the stargate system which I like, but I wanted to change the numbers system that it uses. But then my shard went dead and there seemed little point in spending time developing it further.To be honest I have no idea what they did to my flags. The flags operate on a bitwise check, so there should be a unique placeholder for each flag, and the numbers they have there with all the ones starting with 0x09.... just don't make any sense to me. Each flag should be Double the one below it. So the progression would be 1, 2, 4, 8 for each digit. In Hexadecimal, there are 16 digits, so the last one "16" is actually the 1's place of the next position to the left. This gives us 4 possible "flags" for each place value in the number, and there are 8 place values in the number, giving us 32 possible flags that can be generated. Since there are 26 flags here, they could have continued the correct sequence, but for some reason decided to break it. I have no idea why.
That is correct sirSo you want to block Sigil holders from going to anywhere but Fel ?
from.SendLocalizedMessage( 1019002 ); // You are too far away to use the gate.
else if ( from.Criminal )
from.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
else if ( Server.Spells.SpellHelper.CheckCombat( from ) )
from.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
else if ( from.Spell != null )
from.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
else if (Factions.Sigil.ExistsOn(from) && m_Entry.Map != Map.Felucca)
from.SendMessage("You can only travel to Felucca while carrying the Sigil."); // <<<<< THIS WAS CHANGED. <<<<<
else if ( from.Map == m_Entry.Map && from.InRange( m_Entry.Destination, 1 ) )
from.SendLocalizedMessage( 1019003 ); // You are already there.
else if ( message == msg )
DoTravel( from ); // --- Travel ---
We use essential cookies to make this site work, and optional cookies to enhance your experience.