Jump to content
  • 0

how to put this on your website?


Hatake Kakashi

Question


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

hello guys, i have website html. and i want to put breaker ladder in my website. how to put that? thanks

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

Can you post more details? Like putting the structure of the SQL table of the breaker ladder.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  221
  • Reputation:   12
  • Joined:  12/18/11
  • Last Seen:  

If you already have the script ready, you can upload it with the host name, password username and port in FileZilla.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

here is my breakerladder script.

i want is, TOP 5 Breaker Ladder will be in my main page of my website. so, how to put codes in my website to see top 5 breakerladder? thanks

prontera,166,189,5	script	Breaker Ladder	790,{



query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='brokeemp' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;



mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Hello there "+strcharinfo(0)+", what do you want to do?";
menu "Check Emperium Break Points",-,"View Breaker Ladder",Llad,"Exchange Points",Lex,"Nothing",Lno;
next;

next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Hmm, wait a second, i'll go check my records..";
next;
mes strcharinfo(0)+"'s Emperium Break Points is ^FF0000"+brokeemp+"^000000 Point(s)";
close;

Lno:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Suit yourself..";
close;

Lex:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "What points would you like to exchange?";
mes "^FF0000Note: Check your inventory and weight before exchanging with me!";
menu "Emperium Break Points",-,"Nothing",Lno;
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "What do you want to exchange with?";
menu "100pcs Proof Of Donation",-,"Yggdrasilberry Box",Lesg,"Red Kakashi Mask",Lrip,"Gold Coin",Lsil,"Wrath of Valkyrie",Lval;
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 50 Breaker Points for this..";
mes "Do you still want PODS?";
menu "Yes",-,"No",Lno;
if(brokeemp < 50) goto Lnep;
if(brokeemp >= 50)
next;
mes "Here you go!";
getitem 7179,100;
set brokeemp,brokeemp-50;
close;


Lnep:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Not enough points!";
close;

Lesg:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 1 Breaker Point for this..";
mes "Do you still want Yggdrasilberry Box?";
menu "Yes",-,"No",Lno;
next;
if(brokeemp < 1) goto Lnep;
if(brokeemp >= 1)
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Here you go!";
getitem 13517,1;
set brokeemp,brokeemp-1;
close;

Lrip:
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 100 Breaker Points for this..";
mes "Do you still want Red Kakashi Mask?";
menu "Yes",-,"No",Lno;
if(brokeemp < 100) goto Lnep;
if(brokeemp >= 100)
next;
mes "Here you go!";
getitem 30015,1;
set brokeemp,brokeemp-100;
close;

Lval:
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 30 Breaker Points for this..";
mes "Do you still want Wrath of Gold Coin?";
menu "Yes",-,"No",Lno;
if(brokeemp < 30) goto Lnep;
if(brokeemp >= 30)
next;
mes "Here you go!";
getitem 671,1;
set brokeemp,brokeemp-30;
close;

Lsil:
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 30 Breaker Points for this..";
mes "Do you still want Gold Coin?";
menu "Yes",-,"No",Lno;
if(brokeemp < 30) goto Lnep;
if(brokeemp >= 30)
next;
mes "Here you go!";
getitem 671,1;
set brokeemp,brokeemp-30;
close;

Llad:
next;
for( set .@x,0; .@x<=9; set .@x,.@x+1 )
{
	mes "^0000FF"+(.@x+1)+".^000000 "+.@name$[.@x]+" - ^FF0000"+.@count[.@x]+"^000000 Point(s)";
} // .@x starts at 0, but you want to start with '1st', so use (.@x+1)
close;

}

Edited by hatake
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  221
  • Reputation:   12
  • Joined:  12/18/11
  • Last Seen:  

Okay, just like before. You have to put that somewhere in the full html script (I don't know how). If your wondering how to upload it, simply enter FileZilla and enter the necessary information, then drag all the information from the folder into the public_html or yoursite.com folder.

That should upload it.

Edited by Keim
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

i think sir jaypee can solve this. and i think you need to put a php code at your website to work the breakerladder top 5 in website. but i dont know what code is that. sir jaypee can do this 100% thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

You need to make the page to .php just by renaming it. I assume you dont use FluxCP


<?php

/* Database Access */
$address = "localhost";
$username = "root";
$password = "root";
$database = "ragnarok";

$connect = mysql_connect($address,$username,$password) or die("Incorrect SQL Access Information");
$db_select = mysql_select_db($database,$connect) or die("Cannot find database");

$sql_query = "SELECT * FROM `global_reg_value` WHERE str='.mysql_real_escape_string("brokeemp").' ORDER BY value DESC LIMIT 5";
$query = mysql_query($sql_query) or die(mysql_error());


//Loop
while($fetch = mysql_fetch_array($query)){
echo "Breaker: ".getCharnameByCharID($fetch['char_id']);
echo " -- Points: ".$fetch['value'];
}

function getCharnameByCharID($charid)
{
//This will return the character name
if(is_numeric($charid))
{
$query = mysql_query("SELECT name FROM char WHERE char_id='".mysql_real_escape_string($charid)."'");
if(mysql_num_rows($query)>0)
{
$charname = mysql_fetch_array($query);
return $charname['name'];
}
else
return "Char Not Found";
}
}

?>

I dont test it coz Iam lazy to run my test server.

Edited by JayPeeMateo
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

my control panel is flux cp but my main website is an html only.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

HTML cant do server side commands you need to make it a .php file

I hope it works here is the FluxCP version

put it in your fluxcp modules folder ex: modules/breakerladder/ladder.php


<?php 
if (!defined('FLUX_ROOT')) exit;

$sql = "SELECT char.char_id,char.name,global_reg_value.str,global_reg_value.char_id,global_reg_value.value FROM {$server->charMapDatabase}.global_reg_value ";
$sql .= "LEFT JOIN {$server->charMapDatabase}.char ON (global_reg_value.char_id == char.char_id) ";
$sql .= " WHERE global_reg_value.str='brokeemp' ORDER BY global_reg_value.value DESC LIMIT 5";
$server->connection->getStatement($sql);
$sth->execute();
$ladder = $sth->fetchAll();
?>

and also put this in your theme folder ex: themes/default/breakerladder/ladder.php


<?php 

foreach($ladder as $topfive)
{
echo "Breaker Name".$topfive->name." -- ".$topfive->value." point(s)<br/>";
}


?>

I didnt test coz I have so many applications opened in my desktop.

Link to comment
Share on other sites

×
×
  • Create New...