Send(mob/M,t as text)
if(t==""){return}
//if(M==src){return}
M << output("[usr.name]: [html_encode(t)]", "PMChat.output1")
M << output("[src]","PMChat.LName")
winshow(M,"PMChat",1)
winshow(src,"PMChat",1)
src << output("[usr.name]: [html_encode(t)]", "PMChat.output1")
src << output("[M]","PMChat.LName")
Basically, once I enter text into the input bar, it'll call this verb but it won't know who M is and I don't know how to go about it to set it once I already picked the person. If you need further explanation or think you can help, any ideas will be helpful.
When you set the command of the window, do:
This will set the first parameter to be a reference to the mob.
So, your Send would now be:
Well, that's one way to do it. I kind of don't recommend that, though, because there are a lot of issues with it. (The ref could now be pointing to a different mob or the mob could no longer exist. Players logging in and out causes problems.)
What I would recommend is the player having a list of mobs they are chatting with stored in a var. Then, the first parameter to the Send can be <code>as num</code> and you use the number as an id (index to the list, perhaps) to get what mob it's supposed to work with. The advantage to this is that if the mob was deleted, you can now detect it, because the entry in the list will be null.
(You'd set the command like this:)