Bidvertiser Merupakan Suatu layanan advertising, dimana jika kita sebagai publishernya (orang yang memberikan ruang /spacenya untuk iklan) mengiklankan product orang lain.
Bidevertiser Hampir Sama seperti google adsense, Layanan ini juga sangat mudah untuk didapatkan, cukup memberikan alamat blog kita untuk mereka review, dan kemudian mereka akan memberikan Script atau kode yang dapat kita tempatkan di website atau blog kita
Join Now
Bidvertiser akan membayarkan kita jika kita sudah mendapatkan $10, jadi jika kita sudah tidak bersabar untuk mendapatkan uangnya, ya kita ambil saja duitnya segera,
Ayo, tunggu apa lagi, mari bergabung di bidvertiser,
Kalau mau gabung dapat lewat alamat ini
Sabtu, 30 Agustus 2008
Jumat, 29 Agustus 2008
Kasus Video Porno
LAMPUNG - Pria berinisial R, yang diduga mengetahui penyebaran video panas PNS Lampung yang beredar dua minggu ini mengaku, dirinya tidak pernah melakukan pemindahan gambar dari handy cam ke cakram padat (CD).
"Saya memang mengenal dekat dengan mereka, tetapi mereka tidak pernah datang pada saya untuk minta tolong dtransferkan video ke dalam bentuk CD," kata R saat dihubungi, Kamis (27/3/2008).
Dia menjelaskan, dirinya tidak mengetahui bagaimana cara pentransferan tersebut. "Karena saya tidak menguasai programnya," tukasnya.
Sementara itu, Poltabes Bandar Lampung hari ini dijadwalkan akan melakukan pemanggilan kedua kepada R. Pasalnya, dalam pemanggilan yang pertama, penyiar berita salah satu televisi swasta ini tidak memenuhi panggilan.
"Kami memfokuskan pemeriksaan kepada proses penyebarakan. Karena AG dan SA terbukti membuat video tersebut untuk konsumsi Pribadi," ujar Kasat Reskrim Poltabes Bandar Lampung, Kompol Namora L Simanjuntak saat dihubungi terpisah.
Hal tersebut, lanjutnya, didasarkan atas bukti-bukti yang dikumpulkan pihak penyidik.
"Mereka sudah menikah dan kami sudah menerima surat nikahnya. Saat video ini dibuat, mereka telah resmi menjadi suami isteri. Dan ini akan dijadikan sebagai barang bukti," tegasnya.
Sebelumnya, R disebut-sebut sebagai orang yang dimintai tolong SA dan AG untuk memindahlan gambar dari handy cam ke CD yang dilakukan pada Juni 2005 lalu.
(Aji Aditya Junior/Trijaya/kem)
"Saya memang mengenal dekat dengan mereka, tetapi mereka tidak pernah datang pada saya untuk minta tolong dtransferkan video ke dalam bentuk CD," kata R saat dihubungi, Kamis (27/3/2008).
Dia menjelaskan, dirinya tidak mengetahui bagaimana cara pentransferan tersebut. "Karena saya tidak menguasai programnya," tukasnya.
Sementara itu, Poltabes Bandar Lampung hari ini dijadwalkan akan melakukan pemanggilan kedua kepada R. Pasalnya, dalam pemanggilan yang pertama, penyiar berita salah satu televisi swasta ini tidak memenuhi panggilan.
"Kami memfokuskan pemeriksaan kepada proses penyebarakan. Karena AG dan SA terbukti membuat video tersebut untuk konsumsi Pribadi," ujar Kasat Reskrim Poltabes Bandar Lampung, Kompol Namora L Simanjuntak saat dihubungi terpisah.
Hal tersebut, lanjutnya, didasarkan atas bukti-bukti yang dikumpulkan pihak penyidik.
"Mereka sudah menikah dan kami sudah menerima surat nikahnya. Saat video ini dibuat, mereka telah resmi menjadi suami isteri. Dan ini akan dijadikan sebagai barang bukti," tegasnya.
Sebelumnya, R disebut-sebut sebagai orang yang dimintai tolong SA dan AG untuk memindahlan gambar dari handy cam ke CD yang dilakukan pada Juni 2005 lalu.
(Aji Aditya Junior/Trijaya/kem)
Menigkatkan Pengunjung Dengan Keyword
kemarin saya mencoba-coba untuk membuat sebuah artikel dimana isinya tentang XXX ( cuma judulnya doank yang panas, isinya kagak ko orang isinya tentang kasus video porno)dan serial number,, Dan alhasil yang ga disangka-sangka saya dapet banyak penunjung,
Tips ini saya dapatkan dari web apa gitu namanya. Dimana dia membuat sebuah artikel dengan juudul yang panas banget, walaupun pada isi artikelnya tidak menunjukan bahwa itu isinya bertujuan untuk porno, Dan dia dapet banyak banget Pengunjung
Tips ini memang terbukti ampuh, karena dapat kita sadari bahwasanya otak mesum itu lebih banyak he.. udah kodratnya Kali ya manusia banyak mesumnya
Saya juga membuat suatu keyword yang memang sering sekali saya lakukan, sebagai Contoh, Gambar Aneh, Gambar aneh ni juga paling banyak trafiknya, Dan juga Sms Lucu dan kocak.
Jadi kalau ente mau dapet banyak penunjung , ya gunain aja cara diatas, Lumayan kok, bisa jadi 60 - 80 pengunjung sehari, Yah sekian artikel saya pada malam hari ini, semoga menambah wawasan dan membantu anda dalam meningkatkan pengunjung anda, Intinya Buatlah Judul yang kira-kira orang banyak mengetikanya di search engine,
Tips ini saya dapatkan dari web apa gitu namanya. Dimana dia membuat sebuah artikel dengan juudul yang panas banget, walaupun pada isi artikelnya tidak menunjukan bahwa itu isinya bertujuan untuk porno, Dan dia dapet banyak banget Pengunjung
Tips ini memang terbukti ampuh, karena dapat kita sadari bahwasanya otak mesum itu lebih banyak he.. udah kodratnya Kali ya manusia banyak mesumnya
Saya juga membuat suatu keyword yang memang sering sekali saya lakukan, sebagai Contoh, Gambar Aneh, Gambar aneh ni juga paling banyak trafiknya, Dan juga Sms Lucu dan kocak.
Jadi kalau ente mau dapet banyak penunjung , ya gunain aja cara diatas, Lumayan kok, bisa jadi 60 - 80 pengunjung sehari, Yah sekian artikel saya pada malam hari ini, semoga menambah wawasan dan membantu anda dalam meningkatkan pengunjung anda, Intinya Buatlah Judul yang kira-kira orang banyak mengetikanya di search engine,
Microsoft Vs Aplle
Perang bisnis antara Microsoft dan Apple terus memanas termasuk di ranah iklan. Microsoft baru saja menyewa komedian Hollywood, Jerry Seinfeld sebagai bintang iklan untuk menandingi iklan Apple yang dinilai melecehkan produk mereka.
Seinfeld yang populer dalam acara komedi situasi ini akan tampil bersama pendiri Microsoft, Bill Gates dalam produksi iklan tersebut. Aktor pengisi suara dalam film 'Bee Movie' ini dikabarkan dibayar sampai USD 10 juta.
Memang, dalam iklan Apple bertajuk "I'm a Mac, I'm a PC", ada sindiran bahwa software Microsoft kuno dan susah dipakai. Di situ ditampilkan figur yang mirip Bill Gates dibandingkan dengan anak muda yang mewakili komputer Mac. Tampaknya, iklan itu berhasil mencitrakan bahwa produk Apple kesannya menyenangkan dan produk Microsoft sebaliknya.

Seperti kebakaran jenggot, Microsoft merilis kampanye iklan senilai USD 300 juta dollar itu demi mengubah persepsi publik yang menilai Windows Vista sulit digunakan ketimbang software Apple Mac OS. Dengan slogan "Windows, Not Walls", iklan ini diklaim bakal menunjukkan bahwa software Windows sebagai media berekpresi yang hebat.
Microsoft menyewa biro iklan bernama Crispin+Bogusky yang cukup bereputasi. Biro itu pernah berjasa membesut iklan yang menyelamatkan profit perusahaan makanan Burger King. (detik)
Seinfeld yang populer dalam acara komedi situasi ini akan tampil bersama pendiri Microsoft, Bill Gates dalam produksi iklan tersebut. Aktor pengisi suara dalam film 'Bee Movie' ini dikabarkan dibayar sampai USD 10 juta.
Memang, dalam iklan Apple bertajuk "I'm a Mac, I'm a PC", ada sindiran bahwa software Microsoft kuno dan susah dipakai. Di situ ditampilkan figur yang mirip Bill Gates dibandingkan dengan anak muda yang mewakili komputer Mac. Tampaknya, iklan itu berhasil mencitrakan bahwa produk Apple kesannya menyenangkan dan produk Microsoft sebaliknya.

Seperti kebakaran jenggot, Microsoft merilis kampanye iklan senilai USD 300 juta dollar itu demi mengubah persepsi publik yang menilai Windows Vista sulit digunakan ketimbang software Apple Mac OS. Dengan slogan "Windows, Not Walls", iklan ini diklaim bakal menunjukkan bahwa software Windows sebagai media berekpresi yang hebat.
Microsoft menyewa biro iklan bernama Crispin+Bogusky yang cukup bereputasi. Biro itu pernah berjasa membesut iklan yang menyelamatkan profit perusahaan makanan Burger King. (detik)
Minggu, 24 Agustus 2008
Format Handphone
Jengkel, Sebel, Emosi itu perasaan kalau dah HP lemot Kena viruslah inilah itulah, nah apa Soulusi Buat Memecahkan masalah itu?kalau di komputer yang udah tau pasti format aja biar ga ribet, nah gitu juga di HP,
Gini Nich Cara Formatnya
Untuk HP symbian
1. Backup phonebook ke simcard,
2. Lepaskan MMC,
3. Ketik *#7370#
4. Kembali ke pengaturan awal ? Telephone akan melakukan restart. Tekan 'YA'.
5. Masukan kode kunci telephone ( jika kode telephonenya belum di ganti, kode kunci standard telephone adalah 12345 ).
6. Selesai.
Jika memformat / hardreset HP, semua aplikasi Java (extensi *.jar, *.jad) harus di install ulang.
atau jika tidak befungsi anda juga bisa membuat keadaan handphone kembali ke settingan awal dengan
ketik *#7780#
Gini Nich Cara Formatnya
Untuk HP symbian
1. Backup phonebook ke simcard,
2. Lepaskan MMC,
3. Ketik *#7370#
4. Kembali ke pengaturan awal ? Telephone akan melakukan restart. Tekan 'YA'.
5. Masukan kode kunci telephone ( jika kode telephonenya belum di ganti, kode kunci standard telephone adalah 12345 ).
6. Selesai.
Jika memformat / hardreset HP, semua aplikasi Java (extensi *.jar, *.jad) harus di install ulang.
atau jika tidak befungsi anda juga bisa membuat keadaan handphone kembali ke settingan awal dengan
ketik *#7780#
Kamis, 21 Agustus 2008
UI redesign
Every now and then the SL blogosphere creates a lot of buzz and interest around the topic of Second Life client UI redesign. I must say whenever the topic is mentioned I'm getting worried. Almost each time a change to the UI was introduced, it was for the worse (note I didn't say 'always').
I really wish Linden Lab stopped thinking about UI redesign and didn't listen to people who complain. I don't want an oversimplified UI design - it would be much more difficult to use because you'd have to SEARCH for every option, while now you just have them in the menu. Can you imagine Photoshop with four huge icons? And using those icons to find the options you need? I really don't want that to happen to Second Life viewer.
Right now people don't know what some of the options are for but they can test them once they become comfortable with the idea. If you hide the options, they won't even know they're available. Moreover, when they would want to find a certain option, they'd probably search the Internet and it would only make things more confusing ("What Advanced menu? I don't have it...").
People take part in UI redesign contests, blog their ideas and post pictures of proposed viewer appearances - and while some of their ideas are interesting, in most cases what I saw is quite scary. Huge icons filling half of the screen, CAPITALIZED menus, chaotic build menus, Advanced menu gone (I use it daily!), camera controls float which takes up 1/4 of the screen... OR there are also overly textified versions where half of the screen is filled with text. And I mean the little (like little little) text plus miniature icons, each one looking like a dot, or a blob in some cases. I saw weird and unnecessary tabs like Worn which is supposed to show what you are wearing (like I can't type 'worn' in the inventory search). I saw mini map changed into a radar thingie... Whyyy? Why would I want that? I want to see objects on mini map like I do now, with directions NW, N etc. It's a map, not a radar... please. I've also read some people want to remove the Notes from avatar's profiles. I use them frequently! I even use my own profile notes. I don't think they should be removed, actually I think they could be improved a bit (more space for notes, built-in search etc.). So with all those proposed changes I see more clicking, more searching, more time needed to learn! And less functionality, unfortunately.
I want the UI to take minimum screen space (but to be clear and legible at the same time) to have as much of the screen as possible for other uses. The current two bars on top and bottom are just perfect. Actually, the current SL interface is a lovely mix between functionality, usability, intuitive design and the calm blue color. Some minor changes could be made (more on that later) but a redesign is not needed.

The problem with SL interface is not really the interface itself. It's the people who use it. They don't look carefully, they don't follow the tutorials. If only people were willing to learn and to read with understanding, there would be no need to think about redesigning the UI. I don't want to grumble, I know these people are SL users too and it's important for designers to think about them. But it's important not to fall into extreme thinking as well. I know it's easy to criticise and you could say "make your own UI then"... but hey, didn't I say I don't want the interface redesign? Besides, residents are not usability experts, so I think they should have the ability to make their own skins (not only the colours but also the layout - like Winamp skins for example), but not influence the default look of the viewer.
I think it would be a good idea to make a newbie/light viewer for those less comfortable with advanced menus. I've also read somewhere about an idea of switching between three levels of interface, from an easy one, to a more sophisticated one. If you can make the third level look like the interface now, that solution is fine with me.
I also would like to say that good UI design is not all about the looks. The look IS important, but it's not the only thing the interface design is about. I don't really mind that the current SL buttons are not shiny (and I really like the way they look now). The menu is extremely intuitive (4 hours! come on! try to learn any other complex application in 4 hours) and that is what counts. Actually, shiny would be distracting (like the eye-dazzling Dazzle - it does have pretty buttons, but they are totally out-of-place in the viewer). What also counts is the efficiency - once familiarised with the menu, how fast we can do stuff. The viewer gets a pretty good score in this test, I think.
It seems that most UI redesign discussions focus on wrong issues as to what SL UI needs. When people state their needs, it's not required to do exactly what they say. What's needed is the answer to their requests, but not necessarily the way they imagined it. Jakob Nielsen (usability guru, very often quoted on my uni lectures) says you should pay attention to what people do, not what they say. How true is that? He actually wrote 10 usability heuristics and my favourite is the one that says you should let people choose instead of making them remember. I'm not saying everything should be visible (so it's OK to hide the Advanced menu for example). But don't hide the options that are needed just because they make menus a bit more complex.
Finally, I want to list the positive suggested changes - the ones I actually liked:
I really wish Linden Lab stopped thinking about UI redesign and didn't listen to people who complain. I don't want an oversimplified UI design - it would be much more difficult to use because you'd have to SEARCH for every option, while now you just have them in the menu. Can you imagine Photoshop with four huge icons? And using those icons to find the options you need? I really don't want that to happen to Second Life viewer.
Right now people don't know what some of the options are for but they can test them once they become comfortable with the idea. If you hide the options, they won't even know they're available. Moreover, when they would want to find a certain option, they'd probably search the Internet and it would only make things more confusing ("What Advanced menu? I don't have it...").
People take part in UI redesign contests, blog their ideas and post pictures of proposed viewer appearances - and while some of their ideas are interesting, in most cases what I saw is quite scary. Huge icons filling half of the screen, CAPITALIZED menus, chaotic build menus, Advanced menu gone (I use it daily!), camera controls float which takes up 1/4 of the screen... OR there are also overly textified versions where half of the screen is filled with text. And I mean the little (like little little) text plus miniature icons, each one looking like a dot, or a blob in some cases. I saw weird and unnecessary tabs like Worn which is supposed to show what you are wearing (like I can't type 'worn' in the inventory search). I saw mini map changed into a radar thingie... Whyyy? Why would I want that? I want to see objects on mini map like I do now, with directions NW, N etc. It's a map, not a radar... please. I've also read some people want to remove the Notes from avatar's profiles. I use them frequently! I even use my own profile notes. I don't think they should be removed, actually I think they could be improved a bit (more space for notes, built-in search etc.). So with all those proposed changes I see more clicking, more searching, more time needed to learn! And less functionality, unfortunately.
I want the UI to take minimum screen space (but to be clear and legible at the same time) to have as much of the screen as possible for other uses. The current two bars on top and bottom are just perfect. Actually, the current SL interface is a lovely mix between functionality, usability, intuitive design and the calm blue color. Some minor changes could be made (more on that later) but a redesign is not needed.

The problem with SL interface is not really the interface itself. It's the people who use it. They don't look carefully, they don't follow the tutorials. If only people were willing to learn and to read with understanding, there would be no need to think about redesigning the UI. I don't want to grumble, I know these people are SL users too and it's important for designers to think about them. But it's important not to fall into extreme thinking as well. I know it's easy to criticise and you could say "make your own UI then"... but hey, didn't I say I don't want the interface redesign? Besides, residents are not usability experts, so I think they should have the ability to make their own skins (not only the colours but also the layout - like Winamp skins for example), but not influence the default look of the viewer.
I think it would be a good idea to make a newbie/light viewer for those less comfortable with advanced menus. I've also read somewhere about an idea of switching between three levels of interface, from an easy one, to a more sophisticated one. If you can make the third level look like the interface now, that solution is fine with me.
I also would like to say that good UI design is not all about the looks. The look IS important, but it's not the only thing the interface design is about. I don't really mind that the current SL buttons are not shiny (and I really like the way they look now). The menu is extremely intuitive (4 hours! come on! try to learn any other complex application in 4 hours) and that is what counts. Actually, shiny would be distracting (like the eye-dazzling Dazzle - it does have pretty buttons, but they are totally out-of-place in the viewer). What also counts is the efficiency - once familiarised with the menu, how fast we can do stuff. The viewer gets a pretty good score in this test, I think.
It seems that most UI redesign discussions focus on wrong issues as to what SL UI needs. When people state their needs, it's not required to do exactly what they say. What's needed is the answer to their requests, but not necessarily the way they imagined it. Jakob Nielsen (usability guru, very often quoted on my uni lectures) says you should pay attention to what people do, not what they say. How true is that? He actually wrote 10 usability heuristics and my favourite is the one that says you should let people choose instead of making them remember. I'm not saying everything should be visible (so it's OK to hide the Advanced menu for example). But don't hide the options that are needed just because they make menus a bit more complex.
Finally, I want to list the positive suggested changes - the ones I actually liked:
- ability to copy, cut and paste in the inventory (Ctrl+C/Ctrl+X and Ctrl+V)
- ability to relog without the need to close the viewer
- ability to hide the "Release Keys" button
- a drop down list of recently visited places (like a history of visited websites in a web browser)
- a third tab in the inventory, called Favourites, listing items you marked as favourites (for items you use frequently)
- ability to group people on the friends list into your own tabs
- ability to set the range of the mini map (to more than one sim for example)
- ability to find doubling items in the inventory (could be done by UUID)
- ability to browse objects in the inventory by creator
- ability to decide where to place the item you are given by another avatar (so that they don't go to the default folders but where you actually want them to go)
- a Windlight preferred setting option in the Environment Settings menu - without the need to click your way through the Environment Editor OR/AND the ability to make your SL start with your preferred Windlight settings
- a link provided with every error message that takes the user to the appropriate knowledge base article
- undo inventory move - how many times have I accidentaly moved one folder into another and kept searching which one that was and where I've put it
- marking recent items so that they don't show up anymore in Recent Items tab (sometimes there's too many recent items, and you might want to remove some this way)
- ability to decide whether the viewer should auto-hide the Tools menu (according to JIRA, the menu won't be hiding anymore in 1.21, which would be just perfect)
- ability to set IM autoresponder
- ability to switch between different built-in follow cams
- ability to add people to existing text and voice conferences (currently when someone crashes you need to re-start the conference for everyone)
Rabu, 20 Agustus 2008
Scripting summer drinks
This is an article I wrote for the latest issue of SL'ang Life magazine. Since it never came out, I adapted the article a bit and decided to publish it on my blog. If the tutorial gets popular, I might write some more :)
Don't get scared or discouraged seeing all the code here - the tutorial is aimed at people who never scripted before, so I'm sure you'll understand it, just go bit by bit. And you are welcome to ask questions in the comments of course. So, here it is.

When the weather is hot and sunny, avatars can cool off by drinking refreshing beverages. Unlike real life, after they make their yummy drink, they still have some work to do before it's ready. It's because objects in SL that are supposed to interact with avatars must be scripted. Today we'll learn how to script and animate a summer drink - the easy way!
The first thing to do is to create the drink object. This is where you let your creative power flow freely - I'm sure you'll come up with a yummy looking juice or ice tea. This part is up to you - the tutorial will focus on scripting only. Take time making your drink object, and once you have it ready, let's script!
PREPARATION
Rez your drink on the floor (or table, if you prefer), right-click it, select Edit from the pie menu and go to Contents tab (if you don't see the tab, click the blue More button). You will see there's a button that says New Script - click it. The drink will greet you with 'Hello, Avatar!' phrase and you'll notice a new item in the contents, named New script. Right-click it, select Rename, type in any name you want (for example Drink script) and press Enter on your keyboard. Right-click the script again and this time select Open. You'll see a window with a default LSL script. This is where we are going to work now.
Delete the whole default script (all the text), so that you start with a blank page, and type in:
This indicates the default state that every script must have. When the script is first run (or reset), it enters this state and does what is listed in here. The brackets indicate where the list of tasks starts and ends. We are going to put our tasks inside the brackets.
PERMISSION TO ANIMATE
The first thing we need to do in our drink script is to check whether the object (drink) containing the script is attached to an avatar. We'll use attach event handler, which is activated when an object is attached to or detached from an avatar.
Attach event handler has one parameter - a key named id. Parameters in LSL are used to store values important for various functions, in this case a key. Each avatar has a unique key that identifies him in Second Life. So in this case the id parameter stores the key of an avatar who attached the object with the script. If the object is not attached to any avatar, the id parameter will store an empty key: NULL_KEY. We can use that information to tell the script what to do in both cases. If the script finds out that the object is not attached (id stores NULL_KEY), we're not going to do anything (for now). Otherwise (if it is attached), we want the script to ask the avatar for permission to animate him.
Note that we use "==", not "=" to compare whether two values are equal. The latter ("=") would assign the value to the parameter.
When an avatar attaches an object, the permission to animate is granted automatically (user don't get the dialog box with the question), but the script has to ask for the permission first anyway. To ask for permission we'll use llRequestPermissions function. It needs two pieces of information: whom to ask (we need to give an avatar's key) and what type of permissions it should ask for (there are various types of permissions, like permission to animate, permission to track avatar's camera, permission to take money etc. - they are all described in LSL Portal). We want to request permission from the avatar who attached the object, so we will use the id parameter here. And since we need a permission to animate him, we'll use PERMISSION_TRIGGER_ANIMATION flag. Remember you need to place ; (a semicolon) at the end of every function, otherwise you won't be able to save your script (it will give an error).
HOLD THE GLASS
Now we have to tell the script what to do when the permissions are granted. We need the run_time_permissions event handler, which is triggered when the avatar responds to permissions request - either gives or doesn't give the permission. That's why we also have to make sure the permission was granted. Run_time_permissions event handler has one parameter - perm. If no permissions are set, this parameter has value of 0. Otherwise it stores the granted permissions flags. So, what we need is a situation where perm == PERMISSIONS_TRIGGER_ANIMATION. To check that we'll use an if statement similar to the one we used in attach event handler (note that else statement is optional).
Once we're sure the permission was granted, we want to animate the avatar, so that he is holding the drink. You can create your own holding animation and place it in your drink's contents or use one of SL built-in animations (they are listed on the wiki). The built-in animation "hold_R_handgun" is perfect for holding a drink and that's what we are going to use. To start the animation, use llStartAnimation function.
LET ME TAKE A SIP
So far, so good, but we still need a bit more scripting. Holding animation is not enough, as we want our avatar to take a sip every few seconds. That's why we are going to set up a timer in our script. Let's say we want the avatar to sip the drink every 15 seconds. We'll use llSetTimerEvent function (set to 15 seconds) in run_time_permissions event handler, right after we start the holding animation. So now when permissions are granted, the script will start the holding animation and then will start up the timer. And you probably have guessed now that we need another event handler: timer, which will be triggered every 15 seconds (the time we set) and where we'll list the tasks to be done. Timer doesn't have any parameters, as it doesn't really need any. Inside this event handler we only need one task: trigger a drinking animation. We'll use again a built-in animation: "drink", but you might want to create your own animation and drag it from your inventory into your object contents.
I FINISHED DRINKING
The script is almost finished but there's one more thing we need to do - tell the script what tasks to perform when the object is detached from the avatar. We are going to place these in the attach event handler. If the script finds out that the object is detached (id stores NULL_KEY), it should stop the holding animation, stop the drinking animation and stop the timer. To stop the animations, we'll use llStopAnimation function and to stop the timer, we'll set the timer event to 0.
SAVE
Our script is now ready to save! Click the Save button at the bottom of the window. You should see a message Compile successful, saving... Wait until you'll see another message: Save complete. Note: if you can't save the script because it gives you a syntax error, or any other error, make sure you typed everything correctly. If you accidentally omit one semicolon, or make one spelling mistake, the script won't save. Just go through the script, try to find your mistake (there might be more than one) and click the Save button again.
Once the script is saved you can close the window and take your drink object to your inventory. Right-click it in your inventory and attach it to your right hand (you need to do it only the first time - later you can just use Wear option, as the drink will remember where to attach). You might need to rotate and adjust the glass while it's attached to your avatar. And that's it. Your drink is ready and your avatar should be holding it and drinking properly. Congratulations, you have compiled your first script!
OH, THE POSSIBILITIES
Note that you can script ice cream cones exactly the same way. It's a basic script for eating and drinking in Second Life, although many designers come up with their own, more sophisticated scripts. Which is something you might want to do as well. Just do trial and error, lookup new functions on LSL Portal or try various animations. Scripting is easy and fun and I'm sure you can learn it fast.
If you have any problems with this tutorial, you're welcome to ask a question in the comments. And if you decide to throw a party and serve your freshly scripted drinks, be sure to invite me!
Don't get scared or discouraged seeing all the code here - the tutorial is aimed at people who never scripted before, so I'm sure you'll understand it, just go bit by bit. And you are welcome to ask questions in the comments of course. So, here it is.

When the weather is hot and sunny, avatars can cool off by drinking refreshing beverages. Unlike real life, after they make their yummy drink, they still have some work to do before it's ready. It's because objects in SL that are supposed to interact with avatars must be scripted. Today we'll learn how to script and animate a summer drink - the easy way!
The first thing to do is to create the drink object. This is where you let your creative power flow freely - I'm sure you'll come up with a yummy looking juice or ice tea. This part is up to you - the tutorial will focus on scripting only. Take time making your drink object, and once you have it ready, let's script!
PREPARATION
Rez your drink on the floor (or table, if you prefer), right-click it, select Edit from the pie menu and go to Contents tab (if you don't see the tab, click the blue More button). You will see there's a button that says New Script - click it. The drink will greet you with 'Hello, Avatar!' phrase and you'll notice a new item in the contents, named New script. Right-click it, select Rename, type in any name you want (for example Drink script) and press Enter on your keyboard. Right-click the script again and this time select Open. You'll see a window with a default LSL script. This is where we are going to work now.
Delete the whole default script (all the text), so that you start with a blank page, and type in:
default
{
}
{
}
This indicates the default state that every script must have. When the script is first run (or reset), it enters this state and does what is listed in here. The brackets indicate where the list of tasks starts and ends. We are going to put our tasks inside the brackets.
PERMISSION TO ANIMATE
The first thing we need to do in our drink script is to check whether the object (drink) containing the script is attached to an avatar. We'll use attach event handler, which is activated when an object is attached to or detached from an avatar.
default
{
{
attach (key id)
{
}
}{
}
Attach event handler has one parameter - a key named id. Parameters in LSL are used to store values important for various functions, in this case a key. Each avatar has a unique key that identifies him in Second Life. So in this case the id parameter stores the key of an avatar who attached the object with the script. If the object is not attached to any avatar, the id parameter will store an empty key: NULL_KEY. We can use that information to tell the script what to do in both cases. If the script finds out that the object is not attached (id stores NULL_KEY), we're not going to do anything (for now). Otherwise (if it is attached), we want the script to ask the avatar for permission to animate him.
default
{
{
attach (key id)
{
}{
if (id == NULL_KEY)
{
}
else
{
}{
}
else
{
llRequestPermissions (id, PERMISSION_TRIGGER_ANIMATION);
}Note that we use "==", not "=" to compare whether two values are equal. The latter ("=") would assign the value to the parameter.
When an avatar attaches an object, the permission to animate is granted automatically (user don't get the dialog box with the question), but the script has to ask for the permission first anyway. To ask for permission we'll use llRequestPermissions function. It needs two pieces of information: whom to ask (we need to give an avatar's key) and what type of permissions it should ask for (there are various types of permissions, like permission to animate, permission to track avatar's camera, permission to take money etc. - they are all described in LSL Portal). We want to request permission from the avatar who attached the object, so we will use the id parameter here. And since we need a permission to animate him, we'll use PERMISSION_TRIGGER_ANIMATION flag. Remember you need to place ; (a semicolon) at the end of every function, otherwise you won't be able to save your script (it will give an error).
HOLD THE GLASS
Now we have to tell the script what to do when the permissions are granted. We need the run_time_permissions event handler, which is triggered when the avatar responds to permissions request - either gives or doesn't give the permission. That's why we also have to make sure the permission was granted. Run_time_permissions event handler has one parameter - perm. If no permissions are set, this parameter has value of 0. Otherwise it stores the granted permissions flags. So, what we need is a situation where perm == PERMISSIONS_TRIGGER_ANIMATION. To check that we'll use an if statement similar to the one we used in attach event handler (note that else statement is optional).
Once we're sure the permission was granted, we want to animate the avatar, so that he is holding the drink. You can create your own holding animation and place it in your drink's contents or use one of SL built-in animations (they are listed on the wiki). The built-in animation "hold_R_handgun" is perfect for holding a drink and that's what we are going to use. To start the animation, use llStartAnimation function.
default
{
{
attach (key id)
{
{
if (id == NULL_KEY)
{
}
else
{
}{
}
else
{
llRequestPermissions (id, PERMISSION_TRIGGER_ANIMATION);
}run_time_permissions (integer perm)
{
}{
if (perm == PERMISSION_TRIGGER_ANIMATION)
{
}{
llStartAnimation ("hold_R_handgun");
}LET ME TAKE A SIP
So far, so good, but we still need a bit more scripting. Holding animation is not enough, as we want our avatar to take a sip every few seconds. That's why we are going to set up a timer in our script. Let's say we want the avatar to sip the drink every 15 seconds. We'll use llSetTimerEvent function (set to 15 seconds) in run_time_permissions event handler, right after we start the holding animation. So now when permissions are granted, the script will start the holding animation and then will start up the timer. And you probably have guessed now that we need another event handler: timer, which will be triggered every 15 seconds (the time we set) and where we'll list the tasks to be done. Timer doesn't have any parameters, as it doesn't really need any. Inside this event handler we only need one task: trigger a drinking animation. We'll use again a built-in animation: "drink", but you might want to create your own animation and drag it from your inventory into your object contents.
default
{
{
attach (key id)
{
{
if (id == NULL_KEY)
{
}
else
{
}{
}
else
{
llRequestPermissions (id, PERMISSION_TRIGGER_ANIMATION);
}run_time_permissions (integer perm)
{
timer()
{
}{
if (perm == PERMISSION_TRIGGER_ANIMATION)
{
}{
llStartAnimation ("hold_R_handgun");
llSetTimerEvent (15);
}llSetTimerEvent (15);
timer()
{
llStartAnimation ("drink");
}I FINISHED DRINKING
The script is almost finished but there's one more thing we need to do - tell the script what tasks to perform when the object is detached from the avatar. We are going to place these in the attach event handler. If the script finds out that the object is detached (id stores NULL_KEY), it should stop the holding animation, stop the drinking animation and stop the timer. To stop the animations, we'll use llStopAnimation function and to stop the timer, we'll set the timer event to 0.
default
{
{
attach (key id)
{
{
if (id == NULL_KEY)
{
else
{
}{
llStopAnimation ("drink");
llStopAnimation ("hold_R_handgun");
llSetTimerEvent (0);
}llStopAnimation ("hold_R_handgun");
llSetTimerEvent (0);
else
{
llRequestPermissions (id, PERMISSION_TRIGGER_ANIMATION);
}run_time_permissions (integer perm)
{
timer()
{
}{
if (perm == PERMISSION_TRIGGER_ANIMATION)
{
}{
llStartAnimation ("hold_R_handgun");
llSetTimerEvent (15);
}llSetTimerEvent (15);
timer()
{
llStartAnimation ("drink");
}SAVE
Our script is now ready to save! Click the Save button at the bottom of the window. You should see a message Compile successful, saving... Wait until you'll see another message: Save complete. Note: if you can't save the script because it gives you a syntax error, or any other error, make sure you typed everything correctly. If you accidentally omit one semicolon, or make one spelling mistake, the script won't save. Just go through the script, try to find your mistake (there might be more than one) and click the Save button again.
Once the script is saved you can close the window and take your drink object to your inventory. Right-click it in your inventory and attach it to your right hand (you need to do it only the first time - later you can just use Wear option, as the drink will remember where to attach). You might need to rotate and adjust the glass while it's attached to your avatar. And that's it. Your drink is ready and your avatar should be holding it and drinking properly. Congratulations, you have compiled your first script!
OH, THE POSSIBILITIES
Note that you can script ice cream cones exactly the same way. It's a basic script for eating and drinking in Second Life, although many designers come up with their own, more sophisticated scripts. Which is something you might want to do as well. Just do trial and error, lookup new functions on LSL Portal or try various animations. Scripting is easy and fun and I'm sure you can learn it fast.
If you have any problems with this tutorial, you're welcome to ask a question in the comments. And if you decide to throw a party and serve your freshly scripted drinks, be sure to invite me!
Langganan:
Postingan (Atom)