Advertisement
Guest User

Random Teleport

a guest
Nov 4th, 2013
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. local objectid = objectentryhere
  2.  
  3. function PortalTrigger(event, plr, intid)
  4. local chance = math.random(1,10)
  5.  
  6. if(chance == 1) then
  7. plr:Teleport(map, x,y, z, o)   
  8. plr:SetPvP(true)
  9.  
  10. elseif(chance == 2) then
  11. plr:Teleport(map, x,y, z, o)   
  12. plr:SetPvP(true)
  13. elseif(chance == 3) then
  14. plr:Teleport(map, x,y, z, o)   
  15. plr:SetPvP(true)
  16. elseif(chance == 4) then
  17. plr:Teleport(map, x,y, z, o)   
  18. plr:SetPvP(true)
  19.  
  20. elseif(chance == 5) then
  21. plr:Teleport(map, x,y, z, o)   
  22. plr:SetPvP(true)
  23. elseif(chance == 6) then
  24. plr:Teleport(map, x,y, z, o)   
  25. plr:SetPvP(true)
  26. elseif(chance == 7) then
  27. plr:Teleport(map, x,y, z, o)   
  28. plr:SetPvP(true)
  29.  
  30. elseif(chance == 8) then
  31. plr:Teleport(map, x,y, z, o)   
  32. plr:SetPvP(true)
  33. elseif(chance == 9) then
  34. plr:Teleport(map, x,y, z, o)   
  35. plr:SetPvP(true)
  36. elseif(chance == 10) then
  37. plr:Teleport(map, x,y, z, o)   
  38. plr:SetPvP(true)
  39. end
  40. end
  41.  
  42.  
  43.  
  44.  
  45. RegisterGameObjectGossipEvent(objectid, 1, PortalTrigger)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement