Hi everyone, I thought about a mechanics I added some time ago to my game, a pickpocketing system, it was really ugly, lots of lines of setup for each event, so I decided to turn it into a script,
I changed this
into this:
I am pretty satisfied with the result, so I thought I'd share this
Description:
You simply have to put one line of script call in an event box (e.g Eaty_Steal(['g',0],32,100,@event_id,10,"How dare you!") ), and when the player will interact with that npc while pressing a default key
SHIFT), he'll try to steal what you set within the script call, if the player gets caught you can decide what the consequences will be.
The chances of success are determined by this formula (rand(attention_level) - $game_party.leader.agi ), which you can freely change (in that case also adjust the conditions check accordingly (value<0, value<a/2, value>=a/2)).
Here's the script:
Spoiler Code:
This is my first script, please let me know about any improvement I can make, or any bugs or mistakes.
本贴来自国际rpgmaker官方论坛作者:EatYourBeetS处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/pickpocket-script.38805/