Skip to content

Instantly share code, notes, and snippets.

@oxysoft
Created August 13, 2015 19:29
Show Gist options
  • Save oxysoft/41aed6e6a0f905d30fb6 to your computer and use it in GitHub Desktop.
Save oxysoft/41aed6e6a0f905d30fb6 to your computer and use it in GitHub Desktop.
//groovy maplestory npc DSL example
//the parameter is npc id
def npc = new NpcBuilder(1337)
npc {
next "Yo what's up ?!?"
next "I'm pretty good how bout u??"
next_player "Yea bro im good here"
selections ["yo try this puzzle \r\n\r\nwhich 1 is not a cabbage???", [
"Cabbage",
"Borcolis",
"Cabbage",
"Cabbage",
]]
selection_callbacks [
{
ok "naw man, dis a cabbage"
},
{
ok "yea bro ur right, dis isn't a cabbage"
},
{
ok "naw man, dis a cabbage"
},
{
ok "naw man, dis a cabbage"
}
]
}
// returns the string representing an npc script in odinms javascript script style
npc.asOdin()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment