To link two scripts, the content must be grouped in the corresponding def.
For example you have these two scripts:
Script 1:
# Locations
loc_hunt = (32003, 30293, 7)
# Waypoints
way_to_hunt = 0
way_in_hunt = 1
way_to_shop = 2
def onScriptActivation():
script.IgnoreMonsters(False)
def onChangeLocation(x, y, z):
loc = (x, y, z)
way = script.GetWay()
if (loc == loc_hunt) and (way == way_in_hunt):
script.StatusMessage("You are in the hunting area.")
Script 2:
# Locations
loc_shop = (32457, 31874, 7)
# Waypoints
way_to_hunt = 0
way_in_hunt = 1
way_to_shop = 2
def onScriptActivation():
script.PZChecksForDrop(True)
def onChangeLocation(x, y, z):
loc = Location(x, y, z)
way = script.GetWay()
if (loc == loc_shop) and (way == way_to_shop):
script.StatusMessage("You are in the shop.")
Result:
# Locations
loc_hunt = (32003, 30293, 7)
loc_shop = (32457, 31874, 7)
# Waypoints
way_to_hunt = 0
way_in_hunt = 1
way_to_shop = 2
def onScriptActivation():
script.IgnoreMonsters(False)
script.PZChecksForDrop(True)
def onChangeLocation(x, y, z):
loc = Location(x, y, z)
way = script.GetWay()
if (loc == loc_hunt) and (way == way_in_hunt):
script.StatusMessage("You are in the hunting area.")
elif (loc == loc_shop) and (way == way_to_shop):
script.StatusMessage("You are in the shop.")