ID:264476
 
mob/var/Ttime=0
mob/var/performedf=0
mob/var/performedw=0
mob/var/performedwi=0
mob/var/performedl=0
mob/var/performedi=0
mob/verb/Elementtraining()
set name= "Element Training"
if(!Ttime)
switch(alert("which element would you like to focus on?","Choose Element","Fire","Water","Lightning","Wind"))
if("Fire")
if("Fire" in src.Elements)
src<<"You begin focusing on the Fire element"
src.emasteryfire=1
if(src.performedf==1)
if(prob(18.4))
src<<"You feel more knowledge of the Fire element flow through you!"
src.masteryf+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Fire element!"
src.masteryf+=2
if(prob(53.7))
src<<"You gained no new knowledge"
if("Water")
if("Water" in src.Elements)
src<<"You begin focusing on the Water element"
src.emasterywater=1
if(src.performedw==1)
if(prob(18.4))
src<<"You feel more knowledge of the Water element flow through you!"
src.masteryw+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Water element!"
src.masteryw+=2
if(prob(53.7))
src<<"You gained no new knowledge"
if("Wind")
if("Wind" in src.Elements)
src<<"You begin focusing on the Wind element"
src.emasterywind=1
if(src.performedwi==1)
if(prob(18.4))
src<<"You feel more knowledge of the Wind element flow through you!"
src.masterywi+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Wind element!"
src.masterywi+=2
if(prob(53.7)) src<<"You gained no new knowledge"
if("Lightning")
if("Lightning" in src.Elements)
src<<"You begin focusing on the Lightning element"
src.emasterylightning=1
if(src.performedl==1)
if(prob(18.4))
src<<"You feel more knowledge of the Lightning element flow through you!"
src.masteryl+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Lighnting element!"
src.masteryl+=2
if(prob(53.7))
src<<"You gained no new knowledge"
if("Ice")
if("Ice" in src.Elements)
src<<"You begin focusing on the Ice element"
src.emasteryice=1
if(src.performedi==1)
if(prob(18.4))
src<<"You feel more knowledge of the Ice element flow through you!"
src.masteryi+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Ice element!"
src.masteryi+=2
if(prob(53.7))
src<<"You gained no new knowledge"
else
src<<"You Stop all training"
src.Ttime=0


src<<"You feel more knowledge of the Fire element flow through you!"
src.masteryf+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Fire element!"
src.masteryf+=2
if(prob(53.7))
src<<"You gained no new knowledge"
if("Water")
if("Water" in src.Elements)
src<<"You begin focusing on the Water element"
src.emasterywater=1
if(src.performedw==1)
if(prob(18.4))
src<<"You feel more knowledge of the Water element flow through you!"
src.masteryw+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Water element!"
src.masteryw+=2
if(prob(53.7))
src<<"You gained no new knowledge"
if("Wind")
if("Wind" in src.Elements)
src<<"You begin focusing on the Wind element"
src.emasterywind=1
if(src.performedwi==1)
if(prob(18.4))
src<<"You feel more knowledge of the Wind element flow through you!"
src.masterywi+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Wind element!"
src.masterywi+=2
if(prob(53.7)) src<<"You gained no new knowledge"
if("Lightning")
if("Lightning" in src.Elements)
src<<"You begin focusing on the Lightning element"
src.emasterylightning=1
if(src.performedl==1)
if(prob(18.4))
src<<"You feel more knowledge of the Lightning element flow through you!"
src.masteryl+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Lighnting element!"
src.masteryl+=2
if(prob(53.7))
src<<"You gained no new knowledge"
if("Ice")
if("Ice" in src.Elements)
src<<"You begin focusing on the Ice element"
src.emasteryice=1
if(src.performedi==1)
if(prob(18.4))
src<<"You feel more knowledge of the Ice element flow through you!"
src.masteryi+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Ice element!"
src.masteryi+=2
if(prob(53.7))
src<<"You gained no new knowledge"
else
src<<"You Stop all training"
src.Ttime=0


Problem description:
as you can see im trying to distribute element mastery points to players however it wont seem to work right it wont give me anything for using a water jutsu even thoguh i defined preformedw in the jutsu as well. is it this code a little help would be appreciated
mob
var
training //All those vars are NOT needed
verb
ElementTraining()
set name="Element Training"
if(training) return //if your training, don't do anything
else
src.training=1
switch(input("Which element do you want to train?") in list ("Fire","Water","Wind","Earth","Lightning"))
if("Fire" && "Fire" in src.Elements) //if you picked fire AND it's in your elements
src<<"You start training the fire element"
if(prob(18.4))
src<<"You feel more knowledge of the Fire element flow through you!"
src.masteryf+=1
if(prob(27.9))
src<<"You gain a LOT more knowledge of the Fire element!"
src.masteryf+=2
if(prob(53.7))
src<<"You gained no new knowledge"
//and so on
src.training=0 //after it's done, stop the training var

That should work for you. Fixed incorrect stuff.