(daily quest) "Daily_count()"

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
barbarossa
Posts: 46
Joined: Sat Jan 24, 2009 3:34 pm

(daily quest) "Daily_count()"

#1 Post by barbarossa » Sat Nov 06, 2010 7:49 am

hello
also first at all i have problems understand this Daily_count() funktion

if i searching the forum i not find any good i can us

also my problem is in dalanis up the hill is the wood collecting daily
so i want try to make a script for my accounts

any one can help me out to understand Daily_count() better

or is there a better why to count my 10 dailys??

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: (daily quest) "Daily_count()"

#2 Post by jduartedj » Sat Nov 06, 2010 8:30 am

markusbab wrote:hello
also first at all i have problems understand this Daily_count() funktion

if i searching the forum i not find any good i can us

also my problem is in dalanis up the hill is the wood collecting daily
so i want try to make a script for my accounts

any one can help me out to understand Daily_count() better

or is there a better why to count my 10 dailys??
Hello Markus!

I also found that that function is not straightforward... take a look at the code I use:

Code: Select all

		-- end if all dailies are done
		local dqCount, dqPerDay = RoMScript("Daily_count()");
		if (dqCount>=10) then
		stopPE();  --end path!
		end;
So:
1. The Daily_count() in enclosed inside a RomScript function I am not sure why this is like this, maube rock5 can enlighten us,
2.it returns 2 values: dqCount, dqPerDay therefore useing it directly woulnd't work very well and
3. as u may deduct this is a simple function that check if I've reached 10 dailies and stops the bot.

Also I've now realize a change I could've done to this code:
if (dqCount>=dqPerDay) then
This would be more appropriate as dqPerDay stand for the number of max dailies, it should work but it haven't tested it yet.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

barbarossa
Posts: 46
Joined: Sat Jan 24, 2009 3:34 pm

Re: (daily quest) "Daily_count()"

#3 Post by barbarossa » Sat Nov 06, 2010 9:14 am

thx for reply

also i find in wiki some code snippsle http://www.solarstrike.net/wiki/index.p ... evel1Elves

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
	<!-- #  1 -->
		<waypoint x="31845" z="4588">
			local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()"); 
     			if 10 == dailyQuestCount then
      				printf ("Du hast "..dailyQuestCount.." von " .. dailyQuestsPerDay ..    " Tagesquests erledigt. STOP.");
      				error("Bot gestoppt.", 0); -- ends the script.
      			else
      				printf("Du hast "..dailyQuestCount.." von " .. dailyQuestsPerDay ..    " Tagesquests erledigt, bleiben noch " .. dailyQuestsPerDay - dailyQuestCount .. " Quests.");
      			end
			player:target_NPC("Blinsik");
			sendMacro("OnClick_QuestListButton(1, 2)"); yrest(750);
			sendMacro("AcceptQuest()"); yrest(2000);	
		</waypoint>
	<!-- #  2 --><waypoint x="31863" z="4658">	</waypoint>
	<!-- #  3 --><waypoint x="31835" z="4880">	</waypoint>
	<!-- #  4 --><waypoint x="31737" z="5127">	</waypoint>
	<!-- #  5 -->
		<waypoint x="31419" z="5721">
			player:target_Object("Reinigungskristall", 8000);
		</waypoint>
	<!-- #  6 --><waypoint x="31737" z="5127">	</waypoint>
	<!-- #  7 --><waypoint x="31835" z="4880">	</waypoint>
	<!-- #  8 --><waypoint x="31863" z="4658">	</waypoint>
	<!-- #  9 --><waypoint x="31854" z="4599">	</waypoint>
	<!-- #  10 -->
		<waypoint x="31845" z="4588">	
			player:target_NPC("Blinsik");
			sendMacro("OnClick_QuestListButton(3, 1)"); yrest(750);
			sendMacro("CompleteQuest()"); yrest(2000);
		</waypoint>
 
</waypoints>
if i used this code to rebuild my version i got some errors
also my char is talking to npc and he is not stoping accept quest lol

dont no wootz wrong

iam just beginning write waypoints like quests

€dit

now after some smal tests i got these

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
		<waypoint x="-1998" z="4871">
			local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()"); 
     			if 10 == dailyQuestCount then
      				printf ("Du hast "..dailyQuestCount.." von " .. dailyQuestsPerDay ..    " Tagesquests erledigt. STOP.");
      				error("Bot gestoppt.", 0); -- ends the script.
      			else
      				printf("Du hast "..dailyQuestCount.." von " .. dailyQuestsPerDay ..    " Tagesquests erledigt, bleiben noch " .. dailyQuestsPerDay - dailyQuestCount .. " Quests.");
      			end
			player:target_NPC(114418);
			sendMacro("OnClick_QuestListButton(1, 1)"); yrest(750);
			sendMacro("AcceptQuest()"); yrest(2000);	
		</waypoint>
		<waypoint x="-1832" z="4847">
		        player:target_Object(114470,5500, true)
		        changeProfileOption("HARVEST_DISTANCE", 35)
		    </waypoint>
		
		    <waypoint x="-1834" z="4970">
		        player:target_Object(114470,5500, true)
		        changeProfileOption("HARVEST_DISTANCE", 35)
		    </waypoint>
		
		    <waypoint x="-1716" z="4947">
		        player:target_Object(114470,5500, true)
		        changeProfileOption("HARVEST_DISTANCE", 35)
		    </waypoint>    
		    
		    <waypoint x="-1828" z="5092">
		    </waypoint>
		    
		    <waypoint x="-1906" z="5096">
		        player:target_Object(114470,5500, true)
		        changeProfileOption("HARVEST_DISTANCE", 35)
		    </waypoint>
		
		    <waypoint x="-1928" z="5188">
		    </waypoint>
		
		    <waypoint x="-2037" z="5301">
		        player:target_Object(114470,5500, true)
		        changeProfileOption("HARVEST_DISTANCE", 35)
		    </waypoint>
	
		<waypoint x="-1998" z="4871">	
			player:target_NPC(114418);
			sendMacro("OnClick_QuestListButton(3, 1)"); yrest(750);
			sendMacro("CompleteQuest()"); yrest(2000);
		</waypoint>
</waypoints>
but now he is not count have 10 in iventory or smaler he just gose npc and try to complete quest

any one can help me

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: (daily quest) "Daily_count()"

#4 Post by jduartedj » Sat Nov 06, 2010 10:05 am

markusbab wrote:
but now he is not count have 10 in iventory or smaler he just gose npc and try to complete quest

any one can help me

could you rephrase please? I did not understand your question.

You can check how many of a certain item there are in the Bag if that is what you need...
Just use:

Code: Select all

inventory:itemTotalCount("Item Name")
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

barbarossa
Posts: 46
Joined: Sat Jan 24, 2009 3:34 pm

Re: (daily quest) "Daily_count()"

#5 Post by barbarossa » Sat Nov 06, 2010 11:13 am

jduartedj wrote:
markusbab wrote:
but now he is not count have 10 in iventory or smaler he just gose npc and try to complete quest

any one can help me

but now i have 10 wood in my inventory
but the bot not see 10
still walking round

how i can count now if i have 10 or less?

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: (daily quest) "Daily_count()"

#6 Post by jduartedj » Sat Nov 06, 2010 2:26 pm

markusbab wrote: how i can count now if i have 10 or less?
use this to check how many:

Code: Select all

if 10 > inventory:itemTotalCount("Wood Name") then (...)
(10 > x == x < 10)
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

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

Re: (daily quest) "Daily_count()"

#7 Post by rock5 » Sat Nov 06, 2010 9:45 pm

jduartedj wrote:1. The Daily_count() in enclosed inside a RomScript function I am not sure why this is like this, maube rock5 can enlighten us,
Simple, it's an ingame function, not a rombot function.
http://www.theromwiki.com/API:Daily_count
jduartedj wrote:(10 > x == x < 10)
I think this might cause confusion.

He means

Code: Select all

10 > x
is the same as

Code: Select all

x < 10
And the reason you use the first and not the second is because the '<' causes "mismatched tag" errors in xml files.
  • 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
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: (daily quest) "Daily_count()"

