party chat monitoring
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Re: party chat monitoring
checkparty() is part of the default bot and always will be, if it isn't working then there is probably an address that needs updating after a patch.
Everything that goes into making that function work is pretty complicated and it uses half a dozen addresses and offsets to work.
I'll have a look at updating a few clients this weekend, if I can find the time, you could always narrow down the issue yourself as to why it's not working.
I have seen many posts by people lately who haven't updated the bot properly and are getting issues with incorrect addresses.
Everything that goes into making that function work is pretty complicated and it uses half a dozen addresses and offsets to work.
I'll have a look at updating a few clients this weekend, if I can find the time, you could always narrow down the issue yourself as to why it's not working.
I have seen many posts by people lately who haven't updated the bot properly and are getting issues with incorrect addresses.
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: party chat monitoring
About 10 patches later I updated 1 of my machines and tested the checkparty()
Works perfectly......
So you must need to update bot or something because it works fine for me.
Works perfectly......
So you must need to update bot or something because it works fine for me.
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
-
- Posts: 46
- Joined: Tue Dec 06, 2011 12:17 pm
Re: party chat monitoring
Hmmmm, but how to do this? I mean an update? After every patch or fix i´ll follow all these steps you wrote below your avatar. Thats the way to update MM, isn´t it?
Edit: Btw can you upload the userfunction again. I look in this topic and its no longer available. And i deleted it from userfunctions folder
Edit: Btw can you upload the userfunction again. I look in this topic and its no longer available. And i deleted it from userfunctions folder
Re: party chat monitoring
Except after the last patch there was no bot update so when you got the error saying "run 'rom/update'" you need to follow that step. A lot of people don't do that instead they start a topic saying it doesn't work.miesermetzler wrote:Hmmmm, but how to do this? I mean an update? After every patch or fix i´ll follow all these steps you wrote below your avatar. Thats the way to update MM, isn´t it?
I've been thinking maybe, if update.lua works after a patch, we should commit the updated addresses.lua file anyway, just to avoid these problems.lisa wrote:I have seen many posts by people lately who haven't updated the bot properly and are getting issues with incorrect addresses.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: party chat monitoring
--=== Moves discussion out of my userfunction topic to dev section ===--
LOL
LOL
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: party chat monitoring
I have a quick question about how the code you posted for the eventParty() works.
looking at that, it almost looks like after the monitor starts, as soon as any text comes through party chat, it will check if it equals "ready" and if so, it will do stuff, then regardless of what was in the text, it will stop the eventParty function. Am I reading that wrong? if the received message was "wait", it wouldn't do stuff but it would still stop the eventParty monitor? Should the eventParty("stop") be inside the if statement?
Code: Select all
eventParty()
repeat
local msg,name = checkEventParty()
yrest(1000)
until msg ~= nil
if msg == "ready" then
--do stuff
end
eventParty("stop")
Re: party chat monitoring
eventParty()
repeat
local msg,name = checkEventParty()
yrest(1000)
until msg == "ready"
-- do stuff
eventParty("stop")
that's how i use it. besides the fact that i try to use more complex text messages in scripts since i want to identify all of them individually...
repeat
local msg,name = checkEventParty()
yrest(1000)
until msg == "ready"
-- do stuff
eventParty("stop")
that's how i use it. besides the fact that i try to use more complex text messages in scripts since i want to identify all of them individually...
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: party chat monitoring
I can get it to recognize that a message was received and the monitor will stop, but I can't get it to do anything with the message that was received. Take this for example. Depending on if the message is mount, follow, getquest, or aceptquest, I have set up other functions to do. None of them are doing anything some I've reduced it to print messages:
I've tried that with the message being "mount". It sees it and stops the event listener, but never prints anything. If I put an fprint to show me what msg is, it always errors out and says it's nil. does the event function not return the actual message anywhere? How would I do this to call a certain function if msg is one of the four messages I want?
Code: Select all
function QBF_startchoosefunction()
eventParty()
repeat
local msg,name = checkEventParty()
yrest(500)
until msg ~= nil
if msg == "mount" then
print("equals mount");
end
if msg == "follow" then
print("equals follow");
end
if msg == "getquest" then
print("equals getquest");
end
if msg == "completequest" then
print("equals completequest");
end
eventParty("stop")
if msg == "mount" then
print("equals mount");
end
if msg == "follow" then
print("equals follow");
end
if msg == "getquest" then
print("equals getquest");
end
if msg == "completequest" then
print("equals completequest");
end
end
Re: party chat monitoring
ok so it gets a msg ~= nil
and then checks if the msg is any of those you check for, regardless of if it is any or isn't it will get to the
So if nothing is printed then it is saying that msg isn't anything you checked for.
Just add a print after the check for it ~= nil like this
You will then atleast see what the msg is.
If you want to look at a more complex example of monitoring this is in party.lua
Code: Select all
repeat
local msg,name = checkEventParty()
yrest(500)
until msg ~= nil
Code: Select all
eventParty("stop")
Just add a print after the check for it ~= nil like this
Code: Select all
function QBF_startchoosefunction()
eventParty()
repeat
local msg,name = checkEventParty()
yrest(500)
until msg ~= nil
print("Msg: "..msg.." Name: "..name) -- I added this line.
if msg == "mount" then
If you want to look at a more complex example of monitoring this is in party.lua
Code: Select all
function partyCommands()
local _message , _name = checkEventParty()
if _message then
--=== check type of command ===--
local _npc, _quest, _command, _choice, _action
_quest = string.match(_message,"quest\"(.*)\"")
_npc = string.match(_message,"npc\"(.*)\"")
_command = string.match(_message,"com\"(.*)\"")
_action = string.match(_message,"code\"(.*)\"")
if _quest then _quest = string.lower(_quest) end
if _npc then _npc = string.lower(_npc) end
if _command then _command = string.lower(_command) end
if _quest then
local quest, status = getQuestNameStatus(_quest)
if quest == nil then
sendPartyChat("no quest with that name")
else
if status then
sendPartyChat("quest: "..quest.." ,completed")
else
sendPartyChat("quest: "..quest.." ,incomplete")
end
end
elseif _npc == "sell" then
local npc = getTarget(_name)
if npc then
player:merchant(npc.Name)
sendPartyChat("finished with NPC")
else
sendPartyChat("npc: No target")
end
elseif _npc == "accept" or _npc == "complete" then
local npc = getTarget(_name)
if npc then
player:target_NPC(npc.Name)
CompleteQuestByName()
player:target_NPC(npc.Name)
AcceptQuestByName()
sendPartyChat("finished with NPC")
else
sendPartyChat("npc: No target")
end
elseif _npc then
local npc = getTarget(_name)
if npc then
player:target_NPC(npc.Name)
if ChoiceOptionByName(_npc) then
sendMacro('} if StaticPopup1:IsVisible() then StaticPopup_OnClick(StaticPopup1, 1) end a={')
waitForLoadingScreen(10)
sendPartyChat("ok choice option done")
else
sendPartyChat("no option available by that name")
end
else
sendPartyChat("npc: No target")
end
elseif _command == "nofollow" then
keyboardPress(settings.hotkeys.MOVE_FORWARD.key);
stop = true
sendPartyChat("stopped following")
elseif _command == "follow" then
stop = false
sendPartyChat("following")
elseif _command == "farm" then
if not healer then
settings.profile.options.ICON_FIGHT = false
sendPartyChat("Set to farm mobs")
end
elseif _command == "icon" then
settings.profile.options.ICON_FIGHT = true
sendPartyChat("Set to kill icon I")
elseif _command == "portal" then
if GoThroughPortal then
if GoThroughPortal(200) == true then
sendPartyChat("I should be through the portal now")
else
sendPartyChat("I didnt see a loadingscreen, please check I went through portal")
end
else
sendPartyChat("please get GoThroughPortal to make that work")
end
elseif _action then
local docode = loadstring(_action);
if docode then docode() else sendPartyChat("Bad code, try again") end
end
end
end
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: party chat monitoring
Ok, I tried what you had and I still got nil.
i then did it without declaring msg and name as local and it worked:
does that declare it as local inside the checkEventParty() function or something? I don't see why it's not available if it's set local.
Code: Select all
eventParty()
repeat
local msg, name = checkEventParty()
yrest(100)
until msg ~= nil
print("Msg: "..msg) -- I added this line.
eventParty("stop")
Code: Select all
eventParty()
repeat
msg, name = checkEventParty()
yrest(100)
until msg ~= nil
print("Msg: "..msg) -- I added this line.
eventParty("stop")
Re: party chat monitoring
I was was just going to say that but you worked it out yourself. Well done!
You should still declare it local to the function but outside the repeat loop.
You should still declare it local to the function but outside the repeat loop.
Code: Select all
eventParty()
local msg, name
repeat
msg, name = checkEventParty()
yrest(100)
until msg ~= nil
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: party chat monitoring
Hey lisa, just wanted to ask how I can get the bot to monitor if the party leader is targeting an NPC with party bot?
What I'd like is for the bot to recognize that the char I'm playing manually is targeting an NPC and then the party bots will automatically target that NPC as well and accept or complete all quests of that NPC.
Thanks.
What I'd like is for the bot to recognize that the char I'm playing manually is targeting an NPC and then the party bots will automatically target that NPC as well and accept or complete all quests of that NPC.
Thanks.
Re: party chat monitoring
when you target the NPC just type in party chat
All party bots will target your target and then do this code.
To make party bot automatically check for the party leaders target would be a waste, IMHO.
Just set up little macros that do the party chats for you and then add the macros to a side bar, it's very easy.
BTW this topic is obsolete now, head to this topic for party bot questions/answers.
http://www.solarstrike.net/phpBB3/viewt ... =21&t=4402
Code: Select all
npc"accept"
Code: Select all
player:target_NPC(npc.Name)
CompleteQuestByName()
player:target_NPC(npc.Name)
AcceptQuestByName()
sendPartyChat("finished with NPC")
Just set up little macros that do the party chats for you and then add the macros to a side bar, it's very easy.
BTW this topic is obsolete now, head to this topic for party bot questions/answers.
http://www.solarstrike.net/phpBB3/viewt ... =21&t=4402
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Who is online
Users browsing this forum: Semrush [Bot] and 20 guests