EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bug Reports (https://www.eqemulator.org/forums/forumdisplay.php?f=591)
-   -   Pickpocketing Items level 20 Limit (https://www.eqemulator.org/forums/showthread.php?t=41262)

7thGate 04-04-2017 12:41 AM

Pickpocketing Items level 20 Limit
 
Hello,

I'm not sure exactly sure if this is a bug, or if this is the right place to post this, but I thought I would mention it since it seemed kind of strange.

I was trying to figure out how pickpocketing worked on P99. I noted that no matter how many times I pickpocked a gnoll in blackburrow, I would not seem to be able to get items like water. I decided to look at the eqemu source code, since while P99 has undoubtably made changes, I figured I could see what eqemu does and try testing to see what parts might still work that way in P99.

Here's the part I noticed that seems strange, from npc.cpp:

int steal_skill = thief->GetSkill(EQEmu::skills::SkillPickPockets);
int steal_chance = steal_skill * 100 / (5 * over_level + 5);

// Determine whether to steal money or an item.
uint32 money[6] = { 0, ((steal_skill >= 125) ? (GetPlatinum()) : (0)), ((steal_skill >= 60) ? (GetGold()) : (0)), GetSilver(), GetCopper(), 0 };
bool has_coin = ((money[PickPocketPlatinum] | money[PickPocketGold] | money[PickPocketSilver] | money[PickPocketCopper]) != 0);

bool steal_item = (steal_skill >= steal_chance && (zone->random.Roll(50) || !has_coin));

Specifically, the flag on if you steal an item seems to require your steal_skill to be higher than the steal_chance. But steal_chance isn't capped at 100 and is a direct function of steal_skill and the target's level; this will always be true for any NPC level 19 or over, and never true for any NPC under that level, and completely independent of the pickpocket skill level.

I only play on P99, so I don't really have a good setup for trying to verify this, and for all I know maybe this is desired behavior. It seems awfully suspicious, however; does anyone know if this is intended?

Uleat 04-04-2017 12:09 PM

I can tell you that based on this page: https://wiki.project1999.com/Skill_Pick_Pocket

..our code is not the same as p99's.


Their code is probably more accurate based on some other web sites' info.

7thGate 04-04-2017 12:39 PM

That is true, and I wasn't expecting it to be the same, just to use the eqemu code as a possible guide for testing. There are some definite differences (for one, P99 doesn't seem to have a level difference cap; I was able to steal from level 40 guards at level 23. Also, I'm pretty sure the number of coins stolen algorithm is different). However, the possible issue of not being able to steal items from creatures under level 19 seems to be both there and in the eqemu source.

I don't know what live EQ behavior was in this regard; maybe it is supposed to be that way? It still seems kind of strange though, that the formula on whether you can steal items reduces down to a level check on the target.

The_Beast 04-04-2017 10:58 PM

In source code - common/features.h Is this value flexible, (up or down) ?
Code:

//this is the number of levels above the thief's level that
//an npc can be and still let the theif PP them
#define THIEF_PICKPOCKET_OVER 5



All times are GMT -4. The time now is 05:04 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.