Jump to content

Lord Ganja

Members
  • Posts

    444
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Lord Ganja

  1. Can anyone translate this address written in Thai into English?

    I was about to send something to this address but im having troubles to translate it because the one who sent it to me used an image. Can't use copy paste to google translator. Lol

    post-5465-0-28730800-1463757141_thumb.jpg

    I'm asking her to send it to me again in text not image but I havent got any reply from her.

    So maybe someone can help me with this, especially Thai members?

    Thanks in advance!

  2. I'm trying to spawn a monster with random slaves but couldn't find any.

     

    I can't use the skill NPC_SUMMONSLAVE in mob_skill_db.txt since it only has 5 slaves, can't be summon randomly. and I also need to add some tweaks to the slavemonsters using setunitdata.

     

    I also tried to use it on an npc script: unitskilluseid .mobgid,"NPC_SUMMONSLAVE",1; (i knew it wouldn't work from the very beginning XD)

     

    Then I saw this patch mob_controller_20140102.patch

     

    The patch contains mobassist script command but it also contains patch from setmobdata, getmobdata, etc..

     

    I can't apply the whole patch since it might conflict with setunitdata plus I don't actually need all of them.

     

    I only wanted/need the mobassist part but I don't know which parts of the patch should be included if I only use the mobassist script command and get rid of other script commands.

     

    can anyone convert this patch into mobassist ONLY? or provide a patch that only contains mobassist?

     

    Thanks in advance!

     

     

  3. I've been doing this for a while now. I can't finish it since i'm not actually good at src mod. Actually I posted something here before.

     

    Now I came up with these codes but it isn't working well. I got the idea from here.

     

    In this topic, OnNPCAttackedEvent = when a monster received a damage.

     

    Questions:

    1) will this code use too much memory since it will trigger each time a mob is hit?

     

    2)  if I use a script like this, will it still consume the same amount of memory?

                         OnNPCAttackedEvent:

                                   if( @attackedrid != 1002 ) end;

     

    3) As i've stated in this post, is it possible to only trigger OnNPCAttackedEvent to the mobs who are spawned with specific or "OnThisMobevent label?

     

    mob.c

    //Call when a mob has received damage.
    void mob_damage(struct mob_data *md, struct block_list *src, int damage)
    {
    +	// OnNPCAttackedEvent
    +	struct map_session_data *sd = NULL, *tmpsd[DAMAGELOG_SIZE];
    +	memset(tmpsd,0,sizeof(tmpsd));
    +	if ( src && src->type == BL_PC )
    +	{
    +		sd = (struct map_session_data *)src;
    +	}
    
    	if (src && damage > 0) { //Store total damage...
    		if (UINT_MAX - (unsigned int)damage > md->tdmg)
    			md->tdmg += damage;
    		else if (md->tdmg == UINT_MAX)
    			damage = 0; //Stop recording damage once the cap has been reached.
    		else { //Cap damage log...
    			damage = (int)(UINT_MAX - md->tdmg);
    			md->tdmg = UINT_MAX;
    		}
    		if ((src != &md->bl) && md->state.aggressive) //No longer aggressive, change to retaliate AI.
    			md->state.aggressive = 0;
    		//Log damage
    		mob_log_damage(md, src, damage);
    		md->dmgtick = gettick();
    
    +		// OnNPCAttackedEvent
    +		if(sd) { // if I didn't use if(sd) the map-server crash when a pet attacks a monster
    +			pc_setreg(sd, add_str("@attackerrid"), sd->bl.id);
    +			pc_setreg(sd, add_str("@attackedrid"), md->mob_id);
    +			npc_event_doall_id("OnNPCAttackedEvent", sd->bl.id);
    +		}
    	}
    
    	if (battle_config.show_mob_info&3)
    		clif_charnameack(0, &md->bl);
    
    #if PACKETVER >= 20120404
    	if( battle_config.monster_hp_bars_info){
    		int i;
    		for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
    			struct map_session_data *sd = map_charid2sd(md->dmglog[i].id);
    			if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
    				clif_monster_hp_bar(md, sd->fd);
    		}
    	}
    #endif
    
    	if (!src)
    		return;
    
    	if( md->special_state.ai == AI_SPHERE ) {//LOne WOlf explained that ANYONE can trigger the marine countdown skill. [Skotlex]
    		md->state.alchemist = 1;
    		mobskill_use(md, gettick(), MSC_ALCHEMIST);
    	}
    }
    

    Thanks in advance for those who can help!

  4.  

    Why don't you check http://www.board.midgard-community.com/files/ also? What do these sprites look like?

     

    I checked those sites and still can't find them. I forgot the servers where I saw them.

     

    I don't have the pictures of the sprites. But the susano is colored violet and a bit of animated. The Kyuubi demon fox cloak looks like an aura covering the user and has tail.

    I also saw something like the bones and skull of susano covered with the demon fox cloak.

  5. Ok, there's actually a bug in that function, that's why it doesn't work.

    static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv)
    {
    	struct map_session_data *sd = BL_CAST(BL_PC, src);
    	struct map_session_data *tsd = BL_CAST(BL_PC, target);
    

    Put this at the top of the function to fix it.

     

    Thank you Playtester! Maybe it should also be reported on github rAthena issues.

  6. In that code you already cap it before you do the division, but the halving damage for players should work.

     

    Yes, the marked button lets you run the map-server. Breakpoints can be placed by clicking on the small grey bar left of the source code.

     

    Yeah. I dunno why it gives half damage to both players and monsters though.

     

    anyway I guess it will still be good. I just think it would be better if I could separate damage from monsters and players.

  7. Not using visual studio? I just start it by pressing the green triangle button. =p

     

    And break you can put by just pressing on the left side of the window where the code is (a red dot appears).

     

    If your code is a bit different from you can also copy it in here.

     

    I'm using visual studio 2010. Is this the green triangle button? I can't seem to see the red dot that appears. lol

    post-5465-0-57709400-1458275319_thumb.png

     

     

    anyway here's my code.

    case MO_EXTREMITYFIST:
    			if(sstatus->sp <= 6000)
    				skillratio += 100 * (7 + sstatus->sp / 10);
    			else // Asura strike SP damage max is 6k
    				skillratio += 100 * (7 + 6000 / 10);
    			if (tsd)
    				skillratio /= 2; //Half damage for players
    			skillratio = min(500000,skillratio); //We stop at roughly 50k SP for overflow protection
    			break; 

    Btw i'm using the latest rA git revision.

  8. Um, don't know how I should put it, but it's impossible that if(tsd) is true when the target is a monster.

    Because:

    struct map_session_data *tsd = BL_CAST(BL_PC, src);

    The cast is only done for BL_PC not BL_MOB. Not to mention that a mob has no map_session_data so it would just crash at that point if you tried that.

    if (tsd && tsd->weight)
    	skillratio += 100 * tsd->weight / tsd->max_weight;

    It's also used for SL_KNUCKLEARROW already. =o

     

    Make sure you do a full a full recompile, removed that row in skill_damage_db.txt and restart the map server.

     

    When it still doesn't work, start the map-server via visual studio and put a breakpoint at that line to see what happens.

     

    I already did a full recompile.

    removed the asura strike from skill damage_db.txt

    restart the map server(im only trying it on test server)

    and it still give half damage to both monster and player.

     

    What I haven't done yet is

     

    When it still doesn't work, start the map-server via visual studio and put a breakpoint at that line to see what happens.

     

     

    ^ how do I start map-server via visual studio and put a breakpoint?

     

    anyway thanks for you support! :D

  9. Just don't use skill_damage_db then. It's harder to reorganize it to be applied first than it is to just put whatever damage code you want for your server in battle.c.

     

    Basically you just want to half the damage for players but before you cap the damage, right?

     

    So in battle.c:

    		case MO_EXTREMITYFIST:
    			skillratio += 100 * (7 + sstatus->sp / 10);
    			skillratio = min(500000,skillratio); //We stop at roughly 50k SP for overflow protection
    			break;
    Just change it to e.g.

    		case MO_EXTREMITYFIST:
    			skillratio += 100 * (7 + sstatus->sp / 10);
    			if (tsd) skillratio /= 2; //Half damage for players
    			skillratio = min(500000,skillratio); //We stop at roughly 50k SP for overflow protection
    			break;

    Thanks for this idea!!

    Btw is it possible to separate damage from monsters to players?

    like if target is a player the damage if halved

    while if the target is a monster(mvps, mobs) the damage is 3/4.

  10. If you're saying that, you want to change the element of asura strike?

    Asura strike has a default Neutral element. Card that modifies the weapon element cannot change the element of asura strike.

    Besides, it is not recommended to make it stack with other elements  since it might actually cause imbalance.

  11. I just noticed that when I cap the asura strike damage and reduce it's damage with skill_damage_db.txt, the capped damage is also reduced.


     


    e.g.


    battle.c



    if (skill_id == MO_EXTREMITYFIST )
            damage = min(damage,500);

    db/skill_damage_db.txt



    MO_EXTREMITYFIST,1,4095,-50,-50,-50,-50 // asura strike deals -50% damage

    ^ capped damage is 500, reduce by -50%, so the max output damage will become 250.


     


    Is it possible to be like this:


    - Capped damage is 500, reduce by -50%, the output damage will still be 500.


    - The reduce damage will be calculated first before comparing the reduced output damage to the cap damage.


    so if the reduced damage is higher than the cap damage, it will return the cap damage.


     


    Thanks in advance!


  12. I have a dual server hosted on a debian os.

     

    My problem now is I don't know how to run athena-start that will open 1 login server, 2 map server and 2 char server.

     

    I read this link -> https://rathena.org/wiki/Multiple_Servers

    but I can't understand well the last part of the instruction which is written below

    athena-start
    There many way to setup that little script, but assuming or both version are on ./stable/server1/ and ./stable/server2. 
    We could copy this script in ./stable directory and edit him to check and launch our servers.
    L_SRV=./server1/login-server_sql
    C_SRV1=./server1/char-server_sql
    M_SRV1=./server1/map-server_sql
    C_SRV2=./server2/char-server_sql
    M_SRV2=./server2/map-server_sql
    check_files() {
       for i in ${L_SRV} ${C_SRV1} ${M_SRV1} ${C_SRV2} ${M_SRV2}
       do
           if [ ! -f ./$i ]; then
               echo "$i does not exist, or can't run."
               echo "Stop. Check your compile."
               exit 1;
           fi
       done
    #    more << EOF
    echo "Check complete."
    echo "Looks good, a nice Athena!"
    #EOF
    }
    'start')
           print_start
           check_files
           exec .{L_SRV}&
           exec .{C_SRV1}&
           exec .{M_SRV1}&
           exec .{C_SRV2}&
           exec .{M_SRV2}&
    'stop')
           killall ${L_SRV} ${C_SRV1} ${M_SRV1} ${C_SRV2} ${M_SRV2}
    

    My file directory is like this:

    rAthena/trans/athena-start

    rAthena/thirdjob/athena-start

     

    Questions:

    1) Do I need to copy 1 athena-start and paste it on rAthena(together with trans and thirdjob folder) folder?

    2) Which parts do I need to edit on athena-start? 

     

    Thanks in advance!

×
×
  • Create New...