Ostrich Nurse

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Ostrich Nurse

#21 Post by lisa » Sun Dec 02, 2012 2:01 am

for language independant you can use these aswell

Code: Select all

--=== The ostrich tells you its wish: ===--
if string.find(msg,RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_14\")")) then

--=== The time is up. Please get your reward from Ostrich Nurse ===--
if string.find(msg,RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_05\")")) then
Also the buff is how you tell if event is still going.

Code: Select all

        Name:   Ostrich Mood Time
        Id:     623696
        Level:  0
        TimeLeft:       18.095998764038
        Count:  1
TimeLeft is the value you want, it is in seconds, obviously if you no longer have the buff then the event is over aswell.
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

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

Re: Ostrich Nurse

#22 Post by Cindy » Sun Dec 02, 2012 2:49 am

grande wrote:I'm lost. Seems like the action at the WP1 of accepting to care for the ostrich would kick off the stuff in the onload section.
three first lines in WP1 are commented out, I thought I had to do that in order to trigger the chickens.. not sure, so I left it in commented for now.
4th line is the one to talk to the chicken and select the option to start.

I put these in WP because I daisy chain these together (will post once its all sorted out) and I like the script to move me to the start location right off the bat.

I'll look at the rest tomorrow, I am getting a bit tired, and likely to make mistakes :)

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

Re: Ostrich Nurse

#23 Post by Cindy » Sun Dec 02, 2012 2:50 am

lisa wrote:I like my way, simply because it is my way lmao
I like my way because its simpler and meets the requirements lol. (No offense intended/taken)

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

Re: Ostrich Nurse

#24 Post by lisa » Sun Dec 02, 2012 3:08 am

Cindy wrote:I like my way because its simpler and meets the requirements lol. (No offense intended/taken)
All good when I did up the code I had never done the event and didn't know the "text" was a predefined size, 6,10,14 characters in length so I was looking for the Specific combinations with the thought in mind there might be "junk" text in there aswell.
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

#25 Post by rock5 » Sun Dec 02, 2012 4:35 am

Let me take a stab at this. I'll with this code

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <!-- #  1 --><waypoint x="2437" z="1065" y="51"> EventMonitorStart("Test", "CHAT_MSG_SAY");
   player:target_NPC("Ostrich Nurse")
   ChoiceOption(1); yrest(500) -- Ok, I would like to know...
   ChoiceOption(1); yrest(500) -- I got it.
   player:target_NPC("Ostrich waiting to be looked after")
   ChoiceOption(1); -- I will fulfill your wish.
local time, moreToCome, msg = EventMonitorCheck("Test", "1") if string.find(msg, "The ostrich tells you its wish:") then

printf("PRINT SOMETHING USEFUL HERE?? BUT WHAT WOULD YOU DO WITH IT AFTER THIS LOL")
player:sleep()
end
</waypoint>
</waypoints>
First of all you have to keep checking the event monitor, not do it just once. Then I'd split the message into sections. I'd avoid using string.find from now on because I know it wont be supported in lua 5.2. So if Administrator updates mm to 5.2 then string.find wont work. In most cases string.match can take it's place.

Anyway this is how I would do it. This should be language independent. It hasn't been tested

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<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"> 
		EventMonitorStart("Test", "CHAT_MSG_SAY");
		player:target_NPC("Ostrich Nurse")
		ChoiceOption(1); yrest(500) -- Ok, I would like to know...
		ChoiceOption(1); yrest(500) -- I got it.
		player:target_NPC(GetIdName(121470)) -- "Ostrich waiting to be looked after"
		ChoiceOption(1); -- I will fulfill your wish.
		
		repeat
			local time, moreToCome, msg = EventMonitorCheck("Test", "1") 
			if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_14\")")) 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 string.match(msg,RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_05\")")) -- The time is up. Please get your reward from Ostrich Nurse
		printf("Game over.")
		player:sleep()
	</waypoint>
</waypoints>
  • 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

tajnyuser
Posts: 12
Joined: Tue Jul 03, 2012 12:41 pm

Re: Ostrich Nurse

#26 Post by tajnyuser » Sun Dec 02, 2012 5:58 am

I have a problem with your script.
1. why ChoiceOption(1); not work for me, and sendMacro("ChoiceOption(1);"); work perfect?
2. what is the problem in second error?
Attachments
errormmostrich.jpg

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

Re: Ostrich Nurse

#27 Post by lisa » Sun Dec 02, 2012 5:59 am

*mourns the death of string.find*
rock5 wrote:EventMonitorStart("Test", "CHAT_MSG_SAY");
The text itself is in the middle of screen and doesn't appear to be any of the usual text monitoring events. It's not printed to the chat window at all.
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

#28 Post by lisa » Sun Dec 02, 2012 6:02 am

