Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(content): random events shouldnt reaggro the player #1450

Merged
merged 2 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions data/src/scripts/macro events/configs/antimacro.npc
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ model1=model_2856_npc
// https://youtu.be/pA_CIZNH04E?list=PLn23LiLYLb1Y3P9S9qZbijcJihiD416jT&t=96
wanderrange=3
maxrange=5
timer=10
timer=20
hitpoints=25
attack=9
strength=9
Expand Down Expand Up @@ -1104,7 +1104,7 @@ recol4d=480
model1=model_2856_npc
wanderrange=3
maxrange=5
timer=10
timer=20
hitpoints=40
attack=22
strength=22
Expand Down Expand Up @@ -1139,7 +1139,7 @@ recol4d=480
model1=model_2856_npc
wanderrange=3
maxrange=5
timer=10
timer=20
hitpoints=60
attack=38
strength=38
Expand Down Expand Up @@ -1174,7 +1174,7 @@ recol4d=480
model1=model_2856_npc
wanderrange=3
maxrange=5
timer=10
timer=20
hitpoints=85
attack=65
strength=65
Expand Down Expand Up @@ -1209,7 +1209,7 @@ recol4d=480
model1=model_2856_npc
wanderrange=3
maxrange=5
timer=10
timer=20
hitpoints=120
attack=100
strength=100
Expand Down Expand Up @@ -1244,7 +1244,7 @@ recol4d=480
model1=model_2856_npc
wanderrange=3
maxrange=5
timer=10
timer=20
hitpoints=170
attack=130
strength=130
Expand Down Expand Up @@ -1499,7 +1499,7 @@ attack=9
strength=9
defence=9
// https://youtu.be/4sXuqebe18k?list=PLn23LiLYLb1am4weMQzkWn5m9b3m9fXv9&t=16
timer=10
timer=20
param=damagetype,^crush_style
param=attack_anim,troll_attack
param=defend_anim,troll_block
Expand Down Expand Up @@ -1531,7 +1531,7 @@ hitpoints=40
attack=22
strength=22
defence=22
timer=10
timer=20
param=damagetype,^crush_style
param=attack_anim,troll_attack
param=defend_anim,troll_block
Expand Down Expand Up @@ -1563,7 +1563,7 @@ hitpoints=60
attack=38
strength=38
defence=38
timer=10
timer=20
param=damagetype,^crush_style
param=attack_anim,troll_attack
param=defend_anim,troll_block
Expand Down Expand Up @@ -1595,7 +1595,7 @@ hitpoints=85
attack=65
strength=65
defence=65
timer=10
timer=20
param=damagetype,^crush_style
param=attack_anim,troll_attack
param=defend_anim,troll_block
Expand Down Expand Up @@ -1627,7 +1627,7 @@ hitpoints=120
attack=100
strength=100
defence=100
timer=10
timer=20
param=damagetype,^crush_style
param=attack_anim,troll_attack
param=defend_anim,troll_block
Expand Down Expand Up @@ -1659,7 +1659,7 @@ hitpoints=170
attack=130
strength=130
defence=130
timer=10
timer=20
param=damagetype,^crush_style
param=attack_anim,troll_attack
param=defend_anim,troll_block
Expand Down
9 changes: 3 additions & 6 deletions data/src/scripts/macro events/scripts/macro_events.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,11 @@ if (finduid(%npc_macro_event_target) = true) {
return(true);

[proc,macro_event_lost_hostile]()(boolean)
if (npc_getmode = opplayer2) {
return(false);
}
if (finduid(%npc_macro_event_target) = true) {
if (npc_range(coord) < 3 & ~npc_can_attack_player = true) {
npc_setmode(opplayer2);
return(false);
if (npc_range(coord) > 3) { // seems like distance of 3? https://www.youtube.com/watch?v=GoRX3cp58eo&list=PLn23LiLYLb1am4weMQzkWn5m9b3m9fXv9&t=38s
return(true);
}
return(false);
}
return(true);
// based off https://web.archive.org/web/20060814111255/http://www.zybez.net/misc.php?id=11
Expand Down