How do I fix autodeal?

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Post Reply
Message
Author
bebox123
Noob
Noob
Posts: 5
Joined: 12 Aug 2012, 02:50
Noob?: Yes

How do I fix autodeal?

#1 Post by bebox123 »

Code: Select all


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!

hakore
Super Moderators
Super Moderators
Posts: 214
Joined: 16 May 2008, 08:28
Noob?: No
Contact:

Re: How do I fix autodeal?

#2 Post by hakore »

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...

bebox123
Noob
Noob
Posts: 5
Joined: 12 Aug 2012, 02:50
Noob?: Yes

Re: How do I fix autodeal?

#3 Post by bebox123 »

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.

hakore
Super Moderators
Super Moderators
Posts: 214
Joined: 16 May 2008, 08:28
Noob?: No
Contact:

Re: How do I fix autodeal?

#4 Post by hakore »

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: Select all

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...

Post Reply