02-10-2006, 08:00 PM
I have an idea for a pick pocketing system, but I was wondering if anyone would have any suggestions on how to work the code.
Pick Pocket
|
02-10-2006, 08:00 PM
I have an idea for a pick pocketing system, but I was wondering if anyone would have any suggestions on how to work the code.
03-10-2006, 11:23 AM
Well my idea is to have both, "rob" npc and "PickPocket" players, now the big idea about the pickpocket players is that it does "NOT" take the item away from the origanal player. here's an example
:::::::::::::::Example::::::::::::::::: 1. player trys to pickpocket another player 2. player is successful at sneaking into the pocket 3. "player picks a item to steal" 4. Players 10 - 100% chance of being spotted is called! 5. The item that he actually gets is based on his pick pocket skill 6. If player is successful add item to inventory 7. (other option) If player is caught deal 15 damage to the player pickpocketing - don't add the item to his inventory; adds the title of theif at the end of his name ::::::::::::End Example::::::::::::: And for the npc's :::::::::::::::::Example::::::::::::::::: 1. player trys to rob a npc 2. player is successful at sneaking into a crate/bag 3. "player picks item to streal" 4. Platers 10 - 100% chance of being spotted is called! 5. the item that he actually gets is based on his stealing skill(aka pickpocket) 6. If player is successful add item to inventory 7.(other option) If player is caught deal 15 damage to the player and send to jail - don't add the item to his inventory; remove the worth of the item trying to steal from players gold: (if player does not have the cash leave him in a cell for 5 minutes) Add the title theif to the end of his name. :::::::::::::::::::::::::End Example:::::::::::::::::::::: I'm not sure if that's possible to be done, but that's sort of what I'm looking for. any suggestions on how to do that?
03-10-2006, 12:21 PM
Player
Could be pretty advanced, but still there are a very easy way to do this. Just follow the attack player code. And you can basicly just make it so you steal gold from the player, the amount depending on your skill. NPCs This is a little bit more difficult, still pretty easy if you just want to take gold. But if you want to scam for items, you would need to add a lot of things, both to the editNPC and also the actual NPC inventory. I suggest you go with the scam for gold idea ![]()
03-10-2006, 12:46 PM
Either way I'm doing the gold thing, I was just wanting to get some examples or idea's for doing it, but I want the stealing actual items from npc's for the realism of it, and stealing from players just for fun. but I would rather it be regular items+gold then just gold.
03-10-2006, 01:27 PM
You should probably add another Byte val to the itemrec, like StealVal or something, so if you were trying to pick-pocket a player, the higher the StealVal, the harder/longer it is to steal.
03-10-2006, 01:47 PM
Even though I'm trying to work out how to do the pick pocket, I'm currently working out a in client editable class thingy(like editing npcs but classes) and back and fourth trying to figure this out. I think I'm going to take your idea and add a stealval to the items, and a robbedval to npc's and players rec's
03-10-2006, 03:47 PM
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
03-10-2006, 04:10 PM
Ok I'll try that out with some stuff, thanks for the assist, if you come up with any ideas or helpful code hints please post.
04-10-2006, 06:40 AM
considering that is just script, I don't believe it will work, atleast not without modifying it quite a bit....It is a nice base to use though.
as for where it came from I believe i seen it on a closed source engine.....
04-10-2006, 08:32 AM
As i said, i just found it :S realy confused me xD.
04-10-2006, 02:06 PM
It doesn't work. It uses functions that does not exist, and it also has a few errors in it. But its a decent start.
04-10-2006, 03:00 PM
I think P2P pickpocketing is really bad news, but pickpocketing NPC's could easily be done. Just copy the drop item code, but instead of when the NPC dies, when he is pickpocketeted(sp?). You could even add levels to the playerrec and make it more advanced. As for the packets, again, pretty easy. Send a request to the server, server does all calculations and then gives the player the item, and even send a message. Results in what... 2-3 packets? Easy peasy lemon squeazy.
~Kite Quote:Robin:
04-10-2006, 03:37 PM
Well, I have sort of what I'm wanting to do, but I was wondering how I would make the npc's inventory(because I have a certain way I'm going to do this.) Also I'm confused on how to make it so that when you click ctrl it brings up the inventory rather than wack the player with your sword,axe or w/e.
04-10-2006, 04:19 PM
I suggest choosing a new key,
23-10-2006, 03:34 PM
HandleKeyPresses or something like that, I think.
25-10-2006, 12:56 AM
It's not in handlekeypresses, it's somewhere else, assuming you can find it, but if you don't wanna look I think it's in modGlobals under ' Game Direction Vars
25-10-2006, 01:17 AM
HandleKeyPresses handles all the pressing of keys in Mirage, I havn't opened it up, but I'm pretty sure it handles it there, since it handles what happens when you press enter to pick up an item and such.
[EDIT] Guess I was wrong. I finally stopped being lazy, and actually opened my source and looked in handlekeypresses, I will now look for the correct location. [EDIT 2] I think it is this code: Code: If KeyCode = vbKeyControl Then In: Code: Sub CheckInput(ByVal KeyState As Byte, ByVal KeyCode As Integer, ByVal Shift As Integer) Though, I'm prolly wrong. Dunno.
25-10-2006, 01:35 AM
I think it might be, I'm not really sure though.
25-10-2006, 01:38 AM
I checked, that is where it sets attacking to true, then runs a check for everything dealing with it, then proceeds to attack.
25-10-2006, 12:34 PM
i woudl suggest raskingthe player which woudl they like to do..
or setup an option for the pickpocket class to always attempt to pick pockets when on and always attack when off place a simple check in the attack sub to see if they have it set on if so then send the target info to the pickpocket sub and activate it that way.. i could get into more detail but it seems you have enough info for now.. i may be able to help out a bit more later..
27-10-2006, 02:17 PM
checkinput and gameloop house the code which checks if a button (such as ctrl, up, down etc.) is being pressed, whereas HandleKeyPresses is all the chat keys, such as A, B, Backspace, enter etc. keys are handled.
-Kite- Quote:Robin:
30-10-2006, 06:19 PM
I'm not 100% on this one, but I think this would work
Code: If ControlDown = True And ShiftDown = True Then |
« Next Oldest | Next Newest »
|