I have recently made a game called naruto recreated and i am currently adding clans etc i have come across a major problem that i cannot fix i have tried almost everything. I was wondering if anyone could help me out
Code1:
mob/Hidan
verb
bloodbind(mob/M in get_step(usr,usr.dir))
set category = "Jutsus"
set name = "blood bind"
usr.Handseals()
if(usr.firing) // If the mob's firing var is one...
usr << "You must wait before using this."
return
if(usr.AFK)
usr<<"You can't use this jutsu while being AFK."
usr<<"Preventing <B><font color= red>AFKing</B><font color=white>...</FONT>"
return
if(!usr.handseals)
return
if(usr.chakra<=2000)
usr<<"You do not have enough chakra to perform this"
return
if(usr==M)
return
else
usr.targeter = ""
view()<<"<B>[usr] <font color = green>Says: Hidan blood bind!"
view()<<"[usr] takes [M]'s blood."
M.move = 0
usr.move = 0
usr<<"You collected blood from [M]."
usr<<"You have 60 seconds before the blood becomes a waste"
M<<"[usr] collected blood from you."
usr.targeter = M
sleep(600)
if(usr.targeter==M)
usr.targeter = ""
usr<<"The blood is nolonger useful"
M<<"You are no longer in bloodbind"
return
Problem description:
The code above works fine well i think anyway i made the Hidan clan have a selfharm jutsu that like in the anime harms people binded to them
Code2:
mob/Hidan
verb
selfharm()
set category = "Jutsus"
set name = "selfharm"
usr.Handseals()
if(usr.firing) // If the mob's firing var is one...
usr << "You must wait before using this."
return
if(usr.AFK)
usr<<"You can't use this jutsu while being AFK."
usr<<"Preventing <B><font color= red>AFKing</B><font color=white>...</FONT>"
return
if(usr.health <= 2000)
usr<<"You dont have enough health!"
return
if(!usr.handseals)
return
else
for(var/mob/M in world)
if(usr.targeter==M)
usr.health -= 1000
var/damage = rand(1000,10000)
M.health -= damage
M.Death(usr)
usr<<"You gave [damage] damage to [M]."
M<<"You took [damage] froms [usr]'s bloodbind"
return
else
usr<<"You have not taken the blood of any one."
return
Problem description:
Everytime i use self harm it says "You have not taken the blood of anyone"
Is there a way to fix these two codes.
What i want is a system where a player(player1) signs a blood contract with another(player2) and once he does that player1 can then harm himself while harming the other. I have seen this in a few games the best being naruto GOA so i know it is possible
Thanks Rapmaster