mob
Click()
if(istype(src,/mob/shopkeeper))return //check if it's a shopkeeper
else if(istype(src,/mob))//make sure it is a mob
if(usr==src)//if it is and its you
if(src.veh)//and your in a vehicle
if(usr.car)//thats a car
var/obj/v=text2path("/obj/vehicles/cars/[usr.veh]")
var/obj/C=new v
C.dir=usr.dir
C.loc=usr.loc
C.icon_state=usr.vehi
usr.icon='pc.dmi'
usr.icon_state=""
usr.veh=null
usr.vehi=null
usr.car=0
else if(usr.boat)//if not a car than a boat
var/obj/v=text2path("/obj/vehicles/boats/[usr.veh]")
var/obj/C=new v
C.dir=usr.dir
C.loc=usr.loc
C.icon_state=usr.vehi
usr.icon='pc.dmi'
usr.icon_state=""
usr.veh=null
usr.vehi=null
usr.boat=0
else//if you arn't in a vehicle
return
else//if its not you
if(!src.veh)//and they arn't in a vehicle
if(usr.wept=="Gun")//if your weapon is a gun
if(src in oview(1))//if they are next to you bash them in the head(Woo hoo!)
var/dmg = round((usr.att+usr.weppwr)-(src.aura))
if(dmg<=0)
s_damage(src,0,"red")
src << "[usr] bashes you in the head with his [usr.weapon] for 0!!"
usr<<"You bash [src] in the head with your [usr.weapon] for 0!!"
else
src.hp -= dmg
s_damage(src,dmg,"red")
src << "[usr] bashes you in the head with his [usr.weapon] for[dmg]!!"
usr<<"You bash [src] in the head with your [usr.weapon] for [dmg]!!"
dcheck(src,usr)
else//if they arn't next to you shoot them
if(!usr.fired)
if(usr.ammo)
var/obj/H=text2path("/obj/wep/gun/Bullet/[usr.weapon]")
fire(usr,src,H)
usr.ammo-=1
usr.fired=1
sleep("[usr.frate]")
usr.fired=0
else
usr<<"Your Out Of Ammo......"
else//if you are not carrying a gun hit them
if(src in oview(1))
var/dmg = round((usr.att+usr.weppwr)-(src.aura))
if(dmg<=0)
s_damage(src,0,"red")
src << "[usr] attacks you for 0!!"
usr<<"You attack [src] for 0!!"
else
src.hp -= dmg
s_damage(src,dmg,"red")
src << "[usr] attacks you for[dmg]!!"
usr<<"You attack [src] for [dmg]!!"
dcheck(src,usr)
PS.I'm not sure if this is the right forum so if it isn't don't say anything.
-Exophus