Fix minor starting bugs

This commit is contained in:
Howard Abrams 2026-02-16 14:52:32 -08:00
parent 2a0c6e5e10
commit cbfb79256c
2 changed files with 10 additions and 0 deletions

View file

@ -429,6 +429,13 @@ class ResetBoat(Script):
"""
Script to pull the boat back out to sea and dock it at an island.
"""
def at_script_creation(self):
self.key = "boat-reset"
self.desc = "Sailing the Boat"
self.interval = 60 * 60 # reset every hour
self.start_delay = True # wait self.interval until first call
self.persistent = True
def at_repeat(self, **kwargs):
script_results = search.scripts("sailing")
if script_results:

View file

@ -1,5 +1,7 @@
#!/usr/bin/env python
from evennia.utils import logger
import requests
def location(character):
@ -14,6 +16,7 @@ def location(character):
response = requests.get(f'https://ipapi.co/{address}/json/',
timeout=1).json()
logger.info(f"User location: {response}")
city = response.get("city") or "Unknown City"
region = response.get("region") or "Unknown Region"
country = response.get("country_name") or "Unknown Country"