From 373b057d1fc03ee06eb300514381ccc3f6b8681e Mon Sep 17 00:00:00 2001 From: Christopher Date: Sat, 30 Jan 2021 18:46:13 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9EChris.MultiNPC.lsl=E2=80=9C=20=C3=A4nd?= =?UTF-8?q?ern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Chris.MultiNPC.lsl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Chris.MultiNPC.lsl b/Chris.MultiNPC.lsl index b14b1a7..25bdeb7 100644 --- a/Chris.MultiNPC.lsl +++ b/Chris.MultiNPC.lsl @@ -2,7 +2,7 @@ yoptions; //=================== -//Version: 0.1.1 +//Version: 0.1.2 //Datum: 30.01.2021 //Git: https://clatza.dev/Christopher/OpenSim.Script.Chris.MultiNPC //Made by: Chris Resident @ inc.li:8002 @@ -98,6 +98,15 @@ integer script_create(integer slot, key npc, list command) return TRUE; } +integer script_remove(integer slot, key npc, list command) +{ + if(npc != NULL_KEY) + osNpcRemove(npc); + + m_npcdata = setDataEntryInDataList(m_npcdata, "npc." + slot, NULL_KEY); + return TRUE; +} + integer script_say(integer slot, key npc, list command) { osNpcSay(npc, 0, llList2String(command, 1)); @@ -257,6 +266,10 @@ doNextScriptStep() if(!script_create(currentNPCSlot, currentNPCKey, lineCommandData)) llSay(0, "Script execution in '" + llList2String(lineCommandData, 0) + "' in nc '"+ currentncname +"' on line '" + currentLine + "' failed."); break; + case "remove": + if(!script_remove(currentNPCSlot, currentNPCKey, lineCommandData)) + llSay(0, "Script execution in '" + llList2String(lineCommandData, 0) + "' in nc '"+ currentncname +"' on line '" + currentLine + "' failed."); + break; case "say": if(!script_say(currentNPCSlot, currentNPCKey, lineCommandData)) llSay(0, "Script execution in '" + llList2String(lineCommandData, 0) + "' in nc '"+ currentncname +"' on line '" + currentLine + "' failed.");