|
From: Corey F. <gn...@us...> - 2004-12-27 17:28:24
|
Update of /cvsroot/clicksaver/ClickSaverSrc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19443 Modified Files: clicksaver.c clicksaver.h guidef.c Log Message: Added Option for multiple missions, quick change Index: clicksaver.h =================================================================== RCS file: /cvsroot/clicksaver/ClickSaverSrc/clicksaver.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** clicksaver.h 3 Sep 2004 19:16:46 -0000 1.14 --- clicksaver.h 27 Dec 2004 17:28:13 -0000 1.15 *************** *** 1,4 **** --- 1,7 ---- /* * $Log$ + * Revision 1.15 2004/12/27 17:28:13 gnarf37 + * Added Option for multiple missions, quick change + * * Revision 1.14 2004/09/03 19:16:46 gnarf37 * Version 2.3.1 AI Updates *************** *** 110,113 **** --- 113,117 ---- CS_BUYINGAGENTFOLD, CS_BUYINGAGENTTRIES, + CS_BUYINGAGENTMISH, CS_BUYINGAGENT_INFOWINDOW, Index: clicksaver.c =================================================================== RCS file: /cvsroot/clicksaver/ClickSaverSrc/clicksaver.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** clicksaver.c 3 Sep 2004 19:16:46 -0000 1.15 --- clicksaver.c 27 Dec 2004 17:28:12 -0000 1.16 *************** *** 1,4 **** --- 1,7 ---- /* * $Log$ + * Revision 1.16 2004/12/27 17:28:12 gnarf37 + * Added Option for multiple missions, quick change + * * Revision 1.15 2004/09/03 19:16:46 gnarf37 * Version 2.3.1 AI Updates *************** *** 76,79 **** --- 79,83 ---- PUU32 g_BuyingAgentCount = 0; + PUU32 g_BuyingAgentMissions = 0; PUU32 g_bFirstRound = TRUE; PUU8 g_MishNumber = 0, g_FoundMish = -1; *************** *** 302,305 **** --- 306,310 ---- case CSAM_STOPBUYINGAGENT: g_BuyingAgentCount = 0; + g_BuyingAgentMissions = 0; EndBuyingAgent(); *************** *** 323,333 **** ReleaseMutex( g_Mutex ); ! if( pMissionData ) ! { if( g_BuyingAgentCount ) BuyingAgent(); else EndBuyingAgent(); ! } } --- 328,338 ---- ReleaseMutex( g_Mutex ); ! // if( pMissionData ) ! // { if( g_BuyingAgentCount ) BuyingAgent(); else EndBuyingAgent(); ! // } } *************** *** 371,375 **** PlaySound("found.wav", NULL, SND_FILENAME | SND_NODEFAULT); } ! if (PUL_GET_CB(CS_MOUSEMOVE_CB)) { HWND AOWnd; --- 376,380 ---- PlaySound("found.wav", NULL, SND_FILENAME | SND_NODEFAULT); } ! if (PUL_GET_CB(CS_MOUSEMOVE_CB) || g_BuyingAgentMissions) { HWND AOWnd; *************** *** 386,390 **** } ! if (g_FoundMish != 255) { // Move mouse and select mission that finished our Buying Agent MousePos.x = 44 + ((g_FoundMish % 3) * 58); MousePos.y = 57 + ((g_FoundMish / 3) * 57); --- 391,395 ---- } ! if (g_FoundMish != 255 && !(pAppMsg->Message==CSAM_STOPBUYINGAGENT)) { // Move mouse and select mission that finished our Buying Agent MousePos.x = 44 + ((g_FoundMish % 3) * 58); MousePos.y = 57 + ((g_FoundMish / 3) * 57); *************** *** 395,398 **** --- 400,404 ---- SendMessage( AOWnd, WM_LBUTTONDOWN, 0, lParam ); + Sleep(500); SendMessage( AOWnd, WM_LBUTTONUP, 0, lParam ); *************** *** 402,405 **** --- 408,450 ---- ClientToScreen( AOWnd, &MousePos ); SetCursorPos( MousePos.x, MousePos.y ); + if (g_BuyingAgentMissions) + { + SendMessage( AOWnd, WM_LBUTTONDOWN, 0, lParam ); + Sleep(500); + SendMessage( AOWnd, WM_LBUTTONUP, 0, lParam ); + + Sleep( 2010 ); + + SendMessage( AOWnd, WM_KEYDOWN, 0x45, 0); + Sleep(500); + SendMessage( AOWnd, WM_KEYUP, 0x45, 0); + + Sleep( 2010 ); + + { + int easy_hard = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_SLIDER_EASY_HARD), PUA_TEXTENTRY_VALUE ); + + int good_bad = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_SLIDER_GOOD_BAD), PUA_TEXTENTRY_VALUE ); + + int order_chaos = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_SLIDER_ORDER_CHAOS), PUA_TEXTENTRY_VALUE ); + + int open_hidden = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_SLIDER_OPEN_HIDDEN), PUA_TEXTENTRY_VALUE ); + + int phys_myst = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_SLIDER_PHYS_MYST), PUA_TEXTENTRY_VALUE ); + + int headon_stealth = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_SLIDER_HEADON_STEALTH), PUA_TEXTENTRY_VALUE ); + + int money_xp = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_SLIDER_MONEY_XP), PUA_TEXTENTRY_VALUE ); + + + + _setSliders(easy_hard, good_bad, order_chaos, open_hidden, phys_myst, headon_stealth, money_xp); + } + + g_bFirstRound = TRUE; + g_BuyingAgentCount = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_BUYINGAGENTTRIES ), PUA_TEXTENTRY_VALUE ); + BuyingAgent(); + g_BuyingAgentMissions--; + } } *************** *** 456,459 **** --- 501,505 ---- if( bReadyToGo ) { + g_BuyingAgentMissions = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_BUYINGAGENTMISH ), PUA_TEXTENTRY_VALUE ) - 1; g_BuyingAgentCount = puGetAttribute( puGetObjectFromCollection( g_pCol, CS_BUYINGAGENTTRIES ), PUA_TEXTENTRY_VALUE ); g_bFirstRound = TRUE; *************** *** 1125,1128 **** --- 1171,1175 ---- DisplayErrorMessage( "Anarchy Online is not running.", TRUE ); g_BuyingAgentCount = 0; + g_BuyingAgentMissions = 0; return FALSE; } *************** *** 1272,1276 **** g_BuyingAgentCount = 0; ! return; --- 1319,1323 ---- g_BuyingAgentCount = 0; ! g_BuyingAgentMissions = 0; return; *************** *** 1391,1417 **** //_dragMouse(200, 165, 200, 165); ! _dragMouse(102, 160, (int)_linIinterp(64, 141, easy_hard/100.0f), 160); ! _dragMouse(102, ypos, (int)_linIinterp(64, 141, good_bad/100.0f), ypos); ypos += 18; ! _dragMouse(102, ypos, (int)_linIinterp(64, 141, order_chaos/100.0f), ypos); ypos += 18; ! _dragMouse(102, ypos, (int)_linIinterp(64, 141, open_hidden/100.0f), ypos); ypos += 18; ! _dragMouse(102, ypos, (int)_linIinterp(64, 141, phys_myst/100.0f), ypos); ypos += 18; ! _dragMouse(102, ypos, (int)_linIinterp(64, 141, headon_stealth/100.0f), ypos); ypos += 18; ! _dragMouse(102, ypos, (int)_linIinterp(64, 141, money_xp/100.0f), ypos); --- 1438,1464 ---- //_dragMouse(200, 165, 200, 165); ! if (easy_hard != 50) _dragMouse(102, 160, (int)_linIinterp(64, 141, easy_hard/100.0f), 160); ! if (good_bad != 50) _dragMouse(102, ypos, (int)_linIinterp(64, 141, good_bad/100.0f), ypos); ypos += 18; ! if (order_chaos != 50) _dragMouse(102, ypos, (int)_linIinterp(64, 141, order_chaos/100.0f), ypos); ypos += 18; ! if (open_hidden != 50) _dragMouse(102, ypos, (int)_linIinterp(64, 141, open_hidden/100.0f), ypos); ypos += 18; ! if (phys_myst != 50) _dragMouse(102, ypos, (int)_linIinterp(64, 141, phys_myst/100.0f), ypos); ypos += 18; ! if (headon_stealth != 50) _dragMouse(102, ypos, (int)_linIinterp(64, 141, headon_stealth/100.0f), ypos); ypos += 18; ! if (money_xp != 50) _dragMouse(102, ypos, (int)_linIinterp(64, 141, money_xp/100.0f), ypos); Index: guidef.c =================================================================== RCS file: /cvsroot/clicksaver/ClickSaverSrc/guidef.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** guidef.c 3 Sep 2004 19:16:46 -0000 1.19 --- guidef.c 27 Dec 2004 17:28:13 -0000 1.20 *************** *** 1,4 **** --- 1,7 ---- /* * $Log$ + * Revision 1.20 2004/12/27 17:28:13 gnarf37 + * Added Option for multiple missions, quick change + * * Revision 1.19 2004/09/03 19:16:46 gnarf37 * Version 2.3.1 AI Updates *************** *** 79,86 **** PUA_TEXTENTRY_NUMERIC, TRUE, PUA_TEXTENTRY_MIN, 1, ! PUA_TEXTENTRY_MAX, 1000, PUA_TEXTENTRY_BUFFERSIZE, 5, PUA_TEXTENTRY_VALUE, 10, 0, 0, PUM_ADDCHILD, PU_ACTION_OBJDEF, 0, ( PUU32 )"Text", PUA_TEXT_STRING, ( PUU32 )"Start Buying Agent", --- 82,98 ---- PUA_TEXTENTRY_NUMERIC, TRUE, PUA_TEXTENTRY_MIN, 1, ! PUA_TEXTENTRY_MAX, 10000, PUA_TEXTENTRY_BUFFERSIZE, 5, PUA_TEXTENTRY_VALUE, 10, 0, 0, + PUM_ADDCHILD, PU_LABEL( "# of Mish:" ), + PUM_ADDCHILD, PU_ACTION_OBJDEF, CS_BUYINGAGENTMISH, ( PUU32 )"TextEntry", + PUA_CONTROL_WEIGHT, 1, + PUA_TEXTENTRY_NUMERIC, TRUE, + PUA_TEXTENTRY_MIN, 1, + PUA_TEXTENTRY_MAX, 30, + PUA_TEXTENTRY_BUFFERSIZE, 5, + PUA_TEXTENTRY_VALUE, 1, + 0, 0, PUM_ADDCHILD, PU_ACTION_OBJDEF, 0, ( PUU32 )"Text", PUA_TEXT_STRING, ( PUU32 )"Start Buying Agent", |