Xandresia Posted October 23, 2017 Share Posted October 23, 2017 (edited) Excuse me for my English, I use a translator I would like to have changed in this script the ONLY group members( with the right grouptag) can buy by coins (g & s currency) one has the group does not come * sorry wrong group the script ( i now that the script works whit a ather script the API Coins(RP-HUd) script) _____________________________________________________________________________________ // Put this script in same prim as the API Coins (RP-HUD [G&S]) // ** Price in G&S Coins integer PVP = 100 ; // ** Price in L$ integer PL = 1 ; string nom_obj; integer active = FALSE; display() { integer cnt = llGetInventoryNumber( INVENTORY_OBJECT ); active = cnt>0; if(active){ llSetText (" " +(string) PVP+" G&S Coin \nor L$"+(string)PL+"\nAvailable: "+(string)cnt, <1,1,1>, 1); llSetObjectName("G&S Vendor: " +llGetInventoryName(INVENTORY_OBJECT,0)); }else{ llSetText("** Empty **", <1,1,1>, 1); } } default { state_entry() { llSetPayPrice(-1,[PL,-1,-1,-1]); llRequestPermissions(llGetOwner(),PERMISSION_DEBIT); } run_time_permissions(integer perm) { if (perm&PERMISSION_DEBIT) { display(); } } touch_start(integer num_detected) { if(active){ llMessageLinked(LINK_SET, 700, llGetInventoryName(INVENTORY_OBJECT,0)+","+(string)PVP,llDetectedKey(0)); } } link_message(integer sender_num, integer num, string str, key id) { if(num == 701){ llSay( 0 , "Thank you for your purchase: "+llGetInventoryName(INVENTORY_OBJECT,0)+" delivered to "+llKey2Name(id) ); llGiveInventory( id, llGetInventoryName(INVENTORY_OBJECT,0) ); display(); } if(num == 702){ llSay( 0 , "Vendor is being used by: "+str ); } } changed(integer change){ if (change & CHANGED_INVENTORY){ display(); } } money(key id, integer amount) { if (active && amount==PL) { llSay( 0 , ""+llGetInventoryName(INVENTORY_OBJECT,0)+""+llKey2Name(id) ); llGiveInventory( id, llGetInventoryName(INVENTORY_OBJECT,0) ); display(); } else if (amount) { llInstantMessage(id,"There was something wrong with your payment. Your money will be refunded."); llTransferLindenDollars(id,amount); } } transaction_result(key id, integer success, string data) { if (success) llWhisper(0,"Payment refunded"); else llInstantMessage(llGetOwner(),"Refund failure: "+llKey2Name(llList2Key(llParseString2List(data,[","],[]),0))+" "+data); } } ______________________________________ Thank you Edited October 23, 2017 by Xandresia Link to comment Share on other sites More sharing options...
Rolig Loon Posted October 23, 2017 Share Posted October 23, 2017 You could try using llGetObjectDetails(llGetKey(),[OBJECT_GROUP]) to determine the UUID of the group that your object is currently using. If you include the UUID of your group in the script as a (key) constant, you can compare it to the result. That will verify that the object is set to YOUR group. Then all you need to do is compare it to the user's group with llSameGroup(llDetectedKey(0)) to verify that the user is wearing the group's tag. Link to comment Share on other sites More sharing options...
Xandresia Posted October 23, 2017 Author Share Posted October 23, 2017 puh thx but I have no idea of scripts, so I asked yes here. I do not know where to use it sorry Link to comment Share on other sites More sharing options...
Rolig Loon Posted October 23, 2017 Share Posted October 23, 2017 If you are not a scripter, you may post in the InWorld Employment forum to hire a scripter who will do the work for you. The LSL Scripting forum is a place for scripters to compare solutions to problems in scripts that they are writing themselves. We do not write scripts here except as general examples. Link to comment Share on other sites More sharing options...
Xandresia Posted October 23, 2017 Author Share Posted October 23, 2017 ok thx Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now