Mindee-BOT

Mindee-BOT Community => Share => Scripting => Useful Parts => Topic started by: =Mindee= on April 12, 2020, 12:26:00 pm

Title: [Share] Take rewards from chests, etc.
Post by: =Mindee= on April 12, 2020, 12:26:00 pm
Examples how you can take reward from tiles like chest, crate, etc.

Script #1:
Code: [Select]
nearChest = (11111, 22222, 7)

def onChangeLocation(x, y, z):
# Let's pretend that chest is one tile below your character position.
if x == nearChest[0] and y == nearChest[1] and z == nearChest[2]:
script.LookAt('down') # Looks at tile, takes reward.

Script #2:
Code: [Select]
# Waypoint Sets
hunt = 0
to_chest = 1
to_hunt = 2

spot = (11111, 22222, 7)
nearChest = (11111, 22222, 7)

def onChangeLocation(x, y, z):
way = script.GetWay()

if x == spot[0] and y == spot[1] and z == spot[2]:
if way == hunt and script.GetVar('taken_chest') == 0:
script.SetWay(to_chest, 2)
elif way == to_hunt:
script.SetWay(hunt, 2)
elif x == nearChest[0] and y == nearChest[1] and z == nearChest[2]:
script.LookAt('down') # Let's pretend that chest is one tile below your character position.
script.SetWay(to_hunt, 2)