i found this in my documents last night, no idea where it came from or if its even MS compatible i just saw some bits and thought meh, you mike like this
Code:
PickPocket skill
Sub Commands(Index)
' Place code in here for scripted commands
Dim Name
Dim Index2
Dim V
Dim T
Dim V2
Dim T2
Dim G
Dim S
Dim N
If LCase(Mid(GetPlayerStringCommand(Index), 1, 11)) = "/pickpocket" Then
If Len(GetPlayerStringCommand(Index)) < 13 Then
Call PlayerMsg(Index, "What? Whose that?", 15)
Exit Sub
End If
'first we check to see if they're of the thief class
If GetPlayerClass(Index) <> 0 Then
Call PlayerMsg(Index, "Pfft, you're not a thief!", 12)
Exit Sub
End If
'Lets see if they have a pickpocketing kit, if not, no go.
If HasItem(Index, 10) Then
Name = Mid(GetPlayerStringCommand(Index), 13, Len(GetPlayerStringCommand(Index)) - 12)
Index2 = FindPlayer(Name)
If Index2 > 0 Then
'Check to make sure they're next to the person
 If GetPlayerMap(Index) <> GetPlayerMap(Index2) Then
   Call PlayerMsg(Index, "You're no where near this person!", 15)
   ExitSub
 End If
 Select Case GetPlayerDir(Index)
 Case 0
 If GetPlayerX(Index2) <> GetPlayerX(Index) Then
Call PlayerMsg(Index, "You gotta get a little closer...", 15)
Exit Sub
End If
 If GetPlayerY(Index2) <> GetPlayerY(Index) - 1 Then
Call PlayerMsg(Index, "You gotta get a little closer...", 15)
Exit Sub
End If
 Case 1
 If GetPlayerX(Index2) <> GetPlayerX(Index) Then
Call PlayerMsg(Index, "You gotta get a little closer...", 15)
Exit Sub
End If
 If GetPlayerY(Index2) <> GetPlayerY(Index) + 1 Then
Call PlayerMsg(Index, "You gotta get a little closer...", 15)
Exit Sub
End If
 Case 2
 If GetPlayerX(Index2) <> GetPlayerX(Index) - 1 Then
Call PlayerMsg(Index, "You gotta get a little closer...", 15)
Exit Sub
End If
 If GetPlayerY(Index2) <> GetPlayerY(Index) Then
Call PlayerMsg(Index, "You gotta get a little closer...", 15)
Exit Sub
End If
 Case 3
 If GetPlayerX(Index2) <> GetPlayerX(Index) + 1 Then
Call PlayerMsg(Index, "You gotta get a little closer...", 15)
Exit Sub
End If
 If GetPlayerY(Index2) <> GetPlayerY(Index) Then
Call PlayerMsg(Index, "You gotta get a little closer...", 15)
Exit Sub
End If
 End Select Â
'These are success chances based on speed, change these at will
'We'll call this the thief's skills
T = Int(GetPlayerSpeed(Index) / 5)
T2 = Int(Rnd * GetPlayerLevel(Index)) + T
'And this will be the victims dodge chance
V = Int(GetPlayerSpeed(Index2) / 5)
V2 = Int(Rnd * GetPlayerLevel(Index2)) + V
If V2 > GetPlayerLevel(Index2) * 2 Then V2 = GetPlayerLevel(Index2) * 2
If T2 > GetPlayerLevel(Index) * 2 Then T2 = GetPlayerLevel(Index) * 2
'This will measure how much gold to take, change this to fit your game
G = Int(Rnd * 100) * Int(GetPlayerLevel(Index2) / 5)
'Just a few numeric triggers  S = slot, N = number
S = 0
N = 0
'This finds the slot with the gold
Do
 S = S + 1
 If GetPlayerInvItemNum(Index2, S) = 1 Then N = 1
 Loop Until N = 1 or S = 101
'If the player doesnt have gold, then you cant steal it!
If S < 1 or S > 100 Then
 Call PlayerMsg(Index, "This guy doesnt have anything to steal!", 15)
 Exit Sub
End If
'If the Victim is better than the thief...
If V2 > T2 Then
 Call PlayerMsg(Index, "You've failed! Get Out of here before you're caught!", 12)
 Call PlayerMsg(Index2, GetPlayerName(Index) & " has just attempted to steal your cash!", 14)
Exit Sub
End If
'If it was a close one?
If T2 = V2 Then
 Call PlayerMsg(Index, "You missed, but they dont seem to have noticed...", 14)
Exit Sub
End If
'If the thief Succeeds!
If T2 > V2 Then
 If HasItem(Index2, 1) Then
 If GetPlayerInvItemValue(Index2, S) < G Then G = GetPlayerInvItemValue(Index2, S) - 1
 'Call SetPlayerInvItemValue(Index2, S, GetPlayerInvItemValue(Index2, S) - G)
 Call GiveItem(Index, 1, G)
 Call TakeItem(Index2, 1, G)
 Call PlayerMsg(Index, "Yes! You got the loot, now scram!", 11)
 End If
End If
Else
Call PlayerMsg(Index, "Wha?... There's No one here...", 15)
 Exit Sub
End If
Else
Call PlayerMsg(Index, "You're ill equipped for this!", 14)
End If
End If
'The end of the thief portion...
End Sub