Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How to use DropDownList?



  • Please log in to reply
2 replies to this topic
SnowFlake_FlowSnake
  • Members
  • 845 posts
  • Last active: Jan 24 2016 05:24 PM
  • Joined: 08 Oct 2012

Hello

 

so i want to use DropDownList to make a variable like this,

 

IF (Walk_Speed=Normal)
{
MsgBox, Walking speed cant be blank!
}

 

so if DropDownList is Equal to Normal the show a msgbox, but my msgbox never shows up and i dont know what the problem is

 

my script:

/* 
	Script name: Papa Digger Alpha 2
	Made by: FloowSnaake
	Autohotkey version: 1.1.22.07
	Tested on: Windows 7 64 Bit Ultimate
	Date: 5/10/2015 6:44:07p.m 


	This is what you NEED to do for the bot to work!
((
	
	How to use/run Script:
	1) Download Autohotkey (http://ahkscript.org/download/ahk-install.exe).
	2) Install Autohotkey 64 or 32 Bits.
	3) Copy the Code.
	4) Paste it in to notepad or any other text editor you use-
	5) Save it as sand "Papa Digger Alpha 2.ahk".
	6) Double click at "Papa Digger Alpha 2.ahk".
	7) Now its running, you should see a small icon with a "H" on it in the corner of the Taskbar/Startbar.
	8) Now when its running you should see a GUI/ a window on the screen.
	9) You have to have be in Reval and standing at (9, 34).
	10) Select what option you want to run/bot. 
	
	You need the Steam version Or Client version/Downlad
	Mods or Keybindingsthat HAVE to be on/right before starting the bot

    Mods that need to be ON:
	Enhanced Market
	Keybinding Extensions
	Pet Inventory
	Chest Inventory
	Miscellaneous Improvments

    Keybindings:
    E = Deposit All+ in chest
    X = Unload pet inventory
    Q =Toggle inventory
    Z = Withdraw 1 or ALL

 
	Game Options ---> Video:
	All mods = On
	Smoother Layout = Off
	Game size = (1x)
	Game Grind = (13x13)
	
))
	
	
	Papa Digger Alpha 2 Hotkeys:
	F1 or Escape = Exit script.
	CTRL/Left Control + 1 = Restart script.
	§ = Start bot.
	
*/


#SingleInstance force
SetWorkingDir, %A_ScriptDir%

IfExist,Papa Digger Alpha 2.ini
{
FileReadLine,Read_Acc1,Papa Digger Alpha 2.ini,2
FileReadLine,Read_Acc2,Papa Digger Alpha 2.ini,3
FileReadLine,Read_GamePath,Papa Digger Alpha 2.ini,4
}

IfNOTExist,Papa Digger Alpha 2.ini
{
	
IF NOT A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"
   ExitApp
}

Process,Close,RPG MO.exe
Process,Close,nw.exe
FileRemoveDir, "C:\Users\%A_UserName%\AppData\Local\rpgmo", 1 
FileRemoveDir, C:\Users\%A_UserName%\AppData\Local\rpgmo, 1 
FileRemoveDir, "C:\Users\A_UserName\AppData\Local\rpgmo", 1 
FileRemoveDir, C:\Users\A_UserName\AppData\Local\rpgmo, 1 

Gui, Start: +AlwaysOnTop 
Gui, Start: Add, Text, w110 h20,Account 1:
Gui, Start: Add, Edit, w100 h20 vAcc1,

Gui, Start: Add, Text, w110 h20,Account 2:
Gui, Start: Add, Edit,Disabled w100 h20 vAcc2,DISABLED

Gui, Start: Add, Text, w110 h20 ym,RPG MO Path
Gui, Start: Add, Edit, w100 h20 vGame_Path,
Gui, Start: Add, Button,gBrowse,Browse
Gui, Start: Add, Button,gsave, Save

Gui, Start: Show,, Add Accounts
return

save:
Gui, Start: Submit
FileAppend,Accounts:`n%Acc1%`n%Acc2%`n%Game%,Papa Digger Alpha 2.ini
Reload
return

Browse:
FileSelectFile, Game, 3, , Select RPG MO exe, RPG MO Client (*.exe)
if Game =
    MsgBox,You user didn't select the game!
else
GuiControl,,Game_Path,%Game%
return
}

DetectHiddenText, On
OnExit, Quit
CoordMode, Mouse, Relative
CoordMode, Pixel, Relative

Global Blank
Global price
Global Funcy_Price
Global Checkt
Global Petbox
Global Debug_Mod
Global Alarm
Global Drop_Crystal
Global SandC
Global SandS
Global total
Global loops
Global XP

Global Account1
Global Account2

Global Game_Path_Dir

Account1 = %Read_Acc1%
Account2 = %Read_Acc2%
Game_Path_Dir = %Read_GamePath%

Blank =
IF ProcessExist("RPG MO.exe")
RPG_MO_Setup("RPG MO.exe")

IF ProcessExist("nw.exe")
RPG_MO_Setup("nw.exe")


Menu, Tray, Icon, spade.ico, 1

Gui, Add, Picture, x-4 y-3, logo.png
Gui, Add, Picture, x760 y16,diglet.png

Gui, Add, Checkbox, x6 y126 w90 h20 vDebug_Mod, Debug Mode
Gui, Add, Checkbox, x105 y126 w70 h20 vPetbox, Have Pet
Gui, Add, Checkbox, x315 y126 w130 h20 vDrop_Crystal, Destroy uncut crystals
Gui, Add, Checkbox, x195 y126 w110 h20 vAlarm, Alarm on Capatcha

Gui, Add, Text, x450 y129 w110 h20,Sand Sell Price:
Gui, Add, Edit, x530 y126 w90 w30 h20 vprice, 149

Gui, Add, Text, x600 y110,Walking Speed:
Gui, Add,DropDownList, vWalk_Speed,Fast|Normal|Slow

Gui, Add, ListView,grid  x6 y160 w950 H55 R3 ,Account|Runs|Status|Sand Dug|Profit|XP Gained|Crystals Destroyed|Vials Made|Water Vials Made


LV_ModifyCol(1, 100) , LV_ModifyCol(2, 0) , LV_ModifyCol(2, 40) , LV_ModifyCol(3, 255) , LV_ModifyCol(4, 85) , LV_ModifyCol(5, 70) , LV_ModifyCol(6,70) , LV_ModifyCol(7,100) , LV_ModifyCol(8,70) , LV_ModifyCol(9,100) , LV_Add(1,"","","","","","","","","") , LV_Add(2,"","","","","","","","","") , LV_Modify(1,,Account1,0,"Bot Not Started",0,0,0,0,0,0)  , LV_Modify(2,,Account2,"-","DISABLED","-","-","-","-","-","-")

Gui, Add,Button, x6 y230 w90 gStart_Bot, Start Bot
Gui, Add,Button, x120 y230 w90 gStartRPG, Start RPG MO
Gui, Show,x0 y0 h260,Papa Digger Alpha 2
return

GuiClose:
ExitApp

StartRPG:
Run, %Game_Path_Dir%
return

§::
Start_Bot:
Gui, Submit ,NoHide

WinActivate,ahk_exe nw.exe
WinActivate,ahk_exe RPG MO.exe

LV_Modify(1,,,,"Bot Started")

IF (Walk_Speed=Normal)
{
MsgBox, Walking speed cant be blank!
}

GuiControl, Disable, price
GuiControl, Disable, PetBox
GuiControl, Disable, Alarm
GuiControl, Disable, Drop_Crystal
GuiControl, Disable, Debug_Mod


	Loop
	{
		
        IF (Alarm = 1)
		{
		PixelGetcolor, Capatcha, 284,167
        IfEqual, Capatcha, 0x333333, {
			SoundBeep,,2000
			WinActivate,RPG MO - Early Access
            WinActivate,RPG MO - Web Browser Game
			MsgBox, 20528, CAPATCHA WARNING!, CAPATCHA WARNING!
	    }
	    }

         PixelGetcolor, Player_Full_Sand, 834,237
         IfNOTEqual, Player_Full_Sand, 0xA5D2E1, LV_Modify(1,,,,"Inventory is Empty")
		IfEqual, Player_Full_Sand, 0xA5D2E1, {
		LV_Modify(1,,,,Account1 "Inventory is Full")

			IF (Petbox = 1)
			{
				PixelGetcolor, Empty_Pet_Inv, 830,346
                IfNOTEqual, Empty_Pet_Inv, 0x3F4243, {
                LV_Modify(1,,,,"Pet Inventory is Full")
				Sleep, 300
				Digg_And_Stash()
                 }
				 
				 LV_Modify(1,,,,"Pet Inventory is Empty")
			       Click 795,375
			       Sleep 300
				   	Send, {Left 2} 
					LV_Modify(1,,,,"Pet Inventory is Full")
					
					
				   Loop
				{
					LV_Modify(1,,,,"Waiting on Inventory to be Full")
					Sleep, 4000
				     PixelGetcolor, Player_Full_Sand, 834,237
	            	IfEqual, Player_Full_Sand, 0xA5D2E1, {
		         	LV_Modify(1,,,,Account1 "Inventory is Full")
		         	Sleep, 300
					break
				}
			
				}
			}
				Digg_And_Stash()
				break
			}
		}
return

    Digg_And_Stash(){
	Going2stash()
	Stash_All()
	Sell_sand(price)
	Going2sand()
	
	loops += 1
	
	IF (Petbox = 1)
	{
	SandC += 55
	XP += 550
    }
	
	IF (Petbox =0)
	{
	SandC += 39
	XP += 390
    }
	
	LV_Modify(1,,,loops)
	LV_Modify(1,,,,,SandC)
	LV_Modify(1,,,,,,SandC*price "$") 
	LV_Modify(1,,,,,,,XP "/" XP*2)


GuiControl, Enable, price
GuiControl, Enable, PetBox
GuiControl, Enable, Alarm
GuiControl, Enable, Drop_Crystal
GuiControl, Enable, Debug_Mod
}
return

Sell_sand(Funcy_Price){
	LV_Modify(1,,,,"Selling sand in the market for: " Funcy_Price )	
	Sleep_With_Click_Around(456,128,5)
	Sleep_With_Click_Around(528,124,5)
	Sleep_With_Click_Around(372,194,5)
	Send {S}
	Sleep 700
	Send {Enter}
	Sleep 700
	Sleep_With_Click_Around(396,250,5)
	Click 2
	send %Funcy_Price%
	Sleep 700
	Sleep_With_Click_Around(481,278,5)
	Sleep_With_Click_Around(372,333,5)
	LV_Modify(1,,,,"sand sold in the market for: " Funcy_Price )	
	Sleep 700
}
return

Going2sand(){
	LV_Modify(1,,,,"Going to sand")	
	Sleep, 300
	K("Down","7")
	K("Right","1")
	K("Down","8")
	K("Left","7")
	K("Up","17")
	K("Left","1")
	LV_Modify(1,,,,"Digging")
	Sleep, 300
}
return

Going2stash(){
	LV_Modify(1,,,,"Going to Stash")
	Sleep, 300
	K("Down","17")
	K("Right","7")
	K("Up","8")
	K("Left","1")
	K("Up","7")
	K("Left","2")
	Sleep, 300
}
return

Stash_All(){
	LV_Modify(1,,,,"Stashing Inventory")
	Sleep, 500
	send, {E Down}
	Sleep, 300
	send, {E Up}
	Sleep, 1000
	
	IF (Petbox = 1)
	{
		LV_Modify(1,,,,"Stashing Pets Inventory")	
		Click 831,374
		Sleep 500
		Click 831,374

		Sleep, 1000
		send, {E Down}
		Sleep, 300
		send, {E Up}
		Sleep, 2000
	}
	LV_Modify(1,,,, "Inventory Stashed")
}
return

Anounces(message){
	send, {Enter}
	Sleep, 200
	send, {Up 3}
	Sleep, 200
	sendinput,%message%
	Sleep, 200
	send, {Enter}
}
return

Sleep_With_Click_Around(xcoord, ycoord,offset)
{
	
	Random, diex, -%offset%, %offset%
	Random, diey, -%offset%, %offset%
	xcoord += %diex%
	ycoord += %diey%
	Click, Left, %xcoord%, %ycoord%
	Random,ran2,500,1000
	Sleep, %ran2%
	
IF (Debug_Mod = 1)
{
	ToolTip,  Mouse Debugger:  Round Area %offset% X%xcoord% / %diex% Y%diey% / %ycoord%,0,0
}	

}
return

C(clc,x,y){
	Loop, %clc%
	{
		Click %x%, %y%	
		Click Down Left
		Sleep, 300	
		Click up Left
	}	
}
return

K(key,times){
	Loop, %times%
	{
		Random,Sleepy,230,240	
		
		IF (Debug_Mod = 1)
		{
		ToolTip,Walking: %key% Steps: %A_index% /  %times% /  %total%,0,0
		}	

		Send,{%key% Down}
		Sleep, %Sleepy%
		Send,{%key% Up}
		
        IF (Walk_Speed = Fast)
		{
		Sleep, 50
    	}
		
		IF (Walk_Speed = Normal)
		{
		Sleep, 200
    	}
		
        IF (Walk_Speed = Slow)
		{
		Sleep, 400
    	}
		total++
	}
	Sleep, 100
}
return


RPG_MO_Setup(Game_version){

IfWinExist, ahk_exe %Game_version%
{
	WinActivate,ahk_exe %Game_version%
	WinGetPos,,, Width, Height, ahk_exe %Game_version%
	WinMove, ahk_exe %Game_version%,,,0,0
	WinMove, ahk_exe %Game_version%,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2),854,480
	WinActivate,ahk_exe %Game_version%
	
	WinActivate,ahk_exe %Game_version%
	WinGetPos,,, Width, Height, ahk_exe %Game_version%
	WinMove, ahk_exe %Game_version%,,,0,0
	WinMove, ahk_exe %Game_version%,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2),854,480
	WinActivate,ahk_exe %Game_version%
}

}
return

ProcessExist(Name){
	Process,Exist,%Name%
	return Errorlevel
}
return

Esc::
F1::
ExitApp
return

Quit:
send, {Up Up}
send, {Down Up}
send, {Right Up}
send, {Left Up}
ExitApp
return

  • Download link of my scripts on Autohotkey.com 2/10/2015 [DOWNLAND]
  • Contact Info:  https://github.com/floowsnaake //  FloowSnaake(A)gmail.com
  • IF you need Help send me a PM,Email or Post on Github

  • Quote by tank  Posted 29 September 2015 - 06:14 PM

  • "Eventually i will find a way to convert the DB back to PHPBB3. but i dont have the bandwidth right now. No one that has tried has had success. It is the Only way i can keep this open is if i could successfully convert it."

gilliduck
  • Members
  • 109 posts
  • Last active: Nov 09 2015 01:07 AM
  • Joined: 19 Dec 2013
✓  Best Answer

Looks like you forgot to enclose the right side of the ='s in "s. Right now you're checking If Variable Walk_Speed is equal to Variable Normal, not If Variable Walk_Speed is equal to String Normal.

 

So just do If (Walk_Speed = "Normal") and you should be all set!



SnowFlake_FlowSnake
  • Members
  • 845 posts
  • Last active: Jan 24 2016 05:24 PM
  • Joined: 08 Oct 2012

OMG it works, it was driving me crazy xD

 

thanks so much @gilliduck


  • Download link of my scripts on Autohotkey.com 2/10/2015 [DOWNLAND]
  • Contact Info:  https://github.com/floowsnaake //  FloowSnaake(A)gmail.com
  • IF you need Help send me a PM,Email or Post on Github

  • Quote by tank  Posted 29 September 2015 - 06:14 PM

  • "Eventually i will find a way to convert the DB back to PHPBB3. but i dont have the bandwidth right now. No one that has tried has had success. It is the Only way i can keep this open is if i could successfully convert it."