My event based pickpocketing

Hello, first post here. Just looking for some feedback on my weird setup for picking pockets. 


I wrote it out in some funky pseudocode so I hope it's readable. If you can think of anyway I can improve this, it would be great. So far I just have it set up for a random gold amount on success and after many failed attempts, you have to pay a fine. You can only pick a person's pocket once. Unless self switches don't work how I think they do. 


Here it goes. 


pickpocketswitch //Skill used by thief character that calls this common event. 
{
"Start picking picking pockets?"
Yes/no
  If yes
   set pickpockettoggle switch to ON
   "Everyone you meet is a target."
  If no
   "Let's just talk to them for now."


end
}


pickpocketskill  // When talking to npc with skill on. 
{
if pickpockettoggle is ON
    "Pick this pocket?"
    Yes/no
      When Yes
    set pickpocketsuccess = random(1 - 10)
    set goldamount = random(5 - 1000)
    IF pickpocketsuccess >= 7
      Change gold + &goldamount
      "You stole &goldamount gold!"
    ELSE
      "Hey! get out of there!"
      "I'm reporting you!"
      guards += 1
      IF guards = 5
            "Halt thief! You have been caught pick
         pocketing. You must pay the fine. "
      Change gold - 1500
      "You've paid 1500G" 
      set guards to 0
       When No
    "Decided not to, better stop pick pocketing"
End
}


On NPCs
---------



IF pickpockettoggle is ON
  call common event pickpocketskill
  IF pickpocketsuccess >= 7
    set selfswitch A to ON
end


ELSE
// Insert NPC dialogue on here and page 2 with switch A on. 
End


Thanks for getting this far. 
Moving to MV Support.  This is not a tutorial.
You can only pickpocket someone once for the entire game? or are you going to want to reset that switch after a while (If you have a time system)


If you move the chance to pickpocket to the NPC's you can alter the money and chance on a per NPC basis. And even steeper fines for high priority people.
You can only pickpocket someone once for the entire game? or are you going to want to reset that switch after a while (If you have a time system)


If you move the chance to pickpocket to the NPC's you can alter the money and chance on a per NPC basis. And even steeper fines for high priority people.



Thanks for the tips!


Only being able to steal once crossed my mind, I'm not sure how I would implement a time system really. Never looked into it. Once per day or week would be great. Without the limitation people could just farm the skill for gold and it would become horribly unbalanced.


I thought about doing it through the NPC like you said, which is a really good idea and I would want to work on that a lot more if it were a more heavily used system. I just wanted to put this together because I couldn't find a good howto online here or elsewhere. 
You can find a tutorial on a simple time system here.
You can find a tutorial on a simple time system here.

Thanks for the help.

Original thread: https://forums.rpgmakerweb.com/threads/my-event-based-pickpocketing.55317/