Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help with a Pay to Unsit script

Scorpion Aristocrat
2D Vector Designer
Join date: 30 Oct 2008
Posts: 28
12-31-2008 02:26
Ok, I have really no clue at all about scripting, so i'm here to see if anyone can help. I own a rather large camp ground with over 65+ Camping/Prize chairs. I would like to add a bit more excitement to the camp grounds though. What i have in mind is a script i can drop in a sign next to a camper. In theory this script would allow any resident to Pay the sign & it will unsit the camper. Maybe a combo of ||GiveMoney / ||Unsit / ||Listener - with the listener set at 1 meter in the camper to hear the sign when its payed to unsit the person one it?

Well, Like I said, i'm no scripter, so any help would be greatly appreciated. Thanks in advance :)
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
12-31-2008 09:57
Unless you're interested in learning to script, try "Products Wanted".

If you're interested in learning to script, then read the stickies and get the first clue. Experiment with basic sit/animate scripts; you'll find some in the examples (both on the Wiki and probably in the library forum here).

Once you know how to make (or find and modify) a basic camping script, we can help you add the feature you're looking for. Basically, if the sign is linked to the camper chair, on payment the sign would send a linked message to the chair prim (see llMessageLinked and link_message handler in the scripting wiki), and the chair prim would unsit the avatar.

You'll also want to look at scripts that use money even handler, such as simple vendors.

HTH
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
12-31-2008 10:01
BTW, you're likely to get a bit of a frosty welcome on these forums, since most camping is intended to bump up the parcel's traffic rating, which is gaming the system to get unfairly high rankings in Search, and it has an adverse effect on SL in general since each camper uses resources. This is true even if you occupy a whole region, though that's the least offensive case.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
Ebil
12-31-2008 17:24
oh I dunno, I think the idea of forcing a camper to unsit is funny as hell.

insert this bit in your working state
CODE

money( key vKeyPrankster , integer vIntCash ){
vKeyCamper = llAvatarOnSitTarget();
if (vKeyCamper){
llShout( 0, llKey2Name( vKeyPrankster ) + " just paid "
+ (string)vIntCash + "L$ to push "
+ llKey2Name( vKeyCamper ) + " off their seat!");
llUnSit( vKeyCamper );
}
}
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
12-31-2008 17:33
Scorpion nice idea lol.

here is a good start for ya

key Avatar;
list DEFAULT_QUICK_PAY_AMOUNTS = [5, 10, 20, 50];
integer DEFAULT_PRICE = PAY_DEFAULT;
default
{
on_rez(integer start_param)
{
llResetScript();
}

state_entry()
{
llSetPayPrice(DEFAULT_PRICE, DEFAULT_QUICK_PAY_AMOUNTS);
}

changed(integer change)
{

if (change & CHANGED_LINK)
{
Avatar = llAvatarOnSitTarget();
}
}

money(key id, integer amount)
{

}
}
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
12-31-2008 19:09
From: Void Singer
oh I dunno, I think the idea of forcing a camper to unsit is funny as hell.

Heh. Me too. Maybe consider giving the payment to the camper to smooth tempers over though. :cool:
Scorpion Aristocrat
2D Vector Designer
Join date: 30 Oct 2008
Posts: 28
01-01-2009 13:22
Thanks Void & Jenn, I'll test both your versions sometime today :)

Hewee, Nah, The payment goes to me.. I'll make sure to have a HUGE sign with instructions encouraging all residents to Kick A Camper & take there turn at trying to earn their L$ Prize. I figure as long as I make it Clear how the particular special campers work, nobody can get upset with me, but they might get upset at the kicker, which will result in them paying the camper to kick them back... lol

The way i see it is, they get some excitement, a bit of dedication to win the L$, & I get paid in the process too. Which their payment will basically just be compensating me for other campers I paid out to :)
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
01-01-2009 17:38
...of course bots may automatically resit before the kicker can get in there...
_____________________
http://slurl.com/secondlife/Together
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
01-01-2009 19:24
What's to keep the shop keeper from using alts / bots to unsit the campers before they've earned anything?
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
01-01-2009 19:53
From: Winter Ventura
What's to keep the shop keeper from using alts / bots to unsit the campers before they've earned anything?


Economic self-interest. If people find that the OP is sabotaging their game of unsitting each other for a shot at the L$ prize, they'll stop playing and he'll lose the income from it. The OP would kill the whole thing if he let bots do the unseating.
Scorpion Aristocrat
2D Vector Designer
Join date: 30 Oct 2008
Posts: 28
01-01-2009 20:04
From: Escort DeFarge
...of course bots may automatically resit before the kicker can get in there...


hmm, you bring up a good point on the resit Escort... I saw a camper once that had a resit timer in it & would not allow the same person to camp 2 times in a row on the same object, it had a 5 minute timer (Plenty of time for the Payee to grab the object from them). anyone know how to script that so i can add it with it? :)
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
01-02-2009 14:17
From: Scorpion Aristocrat
Thanks Void & Jenn, I'll test both your versions sometime today :)

Hewee, Nah, The payment goes to me.. I'll make sure to have a HUGE sign with instructions encouraging all residents to Kick A Camper & take there turn at trying to earn their L$ Prize. I figure as long as I make it Clear how the particular special campers work, nobody can get upset with me, but they might get upset at the kicker, which will result in them paying the camper to kick them back... lol

The way i see it is, they get some excitement, a bit of dedication to win the L$, & I get paid in the process too. Which their payment will basically just be compensating me for other campers I paid out to :)



so basically there's a pot on a timer. someone sits to try to win the pot. others can add to the pot to force the current sitter to unsit so they can sit down. whoever's sitting down when the timer goes off in the pot gets the money? what happens if no one is sitting? is the pot carried over to the next timer cycle, or does the seat keep track of who was sitting last and pay them? sounds like a cool camping chair idea, and might be fun in clubs as apposed to sploders. even a skill sploder i saw that whoever was last to pay would get the pot
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
01-02-2009 14:32
From: Scorpion Aristocrat
hmm, you bring up a good point on the resit Escort... I saw a camper once that had a resit timer in it & would not allow the same person to camp 2 times in a row on the same object, it had a 5 minute timer (Plenty of time for the Payee to grab the object from them). anyone know how to script that so i can add it with it? :)

Maybe better would be to check the sitting avatar's key against who just paid. For X minutes, unsit anyone who isn't that avatar, so it's like a reservation (and stop reserving as soon as the right avatar grabs the seat, so you can get on with the pay-to-unsit game).
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
01-02-2009 15:36
This reminded me of the hilarious 'Reverse Camping Chair' that Adz Childs posted in the Scripting Library.

/54/dc/242902/1.html

It might also make a decent starting point for what you are trying to do.
_____________________
http://wiki.secondlife.com/wiki/User:debbie_Trilling
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
01-02-2009 16:31
From: Scorpion Aristocrat
hmm, you bring up a good point on the resit Escort... I saw a camper once that had a resit timer in it & would not allow the same person to camp 2 times in a row on the same object, it had a 5 minute timer (Plenty of time for the Payee to grab the object from them). anyone know how to script that so i can add it with it? :)

Yes, I know how to script that, thank you very much.

Is this the "do you know how to script" forum now? Generally the answer will be "yes" or "no".
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Scorpion Aristocrat
2D Vector Designer
Join date: 30 Oct 2008
Posts: 28
01-03-2009 13:12
From: Ruthven Willenov
so basically there's a pot on a timer. someone sits to try to win the pot. others can add to the pot to force the current sitter to unsit so they can sit down. whoever's sitting down when the timer goes off in the pot gets the money? what happens if no one is sitting? is the pot carried over to the next timer cycle, or does the seat keep track of who was sitting last and pay them? sounds like a cool camping chair idea, and might be fun in clubs as apposed to sploders. even a skill sploder i saw that whoever was last to pay would get the pot


That's a neat idea too & close to what I ment, but not the same... Instead of a timer, I decided to drop in an AFK question script that prompts every 5 minutes & the answers changes location randomly. Hopefully that will word off any bot attempts.

I still haven't tested it all out yet, just doing some fine tuning now, Thanks for everyones input & help on this project. :)

Project Recap:::

1.) Camper sits on an object that pays L$20 per 45 minutes
2.) Object has an every 5 min. AFK question insuring its a real person camping
3.) Object allows other residents to pay L$1 to eject them from the object & take their own turn
4.) Large sign with instructions posted to insure no miscommunication
5.) People visiting to camp become more Interactive & aren't just sitting around doing nothing & getting bored out of their minds.

From: Ordinal Malaprop
Yes, I know how to script that, thank you very much.

Is this the "do you know how to script" forum now? Generally the answer will be "yes" or "no".


Thanks for letting me know, though I decided not to use a timer :)
Scorpion Aristocrat
2D Vector Designer
Join date: 30 Oct 2008
Posts: 28
01-03-2009 13:53
From: Void Singer
oh I dunno, I think the idea of forcing a camper to unsit is funny as hell.

insert this bit in your working state
CODE

money( key vKeyPrankster , integer vIntCash ){
vKeyCamper = llAvatarOnSitTarget();
if (vKeyCamper){
llShout( 0, llKey2Name( vKeyPrankster ) + " just paid "
+ (string)vIntCash + "L$ to push "
+ llKey2Name( vKeyCamper ) + " off their seat!");
llUnSit( vKeyCamper );
}
}


This ones got a (0, 0) syntax error - dosent work :(
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
01-04-2009 06:39
that's because it's only part of a script
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
01-04-2009 10:53
From: Ruthven Willenov
that's because it's only part of a script

I think the OP needs Help Wanted forum not Scripting Tips. So any contribution here is likely to be a waste of time.
_____________________
http://slurl.com/secondlife/Together
Scorpion Aristocrat
2D Vector Designer
Join date: 30 Oct 2008
Posts: 28
01-18-2009 15:47
Paid a scripter to do it for me.. thanks everyone for all your input... :)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-18-2009 20:28
From: Void Singer
insert this bit in your working state

I'd think that was sufficient instruction for a novice scripter, was I wrong?
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -