valid_target = {
["a large rabbit with one black ear"] = true,
["a brown floppy-eared rabbit"] = true,
["a creamy white goat"] = true,
}
function autoTarget()
sendGMCP("Char.Items.Room")
if gmcp.Char.Items.List.location == "room" then
for k,v in ipairs(gmcp.Char.Items.List.items) do
if valid_target[v.name] then
tar = v.id
end--if
end--For
end--If
end--autoTarget
function autoAssault()
if tar then
send("doublewhirl " .. tar)
end--if
end--autoAssault()
Comments
Should fix it. You'll want to make it so it only runs autoTarget on entry or when the mob dies, though. Otherwise it'll just be constantly setting. Alternatively make it not search the room table if your target's still in the room.
@Ryzeth thanks wasn't aware I could do something like that. I'll add it in.
function autoAssault() if tonumber(string.match(gmcp.Char.Vitals.charstats[2], "%d+")) >= 17 and rage_backfist then send("sbp " .. tar) end--if if tar and gmcp.Char.Vitals.charstats[4] == "willow" then send("combo " .. tar .. " flashheel left hiraku dart head") elseif tonumber(kata_chain) == 12 and gmcp.Char.Vitals.charstats[4] == "willow" then send("transition to rain form") send("combo " .. tar .. " frontkick left kuro right ruku torso") end--if end--autoAssault()
For some reason, it isn't doing anything and I can't figure out what I am doing wrong with the code. Anyone that can take a look and help me resolve it by explaining where I screwed up, would be greatly appreciated. Thanks.
Also does Shikudo stance save just with the name? Or is the table value listed as 'Stance: willow' etc?
Even when I am in willow form it still won't do anything.
You'll still have to build on that for when you're not in willow form, though.
Capitalisation matters, folks.
function autoAssault() local rage = tonumber(string.match(gmcp.Char.Vitals.charstats[2], "Rage: (%d+)")) local form = string.match(gmcp.Char.Vitals.charstats[4], "Form: (%w+)") if rage >= 17 and rage_backfist then send("sbp " .. tar) end if tar and tonumber(kata_chain) <= 10 and(form == "Willow") then send("combo " .. tar .. " flashheel left hiraku dart head") elseif tonumber(kata_chain) >= 10 and form =="Willow" then send("transition to rain form") send("combo " .. tar .. " frontkick left kuro right ruku torso") end if tar and tonumber(kata_chain) <= 23 and (form == "Rain") then send("combo " .. tar .. " frontkick left kuro right ruku torso") elseif tonumber(kata_chain) >= 24 and (form == "Rain") then send("transition to oak form") send("combo " .. tar .. " livestrike ruku torso risingkick head") end if tar and tonumber(kata_chain) <= 12 and (form == "Oak") then send("combo " .. tar .. " livestrike livestrike risingkick head") elseif tonumber(kata_chain) >= 12 and (form == "Oak") then send("transition to willow form") send("combo " .. tar .. " flashheel left hiraku dart head") end end
This is the script so far. I am posting it here in case anyone else wants is messing with Shikudo and wants or needs a basic hunting setup. Feel free to build off it, post improvements, etc etc. Thanks goes to @Ryzeth for getting it started!
Doesn't matter if you just lower() like you should.