npc_live_dialogues.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //===== rAthena Script =======================================
  2. //= Sample: Live Dialogue
  3. //===== By: ==================================================
  4. //= Lupus
  5. //===== Last Updated: ========================================
  6. //= 20130905
  7. //===== Description: =========================================
  8. //= An example of an NPC with live dialogue.
  9. //= Note: This relies on Global_Functions.txt to run.
  10. //============================================================
  11. prontera,167,177,5 script Luppy 1107,{
  12. mes "[Luppy]";
  13. // Say a random greeting from Global_Functions.txt
  14. mes callfunc("F_Hi");
  15. // Say a compliment according to player's gender
  16. // 1st string is for FEMALE, 2nd for MALE
  17. mes callfunc("F_Sex","What a beautiful lady!","What a handsome man!");
  18. // Add some random greeting and goodbye into the menu
  19. menu callfunc("F_Hi"),-, callfunc("F_Bye"),M_BYE;
  20. mes "[Luppy]";
  21. // Give a random prize from set list of items
  22. if(@gotstuff){
  23. // Again, say stuff according to player's gender
  24. mes "I like "+callfunc("F_Sex","smiling ladies!","bloody pirates!");
  25. // Show one of 3 emotion from the list (we added ,1 to show emotion over PLAYER's head)
  26. emotion callfunc("F_Rand",e_scissors,e_kis,e_pat),1;
  27. close;
  28. }
  29. // We set a temp var to give present just once. Player can get more by relogging.
  30. set @gotstuff,1;
  31. // Get item ID from the list of presents: Apple, Mastela Fruit, Yggdrasil Seed or Orange Juice
  32. set @itemIDfromList, callfunc("F_Rand",512,522,608,620);
  33. // Again, say stuff according to player's gender
  34. mes "Hey, "+callfunc("F_Sex","sister!","brother!")+" I have "+getitemname(@itemIDfromList)+" for you!";
  35. // Get the item from the list
  36. getitem @itemIDfromList,1;
  37. close;
  38. M_BYE:
  39. mes "[Luppy]";
  40. // Add some random goodbye from Global_Functions.txt
  41. mes callfunc("F_Bye");
  42. close;
  43. }