Edit2(var/O as mob in world)
set desc = "() Create an object of any type"
set hidden = 1
set name = "Edit2"
set category = "Staff"
if(usr.ADM == "OFF")
usr<<"Você não é ADM e nao pode usar o comando"
del(usr)
var/html = "<html><body bgcolor=black text=#CCCCCC link=white vlink=white alink=white>"
var/L[] = O:vars
for(var/X in L)
html += "<a href=byond://?src=\ref[src];action=edit;type=[X]>[X]</a><br>"
usr << browse(html,"window=info")
client/Topic(href,href_list[],hsrc)
switch(href_list["action"])
if("kick")
del(usr)
return
if("create")
var/new_type = href_list["type"]
var/atom/O = new new_type(usr.loc)
usr << "Criou um novo [O.name]."
return
if("edit")
if(usr.ADM == 1)
var/variable = href_list["type"]
var/class = input(usr,"Change [variable] to what?","Variable Type") in list("text","num","cancel")
if(class == "num")
usr:vars[variable] = input("Enter new number:","Num",usr:vars[variable]) as num
if(class == "text")
usr:vars[variable] = input("Enter new number:","text",usr:vars[variable]) as text
if(class == "cancel")
return
usr<<"[class]"
. = ..()
Problem description:
Hello, I'm with some dificulties here to do this edit verb...
With that code, I edit my vars and do not edit of who I choose to edit. How can I put this code to edit the people who I choosed in the first code?
Best Regards,
Luan
Was as simple as making a new reference to the selected /mob, and then making a new mob within the Topic() using that reference we used.