bala1412

Member
ServUO Version
Publish 57
Ultima Expansion
Endless Journey
When the player demonstrates magic, they shout the magic spell. I was wondering if there's a way to get npc or monsters to shout spells when they do the same magic.
 
When the player demonstrates magic, they shout the magic spell. I was wondering if there's a way to get npc or monsters to shout spells when they do the same magic.
what you mean by 'like a player" You intend the same spells? whatever there is a lot mobs like Skeleton mage, Lich, wraith that cast spells. maybe some code will direct you
 
what you mean by 'like a player" You intend the same spells? whatever there is a lot mobs like Skeleton mage, Lich, wraith that cast spells. maybe some code will direct you
12312312.jpg
When the player demonstrates magic, as shown in the picture, the player shouts the spell "In Flam Grab". Can I get monsters or NPCs to shout spells like "In Flam Grav" the same when they try out spells?
 
View attachment 22077
When the player demonstrates magic, as shown in the picture, the player shouts the spell "In Flam Grab". Can I get monsters or NPCs to shout spells like "In Flam Grav" the same when they try out spells?
ok i think there is a method. NPCs can "talk". Do not rember a text that apeares above a monster head. Usually text appears above a quest NPC.
 
You can override ShowSpellMantra in individual creature scripts, or you can set the default return value in BaseCreature itself to 'true' to enable it for all mobs... but I recommend only doing it for humanoids.

Enable mantra or all creatures (BaseCreature edit):
C#:
public virtual bool ShowSpellMantra => true;

Enable mantra or all humanoid creatures (BaseCreature edit):
C#:
public virtual bool ShowSpellMantra => this.Body.IsHuman;

Individual creatures' script:
C#:
public override bool ShowSpellMantra => true;
 
You can override ShowSpellMantra in individual creature scripts, or you can set the default return value in BaseCreature itself to 'true' to enable it for all mobs... but I recommend only doing it for humanoids.

Enable mantra or all creatures (BaseCreature edit):
C#:
public virtual bool ShowSpellMantra => true;

Enable mantra or all humanoid creatures (BaseCreature edit):
C#:
public virtual bool ShowSpellMantra => this.Body.IsHuman;

Individual creatures' script:
C#:
public override bool ShowSpellMantra => true;
Thank you very much for the detailed explanation. That's what I wanted. It works perfectly well. Once again, thank you from the bottom of my heart.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back