ID:141242
 
Code:
mob/var/SP = 0
mob/var/maxSP = 0
mob/var/ESP = 0

mob
spirit
Eldstar
name = "Eldstar"
icon = 'npc.dmi'
icon_state = "star1"
verb
Talk()
set src in oview(1)
set category = "Star Spirit"
alert("I sense much good in you...")
switch(input("Do you wish to learn Replenish?",text) in list ("Yes","No","Offers"))
if("Yes")
src << output("<b><font color=yellow>You learned Replenish.","Combat")
verbs+=new/mob/proc/Rep
SP+=15
maxSP+=15
ESP = 1
if("No")
alert("I respect your wishes.")
if("Offers")
alert("You gain 10 Star Points and learn the technique Replenish.")
if (usr.ESP == 1)
alert("You have already been given my power.")
return
..()


Problem description: Well, if you select "Yes", it turns your ESP to 1 and nothing else. Also how it says, "have already been given my power.", it'll say that after you press, Yes, No or Offers, it should only happen after you say yes, and the next time you talk to him.

mob/var/SP = 0
mob/var/maxSP = 0
mob/var/ESP = 0

mob
spirit
Eldstar
name = "Eldstar"
icon = 'npc.dmi'
icon_state = "star1"
verb
Talk()
set src in oview(1)
set category = "Star Spirit"
alert(usr,"I sense much good in you...")
switch(input(usr,"Do you wish to learn Replenish?",text) in list ("Yes","No","Offers"))
if("Yes")
usr << output("<b><font color=yellow>You learned Replenish.","Combat")
usr.verbs+=new/mob/proc/Rep
usr.SP+=15
usr.maxSP+=15
usr.ESP = 1
if("No")
alert(usr,"I respect your wishes.")
if("Offers")
alert(usr,"You gain 10 Star Points and learn the technique Replenish.")
if (usr.ESP == 1)
alert(usr,"You have already been given my power.")
return
..()
In response to Ssj4justdale
src << "<b><font color=yellow>You learned Replenish." //dunno why this was output?
usr.verbs+=new/mob/verb/Rep //should be a verb not a proc