Loremaster and Wandering Bard v.1

Got any custom JavaScript additions/tweaks you think other people would like to see? Post 'em here!
Post Reply
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Loremaster and Wandering Bard v.1

Post by stranf »

Ok...because of a small bug in error and the difficulty in gaining any skill in item identification, I decided to bypass this bug by created an NPC who will identify items for you on your journey. If you can't squash bugs, roleplay around them!

I'll post the script as well as the .dfn file, and some general instructions to Uox3 newbies on how to get it running.


STEP 1:
copy this code into a file and name it what you want. I used my intials and called it tbs_loremaster. (tip: prefix your scripts and .dfns with a common name (such as my "tbs"), that way you can sort and spot quickly to take them out and/or add them when a new uox3 update is released)

[m_loremaster]
{
NAMELIST=1
TITLE=the loremaster
ID=0x0190
PRIV1=4
fame = 1500
EQUIPITEM=listobject13
HAIRCOLOR=15
EQUIPITEM=listobject14
COLORMATCHHAIR
SKINLIST=16
DIRECTION=N
BACKPACK
NPCWANDER=3
FX1=-1
FY1=-1
FZ1=-1
FX2=5
EQUIPITEM=0x0df0
EQUIPITEM=0x1718
COLORLIST=2
EQUIPITEM=listobject31
COLORLIST=2
EQUIPITEM=listobject32
COLORLIST=2
EQUIPITEM=listobject33
EQUIPITEM=listobject35
COLORLIST=2
EQUIPITEM=listobject36
COLORLIST=2
STR=50 75
DEX=65 70
INT=75 100
TOTAME=1100
MAGERY=700 800
ITEMID=900 1000
INSCRIPTION=600 800
TACTICS=400 600
PARRYING=400 600
WRESTLING=400 600
MACEFIGHTING=400 600
MAGICRESISTANCE=400 600
DAMAGE=3 15
DEF=5
SPATTACK=8191
SPADELAY=10
MAGERY=400 500
SHOPKEEPER
SHOPLIST=MageShopping
SCRIPT = 3002
}

[f_loremaster]
{
NAMELIST=2
TITLE=the loremaster
ID=0x0191
PRIV1=4
fame = 1500
EQUIPITEM=listobject15
HAIRCOLOR=15
SKINLIST=16
DIRECTION=N
BACKPACK
NPCWANDER=3
FX1=-1
FY1=-1
FZ1=-1
FX2=5
EQUIPITEM=0x0df0
EQUIPITEM=0x1718
COLORLIST=2
EQUIPITEM=listobject51
COLORLIST=2
EQUIPITEM=listobject52
COLORLIST=2
EQUIPITEM=listobject53
EQUIPITEM=listobject54
COLORLIST=2
EQUIPITEM=listobject56
COLORLIST=2
STR=50 75
DEX=65 70
INT=75 100
TOTAME=1100
MAGERY=700 800
ITEMID=900 1000
INSCRIPTION=600 800
TACTICS=400 600
PARRYING=400 600
WRESTLING=400 600
MACEFIGHTING=400 600
MAGICRESISTANCE=400 600
DAMAGE=3 15
DEF=5
SPATTACK=8191
SPADELAY=10
MAGERY=400 500
SHOPKEEPER
SHOPLIST=MageShopping
SCRIPT = 3002
}



[m_wbard]
{
NAMELIST=1
TITLE=the wandering bard
fame =500
karma = 9000
ID=0x0190
PRIV1=4
EQUIPITEM=listobject13
HAIRCOLOR=15
EQUIPITEM=listobject14
COLORMATCHHAIR
SKINLIST=16
DIRECTION=N
BACKPACK
EQUIPITEM=listobject30
COLORLIST=11
EQUIPITEM=listobject31
COLORLIST=11
EQUIPITEM=listobject32
COLORLIST=11
EQUIPITEM=listobject33
EQUIPITEM=listobject34
COLORLIST=11
EQUIPITEM=listobject36
COLORLIST=11
FX1=-1
FY1=-1
FZ1=-1
FX2=10
STR=50 75
DEX=65 70
INT=50 75
MUSICIANSHIP=700 1000
TACTICS= 650 950
ARCHERY= 650 950
FENCING= 650 950
ENTICEMENT=400 600
PROVOCATION=400 600
PEACEMAKING=400 600
DAMAGE=3 15
DEF=5
SHOPKEEPER
SHOPLIST=BardShopping
NPCWANDER=3
TOTAME=1100
script = 3002
}

[f_wbard]
{
fame = 500
karma = 9000
NAMELIST=2
TITLE=the wandering bard
ID=0x0191
PRIV1=4
EQUIPITEM=listobject15
HAIRCOLOR=15
SKINLIST=16
STR=75
DEX=75
INT=75
MUSICIANSHIP=700 1000
TACTICS= 650 950
ARCHERY= 650 950
FENCING= 650 950
ENTICEMENT=400 600
PROVOCATION=400 600
PEACEMAKING=400 600
DAMAGE=3 15
DEF=5
DIRECTION=N
BACKPACK
EQUIPITEM=listobject50
COLORLIST=11
EQUIPITEM=listobject51
COLORLIST=11
EQUIPITEM=listobject52
COLORLIST=11
EQUIPITEM=listobject53
EQUIPITEM=listobject54
COLORLIST=11
EQUIPITEM=listobject56
COLORLIST=11
NPCWANDER=3
FX1=-1
FY1=-1
FZ1=-1
FX2=10
SHOPKEEPER
SHOPLIST=BardShopping
TOTAME=1100
}

Place your new .dfn in the Uox3 Dfndata folder, inside the NPC subfolder. This is critical to get Uox3 to read your file on startup.
Last edited by stranf on Sun Jan 29, 2006 2:03 am, edited 1 time in total.
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

STEP 2:

Copy the next code and title it something .js. I called it: "loremaster.js"
updated january 30, 06: I noticed a typo that prevented the NPC from takling when you had less than 75gp. This is now fixed.
// Loremaster NPC conversation script.
// by Stranf.  (With parts edited from general UO scripts by Xuri, gwo, et. al.
// v1.0
// Last updated: 29. January 2006

// This is the script for an NPC lormaster, who, for a fee, will return the true name of an item.
// To use type the vendor's name + Job in typical Ultima 4 fashion.  He will tell you he can ID items.
// type in "name Identify" or "name identify" and you will be prompted to identify an item.


//The first part of this script is a copy of Xuri's conversation script.  It gives our NPC the standard conversation abilites.
//near the bottom of this script I have appended the Loremaster special abilites.

var tempObj = null;  //sets up the global variable that can be passed between function.
var myPlayer = null; //I probably don't need this anymore, but since the script works, I'm not going to mess with it. :)


function onSpeech( myString, myPlayer, myNPC, socket )
{
    if( !myNPC.InRange( myPlayer, 2 ) )
        return;
    var Speech_Array = myString.split(" ");
    var i = 0, currObj = 0;
    for( i = 1; i <= Speech_Array.length; i++ )
    {
        if( Speech_Array[currObj].match( /\bName\b/i ))
        {
            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "My name is "+myNPC.name+". A pleasure, I'm sure." );
            return;
        }
        if( Speech_Array[currObj].match( /\bHail\b/i ) || Speech_Array[currObj].match( /\bHi\b/i ) || Speech_Array[currObj].match( /\bHello\b/i )) 
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Hello there!" );
            return;

        }
        else if( Speech_Array[currObj].match( /\bBritish\b/i ) || Speech_Array[currObj].match( /\bKing\b/i ) || Speech_Array[currObj].match( /\bRuler\b/i ))   
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Lord British is a leader who believes in order." );
            return;

        }

        else if( Speech_Array[currObj].match( /\bBlackthorn\b/i )) 
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Blackthorn is Lord British's closest friend." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bBritannia\b/i ))  
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Britannia is the world in which thou art standing in." );
            return;

        }

        else if( Speech_Array[currObj].match( /\bShrine\b/i ) || Speech_Array[currObj].match( /\bVirtue\b/i ) || Speech_Array[currObj].match( /\bTemple\b/i )) 
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "There are many shrines in Britannia. Some say they have mystical powers!" );
            return;

        }

        else if( Speech_Array[currObj].match( /\bAnkh\b/i ) || Speech_Array[currObj].match( /\bHealer\b/i ) || Speech_Array[currObj].match( /\bResurrect\b/i ))
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Ankh's represent eternal life.  Some healers say that they have special powers." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bBard\b/i ) || Speech_Array[currObj].match( /\bGleeman\b/i ) || Speech_Array[currObj].match( /\bMusician\b/i ))
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Bards sing of adventures of great heroes! But I think they can be really annoying sometimes." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bBoat\b/i ) || Speech_Array[currObj].match( /\bShip\b/i )) 
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "A boat is great tool for thee to get around and visit the lands of Britannia with. Get one at the shipwright's!" );
            return;

        }
        else if( Speech_Array[currObj].match( /\bCemetery\b/i ) || Speech_Array[currObj].match( /\bCrypt\b/i ) || Speech_Array[currObj].match( /\bGraves\b/i )  || Speech_Array[currObj].match( /\bGraveyard\b/i ) || Speech_Array[currObj].match( /\bUndead\b/i ))
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Some people just won't let the dead rest in peace." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bLost\b/i ) || Speech_Array[currObj].match( /\bMap\b/i ) || Speech_Array[currObj].match( /\bAdvice\b/i )  || Speech_Array[currObj].match( /\bWhere\b/i ))  
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Just remember, where ever thou goest - There thou art!" );
            return;

        }
        else if( Speech_Array[currObj].match( /\bOrc\b/i ) || Speech_Array[currObj].match( /\bLizardman\b/i ) || Speech_Array[currObj].match( /\bMonster\b/i )  || Speech_Array[currObj].match( /\bSkeleton\b/i ) || Speech_Array[currObj].match( /\bZombie\b/i ) || Speech_Array[currObj].match( /\bDungeon\b/i ) || Speech_Array[currObj].match( /\bGraveyard\b/i )) 
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Monsters are everywhere... Especially in dungeons and graveyards." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bStable\b/i ) || Speech_Array[currObj].match( /\bHorse\b/i ) || Speech_Array[currObj].match( /\bRide\b/i ))
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "If thou hast some gold to spare, thou canst seek out the stables to buy thyself a horse." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bSteal\b/i ) || Speech_Array[currObj].match( /\bThief\b/i ) || Speech_Array[currObj].match( /\bThiev/i ))  
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "A thief is annoying, but perhaps they need things more then we do." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bArmor\b/i ) || Speech_Array[currObj].match( /\bArmour\b/i ) || Speech_Array[currObj].match( /\bShield\b/i ) || Speech_Array[currObj].match( /\bPlate\b/i ) || Speech_Array[currObj].match( /\bChain/i ) || Speech_Array[currObj].match( /\bLeather\b/i ) || Speech_Array[currObj].match( /\bStudded\b/i ) || Speech_Array[currObj].match( /\bHelm\b/i ) || Speech_Array[currObj].match( /\bGloves\b/i ) || Speech_Array[currObj].match( /\bLeggings\b/i ) || Speech_Array[currObj].match( /\bGorget\b/i ) || Speech_Array[currObj].match( /\bBone\b/i ))  
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Sounds like thou needst to find thyself an Armorer." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bWeapon\b/i ) || Speech_Array[currObj].match( /\bScimitar\b/i ) || Speech_Array[currObj].match( /\bKatana\b/i ) || Speech_Array[currObj].match( /\bLongsword\b/i ) || Speech_Array[currObj].match( /\bSword/i ) || Speech_Array[currObj].match( /\bViking\b/i ) || Speech_Array[currObj].match( /\bKryss\b/i ) || Speech_Array[currObj].match( /\bDagger\b/i ) || Speech_Array[currObj].match( /\bKnife\b/i ) || Speech_Array[currObj].match( /\bCleaver\b/i ) || Speech_Array[currObj].match( /\bHalberd\b/i ) || Speech_Array[currObj].match( /\bBardiche\b/i ) || Speech_Array[currObj].match( /\bHatchet\b/i ) || Speech_Array[currObj].match( /\bAxe\b/i ) || Speech_Array[currObj].match( /\bSpear\b/i ) || Speech_Array[currObj].match( /\bStaff\b/i ) || Speech_Array[currObj].match( /\bPitchfork\b/i ) || Speech_Array[currObj].match( /\bFork\b/i ) || Speech_Array[currObj].match( /\bCrook\b/i )) 
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Those things may be bought from a Weaponsmith." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bEgg\b/i ) || Speech_Array[currObj].match( /\bFlour\b/i ) || Speech_Array[currObj].match( /\bHoney\b/i ) || Speech_Array[currObj].match( /\bLoaf\b/i ) || Speech_Array[currObj].match( /\bLoaves/i ) || Speech_Array[currObj].match( /\bCake\b/i ) || Speech_Array[currObj].match( /\bCookie\b/i ) || Speech_Array[currObj].match( /\bPizza\b/i ) || Speech_Array[currObj].match( /\bDough\b/i ) || Speech_Array[currObj].match( /\bPie\b/i ) || Speech_Array[currObj].match( /\bMuffin\b/i ) || Speech_Array[currObj].match( /\bDonout\b/i ) || Speech_Array[currObj].match( /\bBake\b/i ) || Speech_Array[currObj].match( /\bOven\b/i ) || Speech_Array[currObj].match( /\bCook\b/i ) || Speech_Array[currObj].match( /\bChicken\b/i ) || Speech_Array[currObj].match( /\bHungry\b/i ))  
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "You want food? Try the baker's. Or find a tavern and get a drink to go with thy food." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bLiquor\b/i ) || Speech_Array[currObj].match( /\bBeer\b/i ) || Speech_Array[currObj].match( /\bWine\b/i ) || Speech_Array[currObj].match( /\bAle\b/i ) || Speech_Array[currObj].match( /\bAlcohol/i ) || Speech_Array[currObj].match( /\bSpirit\b/i ) || Speech_Array[currObj].match( /\bBeverage\b/i ))   
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Try a tavern - they have both drinks and food and games aplenty!" );
            return;

        }
        else if( Speech_Array[currObj].match( /\bReagents\b/i ) || Speech_Array[currObj].match( /\bRegs\b/i ) || Speech_Array[currObj].match( /\bReags\b/i ) || Speech_Array[currObj].match( /\bAsh\b/i ) || Speech_Array[currObj].match( /\bBlood/i ) || Speech_Array[currObj].match( /\bGarlic\b/i ) || Speech_Array[currObj].match( /\bMoss\b/i ) || Speech_Array[currObj].match( /\bMandrake\b/i ) || Speech_Array[currObj].match( /\bRoot\b/i ) || Speech_Array[currObj].match( /\bBlack\b/i ) || Speech_Array[currObj].match( /\bPearl\b/i ) || Speech_Array[currObj].match( /\bNightshade\b/i ) || Speech_Array[currObj].match( /\bGinseng\b/i ) || Speech_Array[currObj].match( /\bSulfurous\b/i ) || Speech_Array[currObj].match( /\bSilk\b/i ) || Speech_Array[currObj].match( /\bSceptre\b/i ) || Speech_Array[currObj].match( /\bSpellbook\b/i ) || Speech_Array[currObj].match( /\bPotionk\b/i ) || Speech_Array[currObj].match( /\bMortar\b/i ) || Speech_Array[currObj].match( /\bMagic\b/i ))  
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "A Mage or an Alchemist may sell thee such mystical artifacts." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bCloth\b/i ) || Speech_Array[currObj].match( /\bShirt\b/i ) || Speech_Array[currObj].match( /\bClothing\b/i ) || Speech_Array[currObj].match( /\bKilt\b/i ) || Speech_Array[currObj].match( /\bCape/i ) || Speech_Array[currObj].match( /\bRobe\b/i ) || Speech_Array[currObj].match( /\bSash\b/i ) || Speech_Array[currObj].match( /\bTunic\b/i ) || Speech_Array[currObj].match( /\bDress\b/i ) || Speech_Array[currObj].match( /\bLoom\b/i ) || Speech_Array[currObj].match( /\bWeave\b/i ) || Speech_Array[currObj].match( /\bCotton\b/i ) || Speech_Array[currObj].match( /\bWool\b/i ) || Speech_Array[currObj].match( /\bDye\b/i ) || Speech_Array[currObj].match( /\bGarment\b/i ) || Speech_Array[currObj].match( /\bPants\b/i ) || Speech_Array[currObj].match( /\bSew\b/i ) || Speech_Array[currObj].match( /\bTailork\b/i ) || Speech_Array[currObj].match( /\bThread\b/i ) || Speech_Array[currObj].match( /\bScissors\b/i ) || Speech_Array[currObj].match( /\bTunic\b/i ))  
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "For some fine clothing, I suggest thou seekest a tailor." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bArchitect\b/i ) || Speech_Array[currObj].match( /\bBuilding\b/i ) || Speech_Array[currObj].match( /\bHome\b/i ) || Speech_Array[currObj].match( /\bHouse\b/i ) || Speech_Array[currObj].match( /\bEstate/i ) || Speech_Array[currObj].match( /\bTower\b/i ) || Speech_Array[currObj].match( /\bCastle\b/i ) || Speech_Array[currObj].match( /\bKeep\b/i ))
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "An architect might be able to grant thee a house deed." );
            return;

        }
        else if( Speech_Array[currObj].match( /\bBye\b/i ) || Speech_Array[currObj].match( /\bGoodbye\b/i ) || Speech_Array[currObj].match( /\bFarewell\b/i ) || Speech_Array[currObj].match( /\bLater\b/i ))  
        {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Goodbye to thee!" );
            return;

        }
        else if( Speech_Array[currObj].match( /\bStupid\b/i ) || Speech_Array[currObj].match( /\bDumb\b/i ) || Speech_Array[currObj].match( /\bIdiot\b/i ) || Speech_Array[currObj].match( /\bFool\b/i ))           {

            myNPC.TurnToward( myPlayer );
            myNPC.TextMessage( "Ack! It pains my heart to hear such words!" );
            return;

        }

   // The Loremaster conversation is appended here

               else if( Speech_Array[currObj].match( /\bjob\b/i ))
               {
               myNPC.TurnToward( myPlayer);
               myNPC.TextMessage( "I can indentify weapons and artifacts for thee for the small fee of 75gp.");
               return;
                }

               else if( Speech_Array[currObj].match( /\bID\b/i ) || Speech_Array[currObj].match( /\bIdentify\b/i ))
               {myNPC.TurnToward( myPlayer);
               myNPC.TextMessage ( "Let me see what thou hast.");
               myPlayer.socket.tempObj = myNPC;
               myPlayer.CustomTarget( 1, "Select an item to Identify" );
               return;}





                currObj++;
    }
}



function onCallback1(socket, ourObj, myPlayer, myNPC)                  //This is the Loremaster identify function.
{

  var myNPC = socket.tempObj;
  var IdFee = 75;              //Amount of gold required to ID an object.
   var mChar = socket.currentChar;                    //Sets up an object that contains all of the PC's data.
   var gold =  mChar.ResourceCount( 0xEED, 0 );        //Counts the gold carried by the PC.
   if( gold >= IdFee )
   {

      if( !socket.GetWord( 1 ) && ourObj.isItem  )
      {
            if (ourObj.name2 = ourObj.name)    //this conditional is what the loremaster says if the part dosen't have two unique names.
            {myNPC.TextMessage("Why, what thou hast is a genuine " + ourObj.name + " .");
             mChar.UseResource( IdFee, 0xEED );}

            else                             //this is what the loremaster says if the item has two unique names
            {
            myNPC.TextMessage("The true name of this " +ourObj.name+ " is " + ourObj.name2 + " .");  //ourObj.name is where the item type name is stored.  ourObj.name2 is where Uox3 stores unidentified or magic names.
            ourObj.name = ourObj.name2;                 //This sets the original name of the item to the magic name, so it is permenatnly Identified.  Theoretically it should work, but a bug in the latest Uox3 release prevents me from testing.
            mChar.UseResource( IdFee, 0xEED );
            }         //takes the fee from the player.

      }
   }
   else
      myNPC.TextMessage( "Thou hast not enough funds.  My talents require "+IdFee+" gold ." );

}


// [EOF]
Now, this file can be placed anywhere, but I would suggest created a "custom" folder in your "js" directory. That way you can have quick access to all of your scripts. This is important to make version transitions smooth during updates
Last edited by stranf on Mon Jan 30, 2006 4:50 pm, edited 3 times in total.
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

STEP 3: Now you have to tell UOx3 where to find your script. Inside your UOx3 directory you will find a file called: jse_fileassociations.scp.

Open this file in a notepad.

If you notice on the above "dfn" data code, there is a line under each category that says SCRIPT= 3002. This binds the Loremaster and Bard to script #3002.

If you scroll down in your jse_association document you will see line numbers. In numeric order you will see a heading that says:

Code: Select all

// NPC Basic Speech[3000-3099]
3000=npc/speech/speech_001.js
write below bind your created script to 3002:
example if my loremaster script was in: js/custom

Code: Select all

3002=custom/loremaster.js
notice I didn't put "js/custome/loremaster", Uox3 automatically looks for all scripts in the "js" directory.

Note: You may wonder why I didn't have it bound to 3001? You are correct, I can do this, but I must change every "SCRIPT = 3002" in the .dfn folder to 3001.

The reason I didn't use 3001 is because my server currently has that bound to Xuri's Wandering Healer script. (Which I highly reccommend)
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

STEP 4:
How to use:

Ok, each value in the .dfn file contains a title for your characters.

M_LOREMASTER = male loremaster
F_LOREMASTER = female loremaster
M_WBARD = male wandering bard
F_WBARD = female wandering bard.

----

to add an NPC, log in as a character with GM powers and type:

Code: Select all

'add npc m_loremaster
You will be prompted where to place the loremaster, and when selected he will appear.

to get your loremaster to stop moving (I like having my loremasters at desks in librarys) Use this command:

Code: Select all

'set npcwander 0
and select the loremaster. then use

Code: Select all

'xteleport
to teleport your non-moving loremaster to your current location. (IE: to place him in a chair you are sitting in).

----

NOTE: all loremasters have the same abilities as a mage. typping "vendor buy" will allow you to purchase scrolls. Likewise, wandering bards sell instruments.

typing in "job?" the NPC will respond: "I can identify items for 75 gold".
typing in "id" or "identify" and you will be prompted on which item to identify. If you have the proper gold, it will be automatically subtracted. (to cancel a circle without getting stuck with a 75gp penalty, click on your bag in the paperdoll, this is an easy way to cancel.)

----

Note: I have given wandering bards skills in archery, and fencing. You can arm them like you wish and have them roam the countryside. I'm not sure if they will fight or not since their default AI is shopkeeper and I haven't tested. Also, they are immortal, so unless you remove that they will always win a battle. (They can be used to semi-clean up areas that have lots of monster spawns on sparsley populated shards).

I have given the loremasters titles of "notable" and bards titles of "honest." (You don't want some wandering bard identifying your stuff if you can't trust him?)

I did this purely for roleplaying purposes, as on my shard, I want to make the loremasters fairly rare. Since someone who wanders far and learns enough without dying, or someone who spends all the time in the library should be few and far between.


Anyways...enjoy!!

Feel free to edit/enhance, just post the changes in this thread, I may like them too!
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Nice work, stranf :D
-= Ho Eyo He Hum =-
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Found a bug.

Code: Select all

 if (ourObj.name2 = ourObj.name) 
should be

Code: Select all

 if (ourObj.name2 == ourObj.name) 
-= Ho Eyo He Hum =-
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Ah...the deraded boolean errors!
I'll get to work on that this weekend, in the meantime, everyone who has tried this script, load it up, use a find and replace on the code Xuri founded. should clear up the error.
Post Reply