ID:142425
 
Code:
mob
var
bowonshort=0 /////////FOR THE SHORT BOW
bowonf=0
/obj/addons/apack_
var
ar = 0/////////forbow

/*
Nadrew's Equipment System
(Formerly: Nadrew's Weapon System)

©2004 James "Nadrew" Smith, All Rights Reserved.

This is for educational purposes, not insertion into existing programming.
Edit at your own risk.


Edited versions of this file are NOT supported by the author, and are not to be distributed
without the author's permission.
*/



//Map stuff


//Mob variables

mob
proc
Olays()
overlays=null
for(var/obj/O in olays)
overlays+=O
usr.client.screen+=O
if(race=="Elf")
overlays+='Elfears.dmi'
overlays+=image(/obj/light/)
..()
var
olays=list()
list
equipment = list("head","hoods","body","hands","left arm","right arm","back","belt","legs","feet")
//This sets up a list with nine pre-defined body types
//You can access each with "equipment[space]"
//Items

obj
var/get=0
MouseDrop(obj/o,sl,ol)
if(sl==usr.loc&&o in usr)
o.Move(usr)
else if(o.get&&sl==usr.loc&&o in oview(1))
o.Move(usr.loc)
equipment
layer=MOB_LAYER*52
get=1
var
attackup = 0
defenseup = 0
material = ""
//These variables will be used to determine what modifications need to be done on equip

//Below are specfic item types based on where they are worn
back
screen_loc="18,1"
Cape
icon = 'RyanCape.dmi'
defenseup = 3
Cape_
icon = 'Orccape.dmi'
defenseup = 4
Black_Cape
icon = 'jcape.dmi'
defenseup = 3
Red_Cape
icon = 'redcape.dmi'
defenseup = 3
Green_Cape
icon = 'greencape.dmi'
defenseup = 3
Superman_Cape
icon = 'supermancape.dmi'
defenseup = 3
Skull_Cape
icon = 'skullcape.dmi'
defenseup = 3
wig
screen_loc="15,2"
Girls_Wigs
Blonde_Wig
icon = 'wig1.dmi'
Mishabun_Wig
icon = 'mishabun.dmi'
Mens_Wigs
Zell_Wig
icon = 'zellwig.dmi'
Short_Blonde_Wig
icon = 'shortblondewig.dmi'
Short_Brown_Wig
icon = 'Brown Short.dmi'
Black_Beard
icon = 'beard1.dmi'
clothing
screen_loc="15,1"
Girls_Clothing
Scarlet_Clothes
icon = 'girlsclothes.dmi'
Mens_Clothing
head
screen_loc="17,2"
Helms
Plate_Helmet
icon = 'Platehelm.dmi'
defenseup = 6
material = "Metal"
Knight_Helmet
icon = 'KnightHelm.dmi'
defenseup = 8
material = "Metal"
Solid_Helmet
icon = 'RyanHelm.dmi'
defenseup = 10
material = "Metal"
Crown
icon = 'crown.dmi'
defenseup = 8
material = "Gold"
Elven_Crown
icon = 'Elfcrown.dmi'
defenseup = 8
material = "Dragon Hide"
Crown_of_Zell
icon = 'zellcrown2.dmi'
defenseup = 8
material = "Silver"
Twilight_Helm
icon = 'demonhelm.dmi'
defenseup = 15
material = "Metal"
Warcry_Hat
icon = 'hillhat.dmi'
defenseup = 4
material = "Leather"
Hats
Wizard_Hat
icon = 'wizhat.dmi'
defenseup = 2
Skeleton_Mask
icon = 'skeletonmask.dmi'
defenseup = 2
Troll_Mask
icon = 'Trollgoodies2.dmi'
icon_state = "mask"
defenseup = 2
hoods
screen_loc="18,2"
Hood
icon = 'hood.dmi'
defenseup = 2
Coif
icon = 'coif.dmi'
defenseup = 4
get=1
Red_Hood
icon = 'wigwidinghood.dmi'
defenseup = 2
hands
screen_loc="19,1"
lgloves
icon = 'lgloves.dmi'
defenseup = 2
Gloves
icon = 'gloves.dmi'
defenseup = 4
Gauntlets
icon = 'gauntlets.dmi'
defenseup = 6

body
screen_loc="17,1"
armor
Cloth
Leather
Leather_Body
icon = 'leather.dmi'
defenseup = 6
Warcry_Jerkin
icon = 'hillband.dmi'
defenseup = 7
Metals
Chain_Body
icon = 'chain.dmi'
defenseup = 8
Plate_Body
icon = 'plate.dmi'
defenseup = 10
Solid_Body
icon = 'RyanPlate.dmi'
defenseup = 12
Twilight_Plate
icon = 'demonplate.dmi'
defenseup = 17

//The arms will be sub-categorized
arms
left //For the left arm
shields
screen_loc="16,1"
Buckler
icon = 'buckler.dmi'
defenseup = 5
Shield
icon = 'shield.dmi'
defenseup = 10
right
screen_loc="16,2"
Sword
icon = 'sword.dmi'
attackup = 15
Spear
icon = 'spear.dmi'
attackup = 20
Staff
icon = 'staff.dmi'
attackup = 5
Wooden_Spear
icon = 'woodspear.dmi'
attackup = 8
Axe
icon = 'axe.dmi'
attackup = 10
Tomahawk
icon = 'Trollgoodies2.dmi'
icon_state = "tomahawk"
Staff_of_Fire
icon = 'firestaff.dmi'
attackup = 15
Scythe
icon = 'scythe.dmi'
attackup = 25
Slasher_Sword
icon = 'angelslightsword.dmi'
attackup = 20
Excalibur
icon = 'excalibur.dmi'
attackup = 15
Short_Bow
icon = 'bow.dmi'
icon_state="bow"
attackup = 5
verb
Check_Arrows()
usr<<"You have [usr.arrows] arrows."
Drop_Arrows()
var/arrowsamount = input("Number of Arrows to Drop?") as num
if(arrowsamount <= 0) //if coinsamount is 0
usr << "You can't drop what you don't have."
usr << "You have [usr.arrows] arrows."
return
if(usr.arrows < arrowsamount)
usr << "You don't have [arrowsamount] arrows!"
usr << "You have [usr.arrows] arrows."
return
else
usr.arrows -= arrowsamount
view(0) << "[usr] drops [arrowsamount] arrows."
var/obj/addons/apack_/A = new()//creates a coin obj
A.ar = arrowsamount //give the coin the amount of coins you want to drop
A.loc = locate(usr.x,usr.y,usr.z)//drops the coins where you are
Short_Bowf
icon = 'bow.dmi'
icon_state="fbow"
name="Flame Bow"
attackup = 10
verb
Check_Arrows()
usr<<"You have [usr.arrows] arrows."
Drop_Arrows()
var/arrowsamount = input("Number of Arrows to Drop?") as num
if(arrowsamount <= 0) //if coinsamount is 0
usr << "You can't drop what you don't have."
usr << "You have [usr.arrows] arrows."
return
if(usr.arrows < arrowsamount)
usr << "You don't have [arrowsamount] arrows!"
usr << "You have [usr.arrows] arrows."
return
else
usr.arrows -= arrowsamount
view(0) << "[usr] drops [arrowsamount] arrows."
var/obj/addons/apack_/A = new()//creates a coin obj
A.ar = arrowsamount //give the coin the amount of coins you want to drop
A.loc = locate(usr.x,usr.y,usr.z)//drops the coins where you are


back
icon_state = "ring"

feet
screen_loc="19,2"
Boots
icon = 'lboots.dmi'
defenseup = 2
Greaves
icon = 'boots.dmi'
defenseup = 4
Twilight_Boots
icon = 'twilightboots.dmi'
defenseup = 6

//Now for the commands
verb
//Picking up and dropping.
Get()
set src in oview(1)
src.layer=MOB_LAYER*52
src.Move(usr)
Drop()
set src in usr
src.layer=OBJ_LAYER
src.layer = OBJ_LAYER
for(var/E in usr.equipment)
if(usr.equipment[E] == src)
src.Unequip(usr)
src.Move(usr.loc)

//Equipping
Equip()
set category="Options"
set src in usr
var
inventory_slot
if(istype(src,/obj/equipment/wig))
inventory_slot = "wig"
if(istype(src,/obj/equipment/head))
inventory_slot = "head"
if(istype(src,/obj/equipment/arms/right/Short_Bow))///////TESTING BOW
usr.bowonshort=1
if(istype(src,/obj/equipment/arms/right/Short_Bowf))///////TESTING BOW
usr.bowonf=1
if(istype(src,/obj/equipment/hoods))
inventory_slot = "hoods"
if(istype(src,/obj/equipment/hands))
inventory_slot = "hands"
if(istype(src,/obj/equipment/clothing))
inventory_slot = "clothing"
if(istype(src,/obj/equipment/body))
inventory_slot = "body"
if(istype(src,/obj/equipment/arms/left))
inventory_slot = "left arm"
if(istype(src,/obj/equipment/arms/right))
inventory_slot = "right arm"
if(istype(src,/obj/equipment/back))
inventory_slot = "back"
if(istype(src,/obj/equipment/feet))
inventory_slot = "feet"
if(usr.equipment[inventory_slot] == src)
return
if(usr.equipment[inventory_slot])
var/obj/equipment/uneq = usr.equipment[inventory_slot]
uneq.Unequip(usr)
usr << "[src] equipped."
src.suffix = "equipped"
usr.eatt += src.attackup
usr.edef += src.defenseup
usr.delay += src.defenseup
usr.delay += src.attackup
src.layer=MOB_LAYER*52
usr.olays += src
usr.Olays()
usr.equipment[inventory_slot] = src
Examine()
set category="Options"
usr << "[src] is made of [src.material] and provides [src.attackup] Attack Power and [src.defenseup] Armor."
Unequip()
set src in usr
set category="Options"
var/mob/user = usr
if(istype(src,/obj/equipment/arms/right/Short_Bow))///////TESTING BOW
usr.bowonshort=0
if(istype(src,/obj/equipment/arms/right/Short_Bowf))///////TESTING BOW
usr.bowonf=0
for(var/E in user.equipment)
//Loop through the user's equipment list.
if(user.equipment[E] == src)
//Matched to your equipped item.
user.equipment[E] = null
user.edef -= src.defenseup
user.eatt -= src.attackup
usr.delay -= src.defenseup
usr.delay -= src.attackup
usr.olays -= src
usr.client.screen-=src
usr.Olays()
//Undoing the equipped item's effects.
user << "[src] unequipped."
src.suffix = ""


Problem description:
Using nadrews equip the version is pretty old. The game was working fine before byond updated whats wrong? The overlays don't go north east west or south when the player moves....

Is this from Hazordhu? :P

You really should remake ...everything in there..

...Oh wait, we have.
are u sure the icons have movement state and non movement state???????????????
In response to Kaiochao
found out it was caused from old map/player saves.

I deleted my map/player saves and everything is fine. Nothing wrong with the code at all.