Thread: [NEW/MYSQL]Server Sigs

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38
  1. #1 [NEW/MYSQL]Server Sigs 
    Z
    Z is offline
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    26
    Posts
    1,391
    Thanks given
    6
    Thanks received
    30
    Rep Power
    853
    Well; I'm currently working on a HUGE project....It'll be a full server site. Not a copy of RuneScape, but a custom one. I'll be releasing everything I code within 24 hours of completion. So, here's my first script .
    Preview:

    PS: Demo is fked...deleted my db

    I'll be releasing a Mod Rewrited version later on.
    Here's the script:
    Code:
    <?
    $bd_host = "";	 // Database host
    $bd_usuario = "";	   // Database username
    $bd_password = "";	  // Database password
    $bd_base = "";			// Database name
    $con = mysql_connect($bd_host, $bd_usuario, $bd_password); mysql_select_db($bd_base, $con);
    $user = str_replace("select", "", str_replace("union", "", mysql_real_escape_string($_GET['user'])));
    $sql = "SELECT * FROM users WHERE playerName='$user'";
    $result = mysql_query($sql);
    $row = mysql_fetch_array($result);
    $attack = $row["Attacklvl"];
    $def = $row["Defencelvl"];
    $str = $row["Strengthlvl"];
    $hp = $row["Hitpointslvl"];
    $range = $row["Rangelvl"];
    $prayer = $row["Prayerlvl"];
    $mage = $row["Magiclvl"];
    $cook = $row["Cookinglvl"];
    $fletching = $row["Fletchinglvl"];
    $fish = $row["Fishinglvl"];
    $fm = $row["Firemakinglvl"];
    $crafting = $row["Craftinglvl"];
    $smithing = $row["Smithinglvl"];
    $mining = $row["Mininglvl"];
    $herblore = $row["Herblorelvl"];
    $agility = $row["Agilitylvl"];
    $thieving = $row["Thievinglvl"];
    $slayer = $row["Slayerlvl"];
    $farming = $row["Farminglvl"];
    $rc = $row["Runecraftlvl"];
    $wc = $row["Woodcuttinglvl"];
    $rights = $row["playerRights"];
    $need = 2079;
    $left = $need - ($row[Attacklvl] + $row[Defencelvl] + $row[Woodcuttinglvl] + $row[Strengthlvl] + $row[Hitpointslvl] + $row[Rangelvl] + $row[Prayerlvl] + $row[Magiclvl] + $row[Cookinglvl] + $row[Fletchinglvl] + $row[Fishinglvl] + $row[Firemakinglvl] + $row[Craftinglvl] + $row[Smithinglvl] + $row[Mininglvl] + $row[Herblorelvl] + $row[Agilitylvl] + $row[Thievinglvl] + $row[Slayerlvl] + $row[Farminglvl] + $row[Runecraftlvl]);
    $total = $row[Attacklvl] + $row[Defencelvl] + $row[Woodcuttinglvl] + $row[Strengthlvl] + $row[Hitpointslvl] + $row[Rangelvl] + $row[Prayerlvl] + $row[Magiclvl] + $row[Cookinglvl] + $row[Fletchinglvl] + $row[Fishinglvl] + $row[Firemakinglvl] + $row[Craftinglvl] + $row[Smithinglvl] + $row[Mininglvl] + $row[Herblorelvl] + $row[Agilitylvl] + $row[Thievinglvl] + $row[Slayerlvl] + $row[Farminglvl] + $row[Runecraftlvl];
    $totalxp = $row[Attackxp] + $row[Woodcuttingxp] + $row[Defencexp] + $row[Strengthxp] + $row[Hitpointsxp] + $row[Rangexp] + $row[Prayerxp] + $row[Magicxp] + $row[Cookingxp] + $row[Fletchingxp] + $row[Fishingxp] + $row[Firemakingxp] + $row[Craftingxp] + $row[Smithingxp] + $row[Miningxp] + $row[Herblorexp] + $row[Agilityxp] + $row[Thievingxp] + $row[Slayerxp] + $row[Farmingxp] + $row[Runecraftxp];
    mysql_close($con);
    header('Content-type: image/png');
    $img = imagecreatefrompng('sigbackground.png');
    $black = imagecolorallocate($img, 0, 0, 0);
    $width = imagesx($img);
    $height = imagesy($img);
    imagestring($img, 1, 10, 5,  "Attack: $attack", $black);
    imagestring($img, 1, 10, 17,  "Defence: $def", $black);
    imagestring($img, 1, 10, 29,  "Strength: $str", $black);
    imagestring($img, 1, 10, 41,  "Hitpoints: $hp", $black);
    imagestring($img, 1, 10, 53,  "Range: $range", $black);
    imagestring($img, 1, 10, 65,  "Prayer: $prayer", $black);
    imagestring($img, 1, 10, 77,  "Magic: $mage", $black);
    imagestring($img, 1, 10, 89,  "Cooking: $cook", $black);
    imagestring($img, 1, 10, 101,  "Woodcutting: $wc", $black);
    imagestring($img, 1, 10, 113,  "Fletching: $fletching", $black);
    imagestring($img, 1, 10, 125,  "Fishing: $fish", $black);
    imagestring($img, 1, 10, 137,  "Firemaking: $fm", $black);
    imagestring($img, 1, 110, 5,  "Mining: $mining", $black);
    imagestring($img, 1, 110, 17,  "Herblore: $herblore", $black);
    imagestring($img, 1, 110, 29,  "Agility: $agility", $black);
    imagestring($img, 1, 110, 41,  "Thieving: $thieving", $black);
    imagestring($img, 1, 110, 53,  "Slayer: $slayer", $black);
    imagestring($img, 1, 110, 65,  "Farming: $farming", $black);
    imagestring($img, 1, 110, 77,  "Runecraft: $rc", $black);
    //s row
    imagestring($img, 7, 230, 3,  "Server Name", $black);
    imagestring($img, 2, 230, 18,  "Username: $user", $white);
    if ($rights == 3) 
    { 
    imagestring($img, 2, 230, 30,  "Rank: Owner", $white);
    }
    else if ($rights == 2)
    { 
    imagestring($img, 2, 230, 30,  "Rank: Administrator", $white);
    }
    else if ($rights == 1)
    { 
    imagestring($img, 2, 230, 30,  "Rank: Moderator", $white);
    }
    else
    { 
    imagestring($img, 2, 230, 30,  "Rank: Player", $white);
    }
    
    imagestring($img, 2, 230, 42,  "Total Level: $total", $white);
    imagestring($img, 2, 230, 54,  "Total Xp: $totalxp", $white);
    if ($total == 1980) 
    { 
    imagestring($img, 2, 230, 66,  "You're Maxed Out!", $white);
    } 
    else
    { 
    imagestring($img, 2, 230, 66,  "$left Lvls To Max!", $white);
    }
    imagepng($img);
    imagedestroy($img);
    ?>
    I'll attach image if you want to edit it...
    Credits: Me and Zachera (Got the background from his runescape script)
    Please leave comments/suggestions
    BTW: I know its a bit messy
    EDIT:
    Use it like this:
    Code:
    http://site.com/directory/sig.php?user=username
    If you do not know how to use this...pm me and I'll help you a bit.

    I'll be soon buying a new domain where you can track my progress with this project and view what I've completed.
     

  2. #2  
    Registered Member
    wh1p's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    1,983
    Thanks given
    26
    Thanks received
    285
    Rep Power
    320
    Aahah this is cool
     

  3. #3  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,784
    Discord
    View profile
    Rep Power
    5000
    awesome Zack, repped.

     

  4. #4  
    Z
    Z is offline
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    26
    Posts
    1,391
    Thanks given
    6
    Thanks received
    30
    Rep Power
    853
    Thanks for replies...Glad you like it
     

  5. #5  
    Ben
    Guest
    Will it work for a Dodian SQL Server? Since playerrights are 4 for owner, 6 for admin, and 7 for mod?
     

  6. #6  
    Z
    Z is offline
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    26
    Posts
    1,391
    Thanks given
    6
    Thanks received
    30
    Rep Power
    853
    Dude, use common sense, all that you'd need to edit is the if statement to say if = 4 is owner ect...Then if = 6 admin...if you don't get that...go die in a hole :O
     

  7. #7  
    Ben
    Guest
    No lOl.
    Dodian SQL Uses way diffrent names then this one.
    You have to rename a bunch of stuff.
    And it wouldnt work anyway with Dodian SQL Ones, because dodian sql doesnt save your level, just the XP.
    And because i said that, i should go die in a hole? tskkk tskkk tskkk.
     

  8. #8  
    Registered Member

    Join Date
    Sep 2007
    Posts
    1,394
    Thanks given
    3
    Thanks received
    2
    Rep Power
    323
    Wow Zack, This is very good. Keep up the good work.
     

  9. #9  
    Z
    Z is offline
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    26
    Posts
    1,391
    Thanks given
    6
    Thanks received
    30
    Rep Power
    853
    Thanks Crusade...and son, as for you simply get the lvl formula....and Pm me and I'll help you out.
     

  10. #10  
    Ben
    Guest
    It is good. i can probally figure it out. Thanks for the offer though.
     

Page 1 of 4 123 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •