# Gather 4 lightstones to defeat the Brawler.
# If you find a lightstone, hide.
def checkTakeHide(item):
if item:
# The item is here, so take it.
hero.moveXY(item.pos.x, item.pos.y)
# Then move to the center of the camp (40, 34)
hero.moveXY(40, 34)
# Move to the top right X mark.
hero.moveXY(54, 53)
hero.moveXY(68, 56)
# Search for a lightstone there.
while true:
lightstone = hero.findNearestItem()
# Call checkTakeHide with the argument: lightstone
checkTakeHide(lightstone)
# Move to the top left mark.
# Search for a lightstone.
# Call the checkTakeHide function.
# Pass in the result of your search as an argument.
while True:
# Search for a lightstone there.
lightstone = hero.findNearestItem()
# Call checkTakeHide with the argument: lightstone
checkTakeHide(lightstone)
# Move to the top left mark.
# Search for a lightstone.
# Gather 4 lightstones to defeat the Brawler.
# If you find a lightstone, hide.
def checkTakeHide(item):
if item:
# The item is here, so take it.
hero.moveXY(item.pos.x, item.pos.y)
# Then move to the center of the camp (40, 34)
hero.moveXY(40, 34)
# Move to the top right X mark.
hero.moveXY(54, 53)
hero.moveXY(68, 56)
# Search for a lightstone there.
while true:
lightstone = hero.findNearestItem()
# Call checkTakeHide with the argument: lightstone
checkTakeHide(lightstone)
# Move to the top left mark.
# Search for a lightstone.
# Call the checkTakeHide function.
Delete the two move statements outside the while true loop. In your while true loop, move to (68,56) and check for the nearest item. Then use checkTakeHide(item) replacing item with your variable. Do the same thing again within your while true loop except this time instead of moving to (68,56), move to the coordinates (12,56).