raksone

Members
  • Content count

    5
  • Joined

  • Last visited

  1. Hello guys, I'm trying to build a PvP Ranking script that allows you to get kill points in Party mode and that all members get the corresponding points. I am also trying to make an exception where the Killer and Party Members can not get points from the opponent if he has already been killed once in the same round. Apparently I could achieve it, however, only applies to the person who kills the opponent. The members of the Party do not even receive points for the kill. It seems that the "last_kill" rule only applies to the Killer, not to the Party Members involved in the killing. Do you have any idea how to configure it to apply to all Party members? OnPCKillEvent: set [email protected],getvar(PvPAllowed,getcharid(0,rid2name(killedrid))); if([email protected] == 1 && PvPAllowed == 1){ set [email protected]_id,getcharid(1); if( [email protected]_id ){ if ( getcharip(killedrid) == getcharip(getcharid(3)) ) { end; } // Can't obtain points if player has same IP if ( killedrid == last_kill ) { end; } // Can't get points if kill opponent twice in a row. set last_kill, killedrid; set PvPKills, PvPKills + 25; dispbottom "[ "+PvPKills+" ] PvPKills.", 0xF1948A; end; } }else{ getpartymember [email protected]_id,1; getpartymember [email protected]_id,2; set [email protected]_id, getcharid(3); set [email protected]$,strcharinfo(3); for( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] +1 ) if( isloggedin( [email protected][[email protected]],[email protected][[email protected]] ) ) if( attachrid( [email protected][[email protected]] ) ) if( HP && strcharinfo(3) == [email protected]$ ) set [email protected]_count,[email protected]_count + 1; for( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] +1 ) if( isloggedin( [email protected][[email protected]],[email protected][[email protected]] ) ) if( attachrid( [email protected][[email protected]] ) ) if( HP && strcharinfo(3) == [email protected]$ ){ if ( getcharip(killedrid) == getcharip(getcharid(3)) ) { end; } // Can't obtain points if player has same IP if ( killedrid == last_kill ) { end; } // Can't get points if kill opponent twice in a row. set last_kill, killedrid; set PvPKills, PvPKills + 25; dispbottom "[ "+PvPKills+" ] PvPKills.", 0xF1948A; end; } attachrid( [email protected]_id ); dispbottom "All your members have won PvP Kill Points."; }
  2. Hello guys, I could not figure out how to do it. Anyone does know how to? Thanks...
  3. Hello community, I've been trying to create or research a sql query to return a Player's Top Position Number through a command @LRank. I could have them listed by positions but I really do not know how to return the exact TOP # for the player when using the command even if he is not within the Top 10 Ranking. I was wondering if you could assist me by finding out the correct script to do it. Below is my script so far which is properly working at the moment: OnRank: dispbottom " "; dispbottom "=============== Ranking ===============", 0xffe066; soundeffect "hp.wav", 0; // this will play the soundeffect dispbottom " ", 0xFA4040; dispbottom " Top 10 List", 0xFA4040; dispbottom " ", 0xFA4040; set [email protected], query_sql( "select name, points from mvp_ranking where points > 0 order by points desc limit "+ .top, [email protected]$, [email protected] ); for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) dispbottom "[ " +([email protected] + 1) +" ] : " + [email protected]$[[email protected]] +" : [ " + [email protected][[email protected]] +" ] Pts", 0xffffff; dispbottom " ", 0xFA4040; *********** THIS IS THE PART THAT I'M STRUGGLING WITH *********** dispbottom "============== My Rank ==============", 0xffe066; query_sql "SELECT `char_id` , `points` FROM `mvp_ranking` ORDER BY `points` DESC",[email protected]_id,[email protected]; dispbottom "My Top is: " + [email protected]+ ".", 0x6666ff; dispbottom "==========================================", 0xffe066; end; I hope you can give me a hand on this. Thank you.
  4. Oh my god, you are a genious! Thank you very much, it works pretty well. I'm really grateful. Greetings!
  5. Hello community. Well, i have enabled the PK Mode on my server but i've been trying to exclude the First and Second Classes from this mode, so only the Rebirth Classes (Lord Knight, Champion, etc...) can fight on the maps which this is enabled. I've found that this can be edited in src/battle.c exactly in these lines: if( state&BCT_ENEMY && battle_config.pk_mode && map[m].flag.fvf && !map_flag_gvg(m) && s_bl->type == BL_PC && t_bl->type == BL_PC ) { // Prevent novice engagement on pk_mode (feature by Valaris) TBL_PC *sd = (TBL_PC*)s_bl, *sd2 = (TBL_PC*)t_bl; if ( (sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE || (sd2->class_&MAPID_UPPERMASK) == MAPID_NOVICE || (int)sd->status.base_level < battle_config.pk_min_level || (int)sd2->status.base_level < battle_config.pk_min_level || (battle_config.pk_level_range && abs((int)sd->status.base_level - (int)sd2->status.base_level) > battle_config.pk_level_range) ) state &= ~BCT_ENEMY; } Where by default the Novice Class fights is disabled on PK Maps. I tried to add the Mage Class exception by adding this and IT DOES WORK. But when i try to add the Wizard Class exception with the same condition it won't work: I don't why it doesnt work. I imagine that i have to use another condition but i have no clue about which one could be. I was wondering if some of you could help me out with this. Thank you in advance for your attention and possible help.