Jump to content
  • 0

how to put this on my sql? or PHP


Kariton Revolution

Question


  • Group:  Members
  • Topic Count:  161
  • Topics Per Day:  0.04
  • Content Count:  429
  • Reputation:   5
  • Joined:  11/21/11
  • Last Seen:  

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;


help simple

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

Err... Mybe you can connect it using www.yoursite.com/phpmyadmin ot login into your administrator acc that are connected into your databse...
In your database look for some word insert SQL or something like that...

Put that cmd

 

 
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;

 

And then run it... if it have any problem.. do post here...  ^ ^

 

**Edit**

Btw... What was that sql actually?..?

Edited by CheckMate
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  161
  • Topics Per Day:  0.04
  • Content Count:  429
  • Reputation:   5
  • Joined:  11/21/11
  • Last Seen:  

how can i work this with my php 

 // ===== Donation Npc 1.0 ===================== //

 

// ===== Credits : Jhosef and trOn ============ //
// ===== Change Logs ========================== //
// ============================================ //






// ==== NPC Location ========================== // 
prontera,147,175,4    script    Donation NPC    807,{


// === Configuration ========================== //
    set .gms_level, 99;
    set .code_length,10; // Length for the Donation Code
    set .code_length2,3; // Length for the Validation Code
    set .donate_item, 7179; // Donation Item
    set .@itemORcash, 0; // 0 for Item or 1 for Cash Point
    set .@npc_name$, "Donation Npc";
    setarray .coupon_code$[0],"A","B","C","D","E","F","G","H","I","J","K","L",
                              "M","N","O","P","Q","R","S","T","U","V","W","X",
                              "Y","Z","0","1","2","3","4","5","6","7","8","9";
                            
    setarray .validation_code$[0],"A","B","C","D","E","F","G","H","I","J","K","L",
                              "M","N","O","P","Q","R","S","T","U","V","W","X",
                              "Y","Z","0","1","2","3","4","5","6","7","8","9";


                            
// ==== NPC Talk ============================== //
    if( getgmlevel() >= .gms_level) goto AdminPanel;
    if( getgmlevel() < .gms_level) goto PlayerPanel;
    
// ==== Don't Edit This ======================= //
    set .@stats$,"0";
// ==== Admin Panel =========================== //
    AdminPanel:
    
    mes .@npc_name$;
    mes "Welcome " + strcharinfo(0) + ".";
    mes "^006633 NOTE: ^000000 ^0000FF1 PODS^000000 = ^FF3300 1PESO ^000000 ";
    next;
    switch(select("Add Donation Code:Player View:Exit"))
        {
            case 1:
                for(set @i, 0; @i < .code_length; set @i, @i+1)
                {
                    set @random_char, rand(0,(getarraysize(.coupon_code$)-1));
                    set @new_donation$, @new_donation$ + .coupon_code$[@random_char];
                }
                
                for(set @i, 0; @i< .code_length2; set @i, @i+1)
                {
                    set @random_char, rand(0,(getarraysize(.validation_code$)-1));
                    set @new_validation$, @new_validation$ + .validation_code$[@random_char];
                }
                mes .@npc_name$;
                mes "Enter Item Amount:";
                input @donate_amount;
                next;
                mes .@npc_name$;
                mes "Coupon added.";
                
                query_sql "INSERT INTO `donate` (`code`, `item_amount`,`validation_code`,`status`) VALUES ('"+@new_donation$+"', "+@donate_amount+", '"+@new_validation$+"' , '"+.@stats$+"')";
                set @new_donation$, "";
                set @new_validation$, "";
                next;        
                mes "This is the list of code logs";
                query_sql "SELECT `code` , `item_amount` , `validation_code` , `status` FROM `donate` ORDER BY `code` DESC", .@codelist$, .@status$, .@validation$;
                if(.@codelist)
                {
                    mes .@npcname$;
                    mes "There are no entrys in the Code List.";
                    close;
                } 
                else 
                {
                    next;
                    mes .@npcname$;
                    mes "The list will spawn at your main chat box.";
                    dispbottom "Codelist | Amount | Validation";
                    for(set @ei,0; @ei < getarraysize(.@codelist$); set @ei,@ei + 1) 
                    {
                        dispbottom ""+.@codelist$[@ei]+" | "+.@status$[@ei]+" | "+.@validation$[@ei]+" "; 
                    }                    
                }
                next;
                close;
                
            case 2:
                goto PlayerPanel;
            case 3:
                mes .@npc_name$;
                mes "Have a nice day.";
                close;
        }
    


// ==== Player Panel ========================== //
PlayerPanel:


    mes .@npc_name$;
    mes "Welcome to the Donation System. How can I help you?";
    next;
    switch(Select("View My Donation Code:Enter My Donation Code:Exit"))
    {
        case 1:
            mes .@npc_name$;
            mes "Please enter your Validation Code:";
            input @my_code$;
            next;
            query_sql "SELECT `validation_code` FROM `donate` WHERE `validation_code` = '"+@my_code$+"'", @available_code$;
            next;
            
                if(@my_code$ == @available_code$)
                {
                    query_sql "SELECT `code` FROM `donate` WHERE `validation_code` = '"+@my_code$+"'", @available_code2$;
                    mes .@npc_name$;
                    mes "Your Donation Code is : [^FF7700"  + @available_code2$+ "^000000].";
                    close2;
                    end;
                }
                else
                {
                mes .@npc_name$;
                mes "Your Validation Code is Invalid.";
                close;
                }
            
        case 2:
            mes .@npc_name$;
            mes "Please enter your Donation Code:";
            input @donate_code$;
            next;
            query_sql "SELECT `code` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @donation_code$;
            query_sql "SELECT `status` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @donate_status;
            if(strtoupper(@donate_code$)==@donation_code$ && @donate_status == 0)
            {
                if( .itemORcash == 0)
                {
                    query_sql "SELECT `item_amount` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @Donation_Code$;
                    mes .@npc_name$;
                    mes "You get ^0000FF" + getitemname(.donate_item) + " - " + @Donation_Code$ + " ea.^000000";
                    query_sql "UPDATE `donate` SET `status`=1 WHERE `code`='"+@donate_code$+"'";
                    close2;
                    //query_sql "DELETE FROM `donate` WHERE `code`='"+@donate_code$+"'";
                    getitem .donate_item,@Donation_Code$;
                    end;
                }
                else
                {
                    query_sql "SELECT `item_amount` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @Donation_Code$;
                    mes .@npc_name$;
                    mes "You get ^0000FF" + @Donation_Code$ + " Cash Point.^000000";
                    query_sql "UPDATE `donate` SET `status`=1 WHERE `code`='"+@donate_code$+"'";
                    close2;
                    //query_sql "DELETE FROM `donate` WHERE `code`='"+@donate_code$+"'";
                    set #CASHPOINTS, @Donation_Code$;
                    end;
                
                }
            }
            else
            {
                mes .@npc_name$;
                mes "This Donation Code doesn't exist.";
                close;
            }
            
        case 3:
            mes .@npc_name$;
            mes "Have a nice day.";
            close;
    }


// ============================================ //


OnInit:
    query_sql "CREATE TABLE IF NOT EXISTS `donate` (`code` TINYTEXT NOT NULL, `item_amount` INT NOT NULL, `validation_code` TEXT NOT NULL, `status` TEXT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM";
    query_sql "CREATE TABLE IF NOT EXISTS `donation` (`name` TEXT NOT NULL, `code` TEXT NOT NULL, `item_amount` INT NOT NULL, `validation_code` TEXT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM";


}
 
 and This 

Breaker

 

 

prontera,138,171,4	script	Breaker Ladder	885,{



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)";
end;

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

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 "Billow",-,"Emblem of Solar God",Lesg,"Ripple",Lrip,"Silver Ornament",Lsil,"Wrath of Valkyrie",Lval;
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 50 Breaker Points for this..";
mes "Do you still want Billow?";
menu "Yes",-,"No",Lno;
if(brokeemp < 50) goto Lnep;
if(brokeemp >= 50)
next;
mes "Here you go!";
getitem 7091,1;
set brokeemp,brokeemp-50;
end;


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

Lesg:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 70 Breaker Points for this..";
mes "Do you still want Emblem of Solar God?";
menu "Yes",-,"No",Lno;
next;
if(brokeemp < 70) goto Lnep;
if(brokeemp >= 70)
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Here you go!";
getitem 7086,1;
set brokeemp,brokeemp-70;
end;

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

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

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

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)
end;

}

 

Err... Mybe you can connect it using www.yoursite.com/phpmyadmin ot login into your administrator acc that are connected into your databse...

In your database look for some word insert SQL or something like that...

Put that cmd

 

 

 
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;

 

And then run it... if it have any problem.. do post here...  ^ ^

 

**Edit**

Btw... What was that sql actually?..?

Edited by Kariton Revolution
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

Wait... Im actually confused... Are you trying to ask 2 question.. ??

First

 

how can i work this with my php 
 // ===== Donation Npc 1.0 ===================== //

// ===== Credits : Jhosef and trOn ============ //
// ===== Change Logs ========================== //
// ============================================ //






// ==== NPC Location ========================== // 
prontera,147,175,4    script    Donation NPC    807,{


// === Configuration ========================== //
    set .gms_level, 99;
    set .code_length,10; // Length for the Donation Code
    set .code_length2,3; // Length for the Validation Code
    set .donate_item, 7179; // Donation Item
    set .@itemORcash, 0; // 0 for Item or 1 for Cash Point
    set .@npc_name$, "Donation Npc";
    setarray .coupon_code$[0],"A","B","C","D","E","F","G","H","I","J","K","L",
                              "M","N","O","P","Q","R","S","T","U","V","W","X",
                              "Y","Z","0","1","2","3","4","5","6","7","8","9";
                            
    setarray .validation_code$[0],"A","B","C","D","E","F","G","H","I","J","K","L",
                              "M","N","O","P","Q","R","S","T","U","V","W","X",
                              "Y","Z","0","1","2","3","4","5","6","7","8","9";


                            
// ==== NPC Talk ============================== //
    if( getgmlevel() >= .gms_level) goto AdminPanel;
    if( getgmlevel() < .gms_level) goto PlayerPanel;
    
// ==== Don't Edit This ======================= //
    set .@stats$,"0";
// ==== Admin Panel =========================== //
    AdminPanel:
    
    mes .@npc_name$;
    mes "Welcome " + strcharinfo(0) + ".";
    mes "^006633 NOTE: ^000000 ^0000FF1 PODS^000000 = ^FF3300 1PESO ^000000 ";
    next;
    switch(select("Add Donation Code:Player View:Exit"))
        {
            case 1:
                for(set @i, 0; @i < .code_length; set @i, @i+1)
                {
                    set @random_char, rand(0,(getarraysize(.coupon_code$)-1));
                    set @new_donation$, @new_donation$ + .coupon_code$[@random_char];
                }
                
                for(set @i, 0; @i< .code_length2; set @i, @i+1)
                {
                    set @random_char, rand(0,(getarraysize(.validation_code$)-1));
                    set @new_validation$, @new_validation$ + .validation_code$[@random_char];
                }
                mes .@npc_name$;
                mes "Enter Item Amount:";
                input @donate_amount;
                next;
                mes .@npc_name$;
                mes "Coupon added.";
                
                query_sql "INSERT INTO `donate` (`code`, `item_amount`,`validation_code`,`status`) VALUES ('"+@new_donation$+"', "+@donate_amount+", '"+@new_validation$+"' , '"+.@stats$+"')";
                set @new_donation$, "";
                set @new_validation$, "";
                next;        
                mes "This is the list of code logs";
                query_sql "SELECT `code` , `item_amount` , `validation_code` , `status` FROM `donate` ORDER BY `code` DESC", .@codelist$, .@status$, .@validation$;
                if(.@codelist)
                {
                    mes .@npcname$;
                    mes "There are no entrys in the Code List.";
                    close;
                } 
                else 
                {
                    next;
                    mes .@npcname$;
                    mes "The list will spawn at your main chat box.";
                    dispbottom "Codelist | Amount | Validation";
                    for(set @ei,0; @ei < getarraysize(.@codelist$); set @ei,@ei + 1) 
                    {
                        dispbottom ""+.@codelist$[@ei]+" | "+.@status$[@ei]+" | "+.@validation$[@ei]+" "; 
                    }                    
                }
                next;
                close;
                
            case 2:
                goto PlayerPanel;
            case 3:
                mes .@npc_name$;
                mes "Have a nice day.";
                close;
        }
    


// ==== Player Panel ========================== //
PlayerPanel:


    mes .@npc_name$;
    mes "Welcome to the Donation System. How can I help you?";
    next;
    switch(Select("View My Donation Code:Enter My Donation Code:Exit"))
    {
        case 1:
            mes .@npc_name$;
            mes "Please enter your Validation Code:";
            input @my_code$;
            next;
            query_sql "SELECT `validation_code` FROM `donate` WHERE `validation_code` = '"+@my_code$+"'", @available_code$;
            next;
            
                if(@my_code$ == @available_code$)
                {
                    query_sql "SELECT `code` FROM `donate` WHERE `validation_code` = '"+@my_code$+"'", @available_code2$;
                    mes .@npc_name$;
                    mes "Your Donation Code is : [^FF7700"  + @available_code2$+ "^000000].";
                    close2;
                    end;
                }
                else
                {
                mes .@npc_name$;
                mes "Your Validation Code is Invalid.";
                close;
                }
            
        case 2:
            mes .@npc_name$;
            mes "Please enter your Donation Code:";
            input @donate_code$;
            next;
            query_sql "SELECT `code` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @donation_code$;
            query_sql "SELECT `status` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @donate_status;
            if(strtoupper(@donate_code$)==@donation_code$ && @donate_status == 0)
            {
                if( .itemORcash == 0)
                {
                    query_sql "SELECT `item_amount` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @Donation_Code$;
                    mes .@npc_name$;
                    mes "You get ^0000FF" + getitemname(.donate_item) + " - " + @Donation_Code$ + " ea.^000000";
                    query_sql "UPDATE `donate` SET `status`=1 WHERE `code`='"+@donate_code$+"'";
                    close2;
                    //query_sql "DELETE FROM `donate` WHERE `code`='"+@donate_code$+"'";
                    getitem .donate_item,@Donation_Code$;
                    end;
                }
                else
                {
                    query_sql "SELECT `item_amount` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @Donation_Code$;
                    mes .@npc_name$;
                    mes "You get ^0000FF" + @Donation_Code$ + " Cash Point.^000000";
                    query_sql "UPDATE `donate` SET `status`=1 WHERE `code`='"+@donate_code$+"'";
                    close2;
                    //query_sql "DELETE FROM `donate` WHERE `code`='"+@donate_code$+"'";
                    set #CASHPOINTS, @Donation_Code$;
                    end;
                
                }
            }
            else
            {
                mes .@npc_name$;
                mes "This Donation Code doesn't exist.";
                close;
            }
            
        case 3:
            mes .@npc_name$;
            mes "Have a nice day.";
            close;
    }


// ============================================ //


OnInit:
    query_sql "CREATE TABLE IF NOT EXISTS `donate` (`code` TINYTEXT NOT NULL, `item_amount` INT NOT NULL, `validation_code` TEXT NOT NULL, `status` TEXT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM";
    query_sql "CREATE TABLE IF NOT EXISTS `donation` (`name` TEXT NOT NULL, `code` TEXT NOT NULL, `item_amount` INT NOT NULL, `validation_code` TEXT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM";


}
 

 

 

 

If you are using this... all you need is to execute this :

 

 
    query_sql "CREATE TABLE IF NOT EXISTS `donate` (`code` TINYTEXT NOT NULL, `item_amount` INT NOT NULL, `validation_code` TEXT NOT NULL, `status` TEXT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM";
    query_sql "CREATE TABLE IF NOT EXISTS `donation` (`name` TEXT NOT NULL, `code` TEXT NOT NULL, `item_amount` INT NOT NULL, `validation_code` TEXT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM";

 

on your sql database... Or just running those script cuz i see some OnInit: in those script... Mybe it can autorun automatically...
Try asking the older about this pal...

 

 


Second

 

Breaker Ladder 

 

 

prontera,138,171,4    script    Breaker Ladder    885,{



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)";
end;

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

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 "Billow",-,"Emblem of Solar God",Lesg,"Ripple",Lrip,"Silver Ornament",Lsil,"Wrath of Valkyrie",Lval;
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 50 Breaker Points for this..";
mes "Do you still want Billow?";
menu "Yes",-,"No",Lno;
if(brokeemp < 50) goto Lnep;
if(brokeemp >= 50)
next;
mes "Here you go!";
getitem 7091,1;
set brokeemp,brokeemp-50;
end;


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

Lesg:
next;
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "You need 70 Breaker Points for this..";
mes "Do you still want Emblem of Solar God?";
menu "Yes",-,"No",Lno;
next;
if(brokeemp < 70) goto Lnep;
if(brokeemp >= 70)
mes "[ ^00FF00 Kaspersky ^000000 ]";
mes "Here you go!";
getitem 7086,1;
set brokeemp,brokeemp-70;
end;

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

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

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

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)
end;

} 

 

 

I think you need some sql cmd to execute to make this script running prefectly pal.. 
Mybe you can ask the owner of this script creator about how to install this script without or with sql queries....
Edited by CheckMate
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  8
  • Reputation:   0
  • Joined:  12/17/11
  • Last Seen:  

In order to get a good result, the mysql query needs valid information to pull from your database.

@char_id$ for example is something that is not valid unless its implemented in a ro script.

What are you trying to do?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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;


help simple

MySQL : 

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;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  308
  • Reputation:   24
  • Joined:  11/26/12
  • Last Seen:  

Posted · Hidden by Patskie, November 8, 2013 - No reason given
Hidden by Patskie, November 8, 2013 - No reason given

/oops

Link to comment

  • Group:  Members
  • Topic Count:  161
  • Topics Per Day:  0.04
  • Content Count:  429
  • Reputation:   5
  • Joined:  11/21/11
  • Last Seen:  

thankyou .

another problem 

 

 

 

when im using @commands it always say " ?? " and all jobs are level 0 how to fix this?? help 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...