From c733872ea010e47facfec2b915acd0873a611bf9 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 14 Feb 2021 16:09:49 -0300 Subject: Update PCBLOCK --- db/constants.conf | 4 +++- npc/001-8/hub.txt | 6 +++--- npc/003-1/quirino.txt | 2 +- npc/003-9/recepcionist.txt | 2 +- npc/003-9/scripted.txt | 2 +- npc/012-6/nurse.txt | 4 ++-- npc/014-4/kamelot.txt | 2 +- npc/015-8-1/campaign.txt | 8 ++++---- npc/018-2-2/main.txt | 4 ++-- npc/023-3-1/logic.txt | 4 ++-- npc/025-1/phoenix.txt | 8 ++++---- npc/025-2-4/tree.txt | 4 ++-- npc/025-2/guard.txt | 4 ++-- npc/042-2/boss.txt | 4 ++-- npc/functions/hub.txt | 4 ++-- npc/functions/mobpoint.txt | 2 +- 16 files changed, 33 insertions(+), 31 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 2321cecfc..c76c41092 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -2307,7 +2307,9 @@ constants_db: { comment__: "Configuration constants" MAX_CYCLE_PC: 40 CHEST_WAITTIME: 900 // 15 minutes - PVP_WAITTIME: 1800 // 30 minutes + PVP_WAITTIME: 1800 // 30 minutes + PCBLOCK_HARD: 255 // Move+Attack+Skill+Item+Chat+Immune+SitStand+Commands + PCBLOCK_SOFT: 47 // Move+Attack+Skill+Item+Immune BCONFN_SPAWN: 70 BCONFD_SPAWN: 100 BCONFN_MOBHP: 95 // TODO: Maybe we don't want this constant? (ie. variable) diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt index 6e19000d6..0b5aa5370 100644 --- a/npc/001-8/hub.txt +++ b/npc/001-8/hub.txt @@ -171,7 +171,7 @@ OnBegin: // Free player, let's start! delcells "qhubN"; delcells "qhubS"; - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false); + setpcblock(PCBLOCK_SOFT, false); specialeffect(FX_MGSHIELD, AREA, getcharid(3)); specialeffect(FX_CRITICAL, AREA, getcharid(3)); dispbottom col(l("Run! Event started!"), 1); @@ -344,7 +344,7 @@ OnPCLogoutEvent: // } Deal with the player { clearitem(); if (checkpcblock() & PCBLOCK_ATTACK) - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false); + setpcblock(PCBLOCK_SOFT, false); // Check if to reduce clearitem() efficiency you've used the cart in an illegal way. getcartinventorylist(); @@ -386,7 +386,7 @@ OnPCLogoutEvent: end; OnCancel: - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false); + setpcblock(PCBLOCK_SOFT, false); warp "Save", 0, 0; end; diff --git a/npc/003-1/quirino.txt b/npc/003-1/quirino.txt index 490320d66..4e14eae68 100644 --- a/npc/003-1/quirino.txt +++ b/npc/003-1/quirino.txt @@ -119,7 +119,7 @@ L_SignUp: warp "001-8", rand(42, 57), 57; // Prevent further movements! - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, true); + setpcblock(PCBLOCK_SOFT, true); //dispbottom l("Stay ready!"); dispbottom l("##1DON'T MOVE until the signal. Stay ready! If you move, you will desync client!"); close; diff --git a/npc/003-9/recepcionist.txt b/npc/003-9/recepcionist.txt index b21cedb15..cb6a81c47 100644 --- a/npc/003-9/recepcionist.txt +++ b/npc/003-9/recepcionist.txt @@ -52,7 +52,7 @@ L_Cutscene: instance_set_timeout(360, 360, .@inst); instance_init(.@inst); warp .@mapn$, 36, 47; - setpcblock(255, true); // FIXME: No commands?! Better add a new constant? + setpcblock(PCBLOCK_HARD, true); // NOTE: No commands?! I'm not sure... addtimer 1000, "#TulimInnStory::OnEvent1"; close; diff --git a/npc/003-9/scripted.txt b/npc/003-9/scripted.txt index 752775c93..f8ad67b10 100644 --- a/npc/003-9/scripted.txt +++ b/npc/003-9/scripted.txt @@ -159,7 +159,7 @@ OnEvent20: end; OnEvent21: - setpcblock(255, false); + setpcblock(PCBLOCK_HARD, false); dispbottom l("I better report this to Lua!"); LUA_ASKED_TO_SLEEP=false; end; diff --git a/npc/012-6/nurse.txt b/npc/012-6/nurse.txt index 9bad71509..b2d3dc310 100644 --- a/npc/012-6/nurse.txt +++ b/npc/012-6/nurse.txt @@ -59,7 +59,7 @@ L_BLCore: percentheal -90, 0; addtimer(180000, "Hurnscald's Nurse::OnDonationComplete"); slide 34, 29; - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, true); + setpcblock(PCBLOCK_SOFT, true); dispbottom l("Any movement/skill/item will be without effect until time is up."); closedialog; close; @@ -69,7 +69,7 @@ L_BLCore: OnDonationComplete: if (checkpcblock() & PCBLOCK_ATTACK) - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, false); + setpcblock(PCBLOCK_SOFT, false); slide 58, 67; percentheal 100, 0; getexp readparam(Hp)*2, readparam(Hp)/100; diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt index 0eb4f7045..9e5b1882f 100644 --- a/npc/014-4/kamelot.txt +++ b/npc/014-4/kamelot.txt @@ -210,7 +210,7 @@ OnDebug: warp .@t$, .@x[.@v], .@y[.@v]; if (!countitem(Lockpicks)) addtimer 700, .@n$+"::OnFirstSlime"; - setpcblock(255, false); + setpcblock(PCBLOCK_HARD, false); } else { unitwarp(getcharid(3), .@t$, .@x[.@v], .@y[.@v]); // And good luck D: debugmes "FATAL: Could not attach: %d", getcharid(3); diff --git a/npc/015-8-1/campaign.txt b/npc/015-8-1/campaign.txt index f2dd07478..57e2ad554 100644 --- a/npc/015-8-1/campaign.txt +++ b/npc/015-8-1/campaign.txt @@ -18,8 +18,8 @@ OnBegin: .@n$=instance_npcname(.name$); .PLAYERID=getcharid(3); - // 255 = PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_SITSTAND|PCBLOCK_IMMUNE|PCBLOCK_CHAT|PCBLOCK_MOVE - setpcblock(255, true); + // PCBLOCK_HARD = PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_SITSTAND|PCBLOCK_IMMUNE|PCBLOCK_CHAT|PCBLOCK_MOVE + setpcblock(PCBLOCK_HARD, true); setq3 HurnscaldQuest_Sagratha, 1; // Setup boss units @@ -90,8 +90,8 @@ OnS04: mapannounce(.@m$, "##1"+l("Defeat Conditions: Sagratha gets killed!"), 0); // Status cleanup - // 255 = PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_SITSTAND|PCBLOCK_IMMUNE|PCBLOCK_CHAT|PCBLOCK_MOVE - setpcblock(255, false); + // PCBLOCK_HARD = PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_SITSTAND|PCBLOCK_IMMUNE|PCBLOCK_CHAT|PCBLOCK_MOVE + setpcblock(PCBLOCK_HARD, false); // TODO: After x time, reinforcements on both sides // BOSS: “Kill 'em all!” // SAGGY: “Beings of florest, come to my aid and protect me!” diff --git a/npc/018-2-2/main.txt b/npc/018-2-2/main.txt index 49f3acfb3..58fd29869 100644 --- a/npc/018-2-2/main.txt +++ b/npc/018-2-2/main.txt @@ -25,13 +25,13 @@ OnFinish: getitem HeroCoin, @HH_LEVEL*3; getexp 4800-@HH_TIMER, @HH_LEVEL*20; deltimer("#HH_CONTROLLER01::OnPlayerCycle"); - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_IMMUNE, true); + setpcblock(PCBLOCK_SOFT, true); addtimer(4000, "#HH_CONTROLLER01::OnCompulsoryWarp"); //recovery(getcharid(3)); end; OnCompulsoryWarp: - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_IMMUNE, false); + setpcblock(PCBLOCK_SOFT, false); warp "018-2-1", 0, 0; end; diff --git a/npc/023-3-1/logic.txt b/npc/023-3-1/logic.txt index a4bba6acc..6715b8ca4 100644 --- a/npc/023-3-1/logic.txt +++ b/npc/023-3-1/logic.txt @@ -115,7 +115,7 @@ OnEvent01: .@g4=monster(.@m$, 51, 40, l("Assassin"), Assassin, 1, .name$+"::OnMobDie"); // Block everyone for cutscene (includes invencibility boost) - setpcblock(255, true); + setpcblock(PCBLOCK_HARD, true); sleep2(10); sc_start(SC_STUN, 7500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, @ISBAMUTH); sc_start(SC_STUN, 7500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .@g1); @@ -167,7 +167,7 @@ OnE06: .@m$=getmap(); .@n$=instance_npcname(.name$); - setpcblock(255, false); + setpcblock(PCBLOCK_HARD, false); unittalk(@ISBAMUTH, l("LET'S DANCE!")); mapannounce(.@m$, "##2"+l("Victory Conditions: Survive!"), 0); mapannounce(.@m$, "##1"+l("Defeat Conditions: Your death!"), 0); diff --git a/npc/025-1/phoenix.txt b/npc/025-1/phoenix.txt index 50bd08977..e820f2cb9 100644 --- a/npc/025-1/phoenix.txt +++ b/npc/025-1/phoenix.txt @@ -5,7 +5,7 @@ // Phoenix Rebirth 025-1,66,21,0 script Phoenix Rebirth NPC_BRGUARD_SPEAR,{ - setpcblock(255, true); + setpcblock(PCBLOCK_HARD, true); mesn; mesq l("Hello there. My name is %s.", .name$); next; @@ -38,7 +38,7 @@ if ($GAME_STORYLINE >= 4) break; default: - setpcblock(255, false); + setpcblock(PCBLOCK_HARD, false); mesc l("Unfortunately you cannot rebirth anymore!"); close; break; @@ -55,7 +55,7 @@ mes l("* +%d%% EXP Gain and Drop Chance, permanently", 10); mes l("* 1 %s", getitemlink(SupremeGift)); if (BaseLevel < .@blvl) { - setpcblock(255, false); + setpcblock(PCBLOCK_HARD, false); close; } next; @@ -63,7 +63,7 @@ mesq l("Are you interested? You'll keep %s your equipment, magic, quest progression, craft recipes, money, whatever else which is not a level. Not even Job level won't be reset!", b(l("ALL"))); mesc l("This cannot be undo later!"), 1; next; - setpcblock(255, false); + setpcblock(PCBLOCK_HARD, false); inventoryplace NPCEyes, 7; select l("Do not rebirth"), diff --git a/npc/025-2-4/tree.txt b/npc/025-2-4/tree.txt index 16d1ecb7f..bc6544889 100644 --- a/npc/025-2-4/tree.txt +++ b/npc/025-2-4/tree.txt @@ -5,14 +5,14 @@ // Pinkie Cave Tree is part of Legendary Weapons 025-2-4,39,33,0 script Mana Tree NPC_MANATREE,{ - setpcblock(255, true); + setpcblock(PCBLOCK_HARD, true); mesc l("A tree glows in this dark cave, surrounded by mana lanes."); next; mesc l("This might be the place of a great secret, but yet, all you can do is stare."); next; mesc l("...for now."); next; - setpcblock(255, false); + setpcblock(PCBLOCK_HARD, false); closeclientdialog; close; diff --git a/npc/025-2/guard.txt b/npc/025-2/guard.txt index 61dfd10aa..57a742cb4 100644 --- a/npc/025-2/guard.txt +++ b/npc/025-2/guard.txt @@ -9,7 +9,7 @@ if (.@q >= 21) goto L_ShortSummary; inventoryplace PurificationPotion, 3, ElixirOfLife, 1; - setpcblock(255, true); + setpcblock(PCBLOCK_HARD, true); mesc l("STORY MODE ENABLED. Monsters won't attack you, so you can read without worries."), 1; next; mesn; @@ -55,7 +55,7 @@ msObjective(false, l("* Find clues")); msObjective(false, l("* (optional) Save the world!")); next; - setpcblock(255, false); + setpcblock(PCBLOCK_HARD, false); setq General_Narrator, 21; getitem PurificationPotion, 3; getitem ElixirOfLife, 1; diff --git a/npc/042-2/boss.txt b/npc/042-2/boss.txt index 76546396b..524cdb99d 100644 --- a/npc/042-2/boss.txt +++ b/npc/042-2/boss.txt @@ -300,7 +300,7 @@ OnTimer1015000: warp .@t$, .@x[.@v], .@y[.@v]; if (!countitem(Lockpicks)) addtimer 700, .@n$+"::OnFirstSlime"; - setpcblock(255, false); + setpcblock(PCBLOCK_HARD, false); } else { unitwarp(.@unt[.@i], .@t$, .@x[.@v], .@y[.@v]); // And good luck D: debugmes "FATAL: Could not attach: %d", .@unt[.@i]; @@ -314,7 +314,7 @@ OnTimer1015000: OnReward: .@g=getcharid(2); if (.@g < 1) die(); - setpcblock(255, true); + setpcblock(PCBLOCK_HARD, true); getitem GuildCoin, min(1, $KAMELOT_MX[.@g]/25); getexp $KAMELOT_MX[.@g]*50, $KAMELOT_MX[.@g]*10; dispbottom l("Wait- Something is happening!"); diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index 5cfe99373..e478b3014 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -78,7 +78,7 @@ function script HUB_Logout { // Logout while donating blood if (getq(HurnscaldQuest_BloodDonor) == 2) { slide 35, 28; - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, false); + setpcblock(PCBLOCK_SOFT, false); setq HurnscaldQuest_BloodDonor, 0, gettimetick(2)+3600; // one hour penalty } // Logout/Death on Nard's ship hold @@ -194,7 +194,7 @@ function script HUB_Logout { .@trueid=getcharid(3); //detachrid(); attachrid(killerrid); - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS, true); + setpcblock(PCBLOCK_SOFT, true); sc_start SC_WALKSPEED,120000,50; sc_end SC_CASH_PLUSEXP; sc_end SC_OVERLAPEXPUP; diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt index 2ac276f43..15b3a65f3 100644 --- a/npc/functions/mobpoint.txt +++ b/npc/functions/mobpoint.txt @@ -48,7 +48,7 @@ function script mobpoint { OnUnlock: if (checkpcblock() & PCBLOCK_ATTACK) - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false); + setpcblock(PCBLOCK_HARD, false); end; OnNPCKillEvent: -- cgit v1.2.3-70-g09d2