trying to fix simple turn in mac

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Zazoot
a hill giant
a hill giant
Posts: 163
Joined: Sat Feb 07, 2004 11:02 am

trying to fix simple turn in mac

Post by Zazoot » Sun Apr 25, 2004 1:27 pm

found this at
http://macroquest2.com/phpBB2/viewtopic ... ght=casino

was wondering if anyone has bothered to make anything like this yet with the new datatypes?
im gonna take a nap and ill play with it later, just wanted to see if anyone was willing to help ;o he he he

Code: Select all


|USAGE: /macro bonechips.mac 

Sub Main 
/declare l0 local 

:Loop 
/sendkey down ctrl 
/for l0 1 to 4 
/finditem "Bone Chips" 
/if $find()==FALSE /goto :Done 
/delay 2 
/if n @l0==1 /click left target 
/delay 2 
/if n @l0>1 /click left npctrade $int($calc(@l0-1)) 
/delay 2 
/next l0 
/sendkey up ctrl 
/delay 2 
/click left npctrade give 
/delay 2 

:cursorclear 
/destroy 
/delay 2 
/if "$cursor()"!="NULL" /goto :cursorclear 
/goto :Loop 

:Done 
/sendkey up ctrl 
/delay 3 
/click left npctrade give 
/end 

im guessing its going to look something like this (partially done)
the stuff in red i need to change to the new format and that should be it right?

Code: Select all


|USAGE: /macro bonechips.mac 

Sub Main 
/declare l0 local 

:Loop 
/sendkey down ctrl 
/for l0 1 to 4 
/finditem "Bone Chips" 
/if [color=red]$find()==FALSE[/color] /goto :Done 
/delay 2 
/if (@l0==1) /click left target 
/delay 2 
/if (@l0>1) /click left npctrade [color=red]$int($calc(@l0-1))[/color] 
/delay 2 
/next l0 
/sendkey up ctrl 
/delay 2 
/click left npctrade give 
/delay 2 

:cursorclear 
/destroy 
/delay 2 
/if [color=red]"$cursor()"!="NULL"[/color] /goto :cursorclear 
/goto :Loop 

:Done 
/sendkey up ctrl 
/delay 3 
/click left npctrade give 
/end

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun Apr 25, 2004 2:22 pm

Actually a lot more needs updating..
/sendkey, /finditem, /click left npc trade
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Zazoot
a hill giant
a hill giant
Posts: 163
Joined: Sat Feb 07, 2004 11:02 am

Post by Zazoot » Mon Apr 26, 2004 10:57 am

ok heres what i have so far

this should theoretically work.. however i CTD when i run it
i have vs6 and sp6 installed. ill try compiling with vs .net later
can someone test this code (someone who doesnt ctd with finditem :P) and tell me if it works????

Code: Select all

Sub Main 
/declare wine local 
/if (!${Me.Inv[]}) /keypress i
:Loop 
/if (!${FindItem[=Bone Chips].Item}) {
  /echo backpacks empty go get more stuff
  /endmacro 
 }
/say hail
/for wine 1 to 4 
   /ctrlkey /itemnotify ${FindItem[=Bone Chips].Item} leftmouseup
/if (!${FindItem[=Bone Chips].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 3 
  /click left npctrade give 
  /end

Zazoot
a hill giant
a hill giant
Posts: 163
Joined: Sat Feb 07, 2004 11:02 am

ok

Post by Zazoot » Tue Apr 27, 2004 4:28 pm

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