mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 08:47:54 +00:00
22 lines
No EOL
731 B
Python
22 lines
No EOL
731 B
Python
from otp.ai.AIBaseGlobal import *
|
|
from DistributedNPCToonBaseAI import *
|
|
from ToonDNA import *
|
|
from DistributedBotAI import *
|
|
import random
|
|
|
|
class DistributedNPCSecretAI(DistributedNPCToonBaseAI):
|
|
|
|
def __init__(self, air, npcId, questCallback=None, hq=0):
|
|
DistributedNPCToonBaseAI.__init__(self, air, npcId, questCallback)
|
|
self.air = air
|
|
|
|
def avatarEnter(self):
|
|
self.sendUpdate('createBot', [random.randrange(6)])
|
|
dna = ToonDNA()
|
|
dna.newToonRandom()
|
|
newToon = DistributedBotAI(self.cr)
|
|
newToon.b_setDNAString(dna.makeNetString())
|
|
x = (random.random()*10) + 10
|
|
y = (random.random()*10) + 10
|
|
z = 4
|
|
newToon.sendUpdate('setPos', [x, y, z]) |