Une tip jar qui :
envoie des particules vers le donateur j'ai pris celle-ci (qu'il vous faut enregister en PNG afin d'en conserver la transparence dans SL)  . Vous glisser la texture avec le script dans l'objet à défaut de texture, ce seront de petite boules blanches.
Remercie le donateur dans la chat
Affiche le montant total de la tip jar ainsi que le nom et la somme versée par le dernier donateur au dessus de l'objet contenant le script.
Vous avertie que vous avez reçu xxxL$ de xxxx
Elle est vraiment parfaite. Merci Netpat !
// Durée d'émission des particules en secondes
float DELAI = 4;
integer totaldonated;
string owner;
MakeParticles(key keydest)//This is the function that actually starts the particle system.
{
llParticleSystem([ //KPSv1.0
PSYS_PART_FLAGS , 0 //Comment out any of the following masks to deactivate them
| PSYS_PART_INTERP_COLOR_MASK //Colors fade from start to end
| PSYS_PART_INTERP_SCALE_MASK //Scale fades from beginning to end
| PSYS_PART_FOLLOW_VELOCITY_MASK //Particles are created at the velocity of the emitter
| PSYS_PART_EMISSIVE_MASK //Particles are self-lit (glow)
| PSYS_PART_TARGET_POS_MASK
| PSYS_PART_WIND_MASK
,PSYS_SRC_PATTERN, 2
,PSYS_SRC_TARGET_KEY, keydest
,PSYS_SRC_TEXTURE, llGetInventoryName(INVENTORY_TEXTURE,0) //desired particle texture
,PSYS_PART_MAX_AGE, 2.5 //Lifetime, in seconds, that a particle lasts
,PSYS_SRC_BURST_RATE, .5 //How long, in seconds, between each emission
,PSYS_SRC_BURST_PART_COUNT, 2 //Number of particles per emission
,PSYS_SRC_BURST_RADIUS, 1.0 //Radius of emission
,PSYS_SRC_ACCEL, <3.0,3.0,0.0> //Acceleration of particles each second
,PSYS_PART_START_ALPHA, 1.0 //Starting transparency, 1 is opaque, 0 is transparent.
,PSYS_PART_END_ALPHA, 0.0 //Ending transparency
,PSYS_PART_START_SCALE, <.20,.20,.20> //Starting particle size
,PSYS_PART_END_SCALE, <0.15,0.15,0.15> //Ending particle size, if INTERP_SCALE_MASK is on
,PSYS_SRC_OMEGA, <1.0,0.0,0.0> //Rotation of ANGLE patterns, similar to llTargetOmega()
]);
}
default
{
on_rez( integer sparam )
{
llResetScript();
}
state_entry()
{
owner = llKey2Name( llGetOwner() );
llSetPayPrice(100,[20,50,200,500]);
llSetText( "Tip Jar de " + owner + ".\nmerci pour votre tip !\n$L0 don de la tip jar",<.25,1,.65>,1);
}
money(key id, integer amount)
{
llSetTimerEvent(DELAI);
MakeParticles(id);
totaldonated += amount;
llSay(0, llKey2Name(id)+ " Merci beaucoup TY very much ! ");
llSetText( "Tip Jar de " + owner + ".\nTotal des versements " + (string)totaldonated + " $L"+"\nDernier don de :"+ (string)amount + " $L par "+ llKey2Name(id),<.25,1,.65>,1);
llOwnerSay((string)llKey2Name(id)+" a donné " + (string)amount + " $L.");
}
timer()
{
llParticleSystem([]);
}
}
Merci de ne pas commercialiser ce script qui a été créer gracieusement.
Dernière modification par Lundrah ; 25/06/2015 à 20h49.
|