From c7fd672bd4bab84f940f0b356ebc6a94115905b0 Mon Sep 17 00:00:00 2001 From: "Hello=)" Date: Wed, 19 Jun 2024 07:47:06 +0300 Subject: Fix for repeated suicides of caster when they try to attack target after they killed in rain by own lightning. Problem technically can be described like this: 1) Caster retains all spell charges upon death for lightnings. 2) It wouldn't be problem itself, but it would invoke OnAttack handler! 3) If caster dies in rain by own lightning, nothing clears "in rain" flag. 4) When they respawn and try to attack, OnAttack kicks in. 5) Since nothing has cleaned "in rain" flag, its still set. 6) At this point caster dies by own lightning again. 7) Worse, on respawn sequence would repeat itself. This happens regardless of rain and is very unexpected edge case. Workaround: caster can use #dicharge spell after respawn but its unobvious. --- world/map/npc/magic/level2-lightning-strike.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/magic/level2-lightning-strike.txt b/world/map/npc/magic/level2-lightning-strike.txt index bdd311a6..0a97dc63 100644 --- a/world/map/npc/magic/level2-lightning-strike.txt +++ b/world/map/npc/magic/level2-lightning-strike.txt @@ -30,12 +30,11 @@ OnAttack: if (target(BL_ID, @target_id, 0x36) != 0x36) goto L_FreeRecast; // 0x10 | 0x02 | 0x04 | 0x20 - set .@p, get(.max_radius, "rain") + 1; set @ingravspell[5], @target_id; // store it because foreach overwrites it foreach 1, getmap(), POS_X-.@p, POS_Y-.@p, POS_X+.@p, POS_Y+.@p, strnpcinfo(0)+"::OnNpc"; set @target_id, @ingravspell[5]; // now restore it - + if (@ingravspell[2] <= 0) overrideattack; // workaround for caster in rain death case set @ingravspell[2], @ingravspell[2] - 1; if (@ingravspell[4] & 1) goto L_InRain; void call("elt_damage", @ingravspell[0], (@ingravspell[0]/2)+1, ELT_EARTH, ELT_WIND, FX_LIGHTNING1 + rand(3)); @@ -49,6 +48,7 @@ L_FreeRecast: OnDischarge: if (@ingravspell[2] < 1) end; set @ingravspell[2], 0; + set @ingravspell[4], 0; // Clean up "in rain" flag, it caused funny bugs. misceffect FX_MAGIC_DISCHARGE, strcharinfo(0); overrideattack; end; -- cgit v1.2.3-70-g09d2 From 1b2f1abda4b3e7bb6733108c78a1a10d52820627 Mon Sep 17 00:00:00 2001 From: "Hello=)" Date: Fri, 28 Jun 2024 21:42:00 +0300 Subject: Re-enable summon spells in cities since AFK PK exploit should be fixed now --- world/map/npc/magic/event-summon-managuardian.txt | 1 - world/map/npc/magic/event-summon-manatyrant.txt | 1 - world/map/npc/magic/level1-summon-maggots.txt | 1 - world/map/npc/magic/level2-summon-fluffies.txt | 1 - world/map/npc/magic/level2-summon-mouboo.txt | 1 - world/map/npc/magic/level2-summon-pinkie.txt | 1 - world/map/npc/magic/level2-summon-snakes.txt | 1 - world/map/npc/magic/level2-summon-spiky-mushroom.txt | 1 - world/map/npc/magic/level2-summon-wickedmushroom.txt | 1 - 9 files changed, 9 deletions(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/magic/event-summon-managuardian.txt b/world/map/npc/magic/event-summon-managuardian.txt index e66c3eb7..1aa172ad 100644 --- a/world/map/npc/magic/event-summon-managuardian.txt +++ b/world/map/npc/magic/event-summon-managuardian.txt @@ -5,7 +5,6 @@ OnCast: if(call("magic_checks")) end; // FIXME: Incomplete check, should still work during sieges - if (getmapflag(getmap(), MF_TOWN)) end; if (Sp < 100) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (countitem("TinyManaElixir") < 1) end; diff --git a/world/map/npc/magic/event-summon-manatyrant.txt b/world/map/npc/magic/event-summon-manatyrant.txt index bf2634c5..ff082930 100644 --- a/world/map/npc/magic/event-summon-manatyrant.txt +++ b/world/map/npc/magic/event-summon-manatyrant.txt @@ -5,7 +5,6 @@ OnCast: if(call("magic_checks")) end; if ($DOOMSDAY_SUMMON < 2) end; - if (getmapflag(getmap(), MF_TOWN)) end; if (Sp < 100) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (countitem("LargeManaElixir") < 1) end; diff --git a/world/map/npc/magic/level1-summon-maggots.txt b/world/map/npc/magic/level1-summon-maggots.txt index 05cadbc8..ce95422c 100644 --- a/world/map/npc/magic/level1-summon-maggots.txt +++ b/world/map/npc/magic/level1-summon-maggots.txt @@ -5,7 +5,6 @@ OnCast: if(call("magic_checks")) end; if (Sp < 21) end; - if (getmapflag(getmap(), MF_TOWN)) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (countitem("InsectSlime") < 1 || countitem("Root") < 1) end; if (getmap() == "033-1") goto L_SpecialRules6; diff --git a/world/map/npc/magic/level2-summon-fluffies.txt b/world/map/npc/magic/level2-summon-fluffies.txt index f10a86b5..fef40a17 100644 --- a/world/map/npc/magic/level2-summon-fluffies.txt +++ b/world/map/npc/magic/level2-summon-fluffies.txt @@ -5,7 +5,6 @@ OnCast: if(call("magic_checks")) end; if (Sp < 39) end; - if (getmapflag(getmap(), MF_TOWN)) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (getskilllv(.school) < .level) end; if (countitem("WhiteFur") < 1 || countitem("Root") < 1) end; diff --git a/world/map/npc/magic/level2-summon-mouboo.txt b/world/map/npc/magic/level2-summon-mouboo.txt index c692e9cf..8a8603c6 100644 --- a/world/map/npc/magic/level2-summon-mouboo.txt +++ b/world/map/npc/magic/level2-summon-mouboo.txt @@ -5,7 +5,6 @@ OnCast: if(call("magic_checks")) end; if (Sp < 35) end; - if (getmapflag(getmap(), MF_TOWN)) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (getskilllv(.school) < .level) end; if (countitem("MoubooFigurine") < 1 || countitem("Root") < 1) end; diff --git a/world/map/npc/magic/level2-summon-pinkie.txt b/world/map/npc/magic/level2-summon-pinkie.txt index 61af9eed..b4774584 100644 --- a/world/map/npc/magic/level2-summon-pinkie.txt +++ b/world/map/npc/magic/level2-summon-pinkie.txt @@ -5,7 +5,6 @@ OnCast: if(call("magic_checks")) end; if (Sp < 35) end; - if (getmapflag(getmap(), MF_TOWN)) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (getskilllv(.school) < .level) end; if (countitem("PinkAntenna") < 1 || countitem("Root") < 1) end; diff --git a/world/map/npc/magic/level2-summon-snakes.txt b/world/map/npc/magic/level2-summon-snakes.txt index 0723961b..5815cef5 100644 --- a/world/map/npc/magic/level2-summon-snakes.txt +++ b/world/map/npc/magic/level2-summon-snakes.txt @@ -5,7 +5,6 @@ OnCast: if(call("magic_checks")) end; if (Sp < 40) end; - if (getmapflag(getmap(), MF_TOWN)) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (getskilllv(.school) < .level) end; if (countitem("DarkCrystal") < 1 || countitem("SnakeEgg") < 1) end; diff --git a/world/map/npc/magic/level2-summon-spiky-mushroom.txt b/world/map/npc/magic/level2-summon-spiky-mushroom.txt index 701648d5..0f884185 100644 --- a/world/map/npc/magic/level2-summon-spiky-mushroom.txt +++ b/world/map/npc/magic/level2-summon-spiky-mushroom.txt @@ -5,7 +5,6 @@ OnCast: if(call("magic_checks")) end; if (Sp < 33) end; - if (getmapflag(getmap(), MF_TOWN)) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (getskilllv(.school) < .level) end; if (countitem("HardSpike") < 1 || countitem("Root") < 1) end; diff --git a/world/map/npc/magic/level2-summon-wickedmushroom.txt b/world/map/npc/magic/level2-summon-wickedmushroom.txt index 014a5d80..7d0e93c1 100644 --- a/world/map/npc/magic/level2-summon-wickedmushroom.txt +++ b/world/map/npc/magic/level2-summon-wickedmushroom.txt @@ -5,7 +5,6 @@ OnCast: if(call("magic_checks")) end; if (Sp < 42) end; - if (getmapflag(getmap(), MF_TOWN)) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (getskilllv(.school) < .level) end; if (countitem("DarkCrystal") < 1 || countitem("SmallMushroom") < 1) end; -- cgit v1.2.3-70-g09d2 From 9bf6516e56f3c54cc10ccc6d7f051a81329e62dd Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Sat, 22 Jun 2024 17:16:43 +0200 Subject: upmarmu v6 full --- world/map/npc/functions/global_event_handler.txt | 2 +- world/map/npc/magic/level2-magic-knuckles.txt | 42 +++++++++++++----------- 2 files changed, 23 insertions(+), 21 deletions(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index d169f3c7..ef93435c 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -45,7 +45,7 @@ OnPCDieEvent: end; OnPCLogoutEvent: -// if (getnpcid("#Upmarmu#" + getcharid(3)) >= 1) addnpctimer 0, "#Upmarmu#" + getcharid(3) + "::OnDestroy"; // @upmarmu_spell_npc_name$ is already lost at this point so it must be done like this + if (getnpcid("#Upmarmu#" + getcharid(0)) >= 1) addnpctimer 0, "#Upmarmu#" + getcharid(0) + "::OnDestroy"; // @upmarmu_spell_npc_name$ is already lost at this point so it must be done like this callfunc "VaultLogout"; end; diff --git a/world/map/npc/magic/level2-magic-knuckles.txt b/world/map/npc/magic/level2-magic-knuckles.txt index a67941cf..d752aa11 100644 --- a/world/map/npc/magic/level2-magic-knuckles.txt +++ b/world/map/npc/magic/level2-magic-knuckles.txt @@ -1,18 +1,17 @@ -|script|magic-knuckles|32767 { if @_U_BLOCK >= 1 goto L_Still_Exhausted; -/* - set @upmarmu_spell_npc_name$, "#Upmarmu#" + getcharid(3); // make a unique puppet name for every player + + set @upmarmu_spell_npc_name$, "#Upmarmu#" + getcharid(0); // make a unique puppet name for every player set .upmarmu_spell_npc, getnpcid(@upmarmu_spell_npc_name$); if ( .upmarmu_spell_npc >= 1 ) goto L_NPC_Exists; // if this npc already exist reuse it so that idle recovery timer does not get destroyed set .upmarmu_spell_npc, puppet(getmap(), 0, 0, @upmarmu_spell_npc_name$, 127); // clone npc => get puppet id (npc 127 is invisible and can't be targeted) if (.upmarmu_spell_npc < 1) end; - set .caster, getcharid(3), .upmarmu_spell_npc; // tell the puppet who controls it + set .caster, getcharid(0), .upmarmu_spell_npc; // tell the puppet who controls it goto L_NPC_Exists; L_NPC_Exists: -*/ if (call("magic_checks")) end; if (Sp < 20) end; if (getskilllv(SKILL_MAGIC) < .level) end; @@ -49,35 +48,29 @@ OnAttack: if (target(BL_ID, @target_id, 22) != 22) goto L_FreeRecast; // 0x10 | 0x02 | 0x04 void call("elt_damage", @upmarmuspell[0], (@upmarmuspell[3] + @upmarmuspell[4]), ELT_WATER, ELT_FIRE, FX_NONE); -// addtimer 0, @upmarmu_spell_npc_name$ + "::OnResetTimer"; + addtimer 0, @upmarmu_spell_npc_name$ + "::OnResetTimer"; set @upmarmuspell[1], @upmarmuspell[1] - 1; + + if @num_upmarmu_hits >= UPMARMU_HITS_TILL_EXHAUST goto L_FreeRecast; set @num_upmarmu_hits, @num_upmarmu_hits + 1; + if @num_upmarmu_hits >= UPMARMU_HITS_TILL_EXHAUST set .exhausted, 1, .upmarmu_spell_npc; - if @num_upmarmu_hits >= UPMARMU_HITS_TILL_EXHAUST goto L_Exhausted; goto L_FreeRecast; L_FreeRecast: if (@upmarmuspell[1] > 0) addtimer 0, strnpcinfo(0) + "::OnSetRecast"; + else + addtimer 0, @upmarmu_spell_npc_name$ + "::OnExhausted"; end; -L_Exhausted: - set @_U_BLOCK, 1; - set @upmarmuspell[1], 0; - misceffect FX_MAGIC_DISCHARGE, strcharinfo(0); - overrideattack; - addtimer UPMARMU_EXHAUST_DURATION, "Upmarmu Exhaust Timer::OnClear"; // set the exhaustion time - sc_start SC_COOLDOWN_UPMARMU, UPMARMU_EXHAUST_DURATION, 0, BL_ID; - smsg SMSG_FAILURE, "Magic: You are too exhausted to use this spell for a while!"; - goto L_StopTimer; - L_Still_Exhausted: smsg SMSG_FAILURE, "Magic: You are still too exhausted to use this spell for a while!"; end; L_StopTimer: -// addtimer 0, @upmarmu_spell_npc_name$ + "::OnStopTimer"; + addtimer 0, @upmarmu_spell_npc_name$ + "::OnStopTimer"; end; OnDischarge: @@ -91,7 +84,6 @@ OnSetRecast: overrideattack (@upmarmuspell[2] * @upmarmuspell[2]), 1, ATTACK_ICON_GENERIC, OVERRIDE_KNUCKLES, strnpcinfo(0)+"::OnAttack", @upmarmuspell[1]; // delay needs to be squared end; -/* OnResetTimer: // This timer is if you stopped somewhere below max hits then after 25sec you recover fully and start at 0 hits again stopnpctimer; @@ -117,9 +109,20 @@ OnTimer25000: setnpctimer 0; end; +OnExhausted: + if (.exhausted < 1) end; + + set @_U_BLOCK, 1; + set @upmarmuspell[1], 0; + set @num_upmarmu_hits, 0; + set .exhausted, 0; + addtimer UPMARMU_EXHAUST_DURATION, "Upmarmu Exhaust Timer::OnClear"; // set the exhaustion time + sc_start SC_COOLDOWN_UPMARMU, UPMARMU_EXHAUST_DURATION, 0, BL_ID; + smsg SMSG_FAILURE, "Magic: You are too exhausted to use this spell for a while!"; + goto L_StopTimer; + OnDestroy: destroy; -*/ OnInit: set .school, SKILL_MAGIC_WAR; @@ -136,6 +139,5 @@ OnInit: OnClear: set @_U_BLOCK, 0; - set @num_upmarmu_hits, 0; end; } -- cgit v1.2.3-70-g09d2 From a5a76a68000fa0cce711c9a1502f0ac57aecc58b Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Mon, 24 Jun 2024 16:14:20 +0200 Subject: attachrid only supports acc id (getcharid(3)) --- world/map/npc/functions/global_event_handler.txt | 2 +- world/map/npc/magic/level2-magic-knuckles.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index ef93435c..5274fa05 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -45,7 +45,7 @@ OnPCDieEvent: end; OnPCLogoutEvent: - if (getnpcid("#Upmarmu#" + getcharid(0)) >= 1) addnpctimer 0, "#Upmarmu#" + getcharid(0) + "::OnDestroy"; // @upmarmu_spell_npc_name$ is already lost at this point so it must be done like this + if (getnpcid("#Upmarmu#" + getcharid(3)) >= 1) addnpctimer 0, "#Upmarmu#" + getcharid(3) + "::OnDestroy"; // @upmarmu_spell_npc_name$ is already lost at this point so it must be done like this callfunc "VaultLogout"; end; diff --git a/world/map/npc/magic/level2-magic-knuckles.txt b/world/map/npc/magic/level2-magic-knuckles.txt index d752aa11..92ee07a5 100644 --- a/world/map/npc/magic/level2-magic-knuckles.txt +++ b/world/map/npc/magic/level2-magic-knuckles.txt @@ -2,13 +2,13 @@ { if @_U_BLOCK >= 1 goto L_Still_Exhausted; - set @upmarmu_spell_npc_name$, "#Upmarmu#" + getcharid(0); // make a unique puppet name for every player + set @upmarmu_spell_npc_name$, "#Upmarmu#" + getcharid(3); // make a unique puppet name for every player set .upmarmu_spell_npc, getnpcid(@upmarmu_spell_npc_name$); if ( .upmarmu_spell_npc >= 1 ) goto L_NPC_Exists; // if this npc already exist reuse it so that idle recovery timer does not get destroyed set .upmarmu_spell_npc, puppet(getmap(), 0, 0, @upmarmu_spell_npc_name$, 127); // clone npc => get puppet id (npc 127 is invisible and can't be targeted) if (.upmarmu_spell_npc < 1) end; - set .caster, getcharid(0), .upmarmu_spell_npc; // tell the puppet who controls it + set .caster, getcharid(3), .upmarmu_spell_npc; // tell the puppet who controls it goto L_NPC_Exists; L_NPC_Exists: -- cgit v1.2.3-70-g09d2 From 359cd55d2191fc1a1054064dd729846920a0cc00 Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Sat, 22 Jun 2024 17:16:43 +0200 Subject: upmarmu v6 full --- world/map/npc/magic/level2-magic-knuckles.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/magic/level2-magic-knuckles.txt b/world/map/npc/magic/level2-magic-knuckles.txt index 92ee07a5..d813ee49 100644 --- a/world/map/npc/magic/level2-magic-knuckles.txt +++ b/world/map/npc/magic/level2-magic-knuckles.txt @@ -8,7 +8,7 @@ set .upmarmu_spell_npc, puppet(getmap(), 0, 0, @upmarmu_spell_npc_name$, 127); // clone npc => get puppet id (npc 127 is invisible and can't be targeted) if (.upmarmu_spell_npc < 1) end; - set .caster, getcharid(3), .upmarmu_spell_npc; // tell the puppet who controls it + set .caster, getcharid(0), .upmarmu_spell_npc; // tell the puppet who controls it goto L_NPC_Exists; L_NPC_Exists: -- cgit v1.2.3-70-g09d2 From 91c195026c58f23b304444395690e8f65b68f5ec Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Mon, 24 Jun 2024 16:14:20 +0200 Subject: attachrid only supports acc id (getcharid(3)) --- world/map/npc/magic/level2-magic-knuckles.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/magic/level2-magic-knuckles.txt b/world/map/npc/magic/level2-magic-knuckles.txt index d813ee49..92ee07a5 100644 --- a/world/map/npc/magic/level2-magic-knuckles.txt +++ b/world/map/npc/magic/level2-magic-knuckles.txt @@ -8,7 +8,7 @@ set .upmarmu_spell_npc, puppet(getmap(), 0, 0, @upmarmu_spell_npc_name$, 127); // clone npc => get puppet id (npc 127 is invisible and can't be targeted) if (.upmarmu_spell_npc < 1) end; - set .caster, getcharid(0), .upmarmu_spell_npc; // tell the puppet who controls it + set .caster, getcharid(3), .upmarmu_spell_npc; // tell the puppet who controls it goto L_NPC_Exists; L_NPC_Exists: -- cgit v1.2.3-70-g09d2 From af4c19d951734e88655672823674eb95ee36ef2e Mon Sep 17 00:00:00 2001 From: "Hello=)" Date: Tue, 6 Aug 2024 08:12:24 +0300 Subject: A bit more fun with rain. Idea courtesy of Wellvin. How this works: * If rain hits EntAbomination -> LogHead spawned. * If rain hits LogHead -> sometimes [Mauve,Alizarin,Gamboge,Cobalt]Plant could be spawned. * If $NO_RAIN_SPAWNS global variable set -> all spawns are completely disabled (this allows to revert to old logic without server restart if abused or bugs pop up) * If map gets too crowded by spawns spell would cease further spawns (limit set around 30, both spawned logheads and herbs count for this purpose) * Tested on my local, and all obvious bugs were hopefully sorted out. Reported-by: Wellvin --- world/map/npc/magic/level2-rain.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt index 6a7f288b..291af009 100644 --- a/world/map/npc/magic/level2-rain.txt +++ b/world/map/npc/magic/level2-rain.txt @@ -102,9 +102,18 @@ OnHit: if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map if(target(.caster, @target_id, 16) != 16 && .caster != @target_id) end; - if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc + if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc if(get(ELTTYPE, @target_id) == ELT_FIRE) injure .caster, @target_id, ((rand((@spellpower/15)+5)+2) * (100 - get(MDEF1, @target_id))) / 100; + if ($NO_RAIN_SPAWNS) end; // server-wide killswitch for rain pranks if spawns logic would backfire. + if (mobcount(getmap(), "rain::OnRainSpawnDeath") > 30) end; // Abort if too crowded. + if(get(Class, @target_id) == EntAbomination) // Rain hit Ent? This scores little perk! + monster getmap(), getnpcx(), getnpcy(), "", LogHead, 1+rand(1+(.max/150)), "rain::OnRainSpawnDeath"; + if((get(Class, @target_id) == LogHead) && (rand(5) == 3)) // Rain hit LogHead? Little perk as well (plants) + monster getmap(), getnpcx(), getnpcy(), "", MauvePlant+rand(5), 1, "rain::OnRainSpawnDeath"; + end; + +OnRainSpawnDeath: end; OnDestroy: -- cgit v1.2.3-70-g09d2 From d589ad4eca2c948d1ad2f325d6bb1d52ee17dc2d Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Wed, 7 Aug 2024 23:25:45 +0200 Subject: sc_phys_shield_item --- world/map/db/const.txt | 1 + world/map/db/item_db.conf | 4 ++-- world/map/db/item_db_use.txt | 2 +- world/map/npc/magic/level2-protect.txt | 5 +++++ 4 files changed, 9 insertions(+), 3 deletions(-) (limited to 'world/map/npc/magic') diff --git a/world/map/db/const.txt b/world/map/db/const.txt index 24556b39..2e1aef15 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -142,6 +142,7 @@ SC_SLOWMOVE 133 SC_CANTMOVE 134 SC_ATKPOT 185 SC_MATKPOT 186 +SC_PHYS_SHIELD_ITEM 193 SC_SHEARED 194 SC_HIDE 194 SC_HALT_REGENERATE 195 diff --git a/world/map/db/item_db.conf b/world/map/db/item_db.conf index 474abb90..56d61dd2 100644 --- a/world/map/db/item_db.conf +++ b/world/map/db/item_db.conf @@ -16219,10 +16219,10 @@ item_db: ( callfunc("SC_Bonus", 60, SC_PLUSATTACKPOWER, 50); callfunc("SC_Bonus", 60, SC_ATTHASTE_POTION1, 45); //callfunc("SC_Bonus", 60, SC_PHYS_SHIELD, 40); //@EVOL2 - //callfunc("SC_Bonus", 60000, SC_PHYS_SHIELD, 40); //@TMWA + //callfunc("SC_Bonus", 60000, SC_PHYS_SHIELD_ITEM, 40); //@TMWA + //sc_end SC_PHYS_SHIELD; //@TMWA //misceffect FX_MAGIC_SHIELD, strcharinfo(0); //@TMWA "> - // TODO: betsanc of Crazy Rum can be chanceled with detsanc so add SC_PHYS_SHIELD_ITEM to prevent this }, { Id: 5309 diff --git a/world/map/db/item_db_use.txt b/world/map/db/item_db_use.txt index 162d97ae..2a2afa8b 100644 --- a/world/map/db/item_db_use.txt +++ b/world/map/db/item_db_use.txt @@ -113,7 +113,7 @@ 5251, Tomato, 0, 100, 50, 7, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {heal 200, 5, 1;}, {} 5263, LovePotion, 0, 90000, 550, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {callfunc "LovePotion";}, {} //5277, XmasSeeds, 0, 9999, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 7, {heal 150, 0, 1;}, {} -5294, CrazyRum, 0, 40, 10, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {sc_start SC_POISON, 60000, 1; sc_start SC_ATKPOT, 60, 50; sc_start SC_SPEEDPOTION0, 60, 45; sc_start SC_PHYS_SHIELD, 60000, 40; misceffect FX_MAGIC_SHIELD, strcharinfo(0);},{} +5294, CrazyRum, 0, 40, 10, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {sc_start SC_POISON, 60000, 1; sc_start SC_ATKPOT, 60, 50; sc_start SC_SPEEDPOTION0, 60, 45; sc_start SC_PHYS_SHIELD_ITEM, 60000, 40; sc_end SC_PHYS_SHIELD; misceffect FX_MAGIC_SHIELD, strcharinfo(0);},{} 5309, ManaDust, 0, 125, 50, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {heal 35, 15, 1;}, {} 5310, EnlighteningElixir, 0, 500, 250, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {sc_start SC_MATKPOT, 60, 100;}, {} 5312, Honey, 0, 300, 150, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {heal 200, 50, 1;}, {} diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt index 7abc9a1a..4a642878 100644 --- a/world/map/npc/magic/level2-protect.txt +++ b/world/map/npc/magic/level2-protect.txt @@ -1,5 +1,6 @@ -|script|protect|32767 { + if (sc_check(SC_PHYS_SHIELD_ITEM)) goto L_Itsanc; // itsanc has top priority and cant be overwritten by betsanc if(call("magic_checks")) end; if (Sp < 14) end; set .@level, getskilllv(.school); @@ -44,6 +45,10 @@ OnEnd: misceffect FX_MAGIC_SHIELD_ENDS, strcharinfo(0); end; +L_Itsanc: + message strcharinfo(0), "Shield : You are still Itsanced this blocks your spell."; + end; + L_SpecialRules6: if ($@KIMARR_EVENT < 1) goto L_Pay; if (@target_id == BL_ID) goto L_Pay; -- cgit v1.2.3-70-g09d2 From a01cfaf7437652e79c3258aec08b4a3a776780bf Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Thu, 8 Aug 2024 00:42:04 +0200 Subject: text correction --- world/map/npc/magic/level2-protect.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt index 4a642878..87d010f8 100644 --- a/world/map/npc/magic/level2-protect.txt +++ b/world/map/npc/magic/level2-protect.txt @@ -46,7 +46,7 @@ OnEnd: end; L_Itsanc: - message strcharinfo(0), "Shield : You are still Itsanced this blocks your spell."; + message strcharinfo(0), "Shield : You are still itsanced, This blocks your spell."; end; L_SpecialRules6: -- cgit v1.2.3-70-g09d2 From 59aa2316201d785beee4abe7a4cfe6b87f53beb1 Mon Sep 17 00:00:00 2001 From: "Hello=)" Date: Sun, 18 Aug 2024 15:03:43 +0300 Subject: This restores GPs yield of #kularzunevelafrill. Ledmitz nerfed bone arrow price in one of previous commits: NPC -> player vending price: 50 GP -> 8 GP (nerf factor of 6.25) Player -> NPC selling price: 20GP -> 4 GP (nerf factor of 5) This commit re-scales yield of spell to restore GP output, roughly same as its been before nerf. Rescale factor choosen 5.333 which fits between of 5 and 6.25 nicely and convenient as it allows just minimal /32 -> /6 divisor change. As far as I experimented, yield remains roughly same, about 740 vs 756 GP. Slightly imperfect due to integer rounding, if this is a big deal I can use more complicated formulae. --- world/map/npc/magic/level2-make-bones.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/magic/level2-make-bones.txt b/world/map/npc/magic/level2-make-bones.txt index bc9bc6e5..b84cae6c 100644 --- a/world/map/npc/magic/level2-make-bones.txt +++ b/world/map/npc/magic/level2-make-bones.txt @@ -25,7 +25,7 @@ L_Resume: set CASTS, CASTS + 1; if (CASTS < 0) set CASTS, 1; // overflow misceffect FX_MAGIC_ARROW_CAST, strcharinfo(0); - setarray @create_params[0], (@spellpower/32)+1+(rand(max(1,(800-@spellpower)))/80), 500; + setarray @create_params[0], (@spellpower/6)+1+(rand(max(1,(800-@spellpower)))/80), 500; setarray @create_items$[0], "BoneArrows", "IronArrow"; callfunc "magic_create_item"; callfunc "magic_exp"; -- cgit v1.2.3-70-g09d2