#W# More spawner work. Added 'MyLevel' to basecreature and GetLevel Command.

This commit is contained in:
WarrentyExpired 2026-08-18 16:20:12 -04:00
parent 5df9b41822
commit dae9b56279
7 changed files with 144 additions and 3 deletions

View file

@ -159,6 +159,9 @@
<region type="DungeonRegion" priority="50" name="the Dungeon Ashen Maw">
<rect x="2969" y="52" width="247" height="476" />
</region>
<region type="DungeonRegion" priority="50" name="the Hallow Keep">
<rect x="883" y="101" width="38" height="34" />
</region>
<region type="DungeonRegion" priority="50" name="the Dungeon Hallow Keep">
<rect x="2363" y="52" width="233" height="328" />
</region>

View file

@ -1,2 +0,0 @@
*|brigandcamp||||||821|225|10|1|5|10|-1|4|1|1|0|0|0|0|0
*|orccamp||||||821|360|3|1|5|10|-1|4|1|1|0|0|0|0|0

View file

@ -1,3 +1,10 @@
## Overworld
# Hallow Keep
*|treasurechestlevel1||||||903|112|34|1|5|10|-1|0|1|1|0|0|0|0|0
*|treasurechestlevel1||||||899|112|34|1|5|10|-1|0|1|1|0|0|0|0|0
*|treasurechestlevel1||||||909|119|14|1|5|10|-1|0|1|1|0|0|0|0|0
*|treasurechestlevel1||||||891|116|14|1|5|10|-1|0|1|1|0|0|0|0|0
##
## Whispering Depths
# Level 1
*|treasurechestlevel1||||||2812|85|0|1|1|1|-1|1|1|1|0|0|0|0|0
@ -135,3 +142,4 @@
*|treasurechestlevel3:treasurechestlevel4||||||3077|436|0|1|1|1|-1|0|1|1|0|0|0|0|0
*|treasurechestlevel2:treasurechestlevel3||||||3097|414|0|1|1|1|-1|0|1|1|0|0|0|0|0
*|treasurechestlevel2:treasurechestlevel3||||||3085|376|0|1|1|1|-1|0|1|1|0|0|0|0|0
#Next Dungeon

19
Data/Spawns/danger.map Normal file
View file

@ -0,0 +1,19 @@
## Camps
*|brigandcamp||||||821|225|10|1|5|10|-1|0|1|1|0|0|0|0|0
*|orccamp||||||821|360|3|1|5|10|-1|0|1|1|0|0|0|0|0
## Hallow Keep
*|zombie:skeleton||||||898|115|34|1|5|10|-1|0|1|2|0|0|0|0|0
*|evilmage||||||892|119|34|1|5|10|-1|0|1|1|0|0|0|0|0
*|spectre:wraith:zombie:skeleton:ghoul||||||901|115|15|1|5|10|-1|0|1|3|0|0|0|0|0
*|spectre:wraith:zombie:skeleton||||||912|126|9|1|5|10|-1|0|1|3|0|0|0|0|0
*|spectre:wraith:zombie:skeleton||||||902|127|9|1|5|10|-1|0|1|3|0|0|0|0|0
*|lich:evilmage||||||901|115|34|1|5|10|-1|0|1|1|0|0|0|0|0
*|evilmage||||||910|118|14|1|5|10|-1|0|1|1|0|0|0|0|0
*|spectre:wraith:zombie:skeleton:ghoul||||||910|115|14|1|0|10|-1|5|1|3|0|0|0|0|0
*|spectre:wraith:zombie:skeleton:ghoul||||||892|113|14|1|0|10|-1|5|1|3|0|0|0|0|0
*|evilmage||||||901|114|14|1|5|10|-1|0|1|1|0|0|0|0|0
*|evilmage||||||911|119|34|1|5|10|-1|0|1|1|0|0|0|0|0
*|evilmage||||||892|118|14|1|5|10|-1|0|1|1|0|0|0|0|0
*|zombie:skeleton||||||904|115|34|1|0|10|-1|5|1|2|0|0|0|0|0
*|spectre:wraith:zombie:skeleton||||||891|125|9|1|5|10|-1|0|1|3|0|0|0|0|0
##

