blyind Posted October 1, 2007 Posted October 1, 2007 hey guys i know im back to nub status not useing autoit in years but heres my problem, im useing valuaters game bot builder as a base, and i am trying to make it work for this game called tonti you can see how it works here http://www.ebaumsworld.com/games/play/848/basically all i need to do just to get started it search a 3x3 grid for a color and depending on which cell contains that color i need to send a key, but i am having alot of damned problems maybe i am getting my x, and y coords messed up or something but im really trying and it just wont work, the best it does it just continually sends the 7 key even if the color does not appear in that cell im trying to work on the first cell on the first rom first but i guess i just suck.. anyways heres the code i got so far...; _____________ ; | 7 | 8 | 9 | ; |-----------| ; | 4 | 5 | 6 | ;basic numberpad cell example, im trying to get 7 to work for starters ; |-----------| ; | 1 | 2 | 3 | ; -------------i know there is probably 1000 ways to do this im just frusterated.by the way all this code is valuaters from his game bot builder except for my one line, im thinking my syntax is probably all fubared or something since i used to use c++ and i forgot that along with autoit when i went down hill for a few years and now that im trying to remember it all it comes back all jumbled n shit.Dim $Cell7Bounds[4]Dim $Cell8Bounds[4]Dim $Cell9Bounds[4]Dim $Cell4Bounds[4]Dim $Cell5Bounds[4]Dim $Cell6Bounds[4]Dim $Cell1Bounds[4]Dim $Cell2Bounds[4]Dim $Cell3Bounds[4]$Cell7Bounds[0] = 317 ;x$Cell7Bounds[1] = 430 ;y$Cell7Bounds[2] = 375 ;x2$Cell7Bounds[3] = 455 ;y2Do $t = $t + 1 If $t > 10 Then ExitLoop Sleep($wait) $Cpos = PixelSearch($left, $top, $right, $bottom, $data[$t], $Vary, $Skip) Until Not @error If $Cpos[0] >= $Cell7Bounds[0] & $Cpos[1] >= $Cell7Bounds[1] & $Cpos[0] <= $Cell7Bounds[2] & $Cpos[1] <= $Cell7Bounds[3] Then Send("7") If $t > 10 Then ContinueLoop ;MouseClick("left", $Cpos[0], $Cpos[1], 1, 0)i dont know guys im just freaking lost as hell and about to shoot myself.3 years ago i could have done this it just sucks to be a dumbass and get into heroin that stuff ruined my damned brains and now all i got left is mush but atleast im trying to rebuild some of my knowledge i guess?any help would be of great appreciation, btw check out the game so you fully understand what im talking about and i dont appear to be a total rambling fool.thx to anyone who gave enuff of a shiz to read this far.
blyind Posted October 1, 2007 Author Posted October 1, 2007 *update* i got it working somewhat... it still; is really slow to hit anything on the bottom row i dont knopw why...and it still dosent detect the coins or try to hit them no mateer what i do, any tips ? this is the code im useing so far... Func _start() $Colors = IniReadSection($Gloc & $Ginfo & ".ini", "Colors") For $i = 0 To $Colors[0][0] $data[$i] = IniRead($Gloc & $Ginfo & ".ini", "Colors", $i, "") If $i >= 10 Then ExitLoop Next $pause = Not $pause While $pause ToolTip('GameBot is "Running".. Press F9 to Quit', 0, 0) $t = 0 Do $t = $t + 1 If $t > 10 Then ExitLoop Sleep($wait) $Cpos = PixelSearch($left, $top, $right, $bottom, $data[$t], $Vary, $Skip) Until Not @error If $t = 9 Then ToolTip('GameBot is "Running color is = 9 ".. Press F9 to Quit', 0, 0) If $Cpos[0] >= $Cell7Bounds[0] And $Cpos[1] >= $Cell7Bounds[1] And $Cpos[0] <= $Cell7Bounds[2] And $Cpos[1] <= $Cell7Bounds[3]+20 Then Send("7") If $Cpos[0] >= $Cell8Bounds[0] And $Cpos[1] >= $Cell8Bounds[1] And $Cpos[0] <= $Cell8Bounds[2] And $Cpos[1] <= $Cell8Bounds[3]+20 Then Send("8") If $Cpos[0] >= $Cell9Bounds[0] And $Cpos[1] >= $Cell9Bounds[1] And $Cpos[0] <= $Cell9Bounds[2] And $Cpos[1] <= $Cell9Bounds[3]+20 Then Send("9") If $Cpos[0] >= $Cell4Bounds[0] And $Cpos[1] >= $Cell4Bounds[1] And $Cpos[0] <= $Cell4Bounds[2] And $Cpos[1] <= $Cell4Bounds[3]+20 Then Send("4") If $Cpos[0] >= $Cell5Bounds[0] And $Cpos[1] >= $Cell5Bounds[1] And $Cpos[0] <= $Cell5Bounds[2] And $Cpos[1] <= $Cell5Bounds[3]+20 Then Send("5") If $Cpos[0] >= $Cell6Bounds[0] And $Cpos[1] >= $Cell6Bounds[1] And $Cpos[0] <= $Cell6Bounds[2] And $Cpos[1] <= $Cell6Bounds[3]+20 Then Send("6") If $Cpos[0] >= $Cell1Bounds[0] And $Cpos[1] >= $Cell1Bounds[1] And $Cpos[0] <= $Cell1Bounds[2] And $Cpos[1] <= $Cell1Bounds[3]+20 Then Send("1") If $Cpos[0] >= $Cell2Bounds[0] And $Cpos[1] >= $Cell2Bounds[1] And $Cpos[0] <= $Cell2Bounds[2] And $Cpos[1] <= $Cell2Bounds[3]+20 Then Send("2") If $Cpos[0] >= $Cell3Bounds[0] And $Cpos[1] >= $Cell3Bounds[1] And $Cpos[0] <= $Cell3Bounds[2] And $Cpos[1] <= $Cell3Bounds[3]+20 Then Send("3") Else If $Cpos[0] >= $Cell1Bounds[0] And $Cpos[1] >= $Cell1Bounds[1] And $Cpos[0] <= $Cell1Bounds[2] And $Cpos[1] <= $Cell1Bounds[3] Then Send("1") If $Cpos[0] >= $Cell2Bounds[0] And $Cpos[1] >= $Cell2Bounds[1] And $Cpos[0] <= $Cell2Bounds[2] And $Cpos[1] <= $Cell2Bounds[3] Then Send("2") If $Cpos[0] >= $Cell3Bounds[0] And $Cpos[1] >= $Cell3Bounds[1] And $Cpos[0] <= $Cell3Bounds[2] And $Cpos[1] <= $Cell3Bounds[3] Then Send("3") If $Cpos[0] >= $Cell7Bounds[0] And $Cpos[1] >= $Cell7Bounds[1] And $Cpos[0] <= $Cell7Bounds[2] And $Cpos[1] <= $Cell7Bounds[3] Then Send("7") If $Cpos[0] >= $Cell8Bounds[0] And $Cpos[1] >= $Cell8Bounds[1] And $Cpos[0] <= $Cell8Bounds[2] And $Cpos[1] <= $Cell8Bounds[3] Then Send("8") If $Cpos[0] >= $Cell9Bounds[0] And $Cpos[1] >= $Cell9Bounds[1] And $Cpos[0] <= $Cell9Bounds[2] And $Cpos[1] <= $Cell9Bounds[3] Then Send("9") If $Cpos[0] >= $Cell4Bounds[0] And $Cpos[1] >= $Cell4Bounds[1] And $Cpos[0] <= $Cell4Bounds[2] And $Cpos[1] <= $Cell4Bounds[3] Then Send("4") If $Cpos[0] >= $Cell5Bounds[0] And $Cpos[1] >= $Cell5Bounds[1] And $Cpos[0] <= $Cell5Bounds[2] And $Cpos[1] <= $Cell5Bounds[3] Then Send("5") If $Cpos[0] >= $Cell6Bounds[0] And $Cpos[1] >= $Cell6Bounds[1] And $Cpos[0] <= $Cell6Bounds[2] And $Cpos[1] <= $Cell6Bounds[3] Then Send("6") EndIf If $t > 10 Then ContinueLoop ;MouseClick("left", $Cpos[0], $Cpos[1], 1, 0) ;MouseMove($left, $top) Sleep($wait) WEnd ToolTip('') GUISetState(@SW_RESTORE, $Gamebot) HotKeySet("{F9}") EndFunc;==>_start rmember i only esdited it its all from valuaters game bot so dont flame me for trying to take credit for it cause im not =P and where i check to see is the color =9 is cause the 9th color is the coin color and there smaller then the other things so i added +20 or pixels to search further down on each cell but it still wont recognize them?
blyind Posted October 2, 2007 Author Posted October 2, 2007 soory bout that valuater didnt know pm's cut stuff off like that anyways heres the whole pm i sent you...almost the same as the post above with more progress... hey man i really appreciate your prompt reply to my post on your game bot builder post...anyways i am still using your basic code for that, all i have dont is modified the start func to search each of the 9 cells on the 3x3 grid as you suggested...however i am having a few problems...for one the bottom row (1,2,3) only very rarely seem to register, i have tried moving the code for the last row infront of the other 2 rows but it dosent sem to make a difference.....also for some reason it wont detect the little coins that sometimes popup after "hitting" one of the tonti's, same with the hearts...i had to add about 20 pixels to the x coords because they are centered in the cell's instead oif the tall tonti's that overlap cells forcing me to search higher up in them for those but for the coins and little hearts i add 20 pixels to search the center of the cells and not the top part. anyways heres my code im sure its very slow and ineffecient if you can tell me a way to speed it up and possibly tell me why it isnt detecting the coins or hearts, and tell me why it only very rarely "hits" the tonti's on the bottom roe (1,2,3) here is my code ill add comments so you can understand my lame newb code...btw i am not a total newb to autoit i used to use it years back when it was v2...its much better now. i declared and initialized these new variables at the top where you declared your Dim's aswell... expandcollapse popupDim $Cell7Bounds[4] Dim $Cell8Bounds[4] Dim $Cell9Bounds[4] Dim $Cell4Bounds[4] Dim $Cell5Bounds[4] Dim $Cell6Bounds[4] Dim $Cell1Bounds[4] Dim $Cell2Bounds[4] Dim $Cell3Bounds[4] $Cell7Bounds[0] = 317 ;x $Cell7Bounds[1] = 520 ;y $Cell7Bounds[2] = 374 ;x2 $Cell7Bounds[3] = 542 ;y2 $Cell8Bounds[0] = 388 ;x $Cell8Bounds[1] = 520 ;y $Cell8Bounds[2] = 449 ;x2 $Cell8Bounds[3] = 542 ;y2 $Cell9Bounds[0] = 461 ;x $Cell9Bounds[1] = 520 ;y $Cell9Bounds[2] = 523 ;x2 $Cell9Bounds[3] = 542 ;y2 $Cell4Bounds[0] = 317 ;x $Cell4Bounds[1] = 575 ;y $Cell4Bounds[2] = 374 ;x2 $Cell4Bounds[3] = 593 ;y2 $Cell5Bounds[0] = 388 ;x $Cell5Bounds[1] = 575 ;y $Cell5Bounds[2] = 449 ;x2 $Cell5Bounds[3] = 593 ;y2 $Cell6Bounds[0] = 461 ;x $Cell6Bounds[1] = 575 ;y $Cell6Bounds[2] = 523 ;x2 $Cell6Bounds[3] = 593 ;y2 $Cell1Bounds[0] = 317 ;x $Cell1Bounds[1] = 645 ;y $Cell1Bounds[2] = 374 ;x2 $Cell1Bounds[3] = 660 ;y2 $Cell2Bounds[0] = 388 ;x $Cell2Bounds[1] = 645 ;y $Cell2Bounds[2] = 449 ;x2 $Cell2Bounds[3] = 660 ;y2 $Cell3Bounds[0] = 461 ;x $Cell3Bounds[1] = 645 ;y $Cell3Bounds[2] = 523 ;x2 $Cell3Bounds[3] = 660 ;y2 Func _start() $Colors = IniReadSection($Gloc & $Ginfo & ".ini", "Colors") For $i = 0 To $Colors[0][0] $data[$i] = IniRead($Gloc & $Ginfo & ".ini", "Colors", $i, "") If $i >= 10 Then ExitLoop Next $pause = Not $pause While $pause ToolTip('GameBot is "Running".. Press F9 to Quit', 0, 0) $t = 0 Do $t = $t + 1 If $t > 10 Then ExitLoop Sleep($wait) $Cpos = PixelSearch($left, $top, $right, $bottom, $data[$t], $Vary, $Skip) Until Not @error If $t = 9 Then ; basically i do this because color 9 is the color of the small coins that are center in the cells as i menchaned before once i get it to work i plan on adding ;an elseif $t=10 because thats the color of the small hearts that are also centered in the cells ToolTip('GameBot is "Running color is = 9(color is looking for coins)".. Press F9 to Quit', 0, 0) If $Cpos[0] >= $Cell7Bounds[0] And $Cpos[1] >= $Cell7Bounds[1] And $Cpos[0] <= $Cell7Bounds[2] And $Cpos[1] <= $Cell7Bounds[3]+20 Then Send("7") If $Cpos[0] >= $Cell8Bounds[0] And $Cpos[1] >= $Cell8Bounds[1] And $Cpos[0] <= $Cell8Bounds[2] And $Cpos[1] <= $Cell8Bounds[3]+20 Then Send("8") If $Cpos[0] >= $Cell9Bounds[0] And $Cpos[1] >= $Cell9Bounds[1] And $Cpos[0] <= $Cell9Bounds[2] And $Cpos[1] <= $Cell9Bounds[3]+20 Then Send("9") If $Cpos[0] >= $Cell4Bounds[0] And $Cpos[1] >= $Cell4Bounds[1] And $Cpos[0] <= $Cell4Bounds[2] And $Cpos[1] <= $Cell4Bounds[3]+20 Then Send("4") If $Cpos[0] >= $Cell5Bounds[0] And $Cpos[1] >= $Cell5Bounds[1] And $Cpos[0] <= $Cell5Bounds[2] And $Cpos[1] <= $Cell5Bounds[3]+20 Then Send("5") If $Cpos[0] >= $Cell6Bounds[0] And $Cpos[1] >= $Cell6Bounds[1] And $Cpos[0] <= $Cell6Bounds[2] And $Cpos[1] <= $Cell6Bounds[3]+20 Then Send("6") If $Cpos[0] >= $Cell1Bounds[0] And $Cpos[1] >= $Cell1Bounds[1] And $Cpos[0] <= $Cell1Bounds[2] And $Cpos[1] <= $Cell1Bounds[3]+20 Then Send("1") If $Cpos[0] >= $Cell2Bounds[0] And $Cpos[1] >= $Cell2Bounds[1] And $Cpos[0] <= $Cell2Bounds[2] And $Cpos[1] <= $Cell2Bounds[3]+20 Then Send("2") If $Cpos[0] >= $Cell3Bounds[0] And $Cpos[1] >= $Cell3Bounds[1] And $Cpos[0] <= $Cell3Bounds[2] And $Cpos[1] <= $Cell3Bounds[3]+20 Then Send("3") Else If $Cpos[0] >= $Cell1Bounds[0] And $Cpos[1] >= $Cell1Bounds[1] And $Cpos[0] <= $Cell1Bounds[2] And $Cpos[1] <= $Cell1Bounds[3] Then Send("1") If $Cpos[0] >= $Cell2Bounds[0] And $Cpos[1] >= $Cell2Bounds[1] And $Cpos[0] <= $Cell2Bounds[2] And $Cpos[1] <= $Cell2Bounds[3] Then Send("2") If $Cpos[0] >= $Cell3Bounds[0] And $Cpos[1] >= $Cell3Bounds[1] And $Cpos[0] <= $Cell3Bounds[2] And $Cpos[1] <= $Cell3Bounds[3] Then Send("3") If $Cpos[0] >= $Cell7Bounds[0] And $Cpos[1] >= $Cell7Bounds[1] And $Cpos[0] <= $Cell7Bounds[2] And $Cpos[1] <= $Cell7Bounds[3] Then Send("7") If $Cpos[0] >= $Cell8Bounds[0] And $Cpos[1] >= $Cell8Bounds[1] And $Cpos[0] <= $Cell8Bounds[2] And $Cpos[1] <= $Cell8Bounds[3] Then Send("8") If $Cpos[0] >= $Cell9Bounds[0] And $Cpos[1] >= $Cell9Bounds[1] And $Cpos[0] <= $Cell9Bounds[2] And $Cpos[1] <= $Cell9Bounds[3] Then Send("9") If $Cpos[0] >= $Cell4Bounds[0] And $Cpos[1] >= $Cell4Bounds[1] And $Cpos[0] <= $Cell4Bounds[2] And $Cpos[1] <= $Cell4Bounds[3] Then Send("4") If $Cpos[0] >= $Cell5Bounds[0] And $Cpos[1] >= $Cell5Bounds[1] And $Cpos[0] <= $Cell5Bounds[2] And $Cpos[1] <= $Cell5Bounds[3] Then Send("5") If $Cpos[0] >= $Cell6Bounds[0] And $Cpos[1] >= $Cell6Bounds[1] And $Cpos[0] <= $Cell6Bounds[2] And $Cpos[1] <= $Cell6Bounds[3] Then Send("6") EndIf If $t > 10 Then ContinueLoop ;MouseClick("left", $Cpos[0], $Cpos[1], 1, 0) ;MouseMove($left, $top) Sleep($wait) WEnd ToolTip('') GUISetState(@SW_RESTORE, $Gamebot) HotKeySet("{F9}") EndFunc;==>_start also i was wondering i am really rusty with coding and i used to use C++ as well, in autoit is the concept of zero the same as in C++, like i mean if i made a variable called $thing[5] would i use them $thing[0] and end at $thing[4] or does it start at $thing[1] and end at $thing[5]? thanks man i know im asking alot of you but this thing has kept me up for a few nights already and my brain id running low on juice
Valuater Posted October 2, 2007 Posted October 2, 2007 Well... just played with it... it changes alot, making a bot pretty hard to do expandcollapse popup#include <GUIConstants.au3> Opt("PixelCoordMode", 0) ;1=absolute, 0=relative, 2=client Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") Dim $URL = "http://www.ebaumsworld.com/games/play/848/" Dim $Runner, $Paused Dim $Tontie = StringSplit(0x02807C,0xCC0000); add colors as needed * now there are "red" Tonties Dim $Gold = 0xFED95A ; for later Dim $Vary = 20 Dim $Skip = 2 Dim $time = 1000 Dim $Cell[10][5] = [[9], [7,122,170,140,182], [8,198,170,216,182], [9,272,170,290,182], [4,122,215,140,237], [5,198,215,216,237], [6,272,215,290,237], [1,122,270,140,295], [2,198,270,216,295], [3,272,270,290,295]] $oIE = ObjCreate("Shell.Explorer.2") GUICreate ( "Tontie", 410, 480,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2, BitOr($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) GUICtrlCreateObj( $oIE, -210, -220 , 640 , 650 ) GUICtrlCreateLabel("Thanks Valuater",230, 460, 100, 30) GUISetState () $oIE.navigate($URL) WinWaitActive("") Sleep($time * 7) MouseClick("left", 200, 340) Sleep($time) for $x = 1 to 9 Send($x) Sleep($time) Next Sleep($time) Send("0") ShowMe() While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit $M = MouseGetPos() ToolTip('Script is "Ready"' & @CRLF & "X= " & $m[0] & @CRLF & "Y= " & $m[1],0,0) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMe() $Runner = NOT $Runner If Not $Runner Then Return ToolTip('GameBot is "Running".. Press F9 to Quit', 0, 0) While $Runner For $x = 1 to 9 $Cpos = PixelSearch($Cell[$x][1], $Cell[$x][2], $Cell[$x][3], $Cell[$x][4], $Tontie[1], $Vary, $Skip) ; search for Tontie If not @error Then ; search for a green door ??? Send($Cell[$x][0]) ; check for gold EndIf Sleep(50) Next WEnd EndFunc 8)
blyind Posted October 3, 2007 Author Posted October 3, 2007 (edited) Well... just played with it... it changes alot, making a bot pretty hard to do expandcollapse popup#include <GUIConstants.au3> Opt("PixelCoordMode", 0) ;1=absolute, 0=relative, 2=client Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") Dim $URL = "http://www.ebaumsworld.com/games/play/848/" Dim $Runner, $Paused Dim $Tontie = StringSplit(0x02807C,0xCC0000); add colors as needed * now there are "red" Tonties Dim $Gold = 0xFED95A ; for later Dim $Vary = 20 Dim $Skip = 2 Dim $time = 1000 Dim $Cell[10][5] = [[9], [7,122,170,140,182], [8,198,170,216,182], [9,272,170,290,182], [4,122,215,140,237], [5,198,215,216,237], [6,272,215,290,237], [1,122,270,140,295], [2,198,270,216,295], [3,272,270,290,295]] $oIE = ObjCreate("Shell.Explorer.2") GUICreate ( "Tontie", 410, 480,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2, BitOr($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) GUICtrlCreateObj( $oIE, -210, -220 , 640 , 650 ) GUICtrlCreateLabel("Thanks Valuater",230, 460, 100, 30) GUISetState () $oIE.navigate($URL) WinWaitActive("") Sleep($time * 7) MouseClick("left", 200, 340) Sleep($time) for $x = 1 to 9 Send($x) Sleep($time) Next Sleep($time) Send("0") ShowMe() While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit $M = MouseGetPos() ToolTip('Script is "Ready"' & @CRLF & "X= " & $m[0] & @CRLF & "Y= " & $m[1],0,0) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMe() $Runner = NOT $Runner If Not $Runner Then Return ToolTip('GameBot is "Running".. Press F9 to Quit', 0, 0) While $Runner For $x = 1 to 9 $Cpos = PixelSearch($Cell[$x][1], $Cell[$x][2], $Cell[$x][3], $Cell[$x][4], $Tontie[1], $Vary, $Skip) ; search for Tontie If not @error Then ; search for a green door ??? Send($Cell[$x][0]) ; check for gold EndIf Sleep(50) Next WEnd EndFunc 8)thanks man...it compiles fine but it appears to have some sort of problem loading up the game in the explorer window or something...the gui will show up but then the debugger steps in and it says this... CODEif(typeof window.jQuery=="undefined"){window.undefined=window.undefined;var jQuery=function(a,c){if(window==this)return new jQuery(a,c);a=a||document;if(jQuery.isFunction(a))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](a);if(typeof a=="string"){var m=/^[^<]*(<(.|\s)+>)[^>]*$/.exec(a);if(m)a=jQuery.clean([m[1]]);else return new jQuery©.find(a)}return this.setArray(a.constructor==Array&&a||(a.jquery||a.length&&a!=window&&!a.nodeType&&a[0]!=undefined&&a[0].nodeType)&&jQuery.makeArray(a)||[a])};if(typeof $!="undefined")jQuery._$=$;var $=jQuery;jQuery.fn=jQuery.prototype={jquery:"1.1.2",size:function(){return this.length},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num]},pushStack:function(a){var ret=jQuery(a);ret.prevObject=this;return ret},setArray:function(a){this.length=0;[].push.apply(this,a);return this},each:function(fn,args){return jQuery.each(this,fn,args)},index:function(obj){var pos=-1;this.each(function(i){if(this==obj)pos=i});return pos},attr:function(key,value,type){var obj=key;if(key.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],key)||undefined;else{obj={};obj[key]=value}return this.each(function(index){for(var prop in obj)jQuery.attr(type?this.style:this,prop,jQuery.prop(this,obj[prop],type,index,prop))})},css:function(key,value){return this.attr(key,value,"curCSS")},text:function(e){if(typeof e=="string")return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])})});return t},wrap:function(){var a=jQuery.clean(arguments);return this.each(function(){var b=a[0].cloneNode(true);this.parentNode.insertBefore(b,this);while(b.firstChild)b=b.firstChild;b.appe ndChild(this)})},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this)})},after:function() {return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},find:function(t){return this.pushStack(jQuery.map(this,function(a){return jQuery.find(t,a)}),t)},clone:function(deep){return this.pushStack(jQuery.map(this,function(a){var a=a.cloneNode(deep!=undefined?deep:true);a.$events=null;return a}))},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(el,index){return t.apply(el,[index])})||jQuery.multiFilter(t,this))},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jqu ery)?jQuery.inArray(a,t)<0:a!=t}))},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||t.nodeName=="FORM")?t:[t]))},is:function(expr){return expr?jQuery.filter(expr,this).r.length>0:false},val:function(val){return val==undefined?(this.length?this[0].value:null):this.attr("value",val)},html:function(val){return val==undefined?(this.length?this[0].innerHTML:null):this.empty().append(val)},domManip:function(args,table,dir,fn){var clone=this.length>1;var a=jQuery.clean(args);if(dir<0)a.reverse();return this.each(function(){var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){fn.apply(obj,[clone?this.cloneNode(true):this])})})}};jQuery.extend=jQuery.fn.extend=function(){var the error it says is Microsoft Jscript runtime error 'classname' is null or not an object i know its alot of code there but thats what it shows in the jscript debugger...im assuming that the error is at the beginning cause when i hit the break button it shows that...if i try to hit continue just does the same error again untill i hit break...i dont know what the problem is...any suggestions? but anyways thx for helping me and making the bot and all, i just wish it would run i hope the error is in the code i put that the debugger gave me...cause i could only fit like one third of all of it without it saying i had an error in my bbcode or something when i step over or whatever in the debugger it highlights this part of the code... {t=t.className||t; see it in context below... CODE {return!jQuery.className.has(c,cur)}).join(" "):""},has:function(t,c){t=t.className||t;c=c.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1");return t&&new RegExp("(^|\\s)"+c+"(\\s|$)").test(t)}} Edited October 3, 2007 by blyind
Valuater Posted October 4, 2007 Posted October 4, 2007 (edited) I compiled the script and it worked fine with the latest release ... and with the latest beta also ????? 8) Edited October 4, 2007 by Valuater
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now