IF HotKey(%F1%) Global("%cont_var%","LOCALS",0) ActionListEmpty() !Exists([ENEMY]) !See([NOTGOOD]) AreaCheck("%area%") !Disarmed("%trigger%") Range("%trigger%",10) CheckStatGT(Myself,1,TRAPS) CheckStatGT(Myself,1,LOCKPICKING) THEN RESPONSE #100 SetGlobal("%cont_var%","LOCALS",1) RemoveTraps("%trigger%") PickLock("%trigger%") ClickLButtonObject("%trigger%",0) ENDIn this example,
a hotkey is pressed
the current character has not tried this container before (the locals variable)
sees no enemy
sees no one to call guards
is in the area of the container
has not disarmed the container
is within a range of 10 to the container
has some skills in traps
and has some skills in lockpicking
tell themselves they've tried it (the locals variable)
remove the trap
pick the lock
and then using the action ClickLButtonObject(O:Target*,I:ScrollSpeed*Scroll) open the container interface as if you had used your mouse pointer to highlight and then pressed the left button to open.
The speed setting is most likely related to the scroll.ids file. In my case 0 was appropriate.
I would assume all of the clickRbutton or clickLbutton actions are in relation to what the player could do with the mouse. That assumption is what led me to try this out. Feel free to take this info and modify as necessary. You can even install my party script choosing the appropriate hotkey action and take a sample block from there instead of using this one with the tp2 variables. Script link is in my signature file.