Jump to content

Zaine Swords

Resident
  • Posts

    58
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. ok.. ty.. i feel like an idiot now.. lol
  2. I have a problem, everytime the message gets sent to turn the light off, it sets the glow back to 1.0 instead of 0.0. any idea what i did wrong here? integer CHAN; float glow; integer SetID(key id) { integer mainkey = 952; string tempkey = llGetSubString((string)id, 0, 7); integer hex2int = (integer)("0x" + tempkey); return (hex2int + mainkey); } default { state_entry() { CHAN = SetID(llGetOwner()); llListen(CHAN, "", NULL_KEY, ""); llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, 0]); } listen(integer chan, string name, key id, string msg) { if(msg == "LIGHTON") { llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, glow]); } else if(msg == "LIGHTLOW") { glow = 0.1; llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, glow]); } else if(msg == "LIGHTMEDIUM") { glow = 0.5; llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, glow]); } else if(msg = "LIGHTHIGH") { glow = 1.0; llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, glow]); } else if(msg == "LIGHTOFF") { llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, 0]); } } }
  3. i still havnt been able to figure out this problem. i even tried just taking out everything i have done i just putting in llSetPayPrice(PAY_DEFAULT, [20, 50, 150, 200]); and it still doesn't work so i am at a loss as to what the problem is.
  4. and does the llSetPayPrice() work for you or do you still get the default prices?
  5. if you look at my Debug pieces, it goes through each line and sends me a message at the appropriate time. and the Debug is telling me that it is adding the prices correctly. so each variable is getting the right information its just the llSetPayPrice() is not registering that it has any new prices..
  6. your right, I didn't give you all of the code cause I didn't think it was nessesary.. but since it just might be here it is. string Text;string ColorPicker;string Logo;integer Chan;integer Amount;integer Total;integer Percent;integer percent;integer OnOff = FALSE;integer payment1;integer payment2;integer payment3;integer payment4;float Size = 6.0;vector Red = <1, 0, 0>;vector Green = <0, 1, 0>;vector Blue = <0, 0, 1>;vector White = <1, 1, 1>;vector Black = <0, 0, 0>;vector Color;key Dancer;key Toucher;integer SetID(key id){ integer mainkey = 921; string tempkey = llGetSubString((string)id, 0, 7); integer hex2int = (integer)("0x" + tempkey); return (hex2int + mainkey);}DisplayText(){ if(OnOff == TRUE) { llSetText(llKey2Name(Dancer) + "'s Tip Jar\n" + "\nTipped: " + (string)Amount + "\n Total Amount: " + (string)Total , Color, 1.0); } else if(OnOff == FALSE) { llSetText("", <1,1,1>, 1.0); }}Resize(){ float scale; list primparams; scale = Size; primparams = []; if(OnOff == TRUE) { primparams += [PRIM_SIZE, llGetScale() / scale]; if(llGetLinkNumber() > 0) { primparams += [ PRIM_POSITION, llGetLocalPos() / scale]; } } else if(OnOff == FALSE) { primparams += [PRIM_SIZE, llGetScale() * scale]; if(llGetLinkNumber() > 0) { primparams += [ PRIM_POSITION, llGetLocalPos() * scale]; } } llSetPrimitiveParams(primparams);}Debug(string msg, string var){ integer DEBUG = FALSE; if(DEBUG == TRUE) { llSay(0, "DEBUG: " + msg + ":" + var); }}default{ state_entry() { Chan = SetID(llGetOwner()); Debug("state", "default"); llListen(Chan, "", NULL_KEY, ""); llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); DisplayText(); } run_time_permissions(integer perm) { if(perm & PERMISSION_DEBIT) { } else { llOwnerSay("Please grant the permissions to continue....."); llResetScript(); } } changed(integer change) { if(change & CHANGED_OWNER) { llResetScript(); } } listen(integer chan, string name, key id, string msg) { //Debug("msg", msg); if(llGetSubString(msg, 0, 4) == "Color") { ColorPicker = llGetSubString(msg, 6, -1); Debug("ColorPicker", llGetSubString(msg, 6, -1)); if(ColorPicker == "white") { Color = White; } else if(ColorPicker == "red") { Color = Red; Debug("msg = red", "Color is red"); } else if(ColorPicker == "blue") { Color = Blue; } else if(ColorPicker == "black") { Color = Black; } else if(ColorPicker == "green") { Color = Green; } Debug("color", (string)Color); } else if(llGetSubString(msg, 0, 13) == "Dancer Percent") { percent = (integer)llGetSubString(msg, 15, -1); Debug("percentage is", (string)percent); } else if(llGetSubString(msg, 0, 7) == "Payment1") { payment1 = (integer)llGetSubString(msg, 8, -1); Debug("payment1", (string)payment1); } else if(llGetSubString(msg, 0, 7) == "Payment2") { payment2 = (integer)llGetSubString(msg, 8, -1); Debug("payment2", (string)payment2); } else if(llGetSubString(msg, 0, 7) == "Payment3") { payment3 = (integer)llGetSubString(msg, 8, -1); Debug("payment3", (string)payment3); } else if(llGetSubString(msg, 0, 7) == "Payment4") { payment4 = (integer)llGetSubString(msg, 8, -1); Debug("payment4", (string)payment4); } //llSay(0, (string)payment1 + " " + (string) payment2 + " " + (string)payment3 + " " + (string)payment4); DisplayText(); llSetPayPrice(PAY_HIDE, [payment1, payment2, payment3, payment4]); Debug("PayPrice", "Set"); } link_message(integer sender_number, integer number, string message, key id) { Debug("message id", message + (string)id); if(OnOff == FALSE) { if(message == "LOGGEDIN") { Resize(); OnOff = TRUE; } } else if(OnOff == TRUE) { if(message == "LOGGEDOUT") { Resize(); OnOff = FALSE; Total = 0; Amount = 0; } } if(message == "Dancer") { Toucher = id; Dancer = Toucher; Debug("Dancer is", (string)Dancer); } else if(message == "TIPPING") { Debug("TipJar", "TIPPING"); } DisplayText(); } money(key giver, integer amount) { llGiveMoney(Dancer, amount * percent / 100); llRegionSay(Chan, "tipper" + (string)giver); llInstantMessage(giver, "Thank you for that wonderful tip " +llKey2Name(giver)); llSay(0, llKey2Name(giver) + " tipped " + llKey2Name(Dancer) + " L$" + (string)amount + "."); Amount = amount; Total += amount; DisplayText(); }}
  7. I have a debug function I created just for debugging problems like this.. everything is working up to that point cause I have Debug all over this script
  8. yea indentes were bugging me to but it wouldn't let me add them.. anyways I c/p your script in world and tested it.. worked great. put what you put in myt script and it doesn't.. I don't get it.. something wrong with y script??
  9. my debug shows that the variables were set and set correctly.. but when I go to pay, just keeps showing the default pay amounts.
  10. I set it up a bit differently. I added a few lines of code to use integers instead of a list integer payment1;integer payment2;integer payment3;integer payment4;listen(integer chan, string name, key id, string msg){if(llGetSubString(msg,0,7)=="Payment1") { payment1=(integer)llGetSubString(msg,8,-1); Debug("payment1",(string)payment1); } elseif(llGetSubString(msg, 0, 7)=="Payment2") {payment2 =(integer)llGetSubString(msg, 8, -1);Debug("payment2", (string)payment2);}elseif(llGetSubString(msg, 0, 7)=="Payment3"){payment3 =(integer)llGetSubString(msg, 8, -1);Debug("payment3", (string)payment3);}elseif(llGetSubString(msg, 0, 7)=="Payment4"){payment4 =(integer)llGetSubString(msg, 8, -1);Debug("payment4", (string)payment4);}llSetPayPrice(0, [payment1, payment2, payment3, payment4]);} still doesn't work.
  11. im trying to get my object to set the llSetPayPrice and it just seems to completely ignore it. [code] list amount; listen(string chan, string name, key id, string msg) { if(llGetSubString(msg, 0, 2) == "pay") { amount = (list)llGetSubString(msg, 3, -1); llSetPayPrice(10, amount); } } [/code] now its getting all the information from a notecard that's in another prim. the prim reads the notecard, gets the amount then sends the message onto the object that's needing to set the llSetPayPrice().
×
×
  • Create New...