Guild Donation

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Guild Donation

#41 Post by lisa » Sun Nov 25, 2012 7:19 am

Cindy wrote:This is the code im using (downloaded from one of the threads here) :
I made a userfunction of that code and added in an inventory:update() and it works fine.

Code: Select all

function GuildDonateItems(itemlist)
	inventory:update()  
   for slot = 61, 240 do
      item = inventory.BagSlot[slot]
      for k, nameid in pairs(itemlist) do
         if item.Name == nameid or item.Id == nameid then
            cprintf(cli.yellow, "Name %s at %d\n", tostring(nameid), item.BagId)
            GuildDonateBagID(item.BagId)
         end
      end
   end
end

Code: Select all

Command> GuildDonateItems({"Guild Rune"})
Name Guild Rune at 71
Name Guild Rune at 66
Name Guild Rune at 70
Name Guild Rune at 77
Name Guild Rune at 78
Name Guild Rune at 79
Name Guild Rune at 80
Name Guild Rune at 81
Name Guild Rune at 82
Name Guild Rune at 83
Name Guild Rune at 84
Name Guild Rune at 85
Name Guild Rune at 87
Name Guild Rune at 88
Name Guild Rune at 89
Name Guild Rune at 90
Like I said though if you looked at that link I posted the numbers arn't in order as you would expect them to be, all guild runes were donated just fine.
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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Guild Donation

#42 Post by Rickster » Sun Nov 25, 2012 8:48 am

Everything is working fine at my side, including the changes discribed in this post.

Both Donate functions GuildDonate() and GuildDonateItems() work as they should.

I changed the version number and infos in the files, corresponding to the last changes by dx876234. Maybe someone can add it to the first post.

Additional Usage Info

Code: Select all

GuildDonateItems({table})
  • tabel is a table of item names as text
Example

Code: Select all

GuildDonateItems({"Guild Stone", "Guild Rune", "Handcrafted Ruby"})
  • donates all Guild Stone, Guild Rune and Handcrafted Ruby
Changelog v1.44 by dx876234
  • added function GuildDonateItems({table})
Attachments
userfunction_GuildDonate.lua
V 1.44 by dx876234
(3.94 KiB) Downloaded 172 times

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

Re: Guild Donation

#43 Post by rock5 » Sun Nov 25, 2012 9:42 am

You did it differently to the way I did it but this way is fine. Just one line I want to ask a question about. Line 47

Code: Select all

	if ( _type == "white" or _type == "green" or _type == "blue" or _type == "purple" ) then _quality = _type end
Isn't this userfunction supposed to support up to 'gold' color names? Maybe we should add "orange" and "gold"? Also if _type equals a color and you set "_quality = _type", shouldn't you also do _type = nil or "all" or whatever the default should be for _type if the user uses the function like that?
  • 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

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Guild Donation

#44 Post by Cindy » Sun Dec 02, 2012 12:07 pm

Guild Runes, Stones got donated.

Wood Essence, Herb Essence, Ore Essence, Ruby Stone didnt:

Code: Select all

GuildDonateItems({"Guild Stone", "Guild Rune", "Handcrafted Ruby", "Magic Fortune Grass", "Moonlight Pearl", "Sunset Ear of Grain"
					 ,"Ruby Stone", "Ore Essence", "Wood Essence", "Herb Essence"})
Using version 1.44 a couple posts ago. Anyone testing with those items? (The ones from Andor also don't get donated).

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Guild Donation

#45 Post by Rickster » Sun Dec 02, 2012 8:37 pm

everything works fine at my side v1.44. no probs with donating any kind of guild items.
rock5 wrote:You did it differently to the way I did it but this way is fine. Just one line I want to ask a question about. Line 47

Code: Select all

	if ( _type == "white" or _type == "green" or _type == "blue" or _type == "purple" ) then _quality = _type end
Isn't this userfunction supposed to support up to 'gold' color names? Maybe we should add "orange" and "gold"? Also if _type equals a color and you set "_quality = _type", shouldn't you also do _type = nil or "all" or whatever the default should be for _type if the user uses the function like that?
never had a look at this except the little changes i did. maybe i will find the time to look at this ...

Ric

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

Re: Guild Donation

#46 Post by lisa » Sun Dec 02, 2012 10:04 pm

added 1.44 to first post.
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

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Guild Donation

#47 Post by Cindy » Mon Dec 03, 2012 12:58 am

Rickster wrote:everything works fine at my side v1.44. no probs with donating any kind of guild
The blanked answer is kinda not helping. The specific items I listed, you can confirm that? If yes, any suggestion why it doesn't work for me? Any suggestions on debugging? I generally do my own debugging but this is simple enough that I am stumped as far as what other avenues can I proceed on.

I have the latest bot, the latest file (the 1.44 you posted mid stream, the one that Lisa moved to the first post).

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

Re: Guild Donation

#48 Post by lisa » Mon Dec 03, 2012 1:24 am

try using the ID without the " "

Code: Select all

GuildDonateItems({575754})
obviously a made up ID number, you will need to insert the ID you require
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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Guild Donation

#49 Post by Rickster » Mon Dec 03, 2012 3:32 am

Cindy wrote:Guild Runes, Stones got donated. Wood Essence, Herb Essence, Ore Essence, Ruby Stone didnt:

Code: Select all

GuildDonateItems({"Guild Stone", "Guild Rune", [..]
Using version 1.44 a couple posts ago. Anyone testing with those items? (The ones from Andor also don't get donated).
Rickster wrote:everything works fine at my side v1.44. no probs with donating any kind of guild items.
Cindy wrote:The blanked answer is kinda not helping.
Sorry for that, but it was all I could tell you, because all you said was it was not working at your side, but over here everything works fine. So this could have been a hint and information if its generally not working or an individual error.
As I am not a specialised supporter and only learning this from scratch myself, I try to give at least some information that could be helpfull in anyway ...
Cindy wrote:The specific items I listed, you can confirm that? If yes, any suggestion why it doesn't work for me? Any suggestions on debugging? I generally do my own debugging but this is simple enough that I am stumped as far as what other avenues can I proceed on.
I am using the german client, but the items you postet, especially andor reward items work well in text form.
As Lisa postet, you can try using IDs, and when we get feedback from others on how text form works for them in english client we can have a closer look at GuildDonateItem()

Ric

User avatar
Edamh
Posts: 106
Joined: Tue May 24, 2011 11:56 pm

Re: Guild Donation

#50 Post by Edamh » Wed Mar 27, 2013 12:10 pm

I want to log the items that are donated to a log file so that I can review at a single glance what was donated by which account/character.
I'm currently using

Code: Select all

			GuildDonate("herb",8,"true")
			GuildDonate("ore",8,"true")
			GuildDonate("wood",8,"true")
			GuildDonateItems({"Guild Rune"})
to make donations. I'm unsure how to add them to the logfile as I'm doing with other results such as

Code: Select all

		-- check if room in bags; check if enough tokens to play
		local empties = inventory:itemTotalCount(0)
		if 4 > empties then
			cprintf(cli.yellow,"Not much space left in inventory. Skipping! \n",empties)
			logentry = "Not much space left in inventory."
			checkRelog()
			return
		end
		if 30 > inventory:itemTotalCount(203038) then
			print("Not enough Phirius Token Coins.")
			logentry = "Not enough Phirius Token Coins."
			checkRelog()
			return
		end
and

Code: Select all

			logentry = string.format("Succeeded.")
Any ideas or pointers? Thanks.

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

Re: Guild Donation

#51 Post by lisa » Wed Mar 27, 2013 7:22 pm

adding a log for the donations will be a little bit more complicated, I'll have a look at it later tonight.

Any reason you want to know who donated what?
I would have thought logging chars that completed the WP like Andor Training would be more important.
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
Edamh
Posts: 106
Joined: Tue May 24, 2011 11:56 pm

Re: Guild Donation

#52 Post by Edamh » Thu Mar 28, 2013 2:35 pm

I guess that the main reason that I want to track the results was to see which characters/accounts DO still have tokens. If there are guild donations, then I can infer that the character does still have tokens to play.

Then, I guess really all I need is a check and to log the number Phirius tokens left in the character's bags after the Andor Training run.

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

Re: Guild Donation

#53 Post by lisa » Thu Mar 28, 2013 5:43 pm

If it is logging items you are after then check this post out.
http://www.solarstrike.net/phpBB3/viewt ... 905#p48905

I have it set to log all items and sace them, I then just use notepad++ find in files to easily get a full list of specific items all of my chars have, like shells and tokens.
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

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Guild Donation

#54 Post by Cindy » Sun Sep 01, 2013 11:15 am

Is there a way to do a donation for all (of the myriad of different type of essences, grains etc) except ore, wood, and herb (I want to keep these for crafting)?

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

Re: Guild Donation

#55 Post by rock5 » Sun Sep 01, 2013 11:48 am

The AT waypoint file donates with

Code: Select all

GuildDonate("all",8)
Because all the guild donation resources are level 8 it only donates those items and leaves normal resources alone.
  • 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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests