[Request] Need little help about warps

09/10/2014 16:17 maxbooster#1
Hello guys,
I want to ask you if someone has coordinates to /warp converter or can tell me how warp codes are made

Regards,
maxboostr
09/15/2014 12:31 concludeit#2
Credits to Lemoniscool and CaosFox... On the other forum.

Code stuff:
Quote:
Exactly for the same reason i did a lot of research on how to calculate them my own and got to this:

xpos = (silkroad_x % 192) * 10
ypos = (silkroad_y % 192) * 10
xsec = (silkroad_x - xpos / 10) / 192 + 135
ysec = (silkroad_y - ypos / 10) / 192 + 92

region = (ysec << 8) | xsec

knowing this i wrote the following small php script to calculate it quickly and spit out the warp code:

Code:
<form action="coord.php" method="post">
    <input type="text" name="x" value="X-Coord"><br>
    <input type="text" name="y" value="Y-Coord"><br>
    <input type="submit" name="submit" value="submit">
</form>

<?php
    if(isset($_POST['x']) && isset($_POST['y']))
    {
        //$silkroad_x = 14714;
        //$silkroad_y = 2593;
        $silkroad_x = $_POST['x'];
        $silkroad_y = $_POST['y'];
    
        $xpos = ($silkroad_x % 192) * 10;
        $ypos = ($silkroad_y % 192) * 10;
    
        $xsec = ($silkroad_x - $xpos / 10) / 192 + 135;
        $ysec = ($silkroad_y - $ypos / 10) / 192 + 92;
    
        $region = ($ysec << 8) | $xsec;
        
        echo "<br><br>/warp $region $xpos 1000 $ypos";
    }
?>
as you can see for the z value in the warp command i always use 1000 which is because in 99.9% of all cases with z being set to 1000 youre in the sky above the place where you want to be warped to, but sro automatically changes it to the value where you hit the ground.
You're welcome. :mofo:
07/03/2015 01:59 hellokizzo#3
Quote:
Originally Posted by concludeit View Post
Credits to Lemoniscool and CaosFox... On the other forum.

Code stuff:


You're welcome. :mofo:
i can't use this on my windows 8.1 pc but i can use it on my other windows 7 pc and i could use it with windows vista too.

I've tried "troubleshoot compatablity" and nothing happens after trying to open it. It won't even go to the "Run" optinon.

If you could help me, that'd be great, Thanks! :-)
07/12/2015 17:12 blapanda#4
... You could simply create a PHP file on your folder at c:/calculator. Create a file named index.php and paste that code in, save.
Open your browser and enter the folder's direction. C:/calculator/index.php
You should be able using that as well as a website based mini application, just for you.
(note the slashes may be backslashes. Writing this with a tablet, which is lacking apps (rooted it, apps gone :D)).
The entrance for x and y have been declared there already, so you don't need to be afraid that it won't work.