diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-06-10 10:48:28 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-06-10 10:48:28 -0300 |
commit | 6c3f9b19c38060babd5ea8fd6e1c4689717eb377 (patch) | |
tree | 1202b1f301ed8857fa04deb668114d536c8648a1 | |
parent | 5c3b1af88e180e6cce1239dd55cc44faca66bbfc (diff) | |
download | serverdata-6c3f9b19c38060babd5ea8fd6e1c4689717eb377.tar.gz serverdata-6c3f9b19c38060babd5ea8fd6e1c4689717eb377.tar.bz2 serverdata-6c3f9b19c38060babd5ea8fd6e1c4689717eb377.tar.xz serverdata-6c3f9b19c38060babd5ea8fd6e1c4689717eb377.zip |
Okay, I have an idea on how I'll rewrite Cindy Quest
-rw-r--r-- | npc/021-4/main.txt | 59 |
1 files changed, 54 insertions, 5 deletions
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 |