Skip to content

Instantly share code, notes, and snippets.

@erodozer
Created March 11, 2019 03:19
Show Gist options
  • Save erodozer/4b6ed6c34069d4dac2ffa0ce5014820a to your computer and use it in GitHub Desktop.
Save erodozer/4b6ed6c34069d4dac2ffa0ce5014820a to your computer and use it in GitHub Desktop.
example_npc script
extends "res://maps/NPC.gd"
func interact():
dialog.prepare()
dialog.show()
if GameState.Flags.get('talked_to_guilford'):
dialog.line(
"""
#Guilford
Don't worry, I'll have your equipment ready for ya soon. Lemme just finish this drink.
"""
)
else:
dialog.line(
"""
#Guilford
Hm? You a client? If ya need to make a request Catherine at the front desk will handle it.
What's that?
Oh sorry, didn't know we were hiring anyone. Damn, I could have gotten a nice referral bonus if I knew.
Well, what's done is done. I'm guessing Catherine told ya to do a quick run around and get to meet whoever's here, eh?
The name's Guilford, if you didn't catch on from the various queues around ya. I'm the guild technician.
I keep the technology stable and things generally afloat in terms of provisioning all equipment.
[slow]
Wait a minute...
[fast]
If yer new that means she's also probably sent some things my way to process.
[medium]
I guess that means I should get back to work. See ya around.
"""
)
GameState.Flags.touch('talked_to_guilford')
dialog.hide()
yield(dialog.execute(), "completed")
GameState.GlobalCounters.incr('npc.interact.guilford')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment