„Chris.MultiNPC.lsl“ ändern
This commit is contained in:
parent
40ad2bcb2c
commit
5d6bfe808c
|
@ -20,9 +20,14 @@ default
|
||||||
{
|
{
|
||||||
state_entry()
|
state_entry()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
m_npcdata = llCSV2List(osGetDataValue("tmp." + llGetKey()));
|
||||||
|
hardReset();
|
||||||
|
|
||||||
m_lastTimeCheck = llGetUnixTime();
|
m_lastTimeCheck = llGetUnixTime();
|
||||||
checkOSPermissions();
|
checkOSPermissions();
|
||||||
readAllNPCPathNC();
|
readAllNPCPathNC();
|
||||||
|
|
||||||
state waitingForPlayers;
|
state waitingForPlayers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -318,6 +323,8 @@ doNextScriptStep()
|
||||||
llSay(0, "Unknown command '" + llList2String(lineCommandData, 0) + "' in nc '"+ currentncname +"' on line '" + currentLine + "' failed.");
|
llSay(0, "Unknown command '" + llList2String(lineCommandData, 0) + "' in nc '"+ currentncname +"' on line '" + currentLine + "' failed.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
osSetDataValue("tmp." + llGetKey(), llList2CSV(m_npcdata));
|
||||||
}
|
}
|
||||||
|
|
||||||
readNPCPathNC(string ncName)
|
readNPCPathNC(string ncName)
|
||||||
|
@ -378,8 +385,12 @@ hardReset()
|
||||||
while(dataListCount--)
|
while(dataListCount--)
|
||||||
if(checkDataEntryInDataList(m_npcdata, "npc." + dataListCount))
|
if(checkDataEntryInDataList(m_npcdata, "npc." + dataListCount))
|
||||||
osNpcRemove((key)getDataEntryFromDataList(m_npcdata, "npc." + dataListCount));
|
osNpcRemove((key)getDataEntryFromDataList(m_npcdata, "npc." + dataListCount));
|
||||||
|
|
||||||
llResetScript();
|
m_lastTimeCheck = 0;
|
||||||
|
m_npcdata = [];
|
||||||
|
osDeleteDataValue("tmp." + llGetKey());
|
||||||
|
|
||||||
|
//llResetScript();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Generic Helpers
|
//Generic Helpers
|
||||||
|
@ -410,5 +421,6 @@ list setDataEntryInDataList(list _dataList, string _key, string _value)
|
||||||
_dataList += [_key, _value];
|
_dataList += [_key, _value];
|
||||||
return _dataList;
|
return _dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
return llListReplaceList(_dataList, [_value], _inListPosition + 1, _inListPosition + 1);
|
return llListReplaceList(_dataList, [_value], _inListPosition + 1, _inListPosition + 1);
|
||||||
}
|
}
|
Loading…
Reference in New Issue