Jump to content

Dduwsmitt

Members
  • Content Count

    59
  • Joined

  • Last visited

Posts posted by Dduwsmitt


  1. On 12/19/2020 at 5:29 PM, Kuroyama said:

    So my snipers weapon has been damaged by WS buff (and stripped by stalker), his weapon has been unequipped but he can still use sharpshooting skill

    How to make sharpshooting skill failed when the player has no equipped weapon?

    i tested with latest stable revision on both pre-re and renewal
    Client ver. 2019-05-30aRagexeRE

    and i cannot reproduce the bug. do you have any src modifications and what client version did you use?

     

    BTW this is the skill code on latest rev. IDK why yours is different from the video.

    {
    	Id: 382
    	Name: "SN_SHARPSHOOTING"
    	Description: "Focused Arrow Strike"
    	MaxLevel: 5
    	Range: 9
    	Hit: "BDT_MULTIHIT"
    	SkillType: {
    		Enemy: true
    	}
    	AttackType: "Weapon"
    	Element: "Ele_Weapon"
    	SplashRange: 1
    	InterruptCast: true
    	SkillInstances: 13
    	CastTime: 2000
    	AfterCastActDelay: 1500
    	CoolDown: 0
    	Requirements: {
    		SPCost: {
    			Lv1: 18
    			Lv2: 21
    			Lv3: 24
    			Lv4: 27
    			Lv5: 30
    			Lv6: 33
    			Lv7: 36
    			Lv8: 39
    			Lv9: 42
    			Lv10: 45
    		}
    		WeaponTypes: {
    			Bows: true
    		}
    		AmmoTypes: {
    			A_ARROW: true
    		}
    		AmmoAmount: 1
    	}
    },

     


  2. 1 hour ago, Dduwsmitt said:

    additional info.

    After successfully removing the card, the script command 'successremovecards' fails to re-equip the item.

     image.png.022b4206447699fe8a2a738c4d8443d6.png

     

    it seems pc->equipitem(sd, i, sd->status.inventory.equip); is not working properly.

    pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); does not recalculate stats so we rely on the 
    pc->equipitem(sd, i, sd->status.inventory.equip); to recalculate the stats thus not triggering the OnUnequipScript.

     

    i dont know how to fix it tho. :(

    /// Removes all cards from the item found in the specified equipment slot of the invoking character, /// and give them to the character. If any cards were removed in this manner, it will also show a success effect. /// successremovecards(<slot>); static BUILDIN(successremovecards) { int i = -1, c, cardflag = 0; struct map_session_data *sd = script->rid2sd(st); int num = script_getnum(st, 2); if (sd == NULL) return true; if (num > 0 && num <= ARRAYLENGTH(script->equip)) i = pc->checkequip(sd,script->equip[num - 1]); if (i < 0 || sd->inventory_data == NULL) return true; if (itemdb_isspecial(sd->status.inventory.card[0])) return true; for (c = sd->inventory_data->slot - 1; c >= 0; --c) { if (sd->status.inventory.card[c] > 0 && itemdb_type(sd->status.inventory.card[c]) == IT_CARD) { int flag; struct item item_tmp; memset(&item_tmp, 0, sizeof(item_tmp)); cardflag = 1; item_tmp.nameid = sd->status.inventory.card[c]; item_tmp.identify = 1; sd->status.inventory.card[c] = 0; if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0, false); } } } if (cardflag == 1) { pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); clif->additem(sd, i, 1, 0); pc->equipitem(sd, i, sd->status.inventory.equip); //THIS LINE HERE FAILS TO WORK clif->misceffect(&sd->bl,3); } return true; }

    
    /// Removes all cards from the item found in the specified equipment slot of the invoking character,
    /// and give them to the character. If any cards were removed in this manner, it will also show a success effect.
    /// successremovecards(<slot>);
    static BUILDIN(successremovecards)
    {
    	int i = -1, c, cardflag = 0;
    
    	struct map_session_data *sd = script->rid2sd(st);
    	int num = script_getnum(st, 2);
    
    	if (sd == NULL)
    		return true;
    
    	if (num > 0 && num <= ARRAYLENGTH(script->equip))
    		i = pc->checkequip(sd,script->equip[num - 1]);
    
    	if (i < 0 || sd->inventory_data[i] == NULL)
    		return true;
    
    	if (itemdb_isspecial(sd->status.inventory[i].card[0]))
    		return true;
    
    	for (c = sd->inventory_data[i]->slot - 1; c >= 0; --c) {
    		if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) {
    			int flag;
    			struct item item_tmp;
    
    			memset(&item_tmp, 0, sizeof(item_tmp));
    
    			cardflag = 1;
    			item_tmp.nameid = sd->status.inventory[i].card[c];
    			item_tmp.identify = 1;
    			sd->status.inventory[i].card[c] = 0;
    
    			if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) {
    				clif->additem(sd, 0, 0, flag);
    				map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0, false);
    			}
    		}
    	}
    
    	if (cardflag == 1) {
    		pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE);
    		clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE);
    		clif->additem(sd, i, 1, 0);
    		pc->equipitem(sd, i, sd->status.inventory[i].equip); //THIS LINE HERE FAILS TO WORK
    		clif->misceffect(&sd->bl,3);
    	}
    	return true;
    }

     

    Update: 

     

    i changed pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); to pc->unequipitem(sd, i, PCUNEQUIPITEM_RECALC);

     

    still not triggering the OnUnequipScript.


  3. additional info.

    After successfully removing the card, the script command 'successremovecards' fails to re-equip the item.

     image.png.022b4206447699fe8a2a738c4d8443d6.png

     

    it seems pc->equipitem(sd, i, sd->status.inventory.equip); is not working properly.

    pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); does not recalculate stats so we rely on the 
    pc->equipitem(sd, i, sd->status.inventory.equip); to recalculate the stats thus not triggering the OnUnequipScript.

     

    i dont know how to fix it tho. :(

    /// Removes all cards from the item found in the specified equipment slot of the invoking character,
    /// and give them to the character. If any cards were removed in this manner, it will also show a success effect.
    /// successremovecards(<slot>);
    static BUILDIN(successremovecards)
    {
    	int i = -1, c, cardflag = 0;
    
    	struct map_session_data *sd = script->rid2sd(st);
    	int num = script_getnum(st, 2);
    
    	if (sd == NULL)
    		return true;
    
    	if (num > 0 && num <= ARRAYLENGTH(script->equip))
    		i = pc->checkequip(sd,script->equip[num - 1]);
    
    	if (i < 0 || sd->inventory_data[i] == NULL)
    		return true;
    
    	if (itemdb_isspecial(sd->status.inventory[i].card[0]))
    		return true;
    
    	for (c = sd->inventory_data[i]->slot - 1; c >= 0; --c) {
    		if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) {
    			int flag;
    			struct item item_tmp;
    
    			memset(&item_tmp, 0, sizeof(item_tmp));
    
    			cardflag = 1;
    			item_tmp.nameid = sd->status.inventory[i].card[c];
    			item_tmp.identify = 1;
    			sd->status.inventory[i].card[c] = 0;
    
    			if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) {
    				clif->additem(sd, 0, 0, flag);
    				map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0, false);
    			}
    		}
    	}
    
    	if (cardflag == 1) {
    		pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE);
    		clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE);
    		clif->additem(sd, i, 1, 0);
    		pc->equipitem(sd, i, sd->status.inventory[i].equip); //THIS LINE HERE FAILS TO WORK
    		clif->misceffect(&sd->bl,3);
    	}
    	return true;
    }

     


  4. afaik potion effects are hardcoded in the client so when we make custom potions we add this line:

     

    specialeffect(EF_POTION4, AREA, playerattached());

    ex.

    {
    	Id: 37000
    	AegisName: "White_Potion_ZXC"
    	Name: "White Potion ZXC"
    	Type: "IT_HEALING"
    	Buy: 1200
    	Weight: 150
    	Script: <"
    	itemheal rand(325,405),0;
    	specialeffect(EF_POTION4, AREA, playerattached());
    	">
    },

     


  5. Currently not working on Release v2020.12.14 due to refactored codes:
     

    - `unit->blown()` (renamed to `unit->push()`)

    - `path->blownpos()` (related to the `unit->blown()` change)


  6. On 12/4/2020 at 8:47 AM, buchachi11 said:

    Hello can you tell me which folder this is? like the pathway so i can edit it. Because i am having the same effect. Im just testing out the server I made using Hercules tutorial :) i love it. Its just me though. Don't have plans yet in making it online.

    its on hercules/src/map Folder.


  7. Hello just want to report in my recent discovery that Bard/Dancer buffs doesnt work on party members OUTSIDE cell_pvp area even with CELL_PVP_SKILL_ALLOW.

    Using pre-renewal with OLD Song effect diff
    All Party members are outside cell_pvp area


  8. Hello i just discovered that when a map has a CELL_PVP area,

     

    - you cannot use PARTY BUFFS outside CELL_PVP area even with CELL_PVP_SKILL_ALLOW if you are in a PARTY / Solo Party

    is there any way to resolve this?


  9. Find this line at battle.c

     

    				if( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO
    				  && !(d_bl && !(wd->flag&BF_SKILL)) // It should not be a basic attack if the target is under devotion
    				  && !(d_bl && sce_d && !check_distance_bl(target, d_bl, sce_d->val3)) // It should not be out of range if the target is under devotion
    				) {

     

    Add the skills you dont want to reflect on if( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO

     

    example i want bash not to be reflected by reflect shield i will add this line: && skill_id != SM_BASH

    so it will be

    if( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO && skill_id != SM_BASH

     


  10. from item_bonus.txt on hercules docs

    this should answer your problem :blush:

    bonus2 bMagicAtkEle,e,n; //Increases damage of element e magic by n%
    
    bonus2 bMagicAtkEle,Ele_Water,500; //Increases damage of element Water magic by 500%
    bonus2 bMagicAtkEle,Ele_Fire,500; //Increases damage of element Fire magic by 500%

     


  11. Hello. since the lure/bait is an accessory you can make it a "durational item" using rentitem(<item id>, <time>) or rentitem("<item name>", <time>) script commands.

    note: <time> is in seconds
     

    example:
    rentitem 2775,3600; // makes you rent the fishing lure for 1 hour


  12. turbo_room,63,98,4	script	test	4_M_BIBI,{
    
    switch(select("Case 0","Case 1")) {
    
    case 0:
        
            if(countitem2(25226,1,8,0,0,0,0,0) < 1){ 
    		mes " Sorry, but you haven't brought the requirements"; 
    		close;
    		}
    
            mes "Bwahahahah";
            mes "Thank you for your help!!";
            delitem2 25226,1,1,8,0,0,0,0,0;
            getitem 30205,1;            
    
            close;
            break;
            
    case 1:
        
            if(countitem2(25226,1,8,0,0,0,0,0) < 1){ 
    		mes " Sorry, but you haven't brought the requirements"; 
    		close;
    }
    
            mes "Bwahahahah";
            mes "Thank you for your help!!";
            delitem2 25225,1,1,8,0,0,0,0,0;
            getitem 30208,1;            
    
            close;
            break;
            
    }
        }

    what seems to be the problem? the only thing that i found wrong is the case format and spacing.

    try this code


  13. Current status: UNAVAILABLE
     
    Who da fuq is dis sht:
     

    Hello i am Dduwsmitt, i have been a core developer sometimes a scripter on rathena since 2012. i have migrated here on hercules on 2014.

     

    What can I do for you?:
     
    Name it and i will forge it. EXCEPT "Web Development" (well i know some of it but its only to the point where i can help you fix or find some errors).
    i can create original contents that you want me to develop just give me an idea of what you want to do.

    Well to give you some general idea of what i can do:
     
    Server Modifications - SRC, Configs, NPC, Database
    Custom Contents -  SRC, Configs, NPC, Database, Custom items, etc.
    Client Modifications - Hexing, Translation, Other mods, etc.
     
    I DONT DO PLUGINS BECAUSE IT WILL BE EASIER FOR MY CLIENTS TO REDISTRIBUTE MY WORK.
     
    Contact me:
     
    skype: dduwsmitt
     
    or pm me here on hercules

  14. hello did you make it work on latest revision of hercules? i am having errors 

    this line

        sv->readdb(db_path, "item_vending.txt", ',', 1, 1, ARRAYLENGTH(item_vend), &itemdb_read_vending); // Extended Vending system [Lilith]

    and this

                     item = itemdb_exists(battle_config.item_zeny?battle_config.item_zeny:battle_config.item_cash?battle_config.item_cash:item_vend[0].itemid);
     

×
×
  • Create New...

Important Information

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