#8 Post by jduartedj » Sun Nov 07, 2010 12:06 am

rock5 wrote: Simple, it's an ingame function, not a rombot function.
I thought so but I wasn't sure and didn't want to mislead him.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

barbarossa
Posts: 46
Joined: Sat Jan 24, 2009 3:34 pm

Re: (daily quest) "Daily_count()"

#9 Post by barbarossa » Sun Nov 07, 2010 4:43 am

hello and thx for posts

is that correct what i doing her ?

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints type="TRAVEL">
		<onLoad>
			changeProfileOption("QUICK_TURN", true)
			changeProfileOption("HARVEST_DISTANCE", 35)
		</onLoad>

		<waypoint x="-1998" z="4871" tag="npc">
			local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()"); 
     			if 10 == dailyQuestCount then
      				printf ("Du hast "..dailyQuestCount.." von " .. dailyQuestsPerDay ..    " Tagesquests erledigt. STOP.");
      				error("Bot gestoppt.", 0); -- ends the script.
      			else
      				printf("Du hast "..dailyQuestCount.." von " .. dailyQuestsPerDay ..    " Tagesquests erledigt, bleiben noch " .. dailyQuestsPerDay - dailyQuestCount .. " Quests.");
      			end
			player:target_NPC(114418);
			sendMacro("OnClick_QuestListButton(1, 1)"); yrest(750);
			sendMacro("AcceptQuest()"); yrest(2000);	
		</waypoint>
		
		<waypoint x="-1832" z="4847">
		        player:target_Object(114470,5500, true); if 10 > inventory:itemTotalCount("Feuerholz") 
		        then __WPL:setWaypointIndex(__WPL:findWaypointTag("npc"));
		</waypoint>
		
		<waypoint x="-1998" z="4871">	
			player:target_NPC(114418);
			sendMacro("OnClick_QuestListButton(3, 1)"); yrest(750);
			sendMacro("CompleteQuest()"); yrest(2000);
		</waypoint>
</waypoints>
i know only opjektid npcid but the id from item in bag i not can find

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: (daily quest) "Daily_count()"

#10 Post by jduartedj » Sun Nov 07, 2010 7:22 am

markusbab wrote:hello and thx for posts

is that correct what i doing her ?

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints type="TRAVEL">
		<onLoad>
			changeProfileOption("QUICK_TURN", true)
			changeProfileOption("HARVEST_DISTANCE", 35)
		</onLoad>

		<waypoint x="-1998" z="4871" tag="npc">
			local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()"); 
     			if 10 == dailyQuestCount then
      				printf ("Du hast "..dailyQuestCount.." von " .. dailyQuestsPerDay ..    " Tagesquests erledigt. STOP.");
      				error("Bot gestoppt.", 0); -- ends the script.
      			else
      				printf("Du hast "..dailyQuestCount.." von " .. dailyQuestsPerDay ..    " Tagesquests erledigt, bleiben noch " .. dailyQuestsPerDay - dailyQuestCount .. " Quests.");
      			end
			player:target_NPC(114418);
			sendMacro("OnClick_QuestListButton(1, 1)"); yrest(750);
			sendMacro("AcceptQuest()"); yrest(2000);	
		</waypoint>
		
		<waypoint x="-1832" z="4847">
		        player:target_Object(114470,5500, true); if 10 > inventory:itemTotalCount("Feuerholz") 
		        then __WPL:setWaypointIndex(__WPL:findWaypointTag("npc"));
		</waypoint>
		
		<waypoint x="-1998" z="4871">	
			player:target_NPC(114418);
			sendMacro("OnClick_QuestListButton(3, 1)"); yrest(750);
			sendMacro("CompleteQuest()"); yrest(2000);
		</waypoint>
</waypoints>
i know only opjektid npcid but the id from item in bag i not can find
I don't see anything wrong with it, you can simply use the item's name you don't need the item id.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

barbarossa
Posts: 46
Joined: Sat Jan 24, 2009 3:34 pm

Re: (daily quest) "Daily_count()"

#11 Post by barbarossa » Sun Nov 07, 2010 10:10 am

hehe
next problem her

Code: Select all

Die Option 'QUICK_TURN' wurde von 'false' auf 'true' geändert.
Die Option 'HARVEST_DISTANCE' wurde von '120' auf '35' geändert.
Wegpunktpfad daily_dalanis_holz1.xml geladen.
Es wurde keine Rückkehrpfaddatei mit dem Defaultnamen daily_dalanis_holz1_return
.xml gefunden.
Wir benutzen nun die normale Wegepunktdatei daily_dalanis_holz1.xml.
Lösche Ziel.
Wir gehen zum Wegpunkt #1, (-1998, 4871)
Du hast 0 von 10 Tagesquests erledigt, bleiben noch 10 Quests.Wir versuchen den
NPC 114418 zu finden: Drücke MACRO: RoMScript ausführen "OnClick_QuestListButton
(1, 1)".
Drücke MACRO: RoMScript ausführen "AcceptQuest()".
Lösche Ziel.
Wir gehen zum Wegpunkt #2, (-1832, 4847)
Wir haben Verstreutes Holz gefunden und werden es abbauen.
Wir haben Verstreutes Holz gefunden und werden es abbauen.
Wir haben Verstreutes Holz gefunden und werden es abbauen.
Wir haben Verstreutes Holz gefunden und werden es abbauen.
Table not found for ID: 206756
Wrong value returned in update of item id: 206756
Lösche Ziel.
Wir gehen zum Wegpunkt #1, (-1998, 4871)
Du hast 0 von 10 Tagesquests erledigt, bleiben noch 10 Quests.Wir versuchen den
NPC 114418 zu finden:
Wir können den NPC 114418 nicht finden!
Drücke MACRO: RoMScript ausführen "OnClick_QuestListButton(1, 1)".
Drücke MACRO: RoMScript ausführen "AcceptQuest()".
Wir gehen zum Wegpunkt #2, (-1832, 4847)
Wir haben Verstreutes Holz gefunden und werden es abbauen.
Lösche Ziel.
Wir gehen zum Wegpunkt #1, (-1998, 4871)
Du hast 0 von 10 Tagesquests erledigt, bleiben noch 10 Quests.Wir versuchen den
NPC 114418 zu finden:
Wir können den NPC 114418 nicht finden!
Drücke MACRO: RoMScript ausführen "OnClick_QuestListButton(1, 1)".
Drücke MACRO: RoMScript ausführen "AcceptQuest()".
Wir gehen zum Wegpunkt #2, (-1832, 4847)
Wir haben Verstreutes Holz gefunden und werden es abbauen.
Wir haben Verstreutes Holz gefunden und werden es abbauen.
Wir haben Verstreutes Holz gefunden und werden es abbauen.
first he show me npc not found
secound probs : if he collecting 4 /10 items he run back to npc and try give back
but at last he say not find npc?

any solution?

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: (daily quest) "Daily_count()"

#12 Post by jduartedj » Sun Nov 07, 2010 4:31 pm

1st of all your programming is a bit "messy" Try cleaning it up! Then you were missing and "end" in that if statement!! (programing 101?)
And last you might have the wrong NPC ID try using the npc's Name instead, it also makes reading of the code easier.

Try rewriting it to look like this:

Code: Select all

(...)
player:target_NPC("npc's name");
(...)
 <waypoint x="-1832" z="4847">
              player:target_Object(114470,5500, true); 
              if 10 > inventory:itemTotalCount("Feuerholz") then 
                            __WPL:setWaypointIndex(__WPL:findWaypointTag("npc"));
              end;
 </waypoint>
Right so what this code does is if you have LESS than 10 "Feuerholz" it will redirect directly to the waypoint with tag="npc"
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: (daily quest) "Daily_count()"

#13 Post by Starrider » Wed Nov 10, 2010 5:43 am

doesn't work for me... i tried it...

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: (daily quest) "Daily_count()"

#14 Post by swietlowka » Wed Nov 10, 2010 6:19 am

u can always use my script: http://www.solarstrike.net/phpBB3/viewt ... ern#p12335
its not for wood but menus in tavern but still it works great, and the exp is probably the same...
if you want the wood just use some of my script and work your own ;)
dont forget to share if it will work perfectly :P

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: (daily quest) "Daily_count()"

#15 Post by Starrider » Wed Nov 10, 2010 8:15 am

Alos tried this:

Code: Select all

repeat
player:target_Object(114470,5950,true)
inventory:update()
until inventory:itemTotalCount(114470) > 9
edit:

now i tried like this

Code: Select all

repeat queststate = getQuestStatus("Sammelt verstreutes Holz"); yrest(450) until queststate
      if queststate == "incomplete" then
repeat
player:target_Object(114470,5000,true)
inventory:update()
until inventory:itemTotalCount(114470) > 10 and queststate == "complete"
when i put __WPL:setWaypointIndex(__WPL:findWaypointTag("Main")); i will get an error.

So how to make the bot not running back to the npc when no wood is there, an waiting at Wp#2 until quest is finished and then to the npc?

barbarossa
Posts: 46
Joined: Sat Jan 24, 2009 3:34 pm

Re: (daily quest) "Daily_count()"

#16 Post by barbarossa » Wed Nov 10, 2010 3:47 pm

swietlowka wrote:u can always use my script: http://www.solarstrike.net/phpBB3/viewt ... ern#p12335
its not for wood but menus in tavern but still it works great, and the exp is probably the same...
if you want the wood just use some of my script and work your own ;)
dont forget to share if it will work perfectly :P
text for this tip :)

also i got an error at waypoint 1 ... he told somthing about igf funktion ... forgot make sreen
also is see in chat a error massage

barbarossa
Posts: 46
Joined: Sat Jan 24, 2009 3:34 pm

Re: (daily quest) "Daily_count()"

#17 Post by barbarossa » Wed Nov 10, 2010 3:49 pm

Starrider wrote:Alos tried this:

now i tried like this

Code: Select all

repeat queststate = getQuestStatus("Sammelt verstreutes Holz"); yrest(450) until queststate
      if queststate == "incomplete" then
repeat
player:target_Object(114470,5000,true)
inventory:update()
until inventory:itemTotalCount(114470) > 10 and queststate == "complete"
when i put __WPL:setWaypointIndex(__WPL:findWaypointTag("Main")); i will get an error.

So how to make the bot not running back to the npc when no wood is there, an waiting at Wp#2 until quest is finished and then to the npc?
that wars exactly my problem!!!
dont no how to solve

i tried run 3 waypoints iam also got 10 items on this run but if any one other
wars comming stolen my items and script not works like i think!
xD

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

Re: (daily quest) "Daily_count()"

#18 Post by rock5 » Wed Nov 10, 2010 9:17 pm

I don't know why you guys are having so much trouble for something that is basically easy.

At the the wood you would have something like this,

Code: Select all

while 10 > inventory:itemTotalCount(206756) and player:target_Object(114470,,,false) do
end
What this does is, while you have less than 10 wood in your inventory, it will collect wood. If there is no more wood it will continue.

Remember: The ID of objects you click on are different to the ID of objects in your inventory.

If you want me to help fix any other errors, please post your current waypoint file.
  • 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

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: (daily quest) "Daily_count()"

#19 Post by Starrider » Thu Nov 11, 2010 7:10 am

oh its a different id XD ok that was maybe the reason, i'll test it soon

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: (daily quest) "Daily_count()"

#20 Post by Starrider » Fri Nov 19, 2010 7:24 am

I am going crazy, still got the script not running
still used this script at the wood waypoint:

Code: Select all

repeat
player:target_Object(114470,5700, true)
inventory:update()
until inventory:itemTotalCount(206756) > 9
It works if I have 10 wood, then the bot goes to the npc, BUT ONLY when there is no more wood to collect at the point. If I have 10 wood and there is more to harvest the loop will hang at "player:target_Object(114470,5700, true)"
The bot still tries to harvest.

So I need some help that it checks the queststate or inventory before it target the wood for harvesting.

Do I need to change this code

Code: Select all

while 10 > inventory:itemTotalCount(206756) and player:target_Object(114470,,,false) do
end
, because if I use this i got every time a waypoint#1 compilation error.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests