Openkore.com

OpenKore Forums
It is currently 13 Nov 2019, 22:09

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How do I fix autodeal?
PostPosted: 14 Jul 2017, 11:17 
Offline
Noob
Noob

Joined: 12 Aug 2012, 02:50
Posts: 6
Code:

automacro dealmorocc {
   weight > 49%
   location morocc, anthell01, anthell02, moc_fild12, moc_fild20, cmd_fild08, pay_fild08, payon
   run-once 1
   call {
      do conf attackAuto 0
      $player = @player (NAME HERE)
      do move x y payon <--- the merchant is standing
      pause 5
      do deal "$player"
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal add @rand(3,20)
      do deal
      do deal
      do conf attackAuto 2
      pause 5   
      do relog 3
      release all
      }
}


Hello! This is my autodeal macro and I don't know how will I fix this one because it only calculates the weight of the item then deals every item needed for the weight of the character to be weight > 49%. I wanted everything in the inventory to be transfered to my merchant. Is there any solution to this? Thank you!


Top
 Profile  
 
 Post subject: Re: How do I fix autodeal?
PostPosted: 20 Jul 2017, 22:50 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
Why do you need "@rand(3,20)" if you want "everything" transferred? It may skip a number at that.

Just do:

do deal add 3
do deal add 4
...
do deal add 20

Moved to Macro Plugin subforum

_________________
Whatever...


Top
 Profile  
 
 Post subject: Re: How do I fix autodeal?
PostPosted: 21 Jul 2017, 05:45 
Offline
Noob
Noob

Joined: 12 Aug 2012, 02:50
Posts: 6
hakore wrote:
Why do you need "@rand(3,20)" if you want "everything" transferred? It may skip a number at that.

Just do:

do deal add 3
do deal add 4
...
do deal add 20

Moved to Macro Plugin subforum


I tried that one but if there's no item for example in 3 the bot will then disconnect.


Top
 Profile  
 
 Post subject: Re: How do I fix autodeal?
PostPosted: 27 Jul 2017, 05:00 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
Oh. That probably is the reason why your bot is not completing the autodeal. When @rand returns a number that doesn't exist in your inventory and you add it to the deal, you get disconnected.

Code:
if (@inventory("Jellopy") != -1) {
   do deal add @inventory("Jellopy")
}
if (@inventory("Etc") != -1) {
   do deal add @inventory("Etc")
}


It's better to list every item you knew you would like to deal then.

Sorry for the late reply.

_________________
Whatever...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group