diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-07-29 20:30:21 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-07-29 20:30:21 -0300 |
commit | 8957483e7196d21db0fb6257fedbea01b59cf53b (patch) | |
tree | 0b7443a54ec60a42f1b0373f2374d8e3b453bbcb | |
parent | abfaf3520d1c4143fa3e9ed9de53a9f3314455ec (diff) | |
download | serverdata-stable.tar.gz serverdata-stable.tar.bz2 serverdata-stable.tar.xz serverdata-stable.zip |
Fix minor issuesstable
-rw-r--r-- | db/constants.conf | 21 | ||||
-rw-r--r-- | npc/functions/default_npc_checks.txt | 10 | ||||
-rw-r--r-- | npc/functions/ghost.txt | 4 | ||||
-rw-r--r-- | npc/functions/inn.txt | 3 | ||||
-rw-r--r-- | npc/scripts.conf | 1 |
5 files changed, 31 insertions, 8 deletions
diff --git a/db/constants.conf b/db/constants.conf index 43b4ec54..21bfd5f3 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -141,6 +141,27 @@ more than one separator can be used in a row (so 12_3___456 is illegal). bc_blue: 16 bc_woe: 32 + comment__: "Monster Modes" + MD_NONE: 0 + MD_CANMOVE: 1 + MD_LOOTER: 2 + MD_AGGRESSIVE: 4 + MD_ASSIST: 8 + MD_CASTSENSOR_IDLE: 16 + MD_BOSS: 32 + MD_PLANT: 64 + MD_CANATTACK: 128 + MD_DETECTOR: 256 + MD_CASTSENSOR_CHASE: 512 + MD_CHANGECHASE: 1024 + MD_ANGRY: 2048 + MD_CHANGETARGET_MELEE: 4096 + MD_CHANGETARGET_CHASE: 8192 + MD_TARGETWEAK: 16384 + MD_NOKNOCKBACK: 32768 + MD_RANDOMTARGET: 65536 + //MD_MASK: 0 + comment__: "Mapflags" mf_nomemo: 0 mf_noteleport: 1 diff --git a/npc/functions/default_npc_checks.txt b/npc/functions/default_npc_checks.txt index ee12bc49..c8dbec47 100644 --- a/npc/functions/default_npc_checks.txt +++ b/npc/functions/default_npc_checks.txt @@ -1,14 +1,13 @@ function script PCtoNPCRange { @npc_check = 0; - if(!@npc_distance) set @npc_distance, 4; // <== default distance - if(@npc_distance < 0) set @npc_distance, ATTACKRANGE; + if(!@npc_distance) set @npc_distance, getarg(0, 4); // <== default distance + if(@npc_distance < 0) set @npc_distance, readparam2(UDT_ATKRANGE); .@x=getvariableofnpc(.x, strnpcinfo(0)); .@y=getvariableofnpc(.y, strnpcinfo(0)); if (isin(getmap(), .@x, .@y, @npc_distance)) goto L_Return; @npc_check = 1; - if(@distance_handler) goto L_Return; @dnpc_name$ = strnpcinfo(1); if(@dnpc_name$ != "") goto L_Named; message strcharinfo(0), "Server : ##BYou need to move closer to interact with this npc."; @@ -20,8 +19,11 @@ L_Named: L_Return: @dnpc_name$ = ""; - @distance_handler = 0; @npc_distance = 0; + if (@npc_check) { + @npc_check = 0; + end; + } return; } diff --git a/npc/functions/ghost.txt b/npc/functions/ghost.txt index 1325525b..3e1a9724 100644 --- a/npc/functions/ghost.txt +++ b/npc/functions/ghost.txt @@ -13,8 +13,8 @@ function script SpawnGhost { return; L_Spawn: - .@x = POS_X; - .@y = POS_Y; + .@x = getx(); + .@y = gety(); if (!(iscollision(getmapname(), .@x, .@y - 1))) set .@y, .@y - 1; // up else if (!(iscollision(getmapname(), .@x, .@y + 1))) set .@y, .@y + 1; // down diff --git a/npc/functions/inn.txt b/npc/functions/inn.txt index 50f1afd6..82204f4b 100644 --- a/npc/functions/inn.txt +++ b/npc/functions/inn.txt @@ -1,6 +1,7 @@ function script Inn { - if(@npcname$ == "") set @npcname$, strnpcinfo(1); + if (@Cost < 1) @Cost = getarg(0, 1000); + if (@npcname$ == "") set @npcname$, strnpcinfo(1); mes "[" + @npcname$ + "]"; mes "\"Would you like to rest? It's only " + @Cost + " gp.\""; next; diff --git a/npc/scripts.conf b/npc/scripts.conf index ee4481cd..df258287 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -37,7 +37,6 @@ "npc/functions/process_equip.txt", "npc/functions/slot_machine.txt", "npc/functions/soul_menhir.txt", -"npc/functions/time.txt", "npc/functions/water_bottle.txt", "npc/functions/evil_obelisk.txt", "npc/functions/lockpicking.txt", |