Warcraft III resources & community, 2003–2006 · archived

Pickpocket

9 posts
#1

Pickpocket

Ok, I need help to develop a pickpocket ability, mainly, the part where a random item is selected from the slots.

EX: Level 1: Random item from the top 2 slots.
Level 2: Random item from the top 3 slots.
ETC.

Any help will be appreciated,
Aark
#2
I think that if you create a variable, that would make reference to the random item slot you could use a trigger that would go like:

Event:
Unit begins casting an ability


Condition:
Ability being cast equal to "pick pocket"


Actions:
Make "target unit of ability being cast" drop item on item slot "variable"
Give "casting unit" last dropped item.


That would be the way I solve it, but Im not sure about the possibility of making that variable. Ill check it out and confirm the exact steps as soon as Im got a chance.

And as an advice, restrict the level of the item being stolen so the user cant abuse of that ability, or restrict the time of the item managed, for instance, add an action that would be like:

wait "x" seconds
Make casting unit drop item
Give last droped item to target unit of ability being cast.
#3
Thanks, I'll try that ASAP.

As for the whole restriction thing, higher-end items are placed at the bottom of the inventory, needing the max level to be taken, and only high-end enemies will carry powerful items in the first place.

I *hope* that it will work out.

EDIT: Ugh, hit a snag allready... What is the Variable made up of? Is it Item, Item-Class, etc., and what are the values?

Thanks,
Aark
#4
its a Random Integer between 1 and 6

it doesnt need a variable.
#5
Ok, this is the level 1 trigger:

Pickpocket
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Pickpocket
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 100) Equal to 45
(Level of Pickpocket for (Casting unit)) Equal to 1
Then - Actions
Player - Add 50 to (Owner of (Casting unit)) Current gold
Unit - Order (Target unit of ability being cast) to drop (Random item in (Region centered at (Position of (Casting unit)) with size (200.00, 200.00)) matching ((Random integer number between 1 and 2) Equal to 2)) on (Casting unit)
#6
no, what he meant is so that it took an item from a random slot. Yours makes him take an item from a random slot, as well as giving it only a 1% chance to do so. If you want a chance of ~45%, it should be Less Than or Equal To 45
#7
I take it you mean change the
(Random integer number between 1 and 100) Equal to 45
part?
#8
yes, i do.
#9
Ok, its done, thanks for the help,
Aark