superior collection pot for + 8 level harvest

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

superior collection pot for + 8 level harvest

#1 Post by Sasuke » Thu Sep 26, 2013 8:40 pm

guys I have a little problem, I'm doing the collection points and the materials I would need to know how to make that the character drink the collection that are "superior pot potions" that have the task to collect the materials of 8 levels above the normal level, this applies to both plants for the wood and the mining.anyone can help me? addition to this I would like to know if the id of the materials level were 75.81 upgrade.ty

Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

Re: superior collection pot for + 8 level harvest

#2 Post by Sasuke » Thu Sep 26, 2013 8:54 pm

if i don't remember wrong this is a section for change potion id must be change but i don't find any of 3 pot id:

Code: Select all

<onHarvest>
   local function hasBuff(_id)
      player:updateBuffs()
      -- for each buff the pawn has
      for i, buff in pairs(player.Buffs) do
         if buff.Id == _id then
            return true
         end
      end

      return false
   end

   local harvestType = database.nodes[arg1.Id].Type;
   local harvestLevel = database.nodes[arg1.Id].Level
   local craftLevel, craftBuff, buffPot
   if harvestType == NTYPE_ORE then
      craftLevel = player:getCraftLevel(CRAFT_MINING)
      craftBuff = hasBuff(501310)
      buffPot = inventory:findItem(200418)
   elseif harvestType == NTYPE_WOOD then
      craftLevel = player:getCraftLevel(CRAFT_WOODCUTTING)
      craftBuff = hasBuff(501311)
      buffPot = inventory:findItem(200420)
   elseif harvestType == NTYPE_HERB then
      craftLevel = player:getCraftLevel(CRAFT_HERBALISM)
      craftBuff = hasBuff(501312)
      buffPot = inventory:findItem(200422)
   end

   if harvestLevel > craftLevel and craftLevel + 5 >= harvestLevel and craftBuff == false and buffPot then
      buffPot:use() yrest(1000)
   end

   return true
</onHarvest>



i'd like to know also the id of the new material high lev ty

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

Re: superior collection pot for + 8 level harvest

#3 Post by rock5 » Thu Sep 26, 2013 10:24 pm

Please put your code in

Code: Select all

 tags in the future. I did it for you this time. Just use the Code button at the top of the edit box.

To get Ids you can use my TooltipIds addon. 
http://www.solarstrike.net/phpBB3/viewtopic.php?p=50700#p50700
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: superior collection pot for + 8 level harvest

#4 Post by lisa » Fri Sep 27, 2013 3:24 am

Code: Select all

{Name = "Superior Collection Potion I",ID = 200196},  -- mining
{Name = "Superior Collection Potion II",ID = 200197}, -- wood
{Name = "Superior Collection Potion III",ID = 200198}, -- herb

{Name = "Collection Potion I",ID = 200418},
{Name = "Collection Potion II",ID = 200420},
{Name = "Collection Potion III",ID = 200422},
But yeah get Rock's addon, it is awesome ;)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: superior collection pot for + 8 level harvest

#5 Post by rock5 » Fri Sep 27, 2013 3:45 am

I didn't give the Ids like that because when I looked them up I saw 3 sets of 3 Superior potions so I didn't know which was current.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: superior collection pot for + 8 level harvest

#6 Post by lisa » Fri Sep 27, 2013 5:03 am

My database is probably out dated then =(
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: superior collection pot for + 8 level harvest

#7 Post by lisa » Thu Oct 03, 2013 6:03 pm

try this and see if it works, untested.

Code: Select all

<onHarvest>
local craftLevel, craftBuff, buffPot
if arg1.Type == NTYPE_ORE then
	craftLevel = player:getCraftLevel(CRAFT_MINING)
	craftBuff = player:hasBuff(501328) 
	buffPot = inventory:findItem(200196)
elseif arg1.Type == NTYPE_WOOD then
	craftLevel = player:getCraftLevel(CRAFT_WOODCUTTING)
	craftBuff = player:hasBuff(501329)
	buffPot = inventory:findItem(200197)
elseif arg1.Type == NTYPE_HERB then
	craftLevel = player:getCraftLevel(CRAFT_HERBALISM)
	craftBuff = player:hasBuff(501330)
	buffPot = inventory:findItem(200198)
end

if arg1.Level > craftLevel and craftLevel + 8 >= arg1.Level and craftBuff == false and buffPot then
buffPot:use() yrest(1000)
end

return true
</onHarvest>
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

Re: superior collection pot for + 8 level harvest

#8 Post by Sasuke » Fri Oct 04, 2013 8:29 pm

lida i add i node database the id of the mineral and bot see this and try to harvest without success...i add your answer in onharvest but player don't drink the superior collection potion:
craftLevel = player:getCraftLevel(CRAFT_MINING)
craftBuff = hasBuff(200196)
buffPot = inventory:findItem(200196)

i install rocks toolid for see the id but i don't understand what i wrong
200196 is the id of the pot and the mineral i find 2 number id:242246 and under 560089

can you help me pls?ty

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: superior collection pot for + 8 level harvest

#9 Post by BlubBlab » Fri Oct 04, 2013 8:39 pm

The buff and pot aren't the same they can't be the same ID, so take a look on the potion and the buff.
and to finally use it :

Code: Select all

buffPot:use()
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

Re: superior collection pot for + 8 level harvest

#10 Post by Sasuke » Fri Oct 04, 2013 8:54 pm

Code: Select all

<onHarvest>
   local function hasBuff(_id)
      player:updateBuffs()
      -- for each buff the pawn has
      for i, buff in pairs(player.Buffs) do
         if buff.Id == _id then
            return true
         end
      end

      return false
   end

   local harvestType = database.nodes[arg1.Id].Type;
   local harvestLevel = database.nodes[arg1.Id].Level
   local craftLevel, craftBuff, buffPot
   if harvestType == NTYPE_ORE then
      craftLevel = player:getCraftLevel(CRAFT_MINING)
      craftBuff = hasBuff(501328)
      buffPot = inventory:findItem(200196)
   elseif harvestType == NTYPE_WOOD then
      craftLevel = player:getCraftLevel(CRAFT_WOODCUTTING)
      craftBuff = hasBuff(200197)
      buffPot = inventory:findItem(200197)
   elseif harvestType == NTYPE_HERB then
      craftLevel = player:getCraftLevel(CRAFT_HERBALISM)
      craftBuff = hasBuff(200198)
      buffPot = inventory:findItem(200198)
   end

   if harvestLevel > craftLevel and craftLevel + 8 >= harvestLevel and craftBuff == false and buffPot then
      buffPot:use() yrest(1000)
   end

   return true
</onHarvest>



i use correct buff and pot id in mineral section and i add in database mineral id....bot not drink pot...any suggestion?
Last edited by Sasuke on Sat Oct 05, 2013 6:15 am, edited 1 time in total.

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: superior collection pot for + 8 level harvest

#11 Post by BlubBlab » Sat Oct 05, 2013 12:07 am

I say it more simple their are no 2 thinks in the game which have the same ID
Buffs and potions are 2 different thinks
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

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

Re: superior collection pot for + 8 level harvest

#12 Post by rock5 » Sat Oct 05, 2013 12:24 am

'hasBuff' actually compares the name obtained from the id so as long as the buff name is the same as the item name it should work. Wait, he is using his own custom hasbuff function. Then, yes, the buff ids have to be correct.

I might help you Sasuke but first you have to learn to use the 'Code' tags. :D

Edit your last post. Select the code with your mouse. Click the 'Code' button at the top of the edit box. Then click 'Submit'.

When you have done that, I'll see if I can give you some suggestions.
  • 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

Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

Re: superior collection pot for + 8 level harvest

#13 Post by Sasuke » Sat Oct 05, 2013 6:16 am

ok rocks now i understand how to do code:=)

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

Re: superior collection pot for + 8 level harvest

#14 Post by rock5 » Sat Oct 05, 2013 6:22 am

That's better. :D

Because you are using a custom hasBuff function the buff ids have to be correct. If the ones Lisa provided (501328, 501329, 501330) are wrong then use TooltipIds to get the correct buffs ids. When you point at the buffs, the ids should print in the chat box.
  • 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

Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

Re: superior collection pot for + 8 level harvest

#15 Post by Sasuke » Sat Oct 05, 2013 6:42 am

rocks before I corrected the post, so we check into code mineral section .... I've already used your tooltip and I've already checked the id: the ore has 2 numbers when I go over with the pointer:
242246 and 560089, the buff potion id 501328,,,, now what do you say?

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

Re: superior collection pot for + 8 level harvest

#16 Post by rock5 » Sat Oct 05, 2013 8:27 am

TooltipIds is not so good for getting node ids because it can only list all the ids that have that name. It can't know which is the correct id. If it shows more than one Id and you want to know which is correct use getid.lua

Code: Select all

rom/getid.lua
I suspect 560089 is the correct Id because it follows what is in the node database. By the way, 560089 is not in the database. I take it it's a new ore? The database only goes up to level 75. Can you tell me about it? Like name, level, whether it's rare or not. Are there any other resources need to be added?

I'll try and guess.

I think these are the regular resources.
Level 81 Ore - Silver Star Stone - Id 560089
Level 81 Herb - Isyeh Grass - Id 560097
Level 81 Wood - Nadal Wisteria Wood - Id 560093

I think these are the rare resources.
Level 81 Ore - Ironaxe Stone - Id 560101
Level 81 Herb - Dragonsprout Grass - Id 560105
Level 81 Wood - Blood Palm Wood - Id 560103

Assuming they are correct, here is the updated nodes database. Put it in the "rom/database" folder.
nodes.xml
(7.15 KiB) Downloaded 122 times
Then correct all your buff ids and hopefully it will work.

By the way, I noticed a bug with TooltipIds. When I point at a resource node I get the same results repeated. It only happens with resources. Does that happen to you?
Tooltips bug.jpg
  • 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

Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

Re: superior collection pot for + 8 level harvest

#17 Post by Sasuke » Sat Oct 05, 2013 9:00 am

infact now works:)ty rocks..:):):):):):)

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

Re: superior collection pot for + 8 level harvest

#18 Post by rock5 » Sat Oct 05, 2013 9:04 am

So, do you get that TooltipIds bug like is shown in the picture?
  • 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

Sasuke
Posts: 503
Joined: Mon May 17, 2010 3:40 pm
Location: Poland

Re: superior collection pot for + 8 level harvest

#19 Post by Sasuke » Sat Oct 05, 2013 6:52 pm

with other id but y

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests