ID:271655
 
mob/shikai
verb
Shikai()
set category = "Combat"
if(usr.shikaiactive == 0)
if(usr.shikaivar == 1)
usr.reiatsu *= 7
usr.shikaitype = ("Ashisogi Jizou")
usr.overlays += src.AshisogiJizou
usr.overlays -= src.shinihilt
shikaiactive = 1
usr.shikaivarcheck()
range(10) <<"<I><font color=red><b>[src.name]</b></font>: <B><font color=red><I>[usr.zanpaktoucall] [usr.zanpaktou]!"

else
if(usr.shikaivar == 1)
usr.overlays += src.shinihilt
usr.overlays -= src.AshisogiJizou
usr.HP = usr.maxHP
usr.stamina = src.maxstamina
usr.reiatsu = src.maxreiatsu
usr.swordpower = src.maxswordpower
usr.strength = src.maxstrength
range(10) <<"<I><font color=red><b>[src.name]</b></font>: <B><font color=red><I>Lets his/her [usr.zanpaktou] power down!"




Well the code works fine, when you active it, it removes the current Zanpakto icon but when you de-activate it, it adds the Zanpakto icon again but does nothing to remove the shikai overlay. Can someone please tell me how to fix, and how to avoid these kinds of problems. Also, i apologize im asking so many questions just trying to learn.
it should have worked..try it like this:
mob/shikai
verb
Shikai()
set category = "Combat"
if(!usr.shikaiactive)
if(usr.shikaivar)
usr.reiatsu *= 7
usr.shikaitype = ("Ashisogi Jizou")
usr.overlays += src.AshisogiJizou
usr.overlays -= src.shinihilt
shikaiactive = 1
usr.shikaivarcheck()
range(10) <<"<I><font color=red><b>[src.name]</b></font>: <B><font color=red><I>[usr.zanpaktoucall] [usr.zanpaktou]!"

else
if(usr.shikaivar)
usr.overlays += src.shinihilt
usr.overlays -= src.AshisogiJizou
usr.overlays -= src.AshisogiJizou
usr.HP = usr.maxHP
usr.stamina = src.maxstamina
usr.reiatsu = src.maxreiatsu
usr.swordpower = src.maxswordpower
usr.strength = src.maxstrength
range(10) <<"<I><font color=red><b>[src.name]</b></font>: <B><font color=red><I>Lets his/her [usr.zanpaktou] power down!"
In response to RakuTakira
Thank you so much, it worked perfectly. Though can you please explain why that worked just added the same line twice doesn't seem like it would make a difference. I'm just trying to learn so i don't make future mistakes.
In response to Blagh Nabbit
I dunno..I edited a few other things to make that code more efficient too XD

I guess, sometimes overlays don't remove the first time, so that just removed it again. It should have worked the first time, and it's less code if you don't have it twice..but I dunno XD
In response to RakuTakira
It wouldnt work with one of the remove overlay code because the Bleach Revolution source has that bug. Thats what ya get for using a source from another person, cant find your way around it.
In response to Scizzees
I agree all the way.