Button Gives Multiple Items
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/******************************************************************
* This example will give different objects to an avatar who presses different BUTTON in the menu
* You will need a line in the AVP_Positions notecard for each BUTTON
* e.g. BUTTON Coffee|0
******************************************************************/
default{
link_message(integer sender, integer num, string msg, key id){
if(msg=="Coffee"){
llGiveInventory(id,"Coffee Cup");
}
else if (msg=="Donut"){
llGiveInventory(id,"donut");
}
else if (msg=="Lunch"){
llGiveInventory(id,"Lunchbox");
}
else if (msg=="Pastry"){
llGiveInventory(id,"coconut swirl");
}
}
}