HabboScript | Jquery, php, css, javascript client | No packets

Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    Put Community First fallenfate is offline
    MemberRank
    Oct 2014 Join Date
    Arad DomanLocation
    1,108Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    @Cathrine - Gotcha. I think I know how you're doing this now, ;). Only supporting CSS3-capable browsers or going to look into a JS/jQuery plug-in for cross-browser isometric grid transforms when basic movement and such is finalised?

  2. #17
    Loyalty Vaulient is offline
    MemberRank
    May 2012 Join Date
    MalaysiaLocation
    1,796Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    Nice work , I see potential here . Just please don't lose motivation to continue with your project. There's too many projects with promising results left undone. Good luck !

  3. #18
    Put Community First fallenfate is offline
    MemberRank
    Oct 2014 Join Date
    Arad DomanLocation
    1,108Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    I wonder if it might be easier (at least cleaner) to use the CSS3 :nth-child selector instead of IDs and in-line styles? Then you could have them in a transforms.css and still access each clicked cell's unique identifier being by index. Then again... hmm, what are the IDs for?

  4. #19
    Apprentice Cathrine is offline
    MemberRank
    Jul 2015 Join Date
    The ZooLocation
    21Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    Quote Originally Posted by fallenfate View Post
    I wonder if it might be easier (at least cleaner) to use the CSS3 :nth-child selector instead of IDs and in-line styles? Then you could have them in a transforms.css and still access each clicked cell's unique identifier being by index. Then again... hmm, what are the IDs for?
    The IDs are generated by the flooresigner and is just coordinates. The style of the objects go by the class. The inline-styling is also generated by the floordesigner to get the correct position according to the coordinates.

    PHP Code:
    <?php
    case '1':
    case 
    'D':
    $_FLOOR["isdoor"] = false;
    $_FLOOR["zindex"] = 5;
    $_FLOOR["xnow"] = 600 $_FLOOR["count"] * 16;
    $_FLOOR["idx"] = $_FLOOR["count2"] - 1;
    $_FLOOR["idy"] = $_FLOOR["count"] - 1;
    $_FLOOR["ynow"] = 1200 $_FLOOR["count"] * 32;


    if(
    $gamemap[$_FLOOR["count3"]] == 'D'
    //if doortile
    $_FLOOR["zindex"] = 0;
    ?>
    <script>
    var door = "<?php echo $_FLOOR["idx"].'x'.$_FLOOR["idy"]; ?>";
    </script>
    <?php
    $_SESSION
    ["startx"] = $_FLOOR["idx"];
    $_SESSION["starty"] = $_FLOOR["idy"];
    $_FLOOR["isdoor"] = true;
    }


    echo 
    '<div class="tile' .  $_FLOOR["isdoor"]  . '" id="'.$_FLOOR["idx"].'x'.$_FLOOR["idy"].'" style="z-index:'.$_FLOOR["zindex"].';top:calc( ' $_FLOOR["xnow"] . 'px  + ' 17 $_FLOOR["count2"] . 'px);left:calc(' $_FLOOR["ynow"] . 'px - '33 $_FLOOR["count2"] .'px)"></div>';




    if(
    $_FLOOR["isdoor"] == true
    {
    $_FLOOR["zindex"] = 6;


    $_FLOOR["xnow"] = 494 $_FLOOR["count"] * 16;
    $_FLOOR["idx"] = $_FLOOR["count2"] - 1;
    $_FLOOR["idy"] = $_FLOOR["count"] - 1;
    $_FLOOR["ynow"] = 1220 $_FLOOR["count"] * 33;
    $_FLOOR["zindex"] = 4;
    echo 
    '<div class="door" style="z-index:'.$_FLOOR["zindex"].';top:calc( ' $_FLOOR["xnow"] . 'px  + ' 17 $_FLOOR["count2"] . 'px);left:calc(' $_FLOOR["ynow"] . 'px - '33 $_FLOOR["count2"] .'px)"></div>';




    ?>
    <script>


    var startx = <?php echo $_FLOOR["idx"]; ?>;
    var starty = <?php echo $_FLOOR["idy"]; ?>;


    </script>
    <?php
    }
    break;

  5. #20
    Apprentice Cathrine is offline
    MemberRank
    Jul 2015 Join Date
    The ZooLocation
    21Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    Work in progress:

    http://nutcracker.xyz/v4/resources/i...?dir=7&act=wlk

    "dir" (direction) can at the moment be 0, 1, 2, 3 and 7
    "act" (action) can at the moment be "std" (standing) and "wlk" (walking)


  6. #21
    Alpha Member Twan is offline
    MemberRank
    Jun 2010 Join Date
    1,961Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    Good luck with your project, nice to see an web-project again.
    Last edited by Droppy; 17-07-15 at 05:08 AM. Reason: Ontopic.

  7. #22
    Account Upgraded | Title Enabled! AskethZ is offline
    MemberRank
    Jul 2012 Join Date
    232Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    I like the way this is done, the not-packet-way, though must it really lag for an online game.

  8. #23
    Apprentice Cathrine is offline
    MemberRank
    Jul 2015 Join Date
    The ZooLocation
    21Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    Quote Originally Posted by AskethZ View Post
    I like the way this is done, the not-packet-way, though must it really lag for an online game.
    It doesn't necessarily have to be any noticable lag, take a look when it's finished instead.

    - - - Updated - - -

    Now the

    http://nutcracker.xyz/v4/resources/i...?dir=7&act=wlk

    works closer to intended, fixed some bug that had happened on transfer to website host.
    Last edited by Cathrine; 17-07-15 at 04:38 PM.

  9. #24
    Live Ocottish Sverlord Joopie is online now
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,767Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    I highly suggest to add some cache, also your avatar animator has a memory leak, just saying :)

  10. #25
    Apprentice Cathrine is offline
    MemberRank
    Jul 2015 Join Date
    The ZooLocation
    21Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    Quote Originally Posted by Joopie View Post
    I highly suggest to add some cache, also your avatar animator has a memory leak, just saying :)

    I was working on it, but got some issues with it working online. I had to use some PHP in the code to get it work, which it does now.

  11. #26
    Apprentice Cathrine is offline
    MemberRank
    Jul 2015 Join Date
    The ZooLocation
    21Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    If anyone want to help with developing this project please send me a privat message.

  12. #27
    Account Upgraded | Title Enabled! PR0 is offline
    MemberRank
    Mar 2007 Join Date
    1,207Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    Wow thanks for deciding to do this. A project like this if it's usable and well done will probably save our community! :)

    How are the image files loaded, and what types of files are they?

  13. #28
    Gaby is offline
    MemberRank
    Apr 2013 Join Date
    Viva HollandiaLocation
    1,607Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    Quote Originally Posted by Cathrine View Post
    PHP Code:
    <?php


    include "general.php";
    $result $mysqli->query("SELECT * FROM action_queue WHERE time > ".time()." - 30 ORDER BY id DESC");
    $count 0;






    while (
    $row mysqli_fetch_array($resultMYSQLI_ASSOC))
    {
    switch(
    $row["type"]){
    case 
    '0'//Chatmessage
    $count $count 1;
    $timebonus = (time() - $row["time"]) * 30;
    $coord 550 + (50 $count) + $timebonus;
    $coord2 $coord 5;
    $chatmessage["msgdata"] = $chatmessage["msgdata"] . "<div style='bottom:".$coord."px' id='chatmessage'><div id='chatmessageborderleft'></div><div id='chatmessageborderrigth'></div><div  id='chatmessagecontent'><b>".$row["username"].": </b>".$row["message"]."</div></div>";
    break;


    case 
    '1'//Url
     
    $mysqli->query("DELETE FROM action_queue WHERE id = ".$row["id"]."");
    ?>
    <script>
    window.location.replace("<?php echo strip_tags(mysql_real_escape_string($row["message"])); ?>");
    </script>
    <?php
    break;


    case 
    '2'//Move
    include "pathfinder.php";
    break;
    }
    }




    ?>
    <script>
    $("#chatmessages").html("<?php echo $chatmessage["msgdata"]; ?>");
    $("#chatmessages").css("left", lastleftmessage);
    </script>
    Snippet of handling data queue. @Droppy
    I don't know if you filter this somewhere, but otherwise:
    Code:
    $chatmessage["msgdata"] = $chatmessage["msgdata"] . "<div style='bottom:".$coord."px' id='chatmessage'><div id='chatmessageborderleft'></div><div id='chatmessageborderrigth'></div><div  id='chatmessagecontent'><b>".$row["username"].": </b>".$row["message"]."</div></div>";
    break;
    Is a huge XSS leak.

    Also for:
    Code:
    <?php echo strip_tags(mysql_real_escape_string($row["message"])); ?>
    You're using mysqli the whole time and suddenly mysqls escape string, that's a bit odd. You should also just use escape string for inserting data, when echo'ing it out of the database, you should use htmlspecialchars or htmlentities.

    I don't know if you became aware of these issues already in the meantime, if so, sorry. ^^

    Good luck with your project nontheless.

  14. #29
    Loyalty Vaulient is offline
    MemberRank
    May 2012 Join Date
    MalaysiaLocation
    1,796Posts

    Re: HabboScript | Jquery, php, css, javascript client | No packets

    Any updates on your project so far ? @Catherine

    There's no need to hurry , just wanted to know :)



Page 2 of 2 FirstFirst 12

Advertisement