diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-05-08 14:14:52 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-05-08 14:14:52 -0300 |
commit | 3e1d97d61ce397c60e3abd2a826fdda5c4e5c343 (patch) | |
tree | 11a2d415eea34b72d1bb3490a9ffc70ffd491f7a | |
parent | ff5b3e2db85d63416c8b6d330a4279acbf602083 (diff) | |
download | serverdata-3e1d97d61ce397c60e3abd2a826fdda5c4e5c343.tar.gz serverdata-3e1d97d61ce397c60e3abd2a826fdda5c4e5c343.tar.bz2 serverdata-3e1d97d61ce397c60e3abd2a826fdda5c4e5c343.tar.xz serverdata-3e1d97d61ce397c60e3abd2a826fdda5c4e5c343.zip |
You should now be able to find Henry's files.
-rw-r--r-- | npc/001-2-43/_import.txt | 1 | ||||
-rw-r--r-- | npc/001-2-43/core.txt | 109 | ||||
-rw-r--r-- | npc/001-2-8/doors.txt | 1 | ||||
-rw-r--r-- | npc/001-3-0/gates.txt | 3 | ||||
-rw-r--r-- | npc/001-3-2/henry.txt | 9 |
5 files changed, 118 insertions, 5 deletions
diff --git a/npc/001-2-43/_import.txt b/npc/001-2-43/_import.txt index d602c954..52e7a256 100644 --- a/npc/001-2-43/_import.txt +++ b/npc/001-2-43/_import.txt @@ -1,3 +1,4 @@ // Map 001-2-43: Archive // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/001-2-43/_warps.txt", +"npc/001-2-43/core.txt", diff --git a/npc/001-2-43/core.txt b/npc/001-2-43/core.txt new file mode 100644 index 00000000..c927873c --- /dev/null +++ b/npc/001-2-43/core.txt @@ -0,0 +1,109 @@ +// Evol scripts. +// Author: +// Micksha, Jesusalva +// Description: +// Core of Henry's Quest + +001-2-43,25,24,0 script #ArtisThiefBook_1 NPC_NO_SPRITE,{ + .@q=getq(ThiefQuests_Artis); + .@q3=getq3(ThiefQuests_Artis); + + // Add a forced delay to prevent abuse + if (.@q != 1) end; + getmapxy(.@m$, @x, @y, 0); // Save in @x/@y + dispbottom l("Sec, lemme look this."); + addtimer 1000, .name$+"::OnRead"; + end; + +OnRead: + // Prepare the Quest Variables + .@q=getq(ThiefQuests_Artis); + .@q3=getq3(ThiefQuests_Artis); + + // You must not have moved + getmapxy(.@m$, .@x, .@y, 0); + if (.@x != @x || .@y != @y || .@q != 1) { + dispbottom l("I'm so busy, I can look there later."); + end; + } + + // Clear temporary variables + @x=@y=0; + + // Extract the quest ID from name (or fail trying) + explode(.@ni$, .name$, "_"); + .@id=atoi(.@ni$[1]); + + // Check if the file was here + if (.@q3 == .@id) { + // TODO: Dialog: How will you deal with the file? + dispbottom l("This is it! Henry's files! NOW I MUST GET OUT OF HERE BEFORE I'M CAUGHT!!"); + setq ThiefQuests_Artis, 2, 0, 0; + } + end; + +OnInit: + .distance=1; + end; +} + +// Duplicate the town files +001-2-43,24,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_2 NPC_NO_SPRITE +001-2-43,25,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_4 NPC_NO_SPRITE +001-2-43,29,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_8 NPC_NO_SPRITE +001-2-43,34,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_16 NPC_NO_SPRITE +001-2-43,38,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_32 NPC_NO_SPRITE +001-2-43,44,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_64 NPC_NO_SPRITE +001-2-43,48,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_128 NPC_NO_SPRITE +001-2-43,48,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_256 NPC_NO_SPRITE +001-2-43,43,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_512 NPC_NO_SPRITE +001-2-43,38,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_1024 NPC_NO_SPRITE +001-2-43,33,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_2048 NPC_NO_SPRITE +001-2-43,53,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_4096 NPC_NO_SPRITE +001-2-43,44,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_8192 NPC_NO_SPRITE +001-2-43,29,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_16384 NPC_NO_SPRITE +001-2-43,39,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_32768 NPC_NO_SPRITE +001-2-43,49,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_65536 NPC_NO_SPRITE +// Fail-safe; Henry's record should not be here +001-2-43,29,31,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_131072 NPC_NO_SPRITE +//001-2-43,24,26,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_262144 NPC_NO_SPRITE + + +// Logical Handler +001-2-43,0,0,0 script #ArtisThiefBook_0 NPC_HIDDEN,{ + end; +OnBust1: + if (getmap() != .map$) + end; + dispbottom col(l("90 seconds remaining."), 1); + addtimer 30000, "#ArtisThiefBook_0::OnBust2"; + end; + +OnBust2: + if (getmap() != .map$) + end; + dispbottom col(l("60 seconds remaining."), 1); + addtimer 30000, "#ArtisThiefBook_0::OnBust3"; + end; + +OnBust3: + if (getmap() != .map$) + end; + dispbottom col(l("30 seconds remaining."), 1); + addtimer 30000, "#ArtisThiefBook_0::OnBust4"; + end; + +OnBust4: + if (getmap() == .map$) { + if (ArrestedChances()) { + mesc l("Arrested!"); + mesc l("You'll now spend a few minutes on the jail to reflect on your actions."); + ArrestPlayer(5); + } else { + mesc l("You're almost found out, but manage to make a quick escape!"); + warp "001-1", 90, 55; + } + } + close; +} + diff --git a/npc/001-2-8/doors.txt b/npc/001-2-8/doors.txt index 9867ffd3..e1f47ef8 100644 --- a/npc/001-2-8/doors.txt +++ b/npc/001-2-8/doors.txt @@ -27,6 +27,7 @@ function breakIn { // Better to not use only a pine! if (LockPicking(2, 3, false)) { // TODO: Begin the catch timer (addtimer) + addtimer 30000, "#ArtisThiefBook_0::OnBust1"; warp "001-2-43", 27, 34; } else { if (ArrestedChances()) { diff --git a/npc/001-3-0/gates.txt b/npc/001-3-0/gates.txt index 7fc6d779..62bec61d 100644 --- a/npc/001-3-0/gates.txt +++ b/npc/001-3-0/gates.txt @@ -142,7 +142,8 @@ OnInit: end; OnTouch: - // FIXME + // FIXME: No enter except when q1 and q2 matches + addtimer 30000, "#ArtisThiefBook_0::OnBust1"; warp "001-2-43", 51, 34; end; } diff --git a/npc/001-3-2/henry.txt b/npc/001-3-2/henry.txt index c8d60ca1..e3d36e46 100644 --- a/npc/001-3-2/henry.txt +++ b/npc/001-3-2/henry.txt @@ -62,7 +62,7 @@ function proposeFirstQuest { if (askyesno() == ASK_YES) { mesn; mesq l("Great! Then I'll be counting on you!"); - setq1 ThiefQuests_Artis, 1; + setq ThiefQuests_Artis, 1, 0, 2**rand2(17)); } return; } @@ -103,11 +103,12 @@ function reportFirstQuest { rif(.@q == 2, l("There was no picture on the file.")); mes ""; if (@menu != 9) { - mesc l("%s lunges at you!", .name$); - mesc l("You've been stabbed!"); + mesc l("%s lunges at you!", strnpcinfo(1)); + mesc l("You've been stabbed!"), 1; + mes ""; mesn; mesq l("Now I know you're lying; Go find my file and deal with it!"); - percentheal -10, 0; + percentheal -15, 0; close; } else { // WUT How did this even happen?! |