Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

pay to play teleporter...

Zaid Vox
Registered User
Join date: 9 Apr 2005
Posts: 66
05-06-2005 08:14
Hi I need a pay to play teleporter...i have some VIP rooms and i need a teleporter that after you pay a room fee the teleporter stays on for 10 to 15 seconds...that should be enough time for you and your companion to teleport to the room
I have the wizards stone, is there a script for that?...is that possible?
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
05-06-2005 11:16
Quick and dirty:

CODE
vector target = <0,0,0>; // Add teleport target here
integer cash = 1000; // Cash necessary to "rent" the room
float time = 15.0; // Time (in seconds) before teleport expires

default
{
money(key id, integer amt)
{
if(amt >= cash)
{
// If this goes the wrong direction, try llGetPos() - target.
// Occasionally I reverse this operation by mistake...
llSitTarget((target - llGetPos()) / llGetRot(),<0,0,0,1>);
llWhisper(0,"Thank you for your patronage! Your room is ready!");
llWhisper(0,"You have " + (string)time + " seconds before this teleport expires.");
llSetTimerEvent(time);
}
}

changed(integer change)
{
// Let's just bruteforce an unsit, since there are no error messages
llSleep(0.5);
llUnSit(llAvatarOnSitTarget());
}

timer()
{
llSetTimerEvent(0.0);
llSitTarget(<0,0,0>,<0,0,0,1>);
llWhisper(0,"Timer Expired.");
}
}

Written out-of-world, but simple enough... some notes:

- This version "should" work with any rotation and position in the SAME sim
- This will not stop anyone from just "sit-hacking" into your rooms
_____________________
---
Zaid Vox
Registered User
Join date: 9 Apr 2005
Posts: 66
it worked for only 2 tps...then...
05-06-2005 12:49
Hi thanks for the script but ...it worked for only 2 tps...then...i would be tp else where...can you fix it?
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
05-06-2005 13:05
Done. I put a timer reset where an llSleep should have been. This has been fixed.
_____________________
---
Zaid Vox
Registered User
Join date: 9 Apr 2005
Posts: 66
it still doen't work...
05-06-2005 14:35
i applied the script but ...it takes the money but I'm TPed out side the building...so when i remove the script it works fine...maybe you can come over to the casino and see for your self?