Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. /obj/item/clothing/head/oddjob
  2. name = "bladed hat"
  3. desc = "Looking sharp."
  4. icon_state = "oddjob"
  5. item_state = "oddjob"
  6. hitsound = 'sound/weapons/genhit1.ogg'
  7. var/active = 0
  8. throw_return = 1
  9. throw_speed = 1
  10.  
  11. attack_self (mob/user as mob)
  12. src.active = !( src.active )
  13. if (src.active)
  14. boutput(user, "<span style=\"color:blue\">Blades extend from the brim.</span>")
  15. hit_type = DAMAGE_CUT
  16. hitsound = 'sound/weapons/slashcut.ogg'
  17. src.force = 30
  18. src.icon_state = "oddjob1"
  19. src.item_state = "oddjob1"
  20. else
  21. boutput(user, "<span style=\"color:blue\">The blades retract.</span>")
  22. hit_type = DAMAGE_BLUNT
  23. hitsound = 'sound/weapons/genhit1.ogg'
  24. src.force = 1
  25. src.icon_state = "oddjob"
  26. src.item_state = "oddjob"
  27. user.update_inhands()
  28. src.add_fingerprint(user)
  29. return
  30.  
  31. throw_impact(atom/hit_atom)
  32. ..(hit_atom)
  33. if (src.active)
  34. if(ismob(hit_atom))
  35. var/mob/M = hit_atom
  36. if(ishuman(M))
  37. playsound(src.loc, "sound/weapons/slashcut.ogg", 60, 1)
  38. var/mob/living/carbon/T = M
  39. T.stunned = max(2, T.stunned)
  40. T.TakeDamage("chest", 30, 0)
  41. take_bleeding_damage(T, null, 15, DAMAGE_CUT)
  42. src.active = !( src.active )
  43. hit_type = DAMAGE_BLUNT
  44. hitsound = 'sound/weapons/genhit1.ogg'
  45. src.force = 1
  46. src.icon_state = "oddjob"
  47. src.item_state = "oddjob"
  48. /*else
  49. if(hit_atom == usr) // THIS WON'T WORK AAAAAAAAAAAAA
  50. var/mob/living/carbon/human/user = usr
  51. src.attack_hand(usr)
  52. user.visible_message("<span style=\"color:blue\">[user] cleanly catches the hat.</span>")
  53. src.add_fingerprint(user) */
  54. return
  55. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement