Ostrich Nurse
Re: Ostrich Nurse
Well of course not. As was previously stated we still haven't got the right event to monitor for the messages.grande wrote:Still not working.
I wrote the code. I believe Lisa was looking for the event but I think she's given up for now.rock5 wrote:Of course, from what Lisa says, the monitored event is still wrong.
So that code wont work until the correct event is found.
- 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: Ostrich Nurse
Anyone able to test these? I don't think I'm testing it correctly:
or
Code: Select all
QUEST_MSG_GET_ITEM (%s: %s %d/%d)
QUEST_MSG_KILL_MONSTER (%s: %s %d/%d)
QUEST_MSG_REQUEST_ITEM (%s%s %d/%d%s)
QUEST_MSG_REQUEST_KEYITEM (%s%s)
QUEST_MSG_REQUEST_KILL (%s%s %d/%d%s)
Code: Select all
SYS_QUEST_TEST (Str1 %s Val1 %d Str2 %s)
Re: Ostrich Nurse
Was another error a few posts back. Basically, the eventstartmonitor didn't match the string.match part. Regardless, I still cannot find how to monitor the "ostrich wish" string.
Tried with just "14" and also 06-10:
Tried with just "14" and also 06-10:
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
function respondto(ostrichcmd)
if ostrichcmd == "-#" then RoMScript("UseExtraAction(1)")
elseif ostrichcmd == "#-" then RoMScript("UseExtraAction(2)")
elseif ostrichcmd == "*!" then RoMScript("UseExtraAction(3)")
elseif ostrichcmd == "**" then RoMScript("UseExtraAction(4)")
elseif ostrichcmd == "'*" then RoMScript("UseExtraAction(5)")
else
printf("You gave me garbage : "..ostrichcmd)
end
end
</onload>
<!-- # 1 --><waypoint x="2437" z="1065" y="51">
player:target_NPC("Ostrich Nurse")
sendMacro("ChoiceOption(1);"); yrest(500) -- Ok, I would like to know...
sendMacro("ChoiceOption(1);"); yrest(500) -- I got it.
player:target_NPC(GetIdName(121470)) -- "Ostrich waiting to be looked after"
sendMacro("ChoiceOption(1);"); -- I will fulfill your wish.
repeat
EventMonitorStart("Test", "SC_2012THANKS_NPC_121493_SYSTEM_06");
EventMonitorStart("Test", "SC_2012THANKS_NPC_121493_SYSTEM_07");
EventMonitorStart("Test", "SC_2012THANKS_NPC_121493_SYSTEM_08");
EventMonitorStart("Test", "SC_2012THANKS_NPC_121493_SYSTEM_09");
EventMonitorStart("Test", "SC_2012THANKS_NPC_121493_SYSTEM_10");
local time, moreToCome, msg = EventMonitorCheck("Test")
if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_06\")")) then -- "The ostrich tells you its wish:"
local wish = string.match(msg,"['#!%*%-]+")
-- Iterate through every 2 characters
for cmd in string.gmatch(wish,"..") do
respondto(cmd)
yrest(100)
end
end
yrest(100)
local time, moreToCome, msg = EventMonitorCheck("Test")
if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_07\")")) then -- "The ostrich tells you its wish:"
local wish = string.match(msg,"['#!%*%-]+")
-- Iterate through every 2 characters
for cmd in string.gmatch(wish,"..") do
respondto(cmd)
yrest(100)
end
end
yrest(100)
local time, moreToCome, msg = EventMonitorCheck("Test")
if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_08\")")) then -- "The ostrich tells you its wish:"
local wish = string.match(msg,"['#!%*%-]+")
-- Iterate through every 2 characters
for cmd in string.gmatch(wish,"..") do
respondto(cmd)
yrest(100)
end
end
yrest(100)
local time, moreToCome, msg = EventMonitorCheck("Test")
if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_09\")")) then -- "The ostrich tells you its wish:"
local wish = string.match(msg,"['#!%*%-]+")
-- Iterate through every 2 characters
for cmd in string.gmatch(wish,"..") do
respondto(cmd)
yrest(100)
end
end
yrest(100)
local time, moreToCome, msg = EventMonitorCheck("Test")
if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_10\")")) then -- "The ostrich tells you its wish:"
local wish = string.match(msg,"['#!%*%-]+")
-- Iterate through every 2 characters
for cmd in string.gmatch(wish,"..") do
respondto(cmd)
yrest(100)
end
end
yrest(100)
until msg and string.match(msg,RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_05\")")) -- The time is up. Please get your reward from Ostrich Nurse
EventMonitorStop("Test");
printf("Game over.")
player:sleep()
</waypoint>
</waypoints>
Re: Ostrich Nurse
If and when we eventually get the message from the event monitor addon the actual string returned will have all of the message altogether in 1 string.grande wrote:Regardless, I still cannot find how to monitor the "ostrich wish" string.
example:
Code: Select all
The ostrich tells you its wish:-##-#--##-#-#-
So once we identify it as a "wish" message all we need to do is get the -#*! characters of that message because the rest means nothing to us. So with the code rock posted it will get just the -##-#--##-#-#- from the message example above. Which is all that we want. We then do a check for the patterns that correspond to the skills and bingo, job done.
The ONLY thing stopping this from working is identifying what event the message is being sent to, the rest is all done and worked out =)
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: Ostrich Nurse
doesn't this part of the xml call the function for every single event?rock5 wrote: So that code wont work until the correct event is found.
Code: Select all
<OnEvent>
-- call the OnEvent method on our Addon (runs every time an event fires)
igf_events:OnEvent(this, event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
</OnEvent>
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: Ostrich Nurse
looks like thislisa wrote:If not then I guess the easiest way would be to make a function that starts up a seperate monitor for all the usual chat/message events and then get it to match a string to the messages and if found then stop all monitoring and print the event type and message
Code: Select all
function scanevent(_msg,_stop)
local events = {
"WARNING_MESSAGE","SCROLL_BANNER_MESSAGE","SHOW_MESSAGE_DIALOG",
"SYSTEM_MESSAGE","MESSAGE_NORMAL","CHAT_MSG_EMOTE",
"CHAT_MSG_GM_TALK","CHAT_MSG_GM","CHAT_MSG_SAY",
"CHAT_MSG_SYSTEM_GET","CHAT_MSG_SYSTEM_VALUE",
"CHAT_MSG_SYSTEM","CHAT_MSG_WHISPER_INFORM",
"CHAT_MSG_WHISPER_OFFLINE","CHAT_MSG_WHISPER",
"CHAT_MSG_YELL","SYSTEM_MESSAGE"}
local function stoptest()
unregisterTimer("EVENTtest");
for i = 1,#events do
EventMonitorStop("EVENT"..i)
end
end
if _stop then stoptest() return end
for k,v in ipairs(events) do
EventMonitorStart("EVENT"..k, v)
end
local function testevent()
for k,v in ipairs(events) do
local time, moreToCome, name, msg = EventMonitorCheck("EVENT"..k, "4,1")
if msg and string.find(msg, _msg) then print(v.." "..msg) end
end
end
registerTimer("EVENTtest", secondsToTimer(1), testevent);
end
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
scanevent("ostrich")
for i = 1,30 do
yrest(1000)
end
scanevent(nil,true)
player:sleep()
</onLoad>
</waypoints>
it prints this when doing the event
Code: Select all
CHAT_MSG_SYSTEM |cfffff266The ostrich glares at you.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich glares at you.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich glares at you.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich glares at you.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich glares at you.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich winks at you happily.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich winks at you happily.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich winks at you happily.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich winks at you happily.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich winks at you happily.|r
CHAT_MSG_SYSTEM |cfffff266The ostrich glares at you.|r
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: Ostrich Nurse
Ok we found the event. I've tested it, added timing and casting checks and ran a few characters through it. It works perfectly.
The highest score you can get is 30 and this does it very easily.
The highest score you can get is 30 and this does it very easily.
- Attachments
-
- ostrichnurse.xml
- (1.8 KiB) Downloaded 279 times
- 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: Ostrich Nurse
just scored max 30 manually
30 you get 3 vouchers + crappy phirius pot
28 you get 3 vouchers
24 you get 3 vouchers
22 you get 2 vouchers
30 you get 3 vouchers + crappy phirius pot
28 you get 3 vouchers
24 you get 3 vouchers
22 you get 2 vouchers
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: Ostrich Nurse
Working script 2 posts up.
- 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: Ostrich Nurse
time to post it in userfunction section now it actually works ?rock5 wrote:Working script 2 posts up.
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: Ostrich Nurse
Hardly seems worth it.
- 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: Ostrich Nurse
awww come on don't belittle the event, I mean max score gets you 3 vouchers that is like a party in your pants lmaorock5 wrote:Hardly seems worth it.
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: Ostrich Nurse
Well... there is a banquet event post in the userfunctions section. It could be posted there. I think that post is about all the events.
- 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: Ostrich Nurse
I guess now the question is, what rewards do you get for the Banquet Vouchers?
- 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: Ostrich Nurse
For 20 vouchers you get a guild donation package. There is 200 guild rubies in it and other mats. But You have to be in a guild castle to open it. That package is automaticly donated to the guild.
There are also other typical event rewards.
There are also other typical event rewards.
Re: Ostrich Nurse
Rock, Lisa, Cindy, solarstrike folks: many many thanks!
Re: Ostrich Nurse
Yes, thank you guys for working on this. It was very fun to read how you guys work together!
Re: Ostrich Nurse
Awesome work, was fun.
Here is code to add at the pause if you want to use the package:
(Will get tested in a bit).
Scorpio pet crystal is one of the rewards, worth doing for those.
Here is code to add at the pause if you want to use the package:
Code: Select all
<!-- Use the Ostrich Salvation Package Charges -->
local item = inventory:findItem("Ostrich Salvation Package");
repeat
if item ~= nil then inventory:useItem("Ostrich Salvation Package"); end
inventory:update()
item = inventory:findItem("Ostrich Salvation Package");
until (item == nil)
Scorpio pet crystal is one of the rewards, worth doing for those.
Re: Ostrich Nurse
Hey now, those nickels and dimes add up! After ten transport portal rune trade-ins (gives TWO event repeat tickets each rune trade) that's 60 more vouchers or 3 more prizes.lisa wrote:awww come on don't belittle the event, I mean max score gets you 3 vouchers that is like a party in your pants lmaorock5 wrote:Hardly seems worth it.
But... I'm more interested in the message testing which I seem to be horrible at.
Last edited by grande on Mon Dec 03, 2012 6:13 pm, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 2 guests