ID:150020
 
Can anybody give me a sample code to make it where the player can only use certain verbs when they are a certain icon. Let me explain more. I have a verb that changes the mobs icon. I want it so that it can only choose the verb talk() when it is the regular icon and the verb attack()when it is the new icon.
mob/Login()
src.verbs += /mob/proc/Talk()

mob/icon = 'talker.dmi'

mob/verb/Transform()
src << "You transformed!"
src.icon = 'kill em.dmi'
src.verbs -= /mob/proc/Talk()
src.verbs += /mob/proc/Attack()

mob/proc/Talk()
Talk stuff here

mob/proc/Attack()
Attack stuff here

That's one of the simplest ways of doing it. There's probably a better way, though.
In response to WizDragon
thanks, that worked perfectly. By the time I checked this forum I had developed a way but it was weird and I didn't like it. This works great though! thanks.