View file

@ -100,7 +100,7 @@ namespace Server.Scripts.Commands
Server.SpawnGenerator.Parse( m, "townanimals.map" );
Console.WriteLine( "Spawning Camps..." );
Server.SpawnGenerator.Parse( m, "camps.map" );
Server.SpawnGenerator.Parse( m, "danger.map" );
Console.WriteLine( "Spawning NPC's..." );
Server.SpawnGenerator.Parse( m, "npcs.map" );

View file

@ -0,0 +1,54 @@
using System;
using Server;
using System.Collections;
using System.Collections.Generic;
using Server.Misc;
using Server.Items;
using Server.Network;
using Server.Commands;
using Server.Commands.Generic;
using Server.Mobiles;
using Server.Accounting;
using Server.Regions;
using System.IO;
using Server.Targeting;
namespace Server.Scripts.Commands
{
public class GetLevel
{
public static void Initialize()
{
CommandSystem.Register("GetLevel", AccessLevel.Counselor, new CommandEventHandler( GetLevels ));
}
[Usage("GetLevel")]
[Description("Gets the level of the creature.")]
public static void GetLevels( CommandEventArgs e )
{
e.Mobile.SendMessage( "What target do you want to inspect?" );
e.Mobile.Target = new InternalTarget();
}
private class InternalTarget : Target
{
public InternalTarget() : base ( 8, false, TargetFlags.None )
{
}
protected override void OnTarget( Mobile from, object targeted )
{
if ( targeted is Mobile )
{
Mobile m = (Mobile)targeted;
from.SendMessage( "" + BaseCreature.MyLevel( m ) + "" );
}
else
{
from.SendMessage( "Not a valid creature!" );
}
}
}
}
}

View file

@ -3424,6 +3424,65 @@ namespace Server.Mobiles
m_AI.OnSpeech( e );
}
public static int MyLevel( Mobile m )
{
int level = 0;
if ( m is BaseCreature )
{
BaseCreature bc = (BaseCreature)m;
int psn = 0;
if ( bc.HitPoison == Poison.Lesser )
psn = 5;
else if ( bc.HitPoison == Poison.Regular )
psn = 10;
else if ( bc.HitPoison == Poison.Greater )
psn = 15;
else if ( bc.HitPoison == Poison.Deadly )
psn = 20;
else if ( bc.HitPoison == Poison.Lethal )
psn = 25;
if ( bc.PoisonImmune == Poison.Lesser )
psn = psn + 5;
else if ( bc.PoisonImmune == Poison.Regular )
psn = psn + 10;
else if ( bc.PoisonImmune == Poison.Greater )
psn = psn + 15;
else if ( bc.PoisonImmune == Poison.Deadly )
psn = psn + 20;
else if ( bc.PoisonImmune == Poison.Lethal )
psn = psn + 25;
int bard = 0;
if ( bc.BardImmune )
bard = 50;
else
{
if ( bc.Unprovokable )
bard = bard + 25;
if ( bc.Uncalmable )
bard = bard + 25;
}
int dmg = (int)( bc.DamageMax * 8 );
int sts = (int)( m.RawStatTotal / 6 );
int fam = (int)( m.Fame / 120 );
int arm = (int)( m.VirtualArmor * 2.5 );
level = psn + dmg + sts + fam + arm + bard;
if ( level > 1000 ){ level = 1000; }
else if ( level < 1 ){ level = 1; }
}
return level;
}
public override bool IsHarmfulCriminal( Mobile target )
{
if ( (Controlled && target == m_ControlMaster) || (Summoned && target == m_SummonMaster) )