Jump to content

Angelmelody

Members
  • Content Count

    772
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by Angelmelody

  1. ok updated .@nb = query_sql("select `name`, r.value, `online` from `char` as c INNER JOIN( select `account_id`, `value` from `acc_reg_num_db` WHERE `key` ='#PK_Points' AND `value` > 0 GROUP BY `account_id` order by `value` desc limit 10) as r on c.account_id = r.account_id order by r.value desc,char_num asc", .@name$, .@value, .@online); if(.@nb) mes "Top "+( ++.@j)+" - Points: "+.@value[.@i]; for( .@i = 0; .@i < .@nb; .@i++ ) { if(.@i ) { if(.@value[.@i] != .@value[.@i-1] ){ if(!.@k){ mes " > [Offline]"; } mes "Top "+(++.@j)+" - Points: "+.@value[.@i]; .@k = 0; } if(!.@k && .@i == (.@nb-1) ) { mes " > [Offline]"; } } if(.@online[.@i]) { mes " > "+ .@name$[.@i]; .@k++; } }
  2. ok try this.. .@nb = query_sql("select `name`, r.value, `online` from `char` as c INNER JOIN( select `account_id`, `value` from `acc_reg_num_db` WHERE `key` ='#PK_Points' AND `value` > 0 GROUP BY `account_id` order by `value` desc limit 10) as r on c.account_id = r.account_id order by r.value desc,char_num asc", .@name$, .@value, .@online); if(.@nb) mes "Top "+( ++.@j)+" - Points: "+.@value[.@i]; for( .@i = 0; .@i < .@nb; .@i++ ) { if(.@i ) { if(.@value[.@i] != .@value[.@i-1] ){ if(!.@k){ mes " > [Offline]"; } mes "Top "+(++.@j)+" - Points: "+.@value[.@i]; .@k = 0; } } if(.@online[.@i]) { mes " > "+ .@name$[.@i]; .@k++; } }
  3. index goes to -1 XD, now should be fixed ...try again... .@nb = query_sql("select `name`, r.value, `online` from `char` as c INNER JOIN( select `account_id`, `value` from `acc_reg_num_db` WHERE `key` ='#PK_Points' AND `value` > 0 GROUP BY `account_id` order by `value` desc limit 10) as r on c.account_id = r.account_id order by r.value desc,char_num asc", .@name$, .@value, .@online); if(.@nb) mes "Top "+( ++.@j)+" - Points: "+.@value[.@i]; for( .@i = 0; .@i < .@nb; .@i++ ) { if(.@i ) { if(.@value[.@i] != .@value[.@i-1] ){ mes "Top "+(++.@j)+" - Points: "+.@value[.@i]; } } mes " > "+ .@name$[.@i] +" "+( ( .@online[.@i] )? "^00FF00[Online]" : "^FF0000[Offline]" )+"^000000"; }
  4. Thank you. I already get rid of the error. What im encountering now is it prints only the char names of the top 1.. Below top 2,3,4 and so on.. The names are the same as top 1. Does the script only saves and run 1 account id? try this .@nb = query_sql("select `name` , r.value, `online` from `char` as c INNER JOIN(select `account_id`, `value` from `acc_reg_num_db` WHERE `key` ='#PK_Points' AND `value` > 0 GROUP BY `account_id` order by `value` desc limit 10) as r on c.account_id = r.account_id order by r.value desc,char_num asc", .@name$, .@value, .@online); if(.@nb) mes "Top "+( ++.@j)+" - Points: "+.@value[.@i]; for( .@i = 0; .@i < .@nb; .@i++ ) { if(.@i && .@value[.@i] != .@value[.@i-1] ){ mes "Top "+(++.@j)+" - Points: "+.@value[.@i]; } mes " > "+ .@name$[.@i] +" "+( ( .@online[.@i] )? "^00FF00[Online]" : "^FF0000[Offline]" )+"^000000"; }
  5. you don't need a loop to copy array you can directly access the .test array get value from array: getelementofarray(getvariableofnpc(.test,"testnpc"), index); set value to array: set( getelementofarray(getvariableofnpc(.test,"testnpc"),index), value);
  6. example: - script testnpc 123,{ OnWhisperGlobal: setarray .test[0],1,12,123; callfunc "abc"; end;}function script abc { dispbottom ""+getelementofarray(getvariableofnpc(.test,"testnpc"),1); return;}
  7. I prefer for loop w/o callfunction .@arr_size = getarraysize(arraytetst);freeloop(.@arr_size > 510);for(.@i=0; arraytetst[.@i] != valtest ; .@i++ );freeloop(0);if(.@i < .@arr_size ) mes " found!"else mes "not found!";end;
  8. 'compare' was sometimes failure for example: xmas (players are at this map) xmas_dun01 (in array) xmas_dun02 (in array)
  9. Like kikay style? i mean girly style?.. ... Yeah, the pink color gives a feeling of warmth ,but dunno why no designer was drawn to.. maybe they are all with a masculine mind ...
  10. why is there no pinky style released ?
  11. if( md->spawn_timer == INVALID_TIMER ) change into if( md->spawn_timer == INVALID_TIMER && pc_get_group_level(sd) > =99 )
  12. Upper: 56 ? Third jobs: 0x08 (8)Upper Third jobs: 0x10 (16)Baby Third jobs: 0x20 (32)
  13. Hi rathena has its own version.. try to search it Can you reproduce this bug? click
  14. https://github.com/dastgir/Hercules/commit/a6ceeb41d3daf30b1ce8f9c5e5b629977ca80964 and you have to generate HPM Hook manually
  15. addtimer can make player reattached again e.g. prontera,154,173,5 script testtestest02 100,{ mes "I Will warp you!"; addtimer 1000, strnpcinfo(0)+"::OnReattach"; warp "prt_fild08",169,186;OnReattach: mes "So what happens here?"; select("Something"); mes "And now?"; close;}
  16. This modification is not correct,here surbrace array range was limited to RC_MAX
  17. Do you enable the option 'Use Arial on All Langtypes' when diffing?
  18. its my fault, should change '<=' into '>'
  19. @@Clare insert before this line click if (sd->status.inventory[idx_equip].expire_time > 0) return false; srry fix typo
  20. OnEquipScript: <"if(!hascashmount())setcashmount();"> OnUnequipScript: <"if(hascashmount())setcashmount();">
  21. Don't enable anti alias functions when you fill pink color(#FF00FF)
  22. maybe guild_vs5 belong to gvgzone https://github.com/HerculesWS/Hercules/blob/master/npc/mapflag/gvg.txt#L22
  23. nope, the query result (floating point numbers) can't be fully saved into *athena integer variable , but can be fully saved into string variable. my test: query_sql ("SELECT TRUNCATE(weight/10,1) FROM item_db WHERE name_japanese = 'Poison Arrow'",.@weight); query_sql ("SELECT ROUND(weight/10,1) FROM item_db WHERE name_japanese = 'Poison Arrow'", .@weight$); mes "Weight: "+.@weight; mes "Weight: "+.@weight$;
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.