Jump to content

Feefty

Members
  • Posts

    175
  • Joined

  • Days Won

    1

Everything posted by Feefty

  1. Feefty

    debugmes

    - script RiftPoints -1,{ function getRank; function getRank_; function Cm; function getIP; function partyShare; function getRecord; OnInit: setarray .RiftPointsMobGain[0],10,40,60,80,90,120,135,500; setarray .RiftPointsGain[0], 120,168,235,329,461,645,903,1264,1770,2124,2549,3059,3671,4405, 5268,6343,7612,9134; setarray .RiftPointsLost[0], 24,37,58,91,143,225,356,561,885,1195,1616,2184,2949,3981, 5374,7258,9799,13229; setarray .RiftPointsRequired[0], 0,1200,4220,10990,23500,42780,68700,105600,150800,214100,278700, 344500,411700,488200,565400,643200,721600,800700; setarray .RiftRank$[0], "Solider, Rank 9", "Solider, Rank 8", "Solider, Rank 7", "Solider, Rank 6", "Solider, Rank 5", "Solider, Rank 4", "Solider, Rank 3", "Solider, Rank 2", "Solider, Rank 1", "Army 1-Star Officer", "Army 2-Star Officer", "Army 3-Star Officer", "Army 4-Star Officer", "Army 5-Star Officer", "Army General", "Army Great General", "Army Commander", "Army Governor"; setarray .RiftMaps$[0],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05","lhz_dun04","lhz_dun03","moc_fild22", "guild_vs1", "guild_vs2", "guild_vs3", "guild_vs4", "guild_vs5"; end; OnPCDieEvent: getmapxy(@map$,@x,@y,0); for (set .@j,0; .@j<getarraysize(.RiftMaps$); set .@j,.@j+1) { if (@map$ == .RiftMaps$[.@j] && getcharid(2) != getcharid(2, rid2name(killerrid))) { debugmes(killerrid); if (BaseLevel >= 99) { if (@map$ == "guild_vs1") { query_sql("UPDATE `char` SET `deaths` = deaths + 1 WHERE `char_id` = "+getcharid(0)); } query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @riftpoints); // get killed rank set @killedRank, getRank_(@riftpoints); if (compare(@map$, "g_cas")) { set @lost, .RiftPointsLost[@killedRank]*2; } else { set @lost, .RiftPointsLost[@killedRank]; } if (@riftpoints >= @lost) { set @minus, @riftpoints-@lost; } else { set @minus, 0; } // update rift points query_sql("UPDATE `char` SET `riftpoints` = "+@minus+", `riftpoints_last_timestamp` = NOW() WHERE `char_id` = "+getcharid(0)); query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @newRiftPoints); } // announce the killing announce strcharinfo(0)+" "+.RiftRank$[getRank(getcharid(0))]+" was killed by "+rid2name(killerrid)+"'s attack.",bc_area; dispbottom("You have died."); if (BaseLevel >= 99) { dispbottom("Total Rift Points: "+ Cm(@newRiftPoints)); if (@map$ == "guild_vs1") { dispbottom("Kills: "+getRecord("kills", getcharid(0))+" Deaths: "+getRecord("deaths", getcharid(0))); } if (getRank_(@riftpoints) > getRank_(@newRiftPoints)) { dispbottom("You have been demoted to "+ .RiftRank$[getRank_(@newRiftPoints)]); } } } } end; OnPCKillEvent: getmapxy(@map$,@x,@y,0); for (set .@j,0; .@j<getarraysize(.RiftMaps$); set .@j,.@j+1) { if (@map$ == .RiftMaps$[.@j] && getcharid(2) != getcharid(2, rid2name(killedrid))) { debugmes(killedrid); if (@map$ == "guild_vs1") { query_sql("UPDATE `char` SET `kills` = kills + 1 WHERE `char_id` = "+getcharid(0)); } // if player below level 99 if (BaseLevel < 99) { dispbottom("You must be level 99 or higher to start gaining Rift Points."); break; } query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0, rid2name(killedrid)), @riftpoints); // get my current rift points query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @currentRiftPoints); // get killed rank set @killedRank, getRank_(@riftpoints); set @gain, .RiftPointsGain[@killedRank]; if (getgroupid() == 1) { set @gain, (@gain+((@gain*30)/100)); } if (KillPlayer$ == rid2name(killedrid)) { set @gain, (@gain-((@gain*70)/100)); } if (compare(@map$, "g_cas")) { set @gain, @gain*2; } set KillPlayer$, rid2name(killedrid); // update rift points query_sql("UPDATE `char` SET `riftpoints` = riftpoints + "+@gain+", `riftpoints_last_timestamp` = NOW() WHERE `char_id` = "+getcharid(0)); // get my new rift points query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @newRiftPoints); // display messages dispbottom("You have gained "+Cm(@gain)+" Rift Points."); dispbottom("You have defeated "+rid2name(killedrid)+" "+.RiftRank$[getRank(getcharid(0, rid2name(killedrid)))]+"."); dispbottom("Total Rift Points: "+ Cm(@newRiftPoints)); if (@map$ == "guild_vs1") { dispbottom("Kills: "+getRecord("kills", getcharid(0))+" Deaths: "+getRecord("deaths", getcharid(0))); } if (getRank_(@currentRiftPoints) < getRank_(@newRiftPoints)) { dispbottom("You have been promoted to "+ .RiftRank$[getRank_(@newRiftPoints)]); if (getRank_(@newRiftPoints) >= 9) { announce strcharinfo(0)+" has been promoted to "+.RiftRank$[getRank_(@newRiftPoints)], b_all; } } sleep2 60000; set KillPlayer$, ""; break; } } end; OnNPCKillEvent: getmapxy(@map$,@x,@y,0); for (set .@j,0; .@j<getarraysize(.RiftMaps$); set .@j,.@j+1) { if (@map$ == .RiftMaps$[.@j]) { // if player below level 99 if (BaseLevel < 99) { dispbottom("You must be level 99 or higher to start gaining Rift Points."); break; } set @gain, (((getmonsterinfo(killedrid, MOB_LV)/3)*getmonsterinfo(killedrid, MOB_SIZE))/3); if (getgroupid() == 1) { set @gain, (@gain+((@gain*30)/100)); } // get my current rift points query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @currentRiftPoints); // update rift points query_sql("UPDATE `char` SET `riftpoints` = riftpoints + "+@gain+", `riftpoints_last_timestamp` = NOW() WHERE `char_id` = "+getcharid(0)); // get my new rift points query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @newRiftPoints); // display messages dispbottom("You have gained "+Cm(@gain)+" Rift Points."); dispbottom("Your Current Rift Points: "+ Cm(@newRiftPoints)); if (getRank_(@currentRiftPoints) < getRank_(@newRiftPoints)) { dispbottom("You have been promoted to "+ .RiftRank$[getRank(@newRiftPoints)]); if (getRank_(@newRiftPoints) >= 9) { announce strcharinfo(0)+" has been promoted to "+.RiftRank$[getRank_(@newRiftPoints)], b_all; } } break; } } end; OnPcLoginEvent: query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @riftpoints); dispbottom("Your Current Rift Points: "+ Cm(@riftpoints)); dispbottom("Your Current Rank: "+ .RiftRank$[getRank_(@riftpoints)]); end; //OnPCLogoutEvent: //query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @riftpoints); //set @myRank, getRank_(@riftpoints); //set @newName$, changeRankName(getcharid(0), @myRank, strcharinfo(0)); //changeGuildName(@newName$, getcharid(0)); //end; function getRecord { query_sql("SELECT `"+getarg(0)+"` FROM `char` WHERE `char_id` = "+getarg(1), @record); return @record; } function partyShare { if (getarg(0) != 0) { for (set .@j, 0; .@j < getarraysize(getarg(1)); set .@j,.@j+1) { } } } function Cm { set .@str$, getarg(0); for(set .@i,getstrlen(.@str$)-3; .@i>0; set .@i,.@i-3) set .@str$, insertchar(.@str$,",",.@i); return .@str$; } function getIP { query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getarg(0), @ip$); return @ip$; } function getRank { query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getarg(0), @riftpoints); for (set .@j,getarraysize(.RiftPointsRequired)-1; .@j>=0; set .@j,.@j-1) { if (@riftpoints >= .RiftPointsRequired[.@j]) { return .@j; break; } } } function getRank_ { for (set .@j,getarraysize(.RiftPointsRequired)-1; .@j>=0; set .@j,.@j-1) { if (getarg(0) >= .RiftPointsRequired[.@j]) { return .@j; break; } } } }
  2. Feefty

    debugmes

    this is what i get from debugmes. and i think this is the culprit for my charserver to crash. (11/14/2012 19:59:16) [ Warning ] : Unexpected type for argument 1. Expected string. (11/14/2012 19:59:16) [ Debug ] : Data: param name='killerrid' type=121 (11/14/2012 19:59:16) [ Debug ] : Function: debugmes (11/14/2012 19:59:16) [ Debug ] : Source (NPC): RiftPoints (invisible/not on a map) (11/14/2012 19:59:16) [ Debug ] : script debug : 2000224 110010134 : 2000003 (11/14/2012 19:59:16) [ Warning ] : Unexpected type for argument 1. Expected string. (11/14/2012 19:59:16) [ Debug ] : Data: param name='killedrid' type=122 (11/14/2012 19:59:16) [ Debug ] : Function: debugmes (11/14/2012 19:59:16) [ Debug ] : Source (NPC): RiftPoints (invisible/not on a map) (11/14/2012 19:59:16) [ Debug ] : script debug : 2000003 110010134 : 2000224
  3. my charserver is crashing randomly im not sure why. (11/14/2012 19:23:40) [ Warning ] : Connection to Char Server lost.
  4. Feefty

    MD5 password

    i hate you too. i guess so yeah. but is it possible to use different hash? Its "I hate you." not "i hate you too." lol. i know, im just saying i hate him too.
  5. Feefty

    MD5 password

    i hate you too. i guess so yeah. but is it possible to use different hash?
  6. should i use the md5 password or just stick to plain one? because i think md5 is easy to crack and it doesn't matter if i hash my password.
  7. Hello, i'm trying to move my mysql server to another vps but im getting this error when i run the server. Host "IP" is not allowed to connect to this MySQL server i already set the iptables and create a mysql user specially for that ip. edit: im so dumb forgot to set the user FIXED
  8. Feefty

    setting up

    after installing php-mcrypt php-mbstring php-xml i got this error when restarting the php service NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/xsl.so' - /usr/lib/libexslt.so.0: symbol gcry_cipher_setkey, version GCRYPT_1.2 not defined in file libgcrypt.so.11 with link time reference in Unknown on line 0 Thanks.
  9. i didn't know that. Thanks!
  10. i thought attachrid can only attach the account id? *attachrid(<account ID>) or it does attach the char id of the current online char in that account id?
  11. i forgot to mention that i disabled the renewal casting.
  12. when i run the server there's no errors. it only happens when the random killing and dying starts
  13. it's a custom function.
  14. i did have the problem before the sleep2 that's why i did add them there and it still didn't work. i might just rewrite it because this is my first script.
  15. OnPCDieEvent also stopped working. its working fine when its not crowded in the pvp room and sometimes its not working for some players and sometimes it works. its kinda messy. here's my script OnPCDieEvent: sleep2 100; getmapxy(@map$,@x,@y,0); for (set .@j,0; .@j<getarraysize(.RiftMaps$); set .@j,.@j+1) { if (@map$ == .RiftMaps$[.@j] && getcharid(2) != getcharid(2, rid2name(killerrid))) { if (BaseLevel >= 99) { if (@map$ == "guild_vs1") { query_sql("UPDATE `char` SET `deaths` = deaths + 1 WHERE `char_id` = "+getcharid(0)); } query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @riftpoints); // get killed rank set @killedRank, getRank_(@riftpoints); if (compare(@map$, "g_cas")) { set @lost, .RiftPointsLost[@killedRank]*2; } else { set @lost, .RiftPointsLost[@killedRank]; } if (@riftpoints >= @lost) { set @minus, @riftpoints-@lost; } else { set @minus, 0; } // update rift points query_sql("UPDATE `char` SET `riftpoints` = "+@minus+", `riftpoints_last_timestamp` = NOW() WHERE `char_id` = "+getcharid(0)); query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @newRiftPoints); } // announce the killing announce strcharinfo(0)+" "+.RiftRank$[getRank(getcharid(0))]+" was killed by "+rid2name(killerrid)+"'s attack.",bc_area; dispbottom("You have died."); if (BaseLevel >= 99) { dispbottom("Total Rift Points: "+ Cm(@newRiftPoints)); if (@map$ == "guild_vs1") { dispbottom("Kills: "+getRecord("kills", getcharid(0))+" Deaths: "+getRecord("deaths", getcharid(0))); } if (getRank_(@riftpoints) > getRank_(@newRiftPoints)) { dispbottom("You have been demoted to "+ .RiftRank$[getRank_(@newRiftPoints)]); } } } } end; OnPCKillEvent: sleep2 500; getmapxy(@map$,@x,@y,0); for (set .@j,0; .@j<getarraysize(.RiftMaps$); set .@j,.@j+1) { if (@map$ == .RiftMaps$[.@j] && getcharid(2) != getcharid(2, rid2name(killedrid))) { if (@map$ == "guild_vs1") { query_sql("UPDATE `char` SET `kills` = kills + 1 WHERE `char_id` = "+getcharid(0)); } // if player below level 99 if (BaseLevel < 99) { dispbottom("You must be level 99 or higher to start gaining Rift Points."); break; } query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0, rid2name(killedrid)), @riftpoints); // get my current rift points query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @currentRiftPoints); // get killed rank set @killedRank, getRank_(@riftpoints); set @gain, .RiftPointsGain[@killedRank]; if (getgroupid() == 1) { set @gain, (@gain+((@gain*30)/100)); } if (KillPlayer$ == rid2name(killedrid)) { set @gain, (@gain-((@gain*70)/100)); } if (compare(@map$, "g_cas")) { set @gain, @gain*2; } set KillPlayer$, rid2name(killedrid); // update rift points query_sql("UPDATE `char` SET `riftpoints` = riftpoints + "+@gain+", `riftpoints_last_timestamp` = NOW() WHERE `char_id` = "+getcharid(0)); // get my new rift points query_sql("SELECT `riftpoints` FROM `char` WHERE `char_id` = "+getcharid(0), @newRiftPoints); // display messages dispbottom("You have gained "+Cm(@gain)+" Rift Points."); dispbottom("You have defeated "+rid2name(killedrid)+" "+.RiftRank$[getRank(getcharid(0, rid2name(killedrid)))]+"."); dispbottom("Total Rift Points: "+ Cm(@newRiftPoints)); if (@map$ == "guild_vs1") { dispbottom("Kills: "+getRecord("kills", getcharid(0))+" Deaths: "+getRecord("deaths", getcharid(0))); } if (getRank_(@currentRiftPoints) < getRank_(@newRiftPoints)) { dispbottom("You have been promoted to "+ .RiftRank$[getRank_(@newRiftPoints)]); if (getRank_(@newRiftPoints) >= 9) { announce strcharinfo(0)+" has been promoted to "+.RiftRank$[getRank_(@newRiftPoints)], b_all; } } sleep2 60000; set KillPlayer$, ""; break; } } end;
  16. what is the best way to use this? because sometimes it stop working. i also added sleep2 500; before the actual script run. buildin_rid2name: invalid RID
  17. how does it work? because i tried using with this setup 2berze, 3 dark illusion card and 60+ dex = no cast
  18. is it possible to make an instance with party on it? i'm planning to make a party vs party. or i should just duplicate the map? Thanks.
  19. yes, i was looking for cell_pk source for ages and does it work in latest rathena? Thanks! edit: tried it and not working. and im not sure if this line is a typo //find this else if(( sd->duel_group && !((!battle_config.duel_allow_pvp && map[m].flag.p //use this to replace else if(( sd->duel_group && !((!battle_config.duel_allow_pvp && map[m].flag.pvp) ||(!battle_config.duel_allow_gvg && map_flag_gvg(m))))||( cell_pk_check(t_bl, s_bl, m) == true ))
  20. can anyone help me? i want to make a pvp on a certain cell. Thanks.
  21. nvm. fixed. i did it manually instead. thanks anyway
  22. just now rev16873 because my old rev is getting my charserver crash
  23. hi, i updated my rathena revision and i'm getting this errors http://prntscr.com/j84r3 Thanks.
×
×
  • Create New...