From cf18ce071c79ae37e14ea38943e0b1d88da70a7b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 9 Apr 2021 13:33:57 -0300 Subject: Override --- npc/001-3-0/_import.txt | 6 -- npc/001-3-0/_mobs.txt | 39 --------- npc/001-3-0/_warps.txt | 8 -- npc/001-3-0/gates.txt | 201 ---------------------------------------------- npc/001-3-0/mundane.txt | 208 ------------------------------------------------ 5 files changed, 462 deletions(-) delete mode 100644 npc/001-3-0/_import.txt delete mode 100644 npc/001-3-0/_mobs.txt delete mode 100644 npc/001-3-0/_warps.txt delete mode 100644 npc/001-3-0/gates.txt delete mode 100644 npc/001-3-0/mundane.txt (limited to 'npc/001-3-0') diff --git a/npc/001-3-0/_import.txt b/npc/001-3-0/_import.txt deleted file mode 100644 index 502507be..00000000 --- a/npc/001-3-0/_import.txt +++ /dev/null @@ -1,6 +0,0 @@ -// Map 001-3-0: Sewer -// This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/001-3-0/_mobs.txt", -"npc/001-3-0/_warps.txt", -"npc/001-3-0/gates.txt", -"npc/001-3-0/mundane.txt", diff --git a/npc/001-3-0/_mobs.txt b/npc/001-3-0/_mobs.txt deleted file mode 100644 index 49443d5a..00000000 --- a/npc/001-3-0/_mobs.txt +++ /dev/null @@ -1,39 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-3-0: Sewer mobs -001-3-0,175,32,2,2 monster Ratto 1005,2,60000,30000 -001-3-0,201,54,2,2 monster Ratto 1005,3,25000,10000 -001-3-0,151,97,18,1 monster Ratto 1005,3,40000,15000 -001-3-0,101,111,8,3 monster Ratto 1005,4,30000,15000 -001-3-0,145,68,2,2 monster Ratto 1005,2,60000,30000 -001-3-0,146,28,2,1 monster Ratto 1005,2,60000,30000 -001-3-0,89,66,2,4 monster Ratto 1005,3,35000,15000 -001-3-0,56,50,8,4 monster Ratto 1005,4,35000,15000 -001-3-0,42,102,3,3 monster Ratto 1005,3,40000,20000 -001-3-0,157,80,2,2 monster Green Slime 1024,3,15000,80000 -001-3-0,190,58,3,19 monster Cave Maggot 1027,7,5000,15000 -001-3-0,172,46,1,2 monster Cave Maggot 1027,3,5000,15000 -001-3-0,175,50,0,4 monster Ratto 1005,2,60000,30000 -001-3-0,175,64,3,2 monster Cave Maggot 1027,4,5000,15000 -001-3-0,104,75,48,43 monster Cave Maggot 1027,25,500,2000 -001-3-0,90,68,1,6 monster Cave Maggot 1027,3,500,2000 -001-3-0,128,86,3,5 monster Green Slime 1024,3,500,2000 -001-3-0,42,103,3,5 monster Green Slime 1024,3,500,2000 -001-3-0,120,85,7,2 monster Little Green Slime 1025,2,500,2000 -001-3-0,147,122,3,5 monster Green Slime 1024,2,500,2000 -001-3-0,147,122,3,5 monster Green Slime 1024,2,500,2000 -001-3-0,107,109,4,2 monster Green Slime 1024,3,500,2000 -001-3-0,139,32,10,4 monster Little Green Slime 1025,2,500,2000 -001-3-0,86,131,4,2 monster Little Green Slime 1025,3,500,2000 -001-3-0,175,31,4,2 monster Little Green Slime 1025,2,500,2000 -001-3-0,147,67,4,2 monster Little Green Slime 1025,2,500,2000 -001-3-0,55,50,5,3 monster Giant Maggot 1076,1,25000,20000,Henry#001-3-2::OnGiantMaggot -001-3-0,117,60,5,0 monster Cave Maggot 1027,25,500,2000 -001-3-0,156,43,5,2 monster Crafty 1018,3,12000,20000 -001-3-0,178,76,5,1 monster Crafty 1018,3,12000,20000 -001-3-0,86,97,5,1 monster Crafty 1018,3,12000,20000 -001-3-0,86,48,5,1 monster Crafty 1018,3,12000,20000 -001-3-0,61,104,5,0 monster Tortuga 1004,1,35000,300000 -001-3-0,54,85,5,0 monster Tortuga 1004,1,35000,300000 -001-3-0,114,62,5,0 monster Tortuga 1004,1,35000,300000 -001-3-0,167,100,6,1 monster Tortuga 1004,1,35000,300000 -001-3-0,41,104,2,3 monster Giant Maggot 1076,1,15000,15000,Henry#001-3-2::OnGiantMaggot diff --git a/npc/001-3-0/_warps.txt b/npc/001-3-0/_warps.txt deleted file mode 100644 index d192e4ef..00000000 --- a/npc/001-3-0/_warps.txt +++ /dev/null @@ -1,8 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-3-0: Sewer warps -001-3-0,196,35,0 warp #001-3-0_196_35 0,0,001-1,197,35 -001-3-0,172,41,0 warp #001-3-0_172_41 0,0,001-3-1,34,58 -001-3-0,162,40,0 warp #001-3-0_162_40 0,0,001-3-1,23,57 -001-3-0,198,60,0 warp #001-3-0_198_60 0,0,001-1,199,61 -001-3-0,152,55,0 warp #001-3-0_152_55 0,0,001-1,152,51 -001-3-0,85,130,0 warp #001-3-0_85_130 0,0,001-1,86,130 diff --git a/npc/001-3-0/gates.txt b/npc/001-3-0/gates.txt deleted file mode 100644 index e8accc96..00000000 --- a/npc/001-3-0/gates.txt +++ /dev/null @@ -1,201 +0,0 @@ -// Evol scripts. -// Author: -// Micksha -// Description: -// The Sewer Gates, and Wheels. - -001-3-0,90,62,0 script #ArtisThiefGate_1 NPC_SEWER_GATE,0,0,{ - // Extract the quest ID from name (or fail trying) - explode(.@ni$, .name$, "_"); - .@id=atoi(.@ni$[1]); - - .@q=getq(ThiefQuests_Artis); - .@q2=getq2(ThiefQuests_Artis); - - // Check what you can do with the gate - if (.@q != .@id) { - mes l("This gate is closed."); - mesc l("No need to go through here, so lets not bother with it now."); - } else if (.@q2 != 2) { - mes l("This gate is closed."); - mesc l("It seems that it can be open using the mechanism on the side."); - } else { - mes l("This gate is open."); - mesc l("I should still be careful to don't get caught."); - } - close; - -OnTouch: - updateSpotlight(true); - end; - -OnOpenSesame: - // Opening - if (!.busy) { - .dir=2; - .busy=true; - initnpctimer; - } - end; - -// Open -OnTimer2200: - .dir=4; - end; - -// Closing -OnTimer8000: - .dir=6; - end; - -// Closed -OnTimer10400: - .dir=0; - end; - -// Don't reply immediately, wait a tiny bit -OnTimer11000: - .busy = false; - stopnpctimer; - -OnInit: - .busy = false; - .distance = 1; - end; -} - - - -001-3-0,92,61,0 script #ArtisThiefWheel_1 NPC_SEWER_WHEEL,{ - // Extract the quest ID from name (or fail trying) - explode(.@ni$, .name$, "_"); - .@id=atoi(.@ni$[1]); - - .@q=getq(ThiefQuests_Artis); - .@q2=getq2(ThiefQuests_Artis); - - if (.@q != .@id) { - speech - l("This wheel seems to be connected to the locked gate on the side."), - l("Having to reason to tinker with it, you don't."); - close; - } - speech - l("You try to move this wheel, but it is stuck. Something seems to be missing."), - l("Maybe some monster ate it, but what would be big enough to do that?!"); - - // Switch gearwheel status: 1(looted) 2(unlooted) - switch (.@q2) { - case 1: - // Looted but lost? D: - if (!countitem(Gearwheel)) { - mesc l("If we only had a %s.", getitemlink(Gearwheel)); - close; - } - - // Prompt player - mesc l("Should we install the %s and move it?", getitemlink(Gearwheel)), 1; - if (askyesno() == ASK_NO) - break; - - delitem Gearwheel, 1; - setq2 ThiefQuests_Artis, 2; - // FALLTHROUGH - case 2: - mesc l("With the %s in place, it only takes a bit more effort to make it budge.", getitemlink(Gearwheel)); - next; - closeclientdialog; - // Spin the wheel - if (!.busy) { - .dir = 4; - .busy = true; - initnpctimer; - } - // Open the gate - addtimer 500, "#ArtisThiefGate_"+.@id+"::OnOpenSesame"; - break; - default: - } - close; - -// Done spinning? -OnTimer4000: - .dir = 0; - .busy = false; - stopnpctimer; - -OnInit: - .busy = false; - .distance = 2; - end; -} - - - -// We're missing a gate! -001-3-0,56,44,0 duplicate(#ArtisThiefGate_1) #ArtisThiefGate_4 NPC_SEWER_GATE,2,2 -001-3-0,58,43,0 duplicate(#ArtisThiefWheel_1) #ArtisThiefWheel_4 NPC_SEWER_WHEEL - - -/////////////////////////// -// The controlled warps -001-3-0,90,61,0 script #001-3-0_90_61 NPC_HIDDEN,0,0,{ - end; - -OnTouch: - // No enter except when q1 and q2 matches - .@q=getq(ThiefQuests_Artis); - .@q2=getq2(ThiefQuests_Artis); - if (.@q != 1 || .@q2 != 2) - end; - - // Delete previous timers. Makes easier to cheat but more reliable (FIXME) - deltimer("#ArtisThiefBook_0::OnBust1"); - deltimer("#ArtisThiefBook_0::OnBust2"); - deltimer("#ArtisThiefBook_0::OnBust3"); - deltimer("#ArtisThiefBook_0::OnBust4"); - - // Archives: Begin - addtimer 30000, "#ArtisThiefBook_0::OnBust1"; - warp "001-2-43", 51, 34; - end; -} - -001-3-0,56,43,0 script #001-3-0_56_43 NPC_HIDDEN,0,0,{ - end; - -OnTouch: - // No enter except when quest state allows you to - // I thought in letting you use this passage and get busted anytime... - // ...........Better not. Animation will not like it, anyway. - .@q=getq(ThiefQuests_Artis); - .@q2=getq2(ThiefQuests_Artis); - if (.@q != 4 || .@q2 != 2) - end; - - warp "001-2-40", 56, 40; - addtimer2(rand2(3000, 7000), .name$+"::OnBusted"); - end; - -// Henry said to you don't use the gate, because you are not discrete enough. -// Poor player, this is what happens for not paying attention to Henry's advise. -OnBusted: - if (getmap() != "001-2-40") - end; - - mesn l("Legion Officer"); - mes l("HEY! How you got here!?"); - next; - // Check if you'll be caught - 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", 41, 36; - } - close; -} - - diff --git a/npc/001-3-0/mundane.txt b/npc/001-3-0/mundane.txt deleted file mode 100644 index 58a47cb2..00000000 --- a/npc/001-3-0/mundane.txt +++ /dev/null @@ -1,208 +0,0 @@ -// Evol Scripts -// Author: -// Jesusalva -// Description: -// Mundane (anagram of Unnamed) is Mona's father -// He likes to smoke cigarettes while looking for the strange sounds. -// He is an old bowman of the Legion. He was married but it is not clear -// what happened to his wife. -// Lore Problems: -// If he is missing for a week already, how is he eating anyway? -// Also, is he afraid of blubs/rattos or of Green Slimes? - -// Note: Jesusalva is not someone to care a lot with code styling, and he uses -// a convention of his own, gumi will need to cleanse the code before it gets -// compliant with Evol Coding Style Guidelines. -// Note 2: Logout is not handled. Making logout at an instanced map may randomly -// warp you back to Drasil Island (000-1) or something like that. I don't know. -// This behavior remains to be checked. - -001-3-0,96,66,0 script Mundane NPC_MUNDANE,{ - - function quest_completed - { - speech(0x0, - l("No matter how many times I come here, I can't find the reason for the strange sounds..."), - l("It is either a huge monster, some cultists, or someone throwing strange stuff into sewers.")); - close; - } - - function quest_inprogress - { - speech(0x0, - l("We need to get out of here soon. I'm scared of the Slimes!")); - close; - } - - function rescue_mundane - { - speech(S_LAST_NEXT, - l("Scary... I am afraid of all these Slimes, Rattos and Maggots... And worse, I am lost..."), - l("I was an archer of the Legion and shouldn't be scared of a few maggots, but everyone has fears, right?!"), - l("My daughter is probably worried about me. Could you perhaps lead me out of here?")); - - switch (select(l("Yes, follow me!"), l("Not now. You see, I am also afraid of Slimes and Rattos!"))) - { - case 1: - mes ""; - break; - case 2: - speech(S_FIRST_BLANK_LINE, - l("That's too bad... Although I think you're lying."), - l("If so, please take some courage and help me!")); - close; - break; - } - .@ID=getcharid(0); - .@MAP_NAME$="mona@"+str(.@ID); - @MUNDANE_INSTID = instance_create("001-3-0@a"+(.@ID), getcharid(3), IOT_CHAR); - - // XXX - Important Note - XXX - // We currently have only FOUR chars to name the map. "001-3-0" or "mundane" have 7 chars, so that cannot be used. - // Thankfully, "mona" have 4 chars, so it's the name. - // - // Rationale: We have only 11 chars available, but 7 are reserved. So, longest name would be "abcd" + "@" + getcharid(0) - // Some test reported that (apparently) we have 15 whitespaces at map name start, not sure why. - .@instanceMapName$ = instance_attachmap("001-3-0", @MUNDANE_INSTID, 0, .@MAP_NAME$); - - // This can be a bug, but most likely is because instance already exists. - // I don't know what would happen if we continue, so let's "penalize" the player - if (.@instanceMapName$ == "") { - speech(0x0, - l("Wait... You are that @@ from earlier, aren't you?", strcharinfo(0)), - l("If my memory serves me right, you were just defeated. Why don't you go out to buy better equipment?")); - close; - } - - // You have 5 minutes to complete the quest. This does not results in failure by itself, getq2 does that - instance_set_timeout(300, 300, @MUNDANE_INSTID); - instance_init(@MUNDANE_INSTID); - dispbottom(l("Mona's father is right behind you. You have five minutes to bring him out of sewers!")); - - // Note: Difficulty is based on your level - .@BLVLBOOST=BaseLevel/10; - areamonster(.@MAP_NAME$, 119, 51, 162, 85, strmobinfo(1, Slime), Slime, 3+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 190, 65, 193, 68, strmobinfo(1, Ratto), Ratto, 5); - areamonster(.@MAP_NAME$, 90, 67, 92, 72, strmobinfo(1, CaveMaggot), CaveMaggot, 3+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 99, 106, 102, 111, strmobinfo(1, Slime), Slime, 3+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 115, 93, 115, 75, strmobinfo(1, Slime), Slime, 3+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 120, 85, 7, 2, strmobinfo(1, LittleSlime), LittleSlime, 7+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 114, 65, 121, 68, strmobinfo(1, CaveMaggot), CaveMaggot, 5+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 137, 76, 130, 87, strmobinfo(1, Spider), Spider, 4+.@BLVLBOOST); - areamonster(.@MAP_NAME$, 98, 92, 101, 94, strmobinfo(1, Slime), Slime, 3+.@BLVLBOOST); - - // Important temporary variables and move you accordingly - @MUNDANE_OLDX=.x; - @MUNDANE_OLDY=.y; - warp(.@MAP_NAME$, .x, .y); - // Move NPC as well - unitwarp(getnpcid(instance_npcname(.name$, @MUNDANE_INSTID)), .@MAP_NAME$, .x, .y); - - setq ArtisQuests_MonaDad, 2; - addtimer(150, instance_npcname(.name$, @MUNDANE_INSTID)+"::OnMove"); - updateSpotlight(true); - close; - - } - - .@q=getq(ArtisQuests_MonaDad); - if (.@q >= 3) quest_completed(); - if (.@q == 2) quest_inprogress(); - if (.@q == 1) rescue_mundane(); - // Impossible situation, but let's not trust this. You must talk to Mona first! - if (.@q == 0) quest_completed(); - - hello; - end; - -// This functions serves two major purposes: -// 1- Move Mundane accordingly -// 2- Be able to determine if you brought Mundane to exit or cheat (warp, etc.) -// NOTE: Using instance_npcname(.name$) can be unreliable at times. -// It should work with addtimer(), but if it breaks, move @MUNDANE_INSTID to -// the @ varspace, and use instance_npcname(.name$, @MUNDANE_INSTID) -// That'll fix any problem when playtesting. -OnMove: - getmapxy(.@m$, .@x, .@y, 0); - // You left the map, we don't need to move NPC anymore - if (!(.@m$ ~= "mona@*") && (.@m$ != "001-3-0")) { - disablenpc(instance_npcname(.name$, @MUNDANE_INSTID)); - // This check shouldn't be needed but better safe than sorry - if (.@m$ == "001-1") - dispbottom l("Mundane ran straight home. He must be missing his daughter."); - else - dispbottom l("Mundane ran away, he did not trust the path you chose."); - end; - } - // We actually won't move the NPC to your position, but to where you were last. - // The NPC should not walk right in you because I thought it looks weird ingame. - if (.@x == @MUNDANE_OLDX && .@y == @MUNDANE_OLDY) { - addtimer(150, instance_npcname(.name$, @MUNDANE_INSTID)+"::OnMove"); - end; - } - - // movenpc() will cause NPC to "jump" to player position. - // npcwalkto(x, y) will make it walk to your position. - npcwalkto @MUNDANE_OLDX, @MUNDANE_OLDY; - - // We now update the misleading @MUNDANE_OLD* variable with your current - // position. - @MUNDANE_OLDX=.@x; - @MUNDANE_OLDY=.@y; - // We must handle this every 150ms or so, which is player walk delay. - // When you leave the map this timer will die. - addtimer(150, instance_npcname(.name$, @MUNDANE_INSTID)+"::OnMove"); - end; - -OnInit: - .distance = 3; - .speed = 140; - -// Move Mundane every Sunday, Wednesday, and Friday -// to be less repetitive, and save also where it is -OnSun0000: -OnWed0000: -OnFri0000: - if (.begin) - delcells "MundaneProtection"; - - // Micksha may tweak this. - setarray .@valid_x, 96, 132, 150, 49; - setarray .@valid_y, 66, 86, 118, 47; - .@index=rand(0,getarraysize(.@valid_x)-1); - movenpc .name$, .@valid_x[.@index], .@valid_y[.@index]; - - // Create a 3x3 monster collision block over Mundane - setcells .map$, .x-3, .y-3, .x+3, .y+3, 6, "MundaneProtection"; - .begin=true; - end; - -OnInstanceInit: - .speed = 140; // Double-sure - end; - -} - -function script MundaneLogout { - if (getq(ArtisQuests_MonaDad) != 2) return; - setq ArtisQuests_MonaDad, 1; - return; -} - -function script MundaneDeath { - if (getq(ArtisQuests_MonaDad) != 2) return; - setq ArtisQuests_MonaDad, 1; - dispbottom l("What a pity! You've died."); - - // We must disable Mona's Dad NPC sprite if you are still on the map - // This will cause the NPC to "vanish", player is left to guess that he ran - // back to where he originally was. - // (ie. The NPC won't be fine without you if we have code to handle that). - // NOTE: Maybe we could send the NPC running back to his original position? - // For future thought and testing by anyone interested. - if (strpos(getmap(), "mona@") >= 0) { - disablenpc(instance_npcname(.name$, @MUNDANE_INSTID)); - } - return; -} - -- cgit v1.2.3-60-g2f50