Beginner Python Tutorial 74 - Nested if

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
Рекомендации по теме
Комментарии
Автор

i love how you target every possible problem we can run into... you're a guy who gets it! GOAT

TheEighthAct
Автор

I can't believe that its so simple

ninjapirate
Автор

Hi can you explain why Welcome Caleb prints regardless if logging is True or False please explain and why it is in the first if but not in the nested if

chillny
Автор

Hello, Im hoping you can help me here as I cant figure this out. I am building a game bot as a means of learning Python. I have a "while loop" where I need a single left mouse click to occur to target an enemy and then I need it to move on to the next IF statement. I have tried to code it outside the while loop and within it own while loop but the way I have it coded now, the left mouse click just plays once and wont replay on the loop, even if the IF statement is true.

When I set the code outside the loop, it will run once for the first time the program is used, but wont run again unless I terminate the program and restart. I need a single left mouse click to occurr and then move on to the next part of the code. Are you able to help me with that as everything I have tried, doesn't work? The code is below

#Used to stop the program
while keyboard.is_pressed('g') == False:

#TARGET ENEMY
if pyautogui.pixel (1096, 127) [0] == 16:
click(1096, 127)
time.sleep(0.5)
break

while keyboard.is_pressed('g') == False:

#DEBUFF
if pyautogui.pixel (1127, 1268) [0] == 247:
time.sleep(0.5)
debuff("4")
time.sleep(3)

#ATTACK1
if pyautogui.pixel (1517, 1269) [0] == 247:
attack1("8")
time.sleep(3)

johnd