Aetolia Project AI

SirKickz
Posts: 2
Joined: Sun Mar 21, 2010 7:57 am

Re: Aetolia Project AI

Post by SirKickz »

Well, I understand that, which is why I chose the database as my tool for storing the afflictions. I'd only have to write to it when I found a new affliction that I need to handle, but reading from it would be nice and quick during combat. My problem is that I can't seem to get the db to display, or even create the database at all. I'm not sure what I'm doing wrong, because I've been copying/pasting from the code above that people said worked, and it didn't. It doesn't throw an error, but it never displays anything when I run the test.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Aetolia Project AI

Post by Vadi »

Feel free to start another thread for this and we'll figure it out.

Kennai
Posts: 9
Joined: Sat Jan 30, 2010 6:11 am

Re: Aetolia Project AI

Post by Kennai »

Code: Select all

function Defenses()
local edefenses={
["no venom"]="venom",
["no levitation"]="levitation",
}
local edefensesl={
"no venom",
"no levitation",
}
local frostDef={
["no frost"]="sip frost",
}
local frostDefl={
"no frost",
}
local speedDef={
["no speed"]="sip speed",
}
local speedDefl={
"no speed",
}
local blisstracker={
"no mbliss",
"no bbliss",
"no cbliss",
"no fbliss"
}
local LumDefenses={
["no lightshield"]="evoke lightshield",
["no inspiration"]="perform inspiration",
["no empathy"]="angel empathy",
["no care"]="angel care",
["no watch"]="angel watch",
["no corporality"]="angel corporality",
}
local LumDefensesl={
"no lightshield",
"no inspiration",
"no empathy",
"no care",
"no watch",
"no corporality",
}
local genDefenses={
["no clarity"]="clarity",
["no deathsight"]="deathsight",
["no thirdeye"]="thirdeye",
["no dodging"]="dodge melee",
["no insomnia"]="insomnia",
}
local genDefl={
"no clarity",
"no deathsight",
"no thirdeye",
"no dodging",
"no insomnia",
}
local utelesense={
["no telesense"]="telesense on",
}
local ualert={
["no alertness"]="alertness",
}
local hdefenses={
["no kola"]="kola"
}
local hdefensesl={
"no kola"
}
echo("1")
local canbliss
local canKola
local canFrost
if canbliss~= true and canbliss~= false then
 canbliss=true
end
if canKola~= true and canKola~= false then
 canKola=true
end
if canFrost~= true and canFrost~= false then
 canFrost=true
end
echo("2")
local def=defenselist
local afflist=afflictionlist
echo("3")
for miss, v in pairs(defenselist) do
echo("4")
	if not afflist["anorexia"]then
	echo("we got here")
		if not (afflist["web"] or afflist["hangedman"] or afflist["transfixion"]) then
			if hdefensesl[miss] and canKola then
				send("outc " .. hdefenses[miss])
				send("eat " .. hdefenses[miss])
				canKola=false;
				tempTimer( 1, [[canKola=true]])
			end
		end
	if edefensesl[miss] and ebalance then
		send("sip " .. edefenses[miss])
		ebalance=false
	end
	if speedDefl[miss] and not speedcoming then
		send(speedDef[miss])
			if afflist["stupidity"] then
				send(speedDef[miss])
			end
	end
	if frostDefl[miss] and canFrost then
		send(frostDef[miss])
		canFrost=false
		tempTimer(1,[[canFrost=true]])
	end
	end
	if blisstracker[miss] and canbliss and balance and equilibrium and not haveBliss then
		send("perform bliss xiuhcoatl")
		canbliss=false
		equilibrium=false
		tempTimer(1,[[canbliss=true]])
	end
	if LumDefensesl[miss] and balance and equilibrium then
		send(LumDefenses[miss])
		equilibrium=false
	end
	if genDefl[miss] and balance and equilibrium then
		send(genDef[miss])
		equilibrium=false
	end
	
end
end
Unsure what is wrong with this. You can see the numbers are used to keep track of where it's breaking, and it's stopping between three and four. I am unsure what is wrong with that. As defenselist is an array value.

Post Reply