Ostrich Nurse

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Ostrich Nurse

#41 Post by grande » Sun Dec 02, 2012 1:32 pm

nevermind

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ostrich Nurse

#42 Post by rock5 » Sun Dec 02, 2012 2:04 pm

grande wrote:Still not working.
Well of course not. As was previously stated we still haven't got the right event to monitor for the messages.
rock5 wrote:Of course, from what Lisa says, the monitored event is still wrong.
I wrote the code. I believe Lisa was looking for the event but I think she's given up for now.

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

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Ostrich Nurse

#43 Post by grande » Sun Dec 02, 2012 3:43 pm

Anyone able to test these? I don't think I'm testing it correctly:

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)
or

Code: Select all

SYS_QUEST_TEST    (Str1 %s Val1 %d Str2 %s)

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Ostrich Nurse

#44 Post by grande » Sun Dec 02, 2012 8:04 pm

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:

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>

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ostrich Nurse

#45 Post by lisa » Sun Dec 02, 2012 10:11 pm

grande wrote:Regardless, I still cannot find how to monitor the "ostrich wish" string.
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.
example:

Code: Select all

The ostrich tells you its wish:-##-#--##-#-#-
We are using the SC_2012THANKS_NPC_121493_SYSTEM_14 so identify the string as the message that contains the "wish" and we use that SC_2012THANKS_NPC_121493_SYSTEM_14 so that it will work for any and all language versions of the game.

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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ostrich Nurse

#46 Post by lisa » Sun Dec 02, 2012 10:22 pm

rock5 wrote: So that code wont work until the correct event is found.
doesn't this part of the xml call the function for every single event?

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>
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.
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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ostrich Nurse

#47 Post by lisa » Sun Dec 02, 2012 11:13 pm

lisa 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
looks like this

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
with a WP like this

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>
which works but the event we want isn't any of those in the table.
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ostrich Nurse

#48 Post by rock5 » Mon Dec 03, 2012 1:41 am

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.
Attachments
ostrichnurse.xml
(1.8 KiB) Downloaded 272 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ostrich Nurse

#49 Post by lisa » Mon Dec 03, 2012 1:58 am

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
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ostrich Nurse

#50 Post by rock5 » Mon Dec 03, 2012 2:55 am

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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ostrich Nurse

#51 Post by lisa » Mon Dec 03, 2012 3:01 am

rock5 wrote:Working script 2 posts up.
time to post it in userfunction section now it actually works ?
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ostrich Nurse

#52 Post by rock5 » Mon Dec 03, 2012 3:38 am

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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ostrich Nurse

#53 Post by lisa » Mon Dec 03, 2012 3:48 am

rock5 wrote:Hardly seems worth it.
awww come on don't belittle the event, I mean max score gets you 3 vouchers that is like a party in your pants lmao
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ostrich Nurse

#54 Post by rock5 » Mon Dec 03, 2012 3:52 am

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ostrich Nurse

#55 Post by rock5 » Mon Dec 03, 2012 4:12 am

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

kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

Re: Ostrich Nurse

#56 Post by kkulesza » Mon Dec 03, 2012 11:37 am

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.

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Ostrich Nurse

#57 Post by grande » Mon Dec 03, 2012 12:29 pm

Rock, Lisa, Cindy, solarstrike folks: many many thanks!

s018mes
Posts: 79
Joined: Sun Jan 16, 2011 11:14 am

Re: Ostrich Nurse

#58 Post by s018mes » Mon Dec 03, 2012 4:28 pm

Yes, thank you guys for working on this. It was very fun to read how you guys work together!

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Ostrich Nurse

#59 Post by Cindy » Mon Dec 03, 2012 4:29 pm

Awesome work, was fun.

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)
(Will get tested in a bit).

Scorpio pet crystal is one of the rewards, worth doing for those.

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Ostrich Nurse

#60 Post by grande » Mon Dec 03, 2012 6:02 pm

lisa wrote:
rock5 wrote:Hardly seems worth it.
awww come on don't belittle the event, I mean max score gets you 3 vouchers that is like a party in your pants lmao
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.

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 53 guests