Please could someone help and verify a way to do this?
Edit: This is a bad example, but what I'm really tryin to do is create a "farm" where it would gain wheat every second and when the user harvests the farm, the wheat of the farm is set to 0 and it starts again. The wheat then gets stored into "storage". Here is all I got so far
obj
farm
icon = 'icon.dmi'
icon_state = "farm"
var/wheat = 10
Click()
switch(alert("would you like to harvest your field?",,"Yes","No"))
if("Yes")
usr << "You have harvested your field"
..........
if("No")
usr << "You choose not to harvest"