Jump to content
  • 0

Ladder Problem


LatSo

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

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

7 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


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;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

So that code will warp a player to prontera?

 

I tried but it did not work

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

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...