tajnyuser wrote:I have a problem with your script.
1. why ChoiceOption(1); not work for me, and sendMacro("ChoiceOption(1);"); work perfect?
2. what is the problem in second error?
1. yes it should use the sendMacro or RoMScript, either would work.
2. My guess is the check to leave the repeat loop

Code: Select all

until string.match(msg,RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_05\")")) -- The time is up. Please get your reward 
if msg is nil, which it would be most of the time then you will get that error.
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

#29 Post by rock5 » Sun Dec 02, 2012 6:48 am

Ok but the line numbers of those errors don't match. :?: This should fix those 2 issues. Of course, from what Lisa says, the monitored event is still wrong.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<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"> 
		EventMonitorStart("Test", "CHAT_MSG_SAY");
		player:target_NPC("Ostrich Nurse")
		RoMScript("ChoiceOption(1)"); yrest(500) -- Ok, I would like to know...
		RoMScript(ChoiceOption(1)); yrest(500) -- I got it.
		player:target_NPC(GetIdName(121470)) -- "Ostrich waiting to be looked after"
		RoMScript("ChoiceOption(1)"); -- I will fulfill your wish.
		
		repeat
			local time, moreToCome, msg = EventMonitorCheck("Test", "1") 
			if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_14\")")) 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>
  • 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

#30 Post by lisa » Sun Dec 02, 2012 7:53 am

rock5 wrote: Of course, from what Lisa says, the monitored event is still wrong.
Yeah I am ready to give up for the night, none of the events I have tested have worked, no idea what event the text is being done for.
Even found some more events in memory that I had never seen before but no joy.

I am thinking it would be easier to modify the event monitor addon to log all messages when a function is called that tracks the event name and message, sure would make life easier.
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

#31 Post by rock5 » Sun Dec 02, 2012 8:12 am

lisa wrote:I am thinking it would be easier to modify the event monitor addon to log all messages when a function is called that tracks the event name and message, sure would make life easier.
Sorry, I'm not sure what you mean.
  • 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

#32 Post by lisa » Sun Dec 02, 2012 8:57 am

currently we need the event to monitor, ie "SYSTEM_MESSAGE"
but the addon itself gets the info from all events, So I want to check for the message only and have it return the event that had the message.

I don't know if I could explain it better without actually just doing up the code myself lol
I figured since you wrote the event monitor it would be easier for you to write it up.

so we do this in MM

Getevent(msg)

it monitors events in the addon and doing a string.find/match and if it gets a result it returns/prints the actual event and then stops monitoring.
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
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Ostrich Nurse

#33 Post by grande » Sun Dec 02, 2012 9:36 am

From the Rom-DB extractor, discerned:

-# (is from) SC_2012THANKS_NPC_121493_SYSTEM_06
#- SC_2012THANKS_NPC_121493_SYSTEM_07
*! SC_2012THANKS_NPC_121493_SYSTEM_08
** SC_2012THANKS_NPC_121493_SYSTEM_09
'* SC_2012THANKS_NPC_121493_SYSTEM_10

Seems like that would plug into what rock posted earlier... but would be an additional 5 search strings and a long (well 5 considerations for each position expanding by two positions each round: 3-5-7 or 6-10-14 depending on how you look at it) elseif type of statement?

Or maybe that could plug into Lisa's thing that had my head swimming

Couldn't I just add the above as an "and/or if" statement to:

Code: Select all

if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_14\")")) then -- "The ostrich tells you its wish:"
??

so something like

Code: Select all

if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_14\")")) and/or if SC_2012THANKS_NPC_121493_SYSTEM_06 and/or if  SC_2012THANKS_NPC_121493_SYSTEM_07 and/or if SC_2012THANKS_NPC_121493_SYSTEM_08 and or if  SC_2012THANKS_NPC_121493_SYSTEM_09 and/or if SC_2012THANKS_NPC_121493_SYSTEM_10 then -- "The ostrich tells you its wish:"
Or I guess the question is how would I include a series like that? maybe more simpler like:

Code: Select all

if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_14\"\SC_2012THANKS_NPC_121493_SYSTEM_06\"\"SC_2012THANKS_NPC_121493_SYSTEM_07\"SC_2012THANKS_NPC_121493_SYSTEM_08\"SC_2012THANKS_NPC_121493_SYSTEM_09\"SC_2012THANKS_NPC_121493_SYSTEM_10\")"))   then -- "The ostrich tells you its wish:"
Last edited by grande on Sun Dec 02, 2012 9:56 am, edited 1 time in total.

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

Re: Ostrich Nurse

#34 Post by rock5 » Sun Dec 02, 2012 9:56 am

lisa wrote:currently we need the event to monitor, ie "SYSTEM_MESSAGE"
but the addon itself gets the info from all events, So I want to check for the message only and have it return the event that had the message.
I see what you mean but the addon only registers the events it is asked to register. It doesn't monitor all events. It is theoretically possible to register a bunch of message related events and see which event a message is using but you still have to know all the message events.
grande wrote:From the Rom-DB extractor, discerned:

