mob
NPC
icon='npc.dmi'
density=1
bp=100
maxbp=100
npc=1
proc/walkit()
while(src)
if(src.canmove)
step_rand(src)
sleep(rand(10,50))
Click()
if(src in oview(1))
var/dirr = get_dir(src,usr)
var/minutesleft = round(usr.deadtime/60,0.1)
src.dir=dirr
flick("talk",src)
src.canmove=0
spawn(20)
src.canmove=1
usr<<"1"
if(!usr.dead)
switch(usr.tm_option(null,"Hello, [usr]! Would you like me to send you to back to earth? You can stay for a while if you want.","","[src]","300x300",list("Send Me Back","Stay Here"),"select list"))
if("1")
var/xx=rand(63,64)
var/yy=rand(76,78)
usr.loc=locate(xx,yy,2)
else if(!usr.deadtime && usr.gotem && usr.hitem)
usr<<"2"
switch(usr.tm_option(null,"Hello, [usr]! I can revive you if you want; Or you can stay for a while. Which will it be?","","[src]","300x300",list("Send Me Back","Stay Here"),"select list"))
if("1")
usr.krevivee()
else
usr<<"3"
switch(usr.tm_option(null,"Hello, [usr]! You have [minutesleft] Minutes left until I can revive you. Would you like to do some training in the mean time?","Training","[src]","300x300",list("Sure","No Thanks"),"select list"))
if("1")
if(usr.gotem && usr.hitem)
usr<<output("You've already completed my training. Come back in [minutesleft] Minutes.","info")
else if(!usr.gotem)
switch(usr.tm_option(null,"Go catch my friend and come back when you're done.. Hehehe!","Training","[src]","300x300",list("Okay"),"select list"))
if("1")
usr.strain=1
else if(usr.gotem && !usr.hitem)
switch(usr.tm_option(null,"Go hit my friend over the head with this mallet and come back when you're done. He'll be fine. Hehehe!","Training","[src]","300x300",list("Okay"),"select list"))
if("1")
usr.hitem=0
usr.strain=0
mob
var
tm_answer=0
tm_inmenu=0
proc
tm_option(timer=0,message="",title="",window="",windowsize="300x300",list/L,wtype)
src.tm_inmenu=1
switch(wtype)
if("select list")
var/html="<html><head><title>[title]</title><STYLE>BODY {background: [BGCOLORWINDOW];color: [TEXTCOLORWINDOW];font: 10pt 'Tahoma',sans-serif}BIG IMG.icon {width: 32px;height: 32px}a:link, a:visited {color: [LINKCOLORWINDOW];text-decoration: none;}a:hover {color: [HOVERLINKCOLORWINDOW];}</STYLE></head>"
if(message)
html+="<font size=3><font color=[MESSAGECOLORWINDOW]>[message]</font color><br><br><center>"
for(var/i=1,i<=length(L),i++)
var/n=L[i]
if(n)html+="<a href=?src=\ref[src];i=[i]>[n]</a><br>"
src<<browse(html,"window=[window];display=1;clear=0;size=[windowsize];border=0;can_close=0; can_resize=1;can_minimize=0;titlebar=1")
var/A = src.tm_wait(timer,window)
return A
Problem description:
Hello. I was wondering if someone wouldn't mind helping me with this. For some reason, the tm_option() procs aren't working.. Once I click the NPC, it says "1", "2" and "3" (As I had it setup to try to figure out the problem. It worked before and I haven't changed anything and it does this for muliple NPCs. Thank you very much to anyone who can help.