Put QuestScripts and SequenceList into the code

This commit is contained in:
DenialMC 2015-04-02 17:02:01 +03:00
parent 1ad8c9aec2
commit acfdd18629
6 changed files with 722 additions and 87 deletions

7
.gitignore vendored
View file

@ -1,13 +1,6 @@
# Python artifacts: # Python artifacts:
*.pyc *.pyc
# Windows
cmd.exe
# Eclipse IDE:
.project
.pydevproject
# PyCharm # PyCharm
.idea .idea

View file

@ -2,8 +2,8 @@ from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
# TODO: OTP should not depend on Toontown... Hrrm. # TODO: OTP should not depend on Toontown... Hrrm.
from toontown.chat.TTWhiteList import TTWhiteList from toontown.chat.TTWhiteList import TTWhiteList
from toontown.chat.TTSequenceList import TTSequenceList
from otp.distributed import OtpDoGlobals from otp.distributed import OtpDoGlobals
import SequenceList
class ChatAgentUD(DistributedObjectGlobalUD): class ChatAgentUD(DistributedObjectGlobalUD):
notify = DirectNotifyGlobal.directNotify.newCategory("ChatAgentUD") notify = DirectNotifyGlobal.directNotify.newCategory("ChatAgentUD")
@ -15,7 +15,7 @@ class ChatAgentUD(DistributedObjectGlobalUD):
if self.wantWhitelist: if self.wantWhitelist:
self.whiteList = TTWhiteList() self.whiteList = TTWhiteList()
if self.wantBlacklistSequence: if self.wantBlacklistSequence:
self.sequenceList = TTSequenceList() self.sequenceList = SequenceList.SequenceList()
self.chatMode2channel = { self.chatMode2channel = {
1 : OtpDoGlobals.OTP_MOD_CHANNEL, 1 : OtpDoGlobals.OTP_MOD_CHANNEL,
2 : OtpDoGlobals.OTP_ADMIN_CHANNEL, 2 : OtpDoGlobals.OTP_ADMIN_CHANNEL,

View file

@ -1,8 +1,8 @@
class SequenceList: class SequenceList:
def __init__(self, wordlist): def __init__(self):
self.list = {} self.list = {}
for line in wordlist: for line in sequences.split('\n'):
if line is '': if line is '':
continue continue
split = line.split(':') split = line.split(':')
@ -12,4 +12,339 @@ class SequenceList:
if word in self.list: if word in self.list:
return self.list[word] return self.list[word]
else: else:
return [] return []
sequences = '''
$:exe,kk zzz,k zzz,ex,hit,hits,hole,whole,ole,ooo le,holes
'n:i gg,i grow,i gross,i grr,i grrr,i gah
's:exe,kk zzz,k zzz,ex,hit,hits,u kk,uk
.:,Y .
42:0
4:20,2 0,twenty,chan,twin tea,twin ty
69:ed,ing
8:=,-
<:=,-
=:8,=,-
a,ah,ahh,ahhh,ahhhhh,ahhhhhh:zzz,sees,$,'s
ace,as,ash,ask,asp,ashton:hole,whole,ole,ooo le,holes,zzz,'s
ack:ools
ai,ay,ayy,ayyy,ayyyy:ds
al:coco ol,cool
an:a hon,a honda,a con,a cone,ail,ails,ailed,ailing,al,ale,ales,all,awl,us,u.s.,u.s.a.,u si,usa,use,used,using,uses,uss
ann:a hon,a honda,a con,a cone,al,ails,ailed,ailing,ale,ales,all,awl,us,u.s.,u.s.a.,u si,usa,use,used,using,uses,uss
anna:hon,honda,con da,con duh,cone da,cone duh
anne:a hon,a honda,a con,a cone,al,us,u.s.,u.s.a.,u si,usa,use,used,using,uses,uss
ape's:me,you,him,his,their,him,them,your,yourself,ur self
ape:me,you,him,his,their,him,them,your,yourself,ur self
apes:me,you,him,his,their,him,them,your,yourself,ur self
ate:me out,you out,u out,her out
ball:it more
ban:gg
bass:hole,whole,ole,stir,stir ed,stair,stair ed,tar,star,stared,tt a r ed,holes
bat:star,stair,stair ed,star,stared
bay:be maker
be,bee,bo,boo:ach,i tea see ache,i tee see ache,i tea sea ache,i tee sea ache,eye tea see ache,eye tee see ache,eye tea sea ache,eye tee sea ache,itches,itch,jay,jays,job,jobs,etch,cheese,itching,each,shh,shhh,shhhh,shhhhhh,it cha,cha,ache
beast:tea al i tea,tea al i ty,tea al i tie
ben:dover,dove err,doves err
bend:over
bet:ouch
big:deck,decks,dock,docks,clock,clocks,cook,cooks
bit,bite:cha,chi,chez,chin,chine,china,chose,chow,chess,itch,itches,ach,cheese,cheddar,shh,shhh,shhhh,shhhhhh
bla:zz it,zzz it,k tar,kk tar
black:tar,k tar,kk tar
blew:job,jobs
bloat:job,jobs
bloo:job,jobs
blowfish:job,jobs
blowy:job,jobs
blue:waffle,job,jobs
bob:zzz,zz
bon:r,or,err,errs,me,him,it,ro,her
bone:r,or,err,errs,me,him,it,ro,her
boo:be,bee,bees,by,ty,bye,byes,tay,tea
boot:bee,bees,ty,y
bos:ton
bow:job,jobs
brass:hole,whole,ole,ooo le,holes
bull:sheep,sheeps,ship,shift
bulls:hit,sheep,sheeps,ship,shift
burn:in hello
but:hole,whole,plug,plugs,sec,toll,head,face
by:itch,itches
cam:bucket,buckets,dumpster,girl,girls,on me,tastes
came:bucket,buckets,dumpster,on me,tastes,in you,in u
cee:man,men,min,mins,moon,ex,a tt le,xii,exe,kk zzz
chic:a go,ago
chin:kk
class:hole,whole,ole
climb:max,maxed,maxes,maxing
climbed:max,maxed,maxes,maxing
climbs:max,maxed,maxes,maxing
clue:luxe,lucks
coca:in,ing
cog:awk
come:bucket,buckets,dumpster,on me,tastes
comes:bucket,buckets,dumpster,on me,tastes
con:dim,dims,dome,domes,dooms,doom,do hm,do hmm,do hmmm,do mm
concentration:camp
coop:kk
cop:kk
corn:oh graphic,ooo,hoo
cunning:link us,link is
curry:man cher,men cher,min cher,moon cher
da:am,mm,yum
dab:itch,itches
dah:am,yum
dat:as,ask,asp,asset,ashton
day:um,yum
dee:bag,kay,k
di:i do,ill do,ill does,kk,ill dot,i'll do,i'll dot,i'll does,ik,i
dill:doe,do,dot,does
ding:us,usa,uss,u.s.a.
dip:stick
dirt:y,ye,eh
docs:me,you,him,his,their,him,them,your
dot:come
dr:ugh,un kk
duck,luck,buck:err,error,errors,my life,everyone,me,ing,yourself,your self,ur self
ducked:your,ur,his,her,you
due:shh,shhh,shhhh,shhhhhh
dug:rugs
dumbo:as,ash,ask,asp
eat:me out,you out,u out,her out
eating:me out,you out,u out,her out
eats:me out,you out,u out,her out
eh:bo la,bowl a,rekt ion,rekt ions,wrekt ion,wrekt ions
el:mayo
ex:tube,tubes,at,cream mint
f.a.q.:ed,err,error,errors,ear,ears,you,ate,eat,gate,goat,got,ing,this,my life,everyone,me,off,king
face:book
fad:gg ate,gg eat,gate,get,it,goat,git
fads:gg ate,gg eat,eat,gate,get,it,goat,git
fake:king,k ing,k eng,kk ing,kk eng,off
family,dad,sister,brother,mom:dead,deads
far:kk,king,k ing,k eng,kk ing,kk eng
fat:as,asset,tas
faye:get,git,got
few:ack or,hack or,kk,king,ok,k ing,k eng,kk ing,kk eng
fill:my kitty,your kitty,her kitty,his kitty,their kitty,ur kitty
finger,fingers,fin gg err:you,me,her,him,them,us,your,ur,yourself,u
flack:you,king,ing,this,my life,everyone,me,off
flick:you,king,ing,this,my life,everyone,me,off
flock:ed,err,error,errors,ear,ears,you,ate,eat,gate,goat,got,ing,this,my life,everyone,me,off,king,u,you,yourself,ur
flowerpot:head,headed,heading,heads
flowerpots:head,headed,heading,heads
flunk:ing,king,eng,in gg,her,u,you,ur,yourself
foe:kk,king,ok,k ing,k eng,kk ing,kk eng
fog:ate,eat,gate,get,it,goat,got
folk:ed,err,error,errors,ear,ears,you,gate,goat,ing,this,my life,everyone,me,off,king
folks:ed,err,error,errors,ear,ears,you,gate,goat,ing,this,my life,everyone,me,off
for:kk,king,k ing,k eng,kk ing,kk eng,twenty,twin ty,20,twin tea
fork:err,error,errors,ear,ears,you,this,my life,everyone,me,off,king,ing,her,eng,in,u,ur,hair,air
four:chan,twenty,20,2 0,twin ty,twin tea
freaky:in,ing
free:kin,k in,k ing,k eng
fuchsia:err,error,errors,ear,ears,you,this,my life,everyone,me,off
fun:king,k ing,k eng,kk ing,kk eng,luck
gah:ay,yay
gee:mail,ay,yay
gen:it,i tall,i tail,i tails
get:wasted,waste ed,bent,hi,high,higher,highest,lay
gets:wasted,waste ed,hi,high,higher,highest,lay
getting:wasted,waste ed,hi,high,higher,highest,lay
gg:ay,a y,ah y,ayy,aye
girl,girls:1 cup,one cup,on cup,won cup,and a cup,plus a cup
give:me head,me pleasure,a truck
glass,glory:hole,whole,ole,ooo le,holes
go:to hello
got:wasted,waste ed,hi,high,higher,highest,ooo hello
grape:me,you,him,his,their,him,them,your,ed,yourself,ur self
grapes:me,you,him,his,their,him,them,your,ed,yourself,ur self
grass:hole,whole,ole,ooo le,holes
half:baked
hand:job,jobs
hang:your,yourself,ur self,myself,my self,me,you
hate:black people,back people,white people
have:sec,see ex
haved:sec,see ex
having:sec,see ex
he:ill,ii,ell,el
her:as,asp,bowls,bowl's,bows,bock,butted,but,come,pew,period,ah,dee,ash
hill:yourself,your self,ur self,u err self,u r self
his:as,asp,bowls,bowl's,bows,bock,butted,but,come,pew,period,ah,dee,ash
hit's:learn
hit:learn
hits:learn
hm:arr y juan,arr y jane,arr y jan,arr y jam
hmm:arr y juan,arr y jane,arr y jan,arr y jam
hmmm:arr y juan,arr y jane,arr y jan,arr y jam
horn:y,horn eh,knee,ie,i
honk:y,eye
hot:mail,come
hue:jazz
huge:as,mass,ashton,ask,asp,jazz,ash
huger:as,mass,ashton,ask,asp,jazz,ash
i'm:moist,wet,hard
i:es,es bean,es beans,es be an,es be ann,es be anne,es be i an,es be i ann,es be i anne,:c k,=c k,;c k,gg a,gg ah,gg ahh,gg ahhh,gg ahhhhh,gg ha
ice:hole,whole,ole,ooo le
id:i
if:uk
im:moist,wet,hard
in:he'll,the assistant,your mom,your mother,your assistant,ur assistant,ur mom,ur mother,the as,your as,ur as
inst:a gram,ah gram,ahh gram,ahhh gram,ahhhhh gram,ahhhhhh gram
instant:graham,grand
inter:course
jack's:ed,ing,me,myself,her,herself,him,himself,of,off,ourselves,they,themselves,us,you,yourself,u late
jack:ed,ing,me,myself,her,herself,him,himself,off,ourselves,they,themselves,us,you,yourself,u late
jacks:ed,ing,me,myself,her,herself,him,himself,of,off,ourselves,they,themselves,us,you,yourself,u late
jazz:hole,ole,on
kay:kay kay
kin:kk y
kind:kk y
king:kk y
kk:awk,bock,err,ill,ills,kk
knee:gg,grow,gross,grr,grrr,gah,gas,gauss
kneed:gg,grow,gross,grr,grrr,gah,gas,gauss
knit:gah
kun:tt
kyle's:yourself,your self,ur self,u err self,u r self
kyle:yourself,your self,ur self,u err self,u r self
kyles:yourself,your self,ur self,u err self,u r self
lap:dance
last:name
less:be i an,be i ann,be i anne,be an,be ann,be anne,bean,beans
little:sit,hitch,itch
lucks:clan
luxe:clan
ma:stir bait
making,make,makes,made:him hard,love
marry:juan a,juan ha,juan ah,jane,jan,jam
mary:juan a,juan ha,juan ah,jane,jan,jam
mass:hole,whole,ole,ooo le,stir bait
mast:are bait,are baits,are baiter,are bait eng,are bait ed,stir bait
master:bait,baits,baiter,bait eng,bait ed
mastered:bait,baits,baiter,bait eng,bait ed
mastering:bait,baits,baiter,bait eng,bait ed
masters:bait,baits,baiter,bait eng,bait ed
mayor:a juan,ah juan
men:str u ate
mexican:brown
mike:hawk,hawks,hunt,hunts
mm:arr y juan,arr y jane,arr y jan,arr y jam
mo,moe,moo:foe,foes,for,four
moon:shine
mother:flick,flicker,fork,fuchsia,duck,ducking,folk,folks,yuck,flock,heck,truck,funky,flunky,fax,quacker,bucker,bicker,faker,fake,flunk,flunking,tru
my,mah:as,asp,bowls,bowl's,bows,bock,butted,but,come,pew,period,ah,dee,ash,di ik,deck,decks,dock,docks,cook,cooks
nada:zen,zeke,z.z.
nag:zen,zeke,z.z.,grr,grrr,a,ah
nah:zen,zeke,z.z.,gg a,gg ah
nay:kit,grow,growl,gah,gg a,gg ah
neigh,nigh,nik:err,grr,grrr,grrrrrrrl,grow,grove,gurl,girl,gear,gears,gross,ah,a,gah
new:york,fork,folk,forks,folks
not:zen,zeke,z.z.
octopus:y,ye,sea,seas
octopuses:y,ye,sea,seas
of:u kk,uk
oh:rn y
old:are you,r you,are u,r u
omg:egg al
on:your knees,your knee
open:legs,leg
or:gah some,gah sum,gg y,gee
other:flick,flicker,fork,fuchsia,duck,folk,folks,yuck,flock,heck,truck,funky,flunky,fax,quacker,bucker,bicker
pah:key,keys
pant:tease,teas,ties
passed:off
pause:i,eek,eh
pea:nest,mess,pea,pi,pie,do file,knees,nice,niece
peck:err
peep:show
pen:ice,iced,ices,icing,island,eh tray,eh tate,15,is,1s,i zzz,his,1 5
pens:ice,iced,ices,icing,island,eh tray,eh tate,15,is,1s,i zzz,his,1 5
period:cramps
pet:oh pile,oh piles,oh file,oh files
pew:cee,say,says,sea,seas,see,sees,she,shes,she's,si
phony:number,numb err
pi:pi,ssw
piece,peace:of shift,of ship,of shut,of shirt
play:boy
pooh:cee,say,says,sea,seas,see,sees,she,shes,she's,si
pose:eh
pound:ed,ing,me,myself,her,herself,him,himself,of,off,ourselves,they,themselves,us,you,yourself
pounds:ed,ing,me,myself,her,herself,him,himself,of,off,ourselves,they,themselves,us,you,yourself
pour:on,no
pro:st i tut,stick tut
purr:cee,say,says,sea,seas,see,sees,she,shes,she's,si
push:y,ye,cee,say,says,sea,seas,see,sees,she,shes,she's,si
put:cee,say,says,sea,seas,see,sees,she,shes,she's,si
queue:ear
rake:you
rap:me,you,her,his,their,him,them,your,ed,35,yourself,ur self,eh me,ping
ray:ping,pi
re:tar ed,tart,tarts,tar tt ed,tar teed,tar dead,tar deed,tar dee ed,tar dad
read:tube,tubes
red:tube,tubes
reed:tube,tubes
rekt:um,hum,u hmm,huh,u hm,u hmmm
roll:grass,in the hay,in the hey
rub:one off,one of,1 off,1 of,on off,on of
san:francisco
sass:hole,whole,ole
sassy:hole,whole,ole
saw:kk
sc:hum,um,u hmm,huh,u hm,u hmmm
sea,see,sec::man,men,min,mins,moon,ex,a tt le,xii,exe,kk zzz
seem:en,an,man,men,min,ex,a tt le
sell,selling,sold:cracked,cracked-uptick,crackin',cracking,crackle,crackle's,crackles,crackly,herbs
sew:kk
she:it,hitting,its,ex i,mail,mails,mailed,mailing,male,males,tt,i,ii
shh,shhh,shhhh,shhhhhh,shy:it,eat,hit,hits,its,ex i,he mail,he mails,he mailed,he mailing,he male,he males,ii tt,i it,i tt
shut:the duck,the luck
si:u tt,exe,kk zzz,k zzz,ex
ski:it,ii tt
skill:your,yourself,ur self,myself,my self,me,you
sky:pea,peas,peel,pen,pet,pi,pie,peta,pico,pens,pop,hype,ape,pets,peep,per,pell,pa
snap,nap:chat
so:exe,kk zzz,k zzz,ex,kk
sock,socks,shucks:it,on it,my deck,my dock,my doc,ur deck,ur dock,your deck,your dock,his deck,his dock,cooks,cook,my cook,ur cook,your cook,his cook,my cooks,ur cooks,your cooks,his cooks,deck,decks,a dock,a deck,a docks,a decks,a cook,a cooks,my duck,my ducks,dock
sofa:king,kin,keen,kings
some:cricket
son,sun:of a bit,of a peach,of a be,of a bee
st:on ed,rip
stone:ed
stu:pit,pod
stuck:my duck,my dock,my deck,ing
sue:kk,lute,lutes
sugar:daddy
tah:tas,tah
tea:bag,bagged,bagging,bags
test:i cools,i cool,tickle,tickles
the:di,hello,flunk
tho:tt,tea,tee,ty
to:he'll
too:he'll
truck:eh ru,ing,eng,you,u,up,ed,her,or
tt:its,its,it
two:he'll
uk:you,u
un:tee
under:my skirt,her skirt,your skirt,my dress,her dress,your dress,ur skirt,ur dress
ur:but,bum,as,period,hole,holes
vague:in a,i nah
vern:gen
vet:china
via:grape
wanna:duck
wat:the hello,the fork,the duck,the freaky,the yuck,your sky,ur sky,the fire truck,the truck,the he'll
we,whee:ed,neigh is,knees
what:the hello,the fork,the duck,the freaky,the yuck,your sky,ur sky,the truck,the fire truck,the he'll
white:power
who:err,errs,re,ree
wrap:me,you,him,them,them
wut:the hello,the fork,the duck,the freaky,the yuck,your sky,ur sky,the truck,the fire truck,the he'll
you:a hole,in me
your:as,but,bum,come,period,hole,holes,ash,sass
yuck:err,error,errors,my life,me,ing,you,dee
zone:tan
zzz:3 ex,33 ex,ex,ugh eng,hole,holes
'''

View file

@ -1,36 +0,0 @@
from pandac.PandaModules import *
from otp.chat.SequenceList import SequenceList
from direct.directnotify import DirectNotifyGlobal
class TTSequenceList(SequenceList):
def __init__(self):
self.notify = DirectNotifyGlobal.directNotify.newCategory('TTSequenceList')
sequenceListURL = config.GetString('blacklist-sequence-url', '')
if sequenceListURL == '':
self.notify.warning('No Sequence BL URL specified! Continuing with local sequence.')
SequenceList.__init__(self, self.loadSquencesLocally())
else:
SequenceList.__init__(self, self.downloadSequences(sequenceListURL))
def downloadSequences(self, url):
fs = Ramfile()
http = HTTPClient.getGlobalPtr()
self.ch = http.makeChannel(True)
self.ch.getHeader(DocumentSpec(url))
doc = self.ch.getDocumentSpec()
self.ch.getDocument(doc)
self.ch.downloadToRam(fs)
return fs.getData().split('\r\n')
def loadSquencesLocally(self):
vfs = VirtualFileSystem.getGlobalPtr()
filename = Filename('tsequence.dat')
searchPath = DSearchPath()
searchPath.appendDirectory(Filename('/server'))
found = vfs.resolveFilename(filename, searchPath)
if not found:
self.notify.warning("Couldn't find blacklist sequence data file!")
return
data = vfs.readFile(filename, True)
return data.split('\n')

View file

@ -1,17 +1,9 @@
import copy
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.interval.IntervalGlobal import * from direct.interval.IntervalGlobal import *
from direct.showbase import AppRunnerGlobal from direct.showbase import AppRunnerGlobal
from direct.showbase import DirectObject from direct.showbase import DirectObject
from direct.showbase import PythonUtil from direct.showbase import PythonUtil
import os
from pandac.PandaModules import * from pandac.PandaModules import *
import re
import sys
import token
import tokenize
import BlinkingArrows
from otp.speedchat import SpeedChatGlobals from otp.speedchat import SpeedChatGlobals
from toontown.ai import DistributedBlackCatMgr from toontown.ai import DistributedBlackCatMgr
from toontown.chat.ChatGlobals import * from toontown.chat.ChatGlobals import *
@ -20,7 +12,7 @@ from toontown.suit import SuitDNA
from toontown.toon import ToonHeadFrame from toontown.toon import ToonHeadFrame
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownBattleGlobals from toontown.toonbase import ToontownBattleGlobals
import copy, os, re, sys, token, tokenize, QuestScripts, BlinkingArrows
notify = DirectNotifyGlobal.directNotify.newCategory('QuestParser') notify = DirectNotifyGlobal.directNotify.newCategory('QuestParser')
lineDict = {} lineDict = {}
@ -49,28 +41,26 @@ def init():
def clear(): def clear():
globalVarDict.clear() globalVarDict.clear()
def readFile(filename): def readFile():
global curId global curId
scriptFile = StreamReader(vfs.openReadFile(filename, 1), 1)
def readline(): for line in QuestScripts.script.split('\n'):
return scriptFile.readline().replace('\r', '') def readline():
return line
gen = tokenize.generate_tokens(readline) gen = tokenize.generate_tokens(readline)
line = getLineOfTokens(gen)
while line is not None:
if line == []:
line = getLineOfTokens(gen)
continue
if line[0] == 'ID':
parseId(line)
elif curId is None:
notify.error('Every script must begin with an ID')
else:
lineDict[curId].append(line)
line = getLineOfTokens(gen) line = getLineOfTokens(gen)
return while line is not None:
if line == []:
line = getLineOfTokens(gen)
continue
if line[0] == 'ID':
parseId(line)
elif curId is None:
notify.error('Every script must begin with an ID')
else:
lineDict[curId].append(line)
line = getLineOfTokens(gen)
def getLineOfTokens(gen): def getLineOfTokens(gen):
tokens = [] tokens = []
@ -908,13 +898,4 @@ class NPCMoviePlayer(DirectObject.DirectObject):
return Sequence(Func(grabCurTrackAccess), LerpFunctionInterval(updateGagLevel, fromData=1, toData=7, duration=0.3), WaitInterval(3.5), LerpFunctionInterval(updateGagLevel, fromData=7, toData=1, duration=0.3), Func(restoreTrackAccess), Func(messenger.send, 'donePreview')) return Sequence(Func(grabCurTrackAccess), LerpFunctionInterval(updateGagLevel, fromData=1, toData=7, duration=0.3), WaitInterval(3.5), LerpFunctionInterval(updateGagLevel, fromData=7, toData=1, duration=0.3), Func(restoreTrackAccess), Func(messenger.send, 'donePreview'))
searchPath = DSearchPath() readFile()
if __debug__:
searchPath.appendDirectory(Filename('../resources/phase_3/etc'))
searchPath.appendDirectory(Filename('resources/phase_3/etc'))
searchPath.appendDirectory(Filename('/phase_3/etc'))
scriptFile = Filename('QuestScripts.txt')
found = vfs.resolveFilename(scriptFile, searchPath)
if not found:
notify.error('Could not find QuestScripts.txt file')
readFile(scriptFile)

View file

@ -0,0 +1,362 @@
script = '''
ID quest_assign_101
CLEAR_CHAT npc
LOAD squirt1 "phase_3.5/models/gui/tutorial_gui" "squirt1"
LOAD squirt2 "phase_3.5/models/gui/tutorial_gui" "squirt2"
LOAD toonBuilding "phase_3.5/models/gui/tutorial_gui" "toon_buildings"
LOAD cogBuilding "phase_3.5/models/gui/tutorial_gui" "suit_buildings"
LOAD cogs "phase_3.5/models/gui/tutorial_gui" "suits"
POSHPRSCALE cogs -1.05 7 0 0 0 0 1 1 1
POSHPRSCALE toonBuilding -1.05 7 0 0 0 0 1.875 1.875 1.875
POSHPRSCALE cogBuilding -1.05 7 0 0 0 0 1.875 1.875 1.875
POSHPRSCALE squirt1 -1.05 7 0 0 0 0 1.875 1.875 1.875
POSHPRSCALE squirt2 -1.05 7 0 0 0 0 1.875 1.875 1.875
REPARENTTO camera npc
POS camera -2.2 5.2 3.3
HPR camera 215 5 0
WRTREPARENTTO camera localToon
PLAY_ANIM npc "right-hand-start" 1
WAIT 1
REPARENTTO cogs camera
LERP_SCALE cogs 1.875 1.875 1.875 0.5
WAIT 1.0833
LOOP_ANIM npc "right-hand" 1
FUNCTION npc "angryEyes"
FUNCTION npc "blinkEyes"
LOCAL_CHAT_CONFIRM npc QuestScript101_1 "CFReversed"
LOCAL_CHAT_CONFIRM npc QuestScript101_2 "CFReversed"
REPARENTTO cogs hidden
REPARENTTO toonBuilding camera
LOCAL_CHAT_CONFIRM npc QuestScript101_3 "CFReversed"
REPARENTTO toonBuilding hidden
REPARENTTO cogBuilding camera
FUNCTION npc "sadEyes"
FUNCTION npc "blinkEyes"
LOCAL_CHAT_CONFIRM npc QuestScript101_4 "CFReversed"
REPARENTTO cogBuilding hidden
REPARENTTO squirt1 camera
FUNCTION npc "normalEyes"
FUNCTION npc "blinkEyes"
LOCAL_CHAT_CONFIRM npc QuestScript101_5 "CFReversed"
REPARENTTO squirt1 hidden
REPARENTTO squirt2 camera
LOCAL_CHAT_CONFIRM npc QuestScript101_6 "CFReversed"
LERP_SCALE squirt2 1 1 0.01 0.5
WAIT 0.5
REPARENTTO squirt2 hidden
OBSCURE_LAFFMETER 0
SHOW laffMeter
POS laffMeter 0 0 0
SCALE laffMeter 0.075 0.075 0.075
LERP_POS laffMeter 1.7 0 0.87 1
LERP_SCALE laffMeter 0.2 0.2 0.2 0.6
WAIT 1.0833
LOCAL_CHAT_CONFIRM npc QuestScript101_8 "CFReversed"
LOCAL_CHAT_CONFIRM npc QuestScript101_9 "CFReversed"
FUNCTION npc "sadEyes"
FUNCTION npc "blinkEyes"
LAFFMETER 15 15
WAIT 0.1
LAFFMETER 14 15
WAIT 0.1
LAFFMETER 13 15
WAIT 0.1
LAFFMETER 12 15
WAIT 0.1
LAFFMETER 11 15
WAIT 0.1
LAFFMETER 10 15
WAIT 0.1
LAFFMETER 9 15
WAIT 0.1
LAFFMETER 8 15
WAIT 0.1
LAFFMETER 7 15
WAIT 0.1
LAFFMETER 6 15
WAIT 0.1
LAFFMETER 5 15
WAIT 0.1
LAFFMETER 4 15
WAIT 0.1
LAFFMETER 3 15
WAIT 0.1
LAFFMETER 2 15
WAIT 0.1
LAFFMETER 1 15
WAIT 0.1
LAFFMETER 0 15
LOCAL_CHAT_CONFIRM npc QuestScript101_10 "CFReversed"
FUNCTION npc "normalEyes"
FUNCTION npc "blinkEyes"
LAFFMETER 15 15
WAIT 0.5
LERP_POS laffMeter 0.15 0.15 0.15 1
LERP_SCALE laffMeter 0.085 0.085 0.085 0.6
PLAY_ANIM npc "right-hand-start" -2
WAIT 1.0625
LOOP_ANIM npc "neutral"
WAIT 0.5
LERP_HPR npc -50 0 0 0.5
FUNCTION npc "surpriseEyes"
FUNCTION npc "showSurpriseMuzzle"
PLAY_ANIM npc "right-point-start" 1.5
WAIT 0.6944
LOOP_ANIM npc "right-point"
LOCAL_CHAT_CONFIRM npc QuestScript101_11 "CFReversed"
LOCAL_CHAT_CONFIRM npc QuestScript101_12 "CFReversed"
PLAY_ANIM npc "right-point-start" -1
LERP_HPR npc -0.068 0 0 0.75
WAIT 1.0417
FUNCTION npc "angryEyes"
FUNCTION npc "blinkEyes"
FUNCTION npc "hideSurpriseMuzzle"
LOOP_ANIM npc "neutral"
FUNCTION localToon "questPage.showQuestsOnscreenTutorial"
LOCAL_CHAT_CONFIRM npc QuestScript101_13 "CFReversed"
FUNCTION localToon "questPage.hideQuestsOnscreenTutorial"
LOCAL_CHAT_CONFIRM npc QuestScript101_14 1 "CFReversed"
FUNCTION npc "normalEyes"
FUNCTION npc "blinkEyes"
UPON_TIMEOUT FUNCTION cogs "removeNode"
UPON_TIMEOUT FUNCTION toonBuilding "removeNode"
UPON_TIMEOUT FUNCTION cogBuilding "removeNode"
UPON_TIMEOUT FUNCTION squirt1 "removeNode"
UPON_TIMEOUT FUNCTION squirt2 "removeNode"
UPON_TIMEOUT LOOP_ANIM npc "neutral"
UPON_TIMEOUT SHOW laffMeter
UPON_TIMEOUT POS laffMeter 0.15 0.15 0.15
UPON_TIMEOUT SCALE laffMeter 0.085 0.085 0.085
POS localToon 0.776 14.6 0
HPR localToon 47.5 0 0
FINISH_QUEST_MOVIE
ID quest_incomplete_110
DEBUG "quest assign 110"
LOCAL_CHAT_CONFIRM npc QuestScript110_1
OBSCURE_BOOK 0
SHOW bookOpenButton
LOCAL_CHAT_CONFIRM npc QuestScript110_2
ARROWS_ON 1.364477 -0.89 0 1.664477 -0.64 90
LOCAL_CHAT_PERSIST npc QuestScript110_3
WAIT_EVENT "enterStickerBook"
ARROWS_OFF
SHOW_BOOK
HIDE bookPrevArrow
HIDE bookNextArrow
CLEAR_CHAT npc
WAIT 0.5
TOON_HEAD npc -0.2 -0.45 1
LOCAL_CHAT_CONFIRM npc QuestScript110_4
ARROWS_ON 0.85 -0.75 -90 0.85 -0.75 -90
SHOW bookNextArrow
LOCAL_CHAT_PERSIST npc QuestScript110_5
WAIT_EVENT "stickerBookPageChange-3"
HIDE bookPrevArrow
HIDE bookNextArrow
ARROWS_OFF
CLEAR_CHAT npc
WAIT 0.5
LOCAL_CHAT_CONFIRM npc QuestScript110_6
ARROWS_ON 0.85 -0.75 -90 0.85 -0.75 -90
SHOW bookNextArrow
LOCAL_CHAT_PERSIST npc QuestScript110_7
WAIT_EVENT "stickerBookPageChange-4"
HIDE bookNextArrow
HIDE bookPrevArrow
ARROWS_OFF
CLEAR_CHAT npc
LOCAL_CHAT_CONFIRM npc QuestScript110_8
LOCAL_CHAT_CONFIRM npc QuestScript110_9
LOCAL_CHAT_PERSIST npc QuestScript110_10
ENABLE_CLOSE_BOOK
ARROWS_ON 1.364477 -0.89 0 1.664477 -0.64 90
WAIT_EVENT "exitStickerBook"
ARROWS_OFF
TOON_HEAD npc 0 0 0
HIDE_BOOK
HIDE bookOpenButton
LOCAL_CHAT_CONFIRM npc QuestScript110_11 1
UPON_TIMEOUT OBSCURE_BOOK 0
UPON_TIMEOUT ARROWS_OFF
UPON_TIMEOUT HIDE_BOOK
UPON_TIMEOUT COLOR_SCALE bookOpenButton 1 1 1 1
UPON_TIMEOUT TOON_HEAD npc 0 0 0
UPON_TIMEOUT SHOW bookOpenButton
FINISH_QUEST_MOVIE
ID tutorial_blocker
HIDE localToon
REPARENTTO camera npc
FUNCTION npc "stopLookAround"
POS camera 0.0 6.0 4.0
HPR camera 180.0 0.0 0.0
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_1
WAIT 0.8
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_2
WAIT 0.8
POS camera -5.0 -9.0 6.0
HPR camera -25.0 -10.0 0.0
POS localToon 203.8 18.64 -0.475
HPR localToon -90.0 0.0 0.0
SHOW localToon
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_3
OBSCURE_CHAT 1 0
SHOW chatScButton
WAIT 0.6
ARROWS_ON -1.3644 0.91 180 -1.5644 0.74 -90
LOCAL_CHAT_PERSIST npc QuestScriptTutorialBlocker_4
WAIT_EVENT "enterSpeedChat"
ARROWS_OFF
BLACK_CAT_LISTEN 1
WAIT_EVENT "SCChatEvent"
BLACK_CAT_LISTEN 0
WAIT 0.5
CLEAR_CHAT localToon
REPARENTTO camera localToon
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_5 "CFReversed"
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_6 "CFReversed"
OBSCURE_CHAT 0 0
SHOW chatNormalButton
WAIT 0.6
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_7 "CFReversed"
LOCAL_CHAT_CONFIRM npc QuestScriptTutorialBlocker_8 1 "CFReversed"
LOOP_ANIM npc "walk"
LERP_HPR npc 270 0 0 0.5
WAIT 0.5
LOOP_ANIM npc "run"
LERP_POS npc 217.4 18.81 -0.475 0.75
LERP_HPR npc 240 0 0 0.75
WAIT 0.75
LERP_POS npc 222.4 15.0 -0.475 0.35
LERP_HPR npc 180 0 0 0.35
WAIT 0.35
LERP_POS npc 222.4 5.0 -0.475 0.75
WAIT 0.75
REPARENTTO npc hidden
FREE_LOCALTOON
UPON_TIMEOUT ARROWS_OFF
UPON_TIMEOUT OBSCURE_CHAT 0 0
UPON_TIMEOUT REPARENTTO camera localToon
FINISH_QUEST_MOVIE
ID gag_intro
SEND_EVENT "disableGagPanel"
SEND_EVENT "disableBackToPlayground"
HIDE inventory
TOON_HEAD npc 0 0 1
WAIT 0.1
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_1
LERP_POS npcToonHead -0.64 0 -0.74 0.7
LERP_SCALE npcToonHead 0.82 0.82 0.82 0.7
LERP_COLOR_SCALE purchaseBg 1 1 1 1 0.6 0.6 0.6 1 0.7
WAIT 0.7
SHOW inventory
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_1a
LOCAL_CHAT_PERSIST npc QuestScriptGagShop_3
SEND_EVENT "enableGagPanel"
WAIT_EVENT "inventory-selection"
CLEAR_CHAT npc
WAIT 0.5
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_4
LOCAL_CHAT_PERSIST npc QuestScriptGagShop_5
WAIT 0.5
SHOW_PREVIEW
CLEAR_CHAT npc
WAIT 0.5
SET_BIN backToPlaygroundButton "gui-popup"
LERP_POS backToPlaygroundButton -0.12 0 0.18 0.5
LERP_SCALE backToPlaygroundButton 2 2 2 0.5
LERP_COLOR_SCALE backToPlaygroundButton 1 1 1 1 2.78 2.78 2.78 1 0.5
LERP_COLOR_SCALE inventory 1 1 1 1 0.6 0.6 0.6 1 0.5
WAIT 0.5
START_THROB backToPlaygroundButton 2.78 2.78 2.78 1 2.78 2.78 2.78 0.7 2
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_6
STOP_THROB
LERP_POS backToPlaygroundButton 0.72 0 -0.045 0.5
LERP_SCALE backToPlaygroundButton 1.04 1.04 1.04 0.5
LERP_COLOR_SCALE backToPlaygroundButton 2.78 2.78 2.78 1 1 1 1 1 0.5
WAIT 0.5
CLEAR_BIN backToPlaygroundButton
SET_BIN playAgainButton "gui-popup"
LERP_POS playAgainButton -0.12 0 0.18 0.5
LERP_SCALE playAgainButton 2 2 2 0.5
LERP_COLOR_SCALE playAgainButton 1 1 1 1 2.78 2.78 2.78 1 0.5
WAIT 0.5
START_THROB playAgainButton 2.78 2.78 2.78 1 2.78 2.78 2.78 0.7 2
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_7
STOP_THROB
LERP_POS playAgainButton 0.72 0 -0.24 0.5
LERP_SCALE playAgainButton 1.04 1.04 1.04 0.5
LERP_COLOR_SCALE playAgainButton 2.78 2.78 2.78 1 1 1 1 1 0.5
WAIT 0.5
CLEAR_BIN playAgainButton
LOCAL_CHAT_CONFIRM npc QuestScriptGagShop_8 1
TOON_HEAD npc 0 0 0
LERP_COLOR_SCALE inventory 0.6 0.6 0.6 1 1 1 1 1 0.5
LERP_COLOR_SCALE purchaseBg 0.6 0.6 0.6 1 1 1 1 1 0.5
WAIT 0.5
SEND_EVENT "enableBackToPlayground"
UPON_TIMEOUT TOON_HEAD npc 0 0 0
UPON_TIMEOUT SHOW inventory
UPON_TIMEOUT SEND_EVENT "enableGagPanel"
UPON_TIMEOUT SEND_EVENT "enableBackToPlayground"
ID quest_incomplete_120
CHAT_CONFIRM npc QuestScript120_1
CHAT_CONFIRM npc QuestScript120_2 1
FINISH_QUEST_MOVIE
ID quest_assign_121
CHAT_CONFIRM npc QuestScript121_1 1
FINISH_QUEST_MOVIE
ID quest_assign_130
CHAT_CONFIRM npc QuestScript130_1 1
FINISH_QUEST_MOVIE
ID quest_assign_131
CHAT_CONFIRM npc QuestScript131_1 1
FINISH_QUEST_MOVIE
ID quest_assign_140
CHAT_CONFIRM npc QuestScript140_1 1
FINISH_QUEST_MOVIE
ID quest_assign_141
CHAT_CONFIRM npc QuestScript141_1 1
FINISH_QUEST_MOVIE
ID quest_incomplete_145
CHAT_CONFIRM npc QuestScript145_1 1
LOAD frame "phase_4/models/gui/tfa_images" "FrameBlankA"
LOAD tunnel "phase_4/models/gui/tfa_images" "tunnelSignA"
POSHPRSCALE tunnel 0 0 0 0 0 0 0.8 0.8 0.8
REPARENTTO tunnel frame
POSHPRSCALE frame 0 0 0 0 0 0 0.1 0.1 0.1
REPARENTTO frame aspect2d
LERP_SCALE frame 1.0 1.0 1.0 1.0
WAIT 3.0
LERP_SCALE frame 0.1 0.1 0.1 0.5
WAIT 0.5
REPARENTTO frame hidden
CHAT_CONFIRM npc QuestScript145_2 1
UPON_TIMEOUT FUNCTION frame "removeNode"
FINISH_QUEST_MOVIE
ID quest_incomplete_150
CHAT_CONFIRM npc QuestScript150_1
ARROWS_ON 1.65 0.51 -120 1.65 0.51 -120
SHOW_FRIENDS_LIST
CHAT_CONFIRM npc QuestScript150_2
ARROWS_OFF
HIDE_FRIENDS_LIST
CHAT_CONFIRM npc QuestScript150_3
HIDE bFriendsList
CHAT_CONFIRM npc QuestScript150_4 1
UPON_TIMEOUT HIDE_FRIENDS_LIST
UPON_TIMEOUT ARROWS_OFF
FINISH_QUEST_MOVIE
'''