ID:164194
 
I coded in a desk where you learn skills while using the desk, this is the code:

Desk
icon = 'gymobj.dmi'
icon_state = "desk"
density = 1
verb
Research_Alchemy()
set src in view(1)
set category = "Research"
alert("Which technique do you want to learn?","Research","Alchemic Boost","Ground Fist","None")



if("Alchemic Boost")
if(usr.doing >= 1)
usr << "You are already doing something!"
return..()
if(usr.alchemyboostm >= 1)
usr << "You have already learned Alchemic Boost"
return..()
if(usr.level <= 4)
usr << "You have to be level 5 or higher to learn this."
return..()
if(usr.alchemyboostm <= 0 && usr.level >= 5)
usr << "You start to research Alchemic Boost"
usr.doing = 1
usr.canmove = 0
usr.icon_state = "reading"
sleep(3000)
usr.verbs += new/mob/learn/verb/Alchemic_Boost
usr.alchemyboostm = 1
usr.doing = 0
usr.canmove = 1
usr.icon_state = ""
usr << "<center><font color = white>----- You have learned Alchemic Boost -----"
return..()

if("Ground Fist")
if(usr.doing >= 1)
usr << "You are already doing something!"
return.()
if(usr.fistm >= 1)
usr << "You have already learned Ground Fist"
return..()
if(usr.level <= 9)
usr << "You must be level 10 or higher to learn this."
return..()
if(usr.fistm <= 0 && usr.level >= 10)
usr << "You start researching Ground Fist"
usr.doing = 1
usr.canmove = 0
usr.icon_state = "reading"
sleep(6000)
usr.verbs += new/mob/learn/verb/Ground_Fist
usr.fistm = 1
usr.doing = 0
usr.canmove = 1
usr.icon_state = ""
usr << "<center><font color = white>----- You have learned Ground Fist -----"
return..()
if("None")
return..()

When you try using the desk, if you've learned Alchmic Boost already, and you try clicking Ground Fist, it does the "You have already learned Alchemic boost" and doesnt do anything. If anyone knows what causes this please tell me. Also, if you can tell me how to put the options in a list rather then an alert, that'd be appreciated too. =P
bump
In response to Maza
Please don't bump a post until 24 hours have passed and it's off the front page.