teleport where character is facing ? menu

User Tag List

Results 1 to 7 of 7
  1. #1
    uzzy13u's Avatar Active Member
    Reputation
    40
    Join Date
    Oct 2008
    Posts
    100
    Thanks G/R
    21/20
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    teleport where character is facing ?

    // edit - removed
    Last edited by uzzy13u; 03-24-2022 at 07:29 AM.

    teleport where character is facing ?
  2. #2
    pinny's Avatar Active Member
    Reputation
    29
    Join Date
    Jan 2010
    Posts
    211
    Thanks G/R
    7/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use cos and sin on your player facing angle to calculate a vector for the change in x/y

  3. Thanks uzzy13u (1 members gave Thanks to pinny for this useful post)
  4. #3
    r4zyel2's Avatar Banned CoreCoins Purchaser
    Reputation
    21
    Join Date
    Jan 2017
    Posts
    41
    Thanks G/R
    2/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by uzzy13u View Post
    hi all
    i manage to make simple teleports in c # using x,y,z
    now i am trying to learn how to teleport 10 yards for example in front of my char and yes i have (x,y,z and character orientation) i need some formula i think

    anyone can tell me please how this works ?
    I already made that long time ago when i used to create my hacks for wow.
    Let me copy pasta my code
    yards = 10
    local player_x, player_y, player_z, player_o = get_position(playerguid)
    local UNIT_X = math.cos(player_o)*yards
    local UNIT_Y = math.sin(player_o)*yards
    newx, newy, newz, newo = player_x + UNIT_X , player_y + UNIT_Y , player_z, player_o

    Teleport(newx, newy, newz, newo);
    Last edited by r4zyel2; 01-21-2017 at 06:51 AM.

  5. Thanks uzzy13u, stoneharry, Harambeqt (3 members gave Thanks to r4zyel2 for this useful post)
  6. #4
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I did something similar for some server-side scripting:

    Code:
    local function BoulderTicker(_, _, _, pUnit)
    	pUnit:CastSpell(pUnit, 55766) -- Visual
    	pUnit:PlayDistanceSound(14342) -- rumbling
    	local plrs = pUnit:GetPlayersInRange(1.35)
    	if plrs then
    		for _,v in pairs(plrs) do
    			local distance = v:GetDistance2d(pUnit)
    			pUnit:DealDamage(v, 50 - distance, false)
    			pUnit:CastSpell(v, 43556) -- curse
    			pUnit:PlayDistanceSound(14341, v) -- hit noise to just player
    					
    			local x2 = pUnit:GetX()
    			local y2 = pUnit:GetY()
    			local x1 = v:GetX()
    			local y1 = v:GetY()
    
    			local x = x2 - x1
    			local y = y2 - y1
    					
    			local angle = math.pi + math.atan2(-y, -x)
    
    			local x = x1 - ((math.random(1,2) - distance) * math.cos(angle))
    			local y = y1 - ((math.random(1,2) - distance) * math.sin(angle))
    			--local z = pUnit:GetMap():GetHeight(x, y) -- It does not detect WMO height, stormwind is a WMO
    			--if not z then
    			z = v:GetZ()
    			--end
    			if v:IsWithinLoS(x, y, z) then
    				v:MoveJump(x, y, z, 9, 2.1)
    			end
    		end
    	end
    end

  7. Thanks uzzy13u (1 members gave Thanks to stoneharry for this useful post)
  8. #5
    uzzy13u's Avatar Active Member
    Reputation
    40
    Join Date
    Oct 2008
    Posts
    100
    Thanks G/R
    21/20
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you very much everyone for help i will test it

  9. #6
    r4zyel2's Avatar Banned CoreCoins Purchaser
    Reputation
    21
    Join Date
    Jan 2017
    Posts
    41
    Thanks G/R
    2/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by uzzy13u View Post
    thank you very much everyone for help i will test it
    Glad it served to you, are you making hacks for Elysium?

  10. #7
    uzzy13u's Avatar Active Member
    Reputation
    40
    Join Date
    Oct 2008
    Posts
    100
    Thanks G/R
    21/20
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by r4zyel2 View Post
    Glad it served to you, are you making hacks for Elysium?
    yes, i found small way to bypass the x,y,z check and i want to improve it more

Similar Threads

  1. Where can i get a working Teleporter NPC ? +REP for helpers
    By Wheeze201 in forum WoW EMU Questions & Requests
    Replies: 19
    Last Post: 09-20-2008, 01:30 PM
  2. Make Ur character's Face Turn Wrong Way ^^
    By urowndad in forum World of Warcraft Guides
    Replies: 17
    Last Post: 08-30-2008, 06:26 AM
  3. How do i change where a teleport npc ports you to
    By Masterkenshin in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-24-2007, 08:38 AM
  4. Where is the characters file in MWS?
    By Galura in forum WoW ME Questions and Requests
    Replies: 10
    Last Post: 10-23-2007, 08:57 PM
  5. How to buy skills and teleport back to where you were.
    By eldorien in forum World of Warcraft Exploits
    Replies: 16
    Last Post: 03-08-2007, 08:58 PM
All times are GMT -5. The time now is 05:24 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search