Page 1 of 2
trying to get simple turn in mac to work.
Posted: Thu Apr 29, 2004 3:24 pm
by Zazoot
ok
this simply ends after getting back a 0 for the first /if
(note i have lots of red wines on that char and the backpacks are all open)
whats wrong with it???
or am i retarded?
Code: Select all
Sub Main
/declare wine local
:Loop
/if (!${FindItem[=Red Wine].Item}) {
/echo backpacks empty go get more stuff
/endmacro
}
/say hail
/for wine 1 to 4
/ctrlkey /itemnotify ${FindItem[=Red Wine].Item} leftmouseup
/if (!${FindItem[=Red Wine].Item}) /goto :Done
/delay 4
/if (@wine==1) /click left target
/delay 4
/if (@wine>1) /click left npctrade ${Math.Calc(@wine-1)}
/delay 4
/next wine
/delay 4
/click left npctrade give
/delay 4
:cursorclear
/delay 4
/if "$cursor()"!="NULL" /goto :cursorclear
/goto :Loop
:Done
/delay 4
/click left npctrade give
/end
Posted: Thu Apr 29, 2004 3:31 pm
by ml2517
Lots of problems, mainly because of /click being gone, a few syntax errors and you had to update for the new variables. I honestly don't know off the top of my head the /click left replacement stuff and I'm at work so someone else will have to do that. I also didn't verify any of the logic in there:
Code: Select all
Sub Main
/declare wine int local
:Loop
/if (!${FindItem[=Red Wine].Item}) {
/echo backpacks empty go get more stuff
/endmacro
}
/say hail
/for wine 1 to 4
/ctrlkey /itemnotify ${FindItem[=Red Wine].Item} leftmouseup
/if (!${FindItem[=Red Wine].Item}) /goto :Done
/delay 4
/if (${wine}==1) /click left target
/delay 4
/if (${wine}>1) /click left npctrade ${Math.Calc[${wine}-1].Int}
/delay 4
/next wine
/delay 4
/click left npctrade give
/delay 4
:cursorclear
/delay 4
/if (${Cursor.ID}) /goto :cursorclear
/goto :Loop
:Done
/delay 4
/click left npctrade give
/end
Posted: Thu Apr 29, 2004 3:39 pm
by Mckorr
You have to use /notify instead of /click. Sorry about that, I had a new click parser about half written and my computer crashed. Then I decided to wait on the latest series of changes from Lax to start back in again.
I'll let y'all know when (if?) /click is functional again, in the meantime you can do everything it did and more with /notify.
Posted: Thu Apr 29, 2004 3:44 pm
by Zazoot
last i checked
the /click stuff worked
shrug
i tried manually typing
/click left target
and it brought up the trade window ;p
but that was 3 days ago, and i havent been able to play / test with new mq yet. work been kicking my ass
and lax even told me that stuff didnt work so if its working it means hes gonna remove it hehe..
anyways just need to find what the window names are and use /notify right?
anyone know?
edit : i posted that before mckorr weird. anywys thanks for the response and thanks for all the hard work, you guys rock
Posted: Thu Apr 29, 2004 3:47 pm
by Mckorr
The list of window names is in your UI_Name_Server.ini file.
The ScreenID's are in the various XML files.
I have a small program that goes through them all and outputs a complete list of ScreenID's for every window. Will try to find that and post it as a reference.
Posted: Thu Apr 29, 2004 3:51 pm
by Zazoot
ok cool ill take a look at that when i get home then :)
Posted: Thu Apr 29, 2004 3:56 pm
by Zazoot
ok so im gonna do something like this for hitting trade
Code: Select all
/notify Tradewindow trade leftmouseup
(not sure on names)
how about opening the window with my target in the first place?
your saying /click target left
is not going to work sooo ill poke around the forums a bit before i leave work

Posted: Thu Apr 29, 2004 4:00 pm
by LordGiddion
zazoot: /click target is the ONLY use that /click still works for and is the only way to do it. Notify works for everything else.
Posted: Thu Apr 29, 2004 4:03 pm
by Zazoot
LordGiddion wrote:zazoot: /click target is the ONLY use that /click still works for and is the only way to do it. Notify works for everything else.
rock on
im gtg then
ill post a working macro later tonight
can be used for bone chips turn ins or whatever
Posted: Thu Apr 29, 2004 4:20 pm
by Mckorr
It's not TradeWindow, it's something else, whatever Lax called the TradeWindow in MQ when he made all that into Classes. I think for that one it's pTradeWnd.
re
Posted: Thu Apr 29, 2004 5:33 pm
by Shali
for NPCs its GiveWnd, or at least used to be, the thing just put in may have changed, as MerchantWnd did
Posted: Thu Apr 29, 2004 6:46 pm
by Zazoot
ok this should be it maybe
ill need to test it when i get home
not sure about what to do with that line in red.
that is where im putting the red wine in the trade window
just click the npc?? or what
Code: Select all
Sub Main
/declare wine int local
:Loop
/if (!${FindItem[=Red Wine].Item}) {
/echo backpacks empty go get more stuff
/endmacro
}
/say hail
/for wine 1 to 4
/ctrlkey /itemnotify ${FindItem[=Red Wine].Item} leftmouseup
/if (!${FindItem[=Red Wine].Item}) /goto :Done
/delay 4
/if (@wine==1) /click left target
/delay 4
[color=red] /if (${wine}>1) /click left npctrade ${Math.Calc[${wine}-1].Int} [/color]
/delay 4
/next wine
/delay 4
/notify GiveWnd trade leftmouseup
/delay 4
:cursorclear
/delay 4
/if (${Cursor.ID}) /goto :cursorclear
/goto :Loop
:Done
/delay 4
/notify GiveWnd trade leftmouseup
/endmacro
Posted: Thu Apr 29, 2004 8:01 pm
by ml2517
You still have an old var in there @wine should be ${wine}
Posted: Fri Apr 30, 2004 12:41 am
by Zazoot
ok everythign works great.. but
i need to know how to find out what the child windows i put in red are.......
slot1-4 is the 4 trade slots
tradebutton is the trade button
how i lookup what they are called???????????????
Code: Select all
Sub Main
/declare wine int local
:Loop
/if (!${FindItem[=Red Wine].InvSlot}) {
/echo backpacks empty go get more stuff
/endmacro
}
/say hail
/for wine 1 to 4
/ctrlkey /itemnotify ${FindItem[=Red Wine].InvSlot} leftmouseup
/if (!${FindItem[=Red Wine].InvSlot}) /goto :Done
/delay 4
/if (${wine}) /click left target
/delay 4
/if (${wine}==1) { /notify GiveWnd [color=red]slot1[/color] leftmouseup
/delay 4
}
/if (${wine}==2) { /notify GiveWnd [color=red]slot2[/color] leftmouseup
/delay 4
}
/if (${wine}==3) { /notify GiveWnd [color=red]slot3[/color] leftmouseup
/delay 4
}
/if (${wine}==4) { /notify GiveWnd [color=red]slot4[/color] leftmouseup
/delay 4
}
/next wine
/delay 4
/notify GiveWnd [color=red]TradeButton[/color] leftmouseup
/delay 4
:cursorclear
/delay 4
/if (${Cursor.ID}) /goto :cursorclear
/goto :Loop
:Done
/delay 4
/notify GiveWnd [color=red]TradeButton[/color] leftmouseup
/endmacro
Posted: Fri Apr 30, 2004 12:44 am
by Zazoot
nevermind i figured it out
i looked inside GiveWnd.xml
:)
ill test and post the final product over on the depot