ill actually make it even faster next update... right now it does a bunch of extra stuff to get all the item stats from tooltip which not everyone needs :P
ill actually make it even faster next update... right now it does a bunch of extra stuff to get all the item stats from tooltip which not everyone needs :P
Oh noez :P
Anyhow, against my will il +1 you for your bot and use it until i cook something up :P
After searching for awhile it says input level reached any ideas?
haGetAccount() return something like " ¤7"- german client
doh just when i thought i found the static memory location for that :P
i just confirmed with russian and it was wrong too... so english only. ill fix next update![]()
Keeping debuging for a Week, your HappyAuction has RU support for chinese clients now
lask week i was stucked at the Garble codes after
_process.ReadMemory(ui_object.addr2_value, &ui_header, sizeof(ui_header))
scince "ui_header.text" use utf8 string, we need convert them to unicode string first.
Mainly modition:
1. add function for ansi, unicode, utf8 convertion
namespace Core
{
/**/
#define ACOUNT(a) (sizeof(a)/(sizeof(a[0])))
#define BIT(n) (1 << (n))
#define B64(n) (1i64 << (n))
//************************************************************ add by www ******************************************
wchar_t * AToU (const char * str);
char * UToA (const wchar_t * str);
wchar_t * UToU8 (const wchar_t * str);
wchar_t * U8ToU (const wchar_t * str);
}
2. format for prase string.
namespace Diablo
{
// local
//------------------------------------------------------------------------
static const ULong _DROPDOWN_STRING_LIMIT = 64;
static const Char _FORMAT_COMBO_TEXT[] = _TEXT("{c:%s}%s{/c}");
static const Char _FORMAT_ITEM_NAME[] = _TEXT("{C:%s}%s{/C}");
static const Char _FORMAT_ITEM_RARITYTYPE[] = _TEXT("{c:%s}%s{/c}"); //************************************** modify by www
static const Char _FORMAT_ITEM_ILEVEL[] = _TEXT("%s:%u"); //************************************** modify by www
3. string in constant, of course.
static const ComboSecDepEnum::Item _combo_secondary_deps[] =
{
// 1-Hand
{ _TEXT("所有單手類型物品"), { FILTER_PRI_1H, _C_ALL } },
{ _TEXT("斧"), { FILTER_PRI_1H, _C_ALL } },
{ _TEXT("祭祀刀"), { FILTER_PRI_1H, _C_WD } },
{ _TEXT("弩槍"), { FILTER_PRI_1H, _C_DH } },
{ _TEXT("匕首"), { FILTER_PRI_1H, _C_ALL } },
{ _TEXT("拳套武器"), { FILTER_PRI_1H, _C_MONK } },
{ _TEXT("釘鎚"), { FILTER_PRI_1H, _C_ALL } },
{ _TEXT("重型武器"), { FILTER_PRI_1H, _C_BARB } },
{ _TEXT("矛"), { FILTER_PRI_1H, _C_ALL } },
{ _TEXT("劍"), { FILTER_PRI_1H, _C_ALL } },
{ _TEXT("魔杖"), { FILTER_PRI_1H, _C_WIZ } },
4. a little modification, since cell in chinese client are wider then US.
//******************************************************************************** ***********************************
row_size_y = row_size_y*1.15;
// calculated constrained combo y (due to resolution)
Double combo_bottom = coordinate.y + (row_size_y * drop_count);
Double constrained_y = (combo_bottom > 1.0) ? coordinate.y - (combo_bottom - 1.0) : coordinate.y;
Coordinate constrained_coord(open_coord.x, constrained_y + (screen_index * row_size_y) + (row_size_y / 2));
5. a lot of modification, my TODO list.
Difference between string from search combox and string from item.stat, need a lot of Translation, however, its doesnot matter for most bots.
tstring = Core::U8ToU(ui_header.text);
if( *tstring == 0 || *tstring == _CLEAR_CHAR )
return false;
Tools::StrFormatRead(count, tstring, _FORMAT_ITEM_RARITYTYPE, dummy, item.rarity);
free(tstring);
//***************************************************** add by www ***************************
if (_tcslen(item.rarity) > 2)
{
TextString sTemp;
memset(sTemp, 0, 512);
_tcscpy(sTemp, item.rarity);
memset(item.rarity, 0, 512);
_tcsncpy(item.rarity, sTemp, 2);
_tcscpy(item.type, sTemp + 2);
if (!_tcscmp(item.rarity, TEXT("套裝")))
{
memset(item.rarity, 0, 512);
_tcscpy(item.rarity, TEXT("傳奇"));
}
}
this is a test.
name: 殺滅破斷
at: 1/1
ilevel: 63
dps/ar: 1276.3
rarity: 稀有
type: 斧
buyout: 180000000
mbid: 180000000
cbid: 180000000
rtime: 0
xtime: 1348258913
id: 406953735
stat: 300 (+300 最小傷害)
stat: 400 (+400 最大傷害)
stat: 50 (+50% 傷害)
stat: 78 (+78 敏捷)
stat: 120 (+120 智力)
stat: 0 (無視耐久度的毀損)
socket: 紅寶石=15
Last edited by coco365; 09-23-2012 at 07:56 PM.
a little modification, since cell in chinese client are wider then US.
//******************************************************************************** ***********************************
row_size_y = row_size_y*1.15;
// calculated constrained combo y (due to resolution)
Double combo_bottom = coordinate.y + (row_size_y * drop_count);
Double constrained_y = (combo_bottom > 1.0) ? coordinate.y - (combo_bottom - 1.0) : coordinate.y;
Coordinate constrained_coord(open_coord.x, constrained_y + (screen_index * row_size_y) + (row_size_y / 2));
well, for chinese client you need RU support, wait for next update.
coco i updated the alignment of comboboxes row positions to be simpler and it just reads their location directly from d3 memory. the comboboxes were like the majority of HA work getting them to be fast and context free... i think im finally finished with them after 25
ill check out your changes for parsing rarity/type... i really had no idea how to read that and seperate them
i avoid unicode (windows wchar way) where i can... i think only place i convert to windows unicode is for haAlert(). its strictly UTF8 everywhere else. anyway haItem().text should work already... i tested myself. but i have my editor set to UTF8.
also the only point of the char/primary/secondary constants is to make haFilterType work. i can update the locale .txt files to make it work if you non-en folks find it really useful![]()
Last edited by ChuiChu; 09-23-2012 at 10:40 PM.
For parsing rarity/type, i notice the description of items between us client and cn client. like description of two items
(1)Immortal King's Soul Cage (不朽之王的永恆統治)
Set Chest Armor (套裝胸甲)
(2)Stone of Jordan (喬丹之石)
Legendary Ring (傳奇戒指)
now you can see the differences, _FORMAT_ITEM_RARITYTYPE[] = "{c:%s}%s %s{/c}";
can not prase chinese strings, since no blank in "傳奇戒指", not as that in "Legendary Ring".
luckly, blz using strictly two words denote item.rarity in chinese client, like "傳奇","套裝","稀有"....
so i prase two words for rarity, and the remaining for item.type.
there is only one exception, for normal("普通") items, blz only use one word bow("弓"), so i can not prase item.raty,
and use the whole sting for item.type.
2. avoid unicode just ok, maybe you need to convert every utf8 string to ansi, cause you use lots of strcmp, and "*format == '%'",
its difficult to modify.
3. for chinese clinet, translation is bad for search, in search combox Ignores Durability loss ("不壞"),
but in item.stat Ignores Durability loss was translated into("無視耐久度的損壞"), so find unique item.stat in item table maybe a troublesome work.
Last edited by coco365; 09-24-2012 at 09:29 PM.
Is there any way, to make it not fish for tooltip?
Hey, just wanted to thank you for making this, ive been using it today, and i have made x10 the amount i made with my own image recognition bot, i chose to cut out some of the script, and re-write it to make sure your bot was running, made a timer to auto login - auto logout, and a few other features.
http://www.ownedcore.com/forums/diab...ml#post2515134 (AutoLogin, Auto Set Search Criteria, And Log In / Log Out Timer)
here it is for anyone that is interrested, very messy code, but everything is commented so anyone with a little autoit knowledge can re-write it and make it work.
Hello, I understand very little English, so I can not understand the bot.
how to write a script to search the Russian auction?
I'm willing to pay for help.
здравствуйте, я плохо понимаю английский и поэтому не могу разобраться в боте.
как написать скрипты для поиска в русском аукционе?
я готов заплатить за помощь.
Hello CHui !
I'd like to use this lovely bot but because I use french version of Diablo I wonder which version I should install between US or Europeean English one ?
Thank you for your answer and for the job you've done.
Regards.