ID:264809
 
Code:
mob
admin
verb
ghost_mode()
set category = "Staff"
set name = "Ghost Mode"
set desc = "Turn into a ghost for moderation purposes"
if(usr.ghost==1)
usr.density = 1
usr.invisibility = 0
usr.ghost = 1
return
else
usr.density = 0
usr.invisibility = 101
usr.ghost = 0
return


Problem description: The verb works just fine when making the player invisible and intangible, but not the other way around.

1st off, you're using boolean variables incorrectly.

A boolean would work something like the following:

mob/var/complete

mob/verb/True_False()
if(!complete)
complete = 1
else
complete = null
In response to OrangeWeapons
Thanks, I patched that up real quick!
In response to OrangeWeapons
Or... you know:
var1 = !var1
// if var1 == 0, it is now 1
// Vice-versa