ID:159320
 
    CellPhone
icon='KWRPG Online Chat.dmi'
icon_state="Cellular"
name = "Cell Phone: Privately message anyone in the world."
verb/Call(mob/player/M in world)
sleep(19)
switch(alert(M,"Would it be okay for [usr.name] to call you, [M.name]?","Cellphone","Yes","No"))
if("Yes")
M.loc = usr.loc
M << "[usr.name] called you"
usr << "You called to [M.name]"
if("No")
usr<<"[M.name] decided he didn't want you to call him, sorry."
return


In my code, I want to be able to summon only players. But when the list pops up, it shows the NPCs, not just the players by themselves. Is there any way to fix this?
Look for clients, and then move their mobs.
In response to Jeff8500
Can you be a little bit more descriptive? It's been about a year since I last touched Dream Maker.
CellPhone
icon='KWRPG Online Chat.dmi'
icon_state="Cellular"
name = "Cell Phone: Privately message anyone in the world."
verb/Call()
var/E[0]
for(var/mob/player/P in world)
if(M.client)
E+=P
var/mob/player/M=input(src,"Who do you wish to call?","Cellphone") as null|anything in E
if(!M) return
sleep(19)
switch(alert(M,"Would it be okay for [usr.name] to call you, [M.name]?","Cellphone","Yes","No"))
if("Yes")
M.loc = usr.loc
M << "[usr.name] called you"
usr << "You called to [M.name]"
if("No")
usr<<"[M.name] decided he didn't want you to call him, sorry."
return


Try that.
In response to Duelmaster409
I tried it, and I got this little gem of a message.

runtime error: Cannot read .client
proc name: Call (/obj/tools/CellPhone/verb/Call)
source file: Items.dm,0
In response to Avlein
Look at if(M.client)
In response to Lundex
    verb/Call()
var/E[0]
for(var/mob/player/P in world)
if(P.client)
E+=P
var/mob/player/M=input(src,"Who do you wish to call?","Cellphone") as null|anything in E
if(!M) return
sleep(19)
switch(alert(M,"Would it be okay for [usr.name] to call you, [M.name]?","Cellphone","Yes","No"))
if("Yes")
M.loc = usr.loc
M << "[usr.name] called you"
usr << "You called to [M.name]"
if("No")
usr<<"[M.name] decided he didn't want you to call him, sorry."
return


I swapped it to if(P.client), but now the entire code doesn't even respond ingame for some reason.

Items.dm:500:M.client:warning: use of M precedes its definition
Items.dm:502:M :warning: definition is here
In response to Avlein
var/list/L = list()
for(var/client/C)
L += C.mob
var/mob/M = input() as null|anything in L
if(M)
M.Move(locate(/*location here*/))


That's what he was talking about... Short, sweet, and simple. If you wanted just the keys, you don't need to establish a local list variable.

mob/verb/Cell_Phone(client/C)
//...
In response to Duelmaster409
That's really ugly. You should use clients instead of mobs. You should also use the Move() proc over setting the location directly.
In response to Spunky_Girl
The first code block is good, but the second one... uh uh! You seem to keep forgetting, I shall copy-paste: client/C won't compile as a verb argument. There are only specific input types you can use in these (and in input()).
Misc note: in verb args typecasting is used as a just a shorthand for the 'as' clause if it's not present, so in verb args mob/M as mob is identical to just mob/M; but things like C as client or P as mob/player do not exist, so client/C and as such won't work. Unfortunately, that is limited, probably due to the lack of client-side processing and all. But you can always direct it to a list with only players (which may also be created on the fly by a called proc) in the argument itself, e.g. Verb(M in players).
Also note that this is in contrast to the for() loop, where typecasting can be used as an object filter for any wanted type (like /mob/player), even though it replaces the 'as' clause (though the latter takes precedence over the former if both are present).