ID:1891250
 
Code:
mob
proc
Shar_skill()
src.overlays += 'icons/player/Sharingan.dmi'
//usr.doujuses++
if(usr.doujuses>=100)
src<<"Your eyes burn and they form three black Comas in each eye."
src.Intride=1
if(src.doujuses>=200&&usr.mGen>=7500)
src.verbs+= new/mob/Jutsu/verb/KyoutenChiten()
src.techniques.Add(new /mob/Jutsu/verb/KyoutenChiten)
if(usr.doujuses>=100&&usr.mGen>=5000)
src.verbs+= new/mob/Jutsu/verb/MagenKasegui()
src.techniques.Add(new /mob/Jutsu/verb/MagenKasegui)
src.Mangekyou_Reqs_Check()
src.dodge+=20
src.overlays += /obj/Sharingan1
src.overlays += /obj/Sharingan2
sleep(20)
src.overlays -= /obj/Sharingan1
src.overlays -= /obj/Sharingan2
src.ChakraCheck()
else
src<<"You feel your eyes burn as you form the Sharingan!"
oview(src)<<"[src]: Sharingan!"
src.dodge+=8
if(src.doujuses<=10)
src.dodge+=2
src.overlays += /obj/OneCommaL
src.overlays += /obj/OneCommaR
sleep(10)
src.overlays -= /obj/OneCommaL
src.overlays -= /obj/OneCommaR
else if(src.doujuses<=25)
src.dodge+=4
src.overlays += /obj/OneCommaL
src.overlays += /obj/TwoCommaR
sleep(10)
src.overlays -= /obj/OneCommaL
src.overlays -= /obj/TwoCommaR
else if(usr.doujuses<=100)
src.dodge+=8
src.overlays += /obj/TwoCommaL
src.overlays += /obj/TwoCommaR
sleep(10)
src.overlays -= /obj/TwoCommaL
src.overlays -= /obj/TwoCommaR
src.ChakraCheck()
while(src.SharinganUse)
var/A=src.doujuses
if(A<1) A=1
if(A>100) A=100
var/ChakraDrain=(src.maxchakra/(A*15))
if(ChakraDrain>20)
ChakraDrain=20
if(ChakraDrain<5)
ChakraDrain=5
src.chakra-=ChakraDrain
if(prob(40))
src.doujuses+=1
src<< "<b>You sharingan begins to develop more"
if(A>=100)
src.<<"<b>You Have Fully Mastered The Sharingan"
sleep(25)


Problem description:
what i want it to do is while sharingan is on its masters the longer you keep it on however it saeems like it isnt working correctly?
It appears as if you didn't set src.SharinganUse anywhere.
In response to Vivalas
thats because i have it set where if oyu press the verb it sets you to SharinganUse = 1 so i assume putting if(src.SharinganUse) in the proc would work correct?
If you're calling the proc after setting SharinganUse to 1, sure.
seems it still wont work even after i put in the if(src.SahringanUse)
Is any other part of the procedure executing? Or is it only the code contained in the while block that isn't working?

As an aside, you really shouldn't use usr in a procedure. usr tends to not be what you want it to be.
In response to LordAndrew
only the code within the while block isnt working imma see if putting src.Shar_Skill() under the sleep(25) as for the usr thing i already changed it to src like it suppsoed to be inside a proc
In response to Daiguren Hyourinamru
It might help to show us where and how you're calling Char_skill().
In response to LordAndrew
mob/Jutsu/verb
sharingan3()
set category = "Doujutsu"
set name = "Sharingan"
if(usr.INHIJUTSU){usr<<"Cannot attack, You are locked into Mirrors!";return}
if(usr.INKAGE){usr<<"You are being binded by a strange force!";return}
if(usr.rest){usr<<"Not while resting!";return}
if(usr.DemonUse){src<<"You must revert before using this!";return}
if(usr.usedhero){src<<"You must revert from hero-water before using this!";return}
if(usr.kaimon){usr<<"You must revert from Gates before using This!";return}
if(usr.ByakuganUse){usr << "Your Byakugan is already activated!";return}
if(usr.Sharingancooldown){usr << "You just use Sharingan!";return}
if(!usr.SharinganUse)
if(usr.chakra<500)
usr<<"Alert You need at least 500 Chakra to Use this"
return
else
usr.Sharingancooldown = 1
usr.chakra-=500
usr.SharinganUse = 1
usr.verbs-= new/mob/Jutsu/verb/sharingan3()
usr.techniques.Remove(new /mob/Jutsu/verb/sharingan3)
usr.verbs+= new/mob/Jutsu/verb/sharingan4()
usr.techniques.Add(new /mob/Jutsu/verb/sharingan4)
spawn(1) usr.Shar_skill()
sleep(30)
usr.Sharingancooldown = 0


as stated before everything else works fine except for the code in the while block
If you could put some debug statements inside each clause in Shar_skill() to see what is and isn't executing it might help locate the problem.
umm how do i do that again?
mob
proc
Shar_skill()
src.overlays += 'icons/player/Sharingan.dmi'
//usr.doujuses++
if(usr.doujuses>=100)
src<<"Your eyes burn and they form three black Comas in each eye."
src.Intride=1
if(src.doujuses>=200&&usr.mGen>=7500)
src.verbs+= new/mob/Jutsu/verb/KyoutenChiten()
src.techniques.Add(new /mob/Jutsu/verb/KyoutenChiten)
if(usr.doujuses>=100&&usr.mGen>=5000)
src.verbs+= new/mob/Jutsu/verb/MagenKasegui()
src.techniques.Add(new /mob/Jutsu/verb/MagenKasegui)
src.Mangekyou_Reqs_Check()
src.dodge+=20
src.overlays += /obj/Sharingan1
src.overlays += /obj/Sharingan2
sleep(20)
src.overlays -= /obj/Sharingan1
src.overlays -= /obj/Sharingan2
src.ChakraCheck()
else
world << "DEBUG 1"
src<<"You feel your eyes burn as you form the Sharingan!"
oview(src)<<"[src]: Sharingan!"
src.dodge+=8
if(src.doujuses<=10)
src.dodge+=2
src.overlays += /obj/OneCommaL
src.overlays += /obj/OneCommaR
sleep(10)
src.overlays -= /obj/OneCommaL
src.overlays -= /obj/OneCommaR
else if(src.doujuses<=25)
src.dodge+=4
src.overlays += /obj/OneCommaL
src.overlays += /obj/TwoCommaR
sleep(10)
src.overlays -= /obj/OneCommaL
src.overlays -= /obj/TwoCommaR
else if(usr.doujuses<=100)
src.dodge+=8
src.overlays += /obj/TwoCommaL
src.overlays += /obj/TwoCommaR
sleep(10)
src.overlays -= /obj/TwoCommaL
src.overlays -= /obj/TwoCommaR
src.ChakraCheck()
while(src.SharinganUse)
world << "DEBUG 2"
var/A=src.doujuses
if(A<1) A=1
if(A>100) A=100
var/ChakraDrain=(src.maxchakra/(A*15))
if(ChakraDrain>20)
ChakraDrain=20
if(ChakraDrain<5)
ChakraDrain=5
src.chakra-=ChakraDrain
if(prob(40))
world << "DEBUG 3"
src.doujuses+=1
src<< "<b>You sharingan begins to develop more"
if(A>=100)
world << "DEBUG 4"
src.<<"<b>You Have Fully Mastered The Sharingan"
sleep(25)


Something like this, maybe.

Have you considered the possibility it might just take a long time to master?
you know i did but i`d assume prob 40 wouldnt take so long ..ill try raising the number a bit
In response to Vivalas
so okay debug 1 excecutes but 2-4 do not even after i raise3d the prob from 40-80
yeah i thinl ill be using goto since while dosent wanna register right
Daiguren Hyourinamru wrote:
so okay debug 1 excecutes but 2-4 do not even after i raise3d the prob from 40-80

while(src.SharinganUse)

I don't see SharinganUse anywhere in your code. If your second debug message isn't appearing, it's because SharinganUse is set to null or 0. Try setting SharinganUse to 1 within the proc.

Daiguren Hyourinamru wrote:
yeah i thinl ill be using goto since while dosent wanna register right

It works fine for me and several others. I wouldn't recommend you revert to using goto.
In response to Lige
but the evrb is what set it to 1 and the verb is calling the proc
k i figured out that issue is the src.ChakraCheck() right above the while block is whats locking it out
mob
proc
Shar_skill()
src.overlays += 'icons/player/Sharingan.dmi'
if(src.SharinganUse)
if(src.doujuses>=100&&usr.mGen>=7500)
src.verbs+= new/mob/Jutsu/verb/KyoutenChiten()
src.techniques.Add(new /mob/Jutsu/verb/KyoutenChiten)
if(src.doujuses>=100&&usr.mGen>=5000)
src.verbs+= new/mob/Jutsu/verb/MagenKasegui()
src.techniques.Add(new /mob/Jutsu/verb/MagenKasegui)
spawn(1) src.ChakraCheck()
if(src.doujuses<=10)
src.dodge+=2
src.overlays += /obj/OneCommaL
src.overlays += /obj/OneCommaR
world<< "DEBUG 1"
src<<"Your eyes burn and they form the sharingsn."
sleep(10)
src.overlays -= /obj/OneCommaL
src.overlays -= /obj/OneCommaR
if(src.doujuses<=25&&src.doujuses>10)
src.dodge+=4
src.overlays += /obj/OneCommaL
src.overlays += /obj/TwoCommaR
src<<"Your eyes burn and they form the sharingsn."
world<< "DEBUG 2"
sleep(10)
src.overlays -= /obj/OneCommaL
src.overlays -= /obj/TwoCommaR
if(src.doujuses<=99&&src.doujuses>25)
src.dodge+=6
src.overlays += /obj/TwoCommaL
src.overlays += /obj/TwoCommaR
src<<"Your eyes burn and they form the sharingsn."
world<< "DEBUG 3"
sleep(10)
src.overlays -= /obj/TwoCommaL
src.overlays -= /obj/TwoCommaR
if(src.doujuses>=100)
src<<"Your eyes burn and they form three black Comas in each eye."
src.dodge+=10
src.InrideUchiha=1
src.overlays += /obj/Sharingan1
src.overlays += /obj/Sharingan2
sleep(20)
src.overlays -= /obj/Sharingan1
src.overlays -= /obj/Sharingan2
spawn(1) src.Mangekyou_Reqs_Check()
while(src.SharinganUse)
world << "DEBUG 4"
var/A=src.doujuses
if(A<1) A=1
if(A>100) A=100
//var/ChakraDrain=(src.maxchakra/(A*15))
/*if(ChakraDrain>20)
ChakraDrain=20
if(ChakraDrain<5)
ChakraDrain=5
src.chakra-=ChakraDrain*/

if(prob(10))
src.doujuses++
src<<"<b>You sharingan begins to develop more"
if(src.chakra<=0)
src<<"You will no longer gain more mastery if your chakra is at 0!"
src.doujuses+=0
sleep(15)


im still getting the same issue with the while block sharinganuse is set to 1 when u clcik the verb can anyone please help?