HPM-Plugins
HPM-Plugins copied to clipboard
Script Command - NPC Duplicate / Remove
Regarding https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/npc-duplicate.c
If remove a NPC that running in a while-loop
with sleep
, the server will throw errors since the process are not terminated when remove the npc.
For example: if NPC A
running this:
while (true) {
showscript "ABC";
sleep 1000;
}
then remove NPC A
using the duplicateremove()
, then the map-server will start throwing error for showscript
.
[Error]: buildin_showscript: Script not attached. (id=0, rid=0, oid=110315097)
some update:
this time i get a map crash when try to remove a duplicated npc by trigger npc event label that do the following: donpcevent "duplicate_npc_name#XXX::OnUpdate";
OnUpdate:
duplicateremove(strnpcinfo(3));
end;
Any idea?
For now, I would recommend that don't use npc to remove itself.