Assertion Failed cause by macro

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderators: Moderators, Developers

Message
Author
titsky
Noob
Noob
Posts: 4
Joined: 18 Sep 2010, 04:03
Noob?: No
Location: Philippines
Contact:

Assertion Failed cause by macro

#1 Post by titsky »

Using the latest version.
This is the macro script that is causing the error.
When using zeny for trade everything is fine but when trading item to item
assertion failed is prompting.


automacro sit {
console /^Your Coordinates/i
call {
do chat create "B>Matchstick 10/30M ea deal" 2 0 1234
do sit; do conf dealAuto 0
}
}

automacro dersadeal {
console /(.*) \(level (.*)\) Requests a Deal/i
call {
do deal
pause 15
do deal no
}
}

automacro check {
console /(.*) added Item to Deal: (.*) x (\d+)/
call check1
}

macro check1 {
$item = $.lastMatch2
$amount = $.lastMatch3
$item1 = Matchstick
$item2 = None
$item3 = None
$item1price = 30000000
$item2price = 0
$item3price = 0
$credit = @inventory (Life Insurrance Certificate)

if ($item == $item1) goto item1
if ($item == $item2) goto item2
if ($item == $item3) goto item3
do deal no

stop

:item1
$total1 = @eval ($amount*$item1price)
do deal add $credit $total1
pause 2
do deal; do deal
stop
:item2
$total2 = @eval ($amount*$item2price)
do deal add $credit $total2

pause 2
do deal; do deal
stop
:item3
$total3 = @eval ($amount*$item3price)
do deal add $credit $total3
pause 2
do deal; do deal
stop
}

automacro final {
console /(.*) finalized the Deal/i
call {
do deal; do deal
}
}
automacro stop {
run-once 1
inventory "Matchstick" > 10
call {
do quit
}
}

Image

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Assertion Failed cause by macro

#2 Post by EternalHarvest »

deal add -1 30000000
Item with index -1 in inventory can't happen.

titsky
Noob
Noob
Posts: 4
Joined: 18 Sep 2010, 04:03
Noob?: No
Location: Philippines
Contact:

Re: Assertion Failed cause by macro

#3 Post by titsky »

EternalHarvest wrote:
deal add -1 30000000
Item with index -1 in inventory can't happen.
Thank you for the quick response. My bad, i actually figured out right after posting.

Please do close this thread if necessary.

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: Assertion Failed cause by macro

#4 Post by Technology »

I believe the appropriate response from kore would be a warning here.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Assertion Failed cause by macro

#5 Post by EternalHarvest »

Technology wrote:I believe the appropriate response from kore would be a warning here.
Yeah.

Locked