Page 1 of 1

Bot doesnt work when open mailbox.

Posted: Wed Jul 14, 2010 7:22 am
by miximixi007
Why it show me like this:

Code: Select all

We found Mailbox and will harvest it.
[string "       ..."]:7: attempt to call global 'GetInboxHeaderInfo' (a nil value)

Code: Select all

<waypoints type="RUN">
	<!-- #  9 --><waypoint x="-23691" z="4520">	
                player:target_Object("Mailbox")
                yrest(5000);
--MAIL_INBOX_UPDATE
--local numMails = GetInboxNumItems();
local packageIcon, sender, subject, COD, moneyMode, money, 
      daysLeft, paperStyle, items, wasRead, wasReturned, canReply = GetInboxHeaderInfo(1)
if (money ~= nil and money>0) or 
   (items ~= nil and items>0) then
   TakeIndoxItem(1);
else
    loadPaths("test");
end
	</waypoint>
</waypoints>

Re: Bot doesnt work when open mailbox.

Posted: Wed Jul 14, 2010 7:38 am
by rock5
miximixi007 wrote:Why it show me like this:

Code: Select all

We found Mailbox and will harvest it.
[string "       ..."]:7: attempt to call global 'GetInboxHeaderInfo' (a nil value)
If you want to use any in-game functions you have to use sendMacro() or RoMScript(). Read up on those. Be aware that there is a 256 character limit so you might not get all the information.

Re: Bot doesnt work when open mailbox.

Posted: Wed Jul 14, 2010 7:59 am
by miximixi007
:) Thx for your always help