Jump to content

Louis T Steinhil

Members
  • Posts

    183
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Louis T Steinhil

  1. Good day i know its out of topic but if I patch the latest ui stylist and bodypatch for latest client dates can we still access the sprites of japan 3rd job other than using the new stylist? Bodystyle is not 1 or 0 anymore.

  2. This is a request from Extend whodrops command to include map drops #8017

    I'm only enhancing @whodrops command. I've included map_drops.yml in the command

     

    
    		extern MapDropDatabase map_drop_db;
    		extern InstanceDatabase instance_db;
    
    		sprintf(atcmd_output, "Map drops:");
    		clif_displaymessage(fd, atcmd_output);
    
    		std::map<std::pair<uint16, double>, std::vector<std::string>> map_drop_groups;
    		bool found_map_drops = false;
    
    		for (const auto& map_entry : map_drop_db) {
    			std::shared_ptr<s_map_drops> mapdrops = map_entry.second;
    			std::string map_name = map_mapid2mapname(map_entry.first);
    			std::string display_name = map_name;
    
    			if (map_name.find("@") != std::string::npos) {
    				for (const auto& instance_entry : instance_db) {
    					std::shared_ptr<s_instance_db> instance = instance_entry.second;
    					if (strcmp(map_mapid2mapname(instance->enter.map), map_name.c_str()) == 0) {
    						display_name = instance->name;
    						break;
    					}
    					for (const auto& additional_map : instance->maplist) {
    						if (strcmp(map_mapid2mapname(additional_map), map_name.c_str()) == 0) {
    							display_name = instance->name;
    							break;
    						}
    					}
    					if (display_name != map_name) break;
    				}
    			}
    
    			for (const auto& global_drop : mapdrops->globals) {
    				if (global_drop.second->nameid == id->nameid) {
    					double rate_percent = (global_drop.second->rate * 100.0) / 100000.0;
    					std::pair<uint16, double> key = std::make_pair(0, rate_percent);
    					map_drop_groups[key].push_back(display_name);
    					found_map_drops = true;
    				}
    			}
    
    			for (const auto& specific_entry : mapdrops->specific) {
    				uint16 mob_id = specific_entry.first;
    				for (const auto& drop : specific_entry.second) {
    					if (drop.second->nameid == id->nameid) {
    						double rate_percent = (drop.second->rate * 100.0) / 100000.0;
    						std::pair<uint16, double> key = std::make_pair(mob_id, rate_percent);
    						map_drop_groups[key].push_back(display_name);
    						found_map_drops = true;
    					}
    				}
    			}
    		}
    
    		if (!found_map_drops) {
    			sprintf(atcmd_output, " - Item is not dropped by map-specific drops.");
    			clif_displaymessage(fd, atcmd_output);
    		} else {
    			for (const auto& group : map_drop_groups) {
    				uint16 mob_id = group.first.first;
    				double rate = group.first.second;
    				const std::vector<std::string>& maps = group.second;
    
    				std::string map_list = "";
    				for (size_t i = 0; i < maps.size(); ++i) {
    					if (i > 0) map_list += ", ";
    					map_list += maps[i];
    				}
    
    				if (mob_id == 0) {
    					sprintf(atcmd_output, "- All monsters: %.2f%% - (%s)", rate, map_list.c_str());
    				} else {
    					std::shared_ptr<s_mob_db> mob = mob_db.find(mob_id);
    					if (mob) {
    						sprintf(atcmd_output, "- %s (%d): %.2f%% - (%s)", mob->jname.c_str(), mob_id, rate, map_list.c_str());
    					}
    				} 
    				clif_displaymessage(fd, atcmd_output);  
    			}  
    		}

     

    Screenshot:

    image.png.174561ee6af2732d431628ff6691f04c.pngimage.png.db0474092c349f9676a5dbe1394f520a.pngimage.png.e5f96801b691b3fc2d225e2a2bfacb9c.png

    Extend whodrops command to include map drops (#8017).diff

    • Upvote 3
    • Love 2
  3. On 6/25/2024 at 4:37 PM, scantraxx said:

    **Instances:**

    • Orcs Memory
    • Glast Heim Challenge Mode
    • Fall of the Glast Heim
    • Tomb of Remorse
    • Constellation Tower
    • Geffen Night Arena
    • Airship Crash Site
    • Endless Cellar
    • Memories of Thanatos

    **Maps Content:**

    • Thanatos Tower Revamp
    • Power Twisted Plains
    • Varmundt's Biosphere
    • Varmundt's Biosphere Depth
    • Varmundt's Biosphere Depth 2
    • Garden of Time
    • Mjolnir Underground Cave

    **Fixes:**

    • Weapon Exchange NPC for Clock Tower Unknown Basement
    • Nebula enchant NPC for upgrading enchant
    • Thanos Helmet / Thanos Helmet-LT Enchant NPC

    Constellation Tower
    Edda Somatology

    Episode 19

    Fall of Glastheim
    Old Glast Heim - Hard

    Remorse

    Thanatos Tower

    New Instances.zip

  4. 3 hours ago, rokimoki said:

    I've seen 4CrAM-EX has most of that developed and using and needing 2024-10-16. I know this is rAthena but, no one wants to help me to get that client-ver, but using Froggo client and 2024-10-16 client must be enough right?

     

    It's because 2024 clients are not supported yet. If you really want it, you're gonna have to buy it.

  5. 7 hours ago, karenelia said:

    Hello,

    A friend and I wanted to start our own private server. We hopped onto rAthena, and while we managed to make the server run, the client side itself was next to impossible to figure out. Every guide wasn't much help, and the wiki that I was directed to was full of dead links or redirected links.

    Does anyone have a way to help set up a server? rAthena was literally less than no help when it came to figuring this stuff out.

    pm me on discord louis17steinhil

  6. 14 minutes ago, Pyumel said:

    share please sir

    				// Even thought mobhp ain't a name, we send it as one so the client can parse it. [Skotlex]
    				if( str_p != mobhp ){
    					*(str_p-3) = '\0'; //Remove trailing space + pipe.
    					safestrncpy( packet.guild_name, mobhp, NAME_LENGTH );
    				}

     

  7. 22 minutes ago, Pyumel said:

    how can i detect this monster have demi-human race or fish race for example?
    because if i just change the value of the elements to race it mean i just change the display name not detect the monster race

     

    char race_name[9] = { 0 };
    
    				switch (md->status.race) {
    				case 0: strcpy(race_name, "Formless");break;
    				case 1: strcpy(race_name, "Undead");break;
    				case 2: strcpy(race_name, "Brute");break;
    				case 3: strcpy(race_name, "Plant");break;
    				case 4: strcpy(race_name, "Insect");break;
    				case 5: strcpy(race_name, "Fish");break;
    				case 6: strcpy(race_name, "Demon");break;
    				case 7: strcpy(race_name, "D-Human");break;
    				case 8: strcpy(race_name, "Angel");break;
    				case 9: strcpy(race_name, "Dragon");break;
    				default: break;
    				}
    
    str_p += sprintf( str_p, "Race: %s | ", race_name);

     

  8. On 11/27/2024 at 4:17 PM, Pyumel said:

    bump! someone please tell me, can i change this to mob race view instead of element view? i want change this to race monster view not element monster view

    yes that's easy, change the value of elements to race.

  9. Hmm I tried adding your patch to the show_mob_info. it works great although if the name of the monster is too long then few characters will be omitted. XD

    Clif.cpp

    		case BL_MOB: {
    			mob_data *md = (mob_data *)bl;
    			char ele_name[8] = { 0 };
    			//char output[16] = { 0 };
    
    			if( md->guardian_data && md->guardian_data->guild_id ){
    				PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
    
    				packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
    				packet.gid = bl->id;
    				safestrncpy( packet.name, md->name, NAME_LENGTH );
    				safestrncpy( packet.guild_name, md->guardian_data->guild_name, NAME_LENGTH );
    				safestrncpy( packet.position_name, md->guardian_data->castle->castle_name, NAME_LENGTH );
    
    				clif_send(&packet, sizeof(packet), src, target);
    			}else if( battle_config.show_mob_info ){
    				PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
    
    				packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
    				packet.gid = bl->id;
    				safestrncpy( packet.name, md->name, NAME_LENGTH );
    
    				char mobhp[50], *str_p = mobhp;
    
    				switch (md->status.def_ele) {
    				case 0: strcpy(ele_name, "Neutral");break;
    				case 1: strcpy(ele_name, "Water");break;
    				case 2: strcpy(ele_name, "Earth");break;
    				case 3: strcpy(ele_name, "Fire");break;
    				case 4: strcpy(ele_name, "Wind");break;
    				case 5: strcpy(ele_name, "Poison");break;
    				case 6: strcpy(ele_name, "Holy");break;
    				case 7: strcpy(ele_name, "Shadow");break;
    				case 8: strcpy(ele_name, "Ghost");break;
    				case 9: strcpy(ele_name, "Undead");break;
    				default: break;
    				}
    
    				if( battle_config.show_mob_info&4 ){
    					str_p += sprintf( str_p, "Lv. %d | ", md->level );
    				}
    
    				if( battle_config.show_mob_info&1 ){
    					if (strlen(ele_name))
    					str_p += sprintf( str_p, "Ele: %s %d | ", ele_name, md->status.ele_lv);
    				}
    
    				if( battle_config.show_mob_info&2 ){
    					str_p += sprintf( str_p, "HP: %u%% | ", get_percentage( md->status.hp, md->status.max_hp ) );
    				}
    
    				// Even thought mobhp ain't a name, we send it as one so the client can parse it. [Skotlex]
    				if( str_p != mobhp ){
    					*(str_p-3) = '\0'; //Remove trailing space + pipe.
    					safestrncpy( packet.party_name, mobhp, NAME_LENGTH );
    				}
    
    				clif_send(&packet, sizeof(packet), src, target);
    			}

    screenrAthena019.jpg

    screenrAthena020.jpg
    image.png.07d65ebfed16d10d5bc83c8215ab2945.png

  10. Kindly help or guide me on how to include Custom Storage/ Premium Storage to be included in delitem/storagedelitem npc script. Thanks in advance!

     

    /// Deletes items from the target/attached player.
    /// Prioritizes ordinary items.
    ///
    /// delitem <item id>,<amount>{,<account id>}
    /// delitem "<item name>",<amount>{,<account id>}
    /// cartdelitem <item id>,<amount>{,<account id>}
    /// cartdelitem "<item name>",<amount>{,<account id>}
    /// storagedelitem <item id>,<amount>{,<account id>}
    /// storagedelitem "<item name>",<amount>{,<account id>}
    /// guildstoragedelitem <item id>,<amount>{,<account id>}
    /// guildstoragedelitem "<item name>",<amount>{,<account id>}
    BUILDIN_FUNC(delitem)
    {
    	TBL_PC *sd;
    	struct item it;
    	uint8 loc = 0;
    	char* command = (char*)script_getfuncname(st);
    
    	if(!strncmp(command, "cart", 4))
    		loc = TABLE_CART;
    	else if(!strncmp(command, "storage", 7))
    		loc = TABLE_STORAGE;
    	else if(!strncmp(command, "guildstorage", 12))
    		loc = TABLE_GUILD_STORAGE;
    
    	if( !script_accid2sd(4,sd) ){
    		// In any case cancel script execution
    		st->state = END;
    		return SCRIPT_CMD_SUCCESS;
    	}
    
    	if (loc == TABLE_CART && !pc_iscarton(sd)) {
    		ShowError("buildin_cartdelitem: player doesn't have cart (CID=%d).\n", sd->status.char_id);
    		script_pushint(st, -1);
    		return SCRIPT_CMD_FAILURE;
    	}
    	if (loc == TABLE_GUILD_STORAGE) {
    		struct s_storage *gstor = guild2storage2(sd->status.guild_id);
    
    		if (gstor == nullptr || sd->state.storage_flag) {
    			script_pushint(st, -1);
    			return SCRIPT_CMD_FAILURE;
    		}
    	}
    
    	if( script_isstring(st, 2) )
    	{
    		const char* item_name = script_getstr(st, 2);
    		std::shared_ptr<item_data> id = item_db.searchname(item_name);
    
    		if( id == nullptr ){
    			ShowError("buildin_%s: unknown item \"%s\".\n", command, item_name);
    			st->state = END;
    			return SCRIPT_CMD_FAILURE;
    		}
    		it.nameid = id->nameid;// "<item name>"
    	}
    	else
    	{
    		it.nameid = script_getnum(st, 2);// <item id>
    		if( !item_db.exists( it.nameid ) )
    		{
    			ShowError("buildin_%s: unknown item \"%u\".\n", command, it.nameid);
    			st->state = END;
    			return SCRIPT_CMD_FAILURE;
    		}
    	}
    
    	it.amount=script_getnum(st,3);
    
    	if( it.amount <= 0 )
    		return SCRIPT_CMD_SUCCESS;// nothing to do
    
    	if( buildin_delitem_search(sd, &it, 0, loc) )
    	{// success
    		return SCRIPT_CMD_SUCCESS;
    	}
    
    	ShowError("buildin_%s: failed to delete %d items (AID=%d item_id=%u).\n", command, it.amount, sd->status.account_id, it.nameid);
    	st->state = END;
    	st->mes_active = 0;
    	clif_scriptclose( *sd, st->oid );
    
    	return SCRIPT_CMD_FAILURE;
    }

     

×
×
  • Create New...