obj
itsabomb
name = "ITS A BOMB!"
icon = 'bomb.dmi'
icon_state = "time"
verb // badass identation from here on? fixed it.
setdahbomb()
if(usr.client == 1) // only done this coz i havent got the variable yet....
usr<<"Bomb will explode in 5"
sleep(10)
usr<<"Bomb will explode in 4"
sleep(10)
usr<<"Bomb will explode in 3"
sleep(10)
usr<<"Bomb will explode in 2"
sleep(10)
usr<<"Bomb will explode in 1"
sleep(10)
usr<<"*click*"
Explode(new /Effect/BasicBoom(usr.loc,1,2))
for(var/mob/M in oview(5))
M.hp -= 100
pick_up()
src.loc = usr.contents
Problem description:
object does nothing when right clicked, overall no verb appears and no random sh***ess tab
Even after you fix that though your verb won't do anything, because client never equals 1*. It equals a /client object... all you need to do to check if a client exists is simply check if the value is true, not compare it to a specific one. Also, you should really use a loop for the explosion timer rather than repeating code. Read: repeating code is bad.
*: And you should definitely not make a custom variable for identifying whether a specific mob is a player or not. It's highly unneeded.
Lastly, your pick_up() verb (which, by the way, should be defined on a common parent type, and not copied under every item in your game) won't work properly either, because contents is not a valid location. Locations are atoms. contents is a list. I went into some detail of this in [link], but basically what you need to do here is simply use usr as the location - src.loc = usr means "set the item's location to the player", ie put it in the player, which is what you want. Note that instead of setting loc it is better to use the Move() proc.