Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer kanal = 135790;
- string plec = "?";
- integer wylaczNasluch = 1;
- integer lapkaNasluchu;
- ustawRotacje(vector xyz) {
- vector xyz_angles = xyz;
- vector angles_in_radians = xyz_angles*DEG_TO_RAD;
- rotation rot_xyzq = llEuler2Rot(angles_in_radians);
- llSetRot(llGetRot()*rot_xyzq);
- }
- default {
- state_entry() {
- lapkaNasluchu = llListen(kanal, "", llGetOwner(), "");
- plec = (string)llGetPrimitiveParams([PRIM_TEXT]);
- if(plec != "0" || plec != "1") {
- llOwnerSay("@getdebug_avatarsex="+(string)kanal);
- }
- llSetTimerEvent(20);
- }
- listen(integer channel, string name, key id, string message) {
- if(message == "0" || message == "Kobieta") {
- llSetText("0", <1.0, 1.0, 1.0>, 0);
- llOwnerSay("Ustawiono plec: kobieta");
- llSetPos(<0,0,-0.02>);
- ustawRotacje(<0,0,0>);
- plec = "0";
- wylaczNasluch = 1;
- }
- else if(message == "1" || message == "Mezczyzna") {
- llSetText("1", <1.0, 1.0, 1.0>, 0);
- llOwnerSay("Ustawiono plec: mezczyzna");
- llSetPos(<0,0,0>);
- ustawRotacje(<0,0,0>);
- plec = "1";
- wylaczNasluch = 1;
- }
- else if(message == "-1") {
- llDialog(llGetOwner(), "Jaka jest Twoja plec?", ["Kobieta", "Mezczyzna"], kanal);
- wylaczNasluch = 0;
- }
- }
- timer() {
- if(plec != "0" || plec != "1" || plec != "-1") {
- llDialog(llGetOwner(), "Jaka jest Twoja plec?", ["Kobieta", "Mezczyzna"], kanal);
- wylaczNasluch = 0;
- }
- if(wylaczNasluch == 1) {
- llSetTimerEvent(0);
- llListenRemove(lapkaNasluchu);
- llSetScriptState(llGetScriptName(), FALSE);
- } else {
- llSetTimerEvent(120);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement