Not sure if this is most efficient o.O in Developer Help
|
|
mob/TaiSpec/verb CelestialGates() set category = "Taijutsu" set name = "Chakra Gates" switch(CelestialGates) if(0) CelestialGates = 1 view()<<"<b><font color=silver>[usr]:</font></b> <font color=#8fbc8f>Gate of Opening! Release!" Taijutsu = round(Taijutsu*(TaiMas+CelGat),1) while(CelestialGates == 1) Health -= 5 Death(usr) if(CelestialGates != 1) break sleep(TaiMas*10) if(1) CelestialGates = 2 view()<<"<b><font color=silver>[usr]:</font></b> <font color=#8fbc8f>Gate of Rest! Release!" Taijutsu = round(Taijutsu*(TaiMas+CelGat+0.5),1) while(CelestialGates == 2) Health -= 25 if(CelestialGates != 2) break sleep(TaiMas*10) if(2) CelestialGates = 3 view()<<"<b><font color=silver>[usr]:</font></b> <font color=#8fbc8f>Gate of Life! Release!" Taijutsu = round(Taijutsu*(TaiMas+CelGat+1),1) while(CelestialGates == 3) Health -= 125 if(CelestialGates != 3) break sleep(TaiMas*10) if(3) CelestialGates = 4 view()<<"<b><font color=silver>[usr]:</font></b> <font color=#8fbc8f>Gate of Pain! Release!" Taijutsu = round(Taijutsu*(TaiMas+CelGat+1.5),1) while(CelestialGates == 4) Health -= 625 if(CelestialGates != 4) break sleep(TaiMas*10) if(4) CelestialGates = 5 view()<<"<b><font color=silver>[usr]:</font></b> <font color=#8fbc8f>Gate of Limit! Release!" Taijutsu = round(Taijutsu*(TaiMas+CelGat+2),1) while(CelestialGates == 5) Health -= 3125 if(CelestialGates != 5) break sleep(TaiMas*10) if(5) CelestialGates = 6 view()<<"<b><font color=silver>[usr]:</font></b> <font color=#8fbc8f>Gate of View! Release!" Taijutsu = round(Taijutsu*(TaiMas+CelGat+2.5),1) while(CelestialGates == 6) Health -= 15625 if(CelestialGates != 6) break sleep(TaiMas*10) if(6) CelestialGates = 7 view()<<"<b><font color=silver>[usr]:</font></b> <font color=#8fbc8f>Gate of Wonder! Release!" Taijutsu = round(Taijutsu*(TaiMas+CelGat+3),1) while(CelestialGates == 7) Health -= 78125 if(CelestialGates != 7) break sleep(TaiMas*10) if(7) CelestialGates = 8 view()<<"<b><font color=silver>[usr]:</font></b> <font color=#8fbc8f>Gate of Death! Release!" Taijutsu = round(Taijutsu*(TaiMas+CelGat+3.5),1) while(CelestialGates == 8) Health -= 390625 if(CelestialGates != 8) break sleep(TaiMas*10)
|
|
Obviously, you would still need to output the correct message depending on the variable CelestialGates. But other than that, there is really no reason you would need to copy and paste the same piece of code (with minor edits) 8 times.
If the limit to CelestialGates is 8 then obviously you'd need to prevent it from raising above 8 as well.