Advertisement
Gayngel

Untitled

May 6th, 2015
573
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. FindGroundOrWater()
  2. {
  3. vector vTarget = llGetPos();
  4. vTarget.z = llGround( ZERO_VECTOR );
  5. float fWaterLevel = llWater( ZERO_VECTOR );
  6. if( vTarget.z < fWaterLevel )
  7. vTarget.z = fWaterLevel;
  8. llSetRegionPos(vTarget);
  9. }
  10. key user;
  11. integer Channel;
  12.  
  13. default
  14. {
  15. changed(integer change)
  16. {
  17. if (change & CHANGED_REGION | CHANGED_OWNER)
  18. {
  19. llResetScript();
  20. }
  21. }
  22. touch_start(integer total_number)
  23. {
  24. Channel = (integer) ( "0x" + (string) llGetOwner() ) - 123456;
  25. user = llDetectedOwner(0);
  26. if(user)
  27. {
  28. llDialog(llDetectedOwner(0), "What Would You Like To Do?", ["Warp"],Channel);
  29. llListen(Channel, "", user, "");
  30. }
  31. }
  32.  
  33. listen(integer chan, string name, key id, string msg)
  34. {
  35. if (chan == Channel)
  36. {
  37. if(msg == "Warp")
  38. {
  39. llDialog(user, "select a warp", ["Surface"],Channel);
  40.  
  41. }
  42.  
  43. else if(msg == "Surface")
  44.  
  45. {
  46. FindGroundOrWater();
  47. }
  48. }
  49.  
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement