Silverspring Quests

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.
Post Reply
Message
Author
reffo
Posts: 8
Joined: Sun Nov 18, 2012 11:30 am

Silverspring Quests

#1 Post by reffo » Fri Nov 23, 2012 11:18 pm

Hello!

I started doing some quests for the bot in Silverspring.
I've got few quests finished so far and would like some feedback/tips for improvment.

The quests are:
[19] Amends
[19] Swindler's Request
[20] Nightmare
[20] Dreamland Crystal
[20] Ancient Dreamland (Hard)

Other features:
Level 17 - 18 Grind
Level 18 - 19 Grind
Attachments
tagena-0.4.1.rar
(296.54 KiB) Downloaded 253 times
map.jpg
Last edited by reffo on Sat Nov 24, 2012 2:53 pm, edited 6 times in total.

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

Re: Silverspring Quests

#2 Post by rock5 » Sat Nov 24, 2012 1:03 am

Very neat coding and I like the format. I'm thinking of doing a project with multiple quests and I might do something like that.

Here are a few tips on what I would do differently.

I would make 'state' and 'queststate' local. The rule is, if a variable isn't used outside the immediate bit of code then make it local.

I would always use a tag with setWaypointIndex for any waypoint that's not waypoint 1 so if you ever add or remove a waypoint it wont screw it up.

Instead of using

Code: Select all

if queststate == "complete" then
I would use

Code: Select all

if queststate ~= "incomplete" then
That way if it ends up in the loop without the quest, ie. queststate of "not accepted", it will still exit and get the quest instead of getting stuck in the loop. Just remember that a quest can be in 1 of 3 states and think about what you want it to do in all 3 states.

Actually you don't need that variable at all as you are only using it once. So I would do

Code: Select all

if getQuestStatus(quest) ~= "incomplete" then
Lastly I would avoid using variables such as 'done' because if you have to restart the script, 'done' will no longer be set. Just recheck the quest status. There is not really that much difference between "if done == true then" and "if getQuestStatus(quest) ~= "incomplete" then". But if you do want to simplify it even more you could make a mini function in the onload eg.

Code: Select all

function done()
    return getQuestStatus(quest) ~= "inComplete"
end
Then you could do

Code: Select all

if done() == true then
or even

Code: Select all

if done() then
Although I probably wouldn't do that as there is not that much difference.

Sorry for the long post but I went into "Teaching" mode. :)
  • 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

reffo
Posts: 8
Joined: Sun Nov 18, 2012 11:30 am

Re: Silverspring Quests

#3 Post by reffo » Sat Nov 24, 2012 1:32 am

Thanks for the tips Rock. I really appreciate it!

I made the changes to the code that you suggested and re-uploaded them :)
Since you like the coding and the format I'm gonna continue with some more quests.

Thanks again.

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

Re: Silverspring Quests

#4 Post by rock5 » Sat Nov 24, 2012 2:08 am

I see you had some merchant code. You've commented it out but I think you will still get an error from the '<' symbol. You can't use '<' in xml files because it gets interpreted as the beginning of an xml tag. Whenever you want to use '<' you can flip it around. xml has no trouble with '>'. So

Code: Select all

if 1 >= freeSlots then --if not, go to a merchant
  • 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

reffo
Posts: 8
Joined: Sun Nov 18, 2012 11:30 am

Re: Silverspring Quests

#5 Post by reffo » Sat Nov 24, 2012 2:32 am

rock5 wrote:I see you had some merchant code. You've commented it out but I think you will still get an error from the '<' symbol. You can't use '<' in xml files because it gets interpreted as the beginning of an xml tag. Whenever you want to use '<' you can flip it around. xml has no trouble with '>'. So

Code: Select all

if 1 >= freeSlots then --if not, go to a merchant
Oh yeah, I forgot about that when I wrote that. Thanks

reffo
Posts: 8
Joined: Sun Nov 18, 2012 11:30 am

Re: Silverspring Quests

#6 Post by reffo » Sat Nov 24, 2012 2:41 am

I got a question. I assume there is a way to target an enemy npc and move to it without attacking it, I haven't figured out how yet. Got any suggestion?
Came across a quest where I have to stand pretty much inside a mob and use an item.

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

Re: Silverspring Quests

#7 Post by rock5 » Sat Nov 24, 2012 9:49 am

I think you are talking about the one with that giant robot thing. That's a problem quest because on some servers it is heavily farmed so you never find it.

To just find something you use.

Code: Select all

thing=player:findNearestNameOrId(nameorid)
Then to move to it you use

Code: Select all

player:moveTo(thing, true) -- 'true' means don't attack things along the way
  • 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: Silverspring Quests

#8 Post by grande » Sat Nov 24, 2012 5:10 pm

I've been thinking to go back and do some quests in lower level zones to get titles. Do any of these quest lines generate titles?

reffo
Posts: 8
Joined: Sun Nov 18, 2012 11:30 am

Re: Silverspring Quests

#9 Post by reffo » Sat Nov 24, 2012 10:14 pm

grande wrote:I've been thinking to go back and do some quests in lower level zones to get titles. Do any of these quest lines generate titles?
I don't believe they do. But you can always check runesdatabase.com to be sure.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest