Lamkefyned´s Graffu Farm

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#21 Post by Lamkefyned » Wed Feb 05, 2014 2:22 pm

thank you very much
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#22 Post by Lamkefyned » Sun Feb 09, 2014 11:07 am

Hi, I just need one thing

How to create a menu to jump to tags

Code: Select all

if you get one that goes to tag BOS1
If you think something is right just because everyone else believes,you're not thinking.

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

Re: AMBOLIA´s Graffu Farm first,two,three boss

#23 Post by rock5 » Sun Feb 09, 2014 11:34 am

Just print the options, get the user input with io.stdin:read(), then go to the tag selected by the user. Eg.

Code: Select all

print("Here are the options:")
print("   1. One")
print("   2. Two")
print("   3. Three")
printf("Enter a number > ")
local selected = io.stdin:read()
if selected == 1 then 
    __WPL:setWaypointIndex(__WPL:findWaypointTag("One"))
elseif selected == 2 then 
    __WPL:setWaypointIndex(__WPL:findWaypointTag("Two"))
elseif selected == 3 then 
    __WPL:setWaypointIndex(__WPL:findWaypointTag("Three"))
end
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#24 Post by Lamkefyned » Wed Feb 12, 2014 5:13 pm

this can be done?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
    <!-- ***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
***********************************                                                               AMBOLIA SCRPT GRAFFU´S FARM BETA V1
***********************************
***********************************                                                                         05/02/2014
***********************************
***********************************                                                                                 
***********************************
***********************************
***********************************
**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************	-->

    <!--************************************************************************************************************ FUNCTION SETWINDOW ************************************************************************************************************ -->
         setwindow ("mem")

    <!-- *********************************************************************************************************** FUNCTION CHOICE NUMBER RUN ************************************************************************************************* -->
		 		Nbrun = 0
		repeat
			cprintf(cli.lightgreen,"\n\n\n          Welcome On Graffu's farm !\n\n") 
			print("Choose run's number: ")
			print("\nNbrun>")
			Nbrun = io.stdin:read()
			Nbrun = tonumber(Nbrun)
		until Nbrun and Nbrun > 0
		
		cprintf(cli.blue, "\n\n				Have nice farm on Graffu V1.0 !\n				Create by AMBOLIA !\n\n\n")
	
		if Nbrun > 157
			then cprintf(cli.red,"\n\n Sorry, Maximum is 157 ! Because 157*19=2983 ! You can't have more of 2983 Mementos \n\n")
			yrest(3000)
			loadPaths(__WPL.FileName);
		end
		
		SlashCommand("aid easy")
		
	<!-- *********************************************************************************************************** FUNCTION WARDEN_SUMMON_CHIRON_THE_CENTAUR *********************************************************************  -->
			function Summon()
			player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR")
		end

	<!--  ********************************************************************************************************** FUNCTION TO DEFINE ORIGIN'S WAYPOINT  ************************************************************************************* -->
			__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))

	<!--  ********************************************************************************************************** FUNCTION UNBRIDLED ENTHUSIAM+LUCKY TARGET  ************************************************************************** -->
		function Buff()
			player:update()
			if not player:hasBuff("506684") 
				then inventory:useItem(207200);
			end
			
			if (not player:hasBuff("506687")) 
				then inventory:useItem(207203);
			end 
		end
		
	<!--  *********************************************************************************************************** FUNCTION COUNT SELL  ************************************************************************************************************** -->
		Mcount = 0
		function Mcountround()
			Mcount = Mcount+1;
		end
		
	<!--  *********************************************************************************************************** FUNCTION COUNT DEAD  ************************************************************************************************************** -->
		Dcount = 0
		function Dcountround()
			Dcount = Dcount+1;
		end	
		
	<!--  *********************************************************************************************************** FUNCTION COUNT BUG  **************************************************************************************************************** -->
		Bcount = 0
		function Bcountround()
			Dcount = Bcount+1;
		end	
		
	<!--  ********************************************************************************************************** FUNCTION COUNT ANCIENT MEMENTO  ********************************************************************************************** -->
		Acount = 0
		function Acountround()
			Acount = Count*19;
		end
		
	<!--  ********************************************************************************************************** FUNCTION COUNT RUN  ******************************************************************************************************************* -->
		Count = 0
		function Countround()
			Count = Count+1;
		end
		
	<!--  ********************************************************************************************************** FUNCTION NUMBER RUN & CHECK MEMENTO'S NUMBER  ************************************************************************* -->
		function number()
			End = 0
			if ( Nbrun == Count )
				then printf("\n\n All run done !\n\n");
				End = 1
				SlashCommand("ILG destroy")
				waitForLoadingScreen()
				__WPL:setWaypointIndex(__WPL:findWaypointTag("return"))
			end
			
			Mentos = getCurrency("mento")
			if ( Mentos == 2983 )
				then printf("\n\n Full Ancient Memento !\n\n");
				End = 1
				SlashCommand("ILG destroy")
				waitForLoadingScreen()
				__WPL:setWaypointIndex(__WPL:findWaypointTag("return"))			
			end
		end
		
	<!--  *********************************************************************************************************** FUNCTION NUMBER RUN & CHECK MEMENTO'S NUMBER  **************************************************************************** -->
		function lastrun()
			restmentos = 2983 - Mentos;
			lrun= restmentos / 19 ;		
		end
		
	<!--  *********************************************************************************************************** FUNCTION CHECK BAG  *********************************************************************************************************************** -->
		function bag()
			Rightbag = 0
			if ( Rightbag == 0 )
				then
					local bcount = inventory:getItemCount(0)
					if(  5 > bcount ) 
						then
							SlashCommand("ILG destroy")
							waitForLoadingScreen()
							SlashCommand("ILG inv")
							__WPL:setWaypointIndex(__WPL:findWaypointTag("return"))
					end
			end		
		end
				
	<!--  *********************************************************************************************************** FUNCTION GROUP  ******************************************************************************************************************************* -->
		function ireset()
			SlashCommand("ILG destroy")
			yrest(500)
			SlashCommand("ILG inv")
		end		
		
	<!--  ********************************************************************************************************** FUNCTION TELEPORT PNJ  ********************************************************************************************************************** -->
		function tp()
		    teleportToWP()
		end

	<!--  ********************************************************************************************************** FUNCTION INFORMATION  ************************************************************************************************************************* -->
		function Info()
			cprintf(cli.pink, "\n\nNbr Round done: %s for %s Mementos win !\n", Count, Acount)
			cprintf(cli.pink, "You have %s Mementos ! You chose %s run ! You can do again %s run ! \n",Mentos, Nbrun, lrun)
			cprintf(cli.yellow, "Nbr Sell: %s \n", Mcount)
			cprintf(cli.red, "Nbr Dead: %s and Nbr Bug: %s\n\n", Dcount, Bcount)
		end
</onLoad>
						<!--  *********************************************************************************************************** WAYPOINT ENTRAR EN GRUPO Y ENTRAR EN GRAFFU  ******************************************************** -->
	<!-- #  1 -->	<waypoint x="-8472" z="45468" y="758" tag="start" type="TRAVEL"> changeProfileOption("LOOT",false); ireset() </waypoint>
<Onload>
		 		Nbrun = 0
		repeat
			cprintf(cli.lightgreen,"\n\n\n          Welcome On Graffu's farm !\n\n") 
			print("Choose run's number: ")
			print("\nNbrun>")
			Nbrun = io.stdin:read()
			Nbrun = tonumber(Nbrun)
		until Nbrun and Nbrun > 0
		
		cprintf(cli.blue, "\n\n				Have nice farm on Graffu V1.0 !\n				Create by AMBOLIA !\n\n\n")
	
		if Nbrun > 157
			then cprintf(cli.red,"\n\n Sorry, Maximum is 157 ! Because 157*19=2983 ! You can't have more of 2983 Mementos \n\n")
			yrest(3000)
			loadPaths(__WPL.FileName);
		end
		
		SlashCommand("aid easy")
</Onload>
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#25 Post by Lamkefyned » Fri Feb 14, 2014 6:13 pm

Because of me this error?

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onLoad>
    <!--**********************************************************************************************************************************************************************************************************************-->
    <!--***********************************                                  AMBOLIA SCRPT GRAFFU´S FARM                                                                                   ***********************************-->
    <!--***********************************                                                                                                                                                ***********************************-->
    <!--***********************************                                            Version Stable V1                                                                                   ***********************************-->
    <!--***********************************                                                                                                                                                ***********************************-->
    <!--***********************************                                                   15/02/2014                                                                                   ***********************************-->
    <!--***********************************                                                                                                                                                ***********************************-->
    <!--***********************************                                                                          Support: http://www.solarstrike.net/phpBB3/viewtopic.php?f=27&t=5560  ***********************************-->
    <!--***********************************                                                                                                                                                ***********************************-->
    <!--**********************************************************************************************************************************************************************************************************************-->
print("Here are the options:")
print("   1. One Boss")
print("   2. Two Boss")
print("   3. Three Boss")
printf("Enter a number > ")
local selected = io.stdin:read()
if selected == 1 then 
    loadPaths("Boss1.xml");
elseif selected == 2 then 
    loadPaths("Boss2.xml");
elseif selected == 3 then 
    loadPaths("Boss3.xml");
end
</onLoad>
<waypoints>
Error.png
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: AMBOLIA´s Graffu Farm first,two,three boss

#26 Post by Bill D Cat » Fri Feb 14, 2014 7:25 pm

Line 5, Position 98 is the apostrophe character that you used in "AMBOLIA SCRPT GRAFFU´S FARM".
Try changing that to another character and see if it helps.
I'm not sure WHY this would cause an error, since it is part of a comment, but it seems to be the case.

Also, as discussed in another thread (http://solarstrike.net/phpBB3/viewtopic.php?f=21&t=5575):
io.stdin:read() will return your input as a string, so you need to quote your results when comparing them.

Code: Select all

local selected = io.stdin:read()
if selected == "1" then
    loadPaths("Boss1.xml");
elseif selected == "2" then
    loadPaths("Boss2.xml");
elseif selected == "3" then
    loadPaths("Boss3.xml");
end

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#27 Post by Lamkefyned » Fri Feb 14, 2014 8:33 pm

That's fixed but now I have another lol

Code: Select all

<waypoints>
<onLoad>
    <!--**********************************************************************************************************************************************************************************************************************-->
    <!--***********************************                                  AMBOLIA SCRIPT GRAFFU FARM                                                                                   ***********************************-->
    <!--***********************************                                                                                                                                                ***********************************-->
    <!--***********************************                                            Version Stable V1                                                                                   ***********************************-->
    <!--***********************************                                                                                                                                                ***********************************-->
    <!--***********************************                                                   15/02/2014                                                                                   ***********************************-->
    <!--***********************************                                                                                                                                                ***********************************-->
    <!--***********************************                                                                          Support: http://www.solarstrike.net/phpBB3/viewtopic.php?f=27&t=5560  ***********************************-->
    <!--***********************************                                                                                                                                                ***********************************-->
    <!--**********************************************************************************************************************************************************************************************************************-->
print("Here are the options:")
print("   1. One Boss")
print("   2. Two Boss")
print("   3. Three Boss")
printf("Enter a number > ")
local selected = io.stdin:read()
if selected == "1" then
    loadPaths("Boss1.xml");
elseif selected == "2" then
    loadPaths("Boss2.xml");
elseif selected == "3" then
    loadPaths("Boss3.xml");
end
</onLoad>
<waypoints>
error 2.png
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: AMBOLIA´s Graffu Farm first,two,three boss

#28 Post by Bill D Cat » Fri Feb 14, 2014 8:40 pm

Look at your last tag: It is <waypoints> instead of </waypoints>

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#29 Post by Lamkefyned » Fri Feb 14, 2014 9:28 pm

Thanks, as I can put it like this?

Code: Select all

    loadPaths("..getFilePath(__WPL.FileName)../Start.xml");
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: AMBOLIA´s Graffu Farm first,two,three boss

#30 Post by Bill D Cat » Fri Feb 14, 2014 9:44 pm

That looks like it will load the file "start.xml" that is in the same directory as the currently loaded waypoint file.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#31 Post by Lamkefyned » Fri Feb 14, 2014 9:59 pm

But it gives me error
Sin título.png
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: AMBOLIA´s Graffu Farm first,two,three boss

#32 Post by Bill D Cat » Fri Feb 14, 2014 10:05 pm

You were quoting the whole string so it used it literally. Try it like this.

Code: Select all

    loadPaths(getFilePath(__WPL.FileName).."/Start.xml");

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#33 Post by Lamkefyned » Fri Feb 14, 2014 10:35 pm

I will take note of all his contribution to this project

Thanks, now I'm off to bed a 14 year old boy can not go to bed at 5.
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#34 Post by Lamkefyned » Sat Feb 15, 2014 1:25 pm

I have an error.

when going to attack this error check
Sin título.png
SCRIPT 1
Start_Boss1.xml
(4.02 KiB) Downloaded 108 times
Start_Boss1_Onload.lua
(2.34 KiB) Downloaded 103 times
If you think something is right just because everyone else believes,you're not thinking.

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

Re: AMBOLIA´s Graffu Farm first,two,three boss

#35 Post by lisa » Sat Feb 15, 2014 6:33 pm

What version of rombot are you using, the nearest sprintf I can find is at line 1297.
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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#36 Post by Lamkefyned » Sat Feb 15, 2014 7:25 pm

revision 771
BOT_VERSION = 3.29;
If you think something is right just because everyone else believes,you're not thinking.

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

Re: AMBOLIA´s Graffu Farm first,two,three boss

#37 Post by rock5 » Sat Feb 15, 2014 10:32 pm

There is a cprintf on that line. I believe sprintf refers to the sprintf that is used in the cprintf function. So the nil value is actually the second value used in cprintf. Hm.. or maybe not "language[173]" should exist. Maybe it's the third value.

Anyway, the problem is this line

Code: Select all

changeProfileOption(LOOT,False)
The first value should be a string and the boolean value should not be capitalized.

Code: Select all

changeProfileOption("LOOT",false)
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#38 Post by Lamkefyned » Sun Feb 16, 2014 8:12 am

I have an error.
Sin título.png
Start_Boss2.xml
(5.37 KiB) Downloaded 114 times
Start_Boss2_Onload.lua
(2.34 KiB) Downloaded 104 times
If you think something is right just because everyone else believes,you're not thinking.

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

Re: AMBOLIA´s Graffu Farm first,two,three boss

#39 Post by rock5 » Sun Feb 16, 2014 8:34 am

Somewhere you used

Code: Select all

loadPaths("__WPL.FileName")
__WPL.FileName is a variable that holds the file name of the current waypoint list. When you put quotes around it, it is seen as a string, not a variable. So it tries to load a file literally name "__WPL.FileName" which of course doesn't exist. If you want to use the value held by the variable and reload the current waypoint list then use,

Code: Select all

loadPaths(__WPL.FileName)
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: AMBOLIA´s Graffu Farm first,two,three boss

#40 Post by Lamkefyned » Sun Feb 16, 2014 5:33 pm

Thanks, I just missing 3 scripts
If you think something is right just because everyone else believes,you're not thinking.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest