Here is my waypoint file. I need multi-monitoring party chat but its working random, I mean when I write "buff" it doesn't working but if i spam that it working sometimes.I need multithread method I don't know much about that so I tried it with writing a function for that. Still same. I need a code for monitoring party chat twice. If I write "buff" it will goes to DruidBuff.xml waypoint file, if I write "Go!" it starts Druid.xml. Thanks
<?xml version="0.1" encoding="utf-8"?><waypoints>
<onLoad>
function getCD(ID)
local offset = memoryReadRepeat("int", getProc(), GetItemAddress(ID) + addresses.skillRemainingCooldown_offset) or 0
if offset and offset ~= 0 then
return (memoryReadRepeat("int", getProc(), addresses.staticCooldownsBase + (offset+1)*4) or 0)/10
end
return 0
end
function checkMessagesFromParty(_string, _string1, _string2)
eventparty("".._string1.."")
repeat
_string = checkeventparty("".._string1.."", "".._string2.."")
until _string
return true
end
repeat
player:update();
RoMScript("TargetUnit('raid1');");
RoMScript("FollowUnit('raid1');");
checkMessagesFromParty(a, "nick", "Go!")
checkMessagesFromParty(b, "nick", "buff")
until a or b
if a then
RoMScript("UseAction(1)")
yrest(100)
loadPaths("Druid");
elseif b then
sendPartyChat('Buffing...')
yrest(100)
loadPaths("DruidBuff");
end
</onLoad>
</waypoints>
Last edited by kutalmismete on Tue Nov 01, 2016 4:00 am, edited 1 time in total.
Just checked and there's no checkeventparty function, at least in my bot folders. Is it something you wrote? If it is, you'll have to post it here as it might be the reason for the error. party.lua has checkEventParty, notice the uppercases.
kutalmismete wrote:Its defined on party.lua. Nevermind problem solved.
The function checkEventParty() is defined in party.lua, and the function name is case sensitive.
However, there is no definition in party.lua for an all lowercase checkeventparty() function name as you originally posted.
All bot function names are case sensitive. That's the point that kenzu38 was making.
Unfortunately, I got that code from another topic and it was working with "checkeventparty" function. But when I put second checker, whole waypoint only running second wrote function. But I checked inside of that function, now its working.