mob
verb
Henge_No_Jutsu(mob/M in view(usr))
set category = "Genjutsu"
if(src.resting == 1)
src << "You are resting"
return
if(src.Chakra <= 9)
src << "You are out of chakra"
if(src.CControl == 101)
var/CCusage = rand(9,11)
if(CCusage <=9)
view(usr) << "[usr] says, Henge No Jutsu"
src << "[CCusage]/10 Chakra Converted"
src.Chakra -= CCusage
return
if(CCusage >=10)
view(usr) << "[usr] says, Henge No Jutsu"
src << "[CCusage]/10 Chakra Converted"
src.Chakra -= CCusage
src.icon = M.icon
src.exp += rand(100,500)
if(src.exp >= src.maxexp)
Levelup()
return
if(src.CControl >= 130)
var/CCusage = rand(7,11)
if(CCusage <=9)
view(usr) << "[usr] says, Henge No Jutsu"
src << "[CCusage]/10 Chakra Converted"
src.Chakra -= CCusage
return
if(CCusage >= 10)
view(usr) << "[usr] says, Henge No Jutsu"
src << "[CCusage]/10 Chakra Converted"
src.Chakra -= CCusage
src.icon = M.icon
src.exp += rand(100,500)
if(src.exp >= src.maxexp)
src.Levelup()
if(src.CControl <=100)
view(usr) << "[usr] says, Henge No Jutsu"
src << "10/10 Chakra Converted"
src.Chakra -= 10
Okay when I do Henge No jutsu my usrs icon disapears when I want it to look like M icon and I want usr to look like M for 1 minute.
savedicon
mob
verb
Henge_No_Jutsu(var/mob/M in oview)
set category = "Genjutsu"
if(usr.resting == 1)
usr << "You are resting"
return
if(usr.Chakra <= 9)
usr << "You are out of chakra"
return
if(usr.CControl == 101)
var/CCusage = rand(9,11)
if(CCusage <=9)
oview << "[usr] says, Henge No Jutsu"
usr << "[CCusage]/10 Chakra Converted"
usr.Chakra -= CCusage
return
if(CCusage >=10)
oview << "[usr] says, Henge No Jutsu"
usr << "[CCusage]/10 Chakra Converted"
usr.Chakra -= CCusage
usr.icon = usr.savedicon
usr.icon = M.icon
spawn(600)
usr.icon = usr.savedicon
usr.exp += rand(100,500)
if(usr.exp >= usr.maxexp)
usr.Levelup()
return
if(usr.CControl >= 130)
var/CCusage = rand(7,11)
if(CCusage <=9)
view << "[usr] says, Henge No Jutsu"
usr << "[CCusage]/10 Chakra Converted"
usr.Chakra -= CCusage
return
if(CCusage >= 10)
view << "[usr] says, Henge No Jutsu"
usr << "[CCusage]/10 Chakra Converted"
usr.Chakra -= CCusage
usr.icon = usr.savedicon
usr.icon = M.icon
spawn(600)
usr.icon = usr.savedicon
usr.exp += rand(100,500)
if(usr.exp >= usr.maxexp)
usr.Levelup()
if(usr.CControl <=100)
view << "[usr] says, Henge No Jutsu"
usr << "10/10 Chakra Converted"
usr.Chakra -= 10
Ok, I rewrote it a bit... The main things I changed were changing src to usr, since it helps relieve the code if you use usr to define the person using the verb. Also I added a tmp var to save people icons and then change it back.
-PowerMagic4
P.S. if you need to contact me about anything else, just msg me on msn, [email protected]