Hyflex Posted March 25, 2007 Share Posted March 25, 2007 I'm trying to make a script for diablo II I need to know how to read from an ini file and how to get it working... or have a GUI interface... so when i click a box it will add part of the function to the main script... do you see what i mean... and the text they enter in for account and password for it to read from the GUI and press the correct keys... There will be a setting also asking how many seconds they want to take in a game... i want it so if they choose 2 hours.. cant remember how long that is in seconds, for it to do 2 mins of that 2 hours and then do something... and then another 2 mins and do something again, and so on. And i need help with a random string of text + numbers. for game name + password Ive ready though most of the help files, i learnt how to some stuff, but not the main bit. Help would be much appreciated! Link to comment Share on other sites More sharing options...
jvanegmond Posted March 25, 2007 Share Posted March 25, 2007 Let me try to help you out here... First the gui: expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) ;using on event mode works better and faster when you are executing other code.. #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("AForm1", 105, 107, 193, 115) GUISetOnEvent($GUI_EVENT_CLOSE,"Close") $Button1 = GUICtrlCreateButton("AButton1", 5, 5, 75, 25, 0) GUICtrlSetOnEvent(-1,"Part1") ;use this function to call the other function when the button is pressed $Button2 = GUICtrlCreateButton("AButton2", 5, 35, 75, 25, 0) GUICtrlSetOnEvent(-1,"Part2") $Button3 = GUICtrlCreateButton("AButton3", 5, 65, 75, 25, 0) GUICtrlSetOnEvent(-1,"Part3") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Dim $Part1 = False, $Part2 = False, $Part3 = False While 1 ToolTip("Default action is performed") Sleep(500) If $Part1 Then ToolTip("Part 1 is performed") Sleep(500) EndIf If $Part2 Then ToolTip("Part 2 is performed") Sleep(500) EndIf If $Part3 Then ToolTip("Part 3 is performed") Sleep(500) EndIf WEnd Func Close() Exit EndFunc Func Part1() $Part1 = Not $Part1 EndFunc Func Part2() $Part2 = Not $Part2 EndFunc Func Part3() $Part3 = Not $Part3 EndFuncoÝ÷ Ù©ÝêÞßÛ-êÚÚ&²Úâ Z®Ö®¶sd×6t&÷ÂgV÷Cµ&æFöÕ7G&æuFW7BgV÷C²ÂgV÷C³R6&7FW'3¢gV÷C²fײD"fײ&æFöÕ7G&ærRfײ5$Äbfײð¢gV÷C³6&7FW'3¢gV÷C²fײD"fײ&æFöÕ7G&ærfײ5$Äbfײð¢gV÷C³#6&7FW'3¢gV÷C²fײD"fײ&æFöÕ7G&ær# ¤gVæ2&æFöÕ7G&ærb33c·4ÆVævB Æö6Âb33cµ&WGW&à f÷"b33c·ÒFòb33c·4ÆVæv@ b33cµ&WGW&âf׳Ò6"&æFöÒcRÃà æW@ &WGW&âb33cµ&WGW&à¤VæDgVæ github.com/jvanegmond Link to comment Share on other sites More sharing options...
Hyflex Posted March 25, 2007 Author Share Posted March 25, 2007 Hmm just re-thought it though..I want to make it look like:Do you understand wat i mean? its hard to expain here..Load Diablo II.exeSelect Realm (Will have four different functions and want to select just one of them from the GUI where one of the arrows are....)Click in box, and type the text what is in input box one, then click in another box and it will type the text from the second input box.Now Select Character 1, and Create game, Useing random string so it clicks in a box, and then i want the random string, and then clicks in different box and does random string. and presses Enter(return)Now i want it to run one of two scripts(will have two options in the GUI where the other arrow is) (One of these scripts i want to move to a certain place on screen, say something and move back and say something, press w twice and just do this over and over for 2 hours exact!)Once done, i will need it to exit that game.... and do another bits of clicking and thern we are back to creating game, it does it like 6 times i think... Link to comment Share on other sites More sharing options...
Uten Posted March 25, 2007 Share Posted March 25, 2007 Hmm just re-thought it though......Your able to use a debugger to dump source code but not able to do simple scripting tasks like this. I call that rather lazy.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
jvanegmond Posted March 25, 2007 Share Posted March 25, 2007 XxXGod, are you looking for some help with your script, or do you want me to write the entire thing? If so, offer me some money or another service that you might offer and I will consider doing it for you. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Hyflex Posted March 25, 2007 Author Share Posted March 25, 2007 @ Uten - Thats Basically spam, not helpfull at all! @ Manadar - Nope i dont want you to do all, im just trying to get help on the parts im stuck with, athough it depends what you would want for u to do most/all xD Link to comment Share on other sites More sharing options...
jvanegmond Posted March 25, 2007 Share Posted March 25, 2007 @ Manadar- Nope i dont want you to do all, im just trying to get help on the parts im stuck with, athough it depends what you would want for u to do most/all xDSo basically you are stuck starting the script off, then doing some debugging, you are stuck with the mid-section of the script, and the finalisation.. Ahh, sure. Let me look into it, and I will return you working code in a few 15 minutes.50 dollar, and I will consider. github.com/jvanegmond Link to comment Share on other sites More sharing options...
_Kurt Posted March 25, 2007 Share Posted March 25, 2007 I've played diablo and I know exactly what you need. First, start off by running Diablo:Run(@ProgramFilesDir & "\Diablo II\Diablo II.exe")oÝ÷ Ù8^ȧq赩±©hbëhÁíý[¬y§îËb¢{ajÚZºÇ¬¶¬r¸©¶éí[a{§v"±§-÷ºÚ"µÍÚ[ØZ]XÝ]J ][ÝÑXXÈRI][ÝÊoÝ÷ Ø×±·*.ßÙe綶Ø^æ¥(m+ÞÊç(¢·b«^²È§qâ7öiZÏ&î·*.ßÚÞçj¯zÚ.±çîËb¢{%G¢ë2Þ2¬x)brBÊ°j{m¡éíz»azë®v¦{úZ²Ì(Û¬zØ^~éܶ*'jëh×6Send(GUICtrlRead($UserNameInputBox)) Sleep(50) Send("{TAB}") Sleep(50) Send(GUICtrlRead($PasswordInputBox))And now, the rest is basically up to you, you'll need to find coodinates for the mouseclicks. If you're having trouble with a function, please, do us a favor and READ the HELPFILE.Good luck,KurtPS: You might want to search all posts posted in example scripts from the member "Insolence", he's created useful stuff. Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Hyflex Posted March 25, 2007 Author Share Posted March 25, 2007 (edited) Dude im a 16 yearold kid, no job, no national insurance card yet. i dont have 50$ _Kurt Thats the parts what im stick on... How do i set the pw box in gui to that $PasswordInputBox i can do all the coords and realm stuff, but how do i enable a selection box for it to run differnt functions, and the random game name part how do i encoperate tht. EDIT: How do i change it so: Run(@ProgramFilesDir & "\Diablo II\Diablo II.exe") how can i get it so i can choose the directory... but default is that.... Cos i would use d2loader.exe .... and on bros comp he usees Diablo II.exe i keep the files for d2 in shared area on a diff comp to stop battlenet detecting it as easy Edited March 25, 2007 by XxXGoD Link to comment Share on other sites More sharing options...
jvanegmond Posted March 25, 2007 Share Posted March 25, 2007 (edited) I had 500 dollar when I was 13. I did have a job.I guess you better work for your scripts then, if you cannot afford someone else to do it for you. Edit: Not disrespectful. Edited March 25, 2007 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Hyflex Posted March 25, 2007 Author Share Posted March 25, 2007 I had 500 dollar when I was 13. I did have a job.I guess you better work for your scripts then, if you cannot afford someone else to do it for you. Edit: Not disrespectful.PM Me with other ways i can earn...the script, what can i help u with...? ect.. Link to comment Share on other sites More sharing options...
_Kurt Posted March 25, 2007 Share Posted March 25, 2007 I'll give you an example on how to "read" the input control GUICreate("Test", 120, 80) $inputControl = GUICtrlCreateInput("This is an input control", 10, 10) $Msgbutton = GUICtrlCreateButton("What does the input say?", 10, 40) While 1 $msg = GUIGetMsg() Select Case $msg = $Msgbutton Msgbox(0,"",GUICtrlRead($inputControl)) EndSelect WEnd GUICtrlRead() is the function to use to "get" the text inside the input control. And as putting it in the username/password inputs in Diablo 2, use the Send() function, all information necessary is at my previous post. PM me if you get stuck on anything more. Kurt PS: What's the version in Diablo? Still 1.11? I haven't played in quite a bit, but I still have a love for the game. Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
jvanegmond Posted March 25, 2007 Share Posted March 25, 2007 XxXGod, it could save you a lot of trouble if you would check if something like this resembles what you are trying to do: http://www.autoitscript.com/forum/index.ph...hlite=%2BDiablo. For example, it would be great if you found something that can log some character in.. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Hyflex Posted March 25, 2007 Author Share Posted March 25, 2007 @ _Kurt Thanks you have really helped me so has Manader i just made 3 ausome bots, for three diff games xD@ Manadar, You are just GoDly!!! Cant believe i didnt look in search http://www.autoitscript.com/forum/index.ph...0&hl=Diablo Helped me, now all im trying to do is when it enters chat i want it to then join a game and wait for 2 hours and carry on, the random string...Or i want to be able to delte the chat time and instead join a game, for 2 hours...Please help with this Link to comment Share on other sites More sharing options...
Hyflex Posted March 26, 2007 Author Share Posted March 26, 2007 anyone know how i can incoperate it into that program? Would i add the code Manader gave me just above where i start.... And then what would the Send("") be? So it does the click at the coords then.... Link to comment Share on other sites More sharing options...
Hyflex Posted March 26, 2007 Author Share Posted March 26, 2007 Help plz, i tryed doing myself a few times it just ruins the script Link to comment Share on other sites More sharing options...
Hyflex Posted March 26, 2007 Author Share Posted March 26, 2007 Up, it went back 3 pages rofdl Link to comment Share on other sites More sharing options...
Hyflex Posted March 27, 2007 Author Share Posted March 27, 2007 up Link to comment Share on other sites More sharing options...
Hyflex Posted March 27, 2007 Author Share Posted March 27, 2007 please help xD Link to comment Share on other sites More sharing options...
Hyflex Posted March 27, 2007 Author Share Posted March 27, 2007 up Link to comment Share on other sites More sharing options...
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