mob
verb
Attack(mob/M as mob in oview(1))
set category = "Taijutsu"
if (usr.resting==1)
usr << "Not while resting"
else
icon = 'players.dmi'
icon_state = "Attac"
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
sleep(5)
icon = 'players.dmi'
icon_state = "guy"
var/damage = rand(1,10) + usr.taijutsu
view(6) << "[damage] damage!"
M:hp -= damage
M:Deathcheck()
proc
Deathcheck()
if(istype(src,/mob/clone))
del(src)
for(var/mob/M in world)
if(M == src.ownedby)
M.clones -= 1
del(src)
else if (hp <= 0)
world << "[src] dies!"
if(usr.village=="Leaf")
src.loc = locate (41,46,1)
if(usr.village=="Rain")
src.loc = locate (41,46,9)
if(usr.village=="Sand")
src.loc = locate (41,46,5)
if(usr.village=="Waterfall")
src.loc= locate (41,46,4)
if(usr.village=="Grass")
src.loc = locate (41,46,3)
if(usr.village=="Rock")
src.loc = locate (41,46,6)
if(usr.village=="Cloud")
src.loc = locate (41,46,7)
if(usr.village=="Sound")
src.loc = locate (41,46,8)
if(usr.village=="Mist")
src.loc= locate (41,46,2)
src.hp=usr.maxhp
src.Chakra=usr.maxChakra
src.stamina=usr.stamina
---------------------------
turf
trainwater
icon='scenery.dmi'
icon_state="waterfall01"
Entered(mob/M)
if(!M.client||!ismob(M))return 0//only if 'M' is a mob and client (incase).. note that usr is not used here do to user abuse potentials... I think >.>
M.inwaterfall=1
M.waterfall()
Exited(mob/M)
if(M.inwaterfall) M.inwaterfall=0
mob/proc/waterfall()
set background = 1
while(src.inwaterfall)//while this var is true
src.hp-=2
src.Deathcheck()
src.maxhp+=2
src<<"You gain some Max Hp and lose some HP."
sleep(20)
mob/var/inwaterfall = 0
---------------------------
obj/Naruto_Hair
name = "Naruto Hair"
icon = 'NHair.dmi'
icon_state = "guy"
worn = 0
verb
Wear()
if(src.worn == 1)
src.worn = 0
usr.overlays -= 'NHair.dmi'
usr << "You remove the [src.name]."
else
src.worn = 1
usr.overlays += 'hair(1).dmi'
usr << "You wear the [src.name]."
Drop()
if(src.worn == 1)
usr << "Not while its being worn."
if(src.worn == 0)
src.loc=locate(usr.x,usr.y+1,usr.z)
Get()
set src in oview(1)
Move(usr)
mob
melp
Barber
icon = 'NPC.dmi'
icon_state = "clothes dealer"
npc = 1
hp = 99999999999999999999999999999999999999999999999999999999999999999999999
verb
Hair()
set src in oview(2)
set category = "Commands"
switch(input("Hey! What hair do you want?", "Barber") in list ("Naruto","Sasuke","Shikamaru","Long","Shaved","Rock Lee","Spikey"))
if("Naruto")
usr << "<b>You get Naruto Hair!"
usr.contents += new/obj/Naruto_Hair(usr)
Problem description:For the first one when you get killed for some odd reason you dont get sent to those locations if your that village. For the second one your able to Rest while on the waterfall which makes you never die while training. And The third one doesnt even show up when you Equip the item. I know this is alot to ask for help about but do you think you could give me a hand?
Usr is no good in processes, that could be your problem. Every single village check is usr.
I also saw alot of checks like this:
Hope that helps you out some.
-Edit-
And as far as Resting in the waterfall, you should have a check in your Rest verb, or process, however you do it, that checks to see if the mob is in the waterfall. I notice you already have a mob variable for being in the waterfall, so that should be simple.
-Edit2-
About your hair not showing up, I'm not sure if an icon can be added directly as an overlay like that. I've always done it something like this:
Of course there might be (and probably is) a better way to do it, but it's worked for me so far.