PrismaticShimmer
Feb 21 2004, 05:38 PM
I made this last night for a friend but i want to release it even though its only good for like 9 days. It is a macro that will run house available ever set number of minutes and search for villas open, if it finds one, it plays the Asterisk sound until you come to the pc and click stop.
Now, onto the Deca part, I made a little IG gui for it that lets you start/stop it with the push of a button, and you can easily set the delay to search from IG also.

To start the bot click Start, then, enter your desired delay time between searces and click set. Then, finally, click Go. (Has to go in that order or the macro wont work right).
Attached is the macro which must be open in actool but not started.
The following link is to download the plugin DLL which needs to be added through decal since i didnt make it into an installer since its not going to live long with the upcoming patch..
HouseFindCompanion.dll
PrismaticShimmer
Feb 22 2004, 08:05 PM
The people who have downloaded - How is it working?
thep33t
Feb 28 2004, 02:19 PM
works great, plus i added it in for cottages too

that works good as well
thep33t
Feb 28 2004, 03:58 PM
err, now after the second search, it says cottage found, even though one isnt available.
Procedure ScanForOpenHouse
SetActiveWindow Asheron's Call
FindTextClear MESSAGE
SayPaste /House Available
Delay 1 Sec
FindNextText MESSAGE, Villas: 0 available
If {PluginResult} <> TEXT NOT FOUND
Call Log DEBUG: Result for Villa was: {PluginResult}
Call Log No Villas Found on Search
//SendText 4, DEBUG - NO VILLAS FOUND ON SEARCH
Else
Call Log VILLA FOUND ON SEARCH @ {NOW}
SendText 9, ~* VILLA FOUND VILLA FOUND *~
Loop 999
Bell Asterisk
Delay 100
End
End
delay 2 sec
FindTextClear MESSAGE
SayPaste /House Available
Delay 1 Sec
FindNextText MESSAGE, Cottages: 0 available
If {PluginResult} <> TEXT NOT FOUND
Call Log DEBUG: Result for Cottage was: {PluginResult}
Call Log No Cottages Found on Search
//SendText 4, DEBUG - NO VILLAS FOUND ON SEARCH
Else
Call Log Cottage FOUND ON SEARCH @ {NOW}
SendText 9, ~* COTAGE FOUND COTTAGE FOUND *~
Loop 999
Bell Asterisk
Delay 100
End
End
End
Ipa
Feb 28 2004, 05:12 PM
There is flawed logic in the original. Failure to code defensively for a network game like AC.
The code searches for the arrival of text "Villas: 0 available".
The code assumes 2 possible outcomes.
Assumption is the mother of all f'ups.
There are 3 possible outcomes.
The 3rd outcome yields a false-positive result when this code encounters it.
PrismaticShimmer
Feb 28 2004, 05:25 PM
Burn em at the stake!
PrismaticShimmer
Feb 28 2004, 06:07 PM
Well to make a temp fix under the Saypaste /house available line, change that 1 second delay to like 10 sec.
thep33t
Feb 28 2004, 10:16 PM
tried, that, didnt work, what are the 3 options for return, I can think of only 2...
Ipa
Feb 28 2004, 10:29 PM
1. Text arrives, contains text that is being searched for.
2. Text arrives, doesn't contain text that is being searched for.
3. Server does not respond to "/House Available" within 1000 milliseconds, code falsely enters the same branch of logic as #2, and you ring alarm bells. Not because there aren't zero available, but because the server and/or internet is slow.
Best way to code this is enter a waiting loop, waiting for the last line of the Response. Last line is for "Apartments".
Once you can find the text "Apartments:", you know server has responded. Then you can go about locating the housing type you were looking for.
thep33t
Feb 28 2004, 10:45 PM
SayPaste /House Available
delay 5 sec
FindNextText MESSAGE, Apartments:
if {PluginResult} <> TEXT NOT FOUND
delay 15 sec
end
FindNextText MESSAGE, Villas: 0 available
If {PluginResult} <> TEXT NOT FOUND
Call Log DEBUG: Result for Villa was: {PluginResult}
Else
Call Log VILLA FOUND ON SEARCH @ {NOW}
SendText 9, ~* VILLA FOUND VILLA FOUND *~
Loop 999
Bell Asterisk
Delay 100
End
End
End
would this work, i tried it with a loop, but for some reason whatever i tried gave me either an infinate loop, or i couldnt impliment correctly.
thep33t
Feb 29 2004, 02:00 PM
hmm, that shoulkd work if the server send the info within 15 seconds, but it still doesnt, it always thinks the server hasnt sent the info yet...
DaMOB
Feb 29 2004, 02:27 PM
SayPaste /House Available
delay 5 sec
FindNextText MESSAGE, Apartments:
if {PluginResult} <> TEXT NOT FOUND
delay 15 sec
end
What is that for? When/if it DOES find Apartments: it waits for 15secs? What is the purpose of that LONG wait?
edit: I see what you THINK its for but there is a flow of logic missing in there someplace.
This works.
| CODE |
Constants temp = 1 End FindText MESSAGE, While 1 = 1 compute temp = {LoopNo} MOD 15 If $temp = 1 or {LoopNo} = 1 SayPaste /House Available End FindNextText MESSAGE, Apartments: If {PluginResult} <> TEXT NOT FOUND Sendtext 13, Found Apartments: Call lookforvillas End Delay 1 sec End
Procedure lookforvillas FindText MESSAGE, Villas: 0 available If {PluginResult} <> TEXT NOT FOUND Sendtext 6, No Villas Found. Else SendText 1, Villa Found!!!! @ {NOW} End FindTextClear MESSAGE FindText MESSAGE, End |
Now realize this is not the best way to achieve this any longer since we know you have Decal because of the plugin portion.
PrismaticShimmer
Mar 16 2004, 02:58 AM
k, im pretty sure I fixed its problem on fireing on false positives.. :|
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.