-
kutalmismete
- Posts: 25
- Joined: Thu May 26, 2016 6:26 am
#1
Post
by kutalmismete » Fri Oct 07, 2016 8:04 am
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
Code: Select all
<?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.
-
kenzu38
- Posts: 279
- Joined: Sun Dec 02, 2012 8:52 am
#2
Post
by kenzu38 » Fri Oct 07, 2016 10:26 am
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
- Posts: 25
- Joined: Thu May 26, 2016 6:26 am
#3
Post
by kutalmismete » Sat Oct 08, 2016 4:28 am
Its defined on party.lua. Nevermind problem solved.
Code: Select all
EventMonitorStart("check", "CHAT_MSG_PARTY")
EventMonitorStart("check2", "CHAT_MSG_PARTY")
time, moreToCome, name, message = EventMonitorCheck("check","4,1",true)
time, moreToCome, name2, message2 = EventMonitorCheck("check2","4,1",true)
Monitoring twice working good like that, If anyone need.
-
Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
#4
Post
by Bill D Cat » Sat Oct 08, 2016 8:54 am
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.
-
kutalmismete
- Posts: 25
- Joined: Thu May 26, 2016 6:26 am
#5
Post
by kutalmismete » Sat Oct 08, 2016 10:17 am
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.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 19 guests