diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-05-24 13:47:28 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-05-24 13:47:28 -0300 |
commit | 9c322449ade0d1952f6ca4dd73cc92413f61ca69 (patch) | |
tree | 1bff0731c4db0790ef57a2d524d739b1241ffa2c /npc/001-3-0 | |
parent | 9c649056dc45d39e88036bdb2bb373c477f8571f (diff) | |
parent | 255cf7c47f76a6e2f12fc809473ce513c294dfa4 (diff) | |
download | serverdata-jesusalva/inns.tar.gz serverdata-jesusalva/inns.tar.bz2 serverdata-jesusalva/inns.tar.xz serverdata-jesusalva/inns.zip |
Merge branch 'master' into jesusalva/innsjesusalva/inns
Diffstat (limited to 'npc/001-3-0')
-rw-r--r-- | npc/001-3-0/_warps.txt | 2 | ||||
-rw-r--r-- | npc/001-3-0/mundane.txt | 130 |
2 files changed, 73 insertions, 59 deletions
diff --git a/npc/001-3-0/_warps.txt b/npc/001-3-0/_warps.txt index 65b56ff5..d192e4ef 100644 --- a/npc/001-3-0/_warps.txt +++ b/npc/001-3-0/_warps.txt @@ -3,6 +3,6 @@ 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,61,0 warp #001-3-0_198_61 0,0,001-1,199,61 +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/mundane.txt b/npc/001-3-0/mundane.txt index b653fa0d..01cde3e8 100644 --- a/npc/001-3-0/mundane.txt +++ b/npc/001-3-0/mundane.txt @@ -37,8 +37,8 @@ function rescue_mundane { speech(S_LAST_NEXT, - l("Scary... I am afraid of these Slimes, Rattos and Maggots... And worse, I am lost..."), - l("I already killed many strong monsters, but everyone has fears, right?!"), + 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!"))) @@ -49,17 +49,13 @@ case 2: speech(S_FIRST_BLANK_LINE, l("That's too bad... Although I think you're lying."), - l("If it is the latter, please take some courage and help me!")); + 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); - //debugmes "You are "+str(.@ID); - - //if (@MUNDANE_INSTID < 0) debugmes "Error: No instance ID"; - //debugmes "new instance id: " + str(@MUNDANE_INSTID); // 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. @@ -74,32 +70,35 @@ if (.@instanceMapName$ == "") { speech(0x0, l("Wait... You are that @@ from earlier, aren't you?", strcharinfo(0)), - l("If my memory serves me right, you died just before. Why don't you go out to buy better equipment?")); + 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 Father's is right behind you. You have five minutes to bring him out of sewers!")); - - // Not sure if Green Slimes are exactly what we want here - and shouldn't it be "Slime"? (mind upper-case) - areamonster(.@MAP_NAME$, 119, 51, 162, 85, l("Green Slime"), slime, 3); - areamonster(.@MAP_NAME$, 190, 65, 193, 68, l("Ratto"), Ratto, 5); - areamonster(.@MAP_NAME$, 90, 67, 92, 72, l("Cave Maggot"), CaveMaggot, 3); - areamonster(.@MAP_NAME$, 99, 106, 102, 111, l("Green Slime"), slime, 3); - areamonster(.@MAP_NAME$, 115, 93, 115, 75, l("Green Slime"), slime, 3); - areamonster(.@MAP_NAME$, 120, 85, 7, 2, l("Little Green Slime"), slime-littleslime, 7); - areamonster(.@MAP_NAME$, 114, 65, 121, 68, l("Cave Maggot"), CaveMaggot, 5); - areamonster(.@MAP_NAME$, 137, 76, 130, 87, l("Spider"), Spider, 4); - areamonster(.@MAP_NAME$, 98, 92, 101, 94, l("Green Slime"), slime, 3); - setq ArtisQuests_MonaDad, 2; - warp(.@MAP_NAME$, 96,66); - addtimer(150, "Mundane::OnMove"); + 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); - // Important temporary variables - @MUNDANE_OLDX=96; - @MUNDANE_OLDY=66; + setq ArtisQuests_MonaDad, 2; + addtimer(150, instance_npcname(.name$, @MUNDANE_INSTID)+"::OnMove"); + updateSpotlight(true); close; } @@ -114,20 +113,6 @@ hello; end; -OnInit: - .sex = G_MALE; - .distance = 3; - end; - -/* -// If we are to use a fake-NPC (a monster which actually is a NPC, for example), -// We need to uncomment this code block. As we are moving the actual NPC, this is -// not needed (and harmful, too) -OnInstanceInit: - disablenpc(instance_npcname(.name$)); - 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.) @@ -143,23 +128,20 @@ OnMove: // 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, "Mundane::OnMove"); + addtimer(150, instance_npcname(.name$, @MUNDANE_INSTID)+"::OnMove"); end; } // movenpc() will cause NPC to "jump" to player position. - // npcwalkto(x, y) could be better, but there are concerns about instance NPC, - // and the server code behind this function would need to be changed to actually - // use NPC walking animation (instead of just sliding it around). - // - // Mind the note about instance_npcname and about ignoring your position - // We should in future at least figure out the right direction to display too - movenpc(instance_npcname(.name$, @MUNDANE_INSTID), @MUNDANE_OLDX, @MUNDANE_OLDY); + // 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. @@ -167,10 +149,46 @@ OnMove: @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, "Mundane::OnMove"); + addtimer(150, instance_npcname(.name$, @MUNDANE_INSTID)+"::OnMove"); + end; + +OnInit: + .sex = G_MALE; + .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; -OnPCDieEvent: +OnInstanceInit: + .speed = 140; // Double-sure + end; + +} + +function script MundaneLogout { + if (getq(ArtisQuests_MonaDad) != 2) end; + setq ArtisQuests_MonaDad, 1; + return; +} + +function script MundaneDeath { if (getq(ArtisQuests_MonaDad) != 2) end; setq ArtisQuests_MonaDad, 1; dispbottom l("What a pity! You've died."); @@ -179,15 +197,11 @@ OnPCDieEvent: // 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). - getmapxy(.@m$, .@x, .@y, 0); - if (.@m$ ~= "mona@*") { + // 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)); } - - // Uncommenting the code piece will warp you back to your savepoint. - // It's better to don't use this if the previous code works. - //recovery(); - //warp("Save",0,0); - end; + return; } |