Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //========================================
- //Tiger Lily :3
- //Derc was here~
- //========================================
- - script TL_Options -1,{
- OnInit:
- set $TL_MaxDistance, 30; // Mob further than that = jump to mob
- set $TL_MoveDistance, 5; // Mob further than that = start moving
- set $TL_StayDistance, 2; // Stay at approx this distance from mob
- set $TL_NPCspeed, 100; // Normal speed
- set $TL_Mob, 1916; // SM
- set $TL_GM, 60; // GM level to start-stop event
- end;
- }
- pay_dun02,149,98,5 script Tiger Lily#main 1658,{
- set .@n$,"[Tiger Lily]";
- if (getgmlevel()>=$TL_GM) {goto L_GM;}
- if (.eventon) {end;}
- if (getcharid(0) != .winner)||(.gotprize) {
- mes .@n$;
- mes "Hello there! Do you like my house? :>";
- close;
- }
- else {
- mes .@n$;
- mes "Thank you very much for saving me again ^^;";
- next;
- if (!checkweight($TL_PrizeID,$TL_PrizeCount)) {
- mes .@n$;
- mes "I want to reward you but unfortunately you aren't able to carry my little gift ^^;";
- next;
- mes .@n$;
- mes "Please use Kafra storage and return~ :3";
- close;
- }
- mes .@n$;
- mes "Here is a little thank-you gift from me ^^~";
- getitem 7539,rand(3,8);
- getitem 674,rand(0,10);
- next;
- mes .@n$;
- mes "Take care!~";
- close2;
- movenpc strnpcinfo(3), 149,98; //back to original position
- end;
- }
- end;
- L_GM:
- mes .@n$;
- mes "Hello~ o-o";
- next;
- switch(select("Hello o/:"+(.eventon?"Stop event":"Start event"))) {
- case 1:
- mes .@n$;
- mes "\\o";
- close;
- case 2:
- mes .@n$;
- mes "Aye aye sir o-o";
- close2;
- if (.eventon) {
- killmonster "pay_dun02","Tiger Lily#main::OnDefeat";
- goto OnDefeat;
- } else {
- goto OnStartEvent;
- }
- }
- end;
- OnStartEvent:
- npcspeed $TL_NPCspeed;
- set .eventon, 1;
- set .followed, $TL_Mob;
- // Announce settings
- set .@str1$,"......................!!--";
- set .@str2$,"......................lp!!--";
- set .@str3$,".................heee..lp!!--";
- set .@str4$,"Tiger Lily: HEEEEEEEEEEEEEEEEEEEEEEEEELP!!!";
- set .@str5$,"Tiger Lily: This big bad guy is keeping me hostage!!";
- set .@str6$,"Tiger Lily: In a place with a lot of skeletons and muna---";
- set .@delay, 6000;
- set .color, 0xFFFFFF;
- // Announce
- announce .@str1$,bc_all,0xFFFFFF;
- sleep .@delay;
- if (!.eventon) {end;}
- announce .@str2$,bc_all,0xFFFFFF;
- sleep .@delay;
- if (!.eventon) {end;}
- announce .@str3$,bc_all,0xFFFFFF;
- sleep .@delay;
- if (!.eventon) {end;}
- announce .@str4$,bc_all,0xFFFFFF;
- sleep .@delay;
- if (!.eventon) {end;}
- announce .@str5$,bc_all,0xFFFFFF;
- sleep .@delay;
- if (!.eventon) {end;}
- announce .@str6$,bc_all,0xFFFFFF;
- sleep .@delay;
- if (!.eventon) {end;}
- announce .@str7$,bc_all,0xFFFFFF;
- sleep .@delay;
- if (!.eventon) {end;}
- announce .@str1$,bc_all,0xFFFFFF;
- goto L_Spawn;
- L_Spawn:
- monster "pay_dun02",0,0,"Big Bad Guy",$TL_Mob,1,"Tiger Lily#main::OnDefeat";
- initnpctimer;
- end;
- OnDefeat:
- stopnpctimer;
- setnpctimer 1001;
- startnpctimer;
- set .eventon, 0;
- set .winner, getcharid(0);
- set .gotprize, 0;
- announce "Tiger Lily: Thank you very much for saving me, "+strcharinfo(0)+"! Talk to me to get your prize :>",bc_all,0xFFFFFF;
- end;
- // Sm follow script ======
- OnTimer1000:
- if (getmapxy(.followedmap$, .followedx, .followedy, 3, .followed)) { // No morroc :[
- stopnpctimer;
- if (!.eventon)
- end;
- }
- getmapxy(.mymap$, .myx, .myy, 1);
- set .@dx, (.followedx - .myx);
- set .@dy, (.followedy - .myy);
- set .@d, distance(.followedx,.followedy,.myx,.myy);
- // Map change check
- if (.mymap$ != .followedmap$) {
- stopnpctimer;
- end;
- }
- // Distance check
- if (.@d > $TL_MaxDistance) {
- npcstop;
- movenpc strnpcinfo(3), .followedx, .followedy;
- } else if (.@d > $TL_MoveDistance) {
- set .@mx, (.followedx-(($TL_StayDistance * .@dx) / .@d));
- set .@my, (.followedy-(($TL_StayDistance * .@dy) / .@d));
- // Passability check
- if (!checkcell(.mymap$, .@mx, .@my, cell_chkpass)) {
- npcstop;
- movenpc strnpcinfo(3), .followedx, .followedy;
- } else {
- npcwalkto .@mx, .@my;
- }
- }
- setnpctimer 1;
- startnpctimer;
- end;
- OnTimer180000:
- movenpc strnpcinfo(3), 149,98; // Back to where you came from!
- stopnpctimer;
- end;
- // Sm follow script END =====
- OnInit:
- set .eventon, 0;
- end;
- }
- // Tiger Lily initiating npc ====================================
- - script TL_Init -1,{
- OnInit:
- set .inithour, (gettime(3)+1)%24;
- end;
- OnClock0000:
- if (.inithour == 0) {set .eventtime, rand(24);}
- if (.eventtime == 0) {goto L_StartEvent;}
- end;
- OnClock0100:
- if (.inithour == 1) {set .eventtime, rand(24);}
- if (.eventtime == 1) {goto L_StartEvent;}
- end;
- OnClock0200:
- if (.inithour == 2) {set .eventtime, rand(24);}
- if (.eventtime == 2) {goto L_StartEvent;}
- end;
- OnClock0300:
- if (.inithour == 3) {set .eventtime, rand(24);}
- if (.eventtime == 3) {goto L_StartEvent;}
- end;
- OnClock0400:
- if (.inithour == 4) {set .eventtime, rand(24);}
- if (.eventtime == 4) {goto L_StartEvent;}
- end;
- OnClock0500:
- if (.inithour == 5) {set .eventtime, rand(24);}
- if (.eventtime == 5) {goto L_StartEvent;}
- end;
- OnClock0600:
- if (.inithour == 6) {set .eventtime, rand(24);}
- if (.eventtime == 6) {goto L_StartEvent;}
- end;
- OnClock0700:
- if (.inithour == 7) {set .eventtime, rand(24);}
- if (.eventtime == 7) {goto L_StartEvent;}
- end;
- OnClock0800:
- if (.inithour == 8) {set .eventtime, rand(24);}
- if (.eventtime == 8) {goto L_StartEvent;}
- end;
- OnClock0900:
- if (.inithour == 9) {set .eventtime, rand(24);}
- if (.eventtime == 9) {goto L_StartEvent;}
- end;
- OnClock1000:
- if (.inithour == 10) {set .eventtime, rand(24);}
- if (.eventtime == 10) {goto L_StartEvent;}
- end;
- OnClock1100:
- if (.inithour == 11) {set .eventtime, rand(24);}
- if (.eventtime == 11) {goto L_StartEvent;}
- end;
- OnClock1200:
- if (.inithour == 12) {set .eventtime, rand(24);}
- if (.eventtime == 12) {goto L_StartEvent;}
- end;
- OnClock1300:
- if (.inithour == 13) {set .eventtime, rand(24);}
- if (.eventtime == 13) {goto L_StartEvent;}
- end;
- OnClock1400:
- if (.inithour == 14) {set .eventtime, rand(24);}
- if (.eventtime == 14) {goto L_StartEvent;}
- end;
- OnClock1500:
- if (.inithour == 15) {set .eventtime, rand(24);}
- if (.eventtime == 15) {goto L_StartEvent;}
- end;
- OnClock1600:
- if (.inithour == 16) {set .eventtime, rand(24);}
- if (.eventtime == 16) {goto L_StartEvent;}
- end;
- OnClock1700:
- if (.inithour == 17) {set .eventtime, rand(24);}
- if (.eventtime == 17) {goto L_StartEvent;}
- end;
- OnClock1800:
- if (.inithour == 18) {set .eventtime, rand(24);}
- if (.eventtime == 18) {goto L_StartEvent;}
- end;
- OnClock1900:
- if (.inithour == 19) {set .eventtime, rand(24);}
- if (.eventtime == 19) {goto L_StartEvent;}
- end;
- OnClock2000:
- if (.inithour == 20) {set .eventtime, rand(24);}
- if (.eventtime == 20) {goto L_StartEvent;}
- end;
- OnClock2100:
- if (.inithour == 21) {set .eventtime, rand(24);}
- if (.eventtime == 21) {goto L_StartEvent;}
- end;
- OnClock2200:
- if (.inithour == 22) {set .eventtime, rand(24);}
- if (.eventtime == 22) {goto L_StartEvent;}
- end;
- OnClock2300:
- if (.inithour == 23) {set .eventtime, rand(24);}
- if (.eventtime == 23) {goto L_StartEvent;}
- end;
- L_StartEvent:
- donpcevent "Tiger Lily#main::OnStartEvent";
- end;
- }
Add Comment
Please, Sign In to add comment