Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Written By: Ĵyм Ѡҩℓƒ (Jym Resident)
- /*
- LICENCE:
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- or you may visit - http://license.idjhost.com/
- */
- // DESCRIPTION
- // Let's you designate delivery of inventory items by name to individuals by name
- string name1 = "JyM rEsIDeNt";
- string item1 = "apple";
- string name2 = "add_name";
- string item2 = "orange";
- string name3 = "add_name";
- string item3 = "banana";
- string name4 = "add_name";
- string item4 = "kiwi";
- string name5 = "add_name";
- string item5 = "dragon fruit";
- string name6 = "add_name";
- string item6 = "pomegranate";
- search(string find, key in_kId){
- if(llGetInventoryType(find) == INVENTORY_OBJECT)
- llGiveInventory(in_kId, find);
- else
- llRegionSayTo(in_kId, PUBLIC_CHANNEL, "Sorry, we're all out of "+find+"'s");
- }
- default{
- touch_start(integer num_detected){
- string sName = llToLower(llDetectedName(0));
- key kId = llDetectedKey(0);
- if(sName == llToLower(name1)) search(item1, kId );
- else if(sName == llToLower(name2)) search(item2, kId );
- else if(sName == llToLower(name3)) search(item3, kId );
- else if(sName == llToLower(name4)) search(item4, kId );
- else if(sName == llToLower(name5)) search(item5, kId );
- else if(sName == llToLower(name6)) search(item6, kId );
- else llRegionSayTo(kId ,PUBLIC_CHANNEL, "You're not in the list, you get nothing.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement