Script after acquiring Ensia's "Memory"

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Mushroomstamp
Posts: 210
Joined: Wed Oct 27, 2010 11:34 am

Script after acquiring Ensia's "Memory"

#1 Post by Mushroomstamp »

What does my script need to look like to change what my character is doing if a memory drops from Ensia? The quotes around "memory", and only needing one are making me unsure. This is my best guess;

Code: Select all

if not 1 > inventory:getItemCount('[Ensia's "Memory"]') then
     do something else
end
User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Script after acquiring Ensia's "Memory"

#2 Post by MiesterMan »

Code: Select all

if not 1 > inventory:getItemCount("[Ensia's \"Memory\"]") then
     do something else
end
Edit: You can also use the ID instead. Personally I'd just scan the bags like this:

Code: Select all

for i,v in pairs(inventory.BagSlot) do
	if inventory.Bagslot[i].Name == "[Ensia's \"Memory\"]" then
		dosomethingspecial();
	end
end
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Script after acquiring Ensia's "Memory"

#3 Post by rock5 »

Code: Select all

if not 1 > inventory:getItemCount("[Ensia's \"Memory\"]") then
This is a bit confusing. Why not just use.

Code: Select all

if inventory:getItemCount("[Ensia's \"Memory\"]") > 0 then
I'm not sure how you will use this to stop it looting it though.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Script after acquiring Ensia's "Memory"

#4 Post by rock5 »

I just had another look at this. Why do you have brackets around the name?

Should be this I think.

Code: Select all

if inventory:getItemCount("Ensia's \"Memory\"") > 0 then
or use the id like MiesterMan said.

Code: Select all

if inventory:getItemCount(204883) > 0 then -- Ensia's Memory
  • 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
Mushroomstamp
Posts: 210
Joined: Wed Oct 27, 2010 11:34 am

Re: Script after acquiring Ensia's "Memory"

#5 Post by Mushroomstamp »

I thought the brackets might have been necessary since memory is in quotes. Overthought it a bit I suppose.

Thanks for the help guys. *thumbup*
User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Script after acquiring Ensia's "Memory"

#6 Post by MiesterMan »

Oh, I'm sorry. I was so tired earlier I didn't even realize there were brackets in there! Yea, no brackets. :oops:
Post Reply