The Bytecode Club
Log inJoin the club
Video Game Reverse Engineering

Dropping throphy

Started by dizon12093 · Jan 19, 2015

2 replies43,164 views
Jan 19, 2015#1

how can i solved this ?

@TheBeardWoman That problem can be fixed if you replace the DropTrophy() function (Line 1305):
Func DropTrophy()
Local $TrophyCount = getOther($BSpos[0] + 50, $BSpos[1] + 74, "Trophy")
While Number($TrophyCount) > Number($itxtMaxTrophy)
getBSPos()
$TrophyCount = getOther($BSpos[0] + 50, $BSpos[1] + 74, "Trophy")
SetLog("Trophy Count : " & $TrophyCount)
If Number($TrophyCount) > Number($itxtMaxTrophy) Then
SetLog("Dropping Trophies")
getBSPos()
If _Sleep(2000) Or $RunState = False Then ExitLoop

		ZoomOut()
		PrepareSearch()

		While Not checkNextButton()
			If _Sleep(500) Or $RunState = False Then ExitLoop
		WEnd

		Click(34, 310) ;Drop one troop

		If _Sleep(1000) Or $RunState = False Then ExitLoop

		ReturnHome(False, False) ;Return home no screenshot
	Else
		SetLog("Trophy Drop Complete")
	EndIf
WEnd

EndFunc ;==>DropTrophy

ireally dont get that

Jan 19, 2015#2

how can i solved this ?

@TheBeardWoman That problem can be fixed if you replace the DropTrophy() function (Line 1305):
Func DropTrophy()
Local $TrophyCount = getOther($BSpos[0] + 50, $BSpos[1] + 74, "Trophy")
While Number($TrophyCount) > Number($itxtMaxTrophy)
getBSPos()
$TrophyCount = getOther($BSpos[0] + 50, $BSpos[1] + 74, "Trophy")
SetLog("Trophy Count : " & $TrophyCount)
If Number($TrophyCount) > Number($itxtMaxTrophy) Then
SetLog("Dropping Trophies")
getBSPos()
If _Sleep(2000) Or $RunState = False Then ExitLoop

ZoomOut()
PrepareSearch()

While Not checkNextButton()
If _Sleep(500) Or $RunState = False Then ExitLoop
WEnd

Click(34, 310) ;Drop one troop

If _Sleep(1000) Or $RunState = False Then ExitLoop

ReturnHome(False, False) ;Return home no screenshot
Else
SetLog("Trophy Drop Complete")
EndIf
WEnd
EndFunc   ;==>DropTrophy

ireally dont get that

You do know how to compile a script to an executable right?
Well, if you do then this step is gonna be easy. In your .au3 file, look for this particular line of codes.

and replace that with the one GkevinOD posted. As you may have noticed.. the "Number" function is added and the == is removed in GkevinOD's codes compared to the code that was currently in your script.

If you don't know how to compile a .au3 file, then I suggest you to read this specifically steps 4 and 5.

Jan 19, 2015#3

@Dizon12093
Please don't start a thread anywhere you feel you like. There are already sections set up. Also please don't start a new thread when there is already one similar topic.

Got something to add?

Log in to post a reply.

Join the conversation