„Main HUD v0.07.02“ ändern
- Fehler in Menü "Benutzen" Behoben: Statt des Itemnamens kam dort "Willst Du "Anwenden" anwenden? - In alle Menüs Trennlinien eingebaut - Bei "Anwenden" und "Weitergeben" qird nun geprft, ob ein 2. Avatar auf der SIM ist. - Itembeschreibung wird nun korrekt mit "," und "\n" angezeigt.master
parent
3bdf526b43
commit
94794a53da
|
@ -27,22 +27,24 @@ string m_listener_state = "";
|
||||||
string m_last_action = "";
|
string m_last_action = "";
|
||||||
integer m_lastlevel = -1; // Wird für Level Up benötigt.
|
integer m_lastlevel = -1; // Wird für Level Up benötigt.
|
||||||
integer regchan = -1; // Wird für regionsweite Messages vom Setup Tool benötigt
|
integer regchan = -1; // Wird für regionsweite Messages vom Setup Tool benötigt
|
||||||
integer reghandler = -1;
|
integer reghandler = -1;
|
||||||
|
integer menuhandler = -1; // Wird für die HUD Einstellungen benötigt
|
||||||
|
integer menuchan = -1;
|
||||||
|
|
||||||
string m_lang_groupMessage = "Das 4CDS Spielsystem ist hier noch nicht eingerichtet! Bitte benutze das Setup-Tool.";
|
string m_lang_groupMessage = "Das 4CGS Spielsystem ist hier noch nicht eingerichtet! Bitte benutze das Setup-Tool.";
|
||||||
string m_lang_groupMessage_hud = "4CGS NICHT EINGERICHTET!";
|
string m_lang_groupMessage_hud = "4CGS NICHT EINGERICHTET!";
|
||||||
string m_lang_regionchange = "REGIONSWECHSEL...";
|
string m_lang_regionchange = "REGIONSWECHSEL...";
|
||||||
string m_lang_disabled = "Das 4CDS Spielsystem ist derzeit deaktiviert.";
|
string m_lang_disabled = "Das 4CGS Spielsystem ist derzeit deaktiviert.";
|
||||||
string m_lang_disabled_hud = "4CGS DEAKTIVIERT";
|
string m_lang_disabled_hud = "4CGS DEAKTIVIERT";
|
||||||
string m_lang_blueBoxDescText = "Was willst du mit '{0}' machen?\n \n{1}";
|
string m_lang_blueBoxDescText = "Was möchtest Du mit '{0}' machen?{1}";
|
||||||
string m_lang_useToOther = "Auf wen möchtest du ' {0}' anwenden?";
|
string m_lang_useToOther = "Auf wen möchtest Du '{0}' anwenden?";
|
||||||
string m_lang_deleteConfirm = "Dies ist ein wichtiges, vielleicht sogar ein einzigartiges Gegenstand. Bist du dir wirklich sicher dass du {0} nicht mehr brauchst?";
|
string m_lang_deleteConfirm = "Dies ist ein wichtiges, vielleicht sogar ein einzigartiger Gegenstand. Bist Du Dir wirklich sicher dass Du '{0}' nicht mehr brauchst?";
|
||||||
string m_lang_sendToOther = "An wen möchtest Du '{0}' weitergeben?";
|
string m_lang_sendToOther = "An wen möchtest Du '{0}' weitergeben?";
|
||||||
string m_lang_selectActions = "Was möchtest Du mit '{0}' machen?";
|
// string m_lang_selectActions = "Was möchtest Du mit '{0}' machen?";
|
||||||
string m_lang_avatarNotOnRegion = "{0} ist nicht mehr auf der Region.";
|
string m_lang_avatarNotOnRegion = "{0} ist nicht mehr auf der Region.";
|
||||||
string m_lang_noFreeSlot = "{0} hat keinen freien Inventarplatz mehr!";
|
string m_lang_noFreeSlot = "{0} hat keinen freien Inventarplatz mehr!";
|
||||||
string m_lang_getItem = "{0} hat Dir {1} gegeben.";
|
string m_lang_getItem = "{0} hat Dir {1} gegeben.";
|
||||||
string m_lang_deleteText = "Du hast {0} x {1} weggeworfen. Deine Traglast erhöht sich um {2}kg auf {3}kg.";
|
string m_lang_deleteText = "Du hast {0} x {1} weggeworfen. Deine Traglast verringert sich um {2}kg auf {3}kg.";
|
||||||
string m_lang_ja = "JA";
|
string m_lang_ja = "JA";
|
||||||
string m_lang_nein = "NEIN";
|
string m_lang_nein = "NEIN";
|
||||||
string m_lang_leveltext = "Level: {0} [XP: {1}]";
|
string m_lang_leveltext = "Level: {0} [XP: {1}]";
|
||||||
|
@ -50,23 +52,70 @@ string m_lang_init = "Aktualisierung...";
|
||||||
string m_lang_maxlevel = "Du hast den höchstmöglichen Level (Level {0}) erreicht.";
|
string m_lang_maxlevel = "Du hast den höchstmöglichen Level (Level {0}) erreicht.";
|
||||||
string m_lang_maxweight = "Sorry, Du kannst nicht mehr tragen.";
|
string m_lang_maxweight = "Sorry, Du kannst nicht mehr tragen.";
|
||||||
string m_lang_newname = "Gib bitte hier Deinen RP Spielernamen ein:";
|
string m_lang_newname = "Gib bitte hier Deinen RP Spielernamen ein:";
|
||||||
|
string m_lang_noothertogive = "Es ist niemand auf der Region, dem Du '{0}' geben könntest.";
|
||||||
|
string m_lang_noothertouse = "Es ist niemand da, auf den Du '{0}' anwenden könntest.";
|
||||||
string m_lang_kill = "Wegwerfen";
|
string m_lang_kill = "Wegwerfen";
|
||||||
string m_lang_use = "Benutzen";
|
string m_lang_use = "Benutzen";
|
||||||
string m_lang_give = "Weitergeben";
|
string m_lang_give = "Weitergeben";
|
||||||
string m_lang_btn_close = "Schließen ";
|
string m_lang_desc_txt = "Beschreibung:";
|
||||||
|
|
||||||
|
string m_lang_menutext = "Einstellungen:\n\nBitte wähle eine Option.Die Schalter zeigen Dir an, was aktuell eingestellt ist.\nBenutze den Schalter '{0}', um das Menü zu schließen.";
|
||||||
|
string m_lang_btn_close = "Schließen ✔";
|
||||||
|
string m_lang_btn_ic = "ist wieder IC (= im Spiel).";
|
||||||
|
string m_lang_btn_afk = "ist AFK.";
|
||||||
|
string m_lang_btn_ooc = "ist OOC (= Out of Charakter).";
|
||||||
string m_lang_btn_sound = "Ton ✔";
|
string m_lang_btn_sound = "Ton ✔";
|
||||||
string m_lang_btn_sound_on = "Ton ✔";
|
string m_lang_btn_sound_on = "Ton ✔";
|
||||||
string m_lang_btn_sound_off = "Ton ✘";
|
string m_lang_btn_sound_off = "Ton ✘";
|
||||||
string m_lang_btn_messages = "Meldungen ✔";
|
string m_lang_btn_messages = "Meldungen ✔";
|
||||||
string m_lang_btn_messages_on = "Meldungen ✔";
|
string m_lang_btn_messages_on = "Meldungen ✔";
|
||||||
string m_lang_btn_messages_off = "Meldungen ✘";
|
string m_lang_btn_messages_off = "Meldungen ✘";
|
||||||
|
string m_lang_btn_meter = "Meter auto ✔";
|
||||||
|
string m_lang_btn_meter_on = "Meter auto ✔";
|
||||||
|
string m_lang_btn_meter_off = "Meter auto ✘";
|
||||||
|
|
||||||
string m_lang_reset = "Zurücksetzen";
|
string m_lang_reset = "Zurücksetzen";
|
||||||
string line = "────────────────────────────────────────";
|
string line = "───────────────────────────────────────────";
|
||||||
list m_dataStore = [];
|
list m_dataStore = [];
|
||||||
list m_dataUserStore = [];
|
list m_dataUserStore = [];
|
||||||
list m_current = [];
|
list m_current = [];
|
||||||
integer m_playsound = TRUE;
|
integer m_playsound = TRUE;
|
||||||
|
|
||||||
|
|
||||||
|
read_prefs()
|
||||||
|
{
|
||||||
|
string p = llGetObjectDesc();
|
||||||
|
if(llSubStringIndex(p, "PREFS:") != 0)
|
||||||
|
save_prefs();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_min = FALSE;
|
||||||
|
m_lang_btn_sound = m_lang_btn_sound_on;
|
||||||
|
m_lang_btn_messages = m_lang_btn_messages_on;
|
||||||
|
if(llSubStringIndex(p, "MIN") != -1) m_min = TRUE;
|
||||||
|
if(llSubStringIndex(p, "SND") == -1) m_lang_btn_sound = m_lang_btn_sound_off;
|
||||||
|
if(llSubStringIndex(p, "MSG") == -1) m_lang_btn_messages = m_lang_btn_messages_off;
|
||||||
|
if(llSubStringIndex(p, "METER") == -1) m_lang_btn_meter = m_lang_btn_meter_off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
save_prefs()
|
||||||
|
{
|
||||||
|
string p = "PREFS:";
|
||||||
|
if(m_min == TRUE) p += "MIN";
|
||||||
|
if(m_lang_btn_sound == m_lang_btn_sound_on) p += "-SND";
|
||||||
|
if(m_lang_btn_messages == m_lang_btn_messages_on) p += "-MSG";
|
||||||
|
if(m_lang_btn_meter == m_lang_btn_meter_on) p += "-METER";
|
||||||
|
llSetObjectDesc(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
menu()
|
||||||
|
{
|
||||||
|
menuhandler = llListen(menuchan, "", llGetOwner(), "" );
|
||||||
|
llSetTimerEvent(120);
|
||||||
|
llDialog(llGetOwner(), line + "\n" + osFormatString(m_lang_menutext, [m_lang_btn_close]), [m_lang_btn_close, m_lang_btn_sound, m_lang_btn_messages, m_lang_btn_meter], menuchan );
|
||||||
|
}
|
||||||
|
|
||||||
getregionchannel()
|
getregionchannel()
|
||||||
{
|
{
|
||||||
list lstParcelDetails = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_ID, PARCEL_DETAILS_AREA]);
|
list lstParcelDetails = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_ID, PARCEL_DETAILS_AREA]);
|
||||||
|
@ -102,17 +151,22 @@ change_iconsize(integer prim)
|
||||||
|
|
||||||
minmax()
|
minmax()
|
||||||
{
|
{
|
||||||
m_min = !m_min;
|
|
||||||
vector minmax_size = llList2Vector(llGetLinkPrimitiveParams(LINK_THIS, [PRIM_SIZE]), 0);
|
vector minmax_size = llList2Vector(llGetLinkPrimitiveParams(LINK_THIS, [PRIM_SIZE]), 0);
|
||||||
if(m_min == FALSE)
|
if(m_min == FALSE)
|
||||||
{
|
{
|
||||||
llSetLocalRot(llEuler2Rot(<0, 0, 0> * DEG_TO_RAD));
|
llSetLocalRot(llEuler2Rot(<0, 0, 0> * DEG_TO_RAD));
|
||||||
llSetTimerEvent(m_refreshtime);
|
if(checkDataEntryInDataList(m_dataStore, "enable") == TRUE)
|
||||||
refreshData();
|
{
|
||||||
|
llSetTimerEvent(m_refreshtime);
|
||||||
|
refreshData();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
llSetLinkPrimitiveParamsFast(osGetLinkNumber("level-anzeige"), [PRIM_TEXT, m_lang_groupMessage_hud, <1, 0.8, 0>, 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
llSetLinkPrimitiveParamsFast(osGetLinkNumber("level-anzeige"), [PRIM_TEXT, "", <0,0,0>, 0]);
|
||||||
llSetLocalRot(llEuler2Rot(<0, 180, 0> * DEG_TO_RAD));
|
llSetLocalRot(llEuler2Rot(<0, 180, 0> * DEG_TO_RAD));
|
||||||
llSetTimerEvent(0);
|
llSetTimerEvent(0);
|
||||||
osMessageAttachments(llGetOwner(), "HIDE", [ATTACH_HEAD], 0);
|
osMessageAttachments(llGetOwner(), "HIDE", [ATTACH_HEAD], 0);
|
||||||
|
@ -152,11 +206,16 @@ updateTime(integer _update)
|
||||||
refreshData();
|
refreshData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ###############################################################################################################
|
||||||
|
|
||||||
default
|
default
|
||||||
{
|
{
|
||||||
state_entry()
|
state_entry()
|
||||||
{
|
{
|
||||||
getregionchannel();
|
getregionchannel();
|
||||||
|
menuchan = -(integer)("0x" + llGetSubString((string)llGetOwner(), -16, -1));
|
||||||
|
read_prefs();
|
||||||
|
minmax();
|
||||||
llSetLinkPrimitiveParamsFast(osGetLinkNumber("level-anzeige"), [PRIM_TEXT, m_lang_init, <1, 0.8, 0>, 1]);
|
llSetLinkPrimitiveParamsFast(osGetLinkNumber("level-anzeige"), [PRIM_TEXT, m_lang_init, <1, 0.8, 0>, 1]);
|
||||||
llPreloadSound("click");
|
llPreloadSound("click");
|
||||||
llPreloadSound("inventar");
|
llPreloadSound("inventar");
|
||||||
|
@ -178,6 +237,7 @@ default
|
||||||
llSetLinkPrimitiveParamsFast(osGetLinkNumber("level-anzeige"), [PRIM_TEXT, m_lang_disabled_hud, <1, 0.8, 0>, 1]);
|
llSetLinkPrimitiveParamsFast(osGetLinkNumber("level-anzeige"), [PRIM_TEXT, m_lang_disabled_hud, <1, 0.8, 0>, 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
llOwnerSay(m_lang_groupMessage);
|
llOwnerSay(m_lang_groupMessage);
|
||||||
|
@ -213,7 +273,25 @@ default
|
||||||
{
|
{
|
||||||
m_dataStore = getDataListFromDataStorage("game.hud");
|
m_dataStore = getDataListFromDataStorage("game.hud");
|
||||||
m_dataUserStore = getDataListFromDataStorage("game.hud.player." + llGetOwner());
|
m_dataUserStore = getDataListFromDataStorage("game.hud.player." + llGetOwner());
|
||||||
|
llOwnerSay("Touch> " + llGetLinkName(llDetectedLinkNumber(0)));
|
||||||
|
|
||||||
|
if(llGetLinkName(llDetectedLinkNumber(0)) == "LOGO")
|
||||||
|
{
|
||||||
|
|
||||||
|
osForceAttachToOtherAvatarFromInventory(llGetOwner(), llGetInventoryName(INVENTORY_OBJECT, 0), ATTACH_HUD_CENTER_2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
change_iconsize(llDetectedLinkNumber(0));
|
change_iconsize(llDetectedLinkNumber(0));
|
||||||
|
|
||||||
|
if(llGetLinkName(llDetectedLinkNumber(0)) == llGetObjectName())
|
||||||
|
{
|
||||||
|
m_min = !m_min;
|
||||||
|
minmax();
|
||||||
|
save_prefs();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(checkDataEntryInDataList(m_dataStore, "enable") == FALSE)
|
if(checkDataEntryInDataList(m_dataStore, "enable") == FALSE)
|
||||||
{
|
{
|
||||||
llOwnerSay(m_lang_groupMessage);
|
llOwnerSay(m_lang_groupMessage);
|
||||||
|
@ -231,6 +309,10 @@ default
|
||||||
llSetLinkPrimitiveParamsFast(osGetLinkNumber("level-anzeige"), [PRIM_TEXT, m_lang_disabled_hud, <1, 0.8, 0>, 1]);
|
llSetLinkPrimitiveParamsFast(osGetLinkNumber("level-anzeige"), [PRIM_TEXT, m_lang_disabled_hud, <1, 0.8, 0>, 1]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(llGetLinkName(llDetectedLinkNumber(0)) == "preferences")
|
||||||
|
menu();
|
||||||
|
|
||||||
osMessageAttachments(llGetOwner(), "4CGS-ENABLE", [ATTACH_HUD_CENTER_1, ATTACH_HUD_CENTER_2], 0);
|
osMessageAttachments(llGetOwner(), "4CGS-ENABLE", [ATTACH_HUD_CENTER_1, ATTACH_HUD_CENTER_2], 0);
|
||||||
m_last_touch = llParseString2List(llGetLinkName(llDetectedLinkNumber(0)), ["-"], []);
|
m_last_touch = llParseString2List(llGetLinkName(llDetectedLinkNumber(0)), ["-"], []);
|
||||||
m_listener_state = "main";
|
m_listener_state = "main";
|
||||||
|
@ -242,33 +324,43 @@ default
|
||||||
list _inventarItemDataStorage = getDataListFromDataStorage("item." +_inventarItemName);
|
list _inventarItemDataStorage = getDataListFromDataStorage("item." +_inventarItemName);
|
||||||
string _inventarItemDisplayName = getDataEntryFromDataList(_inventarItemDataStorage, "displayname");
|
string _inventarItemDisplayName = getDataEntryFromDataList(_inventarItemDataStorage, "displayname");
|
||||||
string _inventarItemBeschreibung = getDataEntryFromDataList(_inventarItemDataStorage, "beschreibung");
|
string _inventarItemBeschreibung = getDataEntryFromDataList(_inventarItemDataStorage, "beschreibung");
|
||||||
|
|
||||||
if(_inventarItemName != "")
|
if(_inventarItemName != "")
|
||||||
{
|
{
|
||||||
list _aktionen = [m_lang_kill, m_lang_use, m_lang_give];
|
list _aktionen = [m_lang_kill, m_lang_use, m_lang_give];
|
||||||
m_dataUserStore = setDataEntryInDataList(m_dataUserStore, "selected", _inventarSlot);
|
m_dataUserStore = setDataEntryInDataList(m_dataUserStore, "selected", _inventarSlot);
|
||||||
saveDataListToDataStorage(m_dataUserStore, "game.hud.player." + llGetOwner());
|
saveDataListToDataStorage(m_dataUserStore, "game.hud.player." + llGetOwner());
|
||||||
llDialog(llDetectedKey(0), line + "\n" + osFormatString(m_lang_blueBoxDescText, [_inventarItemDisplayName, _inventarItemBeschreibung]), _aktionen, m_listener_channel);
|
llDialog(llDetectedKey(0), line + "\n \n" + osFormatString(m_lang_blueBoxDescText, [_inventarItemDisplayName, "\n \n" + m_lang_desc_txt + "\n" + _inventarItemBeschreibung]), _aktionen, m_listener_channel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if(llGetLinkName(llDetectedLinkNumber(0)) == llGetObjectName())
|
|
||||||
{
|
|
||||||
change_iconsize(llGetLinkName(llDetectedLinkNumber(0)));
|
|
||||||
minmax();
|
|
||||||
refreshData();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(llGetLinkName(llDetectedLinkNumber(0)) == "preferences")
|
|
||||||
llResetScript();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
listen(integer channel, string name, key id, string message )
|
listen(integer channel, string name, key id, string message )
|
||||||
{
|
{
|
||||||
|
if(channel == menuchan)
|
||||||
|
{
|
||||||
|
llListenRemove(menuhandler);
|
||||||
|
menuhandler = -1;
|
||||||
|
if(message == m_lang_btn_close)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(message == m_lang_btn_sound_on)
|
||||||
|
m_lang_btn_sound = m_lang_btn_sound_off;
|
||||||
|
if(message == m_lang_btn_sound_off)
|
||||||
|
m_lang_btn_sound = m_lang_btn_sound_on;
|
||||||
|
if(message == m_lang_btn_messages_on)
|
||||||
|
m_lang_btn_messages = m_lang_btn_messages_off;
|
||||||
|
if(message == m_lang_btn_messages_off)
|
||||||
|
m_lang_btn_messages = m_lang_btn_messages_on;
|
||||||
|
if(message == m_lang_btn_meter_off)
|
||||||
|
m_lang_btn_meter = m_lang_btn_meter_on;
|
||||||
|
if(message == m_lang_btn_meter_on)
|
||||||
|
m_lang_btn_meter = m_lang_btn_meter_off;
|
||||||
|
save_prefs();
|
||||||
|
menu();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_dataStore = getDataListFromDataStorage("game.hud");
|
m_dataStore = getDataListFromDataStorage("game.hud");
|
||||||
m_dataUserStore = getDataListFromDataStorage("game.hud.player." + llGetOwner());
|
m_dataUserStore = getDataListFromDataStorage("game.hud.player." + llGetOwner());
|
||||||
if(left(message, ";") == "gamecommand")
|
if(left(message, ";") == "gamecommand")
|
||||||
|
@ -284,6 +376,7 @@ default
|
||||||
refreshData();
|
refreshData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
integer _inventarSlot = llList2String(m_last_touch, 2);
|
integer _inventarSlot = llList2String(m_last_touch, 2);
|
||||||
|
@ -319,16 +412,23 @@ default
|
||||||
if(message == m_lang_give)
|
if(message == m_lang_give)
|
||||||
{
|
{
|
||||||
list _avatars = llGetAgentList(AGENT_LIST_REGION, []);
|
list _avatars = llGetAgentList(AGENT_LIST_REGION, []);
|
||||||
|
_avatars = llDeleteSubList(_avatars, llListFindList(_avatars, [llGetOwner()]), llListFindList(_avatars, [llGetOwner()]));
|
||||||
integer _avatarsCount = llGetListLength(_avatars);
|
integer _avatarsCount = llGetListLength(_avatars);
|
||||||
list _player = [];
|
list _player = [];
|
||||||
|
|
||||||
|
if(_avatarsCount == 0)
|
||||||
|
{
|
||||||
|
llOwnerSay(osFormatString(m_lang_noothertogive, [_inventarItemDisplayName]));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while(_avatarsCount--)
|
while(_avatarsCount--)
|
||||||
if(osCheckDataValue("game.hud.player." + llList2String(_avatars, _avatarsCount)))
|
if(osCheckDataValue("game.hud.player." + llList2String(_avatars, _avatarsCount)))
|
||||||
if(llList2Key(_avatars, _avatarsCount) != llGetOwner())
|
if(llList2Key(_avatars, _avatarsCount) != llGetOwner())
|
||||||
_player += [left(left(llKey2Name(llList2String(_avatars, _avatarsCount)), " "), ".")];
|
_player += [left(left(llKey2Name(llList2String(_avatars, _avatarsCount)), " "), ".")];
|
||||||
|
|
||||||
m_listener_state = "give";
|
m_listener_state = "give";
|
||||||
llDialog(llGetOwner(), osFormatString(m_lang_sendToOther, [_inventarItemDisplayName]), _player, m_listener_channel);
|
llDialog(llGetOwner(), line + "\n \n" + osFormatString(m_lang_sendToOther, [_inventarItemDisplayName]), _player, m_listener_channel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +438,7 @@ default
|
||||||
|
|
||||||
list _inventarItemInternalActions = llParseString2List(getDataEntryFromDataList(_inventarItemDataStorage, "actions"), [";"], []);
|
list _inventarItemInternalActions = llParseString2List(getDataEntryFromDataList(_inventarItemDataStorage, "actions"), [";"], []);
|
||||||
integer _inventarItemInternalActionsCount = llGetListLength(_inventarItemInternalActions);
|
integer _inventarItemInternalActionsCount = llGetListLength(_inventarItemInternalActions);
|
||||||
|
string _inventarItemBeschreibung = getDataEntryFromDataList(_inventarItemDataStorage, "beschreibung");
|
||||||
while(_inventarItemInternalActionsCount--)
|
while(_inventarItemInternalActionsCount--)
|
||||||
{
|
{
|
||||||
string _actionName = llList2String(_inventarItemInternalActions, _inventarItemInternalActionsCount);
|
string _actionName = llList2String(_inventarItemInternalActions, _inventarItemInternalActionsCount);
|
||||||
|
@ -348,7 +448,7 @@ default
|
||||||
}
|
}
|
||||||
|
|
||||||
m_listener_state = "use";
|
m_listener_state = "use";
|
||||||
llDialog(llGetOwner(), osFormatString(m_lang_selectActions, [_inventarItemDisplayName]), _actionen, m_listener_channel);
|
llDialog(llGetOwner(), line + "\n \n" + osFormatString(m_lang_blueBoxDescText, [_inventarItemDisplayName, "\n \n" + m_lang_desc_txt + "\n" + _inventarItemBeschreibung]), _actionen, m_listener_channel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -357,7 +457,7 @@ default
|
||||||
list _allAvatarsInRegion = llGetAgentList(AGENT_LIST_REGION, []);
|
list _allAvatarsInRegion = llGetAgentList(AGENT_LIST_REGION, []);
|
||||||
integer _allAvatarsInRegionCount = llGetListLength(_allAvatarsInRegion);
|
integer _allAvatarsInRegionCount = llGetListLength(_allAvatarsInRegion);
|
||||||
key _selectedTargetAvatar = NULL_KEY;
|
key _selectedTargetAvatar = NULL_KEY;
|
||||||
|
|
||||||
while(_allAvatarsInRegionCount--)
|
while(_allAvatarsInRegionCount--)
|
||||||
{
|
{
|
||||||
string _avatarID = left(left(llKey2Name(llList2String(_allAvatarsInRegion, _allAvatarsInRegionCount)), " "), ".");
|
string _avatarID = left(left(llKey2Name(llList2String(_allAvatarsInRegion, _allAvatarsInRegionCount)), " "), ".");
|
||||||
|
@ -690,7 +790,7 @@ refreshData()
|
||||||
setBalkenValue("essen" , _food);
|
setBalkenValue("essen" , _food);
|
||||||
setBalkenValue("hp" , _hp);
|
setBalkenValue("hp" , _hp);
|
||||||
setBalkenValue("xp" , _xpBalkenValue);
|
setBalkenValue("xp" , _xpBalkenValue);
|
||||||
setBalkenValue("weight", (integer)(100 / (float)getMaxPlayerWeight(getDataListFromDataStorage("game.hud.player." + llGetOwner())) * (float)calcPlayerWeight(m_dataUserStore)));
|
setBalkenValue("weight", (float)(float)(100.0 / (float)getMaxPlayerWeight(getDataListFromDataStorage("game.hud.player." + llGetOwner())) * (float)calcPlayerWeight(m_dataUserStore)));
|
||||||
saveDataListToDataStorage(m_dataUserStore, "game.hud.player." + llGetOwner());
|
saveDataListToDataStorage(m_dataUserStore, "game.hud.player." + llGetOwner());
|
||||||
osMessageAttachments(llGetOwner(), "LEVEL:" + (string)_level, [ATTACH_HEAD], 0);
|
osMessageAttachments(llGetOwner(), "LEVEL:" + (string)_level, [ATTACH_HEAD], 0);
|
||||||
osMessageAttachments(llGetOwner(), "HP:" + getDataEntryFromDataList(m_dataUserStore, "stats.hp"), [ATTACH_HEAD], 0);
|
osMessageAttachments(llGetOwner(), "HP:" + getDataEntryFromDataList(m_dataUserStore, "stats.hp"), [ATTACH_HEAD], 0);
|
||||||
|
@ -747,9 +847,8 @@ useAction(string _itemName, string _actionName, integer _slot, key _avatar, inte
|
||||||
{
|
{
|
||||||
string _actionStringAction = left(llList2String(_inventarItemInternalActionTasks, _inventarItemInternalActionTasksCount), ":");
|
string _actionStringAction = left(llList2String(_inventarItemInternalActionTasks, _inventarItemInternalActionTasksCount), ":");
|
||||||
string _actionStringArgs = right(llList2String(_inventarItemInternalActionTasks, _inventarItemInternalActionTasksCount), ":");
|
string _actionStringArgs = right(llList2String(_inventarItemInternalActionTasks, _inventarItemInternalActionTasksCount), ":");
|
||||||
|
|
||||||
if(_actionStringAction == "say")
|
if(_actionStringAction == "say")
|
||||||
llDialog(_avatar, " \n \n" + _actionStringArgs, [], -1);
|
llDialog(_avatar, line + "\n \n" + m_lang_desc_txt + "\n \n" + osReplaceString(osReplaceString(_actionStringArgs, "§C§", ",", -1, 0), "§N§", "\n", -1, 0), [], -1);
|
||||||
|
|
||||||
if(_actionStringAction == "addFood")
|
if(_actionStringAction == "addFood")
|
||||||
_targetUserDataStore = setDataEntryInDataList(_targetUserDataStore, "stats.essen", (integer)getDataEntryFromDataList(_targetUserDataStore, "stats.essen") + (integer)_actionStringArgs);
|
_targetUserDataStore = setDataEntryInDataList(_targetUserDataStore, "stats.essen", (integer)getDataEntryFromDataList(_targetUserDataStore, "stats.essen") + (integer)_actionStringArgs);
|
||||||
|
@ -829,14 +928,21 @@ useAction(string _itemName, string _actionName, integer _slot, key _avatar, inte
|
||||||
m_listener_state = "getTarget";
|
m_listener_state = "getTarget";
|
||||||
|
|
||||||
list _allAvatarsInRegion = llGetAgentList(AGENT_LIST_REGION, []);
|
list _allAvatarsInRegion = llGetAgentList(AGENT_LIST_REGION, []);
|
||||||
|
_allAvatarsInRegion = llDeleteSubList(_allAvatarsInRegion, llListFindList(_allAvatarsInRegion, [llGetOwner()]), llListFindList(_allAvatarsInRegion, [llGetOwner()]));
|
||||||
integer _allAvatarsInRegionCount = llGetListLength(_allAvatarsInRegion);
|
integer _allAvatarsInRegionCount = llGetListLength(_allAvatarsInRegion);
|
||||||
list _player = [];
|
list _player = [];
|
||||||
|
|
||||||
|
if(_allAvatarsInRegionCount == 0)
|
||||||
|
{
|
||||||
|
llOwnerSay(osFormatString(m_lang_noothertouse, [_inventarItemDisplayName]));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while(_allAvatarsInRegionCount--)
|
while(_allAvatarsInRegionCount--)
|
||||||
if(osCheckDataValue("game.hud.player." + llList2String(_allAvatarsInRegion, _allAvatarsInRegionCount)))
|
if(osCheckDataValue("game.hud.player." + llList2String(_allAvatarsInRegion, _allAvatarsInRegionCount)))
|
||||||
_player += [left(left(llKey2Name(llList2String(_allAvatarsInRegion, _allAvatarsInRegionCount)), " "), ".")];
|
_player += [left(left(llKey2Name(llList2String(_allAvatarsInRegion, _allAvatarsInRegionCount)), " "), ".")];
|
||||||
|
|
||||||
llDialog(_avatar, osFormatString(m_lang_useToOther, [_inventarItemInternalActionDisplayname]), _player, m_listener_channel);
|
llDialog(_avatar, line + "\n \n" + osFormatString(m_lang_useToOther, [_inventarItemDisplayName]), _player, m_listener_channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -874,17 +980,17 @@ setBalkenValue(string balken, integer count) // integer max
|
||||||
if((integer)getDataEntryFromDataList(m_dataStore, "stats.enable") != TRUE)
|
if((integer)getDataEntryFromDataList(m_dataStore, "stats.enable") != TRUE)
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
if(getDataEntryFromDataList(m_current, "balken."+ balken) != (string)count)
|
if(getDataEntryFromDataList(m_current, "balken." + balken) != (string)count)
|
||||||
{
|
{
|
||||||
integer _linkCount = osGetLinkNumber("display-balken-" + balken);
|
integer _linkCount = osGetLinkNumber("display-balken-" + balken);
|
||||||
|
|
||||||
if(count != 0)
|
if(count != 0)
|
||||||
llSetLinkAlpha(_linkCount, 255, 4);
|
llSetLinkAlpha(_linkCount, 255, 4);
|
||||||
|
|
||||||
if(count == 0)
|
if(count == 0)
|
||||||
llSetLinkAlpha(_linkCount, 0, 4);
|
llSetLinkAlpha(_linkCount, 0, 4);
|
||||||
|
|
||||||
float _balkenValue = ((1.0 / 100) * (float)count);
|
float _balkenValue = ((1.0 / 100.0) * (float)count);
|
||||||
// llOwnerSay((string)_balkenValue + " " + (string)count);
|
// llOwnerSay((string)_balkenValue + " " + (string)count);
|
||||||
llSetLinkPrimitiveParamsFast(_linkCount, [PRIM_SLICE,< 0, _balkenValue, 0>]);
|
llSetLinkPrimitiveParamsFast(_linkCount, [PRIM_SLICE,< 0, _balkenValue, 0>]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue