I will be brief and concise.
For example you have these two scripts:
Script 1:
Spot = Location(32003, 30293, 7)
BuyPots = True
Set_Hunt = 0
Set_To_Hunt = 1
Set_To_Shop = 2
def onScriptActivation():
script.StatusMessage('Starting script...')
script.PZChecksForDrop(1)
def onChangeLocation(x, y, z):
xyz = Location(x, y, z)
way = script.GetWay()
if xyz == Spot:
if way == Set_Hunt:
if BuyPots == True:
script.SetWay(Set_To_Shop, 2)
else:
onDoStuff()
def onDoStuff():
script.IgnoreMonsters(0)
Script 2:
Coordinate = Location(32457, 31874, 8)
ItemId = 5498
def onScriptActivation():
script.IgnoreMonsters(1)
def onChangeLocation(x, y, z):
xyz = Location(x, y, z)
way = script.GetWay()
if xyz == Coordinate:
script.StatusMessage('Dropping item...')
script.DropItem(ItemId, 1)
To link it you will have to group each def in case the same is used in both scripts.
Result:
Spot = Location(32003, 30293, 7)
BuyPots = True
Coordinate = Location(32457, 31874, 8)
ItemId = 5498
Set_Hunt = 0
Set_To_Hunt = 1
Set_To_Shop = 2
def onScriptActivation():
script.StatusMessage('Starting script...')
script.PZChecksForDrop(1)
script.IgnoreMonsters(1)
def onChangeLocation(x, y, z):
xyz = Location(x, y, z)
way = script.GetWay()
if xyz == Spot:
if way == Set_Hunt:
if BuyPots == True:
script.SetWay(Set_To_Shop, 2)
else:
onDoStuff()
elif xyz == Coordinate:
script.StatusMessage('Dropping item...')
script.DropItem(ItemId, 1)
def onDoStuff():
script.IgnoreMonsters(0)