Jump to content

YJ1994

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by YJ1994

  1. //===== rAthena Script =======================================
    //= saders @petstats command
    //===== By: ==================================================
    //= Sader1992
    //= Free!!
    //https://rathena.org/board/profile/30766-sader1992/
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //https://github.com/sader1992/sader_scripts
    //===== Description: =========================================
    //==== @petstats command
    //============================================================
    
    ACMD_FUNC(petstats)
    {
    	struct pet_data *pd = sd->pd;
    	nullpo_retr(-1, sd);
    	char output[CHAT_SIZE_MAX], petname[100], mobname[100], infostring1[100], infostring2[100];
    	int i;
    	struct {
    		const char* format;
    		int value;
    	} output_table[] = {
    		{ NULL, 0 },
    		{ NULL, 0 },
    		{ "Pet ID - %d", 0 },
    		{ "Pet Level - %d", 0 },
    		{ "Pet Loyalty - %d", 0 },
    		{ "Pet equip - %d", 0 },
    		{ "Pet Hungry - %d", 0 },
    		{ NULL, 0 },
    		{ NULL, 0 },
    		{ "Mob ID - %d", 0 },
    		{ "Egg ID - %d", 0 },
    		{ "Food ID - %d", 0 },
    		{ "Equip ID - %d", 0 },
    	};
    	
    	pd = sd->pd;
    	if (!pd) {
    		clif_displaymessage(fd, msg_txt(sd, 184)); // Sorry, but you have no pet.
    		return -1;
    	}
    	std::shared_ptr<s_pet_db> pet_db_ptr = pd->get_pet_db();
    	memset(infostring1, '\0', sizeof(infostring1));
    	memset(output, '\0', sizeof(output));
    	memset(petname, '\0', sizeof(petname));
    	memset(infostring2, '\0', sizeof(infostring2));
    	memset(mobname, '\0', sizeof(mobname));
    	sprintf(infostring2, "- Pet Information -");
    	output_table[0].format = infostring2;
    	sprintf(petname, "Pet Name - %s", pd->pet.name);
    	output_table[1].format = petname;
    	output_table[2].value = pd->pet.pet_id;
    	output_table[3].value = pd->pet.level;
    	output_table[4].value = pd->pet.intimate;
    	output_table[5].value = pd->pet.equip;
    	output_table[6].value = pd->pet.hungry;
    	sprintf(infostring1, "- Database Information -");
    	output_table[7].format = infostring1;
    	// sprintf(mobname, "Mob Name - %s", pet_db_ptr->);
    	output_table[8].format = mobname;
    	output_table[9].value = pet_db_ptr->class_;
    	output_table[10].value = pet_db_ptr->EggID;
    	output_table[11].value = pet_db_ptr->FoodID;
    	output_table[12].value = pet_db_ptr->AcceID;
    	for (i = 0; i<13; i++) {
    		sprintf(output, output_table[i].format, output_table[i].value);
    		clif_displaymessage(fd, output);
    	}
    	return 0;
    }

    atcommand.inc

    ACMD_DEF(petstats),

    atcommand_def.inc

    or alternatively you can use on npc scripts.

    -	script	petinfo	-1,{
    OnInit:
    	bindatcmd "petinfo",strnpcinfo(0)+"::OnPetInfo";
    	end;
    OnPetInfo:
        .@pid = getpetinfo(PETINFO_ID);
        .@pclassid = getpetinfo(PETINFO_CLASS);
        .@pname$ = getpetinfo(PETINFO_NAME);
        .@phungry = getpetinfo(PETINFO_HUNGRY);
        .@pintimacy = getpetinfo(PETINFO_INTIMATE);
        .@pfoodid = getpetinfo(PETINFO_FOODID);
    
        .@pname$ = getmonsterinfo(.@pclassid,MOB_NAME);
    
        if (.@pid == 0) {
    		dispbottom "You do not have a pet.",0xff0000;
    		dispbottom "@petinfo failed.",0xff0000;
    		end;
    	}
    
        dispbottom " ===== Pet information =====",0x00ff00;
        dispbottom "Original Name: "+.@pname$+" - Name: "+.@pname$,0x00ff00;
        dispbottom "Hungry: "+.@phungry+" - Intimacy "+.@pintimacy,0x00ff00;
        dispbottom "Pet Food: "+F_ItemL2(.@pfoodid),0x00ff00;
        end;
    }

    the result image.png.8b24a7914146f71199c22be8ac39bba6.png

    • Love 2
  2. Quote
    
    getmapxy( .@map$,.@x,.@y,0,.@name$[.@i] );

    to

    getmapxy .@map$,.@x,.@y,BL_PC,.@name$[.@i];
    *getmapxy("<variable for map name>",<variable for x>,<variable for y>{,<type>,"<search value>"})
     
    This function will locate a character object, NPC object or pet's coordinates
    and place their coordinates into the variables specified when calling it. It
    will return 0 if the search was successful, and -1 if the parameters given were
    not variables or the search was not successful.
     
    Type is the type of object to search for:
     
        BL_PC - Character object (default)
        BL_NPC - NPC object
        BL_PET - Pet object
        BL_HOM - Homunculus object
        BL_MER - Mercenary object
        BL_ELEM - Elemental object

     

  3. 26 minutes ago, Mael said:

    @Functor And for...

    
    Automatic feeding if OFF
    
    Homunculus automatic feeding is OFF

     

    same thing as functor said move

    #if PACKETVER >= 20141008
    		if( battle_config.pet_autofeed_always ){
      			// Always send ON or OFF
      			.....

    and

    #if PACKETVER >= 20170920
    		if( battle_config.homunculus_autofeed_always ){
    			// Always send ON or OFF
    			.....

    to `after`

    		// Notify everyone that this char logged in [Skotlex].
    		map_foreachpc(clif_friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1);

     

    • Upvote 2
  4. Hello rA, anyone know what happen on my font like 30% try to hide from something.

    unknown.png

    the better result should be like this

    unknown.png

     

    Client Version 20180919

    What i do

    1. Change langtype on clientinfo.xml. FAIL

    2. Use translalation from zackdreaver/asheraf. FAIL

    3. Without translation (Clean kRO). FAIL

    4. Use Recommended Patch/Minimum from Nemo. FAIL

     

    Thanks

  5. 33 minutes ago, Functor said:

    thank you functor for the answer, but the problem is on that link not the RE version and i try to pack with Nemo most of patch is fail.

    back on that site i found 2018-09-19aRagexeRE on clients info.

     image.png.d748f94739f18525527b0db0e7cbf3e8.png

    but on download page there is no 2018-09-19aRagexeRE

    image.png.7d6999b52a7157d1e1e3316e7dbc53a1.png

    i also try to change the parameters to get the file

    Quote

    python2 get_2018-09-19aRagexe.py

     to 

    Quote

    python2 get_2018-09-19aRagexeRE.py

     

    the result show 5mb file size and fail to patch with Nemo image.png.5d22c18ddba8babb85b150765faed2f1.png

    image.png.dcb450295f0a68899be03ccab225d092.png

    thank you

×
×
  • Create New...