Farming outfit equip weapon and off-hand not working.

hippymon

Member
I am having problems with this darned script, it is meant to get best farming weapon and off-hand but I am not sure how to set up the off-hand part. The 2 sections are right there \/ \/ I have tried alot, but have yet to figure out how to do it.

Main problem is the bar whip equipping, it equips bar whip as a weapon.. Then removes the bar whip and attempts to hold the bar whip in off-hand...

Someone help??

Code:
###############################
########GET_BEST_WEAPON########
###############################
void Get_Best_Weapon(){
	if(available_amount($item[bottle-rocket crossbow]) > 0){
		equip($slot[weapon], $item[bottle-rocket crossbow]);
}
	else if(available_amount($item[bounty-hunting rifle]) > 0){
		equip($slot[weapon], $item[bounty-hunting rifle]);
}
	else if(available_amount($item[bar whip]) > 0){
		equip($slot[weapon], $item[bar whip]);
}
	else{
		retrieve_item(1, $item[bar whip]);
		equip($slot[weapon], $item[bar whip]);
}
}

###############################
#######GET_BEST_OFFHAND########
###############################
void Get_Best_OffHand(){
	if(have_skill($skill[Double-Fisted Skull Smashing]) && available_amount($item[bottle-rocket crossbow]) > 0){
		equip($slot[off-hand], $item[bottle-rocket crossbow]);
}
	else if(available_amount($item[hypnodisk]) > 0){
		equip($slot[off-hand], $item[hypnodisk]);
}
	else if(available_amount($item[bobble-hip hula elf doll]) > 0){
		equip($slot[off-hand], $item[bobble-hip hula elf doll]);
}
	else if(have_skill($skill[Double-Fisted Skull Smashing]) && available_amount($item[bottle-rocket crossbow]) > 0){
		equip($slot[off-hand], $item[bounty-hunting rifle]);
}
	else if(have_skill($skill[Double-Fisted Skull Smashing]) && available_amount($item[bar whip]) > 0){
		equip($slot[off-hand], $item[bar whip]);
}
	else if(have_skill($skill[Double-Fisted Skull Smashing])){
		if(item_amount($item[bar whip]) > 0){
		equip($slot[off-hand], $item[bar whip]);
}
	else if(item_amount($item[bar whip]) == 0){
		retrieve_item(2, $item[bar whip]);
		equip($slot[weapon], $item[bar whip]);
		equip($slot[off-hand], $item[bar whip]);
}
}
	else{
		retrieve_item(1, $item[7-ball]);
		equip($slot[off-hand], $item[7-ball]);
}
}
 
try:
Code:
retrieve_item(2 - available_amount($item[bar whip]), $item[bar whip]);
in the off hand function

and:
Code:
retrieve_item(1 - available_amount($item[bar whip]), $item[bar whip]);
in the weapon section.

It looks like you are equipping it to weapon in the weapon function, then retrieving 2 which will unequip 1 to get 2 if you have 1 in inventory and 1 equipped.
 
Top