mob/verb
Instant_Message()
var/varPeople = list()
for(var/mob/T in world)
if(T.key)
varPeople += T
var/mob/M=input("Who would you like to whisper to?","") in varPeople +list("Cancel")
if(M=="Cancel")
return
else
var/msg=input("") as text
if(winget(M,"[usr][M]","id")||winget(usr,"[usr][M]","id"))
winclone(M, "Messager","[usr][M]")
winclone(usr, "Messager","[usr][M]")
M << output("\blue([usr.Nation])</FONT>--[usr.name]: [html_encode(msg)]", "[usr][M].IMout")
usr << output("\blue([usr.Nation])</FONT>--[usr.name]: [html_encode(msg)]", "[usr][M].IMout")
winshow(M, "[usr][M]",1)
winshow(usr, "[usr][M]",1)
usr.sender=M
M.sender=usr
else
winclone(M, "Messager","[M][usr]")
winclone(usr, "Messager","[M][usr]")
M << output("\blue([usr.Nation])</FONT>--[usr.name]: [html_encode(msg)]", "[M][usr].IMout")
usr << output("\blue([usr.Nation])</FONT>--[usr.name]: [html_encode(msg)]", "[M][usr].IMout")
winshow(M, "[M][usr]",1)
winshow(usr, "[M][usr]",1)
usr.sender=M
M.sender=usr
Right now im using this for the verb in the input on the windows but it requires me to assign sender variables and you can only talk to one person and if someone else sends a message you get auto set to that person.
send(msg as text)
set hidden=1
if(usr.sender)
var/mob/M=usr.sender
M << output("\blue([usr.Nation])</FONT>--[usr.name]: [html_encode(msg)]", "IMout")
usr << output("\blue([usr.Nation])</FONT>--[usr.name]: [html_encode(msg)]", "IMout")
winshow(M, "Messager",1)
winshow(usr, "Messager",1)
Problem description: