Syrbal Pass Daily quest - A Little Refreshment
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.
Re: Syrbal Pass Daily quest - A Little Refreshment
Work`s well!! thak's for your help
Re: Syrbal Pass Daily quest - A Little Refreshment
This command iterates over to few NPCs and You can't give a drink twice to the same NPC in a very short time.ZZZZZ wrote:Code: Select all
SlashCommand("script TargetNearestFriend()");
You have to wait.
To avoid unnecessary waiting i've written this function:
Code: Select all
function tenDrinks()
local objectList = CObjectList();
objectList:update();
count=0
for i = 0,objectList:size() do
obj = objectList:getObject(i);
if( obj ~= nil ) then
if( obj.Name == "Exhausted Alliance Warrior") then
player:target(obj)
inventory:useItem("Energy Drink");
count=count+1;
if count>=11 then --11th to be sure ;)
return --break the For loop
end
end
end
end
end
-
- Posts: 5
- Joined: Wed Jun 12, 2013 1:10 pm
Re: Syrbal Pass Daily quest - A Little Refreshment
Hola @ all...
I hate redundant code, so I decided to change the function part that s018mes posted earlier, with Lisa's idea, and rewrote the waypoint file...
btw. the quest and item names are in German... feel free to change them...
only problem I have is that when you already have all 10 dailies done, that the script does not quit, if someone could give me a little nudge in the right direction I'd appreciate it...
I hate redundant code, so I decided to change the function part that s018mes posted earlier, with Lisa's idea, and rewrote the waypoint file...
btw. the quest and item names are in German... feel free to change them...
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
function ALRPP()
_npc = {"Kaboy","Masaka Dogtail","Aidamus Schwartz","Kasamir Baschir","Banjen Shaven","Pagee Alon","Will Kanches","Nolis Alon","Lina Lukasz","Layla Lien"}
repeat
queststate = getQuestStatus("Eine kleine Erfrischung","Daily");
for _i = 1,10,1 do
if queststate == "incomplete" then
npc = player:findNearestNameOrId(_npc[_i])
if npc then
player:target(npc.Address)
inventory:useItem("Energietrank");
end
inventory:useItem("Energietrank");
else
end
end
until queststate == "complete"
end
</onload>
<!-- # 1 --><waypoint x="-11776" z="-5642">
player:target_NPC("Lankor Forgia");
AcceptQuestByName("Eine kleine Erfrischung","Daily");
yrest(1000);</waypoint>
<!-- # 2 --><waypoint x="-11776" z="-5642"> ALRPP()
</waypoint>
<!-- # 3 --><waypoint x="-11776" z="-5642">
player:target_NPC("Lankor Forgia");
CompleteQuestByName("Eine kleine Erfrischung","Daily");
</waypoint>
</waypoints>
Re: Syrbal Pass Daily quest - A Little Refreshment
You can add in waypoint #1 somethig like this:
Try to use a tiket of daily mission o just remain stop.
Code: Select all
local dqCount, dqPerDay = RoMScript("Daily_count()");
if dqCount ~= 10 then
player:target_NPC(questGiverId);
AcceptQuestByName(questName,"Daily");
else
inventory:update();
player:update();
if inventory:itemTotalCount(202434) > 0 then
inventory:useItem(202434);
yrest(2000)
player:target_NPC(questGiverId);
AcceptQuestByName(questName,"Daily");
else
player:sleep();
end
end
Re: Syrbal Pass Daily quest - A Little Refreshment
Working great, thanks s018mes. How can I add Daily Quest Reset Ticket to the waypoint or userfunction so it can run by itself and use the Daily Tickets automatically. Now I'm stopping it after it reaches 10 dailies and then I use a Daily Reset Ticket and then start the script again.
ty in advance,
ty in advance,
Re: Syrbal Pass Daily quest - A Little Refreshment
That's what that code does. If it hasn't finished it's dailies it accepts the quest. If it has finished dailies then it checks to see if you have 202434 which I assume is the daily ticket, uses it and accepts the quest. You just need to put that code in the waypoint near the accept npc.
If you also complete the quest with the same npc then you would add a 'CompleteQuestByName' before checking the dailies.
If you also complete the quest with the same npc then you would add a 'CompleteQuestByName' before checking the dailies.
- 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: Syrbal Pass Daily quest - A Little Refreshment
Hmm I cant find that rock, neither in functions or the waypoint file. How do I insert it, what do I have to write?
waypoint:
userfunction:
waypoint:
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-11776" z="-5642">
player:target_NPC("Lankor Forgia");
AcceptQuestByName("A Little Refreshment","Daily");
yrest(10000);</waypoint>
<!-- # 2 --><waypoint x="-11776" z="-5642"> ALRPP()
</waypoint>
<!-- # 3 --><waypoint x="-11776" z="-5642">
player:target_NPC("Lankor Forgia");
CompleteQuestByName("A Little Refreshment","Daily");
</waypoint>
</waypoints>
Code: Select all
-- Function to Change Channels
function ALRPP()
repeat
queststate = getQuestStatus("A Little Refreshment","Daily");
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Masaka Dogtail")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Kasamir Baschir")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Banjen Shaven")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Pagee Alon")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Will Kanchesr")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Nolis Alon")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Lina Lukasz")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Layla Lien")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Aidamus Schwartz")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
if queststate == "incomplete" then
npc = player:findNearestNameOrId("Kaboy")
if npc then
player:target(npc.Address)
inventory:useItem("Energy Drink");
end
inventory:useItem("Energy Drink");
else
end
until queststate == "complete"
end
Re: Syrbal Pass Daily quest - A Little Refreshment
First I would get rid of the last waypoint. You only need one at that location. I would do something like this.
Notes:
Some notes about your userfunction:
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
questGiverId = 121948 -- Lankor Forgia
questName = 425961 -- A Little Refreshment - Daily
dailyTicket = 202434
</onload>
<!-- # 1 --><waypoint x="-11776" z="-5642">
player:target_NPC(questGiverId);
CompleteQuestByName(questName);
local dqCount, dqPerDay = RoMScript("Daily_count()");
if dqCount ~= 10 then
AcceptQuestByName(questName);
else
inventory:update();
player:update();
if inventory:itemTotalCount(dailyTicket) > 0 then
inventory:useItem(dailyTicket);
yrest(2000)
AcceptQuestByName(questName);
else
player:sleep();
end
end
yrest(10000)
</waypoint>
<!-- # 2 --><waypoint x="-11776" z="-5642"> ALRPP()
</waypoint>
</waypoints>
- - I put the variables in the onload for easy access. I also made them all ids. I don't think any of them need to be names.
- I believe the QuestByName functions only require the npc to be targetted once.
- I believe if you use the daily id you don't need to use "daily" with the QuestByName functions. Fixed as of revision 758.
- Where it has "player:sleep()" you could load other characters if you have other characters you want to do this daily.
- This code is untested.
Some notes about your userfunction:
- - 'getQuestStatus' does not accept a second argument. Use the daily id instead of the quest name to differentiate between daily and public quest.
- If it is your intention that it stop trying to interact with the npcs when the quest is complete, it wont work because you don't update 'queststate'. You would need to update it between each npc. Instead of usingchange them all toCode: Select all
if queststate == "incomplete" then
- You have a lot ofCode: Select all
if getQuestStatus(questName) == "incomplete" then
If you are not going to have anything between the 'else' and the 'end' get rid of the 'else'. Although you could put 'break' between them so that it breaks from the loop right away after seeing that the quest is complete so it doesn't keep checking the rest of the npcs.Code: Select all
else 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
Re: Syrbal Pass Daily quest - A Little Refreshment
i need an help....how can i use a macro if i have it in action bar for example in 5 slot?
i have a macro for deliver in automatic energy drink without move...can you help me pls?
i have a macro for deliver in automatic energy drink without move...can you help me pls?
Re: Syrbal Pass Daily quest - A Little Refreshment
Please don't double post. You were correct to start your own topic for an unrelated subject.Sasuke wrote:i need an help....how can i use a macro if i have it in action bar for example in 5 slot?
i have a macro for deliver in automatic energy drink without move...can you help me pls?
http://www.solarstrike.net/phpBB3/viewt ... 706#p52706
- 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
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest