Advertisement
Guest User

Untitled

a guest
May 29th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. var status = 0;
  2.  
  3. function start() {
  4. status = -1;
  5. action(1, 0, 0);
  6. }
  7.  
  8. function action(mode, type, selection) {
  9. if (mode == -1) {
  10. cm.dispose();
  11. } else {
  12. if (mode == 0 && status == 1) {
  13. cm.dispose();
  14. return;
  15. }
  16. if (mode == 1)
  17. status++;
  18. else
  19. status--;
  20. if (status == 0) {
  21. cm.sendNext("Hello there #e#h ##n, I am the Practice Scripting NPC. What would you like to learn today? \r\n\r\n #L0#Teach me how to Script an NPC#l \r\n #L1#Learn from #bAngel#k#l \r\n #L2#Nevermind#l");
  22. } else if (status == 1) {
  23. if (selection == 0) {
  24. cm.sendSimple("Sorry, I'm currently out of lessons to give. See you next year!");
  25. cm.dispose();
  26. } else if (status == 2) {
  27. if (selection == 1) {
  28. cm.sendSimple("Excellent! #bAngel#k is probably at #rhome#k.");
  29. cm.dispose();
  30. } else if (status == 3) {
  31. if (selection == 2) {
  32. cm.sendSimple("A wise choice, my young friend.");
  33. cm.dispose();
  34. }
  35. }
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement