Zarcoos

Initiate
Hello everyone! I tried looking in the Downloads section but I didn't find anything that satisfies me.
I need a moongate for each faction that can only be crossed by the chosen faction (minax, etc etc)
can you help me in any way?
 
This script is truly formidable for character creation, you can set skills, stats, give items, titles and many manageable options directly in the game just click on it. ask if someone would be able to add one option to the many they already have:
I would like to add that only the selected faction can pass through the portal. (for example if you have set minax in the portal, only players belonging to minax will be able to pass through it) I am sure that this resource will be very useful to many players.
 

Attachments

  • Advp.cs
    54.7 KB · Views: 7
You can set difinition for your moongates. For example:

C#:
[CommandProperty(AccessLevel.GameMaster)]
public string FactionDef { get { return "Minax"; } } // don't forget add this value to serialize/deserialize methods if will need add "set" value too.

and now you can compare this value with players factions in UseGate( Mobile m ) method.
C#:
Faction faction = Faction.Find(m);

if (faction == null || (faction != null && !faction.Definition.FriendlyName.Equals(FactionDef) )
    m.SendMessage($"You should be in {FactionDef} faction to use this moongate");
else if ( m.Kills >= 5 )
{
    m.SendLocalizedMessage( 1019004 );
}
.... etc
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back