-
Posts
672 -
Joined
-
Last visited
Toady's Achievements
Universalist (7/7)
3
Reputation
-
user4157124 reacted to a post in a topic:
Artificial Intelligence - Bot path finding
-
I just made the exact map you posted, no error. What else did you do?
-
Thanks Chimp for the fixes and getting this running with the latest version of AutoIt. I've updated the script on the main post.
-
Toady reacted to a post in a topic:
Artificial Intelligence - Bot path finding
-
BabyIT reacted to a post in a topic:
PowerPoint Wrapper
-
A simple example showing how to implement this pattern in AutoIt. For those unfamiliar with this go to Wiki to learn more. AutoIt-MVC.zip
-
"AutoIt Menu 1.2.8 could not be installed because it is not compatible with FireFox 3.5" Any updates for this? I love this addon and I can't do without it
-
This is an awesome script, looks like a lot of time went in to it. 5/5!
-
Nice script, I enjoy these web service based scripts. Keep up the good work!
-
So basicly, if target isn't a DK or Ret pally then attack. lol jk. But ya, that would be a neat concept.
-
Very nice work Malu05, Keep up the good work
-
Nice work Kurt, Excellent example of a mouse hook.
-
Display Color Palette using GDI+ (gif file only)
Toady replied to Malkey's topic in AutoIt Example Scripts
Very nice! This will come in handy. -
Thats pretty cool, nice work!
-
I wrote this script a long time ago. Its a basic fight simulator that displays a player vs. player combat in action. Each player has equal health, chance to crit, and change to dodge or parry. I lost interest in making a way to allow the user to customize their player's stats. Maybe someone else reading this will find it worth while. Oh well, Enjoy. Shows each players health bars change during combat. Also displays a combat log to see who hit who and for how much damage. #include <guiconstants.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> $gui = GUICreate("Fight simulation",380,400,-1,-1) $button = GUICtrlCreateButton("Fight!",120,10,150) $log = GUICtrlCreateList("",10,100,360,300,Bitor($WS_BORDER, $WS_VSCROLL)) $hpbar1 = GUICtrlCreateProgress(20,50,160,25,$PBS_SMOOTH) $hpbar2 = GUICtrlCreateProgress(200,50,160,25,$PBS_SMOOTH) GUICtrlSetData($hpbar1,100) GUICtrlSetData($hpbar2,100) $pname1 = GUICtrlCreateLabel("Player 1",20,80) $pname2 = GUICtrlCreateLabel("Player 2",200,80) $hptext1 = GUICtrlCreateLabel("1000",150,80) $hptext2 = GUICtrlCreateLabel("1000",330,80) GUISetState() Dim $logtext = "" Dim $player1[9] Dim $player2[9] While 1 $msg = GUIGetMsg() Select case $msg = -3 Exit Case $msg = $button fight() EndSelect WEnd Func fight() GUICtrlSetState($button,$GUI_DISABLE) GUICtrlSetData($log,"") ;both players have same weapon and skills and same base health ;Both players have 1000 health, 15% chance to crit, 150 base weapon damage, 20% chance to dodge or block setStats($player1,"Player1",1000,15,150,$hpbar1,$hptext1,10,10) setStats($player2,"Player2",1000,15,150,$hpbar2,$hptext2,10,10) GUICtrlSetData($pname1,$player1[0]) GUICtrlSetData($pname2,$player2[0]) GUICtrlSetData($hptext1,$player1[1]) GUICtrlSetData($hptext2,$player2[1]) While 1 attack($player1,$player2) sleep(Random(200,1000,1)) ;random sleep to make fight appear more real, lol no really. If $player2[1] = 0 Then ExitLoop ;if health = 0 then player 1 won attack($player2,$player1) sleep(Random(200,1000,1)) If $player1[1] = 0 Then ExitLoop WEnd If $player1[1] = 0 Then GUICtrlSetData($log,$player2[0] & " defeats " & $player1[0] & "!") EndIf If $player2[1] = 0 Then GUICtrlSetData($log,$player1[0] & " defeats " & $player2[0] & "!") EndIf GUICtrlSetState($button,$GUI_ENABLE) EndFunc Func attack($self,ByRef $enemy) Local $event Local $dmg = Random($self[3]*0.70,$self[3],1) ;each player can mitigate up to 30% damage Local $bCrit = False Local $dodge = Random(0,100,1) Local $miss = Random(0,100,1) Local $block = Random(0,100,1) Local $chance = 10 ;chance to miss (10%) If $dodge <= $enemy[7] Or $miss <= $chance Or $block <= $enemy[8] Then If $miss <= $chance Then $event = $self[0] & " misses" ElseIf $dodge <= $enemy[7] Then $event = $enemy[0] & " dodges " & $self[0] & "'s attack" ElseIf $block <= $enemy[8] Then $event = $enemy[0] & " blocks " & $self[0] & "'s attack" EndIf Else If Random(0,100,1) <= $self[2] Then $dmg = Round($dmg*1.5,0) ;crit damage (+50%) $bCrit = True EndIf $enemy[1] -= $dmg $event = $self[0] & " hits " & $enemy[0] & " for " & $dmg If $bCrit Then $event &= " (critical)" Endif EndIf $event &= "|" GUICtrlSetData($log,Guictrlread($log) & $event) GUICtrlSetData($enemy[4],100*($enemy[1]/$enemy[6])) If $enemy[1] < 0 Then $enemy[1] = 0 GUICtrlSetData($enemy[5],$enemy[1]) _GUICtrlListBox_SetCaretIndex($log,_GUICtrlListBox_GetCount($log)-1) EndFunc Func setStats(ByRef $player,$name,$health,$critchance,$bonusdmg,$hpbar,$hptext,$dodge,$block) $player[0] = $name $player[1] = $health ;current health $player[2] = $critchance $player[3] = $bonusdmg $player[4] = $hpbar $player[5] = $hptext $player[6] = $health ;base health $player[7] = $dodge ;chance to dodge $player[8] = $block ;chance to block EndFunc
-
Added YouTube suggest, see example #2.
-
Here is an example of using Google suggest. As you type in a keyword, a list of suggestions are populated below. Scripts use XMLHTTPRequest to accomplish the task. Probably error prone, but like I said its just an example. Two examples shown below, one is regular Google suggest and other is YouTube suggest. Ex 1) Google Suggest #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <Misc.au3> _Singleton('GoogleSuggest.au3') Opt('GUICloseOnESC', 1) GuiCreate('Google Suggest', 200, 190) $input = GUICtrlCreateInput("",10,10,180) $listbox = GUICtrlCreateList("",10,30,180) GuiSetState() Dim $objXMLHTTP = ObjCreate("Microsoft.XMLHTTP") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $IDFrom, $iCode $IDFrom = BitAND($wParam, 0xFFFF) $iCode = BitShift($wParam, 16) If $IDFrom <> $input Then Return If GUICtrlRead($input) = "" Then GUICtrlSetData($listbox,"") Return EndIf GUICtrlSetData($listbox,"") $objXMLHTTP.open("GET","http://suggestqueries.google.com/complete/search?output=firefox&client=&qu=" & GUICtrlRead($input),true) $objXMLHTTP.send("") Dim $strReturn = StringRegExpReplace($objXMLHTTP.responseText,"(.*\[)|(\].*)|""","") If $strReturn = "" Then Return GUICtrlSetData($listbox,StringRegExpReplace($strReturn,",","|"),GUICtrlRead($input)) EndFuncoÝ÷ Ù±1Ù.NæÞJè zËm«¢+Ø¥¹±Õ±Ðí]¥¹½ÝÍ ½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíU% ½¹ÍѹÑÍà¹ÔÌÐì(¥¹±Õ±Ðí5¥Í¹ÔÌÐì()}M¥¹±Ñ½¸ Ìäíe½ÕQÕÕÍйÔÌÌäì¤)=ÁÐ ÌäíU% ±½Í=¹MÌäì°Ä¤)Õ¥ ÉÑ Ìäíe½ÕQÕMÕÍÐÌäì°ÈÀÀ°ÄäÀ¤(ÀÌØí¥¹ÁÕÐôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÀ°ÄàÀ¤(ÀÌØí±¥ÍѽàôU% Ñɱ ÉÑ1¥ÍÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÌÀ°ÄàÀ¤)Õ¥MÑMÑÑ ¤()¥´ÀÌØí½©a51!QQ@ô=© ÉÑ ÅÕ½Ðí5¥É½Í½Ð¹a51!QQ@ÅÕ½Ðì¤)U%I¥ÍÑÉ5Í ÀÌØí]5} =559°ÅÕ½Ðí]5} =559ÅÕ½Ðì¤()]¡¥±Ä($ÀÌØíµÍôU%Ñ5Í ¤(%M±Ð($% ÍÀÌØíµÍôÀÌØíU%}Y9Q} 1=M($$%á¥Ð(%¹M±Ð)]¹()Õ¹]5} =559 ÀÌØí¡]¹°ÀÌØí5ͰÀÌØíÝAÉ´°ÀÌØí±AÉ´¤(%1½°ÀÌØí%ɽ´°ÀÌØí¥ ½($ÀÌØí%ɽ´ô ¥Ñ9 ÀÌØíÝAÉ´°Áá¤($ÀÌØí¥ ½ô ¥ÑM¡¥Ð ÀÌØíÝAÉ´°Äؤ(%%ÀÌØí%ɽ´±ÐìÐìÀÌØí¥¹ÁÕÐQ¡¸IÑÕɸ(%%MÑÉ¥¹IáÁIÁ±¡U% ÑɱI ÀÌØí¥¹ÁÕФ°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤ôÅÕ½ÐìÅÕ½ÐìQ¡¸($%U% ÑɱMÑÑ ÀÌØí±¥Íѽà°ÅÕ½ÐìÅÕ½Ðì¤($%IÑÕɸ(%¹%(%U% ÑɱMÑÑ ÀÌØí±¥Íѽà°ÅÕ½ÐìÅÕ½Ðì¤($ÀÌØí½©a51!QQ@¹½Á¸ ÅÕ½ÐíPÅÕ½Ðì°ÅÕ½Ðí¡ÑÑÀè¼½ÍÕÍÑÅÕɥ̹½½±¹½´½½µÁ±Ñ½ÍÉ ý¡°õ¸µÀíÌõåеÀí©Í½¸õеÀí©Í½¹ÀôµÀíÄôÅÕ½ÐìµÀìU% ÑɱI ÀÌØí¥¹ÁÕФ±ÑÉÕ¤($ÀÌØí½©a51!QQ@¹Í¹ ÅÕ½ÐìÅÕ½Ðì¤(%¥´ÀÌØíÉÑÕɹÍÐôMÑÉ¥¹MÁ±¥Ð ÀÌØí½©a51!QQ@¹ÉÍÁ½¹ÍQáаÅÕ½Ðít±lÅÕ½Ðì°Ä¤(%¥´ÀÌØíÍÑÉIÑÕɸôMÑÉ¥¹IáÁIÁ± ÀÌØíÉÑÕɹÍÑlÅt°ÅÕ½Ðì ÀäÈíl¸¨ÀäÈíl¥ðÅÕ½ÐìÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(%%ÀÌØíÍÑÉIÑÕɸôÅÕ½ÐìÅÕ½ÐìQ¡¸IÑÕɸ(%U% ÑɱMÑÑ ÀÌØí±¥Íѽà±MÑÉ¥¹IáÁIÁ± ÀÌØíÍÑÉIÑÕɸ°ÅÕ½Ðì°ÅÕ½Ðì°ÅÕ½ÐíðÅÕ½Ð줱U% ÑɱI ÀÌØí¥¹ÁÕФ¤)¹Õ¹
-
Ive had it happen. The primary monitor is blue, the other one justs turns black (off).