-
Content Count
59 -
Joined
-
Last visited
Posts posted by Dduwsmitt
-
-
i opened this issue on github. you can follow the topic on https://github.com/HerculesWS/Hercules/issues/2922
-
1 hour ago, Dduwsmitt said:additional info.
After successfully removing the card, the script command 'successremovecards' fails to re-equip the item.
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.
-
additional info.
After successfully removing the card, the script command 'successremovecards' fails to re-equip the item.
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; }
-
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()); "> },
-
on the latest stable release this problem is fixed.
Release v2020.12.14:
https://github.com/HerculesWS/Hercules/commit/2f410d1da3f0afa72e7a66099eb0f38469c20427#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR59 -
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)
-
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.
-
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 -
you need to find the skill on skill_db.conf and change ShowSkillScale set to false.
SkillInfo: { ShowSkillScale: false }
-
10 hours ago, Daraen said:personally my client reads the monster_size_effect_sak_new.lub, but ok thanks for making that clear for everyone!
Alternatively/Surefire method is to diff your client into reading your custom monster_size_effect file
evilpuncker reacted to this -
afaik you can put green aura on any monsters by editing monster_size_effect_sak.lub
and for the skull i think its for naturally spawned bosses. LHZ bosses spawn are scripted and not a "natural" spawn. -
-
-
will this show the additional items on @monsterinfo?
-
yes you can enchant an item using slot enchantment 4 times. and in your case that will be 3 times since the item you want to enchant is 1 slot.
-
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
-
from item_bonus.txt on hercules docs
this should answer your problem
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%
-
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 -
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 -
try putting refreshall on your script
-
Current status: UNAVAILABLEWho 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, DatabaseCustom 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: dduwsmittor pm me here on hercules -
-
announce "<text>",<flag>{,<fontColor>{,<fontType>{,<fontSize>{,<fontAlign>{,<fontY>}}}}} can someone give me an example how to use fontY?
-
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);
Sharpshooting Bug
in Source Requests
Posted · Edited by Dduwsmitt
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.