Need help with a macro you are writing? Ask here!
Moderator: MacroQuest Developers
-
MrOuija_AK
- orc pawn

- Posts: 23
- Joined: Mon Sep 13, 2004 9:16 pm
Post
by MrOuija_AK » Sun Oct 17, 2004 2:38 pm
I'm trying to add some functionality to my TL bot so that he will accept food, water and portal frag trades. But refuse any other junk sent his way.
I've been messing around and figured out $(Window[Tradewnd].Child[TRDW_TradeSlot#]} but now I can't get any information about the item in the tradeslot. I was hoping I'd be able to use "type" to see if it's food or water. All I seem to be able to get is information like "yes this is TRDW_TradeSlot0" but I can't figure out how to point to the item.
-
peach
- a hill giant

- Posts: 156
- Joined: Fri Sep 10, 2004 8:20 pm
Post
by peach » Sun Oct 17, 2004 4:47 pm
i think all you can do with that is once you accept trade, destroy or keep the item
could be wrong tho
[img]http://img23.exs.cx/img23/4702/search2.jpg[/img]
-
blueninja
- a grimling bloodguard

- Posts: 541
- Joined: Thu Aug 28, 2003 7:03 am
- Location: Göteborg, Sweden
Post
by blueninja » Sun Oct 17, 2004 5:03 pm
I believe what you're looking for is ${InvSlot[trade1].Item} ...
-
MrOuija_AK
- orc pawn

- Posts: 23
- Joined: Mon Sep 13, 2004 9:16 pm
Post
by MrOuija_AK » Sun Oct 17, 2004 5:20 pm
Item isn't a member of InvSlot. I tried that already =)
-
blueninja
- a grimling bloodguard

- Posts: 541
- Joined: Thu Aug 28, 2003 7:03 am
- Location: Göteborg, Sweden
Post
by blueninja » Sun Oct 17, 2004 6:13 pm
invslot
Members
int ID
Number of this item slot (usable directly by /itemnotify)
item Item
Item contained by this item slot
string Name
For inventory slots not inside packs, the slot name
invslot Pack
Container that must be opened to access the slot with /itemnotify
int Slot
Slot number inside the pack which holds the item
To String
Same as ID
-
Rusty~
- a hill giant

- Posts: 244
- Joined: Wed Apr 14, 2004 2:55 pm
Post
by Rusty~ » Sun Oct 17, 2004 7:18 pm
yeah, you would probably wanna use something like:
Code: Select all
/if ( ${Window[TradeWnd].Open} ) {
/delay 2s
/if ( ${InvSlot[trade1].Item.Type.Equal[food]} || ${InvSlot[trade1].Item.Type.Equal[drink]} || ${InvSlot[trade1].Item.Name.Equal[Small Portal Fragments]} ) {
/notify TradeWnd TRDW_Trade_Button leftmouseup
} else {
/notify TradeWnd TRDW_Cancel_Button leftmouseup
}
}
this is just basic example... you could do a loop checking every slot too if you wanted.