From 6c3f9b19c38060babd5ea8fd6e1c4689717eb377 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 10 Jun 2019 10:48:28 -0300 Subject: Okay, I have an idea on how I'll rewrite Cindy Quest --- npc/021-4/main.txt | 59 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 5 deletions(-) (limited to 'npc') diff --git a/npc/021-4/main.txt b/npc/021-4/main.txt index 62d12bcf0..30c5c2bb2 100644 --- a/npc/021-4/main.txt +++ b/npc/021-4/main.txt @@ -28,11 +28,60 @@ function script CindySwitch_Check_214 { return .@i; } -021-4,101,33,0 duplicate(#CindySwitch_01) #CindySwitch_06 NPC_SWITCH_OFFLINE -021-4,90,79,0 duplicate(#CindySwitch_01) #CindySwitch_07 NPC_SWITCH_OFFLINE -021-4,49,65,0 duplicate(#CindySwitch_01) #CindySwitch_08 NPC_SWITCH_OFFLINE -021-4,47,21,0 duplicate(#CindySwitch_01) #CindySwitch_09 NPC_SWITCH_OFFLINE -021-4,80,49,0 duplicate(#CindySwitch_01) #CindySwitch_10 NPC_SWITCH_OFFLINE +// Switches +021-4,101,33,0 script #CindySwitch_06 NPC_SWITCH_OFFLINE,{ + .@q=getq(NivalisQuest_Cindy); + if (.@q < 3) { + mesn strcharinfo(0); + mesq l("This is a strange switch..."); + close; + } + if (.lifetime-gettimetick(2) <= 0) { + mesc l("Pull the switch?"); + select + l("Pull it"), + l("Leave it"); + if (@menu == 1) { + getexp rand(55, 110), rand(5, 11); + .lifetime=gettimetick(2)+rand(110, 150); // Something between 1m50s and 2m30s + specialeffect(FX_SUCCESS); + setnpcdisplay .name$, NPC_SWITCH_ONLINE; + initnpctimer; + .@r=rand(0,100); + getmapxy(.@m$, .@x, .@y,0); + if (.@r < 90) + monster .@m$, .@x, .@y, "Yeti", Yeti, 6; + else + monster .@m$, .@x, .@y, "Yeti", Yeti, 2; + npctalk l("Automatic disarm in: @@", FuzzyTime(.lifetime)); + closedialog; + } + close; + } + npctalk l("Automatic disarm in: @@", FuzzyTime(.lifetime)); + end; + +OnTimer1000: + if (.lifetime-gettimetick(2) <= 0) { + setnpcdisplay .name$, NPC_SWITCH_OFFLINE; + stopnpctimer; + } else { + initnpctimer; + } + end; + +OnInit: + .sex = G_OTHER; + .distance = 3; + .lifetime=0; // When will this switch turn off automatically + end; + +} + +021-4,90,79,0 duplicate(#CindySwitch_06) #CindySwitch_07 NPC_SWITCH_OFFLINE +021-4,49,65,0 duplicate(#CindySwitch_06) #CindySwitch_08 NPC_SWITCH_OFFLINE +021-4,47,21,0 duplicate(#CindySwitch_06) #CindySwitch_09 NPC_SWITCH_OFFLINE +021-4,80,49,0 duplicate(#CindySwitch_06) #CindySwitch_10 NPC_SWITCH_OFFLINE // Cindy // Global Variable: $@CINDY_STATE -- cgit v1.2.3-60-g2f50