Jump to content

Emistry

Forum Moderator
  • Posts

    10015
  • Joined

  • Days Won

    396

Posts posted by Emistry

  1. @offtopic 

    On 2/29/2020 at 6:45 PM, Emistry said:

    as far as I know, by default shop doesn't support refined items.

    the only one who I have seen manage to make this mod in the past was @Epoque back in eathena, and the link is no longer available .

    or perhaps you could try ask him to update it if he ever have time or interested to do it.

    it was something that look like this https://i.imgur.com/L38UPvm.png , he probably make use of the vending system to make it possible.

    (dont ask me for source code, i dont have it)

     

    btw would the barter script command above with together with the existing yaml version?

    wouldn't it be better to make a PR have it merge into rathena too? that could help expand the way we create npc in a much interested way too

  2. you can add something like this for your command

    if (map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_PVP) && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
    	clif_displaymessage(fd, "Not allowed in PVP Area");
    	return -1;
    }

     

  3. not sure if this is correct, but you could try update it to not to execute the clif_additem(...) if the player obtain items from npc script.

    find this 

    enum e_additem_result pc_additem(map_session_data *sd, struct item *item, int amount, e_log_pick_type log_type)

    then adjust the code inside.

    if (log_type != LOG_TYPE_SCRIPT)
    	clif_additem(....);

     

    if you are update database record, you need to kick the player out from server before you update it, otherwise the data will be overridden when player relog.

  4. that table is just  a sample of the result

    actual rate are calculated based on the equation

    // Use logarithmic drops? (Note 1)
    // Logarithmic drops scale drop rates in a non-linear fashion using the equation 
    // Droprate(x,y) = x * (5 - log(x)) ^ (ln(y) / ln(5))
    // Where x is the original drop rate and y is the drop_rate modifier (the previously mentioned item_rate* variables)
    // Use the following table for an idea of how the rate will affect drop rates when logarithmic drops are used:
    // Y: Original Drop Rate
    // X: Rate drop modifier (eg: item_rate_equip)

     

  5. try

    if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    	mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000";
    		

    change to

    if (.@q[6]) {
    	.@total_type = countbound();
    	for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) {
    		mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000";
    		for(.@b = 0; .@b < .@total_type; .@b++) {
    			if (@bound_items[.@b] == .@q[.@i]) {
    				mes " ~ bounded items aren't allowed.";
    				@qe[0] = 1;
    			}
    		}
    	}
    }

     

  6. perhaps you shall check your item_db info

    ###########################################################################
    # Item Database
    ###########################################################################
    # - Id                      Item ID.
    #   Buy                     Buying price. When not specified, becomes double the sell price. (Default: 0)
    #   Sell                    Selling price. When not specified, becomes half the buy price. (Default: 0)

     

  7. you can make use of bonus_script to grant custom sc bonuses without need to touch the source code.

    
    *bonus_script "<script code>",<duration>{,<flag>{,<type>{,<status_icon>{,<char_id>}}}};
    
    This command will attach a script to a player for a given duration, in seconds.
    After that time, the script will automatically expire. The same bonus cannot be
    stacked. By default, this bonus will be stored on `bonus_script` table when player
    logs out.
    
    Flags (bitmask):
    	1   : Remove when dead.
    	2   : Removable by Dispell.
    	4   : Removable by Clearance.
    	8   : Remove when player logs out.
    	16  : Removeable by Banishing Buster.
    	32  : Removable by Refresh.
    	64  : Removable by Lux Anima.
    	128 : Remove when Madogear is activated or deactivated.
    	256 : Remove when receive damage.
    	512 : Script is permanent, cannot be cleared by bonus_script_clear.
    	1024: Force to replace duplicated script by expanding the duration.
    	2048: Force to add duplicated script. This flag cannot be stacked with 1024,
    	      if both are defined, 1024 will be checked first and ignore this flag.
    
    Types:
    	This will be used to decide negative or positive buff for 'debuff_on_logout'.
    	0: Ignore the buff type and won't be removed if the flag is not &8 (Default)
    	1: Buff
    	2: Debuff
    
    Status_icon: See "Status Icon" section in 'src/map/script_constants.hpp'. Default is SI_BLANK (-1).
    bonus_script "{ bonus bStr,5; }",60;

     

  8. maybe use these setting instead?

    // Is getting exp/item from the homunculus disabled when their master's idle?
    // Set to no, or the amount of seconds (NOT milliseconds) that need to pass before considering
    // a character idle.
    // Characters in a chat/vending are always considered idle.
    // A character's idle status is reset upon item use/skill use/attack (auto attack counts too)/movement.
    // Their master will only receive items if 'homunculus_autoloot' is activated,
    // otherwise they will be dropped on the ground as usual.
    // NOTE: This option uses a special timer to track idle time, separated from the normal idle timer.
    hom_idle_no_share: no
    
    // How the server should measure the homunculus master's idle time? (for homunculus exp share and autoloot ONLY) (Note 3)
    // (This will only work if 'hom_idle_no_share' is enabled).
    // 0x001 - Walk Request
    // 0x002 - UseSkillToID Request (Targetted skill use attempt)
    // 0x004 - UseSkillToPos Request (AoE skill use attempt)
    // 0x008 - UseItem Request (Including equip/unequip)
    // 0x010 - Attack Request
    // 0x020 - Chat Request (Whisper, Party, Guild, Battlegrounds, etc)
    // 0x040 - Sit/Standup Request
    // 0x080 - Emotion Request
    // 0x100 - DropItem Request
    // 0x200 - @/#Command Request
    // Please note that at least 1 option has to be enabled.
    // Be mindful that the more options used, the easier it becomes to cheat this features.
    // Default: walk (0x1) + useskilltoid (0x2) + useskilltopos (0x4) + useitem (0x8) + attack (0x10) = 0x1F
    // NOTE: This allows you to configure different settings for homunculus, separated from normal idle timer and 'idletime_option'.
    // It will only apply to homunculus-only kills and it will not affect normal autoloot and party share options.
    idletime_hom_option: 0x1F

     

×
×
  • Create New...