Help with my selling macro

Need help running MacroQuest 1? Too bad! Use MQ2.

Moderator: MacroQuest Developers

gingertips
a hill giant
a hill giant
Posts: 230
Joined: Wed Jun 26, 2002 3:47 am
Location: Tseu-Qorcam

Help with my selling macro

Post by gingertips » Tue Aug 06, 2002 5:11 am

Hi there.

The selling part of my macro appears not to be functioning correctly - it finds the item to sell, but sits at the little how many (20) window - if i press the shift key while at this spot, it sells the items ok.

What am i missing???

Domosan
I had to suck up to get this title ;)
Posts: 101
Joined: Mon Jun 17, 2002 3:54 pm

Post by Domosan » Tue Aug 06, 2002 7:17 am

did you make sure you've sent a shift key down message ?

Domosan

gingertips
a hill giant
a hill giant
Posts: 230
Joined: Wed Jun 26, 2002 3:47 am
Location: Tseu-Qorcam

Post by gingertips » Tue Aug 06, 2002 8:18 am

aye that worked a TREAT!!! :wink:

jones14
orc pawn
orc pawn
Posts: 12
Joined: Tue Aug 06, 2002 5:11 pm

Post by jones14 » Wed Aug 07, 2002 3:22 am

Ok, I am new to this so please forgive me if I'm missing something. I'm trying to get the SellItem.mac that comes with the program to work. I type /macro SellItem "Fish Fillets" and it will click into the merchant, then close out of merchant, say Couldn't find a 'null', then ends the macro. I've tried /macro SellItem Fish Fillets. I'm using the old UI to do this, any help would be appreciated.

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Wed Aug 07, 2002 3:46 am

Code: Select all

| - Selllike.mac -
|
| Usage: /macro SellItem "milk"
|
#turbo
#include routines.mac

Sub Main
	/sendkey down shift
	:Selling
	/varset v99 $char(plat)
	/varset v98 $char(gold)
	/varset v55 $char(silver)
	/varset v56 $char(copper)
	/finditem similar "$p0"
	/if $find()==FALSE /goto :Done
	/click left merchant buy
	:WaitSale
	/doevents
	/if n $v99!=$char(plat) /goto :Selling
	/if n $v98!=$char(gold) /goto :Selling
	/if n $v55!=$char(silver) /goto :Selling
	/if n $v56!=$char(copper) /goto :Selling
	/goto :WaitSale
	:done
	/sendkey up shift
/return

User avatar
Madman
a ghoul
a ghoul
Posts: 144
Joined: Wed Jun 26, 2002 4:16 pm

Post by Madman » Wed Aug 07, 2002 11:56 am

in the previous exampe you used
/finditem similar "$p0"

but where did you specify what "$p0" was

i dont know why i am doing this but i quit playing eq about a month ago but i decided to try and learn the scripting language just incase i ever decide to get back into eq.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Wed Aug 07, 2002 1:02 pm

Salutations,
$p# is an argument variable, it is defined when you run the macro. In this case, when you run /macro sellitem "milk" $p0 will be set to milk
Now if we had a macro that you wanted to use more then one variable: /macro testmacro "milk and cheese" "some milk" "some cheese" "honey" $p0 is milk and cheese, $p1 is some milk, $p2 is some cheese, and $p3 is honey. The quotes are put around the variables so that if there are spaces, it is put into the same variable (milk and cheese) but the quotes themselves are not put in.

User avatar
Madman
a ghoul
a ghoul
Posts: 144
Joined: Wed Jun 26, 2002 4:16 pm

Post by Madman » Wed Aug 07, 2002 1:17 pm

o ok kind of reminds me of writing dos batch programs that did that


ALSO fyi in your last realease your hero brew when looks like it makes hero brew but all trhough the code it is making calls for heady kiola's

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Wed Aug 07, 2002 5:43 pm

Err I guess I should have commented my post instead of just posting the code ;)

sempi
orc pawn
orc pawn
Posts: 22
Joined: Wed Jul 10, 2002 10:31 pm

Post by sempi » Wed Aug 07, 2002 6:00 pm

I understood yer post just fine ;oP