The New Pick-pocket Script
Moderators: Moderator, Developer, DM
-
Swift
- Posts: 20
- Joined: Fri Aug 12, 2011 11:47 pm
Re: The New Pick-pocket Script
Noticed a bug today - I picked a player's character and succeeded but she yelled at me for trying to steal from her. After a few tells we determined that there was no way in the abyss I could steal from the character based on her spot and my SoH skills and I was actually detected but my stealth didn't break and I still received gold. If someone wants, screenshots, lemme know.
- Blackman D
- Retired Staff
- Posts: 4818
- Joined: Sat Sep 12, 2009 5:43 am
- Location: IL
-
Dagesh
- Posts: 891
- Joined: Mon Jan 16, 2012 11:03 pm
Re: The New Pick-pocket Script
I know y'all already have something but I put something together this afternoon. Feel free to use it if it's useful or borrow bits of it if they are useful alone.
(note, _inc_time is a separate script I can send if desired)
(another note, it isn't tested in game)
Hidden: show
(another note, it isn't tested in game)
ουκ εστιν ωδε, ηγερθη γαρ καθως ειπεν
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
- Rasael
- Retired Staff
- Posts: 8096
- Joined: Wed Jun 30, 2010 6:52 am
- Location: Leiden, Netherlands
Re: The New Pick-pocket Script
Its a very good sample script Dagash. You use comments well and the code is clearly written. In terms of what we have on the server its a fine approximation. It misses a number of the refinements, NWN2 fixes, and new features but those would be hard to incorporate without spending more time on it and NWN 2 development. What i mean are routines to deal with bugs and unexpected feedback, as well as code to make the guard npcs respond....Our community has been blessed recently with a good number of excelent programmers. 
-
Dagesh
- Posts: 891
- Joined: Mon Jan 16, 2012 11:03 pm
Re: The New Pick-pocket Script
Awesome and thank you!
Most of my time is with NWN1 and NWNX2. I have a lot to learn about the stuff added to NWN2.
Most of my time is with NWN1 and NWNX2. I have a lot to learn about the stuff added to NWN2.
ουκ εστιν ωδε, ηγερθη γαρ καθως ειπεν
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
-
Dagesh
- Posts: 891
- Joined: Mon Jan 16, 2012 11:03 pm
Re: The New Pick-pocket Script
I seem to have a problem w/ bystanders spotting the attempt. It seems their spot check is surprisingly high. Is there a spot buff for NPCs?
ουκ εστιν ωδε, ηγερθη γαρ καθως ειπεν
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
- Rasael
- Retired Staff
- Posts: 8096
- Joined: Wed Jun 30, 2010 6:52 am
- Location: Leiden, Netherlands
Re: The New Pick-pocket Script
Yes it scales on a falling curve with your level. You get less risk as you level but we didn't want the risk to disappear too quickly. The reward is partly based on the risk you run / difficulty. 
https://www.youtube.com/watch?v=wcSXyyn7Ifw
https://www.youtube.com/watch?v=wcSXyyn7Ifw
-
Nihm
- Posts: 63
- Joined: Tue Apr 12, 2011 4:32 pm
Re: The New Pick-pocket Script
That is awesome! Would it be hard to have the thief thrown in jail the same way the guards do when someone doesn't put a weapon away?Rasael wrote:https://www.youtube.com/watch?v=wcSXyyn7Ifw
-
Dagesh
- Posts: 891
- Joined: Mon Jan 16, 2012 11:03 pm
Re: The New Pick-pocket Script
There's still a number of issues.
+If in stealth or invisible the pickpocket can still be spotted despite being completely unseen. No synergy love for the rogue?
I find it hard to believe that a rogue w/ a million hide/ms can be seen by someone 10 meters away who can't see them anyways. Perhaps limit the spot check only to the target in this case. If this check is added, perhaps also break stealth/invis if attempt unsuccessful.
+If the target is stunned or has other similar effects it can still spot the attempt. Silly frozen target. Don't you know you're paralyzed?!
+Everything calls out for the guards or what not. Xvarts are optimistic I suppose.
+If the target is a non-humanoid it can still be pickpocketed. All those wyvern pockets? IKR?!
I know I'm a broken record and I'm sure you guys are getting to it
. I'm going to recommend these next few chunks once again just in case. They're easily inserted into the right spot of code.
Check for Effects
Check for Racial type (we're racist when it comes to pickpocketing)
Pickpocketer is in stealth or invisible and target can't see invis
+If in stealth or invisible the pickpocket can still be spotted despite being completely unseen. No synergy love for the rogue?
+If the target is stunned or has other similar effects it can still spot the attempt. Silly frozen target. Don't you know you're paralyzed?!
+Everything calls out for the guards or what not. Xvarts are optimistic I suppose.
+If the target is a non-humanoid it can still be pickpocketed. All those wyvern pockets? IKR?!
I know I'm a broken record and I'm sure you guys are getting to it
Check for Effects
Hidden: show
Hidden: show
Hidden: show
ουκ εστιν ωδε, ηγερθη γαρ καθως ειπεν
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
- Rasael
- Retired Staff
- Posts: 8096
- Joined: Wed Jun 30, 2010 6:52 am
- Location: Leiden, Netherlands
Re: The New Pick-pocket Script
Hello Dagesh,
The issue with races is actually a stock NWN2 bug, its not related to scripting. Sometimes the function you use, GetRace or GetSubRace, will return 0. Normally this isn't an issue because 0 is treated as nothing or FALSE.... but with the race functions the dwarven race is actually entry 0. So every time the function returns an error it literally returns a dwarf in NWN2 script....
There is a way around it and I am not positive whether the latest version of the script is currently on the server eitherway. In any case, once the updating process is under way again I will incorporate it and send the amended version to Luna.
The issue with races is actually a stock NWN2 bug, its not related to scripting. Sometimes the function you use, GetRace or GetSubRace, will return 0. Normally this isn't an issue because 0 is treated as nothing or FALSE.... but with the race functions the dwarven race is actually entry 0. So every time the function returns an error it literally returns a dwarf in NWN2 script....
There is a way around it and I am not positive whether the latest version of the script is currently on the server eitherway. In any case, once the updating process is under way again I will incorporate it and send the amended version to Luna.
-
Dagesh
- Posts: 891
- Joined: Mon Jan 16, 2012 11:03 pm
Re: The New Pick-pocket Script
Oh the joys of 0. Good old' Acid Fog too if I remember correctly. Could there be a secondary if X == 0 && X != Dwarf Race follow up kind of thing or is it just the default function that's bugged. That would be horrible. Maybe GetAppearance would work? Gotta love bug squashing.Rasael wrote:Hello Dagesh,
The issue with races is actually a stock NWN2 bug, its not related to scripting. Sometimes the function you use, GetRace or GetSubRace, will return 0. Normally this isn't an issue because 0 is treated as nothing or FALSE.... but with the race functions the dwarven race is actually entry 0. So every time the function returns an error it literally returns a dwarf in NWN2 script....
There is a way around it and I am not positive whether the latest version of the script is currently on the server eitherway. In any case, once the updating process is under way again I will incorporate it and send the amended version to Luna.
ουκ εστιν ωδε, ηγερθη γαρ καθως ειπεν
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
PCs:
Rorick Runegraph (Check out Rorick's Rune of Light)
Ckalthea Chenfur
Aeric
Squire Brevin of Lathander
- Theodore01
- Recognized Donor
- Posts: 2927
- Joined: Wed Feb 16, 2011 5:32 pm
Re: The New Pick-pocket Script
Have been in a party with an active thief recently, who always picked all monsters pockets.
My toon (with a spot skill of 4) got this message over and over.

It is very annoying to have to click the dialog each time,
even more as the thief never stole from our party, (at least i assume
).
My toon (with a spot skill of 4) got this message over and over.

It is very annoying to have to click the dialog each time,
even more as the thief never stole from our party, (at least i assume
- Blackman D
- Retired Staff
- Posts: 4818
- Joined: Sat Sep 12, 2009 5:43 am
- Location: IL
Re: The New Pick-pocket Script
do you know if his SoH is way higher than you should detect? either way i dont think any updates to this have gone in 
everyone is evil till proven otherwise
- Theodore01
- Recognized Donor
- Posts: 2927
- Joined: Wed Feb 16, 2011 5:32 pm
Re: The New Pick-pocket Script
his SoH was 17.Blackman D wrote:do you know if his SoH is way higher than you should detect?
-
Considerate_
- Posts: 630
- Joined: Tue May 11, 2010 5:51 am
Re: The New Pick-pocket Script
Well, that means you do have a chance of catching him every now and then in the act, though you shouldn't get it every time!
Regardless... Are you supposed to be able to call the guards on him in the middle of a cave, surrounded by monsters? I know the Flaming Fists are good at upholding the law, buuuuuut!
Regardless... Are you supposed to be able to call the guards on him in the middle of a cave, surrounded by monsters? I know the Flaming Fists are good at upholding the law, buuuuuut!
Tamara - "I've seen colours you would never dream of"
Neschera - "Logic can bring you from one step to the next, creativity can bring you from anywhere to everywhere"
Neschera - "Logic can bring you from one step to the next, creativity can bring you from anywhere to everywhere"