ID:164287
 
Ok heres my dilema:

Im making a verb that reads a certain players verbs then takes them away and after like so many seconds (in the sleep function) i would like it to give back all the verbs it took away.

I have a bit of the coding because i just thought about putting the part i need in this verb:

mob
SGM
verb
Azkaban(mob/M in world)
set category="SGM"
var/area/Azkaban/T
for(T in world)
if(!T.in_use)
src.number=input("How long will they be in Azkaban? 10 = 1 second.","AZKABAN") as num
world<<"-=-Server-=- [M] was sent to Azkaban!"
T.in_use=1
M.loc=T
M.in_azkaban=1
sleep(src.number)
T.in_use=0
M.loc=locate(/area/Azkaban_Ex)
world<<"-=-Server-=- [M] was released from Azkaban!"


when someone is sent to azkaban its to take all the verbs away ALL of them, then when he gets out after the amount of seconds or minutes or whatever it gives the person back the exact verbs that person had.

How would i go about doing this?
usr.verbs -= typesof(/mob/verb/yourverbname)


I think that might work so you should test it out with your code.
In response to Monkeykid0049
it does i know it, i need something that will keep a list of the persons verbs so when it has to re-add them it will add all in the list.
mob/verb/VerbRemTest()
var/list/L = list()
for(var/v in src.verbs)
L += v
src.verbs -= v
sleep(30)
for(var/v in L)
src.verbs += v


Mind you this won't take away object based verbs. So if you have obj/Get() defined for objects, you'll still be able to get objects. The only way to do that is to take the verbs away from the objects which, while also doable, is a bit more work. (That would be pretty much the same thing, just loop through all objects in inventory and spawn the same proc on them!)
In response to VolksBlade
mob
Their_Verbs
verb
Verb1
stuff it does
Verb2
stuff it does

mob
SGM
verb
Azkaban(mob/M in world)
set category="SGM"
var/area/Azkaban/T
for(T in world)
if(!T.in_use)
src.number=input("How long will they be in Azkaban? 10 = 1 second.","AZKABAN") as num
world<<"-=-Server-=- [M] was sent to Azkaban!"
M.verbs -= typesof(/mob/verb/Their_Verbs)
T.in_use=1
M.loc=T
M.in_azkaban=1
sleep(src.number)
T.in_use=0
M.loc=locate(/area/Azkaban_Ex)
world<<"-=-Server-=- [M] was released from Azkaban!"
M.verbs += typesof(/mob/verb/Their_Verbs)
In response to Monkeykid0049
I don't think you understand what he's trying to do. The goal is to take away all the mob's verbs, then add back all the verbs that they had before. That particular mob may have been given extra verbs for whatever reason, or have had some removed. You'll need to keep track of which verbs the mob had before they were removed, then add back those verbs. You can't just remove and add all mobs verbs.
In response to Foomer
Oh....well I'm fairly new at coding so I'm not that good....
In response to Monkeykid0049
Then why try to help on something you didnt understand 100% what they were trying to do?

Ahhhh works like a charm, thanks Foomer
In response to VolksBlade
I "thought" I understood what you were talking about but I guess I didn't.....but you don't have to be so mean about it I was only trying to help