Jump to content
  • 0

Question

Posted (edited)

Hi I have a problem here

 

brasilis,232,322,5    script    Class S na Halimaw    897,{
    
    query_sql "SELECT `char`.`name`,CAST(`value` AS UNSIGNED) " + 
                  "FROM global_reg_value " + 
                  "LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id " +
               "WHERE global_reg_value.`str`='class_s' " + 
                  "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 20",.@aid$,.@var;
                    mes "[Class-S na Halimaw]";
                for (set .@i,0; .@i<8; set .@i,.@i+1) {
                    mes (.@i+1) +". ^0000FF"+ .@aid$[.@i]           +"^000000 ["+ .@var[.@i] +"]";
                    close;
                }
                end;
        }

The ladder is just showing 1 player, it should show at least 8 but I dont how to do it. I tried but fail

 

please help.

Edited by LatSo

7 answers to this question

Recommended Posts

Posted
                for (set .@i,0; .@i<8; set .@i,.@i+1) {
                    mes (.@i+1) +". ^0000FF"+ .@aid$[.@i]           +"^000000 ["+ .@var[.@i] +"]";
-                   close;
                }
+               close;

your script close the window and put an end on for loop after one iteration

  • Upvote 1
Posted

It only show 1 player on the ladder instead of showing only the top 8

 

it should show at least 8 but I dont how to do it.

you have more than 8 players with a value? I don't see anything wrong in this script



any1 help?

Posted

about that, already fixed that the other day sorry if i did not update the status of this.

 

anyways thanks :)



Sir capuche

 

how to do this script, Before you can warp into map x, you need to be included in the ladder?

Posted


query_sql "SELECT `char`.`name`,CAST(`value` AS UNSIGNED) " +

"FROM global_reg_value " +

"LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id " +

"WHERE global_reg_value.`str`='class_s' " +

"ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 20",.@aid$,.@var;

.@name$ = strcharinfo(0);

for (set .@i,0; .@i<8; set .@i,.@i+1)

if ( .@aid$[.@i] == .@name$ ) break;// is in the top 8 ladder

if ( .@i == 8 ) {

mes "you need to be include in the ladder";

close;

}

warp "prontera",0,0;

Posted

So that code will warp a player to prontera?

-     .@name$ = strcharinfo(0);
+     set .@name$, strcharinfo(0);

it will warp a top 8 in prontera

change this if you don't use rathena

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...