Diablo 2 - Unidentified Items System

thevoden

New Member
Reaction score
5
Example:
1) A monster / boss drops an item, a rare items drops as "unidentified".
2) I have a scroll of identity in my inventory.
3) I right click on my Scroll of Identity Item and then drag it on top of the "unidentified" item.
4) I right left click it to drop it on top of the item.
5) instead of switching the places between the two items, how do I make it so that it identifies the item (i.e. produce another item).

So how do you detect if you "stack" an item to another one so it identifies it?
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
JASS:
local integer order=GetIssuedOrderId()
local integer dropslot=order-852002
local unit u=GetOrderedUnit()
local item drag=UnitItemInSlot(u,dropslot)
local item drop=GetOrderTargetItem()


Code:
set Temp_Order = Issued Order
set Temp_DropSlot = Temp_Order - 852002
set Temp_Unit = Ordered Unit
set Temp_DraggedItem = Item Carried by Temp_Unit in Slot Temp_DropSlot
set Temp_DroppedItem = Order Target Item

Fairly certain that Temp_DroppedItem is the item you picked up and dropped, and Temp_DraggedItem is the item you dropped it on. All of this happens under the event Unit Issued Order Targeting a Target.
 

thevoden

New Member
Reaction score
5
Hey thanks again! Is it possible to set a sample trigger for me? I'm not too good with JASS.
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
I do. Use your logic. I gave you everything you freaking need. Stop trying to take advantage of me.
 

thevoden

New Member
Reaction score
5
If I knew how I would use that trigger then I wouldn't be asking questions. But that fine, way to encourage a striving map maker. And no one is taking advantage of anyone.
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
Remove Temp_DraggedItem. Add an item of random type to Temp_Unit.

How is that hard? You just want me to do it for you. You aren't striving for anything, ro you would be able to figure this out. And you would be trying.
 

Grymlax

Probably not around
Reaction score
138
Waaaaagh are you sure your trigger works? becouse as far as i know you can't detect if an item is moved inside of the inventory.
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
I actually designed WMI, so I'm fairly certain it works.
 

thevoden

New Member
Reaction score
5
Thanks!

Okay you can call me a noob, and i'm pretty much asking you to do the triggers yes. I ask because I have no idea what I'm doing. What may seem easy to you is definitely hard to me.

So how do I create a trigger based of that? What are the events and conditions?
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
WMI = Widget Manipulation Interface, which was an old member's project I did that basically did everything he wants x40 but was discontinued mostly because nobody had a good RPG project and any sort of jass knowledge at the same time.

Just search 'Wmi' and you'll find it.
 

thevoden

New Member
Reaction score
5
JASS:
local integer order=GetIssuedOrderId()
local integer dropslot=order-852002
local unit u=GetOrderedUnit()
local item drag=UnitItemInSlot(u,dropslot)
local item drop=GetOrderTargetItem()


Code:
set Temp_Order = Issued Order
set Temp_DropSlot = Temp_Order - 852002
set Temp_Unit = Ordered Unit
set Temp_DraggedItem = Item Carried by Temp_Unit in Slot Temp_DropSlot
set Temp_DroppedItem = Order Target Item

Fairly certain that Temp_DroppedItem is the item you picked up and dropped, and Temp_DraggedItem is the item you dropped it on. All of this happens under the event Unit Issued Order Targeting a Target.

Just out of curiousity, what does "- 852002" mean?

I dont have access to world editor right now, but its possible for me to check the item type of "Temp_DraggedItem" right?
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
Yah. Oh shit, since you are using GUI, it should be -852001. There are orders for dropping an item in a slot. They are 852002 (Slot 1) - 852007 (Slot 6). Subtract 852001 from the order issued, and you get the slot you are dropping the item on.
 

thevoden

New Member
Reaction score
5
Okay so if I'm using GUI i should make it -852001? Just to rephrase what you said.

And why is it that I have to use -852002 for jass?
 

Waaaaagh

I lost all my rep and my title being a jerk
Reaction score
70
In Jass, the natives for items and inventory slots start at 0 and go to 5. GUI uses BJs, which start from 1 and go to 6.

And yes, that's right.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top