Page 1 of 1

Dalanis Pub Helper Daily Quest

Posted: Wed Jan 12, 2011 10:48 pm
by jduartedj
Hope this helps some of you, also this last version is not tested so i was hoping someone would test it out please! :D

will document it properly later. :P

Re: Dalanis Pub Helper Daily Quest

Posted: Wed Jan 12, 2011 11:06 pm
by rock5
I personally would never, ever ,ever ,ever use __WPL:reverse(). I would use __WPL:setDirection(WPT_FOWARD) at the beginning of the file and __WPL:setDirection(WPT_BACKWARD) at the end. Reverse just causes problems. For instance, if you start your file with the quest already completed then it will reverse and go the the last waypoint first which is not what you intended I think. Just add __WPL:setDirection(WPT_FOWARD) at the end of the first waypoint and __WPL:setDirection(WPT_BACKWARD) at the end of the last waypoint. Foolproof.

Also, are you collecting plates from only 1 place? If a lot of people use this file then only 1 person will be able to do it at a time.

Re: Dalanis Pub Helper Daily Quest

Posted: Thu Jan 13, 2011 3:48 am
by swietlowka
bro theres allready my very well working version uploaded, just look for tamara tavern daily lol :D

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- Tomara Tavern Daily "Pig in a Pond's Helper" -->
<onLoad>
   repeat questname=RoMScript("TEXT('Sys421030_name')"); yrest(500) until questname
   repeat npcname=RoMScript("TEXT('Sys114417_name')"); yrest(500) until npcname
   changeProfileOption("HARVEST_DISTANCE", 30)
</onLoad>

   <!-- #  1 --><waypoint x="-1023" z="2171" tag="Main">
   repeat queststate = getQuestStatus(questname); yrest(500) until queststate
   if queststate == "complete" then
      -- Complete quest
      player:target_NPC(npcname); yrest(1000);
      sendMacro("OnClick_QuestListButton(3, 1)"); yrest(1000); sendMacro("CompleteQuest()"); yrest(2000);
      -- Check if Dailies are finished
      repeat dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()") until dailyQuestCount and dailyQuestsPerDay
      if (dailyQuestsPerDay - dailyQuestCount) == 0 then
         player:sleep()
      end
      -- Accept quest
      player:target_NPC(npcname); yrest(1000);
      sendMacro("OnClick_QuestListButton(1, 2)"); yrest(1000); sendMacro("AcceptQuest()"); yrest(2000);
      __WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));   
   elseif queststate == "incomplete" then
      -- Collect menus
      __WPL:setWaypointIndex(__WPL:findWaypointTag("Get Menus"))
   else
      -- Accept quest
      player:target_NPC(npcname); yrest(1000);
      sendMacro("OnClick_QuestListButton(1, 2)"); yrest(1000); sendMacro("AcceptQuest()"); yrest(2000);
      __WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));   
   end
   </waypoint>
   <!-- #  2 --><waypoint x="-1017" z="2264" tag="Get Menus">
      player:target_Object(114475,7000,true)
      repeat queststate = getQuestStatus(questname); yrest(500) until queststate
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
      end
   </waypoint>
   <waypoint x="-985" z="2256"> </waypoint>
   <!-- #  3 --><waypoint x="-1016" z="2373">
      player:target_Object(114475,7000,true)
   </waypoint>
   <!-- #  4 --><waypoint x="-1054" z="2368">
      repeat queststate = getQuestStatus(questname); yrest(500) until queststate
      if queststate == "incomplete" then
         player:target_Object(114475,7000,true)
      end
   </waypoint>
   <!-- #  5 --><waypoint x="-1062" z="2318"> -- </waypoint>
   <!-- #  5 --><waypoint x="-1097" z="2265"> </waypoint>
   <!-- #  5 --><waypoint x="-1055" z="2260">
      repeat queststate = getQuestStatus(questname); yrest(500) until queststate
      if queststate == "complete" then
         __WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
      else
         player:target_Object(114475,7000,true)
         repeat queststate = getQuestStatus(questname); yrest(500) until queststate
         if queststate == "complete" then
            __WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
         else
            __WPL:setWaypointIndex(__WPL:findWaypointTag("Get Menus"))
         end
      end
   </waypoint>
</waypoints>




EDIT something got broken my posts seems to be first in the topic where it should be last O_o

Re: Dalanis Pub Helper Daily Quest

Posted: Thu Jan 13, 2011 2:20 pm
by jduartedj
swietlowka wrote:bro theres allready my very well working version uploaded, just look for tamara tavern daily lol :D


EDIT something got broken my posts seems to be first in the topic where it should be last O_o
@rock5: Well I never tested it with reverse :S, also I does that from one place because each player has its own instance of plates so 2 can collect the plates in the same place no problem.
@swietlowka: Had no idea there already was one... well anyway, nothing is broken it's your forum definitions that are set to most recent first or something!
EDIT: So it seems something was REALLY broken! oh well...