Stranf's Magic Items 2

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

Stranf's Magic Items 2

Post by stranf »

Here is my magic items two. For detailed information on how to install this script, please view my "magic items 1" topic, as well as my "loremaster.js" topic. Both of which are in the script vault.



Here is the script:

(I named it magici2.js)
//stranf's magic weapons2 js script
//last edited 2/20/06
// NOTE:  I placed the swords, axes, maces, bows etc. on different "if" statements even though they do the same thing.
// I did this because this file can be used as a template for future magic weapons tables.
// as it stands now, you can easilly create a new dfn with axes that do something while swords can
// do something else.
// OTHER NOTE:  Staff based polearms are under the "animal master category"  whileas spears and halberds are under "spear" category.

//equipfunction here

function onEquip(mChar, ourObj)
{
 if (ourObj.id == 0x13c6 || ourObj.id == 0x1414 ||ourObj.id == 0x13eb || ourObj.id ==0x13dd)
 {mChar.tempstr=(mChar.tempstr + 3);}  //script used for gloves of strength

 if (ourObj.id ==  0x170b||ourObj.id == 0x170d ||ourObj.id ==0x170f ||ourObj.id == 0x1711)
 {mChar.tempdex=(mChar.tempdex + 2);
  mChar.skills.tracking = (mChar.skills.tracking +50)}; //script used for boots of tracking

 if (ourObj.id == 0x13f4 || ourObj.id == 0x13f8 ||ourObj.id == 0x0df0 || ourObj.id ==0x0e81 || ourObj.id ==0x0e89)
 {mChar.skills.taming=(mChar.skills.taming + 150);
  mChar.skills.herding =(mChar.skills.herding + 150);}  //script used Animal Master polearms

 if (ourObj.id == 0x26ce || ourObj.id == 0x26ce ||ourObj.id == 0x13b5 || ourObj.id ==0x0f60 || ourObj.id ==0x0f5e || ourObj.id ==0x13fe || ourObj.id ==0x1440)
 {mChar.skills.tactics=(mChar.skills.tactics + 50);} //script used for swords of accuracy

 if (ourObj.id == 0x0f4b || ourObj.id == 0x143a ||ourObj.id == 0x1438 || ourObj.id ==0x1406 || ourObj.id ==0x0f5c || ourObj.id ==0x13af || ourObj.id ==0x0fb4 || ourObj.id== 0x13b3)
 {mChar.skills.tactics=(mChar.skills.tactics + 50);} //script used for axes of accuracy

 
 if (ourObj.id == 0x143c || ourObj.id == 0x0f49 ||ourObj.id == 0x0f47 || ourObj.id ==0x0f45 || ourObj.id ==0x0f43 || ourObj.id ==0x1442 || ourObj.id ==0x13fa)
 {mChar.skills.tactics=(mChar.skills.tactics + 50);} //script used for maces of accuracy

 if (ourObj.id == 0x13fc || ourObj.id == 0x26c2 ||ourObj.id == 0x26c3 || ourObj.id ==0x27a5 || ourObj.id ==0x0f4f || ourObj.id ==0x13b1)
 {mChar.skills.tactics=(mChar.skills.tactics + 50);} //script used for bows of accuracy



 //if (ourObj.id ==  0x170b||ourObj.id == 0x170d ||ourObj.id ==0x170f ||ourObj.id == 0x1711) //scipt used for footwear of wandering.
 //{mChar.tempdex=(mChar.tempdex + 1);}

 if (ourObj.id ==0x1515) //script for bard's cloak
 {mChar.skills.musicianship = (mChar.skills.musicianship + 150);
  mChar.tempint = (mChar.tempint + 1);
  mChar.tempdex=(mChar.tempdex + 1);}

 if (ourObj.id == 0x108a) //script for wizard's ring
     {mChar.skills.inscription = (mChar.skills.inscription + 100);
      mChar.skills.tactics = (mChar.skills.tactics - 200);
      mChar.skills.magery = (mChar.skills.magery + 150);
      mChar.skills.alchemy = (mChar.skills.alchemy + 150);
      mChar.skills.itemid = (mChar.skills.itemid + 100);
      //mChar.skills.inscription = (mChar.skills.inscription + 150);
      mChar.tempdex = (mChar.tempdex - 1);
      mChar.tempstr = (mChar.tempstr-2);
      mChar.tempint = (mChar.tempint + 3);}
}




//unequip function here

function onUnequip(mChar, ourObj)
{
 if (ourObj.id == 0x13c6 ||ourObj.id == 0x1414 ||ourObj.id == 0x13eb ||ourObj.id == 0x13dd)
    {mChar.tempstr=(mChar.tempstr - 3);} //gloves of strength

 if (ourObj.id ==  0x170b||ourObj.id == 0x170d ||ourObj.id ==0x170f ||ourObj.id == 0x1711)
 {mChar.tempdex=(mChar.tempdex - 2);
  mChar.skills.tracking = (mChar.skills.tracking -50);} //script used for boots of tracking
     
 if (ourObj.id == 0x13f4 || ourObj.id == 0x13f8 ||ourObj.id == 0x0df0 || ourObj.id ==0x0e81 || ourObj.id ==0x0e89)
 {mChar.skills.taming=(mChar.skills.taming - 150);
  mChar.skills.herding =(mChar.skills.herding - 150);}  //script used Animal Master polearms

 if (ourObj.id == 0x26ce || ourObj.id == 0x26ce ||ourObj.id == 0x13b5 || ourObj.id ==0x0f60 || ourObj.id ==0x0f5e || ourObj.id ==0x13fe || ourObj.id ==0x1440)
 {mChar.skills.tactics=(mChar.skills.tactics - 50);} //script used for swords of accuracy

 if (ourObj.id == 0x0f4b || ourObj.id == 0x0f49 ||ourObj.id == 0x0f47 || ourObj.id ==0x0f45 || ourObj.id ==0x0f43 || ourObj.id ==0x1442 || ourObj.id ==0x13fa)
 {mChar.skills.tactics=(mChar.skills.tactics - 50);} //script used for axes of accuracy

  if (ourObj.id == 0x0f4b || ourObj.id == 0x143a ||ourObj.id == 0x1438 || ourObj.id ==0x1406 || ourObj.id ==0x0f5c || ourObj.id ==0x13af || ourObj.id ==0x0fb4 || ourObj.id== 0x13b3)
 {mChar.skills.tactics=(mChar.skills.tactics - 50);} //script used for maces of accuracy

 if (ourObj.id == 0x13fc || ourObj.id == 0x26c2 ||ourObj.id == 0x26c3 || ourObj.id ==0x27a5 || ourObj.id ==0x0f4f || ourObj.id ==0x13b1)
 {mChar.skills.tactics=(mChar.skills.tactics - 50);} //script used for bows of accuracy




   if (ourObj.id == 0x170b ||ourObj.id == 0x170d ||ourObj.id ==0x170f ||ourObj.id == 0x1711)
     {mChar.tempdex=(mChar.tempdex - 1);}

  if (ourObj.id ==0x1515) //script for bard's cloak
 {mChar.skills.musicianship = (mChar.skills.musicianship - 150);
  mChar.skills.intelligence = (mChar.tempint - 1);
  mChar.tempdex=(mChar.tempdex - 1);}


 
 if (ourObj.id == 0x108a) //script for wizard's ring
   
     {mChar.skills.inscription = (mChar.skills.inscription - 100);
      mChar.skills.tactics = (mChar.skills.tactics + 200);
      mChar.skills.magery = (mChar.skills.magery - 150);
      mChar.skills.alchemy = (mChar.skills.alchemy + 150);
      mChar.skills.itemid = (mChar.skills.itemid - 100);
      //mChar.skills.inscription = (mChar.skills.inscription - 150);
      mChar.tempdex = (mChar.tempdex + 1);
      mChar.tempstr = (mChar.tempstr + 2);
      mChar.tempint = (mChar.tempint - 3);}
}

Last edited by stranf on Mon Feb 20, 2006 9:46 am, 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 »

Here is the .dfn file:

I called it tbs_magic2.dfn. I placed it in the gear/armor subfolder. (shouldn't matter where you put it, try the custom folder.)
//Magic gauntlets of strength

[m_gloves2]
{ left facing
get=leather_gloves
name2=Leather Gloves of  Strength
name=Leather Gloves
id=0x13c6
script=5021
def=1
value = 950, 200
}

[m_studgloves2]
{ right Facing
get=studded_gloves
name=studded gloves
name2=studded gloves of  strength
id=0x13dd
def=1
script=5021
value= 1150,250
}


[m_ringgloves2]
{
get=ring_gloves
name=ringmail gloves
name2=ringmail gloves of  strength
id=0x13eb
def=2
script=5021
value=1200, 400
}

[m_plategloves2]
{ left facing
get=plate_gloves
name=platemail gloves
name2=platemail gloves of strength
id=0x1414
def=2
script=5021
value=1400,500
}

//Magic boots of tracker
[boots_tracker]
{
get=base_item
name=boots
name2=tracker's boots
id=0x170b
weight=300
value=1100,22
layer=0x03
def=1
hp=30
str=10
dyeable=1
decay=1
script=5021
}

[sandals_tracker]
{
get=base_item
name=sandals
name2=tracker's sandals
id=0x170d
weight=100
value=875,75
layer=0x03
hp=10
dyeable=1
decay=1
script=5021
}

[shoes_tracker]
{
get=base_item
name=shoes
name=tracker's shoes
id=0x170f
weight=200
value=1175,80
layer=0x03
hp=20
dyeable=1
decay=1
script=5021
}

[tboots_tracker]
{
get=base_item
name=thigh boots
name2=tracker's thigh boots
id=0x1711
weight=400
value=1250,95
layer=0x03
def=2
hp=50
str=20
dyeable=1
decay=1
script=5021
}


[bards_cloak]
{
get=base_item
name=cloak
name2=bard's cloak
id=0x1515
weight=500
value=1000,21
layer=0x14
hp=50
restock=10
dyeable=1
decay=1
script = 5021
}



//taming/herding polearms

[c_amaster]
{ facing West
get=base_item
name=crook
name2=Animals' Master
id=0x13f4
weight=300
value=500,24
layer=2
lodamage=13
hidamage=15
hp=50
spd=40
str=20
restock=10
movable=1
decay=1
script=5021
}

[gs_amaster]
{ facing North
get=base_item
name=gnarled staff
name2=Animals' Master
id=0x13f8
weight=300
value=600,12
layer=2
lodamage=15
hidamage=17
hp=50
spd=33
str=20
restock=10
movable=1
decay=1
script=5021
}

[bs_amaster]
{ facing West
get=base_item
name=black staff
id=0x0df0
weight=600
value=700,24
layer=2
lodamage=13
hidamage=16
hp=70
spd=39
str=35
restock=10
movable=1
decay=1
script=5021
}

[sc_amaster]
{ facing North
get=base_item
name=shepherd's crook
name2=Animals' Master
id=0x0e81
weight=200
value=775,24
layer=2
lodamage=13
hidamage=15
hp=50
spd=40
str=20
restock=10
movable=1
decay=1
script=5021
}

[qs_amaster]
{ facing North
get=base_item
name=quarter staff
name2=Animals' Master
id=0x0e89
weight=400
value=775,15
layer=2
lodamage=11
hidamage=14
hp=60
spd=48
str=30
restock=10
movable=1
decay=1
script=5021
}



//ring of wizard
[ring_wizard]
{
get=base_item
name=ring
name2=wizard's ring
id=0x108a
weight=100
value=790,13
restock=10
decay=1
script = 5021
}






//weapons of accuracy
// SWORDS

[a_cutlass]
{ facing West
get=base_item
name=cutlass
name2=cutlass of accuracy
id=0x1440
weight=800
value=526,13
layer=1
lodamage=11
hidamage=13
hp=70
spd=44
str=25
restock=10
movable=1
decay=1
script = 5021
}

[a_katana]
{ facing West
get=base_item
name=katana
name2=katana of accuracy
id=0x13fe
weight=600
value=534,17
layer=1
lodamage=11
hidamage=13
hp=90
spd=46
str=25
restock=10
decay=1
script = 5021
}


[a_broadsword]
{ facing North
get=base_item
name=broadsword
name2=broadsword of accuracy
id=0x0f5e
weight=600
value=542,21
layer=1
lodamage=14
hidamage=15
hp=100
spd=33
str=30
restock=10
decay=1
script = 5021
}


[a_longsword]
{ facing West
get=base_item
name=longsword
name2=longsword of accuracy
id=0x0f60
weight=700
value=558,29
layer=1
lodamage=15
hidamage=16
hp=90
spd=30
str=35
restock=10
decay=1
script = 5021
}

[a_scimitar]
{ facing West
get=base_item
name=scimitar
name2=scimitar of accuracy
id=0x13b5
weight=500
value=536,18
layer=1
lodamage=13
hidamage=15
hp=90
spd=37
str=25
restock=10
decay=1
script = 5021
}



[a_viking]
{ facing North
get=base_item
name=viking sword
name2=viking sword of accuracy
id=0x13b9
weight=600
value=550,25
layer=1
lodamage=15
hidamage=17
hp=90
spd=28
str=40
restock=10
decay=1
script = 5021
}

[a_2hs]
{ West/East
get=base_item
name=Two-handed sword
name2=Two-handed sword of accuracy
id=0x26ce
weight=600
value=980,40
layer=2
lodamage=17
hidamage=21
hp=110
spd=28
str=60
restock=10
movable=1
decay=1
script=5021
}


//axes are here
[a_lbaxe]
{ facing West
get=base_item
name=large battle axe
name2=large battle axe of accuracy
id=0x13fa
weight=600
value=532,16
layer=2
lodamage=16
hidamage=17
hp=110
spd=29
str=80
restock=10
movable=1
decay=1
type=216
script=5021
}


[a_2ha]
{ facing West
get=base_item
name=two handed axe
name2=two handed axe of accuracy
id=0x1442
weight=800
value=526,13
layer=2
lodamage=16
hidamage=17
hp=70
spd=31
str=40
restock=10
movable=1
decay=1
type=216
script=5021
}

[a_hatchet]
{ facing North
get=base_item
name=hatchet
name2=hatchet of accuracy
id=0x0f43
weight=400
value=530,15
layer=1
lodamage=13
hidamage=15
hp=80
spd=41
str=20
restock=10
movable=1
decay=1
type=216
script=5021
}


[a_exaxe]
{ facing North
get=base_item
name=executioner's axe
name2=executioner's axe of accuracy
id=0x0f45
weight=800
value=532,16
layer=2
lodamage=15
hidamage=17
hp=90
spd=33
str=40
restock=10
movable=1
decay=1
type=216
script=5021
}


[a_baxe]
{ facing North
get=base_item
name=battle axe
name2=battle axe of accuracy
id=0x0f47
weight=400
value=530,15
layer=2
lodamage=15
hidamage=17
hp=80
spd=31
str=35
restock=10
movable=1
decay=1
type=216
script=5021
}


[a_axe]
{ facing North
get=base_item
name=axe
name2=axe of accuracy
id=0x0f49
weight=400
value=542,21
layer=2
lodamage=14
hidamage=16
hp=100
spd=37
str=35
restock=10
movable=1
decay=1
type=216
script=5021
}


[a_dblaxe]
{ facing North
get=base_item
name=double axe
name2=double axe of accuracy
id=0x0f4b
weight=800
value=550,25
layer=2
lodamage=15
hidamage=17
hp=110
spd=33
str=45
restock=10
movable=1
decay=1
type=216
script=5021
}

// MACES



[a_club]
{ facing West
get=base_item
name=club
name2=club of accuracy
id=0x13b3
weight=900
value=27,13
layer=1
lodamage=11
hidamage=13
hp=40
spd=44
str=40
restock=10
movable=1
decay=1
script=5021
}

[a_shammer]
{ facing West
get=base_item
name=sledge hammer
name2=sledge hammer of accuracy
id=0x0fb4
weight=900
value=32,16
layer=1
lodamage=13
hidamage=15
hp=60
spd=33
str=40
restock=10
movable=1
decay=1
script=5021
}


[a_waraxe]
{ facing West
get=base_item
name=war axe
name2=war axe of accuracy
id=0x13af
weight=800
value=28,14
layer=1
lodamage=14
hidamage=15
hp=80
spd=33
str=35
restock=10
movable=1
decay=1
}

[a_mace]
{ facing North
get=base_item
name=mace
name2=mace of accuracy
id=0x0f5c
weight=1400
value=26,13
layer=1
lodamage=12
hidamage=14
hp=80
spd=40
str=45
restock=10
movable=1
decay=1
script=5021
}

[a_warmace]
{ facing West
get=base_item
name=war mace
name2=war mace of accuracy
id=0x1406
weight=1700
value=32,16
layer=1
lodamage=16
hidamage=17
hp=110
spd=26
str=80
restock=10
movable=1
decay=1
script=5021
}

[a_warhammer]
{ facing West
get=base_item
name=war hammer
name2=war hammer of accuracy
id=0x1438
weight=1000
value=22,11
layer=2
lodamage=17
hidamage=18
hp=110
spd=28
str=95
restock=10
movable=1
decay=1
script=5021
}


[a_maul]
{ facing West
get=base_item
name=maul
name2=maul of accuracy
id=0x143a
weight=1400
value=20,10
layer=1
lodamage=14
hidamage=16
hp=70
spd=32
str=45
restock=10
movable=1
decay=1
script=5021
}


[a_hpick]
{ facing West
get=base_item
name=hammer pick
name2=hammer pick of accuracy
id=0x143c
weight=900
value=22,11
layer=1
lodamage=15
hidamage=17
hp=70
spd=28
str=45
restock=10
movable=1
decay=1
script=5021
}


// BOWS

[a_crossbow]
{ facing North
get=base_item
name=crossbow
name2=crossbow of accuracy
id=0x0f4f
weight=700
value=46,23
layer=2
lodamage=18
hidamage=20
hp=80
spd=24
str=35
restock=10
movable=1
decay=1
script=5021
}


[a_bow]
{
get=base_item
name=bow
name2=bow of accuracy
id=0x13b1
weight=700
value=46,23
layer=2
lodamage=16
hidamage=18
hp=60
spd=25
str=30
restock=10
movable=1
decay=1
script=5021
}


[a_hxbow]
{ facing West
get=base_item
name=heavy crossbow
name2=heavy crossbow of accuracy
id=0x13fc
weight=900
value=56,28
layer=2
lodamage=19
hidamage=20
hp=100
spd=22
str=80
restock=10
movable=1
decay=1
script=5021
}

[a_cbow]
{ West/East
get=base_item
name=composite bow
name=composite bow of accuracy
id=0x26c2
weight=500
value=40,23
layer=2
lodamage=15
hidamage=17
hp=50
spd=25
str=45
restock=10
movable=1
decay=1
script=5021
}

[a_rptxbow]
{ West/East
get=base_item
name=repeating crossbow
name2=repeating crossbow of accuracy
id=0x26c3
weight=600
value=48,24
layer=2
lodamage=10
hidamage=12
hp=50
spd=41
str=30
restock=10
movable=1
decay=1
script=5021
}

[a_yumi]
{ East/West
get=base_item
name=yumi
name=yumi of accuracy
id=0x27a5
weight=800
value=40,20
layer=2
lodamage=18
hidamage=20
hp=50
spd=25
str=35
restock=10
movable=1
decay=1
script=5021
}

NOTE: All scripts are defaulted to 5021. If you initiated to a different value in the jse_association file, please remember to rename the value in the .dfn.
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Ok. I don't have time to detail everything in this script. (I told you, each magici.js is going to be much larger than the previous)

Also, the scripts build off of each other. It is recommended that you install my "magic items 1" as well as this script to get the full effect.

So note the titles of the items in the .dfn folder. use that name in brackets to add the item in game.

Log in as a GM and type:

Code: Select all

'add item a_yumi
and you will add a magic yumi of accuracy.


Here is a breif overview of the content:
-- Gloves are now of strength. (+3 instead of +1 from the previous script)
-- Boots are of tracking. (increases dex, as well as +5% to tracking)
-- Polearms of animal master. (+15 to taming and herding)
-- swords, axes, maces, bows of accuracy. + 5% to tactics.
-- From now on I will use the Paladin sword as a "2handed sword" (increased the damage, slowed it down, and made it only 2handed equipable) It is under the .dfn as "a_2hs"

--cloak is now Bard's cloak: +15 music, +1 dex, +1 int
--ring is now wizard's ring: +10 inscription, -20 tactics, +15 magery, +15 alchemy, +15 item-id, dex -1, str -2, int +3
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Please reinstall the script if you've already installed it.

I found some bugs that needed to be fixed.

Original:

Code: Select all

mChar.skills.animaltaming
was replaced to:

Code: Select all

mChar.skills.taming
Problem was, was since animaltaming is not a valid skill, when arming the crook it increased my GMs stats to 65551.0.....everyone of them. Talk about a quick way to get a uber-character![/code]
Post Reply