Jump to content

milk

Members
  • Content Count

    91
  • Joined

  • Last visited

Posts posted by milk


  1. 2. Save multi-line mes commands into the pot file as a single message separated by newlines.

    msgid "When you see a broadcastnannouncing that we havenarrived at your destination,nplease use one of the exitsnlocated at the north andnsouth ends of the Airship."
    This preserves the official line-breaks while also giving full control to the translator about how to format the message. Importantly, it also keeps the script syntax clean and easy to read (without newline characters all over the place).

     

     

    I like this idea.

  2.  

    I remember reading about such an issue in old clients. It was somewhere in the bug tracker...

    Anyway, if you'll post what date your client is, I think someone might help you out faster.

    My client is : 20140115

    Can you check sex values in `login` and `char` table?


  3. Umm, why so rather radical changes as to remake mobs or remove drops >.<

    One relativly small source edit can fix all the problems and for all slave mobs. I've been thinking of pulling option such as this inside actual Herc, but

    1) I'm lazy

    2) I'm not good with git.

     

    mob.c, mob_dead:

        if( !(type&1) && !map->list[m].flag.nomobloot && !md->state.rebirth && (        !md->special_state.ai || //Non special mob        battle_config.alchemist_summon_reward == 2 || //All summoned give drops        (md->special_state.ai==2 && battle_config.alchemist_summon_reward == 1) ||        //Marine Sphere Drops items.        ) )    { // Item Drop

    change to

        if( !(type&1) && !map->list[m].flag.nomobloot && !md->state.rebirth && (        (!md->special_state.ai && !md->master_id) || //Non special mob        battle_config.alchemist_summon_reward == 2 || //All summoned give drops        (md->special_state.ai==2 && battle_config.alchemist_summon_reward == 1) ||        //Marine Sphere Drops items.        ) )    { // Item Drop

     

    Now, next:

    		if(sd) {			// process script-granted extra drop bonuses			int itemid = 0;

    to

    		if(sd && !md->master_id) {			// process script-granted extra drop bonuses			int itemid = 0;

     

    Now ultimately most (if not all) non-special monsters with items drops should not drop anything (and I mean anything. Not predefined loots, and not script(item)-granted loots) if they are slaves to some other one.

     

     

    Thank you very much. Again c:

     


  4. Btw, eAmod have this feature in battleconf:

     

    // ****************************************// Fixeds - Balance// ****************************************// Does slaves monsters can give "item granded drop"?// As YES is the official setting, this can prevent a serious exploid with users making lot of items and money with Dracula slaves.mob_slave_adddrop: no

     

    But I can't understand how it works, because I'm sooo noob in C :c


  5. Same with @autolootid

    I dont know how to correctly save state.autolootid after relog.

     

    ACMD(autolootitem){	struct item_data *item_data = NULL;	int i;	int action = 3; // 1=add, 2=remove, 3=help+list (default), 4=reset	if (message && *message) {		if (message[0] == '+') {			message++;			action = 1;		}		else if (message[0] == '-') {			message++;			action = 2;		}		else if (!strcmp(message,"reset"))			action = 4;		if (action < 3) // add or remove		{			if ((item_data = itemdb->exists(atoi(message))) == NULL)				item_data = itemdb->search_name(message);			if (!item_data) {				// No items founds in the DB with Id or Name				clif->message(fd, msg_txt(1189)); // Item not found.				return false;			}		}	}	switch(action) {		case 1:			ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == item_data->nameid);			if (i != AUTOLOOTITEM_SIZE) {				clif->message(fd, msg_txt(1190)); // You're already autolooting this item.				return false;			}			ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == 0);			if (i == AUTOLOOTITEM_SIZE) {				clif->message(fd, msg_txt(1191)); // Your autolootitem list is full. Remove some items first with @autolootid -<item name or ID>.				return false;			}			sd->state.autolootid[i] = item_data->nameid; // Autoloot Activated			sprintf(atcmd_output, msg_txt(1192), item_data->name, item_data->jname, item_data->nameid); // Autolooting item: '%s'/'%s' {%d}			pc_setglobalreg(sd, script->add_str("AT_ALOOTID"), item_data->nameid); 			clif->message(fd, atcmd_output);			sd->state.autolooting = 1;			break;		case 2:			ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == item_data->nameid);			if (i == AUTOLOOTITEM_SIZE) {				clif->message(fd, msg_txt(1193)); // You're currently not autolooting this item.				return false;			}			sd->state.autolootid[i] = 0;			sprintf(atcmd_output, msg_txt(1194), item_data->name, item_data->jname, item_data->nameid); // Removed item: '%s'/'%s' {%d} from your autolootitem list.			clif->message(fd, atcmd_output);			ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] != 0);			if (i == AUTOLOOTITEM_SIZE) {				sd->state.autolooting = 0;			}			break;		case 3:			sprintf(atcmd_output, msg_txt(1195), AUTOLOOTITEM_SIZE); // You can have %d items on your autolootitem list.			clif->message(fd, atcmd_output);			clif->message(fd, msg_txt(1196)); // To add an item to the list, use "@alootid +<item name or ID>". To remove an item, use "@alootid -<item name or ID>".			clif->message(fd, msg_txt(1197)); // "@alootid reset" will clear your autolootitem list.			ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] != 0);			if (i == AUTOLOOTITEM_SIZE) {				clif->message(fd, msg_txt(1198)); // Your autolootitem list is empty.			} else {				clif->message(fd, msg_txt(1199)); // Items on your autolootitem list:				for(i = 0; i < AUTOLOOTITEM_SIZE; i++)				{					if (sd->state.autolootid[i] == 0)						continue;					if (!(item_data = itemdb->exists(sd->state.autolootid[i]))) {						ShowDebug("Non-existant item %d on autolootitem list (account_id: %d, char_id: %d)", sd->state.autolootid[i], sd->status.account_id, sd->status.char_id);						continue;					}					sprintf(atcmd_output, "'%s'/'%s' {%d}", item_data->name, item_data->jname, item_data->nameid);					clif->message(fd, atcmd_output);				}			}			break;		case 4:			memset(sd->state.autolootid, 0, sizeof(sd->state.autolootid));			clif->message(fd, msg_txt(1200)); // Your autolootitem list has been reset.			sd->state.autolooting = 0;			pc_setglobalreg(sd, script->add_str("AT_ALOOTID"), 0);			break;	}	return true;}

     

    I've tryed to use it in pc_reg_received like this:

     

     

    int pc_reg_received(struct map_session_data *sd){	int i,j, idx = 0;	int i;	sd->vars_ok = true;	sd->state.autolootid = pc_readglobalreg(sd,script->add_str("AT_ALOOTID"));

     

    But GCC show me an error:

     

    pc.c: In function ‘pc_reg_received’:pc.c:1415: error: incompatible types when assigning to type ‘short unsigned int[10]’ from type ‘int’

  6.  

    void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) {...	// Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)	WBUFB(buf,26)=(battle_config.hom_rename && hd->homunculus.rename_flag ? 0x1 : 0x0) | (hd->homunculus.vaporize == HOM_ST_REST ? 0x2 : 0) | (hd->homunculus.hp > 0 ? 0x4 : 0);	WBUFW(buf,27)=hd->homunculus.level;... }

    The one on 26th offset;

    When battle_config.hom_rename is false, first expression is always false, so it always thinks that homun is NOT YET RENAMED.

    I'd replaced it with

    (battle_config.hom_rename?0:hd->homunculus.rename_flag)

    And now it works fine.

    It works like a charm.

    Thanks for help!


  7. Hello, Hercules community!

    I want to ask you, how it possible to save @atcommand state after re-login?

    For exmple: player do @aloottype +card and adding to aloottype list card-based item.

    Is it possible to save this list?

     

    I've tried to do it like this:

    ACMD(autoloottype) {	int i;	uint8 action = 3; // 1=add, 2=remove, 3=help+list (default), 4=reset	enum item_types type = -1;	int ITEM_NONE = 0;	if (message && *message) {		if (message[0] == '+') {			message++;			action = 1;		} else if (message[0] == '-') {			message++;			action = 2;		} else if (strcmp(message,"reset") == 0) {			action = 4;		}		if (action < 3) {			// add or remove			if (strncmp(message, "healing", 3) == 0)				type = IT_HEALING;			else if (strncmp(message, "usable", 3) == 0)				type = IT_USABLE;			else if (strncmp(message, "etc", 3) == 0)				type = IT_ETC;			else if (strncmp(message, "weapon", 3) == 0)				type = IT_WEAPON;			else if (strncmp(message, "armor", 3) == 0)				type = IT_ARMOR;			else if (strncmp(message, "card", 3) == 0)				type = IT_CARD;			else if (strncmp(message, "petegg", 4) == 0)				type = IT_PETEGG;			else if (strncmp(message, "petarmor", 4) == 0)				type = IT_PETARMOR;			else if (strncmp(message, "ammo", 3) == 0)				type = IT_AMMO;			else {				clif->message(fd, msg_txt(1491)); // Item type not found.				return false;			}		}	}	switch (action) {		case 1:			if (sd->state.autoloottype&(1<<type)) {				clif->message(fd, msg_txt(1490)); // You're already autolooting this item type.				return false;			}			sd->state.autoloottype |= (1<<type); // Stores the type			sprintf(atcmd_output, msg_txt(1492), itemdb->typename(type)); // Autolooting item type: '%s'			clif->message(fd, atcmd_output);			break;		case 2:			if (!(sd->state.autoloottype&(1<<type))) {				clif->message(fd, msg_txt(1493)); // You're currently not autolooting this item type.				return false;			}			sd->state.autoloottype &= ~(1<<type);			sprintf(atcmd_output, msg_txt(1494), itemdb->typename(type)); // Removed item type: '%s' from your autoloottype list.			clif->message(fd, atcmd_output);			break;		case 3:			clif->message(fd, msg_txt(38)); // Invalid location number, or name.			{				// attempt to find the text help string				const char *text = atcommand_help_string(info);				if (text) clif->messageln(fd, text); // send the text to the client			}			if (sd->state.autoloottype == ITEM_NONE) {				clif->message(fd, msg_txt(1495)); // Your autoloottype list is empty.			} else {				clif->message(fd, msg_txt(1496)); // Item types on your autoloottype list:				for(i=0; i < IT_MAX; i++) {					if (sd->state.autoloottype&(1<<i)) {						sprintf(atcmd_output, " '%s'", itemdb->typename(i));						clif->message(fd, atcmd_output);					}				}			}			break;		case 4:			sd->state.autoloottype = ITEM_NONE;			pc_setglobalreg(sd, script->add_str("AT_ALOOTTYPE"), type);			clif->message(fd, msg_txt(1497)); // Your autoloottype list has been reset.			break;	}	return true;}
    in case 4:

    pc_setglobalreg(sd, script->add_str("AT_ALOOTTYPE"), type);

     

    But my `char_reg_num_db` has no AT_ALOOTTYPE value for char.

     

    Can you show me another way to do it?

    Thank you!


  8. Hello, Hercules community!

    I have a little trouble with renaming homunculus.

     

    Why client says that it is possible to rename already renamed homunculus? :o

     

     

     

    PzXs.png

     

    qbMR.png

     

    2UOb.png

     

    dAZo.png

     

    g0fK.png

     

     

     

     

    In my conf/battle/homunc.conf

    // Can you name a homunculus more then once? (Note 1)hom_rename: no

     

     

    I am using 2014-02-15bRagexe.

    As I remember - in older clients there was no problems with it. Fix me if I'm wrong c:

    Is it client issue? Is there possible to fix it?

     

    Thanks!

     


  9.  

    Hello.

    1. You can enable at-commands in commands section conf/groups.conf . http://herc.ws/wiki/Category:Configuration#.2Fconf.2Fatcommand.conf_and_.2Fconf.2Fgroups.conf

    For example:

    name: "Player"level: 0inherit: ( /*empty list*/ )commands: {go: truewarp: trueblvl: trueitem: true}permissions: {/* without this basic permissions regular players could nottrade or party */can_trade: truecan_party: true}

    2. You can comment line  #define RENEWAL in src/config/renewal.h (http://herc.ws/wiki/SRC/config/#.2Fsrc.2Fconfig.2Frenewal.h)

    Or you can use option --disable-renewal with configure script http://herc.ws/wiki/Configure

     

    Thanks milk. I will try this.

    3. When I use command @job to change to a Transcendent job. I dont have 100 stats point bonus?

    How to reset stats point, skill point when user use @job .

    Yes, if you change your job using @job command - you will not get bonus stats points.


  10. Hello.

    1. You can enable at-commands in commands section conf/groups.conf . http://herc.ws/wiki/Category:Configuration#.2Fconf.2Fatcommand.conf_and_.2Fconf.2Fgroups.conf

    For example:

    name: "Player"level: 0inherit: ( /*empty list*/ )commands: {go: truewarp: trueblvl: trueitem: true}permissions: {/* without this basic permissions regular players could nottrade or party */can_trade: truecan_party: true}

    2. You can comment line  #define RENEWAL in src/config/renewal.h (http://herc.ws/wiki/SRC/config/#.2Fsrc.2Fconfig.2Frenewal.h)

    Or you can use option --disable-renewal with configure script http://herc.ws/wiki/Configure

×
×
  • Create New...

Important Information

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