Created
August 13, 2015 19:29
-
-
Save oxysoft/41aed6e6a0f905d30fb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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