Silverspring Quests
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Silverspring Quests
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
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
Last edited by reffo on Sat Nov 24, 2012 2:53 pm, edited 6 times in total.
Re: Silverspring Quests
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 usingI would use
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
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.
Then you could do
or even
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.
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
Code: Select all
if queststate ~= "incomplete" then
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
Code: Select all
function done()
return getQuestStatus(quest) ~= "inComplete"
end
Code: Select all
if done() == true then
Code: Select all
if done() then
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
Re: Silverspring Quests
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.
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.
Re: Silverspring Quests
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
Re: Silverspring Quests
Oh yeah, I forgot about that when I wrote that. Thanksrock5 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 '>'. SoCode: Select all
if 1 >= freeSlots then --if not, go to a merchant
Re: Silverspring Quests
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.
Came across a quest where I have to stand pretty much inside a mob and use an item.
Re: Silverspring Quests
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.
Then to move to it you use
To just find something you use.
Code: Select all
thing=player:findNearestNameOrId(nameorid)
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
Re: Silverspring Quests
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?
Re: Silverspring Quests
I don't believe they do. But you can always check runesdatabase.com to be sure.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?
Who is online
Users browsing this forum: No registered users and 1 guest