Playing around on v3.7 I used my Animal Lore skill on my pet and brought up a very impressive gump that showed, Str, Dex, Hit points, and some skills of my pet.
I thought this was a neat GUMP, and modified it to work with the Anatomy skill. Instead of saying, "He looks like the strongest man you have ever seen! (which is like everyone in UO), and Quick as LIghtning)"
It will now show a Gump that includes: Health, Str, Dex, Int, Swordsmanship, Tactics, Macefighting, Fencing, Archery, Parrying. I left off "Magery" since I figured Anatomy worked more with what a skilled warrior can figure out by sizing up an apponent.
NOTE TO UOX3 CODERS: This is a rough conversion since I am still not totally familiar with how skill scripts work within UOx3 hard-coded elements. While This script uses the proper anatomy skill, I am not sure how high you need to get it to work (it fails miserably unless you are above 50 or 70 skill, it can work, just really hard) And I have been unable to verify that you actually "gain" skill by praciticing this.
If you wish to edit/upgrade my script feel free to do so and post your contribution, I would like a better version myself.
Custom Anatomy Skill/Gump
Replace this script with Anatomy.js in the scripts/skills directory to get the new GUMP. Verify it works with a GM character. (GMs succeed 100%, whereas PCs have a tough time if the skill is low)
function SkillRegistration()
{
RegisterSkill( 1, true ); // Animal Lore
}
function onSkill( pUser, objType, skillUsed )
{
var pSock = pUser.socket;
if( pSock )
pSock.CustomTarget( 0, GetDictionaryEntry( 867, pSock.Language ) );
return true;
}
function onCallback0( pSock, ourObj )
{
var pUser = pSock.currentChar;
if( ourObj && ourObj.isChar && pUser )
{
if( !ourObj.InRange( pUser, 3 ) )
pSock.SysMessage( "That is too far away." )
else if( pUser.skills.anatomy >= 5 )
{
if( !pUser.CheckSkill( 2, 0, 1000 ) )
pSock.SysMessage( GetDictionaryEntry( 908, pSock.Language ) );
else
{
position = 20;
var myGump = new Gump;
myGump.AddBackground( 0, 0, 300, 300, 2600 );
myGump.AddButton( 260, 15, 4017, 1, 0, 1 );
myGump.AddText( 120, 15, 0, ourObj.name );
myGump.AddPage( 1 );
addStringEntry( myGump, "Attributes" );
addDualEntry( myGump, "Hits:", ourObj.health, ourObj.maxhp );
addDualEntry( myGump, "Stamina:", ourObj.stamina, ourObj.maxstamina );
addDualEntry( myGump, "Mana:", ourObj.mana, ourObj.maxmana );
addEntry( myGump, "Strength:", ourObj.strength );
addEntry( myGump, "Dexterity:", ourObj.dexterity );
addEntry( myGump, "Intelligence:", ourObj.intelligence );
addStringEntry( myGump, "Miscellaneous" );
addEntry( myGump, "Armor Rating:", ourObj.Resist( 1 ) );
myGump.AddPageButton( 260, 260, 4005, 2 );
myGump.AddPage( 2 );
position = 20;
addStringEntry( myGump, "Combat Ratings" );
addEntry( myGump, "Tactics:", parseInt(ourObj.skills.tactics/10) );
addEntry( myGump, "Wrestling:", parseInt(ourObj.skills.wrestling/10) );
addEntry( myGump, "Swordsmanship:", parseInt(ourObj.skills.swordsmanship/10) );
addEntry( myGump, "Mace Fighting:", parseInt(ourObj.skills.macefighting/10) );
addEntry( myGump, "Fencing:", parseInt(ourObj.skills.fencing/10) );
addEntry( myGump, "Archery:", parseInt(ourObj.skills.archery/10) );
addEntry( myGump, "Parrying:", parseInt(ourObj.skills.parrying/10) );
myGump.AddPageButton( 10, 260, 4014, 1 );
myGump.Send( pSock );
myGump.Free;
}
}
else
pSock.SysMessage( "You are not skilled enough to understand that creature" );
}
else
pSock.SysMessage( "That doesn't look much like an animal." );
}
function onGumpPress( socket, button, myGump )
{
switch( button )
{
case 1: break;
default: break;
}
}
function addEntry( myGump, stringToAdd, dataToAdd )
{
myGump.AddText( 50, position, 0, stringToAdd );
myGump.AddText( 225, position, 0, dataToAdd.toString() );
position += 20;
}
function addDualEntry( myGump, stringToAdd, dataToAdd, moreDataToAdd )
{
myGump.AddText( 50, position, 0, stringToAdd );
myGump.AddText( 225, position, 0, dataToAdd.toString() + "/" + moreDataToAdd.toString() );
position += 20;
}
function addStringEntry( myGump, stringToAdd )
{
position += 20;
myGump.AddText( 40, position, 0, stringToAdd );
position += 20;
}
{
RegisterSkill( 1, true ); // Animal Lore
}
function onSkill( pUser, objType, skillUsed )
{
var pSock = pUser.socket;
if( pSock )
pSock.CustomTarget( 0, GetDictionaryEntry( 867, pSock.Language ) );
return true;
}
function onCallback0( pSock, ourObj )
{
var pUser = pSock.currentChar;
if( ourObj && ourObj.isChar && pUser )
{
if( !ourObj.InRange( pUser, 3 ) )
pSock.SysMessage( "That is too far away." )
else if( pUser.skills.anatomy >= 5 )
{
if( !pUser.CheckSkill( 2, 0, 1000 ) )
pSock.SysMessage( GetDictionaryEntry( 908, pSock.Language ) );
else
{
position = 20;
var myGump = new Gump;
myGump.AddBackground( 0, 0, 300, 300, 2600 );
myGump.AddButton( 260, 15, 4017, 1, 0, 1 );
myGump.AddText( 120, 15, 0, ourObj.name );
myGump.AddPage( 1 );
addStringEntry( myGump, "Attributes" );
addDualEntry( myGump, "Hits:", ourObj.health, ourObj.maxhp );
addDualEntry( myGump, "Stamina:", ourObj.stamina, ourObj.maxstamina );
addDualEntry( myGump, "Mana:", ourObj.mana, ourObj.maxmana );
addEntry( myGump, "Strength:", ourObj.strength );
addEntry( myGump, "Dexterity:", ourObj.dexterity );
addEntry( myGump, "Intelligence:", ourObj.intelligence );
addStringEntry( myGump, "Miscellaneous" );
addEntry( myGump, "Armor Rating:", ourObj.Resist( 1 ) );
myGump.AddPageButton( 260, 260, 4005, 2 );
myGump.AddPage( 2 );
position = 20;
addStringEntry( myGump, "Combat Ratings" );
addEntry( myGump, "Tactics:", parseInt(ourObj.skills.tactics/10) );
addEntry( myGump, "Wrestling:", parseInt(ourObj.skills.wrestling/10) );
addEntry( myGump, "Swordsmanship:", parseInt(ourObj.skills.swordsmanship/10) );
addEntry( myGump, "Mace Fighting:", parseInt(ourObj.skills.macefighting/10) );
addEntry( myGump, "Fencing:", parseInt(ourObj.skills.fencing/10) );
addEntry( myGump, "Archery:", parseInt(ourObj.skills.archery/10) );
addEntry( myGump, "Parrying:", parseInt(ourObj.skills.parrying/10) );
myGump.AddPageButton( 10, 260, 4014, 1 );
myGump.Send( pSock );
myGump.Free;
}
}
else
pSock.SysMessage( "You are not skilled enough to understand that creature" );
}
else
pSock.SysMessage( "That doesn't look much like an animal." );
}
function onGumpPress( socket, button, myGump )
{
switch( button )
{
case 1: break;
default: break;
}
}
function addEntry( myGump, stringToAdd, dataToAdd )
{
myGump.AddText( 50, position, 0, stringToAdd );
myGump.AddText( 225, position, 0, dataToAdd.toString() );
position += 20;
}
function addDualEntry( myGump, stringToAdd, dataToAdd, moreDataToAdd )
{
myGump.AddText( 50, position, 0, stringToAdd );
myGump.AddText( 225, position, 0, dataToAdd.toString() + "/" + moreDataToAdd.toString() );
position += 20;
}
function addStringEntry( myGump, stringToAdd )
{
position += 20;
myGump.AddText( 40, position, 0, stringToAdd );
position += 20;
}