I'm making a curing system for Lusternia. One of the things I'm trying to script is a function that takes out a specific purgative vial and drink it, but only if it's not in my inventory. So, here's what I've set up:
Code: Select all
Alias Name: Choleric
Pattern: ^drinkcholeric$
Code: CholericFromPack()
Code: Select all
Script Name: CholericFromPack
Code:
function CholericFromPack()
if chol.n.pack == 0 then
send("get choleric from pack;drink choleric")
chol.n.pack = 1
else
send("drink choleric")
end
end
function CholericInPack()
if chol.n.pack == 1 then
send("put choleric in pack")
chol.n.pack = 0
end
end
I do have all of my vial's individual variables called in the beginning in their own script's, so they should be able to be called... Any help with what I'm doing wrong? Or am I making this WAAY to complicated?