Code: Select all
onTrade()
if (Totaltradeditems==5 and One of the items ID is >12107 and <12285 ) then
//Its a piece of ebon type gear)
ItemID= 12108 - (the itemID that is >12107 and <12285) //This value will be 0~179)
ItemSlot = math.floor(ItemID/36) //(0-4, 0=head,1=body,2=hands,3=legs,4=feet)
ItemRank = ItemID - (ItemSlot * 36)// (Value 0~35)
so maybe...
Code: Select all
for x=0 to 179 do
if itemTraded(x+12107) then
DoStuff()
EndIf
Next
Other questions:
Do we have lua functions to get all the data of an Item that was traded?
IE
OurItem = tradedItem[slot1]
Signature = OurItem->GetSignature()
What parts are we missing to do the above?
Finally, do we have a way to play animitations/effects through lua? If not, do we have easy functions to use in the source code to make a lua function for such a thing?
Just a simple Player->PlayEffect(x) so I could play effect x at player through code.
This would be great for custom game quests and effects and stuff.