mob/PC/Login()
if(src.key=="Hell Ramen")
src.verbs += typesof(/mob/admin/verb)
..()
else
..()
mob
admin
verb
/*Code Rush*/
=/
No commands when I log in... thus meaning no testing anything... =/
Help will be appreciated...
ID:268606
Sep 8 2004, 11:23 am
|
|
mob/PC/Login() =/ No commands when I log in... thus meaning no testing anything... =/ Help will be appreciated... |
In response to Garthor
|
|
Never thought of that...
But it doesn't like verbs(I can guess because of the "()"s) client o.O Do I have to take out the () now? And do for(var/mob/M in world) and stuff like that? |
In response to Hell Ramen
|
|
No that's wrong. Also, I made a mistake. I assumed that you couldn't create subtypes of client (like client/admin) because you can't create new instances of clients. You actually can. So, just change "mob" to "client" and "Login()" to "New()" and you should be set.
You don't need to change things inside your verbs, however. |
In response to Garthor
|
|
Ahhh, thanks.
[Edit]It works now. :D Thanks Garthor. |
In response to Hell Ramen
|
|
<__<
__>Well, since this IS an Admin Code topic, and it's mine... _>I can't get my Click Create verb to work. =/ Click_Create(atom/A) Since it won't allow processes in a process... I'm confused... x_x If it's too advanced, just don't even bother answering. XD I don't want to waste your time [Edit] I also found a new error. @_@ Everyone gets admin commands. |
In response to Hell Ramen
|
|
What you want for it to do is set a variable, and then in Click(), it'll check the variable, and do something if it's set.
|
In response to Garthor
|
|
Erm... sorry for being a newb, but could you please explain that more?
Like, make... atom/createitemvar/C new C.loc = Click.loc |
In response to Hell Ramen
|
|
client |
In response to Garthor
|
|
__>Does Click(Location) work for locating an object where you clicked...? [Edit]Like, if(!O)return;var/T = new O(Click.loc);. =/ Doesn't work. How would I do that...? |
In response to Hell Ramen
|
|
If you want to replace a turf at the spot you clicked, you will want to do something like this:
client |
In response to Garthor
|
|
Do you mean... if(istype(atom(O) && !isarea(O)))?
|
In response to Hell Ramen
|
|
No, isatom() and isarea() are procs. Areas are atoms, so we want any atom that isn't an area (because you can't find the coordinate you clicked on if you clicked on an area).
|
In response to Garthor
|
|
_><_< It registers isatom() as an undefined process. And it's not in the refrence. =/ Isarea is in the refrence, though. |
In response to Hell Ramen
|
|
Hum, could've sworn it was in there. Oh well, use if(istype(O, /atom/) && !isarea(O))
|
In response to Garthor
|
|
Thanks Garthor. :P
It works, I've always wondered how this was done... |
The reason you want to give these verbs to the client instead of the mob is for two reasons. First, the actual character doesn't have the powers, you do. Second, if you have a mind control spell which allows you to switch mobs with another player... guess who gets the admin controls?