Jump to content

Louis T Steinhil

Members
  • Posts

    185
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Louis T Steinhil

  1. On 4/1/2024 at 12:01 PM, Bes said:

    Got this error on latest emulator

    IMG_0022.jpeg

    I fixed this issue by removing static on this part

    from this static TIMER_FUNC(autoattack_timer) {

    to this TIMER_FUNC(autoattack_timer) {

  2. Good day! Does this still work? I've encountered different structure on map.cpp. It was supposed to be like this but

     

    diff --git a/src/map/map.cpp b/src/map/map.cpp
    index 735bfc678..10537d75e 100644
    --- a/src/map/map.cpp
    +++ b/src/map/map.cpp
    @@ -2088,6 +2088,9 @@ int map_quit(struct map_session_data *sd) {
     		status_change_end(&sd->bl, SC_AUTOTRADE, INVALID_TIMER);
     		status_change_end(&sd->bl, SC_SPURT, INVALID_TIMER);
     		status_change_end(&sd->bl, SC_BERSERK, INVALID_TIMER);
    +#ifdef FORGOTTEN_SKILLS
    +		status_change_end(&sd->bl, SC_FURY2, INVALID_TIMER);
    +#endif
     		status_change_end(&sd->bl, SC__BLOODYLUST, INVALID_TIMER);
     		status_change_end(&sd->bl, SC_TRICKDEAD, INVALID_TIMER);
     		status_change_end(&sd->bl, SC_LEADERSHIP, INVALID_TIMER);

     

    it's different now.

     

    /*==========================================
     * Standard call when a player connection is closed.
     *------------------------------------------*/
    int map_quit(map_session_data *sd) {
    	int i;
    
    	if (sd->state.keepshop == false) { // Close vending/buyingstore
    		if (sd->state.vending)
    			vending_closevending(sd);
    		else if (sd->state.buyingstore)
    			buyingstore_close(sd);
    	}
    
    	if(!sd->state.active) { //Removing a player that is not active.
    		struct auth_node *node = chrif_search(sd->status.account_id);
    		if (node && node->char_id == sd->status.char_id &&
    			node->state != ST_LOGOUT)
    			//Except when logging out, clear the auth-connect data immediately.
    			chrif_auth_delete(node->account_id, node->char_id, node->state);
    		//Non-active players should not have loaded any data yet (or it was cleared already) so no additional cleanups are needed.
    		return 0;
    	}
    
    	if (sd->expiration_tid != INVALID_TIMER)
    		delete_timer(sd->expiration_tid, pc_expiration_timer);
    
    	if (sd->npc_timer_id != INVALID_TIMER) //Cancel the event timer.
    		npc_timerevent_quit(sd);
    
    	if (sd->autotrade_tid != INVALID_TIMER)
    		delete_timer(sd->autotrade_tid, pc_autotrade_timer);
    
    	if (sd->npc_id)
    		npc_event_dequeue(sd);
    
    	if (sd->bg_id)
    		bg_team_leave(sd, true, true);
    
    	if (sd->bg_queue_id > 0)
    		bg_queue_leave(sd, false);
    
    	if( sd->status.clan_id )
    		clan_member_left(sd);
    
    	pc_itemcd_do(sd,false);
    
    	npc_script_event(sd, NPCE_LOGOUT);
    
    	//Unit_free handles clearing the player related data,
    	//map_quit handles extra specific data which is related to quitting normally
    	//(changing map-servers invokes unit_free but bypasses map_quit)
    	if( sd->sc.count ) {
    		for (const auto &it : status_db) {
    			std::bitset<SCF_MAX> &flag = it.second->flag;
    
    			//No need to save infinite status
    			if (flag[SCF_NOSAVEINFINITE] && sd->sc.getSCE(it.first) && sd->sc.getSCE(it.first)->val4 > 0) {
    				status_change_end(&sd->bl, static_cast<sc_type>(it.first));
    				continue;
    			}
    
    			//Status that are not saved
    			if (flag[SCF_NOSAVE]) {
    				status_change_end(&sd->bl, static_cast<sc_type>(it.first));
    				continue;
    			}
    			//Removes status by config
    			if (battle_config.debuff_on_logout&1 && flag[SCF_DEBUFF] || //Removes debuffs
    				(battle_config.debuff_on_logout&2 && !(flag[SCF_DEBUFF]))) //Removes buffs
    			{
    				status_change_end(&sd->bl, static_cast<sc_type>(it.first));
    				continue;
    			}
    		}
    	}
    
    	for (i = 0; i < EQI_MAX; i++) {
    		if (sd->equip_index[i] >= 0)
    			if (pc_isequip(sd,sd->equip_index[i]))
    				pc_unequipitem(sd,sd->equip_index[i],2);
    	}
    
    	// Return loot to owner
    	if( sd->pd ) pet_lootitem_drop(sd->pd, sd);
    
    	if (sd->ed) // Remove effects here rather than unit_remove_map_pc so we don't clear on Teleport/map change.
    		elemental_clean_effect(sd->ed);
    
    	if (sd->state.permanent_speed == 1) sd->state.permanent_speed = 0; // Remove lock so speed is set back to normal at login.
    
    	struct map_data *mapdata = map_getmapdata(sd->bl.m);
    
    	if( mapdata->instance_id > 0 )
    		instance_delusers(mapdata->instance_id);
    
    	unit_remove_map_pc(sd,CLR_RESPAWN);
    
    	if (sd->state.vending)
    		idb_remove(vending_getdb(), sd->status.char_id);
    
    	if (sd->state.buyingstore)
    		idb_remove(buyingstore_getdb(), sd->status.char_id);
    
    	pc_damage_log_clear(sd,0);
    	party_booking_delete(sd); // Party Booking [Spiria]
    	pc_makesavestatus(sd);
    	pc_clean_skilltree(sd);
    	pc_crimson_marker_clear(sd);
    	pc_macro_detector_disconnect(*sd);
    	chrif_save(sd, CSAVE_QUIT|CSAVE_INVENTORY|CSAVE_CART);
    	unit_free_pc(sd);
    	return 0;
    }

     

  3. 2 hours ago, albertoacv4498 said:

    I'm using the get/setunitdata method, and hp, def, and mdef work fine. Problem is, atk and matk don't go higher by any means. If anything, they go lower. I tried the setunitdata atk/matkmin/max method, I tried setunitdata with Dex, I even tried making a custom SC, that I don't know if it was my issue not implementing/calling it properly, or if the mob also wasn't being affected by it... Any other methods, or help with one of those named before? I really want my elites to hit harder. Thank you!

    Try this https://github.com/rathena/rathena/pull/3968

  4. 8 hours ago, Legend said:

            case 1://Normal
                .@bonus_hp_rate += 0;
                .@bonus_dmg_rate += 0;
                .@bonus_damagetaken += 0;
                .@bonus_def += 0;
                .@bonus_mdef += 0;
                .@bonus_hit += 0;            
                .@bonus_flee += 0;

     

    Is there a way to add level bonuses to the monster?

    Did you mean increase base level of monsters?

    UMOB_LEVEL

  5. This code I made based on some posts I saw and just attached this onmymobdead. I killed a Drops and it will already give me exp and by adding this code will another line of exp. Is there a way to combine those two and just give me one liner with the total of both?

    // Exp Reward
    //============================================================
    function	script	F_Tower_Exp	{
    	setarray .@bonusExp[1],10,20,40,80,100;
    	'bonuzExp = .@bonusExp['level_mode];
    	set BaseExp, BaseExp + (getmonsterinfo(killedrid,3) * 'bonuzExp);
    	set JobExp, JobExp + (getmonsterinfo(killedrid,4) * 'bonuzExp);	
    return;
    }

    image.thumb.png.8c2b3f4d05150a855c1660d40d864ea4.png

    Almost same thing for monsters drop although I want it to make the monsters legit drop it not just makeitem script command them.

    // Drops Reward
    //============================================================
    function	script	F_Tower_Drop	{
    	setarray .@bonusDrop[1], 20, 40, 60, 80, 100;
    	set .@bonus, .@bonusDrop['level_mode];
    	set .@map$, getarg(0);
    	
    		getmapxy .@map$, .@x, .@y;
    		getmobdrops(killedrid);
    		set .@mc, $@MobDrop_count;
    		copyarray .@mi, $@MobDrop_item, .@mc;
    		copyarray .@mr, $@MobDrop_rate, .@mc;
    
    			for (set .@i, 0; .@i < .@mc; set .@i, .@i + 1) {
    				set .@dropChance, .@mr[.@i] + .@bonus;
    				if (rand(1, 100) <= .@dropChance) {
    					setarray .@items[getarraysize(.@items)], .@mi[.@i];
    				}
    			}
    
    			set .@d, getarraysize(.@items);
    
    			if (.@d) {
    				for (set .@j, 0; .@j < .@d; set .@j, .@j + 1) {
    					makeitem .@items[.@j], 1, .@map$, .@x, .@y;
    				}
    			}
    return;
    }

    All the help I can get. Thanks in advance!

  6. 25 minutes ago, pajodex said:
    ( .@party_id && .@is_leader && !.@has_instance )? "Generate dungeon "+.@md_name$+": "",

    change to

    ( .@party_id && .@is_leader && !.@has_instance )? "Generate dungeon "+.@md_name$:"",

     

    Still error sir

    image.thumb.png.5ab85f9c733fc5908c34e47641f4bc19.png

  7. 25 minutes ago, Pride said:
    mes "Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?";
    next;
    switch(select(
    	( .@party_id && .@is_leader && !.@has_instance )? "Generate dungeon "+.@md_name$+": ",
    	( .@party_id && .@has_instance )? "Enter the dungeon: ",
    	"Return to Alberta",
    	"Cancel"
    )){
    	// Cases go here
    }

     

    Still error sir

    image.thumb.png.65ba5d5e50754218bf9eba69e98dca69.png

×
×
  • Create New...