ID:179662
 
mob/Billy
Click()switch(alert("Would you like to be able to become a pizza?")in list("Yes","No"))

I want to be able to make it where if you press yes it adds the verb that changes you to a pizza. If you can help finish this please respond.


~PyRoMaNiAc~
Well you're on the right track so I'll help ya' a bit.

mob
Billy
icon='blah.dmi'
Click()
switch(alert("Do you want to be a pizza?",,"Yes","No"))
if("Yes")//Since the alert is switched you can use an if statement
usr.icon='Pizza.dmi'
if("No")
usr<<"Then why did you click me?!"
In response to Nadrew
Thank you.
In response to PyRoMaNiAc
I am trying to make it add a verb to the player verb list, I tried something like this..


mob
Billy
icon='billy.dmi'
Click()
switch(alert("Do you want to be a pizza?",,"Yes","No"))
if("Yes")//Since the alert is switched you can use an if statement
mob/verb/turn_into_pizza
name = "[usr]"
desc = "Mmmmpizza"
icon = 'pizza.dmi'
if("No")
usr<<"Then why did you click me?!"

But it does not do anything but make me a pizza.


PyRoMaNiAc
In response to PyRoMaNiAc
I don't see where you added the pizza verb.
In response to PyRoMaNiAc
the syntax for adding a verb is

usr.verbs += /mob/verb/something

an example

mob
verb_holder
verb
pizza()
src << "You are a pizza!"

mob
verb
test()
src.verbs += /mob/verb_holder/verb/pizza

world
mob = /mob

try that out!

FIREking