Emulator Bone Chip Macro help

Maze_EQ

Premium Member
Joined
May 1, 2014
Messages
39
Reaction score
2
Points
8
Okay, so heres the issue I haven't been able to solve.

When you run this macro while handing to Gunlok in kaladim for bone chips, it will pick up a stack of chips and try handing them to him, and since RoF2 allows stacks in trade window, it will bug out and eat the bone chips.

I have a feeling it's


Code:
/for l0 0 to 3
   /ctrl /itemnotify ${FindItem[=Bone Chips].InvSlot} leftmouseup
   /delay 20 ${Cursor.ID}
   |/delay 0
   /if (${l0}==0) {
      |/ubertrade
      /click left target
      /delay 20 ${Window[GiveWnd].Open}
      |/delay 0
   } else {
      /notify GiveWnd GVW_MyItemSlot${l0} leftmouseup
      /delay 20 !${Cursor.ID}
      |/delay 0
Due to the patchwork armor being given, causing desync, and the macro trying to destroy it.

If anyone can help me optimize this, would be much appreciated.

(Bone Chip revised does not work in my situation)

Once I resolve the hand in, I can make a travel macro using mq2navigation easily from the bone chip seller on this server.

Code:
#turbo 40
#Event Exp             "You gain#*#experience#*#"
Sub Main
/declare  ReportExp          bool	outer	TRUE
/declare  LDExp              float      outer   ${Me.PctGroupLeaderExp}
/declare  AAExp              float      outer   ${Me.PctAAExp}
/declare  Exp                float      outer   ${Me.PctExp}
/declare Kills int outer 0
/declare kCount int outer 0

/declare l0 int local


/target npc Gunlok

:Loop
/if (${FindItemCount[=Bone Chips]}<4) /goto :Done

/for l0 0 to 3
   /ctrl /itemnotify ${FindItem[=Bone Chips].InvSlot} leftmouseup
   /delay 20 ${Cursor.ID}
   |/delay 0
   /if (${l0}==0) {
      |/ubertrade
      /click left target
      /delay 20 ${Window[GiveWnd].Open}
      |/delay 0
   } else {
      /notify GiveWnd GVW_MyItemSlot${l0} leftmouseup
      /delay 20 !${Cursor.ID}
      |/delay 0
   }
/if (!${FindItemCount[=Bone Chips]}) /goto :Done
/next l0

/notify GiveWnd GVW_Give_Button leftmouseup
/delay 20 !${Window[GiveWnd].Open}
|/delay 0
/doevents
/if (${FindItem[Small].InvSlot}) /call Small
/if (${FindItem[Rusty].InvSlot}) /call Rusty
/if (${FindItem[Torch].InvSlot}) /call Torch
/goto :Loop

:Done
|/delay 0
/notify GiveWnd GVW_Give_Button leftmouseup
/echo out of chips
/end
/return

Sub Event_Exp(string Line)
  |- Experience calculation and reporting
 /if (${ReportExp}) /echo ** XP-Delta: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%)
  /varset LDExp ${Me.PctGroupLeaderExp}
  /varset AAExp ${Me.PctAAExp}
  /varset Exp ${Me.PctExp}  
  /varcalc kCount ${kCount}+1
  /echo ${kCount} Handins - ${Int[${Math.Calc[${Macro.RunTime}/60]}]} Min, ${Int[${Math.Calc[${Macro.RunTime}-${Int[${Math.Calc[${Macro.RunTime}/60]}]}*60]}]} Sec.
 
/return

Sub Small
/ctrl /itemnotify ${FindItem[Small].InvSlot} leftmouseup
/delay 1s ${Cursor.ID}
/destroy
/return

Sub Rusty
/ctrl /itemnotify ${FindItem[Rusty].InvSlot} leftmouseup
/delay 1s ${Cursor.ID}
/destroy
/return

Sub Torch
/ctrl /itemnotify ${FindItem[Torch].InvSlot} leftmouseup
/delay 1s ${Cursor.ID}
/destroy
/return
 
You might need to add some delays.

I wrote a bonechip macro I never got around to releasing. Here is the main guts of the turn-in part and destroy subs which should help you some hopefully. I think it was pretty flaweless on live servers. You'll need to add Sub Main to it to get it to work.

Code:
Sub BoneChipsHandin
:Loop
/doevents
/if (${Target.Distance}>20) /return
/if (${FindItemCount[=Bone Chips]}==0) /goto :Done

/for thelooper 0 to 3
/call PlayerCheck
/if (${Target.Name.NotEqual[Gunlok_Jure00]}) /target npc Gunlok
/if (${Zone.ID}!=67) {
	/camp
	/end
	}
/shift /itemnotify ${FindItem[=Bone Chips].InvSlot} leftmouseup 
/delay 5s ${Cursor.ID}
/if (${thelooper}==0) {
	/nomodkey /click left target
	/delay 2s !${Cursor.ID}
	/delay 20 ${Window[GiveWnd].Open}
	} else {
	/notify GiveWnd GVW_MyItemSlot${thelooper} leftmouseup
    /delay 20 !${Cursor.ID}
    /delay 0
    }
/if (${FindItemCount[=Bone Chips]}==0) {
	/if	(${Window[GiveWnd].Open}) {
		/notify GiveWnd GVW_Give_Button leftmouseup
		/delay 20 !${Window[GiveWnd].Open}
		/goto :Done
		}
	}
/next thelooper
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 10s !${Window[GiveWnd].Open}
/call CursorDestroy
/if (!${FindItemCount[=Bone Chips]}) /goto :Done
/goto :Loop


:Done

/call BackPackDestroy
/return


Sub BackPackDestroy
:top
/if (${FindItemCount[=Rusty Axe]}>0) {
	/itemnotify ${FindItem[=Rusty Axe].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}
	
/if (${FindItemCount[=Rusty Short Sword]}>0) {
	/itemnotify ${FindItem[=Rusty Short Sword].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}
/if (${FindItemCount[=Rusty Broad Sword]}>0) {
	/itemnotify ${FindItem[=Rusty Broad Sword].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}
/if (${FindItemCount[=Small Lantern]}>0) {
	/itemnotify ${FindItem[=Small Lantern].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}
/if (${FindItemCount[=Rusty Mace]}>0) {
	/itemnotify ${FindItem[=Rusty Mace].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}			
/if (${FindItemCount[=Torch]}>0) {
	/itemnotify ${FindItem[=Torch].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}
/if (${FindItemCount[=Small Tattered Gloves]}>0) {
	/itemnotify ${FindItem[=Small Tattered Gloves].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}
/if (${FindItemCount[=Small Patchwork Sleeves]}>0) {
	/itemnotify ${FindItem[=Small Patchwork Sleeves].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}
/if (${FindItemCount[=Small Patchwork Tunic]}>0) {
	/itemnotify ${FindItem[=Small Patchwork Tunic].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}
/if (${FindItemCount[=Small Tattered Skullcap]}>0) {
	/itemnotify ${FindItem[=Small Tattered Skullcap].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}	
/if (${FindItemCount[=Small Patchwork Pants]}>0) {
	/itemnotify ${FindItem[=Small Patchwork Pants].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}			
/if (${FindItemCount[=Rusty Two Handed Sword]}>0) {
	/itemnotify ${FindItem[=Rusty Two Handed Sword].InvSlot} leftmouseup
	/delay 5s ${Cursor.ID}
	/destroy
	/goto :top
	}
/return
	

	
Sub CursorDestroy
:more
/if (${Cursor.ID}) {
	/if (${Select[${Cursor.ID},2122,2113,2123,2120,2116,5014,6011,13003,13002,5023,5016,5013,5016,6011,5014,13002,5023,13003]}) {
		/destroy
		}
	}
/delay 1s ${Cursor.ID}
/if (${Select[${Cursor.ID},13073]}) {
		/return
		}
/if (${Cursor.ID}) /goto :more	
/return

Sub PlayerCheck
:Loop
/if (${SpawnCount[pc noalert 2 radius 600]}>1) {
/echo Players Around, "/alert add 2 name" to ignore
/delay ${Math.Calc[${Math.Rand[100]}+50]}s
}

/if (${SpawnCount[pc noalert 2 radius 600]}>1) {
/echo Players Around, "/alert add 2 name" to ignore
/delay ${Math.Calc[${Math.Rand[100]}+50]}s
}

/if (${SpawnCount[pc noalert 2 radius 600]}>1) {
/echo Players Around, "/alert add 2 name" to ignore
/delay ${Math.Calc[${Math.Rand[100]}+50]}s
}

/if (${SpawnCount[pc noalert 2 radius 600]}>1) {
/echo Players Around, "/alert add 2 name" to ignore
/delay ${Math.Calc[${Math.Rand[100]}+50]}s
}

/if (${SpawnCount[pc noalert 2 radius 600]}>1) {
/echo Players Around, "/alert add 2 name" to ignore
/delay ${Math.Calc[${Math.Rand[100]}+50]}s
}

/if (${SpawnCount[pc noalert 2 radius 600]}>1) {
/echo Still people in Area, Camping...., Use /alert add 2 PlayerName to ignore player 
/camp
/delay 1s
/camp
/delay 28s
/camp
/delay 80s
/echo Still people in Area, Camped...., Use /alert add 2 PlayerName to ignore player 
/delay ${Math.Calc[${Math.Rand[1000]}+500]}s
/keypress enter
/delay 100s
/goto :Loop
}
/return
 
Yeah, been working with it for a few days.

Only problem I've encountered is handing 4 chips at a time since EMU isn't capable of handing full stacks (Would make life easier) then getting rid of the trash on my cursor before re-adding chips.

EDIT: Possibly adding a check for bone chips on cursor before handing them in may work. hmmm.
 
Last edited:
Yeah, been working with it for a few days.

Only problem I've encountered is handing 4 chips at a time since EMU isn't capable of handing full stacks (Would make life easier) then getting rid of the trash on my cursor before re-adding chips.

EDIT: Possibly adding a check for bone chips on cursor before handing them in may work. hmmm.

Bone.mac should be I the live macro folder. That should only hand in 4 bonechips at a time then destroy anything that is trash after you run low on space.
 
Ok I've figured out the issue.
 
Last edited:
This checks to see if there are more than 1 bonechips or other items on cursor, if so it inventories it.

Works perfectly.

:)


Code:
Sub Main
/declare  ReportExp          bool	outer	TRUE
/declare  LDExp              float      outer   ${Me.PctGroupLeaderExp}
/declare  AAExp              float      outer   ${Me.PctAAExp}
/declare  Exp                float      outer   ${Me.PctExp}
/declare Kills int outer 0
/declare kCount int outer 0

/declare l0 int local

/target npc Gunlok
:Loop
/if (${FindItemCount[=Bone Chips]}<4) /goto :Done
/if (${Cursor.Stack}>1 && ${Cursor.ID}==13073 || ${Cursor.ID}!=13073) {
	/autoinventory
	}

/for l0 0 to 3
   /ctrl /itemnotify ${FindItem[=Bone Chips].InvSlot} leftmouseup
   /delay 20 ${Cursor.ID}
   |/delay 0
   /if (${l0}==0 && ${Cursor.Stack}==1 && ${Cursor.ID}==13073) {
      |/ubertrade
      /click left target
      /delay 20 ${Window[GiveWnd].Open}
      |/delay 0
   } else {
      /notify GiveWnd GVW_MyItemSlot${l0} leftmouseup
      /delay 20 !${Cursor.ID}
      |/delay 0
   }
/if (!${FindItemCount[=Bone Chips]}) /goto :Done
/next l0
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 5
echo Destroying ${Cursor.Name}
/delay 2
/destroy

/delay 1s
/goto :Loop
 
Last edited: