Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FindGroundOrWater()
- {
- vector vTarget = llGetPos();
- vTarget.z = llGround( ZERO_VECTOR );
- float fWaterLevel = llWater( ZERO_VECTOR );
- if( vTarget.z < fWaterLevel )
- vTarget.z = fWaterLevel;
- llSetRegionPos(vTarget);
- }
- key user;
- integer Channel;
- default
- {
- changed(integer change)
- {
- if (change & CHANGED_REGION | CHANGED_OWNER)
- {
- llResetScript();
- }
- }
- touch_start(integer total_number)
- {
- Channel = (integer) ( "0x" + (string) llGetOwner() ) - 123456;
- user = llDetectedOwner(0);
- if(user)
- {
- llDialog(llDetectedOwner(0), "What Would You Like To Do?", ["Warp"],Channel);
- llListen(Channel, "", user, "");
- }
- }
- listen(integer chan, string name, key id, string msg)
- {
- if (chan == Channel)
- {
- if(msg == "Warp")
- {
- llDialog(user, "select a warp", ["Surface"],Channel);
- }
- else if(msg == "Surface")
- {
- FindGroundOrWater();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement