Can I Drag Delphine to see Paarthurnax if Chat is Randomly Spawning Enemies?

Описание к видео Can I Drag Delphine to see Paarthurnax if Chat is Randomly Spawning Enemies?

I'm going to play the classic Elder Scrolls game Skyrim in VR. I have modded the game for better immersion, and I will be dragging Delphine to see Paarthurnax so they can settle their differences, but along the way, the chat will have the ability to spam enemies in my path!

Mod:
https://www.nexusmods.com/skyrimspeci...

Python Script:
```
import pytchat
import random
import pydirectinput
import pyttsx3
import threading

def say_something(message, rate=140):
def say():
engine = pyttsx3.init()
engine.setProperty('rate', rate) # Adjust the rate to slow down the speech
engine.say(message)
engine.runAndWait()
threading.Thread(target=say).start()

Function to press the 'O' key
def press_O():
pydirectinput.press('o')

Helper function to simulate random chance
def randomChance(n=10):
return random.randint(1, n) == 1

Function to check if a message is a spawn enemy trigger
def check_for_spawn_enemy(message):
if message.lower().startswith('spawn enemy'):
if randomChance():
print('spawning enemy cause chat said so')
say_something(message)
press_O()
else:
print('nuh uh, not this time')
Function to read chat messages
def read_chat():
videoId = input("Enter the video ID: ")
chat = pytchat.create(videoId) # Replace with your video ID
while chat.is_alive():
for c in chat.get().sync_items():
check_for_spawn_enemy(c.message)

if _name_ == "__main__":
read_chat()
```

Комментарии

Информация по комментариям в разработке