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.
-
mangozjeb1
- Posts: 13
- Joined: Fri Dec 19, 2014 2:03 pm
#1
Post
by mangozjeb1 » Fri Dec 19, 2014 2:14 pm
Like in subject im looking for waypoint what will use Malatina Event Repeat Ticket. I was trying to use this.
Code: Select all
<onload>
if inventory:itemTotalCount("Malatina Event Repeat Ticket") > 0 then
inventory:useItem("Malatina Event Repeat Ticket") yest(1000)
loadPaths("survivalr5")
else
loadpaths("nextfile")
end
</onload>
But i got a error
I need it to hmm... for automatic farm malatina with cot_tele.xml and survivalR5.xml
-
Attachments
-
-
BlubBlab
- Posts: 948
- Joined: Fri Nov 30, 2012 11:33 pm
- Location: My little Pony cafe
#2
Post
by BlubBlab » Fri Dec 19, 2014 10:48 pm
I remember faintly I did something similar in my modified versions.:
Code: Select all
if(inventory:itemTotalCount(205816) > 0)then
local item = inventory:findItem(205816)
if(item)then
item:use()
end
loadPaths("cot_tele")
elseif( inventory:itemTotalCount(207471) > 0)then
local item = inventory:findItem(207471)
if(item)then
item:use()
end
loadPaths("cot_tele")
else
loadPaths(When_Finished)
end
Code: Select all
if(inventory:itemTotalCount(205815) > 0)then
local item = inventory:findItem(205815)
if(item)then
item:use()
end
loadPaths("survivalR5")
elseif( inventory:itemTotalCount(207470) > 0)then
local item = inventory:findItem(207470)
if(item)then
item:use()
end
loadPaths("survivalR5")
elseif( inventory:itemTotalCount(205814) > 0)then
local item = inventory:findItem(205814)
if(item)then
item:use()
end
loadPaths("cot_tele")
elseif( inventory:itemTotalCount(207469) > 0)then
local item = inventory:findItem(207469)
if(item)then
item:use()
end
loadPaths("cot_tele")
else
loadPaths(When_Finished)
end
This should help you
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#3
Post
by rock5 » Fri Dec 19, 2014 11:15 pm
Well the OPs code is pretty straight forward. It
should load one file or the other but I don't see it loading either.
I just noticed. The second loadpaths is spelt wrongs. Should be,
See if that helps. I'm surprised it didn't cause a "loadpaths is nil" error as "loadpaths" is an invalid function name.
- 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.”
-
mangozjeb1
- Posts: 13
- Joined: Fri Dec 19, 2014 2:03 pm
#4
Post
by mangozjeb1 » Sat Dec 20, 2014 6:34 am
rock5 wrote:Well the OPs code is pretty straight forward. It
should load one file or the other but I don't see it loading either.
I just noticed. The second loadpaths is spelt wrongs. Should be,
See if that helps. I'm surprised it didn't cause a "loadpaths is nil" error as "loadpaths" is an invalid function name.
changed it and still the same
BlubBlab wrote:I remember faintly I did something similar in my modified versions.:
Code: Select all
if(inventory:itemTotalCount(205816) > 0)then
local item = inventory:findItem(205816)
if(item)then
item:use()
end
loadPaths("cot_tele")
elseif( inventory:itemTotalCount(207471) > 0)then
local item = inventory:findItem(207471)
if(item)then
item:use()
end
loadPaths("cot_tele")
else
loadPaths(When_Finished)
end
Code: Select all
if(inventory:itemTotalCount(205815) > 0)then
local item = inventory:findItem(205815)
if(item)then
item:use()
end
loadPaths("survivalR5")
elseif( inventory:itemTotalCount(207470) > 0)then
local item = inventory:findItem(207470)
if(item)then
item:use()
end
loadPaths("survivalR5")
elseif( inventory:itemTotalCount(205814) > 0)then
local item = inventory:findItem(205814)
if(item)then
item:use()
end
loadPaths("cot_tele")
elseif( inventory:itemTotalCount(207469) > 0)then
local item = inventory:findItem(207469)
if(item)then
item:use()
end
loadPaths("cot_tele")
else
loadPaths(When_Finished)
end
This should help you
error like this
mby i did something wrong
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#5
Post
by rock5 » Sat Dec 20, 2014 7:12 am
mangozjeb1 wrote:
rock5 wrote:Well the OPs code is pretty straight forward. It should load one file or the other but I don't see it loading either.
I just noticed. The second loadpaths is spelt wrongs. Should be,
See if that helps. I'm surprised it didn't cause a "loadpaths is nil" error as "loadpaths" is an invalid function name.
changed it and still the same
In that case maybe one of the files you are trying to load doesn't exist. loadPaths does nothing if the file doesn't exist. That explains why you would get that error about no waypoints; it gets to the end of the waypoint file without loading the next one so it errors because it has nothing left to do.
Is either waypoint file "survivalr5" or "nextfile" missing from your waypoints folder?
- 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.”
-
BlubBlab
- Posts: 948
- Joined: Fri Nov 30, 2012 11:33 pm
- Location: My little Pony cafe
#6
Post
by BlubBlab » Sat Dec 20, 2014 7:13 am
Yeah I think I had them in a lua file either export them or swap the >
e.g.
Code: Select all
if(0 < inventory:itemTotalCount(207471) )then
-
mangozjeb1
- Posts: 13
- Joined: Fri Dec 19, 2014 2:03 pm
#7
Post
by mangozjeb1 » Sat Dec 20, 2014 8:00 am
In that case maybe one of the files you are trying to load doesn't exist. loadPaths does nothing if the file doesn't exist. That explains why you would get that error about no waypoints; it gets to the end of the waypoint file without loading the next one so it errors because it has nothing left to do.
Is either waypoint file "survivalr5" or "nextfile" missing from your waypoints folder?
thats how looks my waypoint folder i dont have something like nextfile.xml but i have survivalR5.xml so it should work
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#8
Post
by rock5 » Sat Dec 20, 2014 10:10 am
mangozjeb1 wrote:i dont have something like nextfile.xml but i have survivalR5.xml so it should work
If you have a ticket. If you do have a ticket and it still isn't using it and loading the file then try adding a print message to be sure. Example
Code: Select all
<onload>
if inventory:itemTotalCount("Malatina Event Repeat Ticket") > 0 then
print("Using Malatina Event Repeat Ticket.")
inventory:useItem("Malatina Event Repeat Ticket") yest(1000)
loadPaths("survivalr5")
else
print("Malatina Event Repeat Ticket not found.")
loadpaths("nextfile")
end
</onload>
- 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.”
-
mangozjeb1
- Posts: 13
- Joined: Fri Dec 19, 2014 2:03 pm
#9
Post
by mangozjeb1 » Sat Dec 20, 2014 1:52 pm
rock5 wrote:mangozjeb1 wrote:i dont have something like nextfile.xml but i have survivalR5.xml so it should work
If you have a ticket. If you do have a ticket and it still isn't using it and loading the file then try adding a print message to be sure. Example
Code: Select all
<onload>
if inventory:itemTotalCount("Malatina Event Repeat Ticket") > 0 then
print("Using Malatina Event Repeat Ticket.")
inventory:useItem("Malatina Event Repeat Ticket") yest(1000)
loadPaths("survivalr5")
else
print("Malatina Event Repeat Ticket not found.")
loadpaths("nextfile")
end
</onload>
No message or smth in game or micromacro
still the same error
-
BlubBlab
- Posts: 948
- Joined: Fri Nov 30, 2012 11:33 pm
- Location: My little Pony cafe
#10
Post
by BlubBlab » Sat Dec 20, 2014 3:46 pm
I something is wrong maybe you forgot to save your changes first or so or you have the wrong file.
Last edited by
BlubBlab on Sun Dec 21, 2014 10:45 am, edited 1 time in total.
-
mangozjeb1
- Posts: 13
- Joined: Fri Dec 19, 2014 2:03 pm
#11
Post
by mangozjeb1 » Sat Dec 20, 2014 6:17 pm
BlubBlab wrote:I something is wrong maybe you forgot to save our changes first or so or you have the wrong file.
I saved it i am sure of that . And wat do you mean by wrong file ?
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#12
Post
by lisa » Sat Dec 20, 2014 6:54 pm
I don't have any RoM files on this PC so I can't test it but it looks to me like the actual file that code is in is missing important things. I am going to assume the posted code is ALL that is in the file.
Have a look at other WP posted that don't actually have any waypoints in them as an example of how to do it. I am sure there is quite a few posted already.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#13
Post
by rock5 » Sat Dec 20, 2014 11:24 pm
I just tested it. Lisa is right. If that's all you have in the file then you will get that message, because it doesn't load properly so it doesn't run the onload.
Specifically look at how other waypoint files start and end. Copy them and it should work.
- 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.”
-
mangozjeb1
- Posts: 13
- Joined: Fri Dec 19, 2014 2:03 pm
#14
Post
by mangozjeb1 » Sun Dec 21, 2014 8:10 am
so you mean its not working because there is no waypoint to go. So mby it will work when we add option to check the status of the minigames e.g if we have done both it will use ticket , if not script will stop or smth
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#15
Post
by rock5 » Sun Dec 21, 2014 9:57 am
No, it doesn't need waypoints. There are a lot of waypoint files with out waypoints, eg. AT, survivalnext, etc. See how they start and end. Or just see how any waypoint file starts and ends. Let us know if you still can't figure it out.
- 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.”
-
mangozjeb1
- Posts: 13
- Joined: Fri Dec 19, 2014 2:03 pm
#16
Post
by mangozjeb1 » Sun Dec 21, 2014 10:55 am
ok now it works almost perfect, WP is looking like that
Code: Select all
<waypoint>
<onload>
if inventory:itemTotalCount("Malatina Event Repeat Ticket") > 0 then
print("Using Malatina Event Repeat Ticket.")
inventory:useItem("Malatina Event Repeat Ticket") yest(1000)
loadPaths("cot_tele")
else
print("Malatina Event Repeat Ticket not found.")
loadpaths("nextfile")
end
</onload>
</waypoint>
but after ending the sirvival malatina and using ticket im getting error like this
-
BlubBlab
- Posts: 948
- Joined: Fri Nov 30, 2012 11:33 pm
- Location: My little Pony cafe
#17
Post
by BlubBlab » Sun Dec 21, 2014 11:52 am
I think your files are corrupt I only knew a function called yrest and not yest take a look at that if it was your doing I would suggest rename the function in your file to yrest.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#18
Post
by rock5 » Sun Dec 21, 2014 7:23 pm
Correct BlubBlub.
But also, it's not quite right. There is a difference between "waypoint" and "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.”
-
mangozjeb1
- Posts: 13
- Joined: Fri Dec 19, 2014 2:03 pm
#19
Post
by mangozjeb1 » Mon Dec 22, 2014 11:57 am
rock5 wrote:Correct BlubBlub.
But also, it's not quite right. There is a difference between "waypoint" and "waypoints".
idk what is the difference but now it work good only when i have not ebough phirus coins the script is starting to looping i mean
start-crash-start-crash-start-crash and all the time like that but its only when i have no PC so it not a big problem.
Big thanks to you all for help me deal with it ;*
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#20
Post
by rock5 » Thu Dec 25, 2014 7:11 am
mangozjeb1 wrote:idk what is the difference
"waypoint" tags are used for each point in a waypoint files. As you know, some waypoint files don't have any points, so no "waypoint" tags.
"waypoints" tag is used to enclose all the points. When onload support was added, that also had to go within the "waypoints" tags. So basically "waypoints" tags are used to start and end every waypoint file.
So every waypoint file should start and end something like this
Or if you optionally include encoding information on the first line then something like this.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
...
</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.”
Who is online
Users browsing this forum: No registered users and 0 guests