My Guild Contribute isn't working from bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

My Guild Contribute isn't working from bot

#1 Post by MiesterMan »

So I wrote a couple of functions in my manualaddon:

Code: Select all

function GetItemBagSlot(_itemName)
	for i=1,180,1 do
		local inventoryIndex, icon, itemName, itemCount, locked, invalid = GetBagItemInfo ( i )
		if itemName == _itemName then
			return inventoryIndex
		end
	end
	return "empty"
end

function GuildContributeItem(_itemName)
	slot = GetItemBagSlot(_itemName)
	PickupBagItem(slot)
	GCB_GetContributionItem()
	GCB_ContributionItemOK(0,0)
end
These work fine when I use them in game like: /script GuildContributeItem("Copper Ore");
That works fine but when I try to use it through the bot it doesn't work. I don't get an error message in game or in the bot so I'm at a loss.

The code in my waypoint is:

Code: Select all

		if( donateMats ) then
			sendMacro("GuildContributeItem("Dusk Orchid");")
			yrest(500)
			sendMacro("GuildContributeItem("Pine Wood");")
			yrest(500)
			sendMacro("GuildContributeItem("Dark Crystal");")
			yrest(500)
		end
		sendMacro("GuildContributeItem("Guild Rune");")
The donateMats variable I set in my profile under onLoad, also no errors.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: My Guild Contribute isn't working from bot

#2 Post by rock5 »

You can't have double quotes inside double quotes. I'm surprised there wasn't an error.

You can use single quotes in double quotes like this

Code: Select all

        sendMacro("GuildContributeItem('Dusk Orchid');")
or you can use the slash '\' to have it read as a string instead of the end of the quotes

Code: Select all

        sendMacro("GuildContributeItem(\"Dusk Orchid\");")
Both should work.
  • 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
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: My Guild Contribute isn't working from bot

#3 Post by MiesterMan »

Thank you very much!!! That was maddening.

I can't do it right now cause I just woke up and the server just went down but I believe you. Now that I think of it I don't understand why the bot didn't give some sort of "junk after statement" error. Or does it only do that for messed up xml statements in the waypoint files?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: My Guild Contribute isn't working from bot

#4 Post by lisa »

Yeah the things it checks for functions is different to what it checks for WP.

you could always try my old guild donate function

http://www.solarstrike.net/phpBB3/viewt ... =27&t=2207
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
Post Reply