Jump to content

Jey

Members
  • Posts

    249
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Jey

  1. Did you enable the devtoolset for this shell session with `scl enable devtoolset-7` before you execute the configure script?

    Usually this error is reported, if the g++ compiler is outdated (like nitrous already mentioned).

    • Like 1
  2. On 3/5/2018 at 11:29 AM, Xatori said:

    Problem hierbei ist das man von lvl 100 auf 101 ca 300M EXP braucht habe ich da eine Falsche Tabelle?

    In der table sind die exp komma-getrennt und um in das level aufzusteigen, wird die kumulierte exp benötigt. Ergo benötigt man von 99 auf 100 100300002-99999998 also 300k exp.

    Allerdings muss ich sagen, dass ich die pre-re exp table auch nicht sonderlich gut fand. Ich habe damals mit Excel (oder Libreoffice Calculator) und Geogebra die pre-re exp table so angepasst, dass sich (für unsere Rates) ein angenehmes Levelgefühl eingestellt hat. Ich würde dir das selbe empfehlen. Ansonsten kannst du auch gerne unsere von damals probieren, ich hänge sie hier an.

    job_exp.txt

    • Love 1
  3. The current job changer should ask twice to confirm the job change:

    First Select the class:

    image.png.1ee73ffaa550187584ebcbce9fc0bac9.png

    Then confirm it:

    image.png.3c7e6559ef15e1034fdb6f552cd92068.png

    So it shouldn't happen by mistake.

     

    If you still want to disable all Non-Trans-Third-Classes you could add this to the Can_Change_Third-function in the jobmaster:

    	if( !(eaclass()&EAJL_UPPER) )
    		return false; // Non trans class

    Keep in mind, that you also disable Baby Third classes with this addition.

    • Love 1
  4. It should be the full script, not sure if I missed anything.

    But it's non applicable on the current rathena version. Unfortunately I'm pretty lazy in terms of updating diffs, therefore I'd like delay that work until we got a proper plugin system. Everyone who wants to use it before that  should be able to get it done with the "instructions" above.

  5. "Please check total character numbers?" Did you increase the character slots, or do you have more character db entries than character slots? I'm using the same client, and didn't run into that issue yet.

     

    Edit: But I also haven't tried to create a character using _M/_F. Try to create the account directly in the database

    • Upvote 1
  6. Hey Judas,

    I had the same idea (for WoE statistics) some time ago. And I solved it by just incrementing character variables at the specific src positions:

      src git:(master)  grep -nr "WoE Statistik"
    map/intif.c:286:	if( agit_flag || agit2_flag ) pc_setglobalreg(sd,add_str("woestat_chat"), pc_readglobalreg(sd,add_str("woestat_chat"))+1);// [Jey] WoE Statistik
    map/unit.c:400:	if( bl->type == BL_PC && (agit_flag || agit2_flag) ) pc_setglobalreg(sd,add_str("woestat_walked"), pc_readglobalreg(sd,add_str("woestat_walked"))+1);// [Jey] WoE Statistik
    map/unit.c:1911:		if( map_flag_woe(sd->bl.m) ) pc_setglobalreg(sd,add_str("woestat_skilluse"), pc_readglobalreg(sd,add_str("woestat_skilluse"))+1);// [Jey] WoE Statistik
    map/clif.c:10760:	if( agit_flag || agit2_flag ) pc_setglobalreg(sd,add_str("woestat_chat"), pc_readglobalreg(sd,add_str("woestat_chat"))+1); // [Jey] WoE Statistik
    map/clif.c:11047:	if(agit_flag || agit2_flag ) pc_setglobalreg(sd,add_str("woestat_chat"), pc_readglobalreg(sd,add_str("woestat_chat"))+1); // [Jey] WoE Statistik
    map/pc.c:5060:	if( map_flag_woe(sd->bl.m) ) pc_setglobalreg(sd,add_str("woestat_potuse"), pc_readglobalreg(sd,add_str("woestat_potuse"))+1); // [Jey] WoE Statistik
    map/pc.c:5449:		if( sd->vars_ok && (agit_flag || agit2_flag) ) pc_setglobalreg(sd,add_str("woestat_warpcount"), pc_readglobalreg(sd,add_str("woestat_warpcount"))+1);// [Jey] WoE Statistik
    map/pc.c:7586:	// [Jey] WoE Statistik
    map/pc.c:8418:	if( map_flag_woe(sd->bl.m) ) pc_setglobalreg(sd,add_str("woestat_itemheal"), pc_readglobalreg(sd,add_str("woestat_itemheal"))+hp);// [Jey] WoE Statistik
    map/party.c:938:	if(agit_flag || agit2_flag ) pc_setglobalreg(sd,add_str("woestat_chat"), pc_readglobalreg(sd,add_str("woestat_chat"))+1);// [Jey] WoE Statistik
    map/skill.c:564:	if( sd != NULL && map_flag_woe(sd->bl.m) ) pc_setglobalreg(sd,add_str("woestat_heal"), pc_readglobalreg(sd,add_str("woestat_heal"))+heal);// [Jey] WoE Statistik
    map/skill.c:2584:				if( map_flag_woe(sd->bl.m) ) pc_setglobalreg(sd,add_str("woestat_broken"), pc_readglobalreg(sd,add_str("woestat_broken"))+1);// [Jey] WoE Statistik
    map/skill.c:8564:			if( sd != NULL && map_flag_woe(sd->bl.m) ) pc_setglobalreg(sd,add_str("woestat_heal"), pc_readglobalreg(sd,add_str("woestat_heal"))+hp);// [Jey] WoE Statistik
    map/skill.c:8754:				if ((dstsd = g->member[i].sd) != NULL && sd != dstsd && !dstsd->state.autotrade && !pc_isdead(dstsd) && pc_readglobalreg(dstsd,add_str("nowoe")) == 0) {// [Jey] WoE Statistik
    map/guild.c:1049:	if( agit_flag || agit2_flag ) pc_setglobalreg(sd,add_str("woestat_chat"), pc_readglobalreg(sd,add_str("woestat_chat"))+1);// [Jey] WoE Statistik

    And a NPC which showed the player stats and resets them on ever woe start:

    prontera,218,87,5	script	WoE Statistik	833,{
    OnWhisperGlobal:
    	callfunc "CheckWoEStatReset";
    	mes "Deine letzte WoE Statistik:";
    	mes "Kills: "+woestat_kills;
    	mes "Tode: "+woestat_deaths;
    	if( woestat_deaths > 0 )
    		mes "KDA: "+callfunc("GetPercentage",(woestat_kills*100)/woestat_deaths);
    	else
    		mes "KDA: Perfekt";
    	mes "Maximale Killcombo: "+woestat_killcombo;
    	mes "Heilung gewirkt: "+callfunc("ThousandPoints",woestat_heal);
    	mes "Itemheilung gewirkt: "+callfunc("ThousandPoints",woestat_itemheal);
    	mes "Schaden: "+callfunc("ThousandPoints",woestat_dmgdealt);
    	mes "Schaden erlitten: "+callfunc("ThousandPoints",woestat_tanked);
    	mes "Skills genutzt: "+callfunc("ThousandPoints",woestat_skilluse);
    	mes "Potions genutzt: "+callfunc("ThousandPoints",woestat_potuse);
    	mes "Zerbrochene Rüstung: "+woestat_broken;
    	mes "Chat Kommunikation: "+callfunc("ThousandPoints",woestat_chat);
    	mes "Strecke zurückgelegt: "+callfunc("ThousandPoints",woestat_walked);
    	mes "Höchste AFK-Zeit in Sek.: "+callfunc("ThousandPoints",woestat_idle);
    	mes "Emps gebrochen: "+woestat_empbreak;
    	mes "Gewarpt: "+callfunc("ThousandPoints",woestat_warpcount);
    	close;
    }
    //if( map_flag_woe(sd->bl.m) ) pc_setglobalreg(sd,"woestat_heal", pc_readglobalreg(sd,"woestat_heal")+heal);
    
    //if( map_flag_woe(sd->bl.m) ) pc_setglobalreg(sd,"woestat_chat", pc_readglobalreg(sd,"woestat_chat")+1);
    //if( agit_flag || agit2_flag ) pc_setglobalreg(sd,"woestat_chat", pc_readglobalreg(sd,"woestat_chat")+1);
    // return pc_setpos((TBL_PC*)bl, map_id2index(m), x, y, type);
    function	script	CheckWoEStatReset	{
    	if( playerattached() &&  woestat_id != $LastWoEID )
    	{
    		set woestat_id,$LastWoEID; //Day of the Year
    		woestat_kills = 0;
    		woestat_deaths = 0;
    		woestat_killcombo = 0;
    		woestat_killcombo_tmp = 0;
    		woestat_heal = 0;
    		woestat_itemheal = 0;
    		woestat_dmgdealt = 0;
    		woestat_tanked = 0;
    		woestat_skilluse = 0;
    		woestat_potuse = 0;
    		woestat_broken = 0;
    		woestat_chat = 0;
    		woestat_walked = 0;
    		woestat_idle = 0;
    		woestat_empbreak = 0;
    		woestat_warpcount = 0;
    	}
    	return;
    }
    
    -	script	WoEStats	-1,{
    	end;
    OnAgitStart:
    OnAgitStart2:
    OnAgitNStartBE:
    OnAgitNStartTE:
    	initnpctimer;
    	$LastWoEID++;
    	addrid(0);
    OnPCLoginEvent:
    	callfunc "CheckWoEStatReset";
    	end;
    
    OnPCKillEvent:
    	if( callfunc("onActiveGuildCastle") )
    	{
    		woestat_kills++;
    		woestat_killcombo_tmp++;
    		if( woestat_killcombo_tmp > woestat_killcombo ) set woestat_killcombo,woestat_killcombo_tmp;
    	}
    	end;
    
    OnPCDieEvent:
    	if( callfunc("onActiveGuildCastle") )
    	{
    		woestat_deaths++;
    		woestat_killcombo_tmp = 0;
    	}
    	end;
    
    OnAgitEnd:
    OnAgitEnd2:
    OnAgitNEndBE:
    OnAgitNEndTE:
    	stopnpctimer;
    
    OnTimer30000: //Alle 30 Sekunden Idletimecheck (Relativ ungenau, aber egal.)
    	addrid(0);
    	set .@idle,checkidle();
    	if( .@idle > woestat_idle ) set woestat_idle,.@idle;
    	end;
    }

    It likely isn't the best approach, but at least it worked fine

     

    To answer your question properly:

    1. Simple OnPCKillEvent script.
    2. SRC edit by comparing the character variable
    3. same as 2.
    4. SRC edit incrementing the character variable

    • Upvote 1
  7. Mh... I'm not really sure if this really belongs to file releases. I don't think anyone is in need of a login system without an associated web site :D

    You could post these things under script/source support. Or if you feel confident you could try to improve rathenas FluxCP on our github page by submitting pull requests. Help is highly appreciated there, but keep in mind that your code must fulfill high standards, so doing small issues/additions first will help you to get into it and help us to know you and your code style better :)

    Edit: https://github.com/rathena/FluxCP

    Note: Akkarin is currently more or less the only one, who is maintaining the FluxCP. Most of the rathena devs are working on the emulator itself. So it would be nice to have another active person there.

    • Upvote 2
  8. If I may give some more feedback:

    
    	if (empty($first) || empty($last) || empty($email) || empty($uid) || empty($pwd)) {
    		header("Location: ../signup.php?signup=empty");
    		exit();
    	} else {
    		//Check if input characters are valid
    		if (!preg_match("/^[a-zA-Z]*$/", $first) || !preg_match("/^[a-zA-Z]*$/", $last) || !preg_match("/^[1-9][0-9]*$/", $gid)) {
    			header("Location: ../signup.php?signup=invalid");
    			exit();
    		} else {
    			//Check if email is valid
    			if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
    				header("Location: ../signup.php?signup=email");
    				exit();
    			} else {
    				//Check if username exists USING PREPARED STATEMENTS
    				$sql = "SELECT * FROM login WHERE userid=?";
    				//Create a prepared statement
    				$stmt = mysqli_stmt_init($conn);
    				//Check if prepared statement fails
    				if(!mysqli_stmt_prepare($stmt, $sql)) {
    				    header("Location: ../index.php?login=error");
    				    exit();
    				} else {
    					//Bind parameters to the placeholder

    This nesting makes the code look pretty bad, try to use more functions, classes and their methods to make the code more readable.

    For example these prepared statements could be used like objects `$stmt->bindParam(1$name);`

    Rathena is currently able to hash passwords with md5.

     

    Edit: But I like the usage of regex to validate the user input.

  9. /*//De-hashing the password (use this if password is hashed)
    $hashedPwdCheck = password_verify($pwd, $row['user_pwd']);
    if ($hashedPwdCheck == false) {
    header("Location: ../index.php?login=error");
    exit();
    }*/

    The password check is completely disabled, so currently you need to send a password which is >= 1 and you're able to log in with any account.

  10. 14 hours ago, Scanty said:

     

    16393,-1 //HD_Ori_Box5
    16394,-1//HD_Ori_Box10
    16395,-1 //HD_Elu_Box5
    16396,-1 //HD_Elu_Box10

    Cool! Never knew it's possible to remove flags by adding a negative value! But I think it's needed to remove the

    //  4 - GUID Item


    Flag to make them stackable. So you'd need to add 16393, -4 etc.

×
×
  • Create New...

Important Information

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