Guest User

Untitled

a guest
Jan 21st, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.22 KB | None | 0 0
  1. //========================================
  2. //Tiger Lily :3
  3. //Derc was here~
  4. //========================================
  5.  
  6. - script TL_Options -1,{
  7. OnInit:
  8. set $TL_MaxDistance, 30; // Mob further than that = jump to mob
  9. set $TL_MoveDistance, 5; // Mob further than that = start moving
  10. set $TL_StayDistance, 2; // Stay at approx this distance from mob
  11. set $TL_NPCspeed, 100; // Normal speed
  12. set $TL_Mob, 1916; // SM
  13. set $TL_GM, 60; // GM level to start-stop event
  14. end;
  15. }
  16.  
  17. pay_dun02,149,98,5 script Tiger Lily#main 1658,{
  18. set .@n$,"[Tiger Lily]";
  19. if (getgmlevel()>=$TL_GM) {goto L_GM;}
  20. if (.eventon) {end;}
  21. if (getcharid(0) != .winner)||(.gotprize) {
  22. mes .@n$;
  23. mes "Hello there! Do you like my house? :>";
  24. close;
  25. }
  26. else {
  27. mes .@n$;
  28. mes "Thank you very much for saving me again ^^;";
  29. next;
  30. if (!checkweight($TL_PrizeID,$TL_PrizeCount)) {
  31. mes .@n$;
  32. mes "I want to reward you but unfortunately you aren't able to carry my little gift ^^;";
  33. next;
  34. mes .@n$;
  35. mes "Please use Kafra storage and return~ :3";
  36. close;
  37. }
  38. mes .@n$;
  39. mes "Here is a little thank-you gift from me ^^~";
  40. getitem 7539,rand(3,8);
  41. getitem 674,rand(0,10);
  42. next;
  43. mes .@n$;
  44. mes "Take care!~";
  45. close2;
  46. movenpc strnpcinfo(3), 149,98; //back to original position
  47. end;
  48. }
  49. end;
  50.  
  51. L_GM:
  52. mes .@n$;
  53. mes "Hello~ o-o";
  54. next;
  55. switch(select("Hello o/:"+(.eventon?"Stop event":"Start event"))) {
  56. case 1:
  57. mes .@n$;
  58. mes "\\o";
  59. close;
  60. case 2:
  61. mes .@n$;
  62. mes "Aye aye sir o-o";
  63. close2;
  64. if (.eventon) {
  65. killmonster "pay_dun02","Tiger Lily#main::OnDefeat";
  66. goto OnDefeat;
  67. } else {
  68. goto OnStartEvent;
  69. }
  70. }
  71. end;
  72.  
  73.  
  74. OnStartEvent:
  75. npcspeed $TL_NPCspeed;
  76. set .eventon, 1;
  77. set .followed, $TL_Mob;
  78. // Announce settings
  79. set .@str1$,"......................!!--";
  80. set .@str2$,"......................lp!!--";
  81. set .@str3$,".................heee..lp!!--";
  82. set .@str4$,"Tiger Lily: HEEEEEEEEEEEEEEEEEEEEEEEEELP!!!";
  83. set .@str5$,"Tiger Lily: This big bad guy is keeping me hostage!!";
  84. set .@str6$,"Tiger Lily: In a place with a lot of skeletons and muna---";
  85. set .@delay, 6000;
  86. set .color, 0xFFFFFF;
  87. // Announce
  88. announce .@str1$,bc_all,0xFFFFFF;
  89. sleep .@delay;
  90. if (!.eventon) {end;}
  91. announce .@str2$,bc_all,0xFFFFFF;
  92. sleep .@delay;
  93. if (!.eventon) {end;}
  94. announce .@str3$,bc_all,0xFFFFFF;
  95. sleep .@delay;
  96. if (!.eventon) {end;}
  97. announce .@str4$,bc_all,0xFFFFFF;
  98. sleep .@delay;
  99. if (!.eventon) {end;}
  100. announce .@str5$,bc_all,0xFFFFFF;
  101. sleep .@delay;
  102. if (!.eventon) {end;}
  103. announce .@str6$,bc_all,0xFFFFFF;
  104. sleep .@delay;
  105. if (!.eventon) {end;}
  106. announce .@str7$,bc_all,0xFFFFFF;
  107. sleep .@delay;
  108. if (!.eventon) {end;}
  109. announce .@str1$,bc_all,0xFFFFFF;
  110. goto L_Spawn;
  111.  
  112. L_Spawn:
  113. monster "pay_dun02",0,0,"Big Bad Guy",$TL_Mob,1,"Tiger Lily#main::OnDefeat";
  114. initnpctimer;
  115. end;
  116.  
  117. OnDefeat:
  118. stopnpctimer;
  119. setnpctimer 1001;
  120. startnpctimer;
  121. set .eventon, 0;
  122. set .winner, getcharid(0);
  123. set .gotprize, 0;
  124. announce "Tiger Lily: Thank you very much for saving me, "+strcharinfo(0)+"! Talk to me to get your prize :>",bc_all,0xFFFFFF;
  125. end;
  126.  
  127. // Sm follow script ======
  128. OnTimer1000:
  129. if (getmapxy(.followedmap$, .followedx, .followedy, 3, .followed)) { // No morroc :[
  130. stopnpctimer;
  131. if (!.eventon)
  132. end;
  133. }
  134. getmapxy(.mymap$, .myx, .myy, 1);
  135. set .@dx, (.followedx - .myx);
  136. set .@dy, (.followedy - .myy);
  137. set .@d, distance(.followedx,.followedy,.myx,.myy);
  138. // Map change check
  139. if (.mymap$ != .followedmap$) {
  140. stopnpctimer;
  141. end;
  142. }
  143. // Distance check
  144. if (.@d > $TL_MaxDistance) {
  145. npcstop;
  146. movenpc strnpcinfo(3), .followedx, .followedy;
  147. } else if (.@d > $TL_MoveDistance) {
  148. set .@mx, (.followedx-(($TL_StayDistance * .@dx) / .@d));
  149. set .@my, (.followedy-(($TL_StayDistance * .@dy) / .@d));
  150. // Passability check
  151. if (!checkcell(.mymap$, .@mx, .@my, cell_chkpass)) {
  152. npcstop;
  153. movenpc strnpcinfo(3), .followedx, .followedy;
  154. } else {
  155. npcwalkto .@mx, .@my;
  156. }
  157. }
  158. setnpctimer 1;
  159. startnpctimer;
  160. end;
  161.  
  162. OnTimer180000:
  163. movenpc strnpcinfo(3), 149,98; // Back to where you came from!
  164. stopnpctimer;
  165. end;
  166.  
  167. // Sm follow script END =====
  168. OnInit:
  169. set .eventon, 0;
  170. end;
  171. }
  172.  
  173. // Tiger Lily initiating npc ====================================
  174.  
  175. - script TL_Init -1,{
  176. OnInit:
  177. set .inithour, (gettime(3)+1)%24;
  178. end;
  179.  
  180. OnClock0000:
  181. if (.inithour == 0) {set .eventtime, rand(24);}
  182. if (.eventtime == 0) {goto L_StartEvent;}
  183. end;
  184.  
  185. OnClock0100:
  186. if (.inithour == 1) {set .eventtime, rand(24);}
  187. if (.eventtime == 1) {goto L_StartEvent;}
  188. end;
  189.  
  190. OnClock0200:
  191. if (.inithour == 2) {set .eventtime, rand(24);}
  192. if (.eventtime == 2) {goto L_StartEvent;}
  193. end;
  194.  
  195. OnClock0300:
  196. if (.inithour == 3) {set .eventtime, rand(24);}
  197. if (.eventtime == 3) {goto L_StartEvent;}
  198. end;
  199.  
  200. OnClock0400:
  201. if (.inithour == 4) {set .eventtime, rand(24);}
  202. if (.eventtime == 4) {goto L_StartEvent;}
  203. end;
  204.  
  205. OnClock0500:
  206. if (.inithour == 5) {set .eventtime, rand(24);}
  207. if (.eventtime == 5) {goto L_StartEvent;}
  208. end;
  209.  
  210. OnClock0600:
  211. if (.inithour == 6) {set .eventtime, rand(24);}
  212. if (.eventtime == 6) {goto L_StartEvent;}
  213. end;
  214.  
  215. OnClock0700:
  216. if (.inithour == 7) {set .eventtime, rand(24);}
  217. if (.eventtime == 7) {goto L_StartEvent;}
  218. end;
  219.  
  220. OnClock0800:
  221. if (.inithour == 8) {set .eventtime, rand(24);}
  222. if (.eventtime == 8) {goto L_StartEvent;}
  223. end;
  224.  
  225. OnClock0900:
  226. if (.inithour == 9) {set .eventtime, rand(24);}
  227. if (.eventtime == 9) {goto L_StartEvent;}
  228. end;
  229.  
  230. OnClock1000:
  231. if (.inithour == 10) {set .eventtime, rand(24);}
  232. if (.eventtime == 10) {goto L_StartEvent;}
  233. end;
  234.  
  235. OnClock1100:
  236. if (.inithour == 11) {set .eventtime, rand(24);}
  237. if (.eventtime == 11) {goto L_StartEvent;}
  238. end;
  239.  
  240. OnClock1200:
  241. if (.inithour == 12) {set .eventtime, rand(24);}
  242. if (.eventtime == 12) {goto L_StartEvent;}
  243. end;
  244.  
  245. OnClock1300:
  246. if (.inithour == 13) {set .eventtime, rand(24);}
  247. if (.eventtime == 13) {goto L_StartEvent;}
  248. end;
  249.  
  250. OnClock1400:
  251. if (.inithour == 14) {set .eventtime, rand(24);}
  252. if (.eventtime == 14) {goto L_StartEvent;}
  253. end;
  254.  
  255. OnClock1500:
  256. if (.inithour == 15) {set .eventtime, rand(24);}
  257. if (.eventtime == 15) {goto L_StartEvent;}
  258. end;
  259.  
  260. OnClock1600:
  261. if (.inithour == 16) {set .eventtime, rand(24);}
  262. if (.eventtime == 16) {goto L_StartEvent;}
  263. end;
  264.  
  265. OnClock1700:
  266. if (.inithour == 17) {set .eventtime, rand(24);}
  267. if (.eventtime == 17) {goto L_StartEvent;}
  268. end;
  269.  
  270. OnClock1800:
  271. if (.inithour == 18) {set .eventtime, rand(24);}
  272. if (.eventtime == 18) {goto L_StartEvent;}
  273. end;
  274.  
  275. OnClock1900:
  276. if (.inithour == 19) {set .eventtime, rand(24);}
  277. if (.eventtime == 19) {goto L_StartEvent;}
  278. end;
  279.  
  280. OnClock2000:
  281. if (.inithour == 20) {set .eventtime, rand(24);}
  282. if (.eventtime == 20) {goto L_StartEvent;}
  283. end;
  284.  
  285. OnClock2100:
  286. if (.inithour == 21) {set .eventtime, rand(24);}
  287. if (.eventtime == 21) {goto L_StartEvent;}
  288. end;
  289.  
  290. OnClock2200:
  291. if (.inithour == 22) {set .eventtime, rand(24);}
  292. if (.eventtime == 22) {goto L_StartEvent;}
  293. end;
  294.  
  295. OnClock2300:
  296. if (.inithour == 23) {set .eventtime, rand(24);}
  297. if (.eventtime == 23) {goto L_StartEvent;}
  298. end;
  299.  
  300. L_StartEvent:
  301. donpcevent "Tiger Lily#main::OnStartEvent";
  302. end;
  303. }
Add Comment
Please, Sign In to add comment