-# (is from) SC_2012THANKS_NPC_121493_SYSTEM_06
I don't think that's necessary as I doubt it changes in other languages
  • 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

#35 Post by grande » Sun Dec 02, 2012 10:02 am

rock5 wrote:
grande wrote:From the Rom-DB extractor, discerned:

-# (is from) SC_2012THANKS_NPC_121493_SYSTEM_06
I don't think that's necessary as I doubt it changes in other languages
But SC_2012THANKS_NPC_121493_SYSTEM_14 only prints "The ostrich tells you its wish:"

The others, 6-10 need to be monitored and acted upon

I'm having memories of conatenate stuffs and .. errrrrrr...........

lollies and fruit.... errrr

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

Re: Ostrich Nurse

#36 Post by grande » Sun Dec 02, 2012 10:10 am

So how would I modify this:

Code: Select all

if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_14\")")) then -- "The ostrich tells you its wish:"
to include these:

Code: Select all

SC_2012THANKS_NPC_121493_SYSTEM_06 
SC_2012THANKS_NPC_121493_SYSTEM_07
SC_2012THANKS_NPC_121493_SYSTEM_08
SC_2012THANKS_NPC_121493_SYSTEM_09
SC_2012THANKS_NPC_121493_SYSTEM_10

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

Re: Ostrich Nurse

#37 Post by grande » Sun Dec 02, 2012 10:22 am

Maybe something like this, but then how do I change it to move on to the next character set once a match is made? This part has to be changed, right?

Code: Select all

local wish = string.match(msg,"['#!%*%-]+")

Code: Select all

      repeat
         local time, moreToCome, msg = EventMonitorCheck("Test", "1") 
         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
         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
         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
         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
         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
So, it needs to step through the five possibilities sequentially. And then re-run the five options on the next set of two characters since they can repeat

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

Re: Ostrich Nurse

#38 Post by rock5 » Sun Dec 02, 2012 11:25 am

Let me explain it in more detail.

Lets say the message received from the event monitor is
msg = "The ostrich tells you its wish:#-*!**"

Code: Select all

			if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_14\")")) then -- "The ostrich tells you its wish:"
What this line does is say, if there is a msg and the message contains "The ostrich tells you its wish:" then. msg does contain that so it continues. You can test this out by typing this on the commandline.

Code: Select all

if string.match( "The ostrich tells you its wish:#-*!**", "The ostrich tells you its wish:") then print("true") end
At this point the value of msg hasn't changed .

Code: Select all

local wish = string.match(msg,"['#!%*%-]+")
What this does is extract the block of text from 'msg' that includes the characters !, #, ', ` and *, which is "#-*!**". This is what 'wish' now holds. You can test this by typing

Code: Select all

print(string.match("The ostrich tells you its wish:#-*!**", "['#!%*%-]+"))
This will output #-*!**. I'll fix the code above.

Next

Code: Select all

				for cmd in string.gmatch(wish) do
Oops another mistake. It should be

Code: Select all

				for cmd in string.gmatch(wish,"..") do
What this does is go though 'wish' and return every 2 characters in a loop. You can test this by doing

Code: Select all

for cmd in string.gmatch("#-*!**","..") do print(cmd) end
This will output
#-
*!
**


And lastly it uses those 2 characters to execute the command using the 'respondto' function.

Hope that made thing clearer.
  • 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

#39 Post by grande » Sun Dec 02, 2012 12:46 pm

edit: i think the missing piece is to find the actual "SC_2012THANKS_NPC_121493_SYSTEM_" part of when the ostrich says what it wants

Still not working. I did the tests from the commandline you suggested from command line but they only put out what I put in.

When I run your script it just sits there after starting the quest. When I run this thing it does the exact same thing.. just sits there after starting the quest:

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"> 
      EventMonitorStart("Test", "CHAT_MSG_SAY");
      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
         local time, moreToCome, msg = EventMonitorCheck("Test", "1") 
         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(50)
            end
	end
         local time, moreToCome, msg = EventMonitorCheck("Test", "1") 
         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(50)
            end
	end
         local time, moreToCome, msg = EventMonitorCheck("Test", "1") 
         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(50)
            end
	end
         local time, moreToCome, msg = EventMonitorCheck("Test", "1") 
         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(50)
            end
	end
         local time, moreToCome, msg = EventMonitorCheck("Test", "1") 
         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(50)
            end
         end
         yrest(20)
      until msg and string.match(msg,RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_05\")")) -- The time is up. Please get your reward from Ostrich NurseNurse
      EventMonitorStop("Test");
      printf("Game over.")
      player:sleep()
   </waypoint>
</waypoints>

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

Re: Ostrich Nurse

#40 Post by grande » Sun Dec 02, 2012 1:05 pm

Maybe it needs to monitor one of these:

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)

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests