ID:178244
 
mob
proc
Summon_Skeleton()
set category="Commands"
if(Pet == 0)
new /mob/Ally/Skeleton(locate(usr.x+1,usr.y,usr.z))
usr.verbs+=new/mob/proc/RestMode
usr.verbs+=new/mob/proc/AttackMode
Pet = 1
if(Pet == 1)
usr << "You already have a pet"
var
Pet = 0
mob
proc
RestMode(mob/M as mob in world)
set category = "Pet"
if(M.islocked == 0)
M.islocked = 1
else
return
mob
proc
AttackMode(mob/M as mob in world)
set category = "Pet"
if(M.islocked == 1)
M.islocked = 0
else
return
Thats what i got so far, im trying to make it so when you usepress the rest verb it stops your pet from moving And also when you press attack it moves again,heres what i need help on, it displays all the Mobs in oview when i only want it to work on your pet,and i dont want it to list the mobs either, and 1 last thing ,when if you have no pet at all the Pet Verbs Dissapear Thanks for your time!
Probably something like...

mob
proc
RestMode()
set category = "Pet"
for(var/mob/pet/M) // change pet to whatever your pet mob is
if(M.Owner == src.key) // again, change to whatever your pet owning system is
if(M.islocked == 0)
M.islocked = 1
break

That should give you the general idea how to do it. If it doesn't, I'm sure someone smarter than me can answer your question.