Essentially, by Using this as a Module "OnItemAcquire" event, or merging it into the existing event, most items a PC picks up will be marked as "Non-Pickpocketable"
Updated: Credit to pulse cap, and _martigan_ , I used pulse's changes only as I dislike that IPGetIsMeleeWeapon() Will return anything between a Greatsword, and a dagger. A dagger, I can see a thief nabbing.
Posted by Link6746 at 2010-10-14 21:46:06 Voted 10.00 on 10/14/10
This fixes a glaring issue in most PW's. Highly reccomended for anyone starting or modifying/updating one. _________________________ __________________________________________________
Megadeth has a very intelligent way of talking about governments and religions: Either they bullshit you or try to kill you for not being one of them. I wholeheartedly agree.
(Note: Just because Mustaine is christian doesn't mean he believes EVERYTHING the bible tells him.)
__________________________________________________
Doesn't bother me in the least, presently been busy with a few different projects(Signature). I'm just happy that since 1.66(I think) Pick Pocket's no longer an 'all or nothing' game. _________________________ Itinerant Admin: RPGModding.com - Where Modders Muster.
switch( GetBaseItemType( oItem ) )
{
case BASE_ITEM_ARMOR :
case BASE_ITEM_BASTARDSWORD :
case BASE_ITEM_BATTLEAXE :
case BASE_ITEM_BOOTS :
case BASE_ITEM_DIREMACE :
case BASE_ITEM_DOUBLEAXE :
case BASE_ITEM_DWARVENWARAXE :
case BASE_ITEM_GREATAXE :
case BASE_ITEM_GREATSWORD :
case BASE_ITEM_HALBERD :
case BASE_ITEM_HEAVYCROSSBOW :
case BASE_ITEM_HEAVYFLAIL :
case BASE_ITEM_HELMET :
case BASE_ITEM_KATANA :
case BASE_ITEM_LARGESHIELD :
case BASE_ITEM_LIGHTCROSSBOW :
case BASE_ITEM_LONGBOW :
case BASE_ITEM_LONGSWORD :
case BASE_ITEM_MAGICSTAFF :
case BASE_ITEM_QUARTERSTAFF :
case BASE_ITEM_RAPIER :
case BASE_ITEM_SCYTHE :
case BASE_ITEM_SHORTBOW :
case BASE_ITEM_SMALLSHIELD :
case BASE_ITEM_TOWERSHIELD :
case BASE_ITEM_TWOBLADEDSWORD :
case BASE_ITEM_WARHAMMER : SetPickpocketableFlag( oItem, FALSE ) ; break ;
default
:
if( GetWeight( oItem ) >= 30 )
{
SetPickpocketableFlag( oItem, FALSE )
;
}
break
;
}
}
This is the script I have been looking for! Being a scripting newb, though, how would I incorporate this into an existing hcr script?
Posted by Tymora at 2006-04-18 00:51:41 Voted 10.00 on 04/18/06
Once more, I succumb to the fact that your scripting abilities are remarkable. But you are not talent without application - your foresight as to what scripts would enhance the game and bring forth new levels of playability is awe inspiring. Gold. Just ... Gold. (That said, I've never put Spot on any of my character.)
Posted by jay ( 61.213.xxx.xxx ) at 2006-04-15 11:11:15
Is more along the right lines, and your correct, I forgot, or rather.. didn't realize when I first wrote this that bioware made it return as 3/10LBS not 3LBS. However, it doesn't return as 30LBS _________________________ Itinerant Admin: RPGModding.com - Where Modders Muster.
If you need to, Contact Me
Its more effective than leaving a post on a vault entry you will probably never return to look at a second time
Posted by Anonymous ( 196.40.xxx.xxx ) at 2006-03-27 07:46:51
the weight part wont work! you forget that for some odd reason bioware made weight return in 10ths instead of returning a float.
therefore:
GetWeight(oItem)/10 >= 3
is what you want because a 3 pound item returns as 30 using the GetWeight function
Posted by Trimmmme at 2006-03-24 01:23:54 Voted 10.00 on 03/24/06
Great Script thx
Posted by _martigan_ at 2006-02-23 11:27:19 Voted 10.00 on 02/23/06
good work _________________________ It is by caffeine alone I set my mind in motion, it is by the beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning, it is by caffeine alone I set my mind in motion.
Posted by _martigan_ at 2006-02-23 11:04:20 Voted 10.00 on 02/23/06
#include "x2_inc_itemprop"
void main()
{
object oItem =GetModuleItemAcquired();
if (
GetBaseItemType(oItem)==BASE_ITEM_ARMOR||
GetBaseItemType(oItem)==BASE_ITEM_BOOTS||
GetBaseItemType(oItem)==BASE_ITEM_HELMET||
GetBaseItemType(oItem)==BASE_ITEM_LARGESHIELD||
GetBaseItemType(oItem)==BASE_ITEM_SMALLSHIELD||
GetBaseItemType(oItem)==BASE_ITEM_TOWERSHIELD||
IPGetIsMeleeWeapon(oItem)||
IPGetIsRangedWeapon(oItem)||
GetWeight(oItem) >= 3
)
{
SetPickpocketableFlag(oItem, FALSE);
}
} _________________________ It is by caffeine alone I set my mind in motion, it is by the beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning, it is by caffeine alone I set my mind in motion.
@ xGallionx
Right now, its designed to be merged into the Module level On Acquire, without a check to specifically only effect PC's. However, changing that is easy enough, its all in the conditional statement
If you need to, Contact Me
Its more effective than leaving a post on a vault entry you will probably never return to look at a second time
Posted by xGallionx at 2006-01-09 08:32:17 Voted 10.00 on 01/12/06
You have (pvp) in the title. Does that mean that this protects other PCs but thieves can still pick pocket whatever from NPCs with this script? Thansk :)
Posted by Lilly at 2006-01-02 13:51:08 Voted 9.75 on 01/02/06
While I am not a builder, or indeed a scripter, I feel I can vote on this. Why? because I played on a server where this very script was implimented, and it worked well! Much more realistic as other have said, a fine piece of scripting!
Posted by Ploobywoo at 2005-12-21 11:27:24 Voted 10.00 on 12/21/05
Real-world, even-handed solution... even from the point of view of someone who loves to play rogues.
I blame what was it, 1.65? 1.66? Which ever patch it was that gave us a pickpocketable Flag. For previous scripts, you have to realize they quite literally didn't have the technology to do what I did. _________________________ Itinerant Admin: RPGModding.com - Where Modders Muster.
If you need to, Contact Me
Its more effective than leaving a post on a vault entry you will probably never return to look at a second time
Posted by Cybermagi at 2005-12-21 06:26:59 Voted 8.00 on 12/21/05
elegant solution, without being heavy handed against the Pick Pocket Skill.
Posted by Farchilde at 2005-12-20 22:56:35 Voted 10.00 on 12/20/05
Finally... a Pick Pocket fix that makes sense... simple -realistic- and well done! Always wondered how those thieves took off my armor -and hid it in a pouch of theirs- without me even noticing...
You must be Logged In to post comments in this section.