ID:147121
 
Okay... I'm trying to make this work.
proc/Kipnap(mob/K as mob)
var/k=input("Pick someone to extract ransom from")in list(servlist)
K=k
src<<"You have attempted to extract ransom from [K]!"
K.alert//The text here.

(I haven't tested this yet, so I may have about fifty gameplay errors...)
Anyway, it tells me K.alert is an undefined proc. So, how can I direct an alert to anything other then the src?
Sensi wrote:
Okay... I'm trying to make this work.
> proc/Kipnap(mob/K as mob)
> var/k=input("Pick someone to extract ransom from")in list(servlist)
> K=k
> src<<"You have attempted to extract ransom from [K]!"
> K.alert//The text here.
>

(I haven't tested this yet, so I may have about fifty gameplay errors...)
Anyway, it tells me K.alert is an undefined proc. So, how can I direct an alert to anything other then the src?

alert(K,message,blablabla)
what you want to do is the following-

I'm guessing servlist is a list of all mobs in the world or are just a list of mobs

well here's something a little universal -

are you trying to say kidnap?

I'm assuming you want to call it as a mob procedure, I'm not real sure how you're planning on using it so I'm sure you can change that part...

mob/proc/Kipnap()
var/mob/k=input("Pick someone to extract randsom from") as null|anything in list(servlist)
if(isnull(k)) return
if(!client || !src) return
alert(k,message, "You extract randsom from [k]!")


that's really all you need! I just did what you were basically trying to do a different way. You always want to have null as an option because if someone logs out while an input window is open then there'll be hell to pay! This way it returns if they do log out.

hope it works for yeah, not the best coder but I'm sure it'll do :P