Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need notecard reader

Nero Draper
Registered User
Join date: 15 Nov 2005
Posts: 5
11-15-2005 17:18
Ok what im looking for is a way i can put peoples names in a notecard and when anyone that gets in range of me thats in the notecard will be pushed away, I'm not talking about any magior push just something to keep the unwanted people that are in the notecard away. Mabey even a way i can use chat commands to add and remove people from the noetcard. Thanks in advance!


Nero
Rayven Churchill
Registered User
Join date: 18 Sep 2005
Posts: 10
11-15-2005 22:59
Unfortunately, what you're looking for isn't possible at the moment. A script can't write to a notecard; you'd have to manually add/remove people from the notecard's contents. You also can't read dynamically from the notecard as if it were a text file; you'd have to use llGetNumberofNotecardLines() and llGetNotecardLines() to pull each individual line, one at a time, out of the notecard, and store it in script memory in a list. Take a look at the LSL Wiki on llGetNotecardLines() and the dataserver event for a better understanding of reading info out of a notecard.

As for the detection/pushing part of the script, llSensorRepeat() every X seconds followed by a gun-like action that shoots the target with a bit of force toward the target's location.
Lit Noir
Arrant Knave
Join date: 3 Jan 2004
Posts: 260
11-16-2005 13:34
Right, you can't write to a notecard from a script. Reading from a notecard (and maybe having it refresh on a timer every so often, by a dialog/chat command, or maybe by dropping a new card and detecting inventory change and reading it) is quite doable. The dataserver examples out there, though tricky, are set up to do this.

Chat commands to add or remove could be done, but would have to be stored in a list in the script, it could not be output to the notecard. But since you would have to read the notecard into a list anyway as Rayven mentioned, it doesn't seem that this would be a deal breaker. Unless you are talking about a LOT of avatars.

As for the purpose of the script, as I understand it, push risks TOS smackdown. May be fine in this case, but you'd want to review the threads to be SURE you aren't scripting yourself into abuse report hell.
Nero Draper
Registered User
Join date: 15 Nov 2005
Posts: 5
11-16-2005 20:29
well i was going to use it either in a damage sim or weapons testing, so i wouldnt be using in a place where shooting is aginst the TOS. It really doesnt matter to me if i keep the list of people in a notecard or in the scripts, i would perfer if it was in the scripts memory, becuse then i could add and remove the names with chat commands, but i still wouldnt know how to make this, Anybody like to help? Thanks!
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
11-17-2005 02:14
So really you want a list of people that will be sensed and pushed away? If you're interested in scripting:

--create a list
--create a llDialog or llListen sequence for adding/subtracting/viewing your list.
--engage a llSensorRepeat
--if person is on list, push away.


If you're not interested in scripting...you can contact me in-game and we'll discuss a price depending upon what kind of permissions you want from the script and your intent of use.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.