Dastgir
Script Developers-
Content Count
3805 -
Joined
-
Last visited
-
Days Won
250
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Dastgir
-
Busy Days!!! Sorry for all the delays.
-
those were fixed along time ago I guess. You might be using old version
-
some plugin might be causing it. which all plugins you have?
-
Same. My version increases the overall dmg, dastgir's version increases atk (as requested). You misunderstood My Version increase Percentage of Atk (i.e Overall Damage dealt to enemy)
-
In my version: fixed percent of damage is increased once vit condition is satisfied
-
What?
- 47 replies
-
https://github.com/dastgir/HPM-Plugins/blob/master/src/plugins/bAtkEnemyVit.c +1 to Normynator too, since he motivated me to do this..
-
Get Updated MsgStringTable
-
that's KoE Plugin problem, use MOBID_EMPELIUM instead of MOBID_EMPERIUM and plugin/HPMHooking.h is also not included.
-
i need little help of scripting a freebies npc
Dastgir replied to AmonaRoro1's question in General Server Support
new_1-1,51,67,3 script ShadowRO Gifter 10039,{ mes "[ShadowRO Gift]"; mes "Hi, Welcome to Shadow Ragnarok Online !"; if (#gotgift) { mes "You have already claimed your gift."; close; } mes "Do you want your gift ?"; next; switch(select("Sure !", "Hmmm..")) { case 1: mes "[ShadowRO Gift]"; mes "Have Fun,"; mes "Remember, the job master will meet you in the middle of prontera."; next; mes "[ShadowRO Gift]"; mes "See You !"; next; savepoint "prontera",116,73; getitem 755, 1; #gotgift = 1; warp "prontera",116,73; end; case 2: mes "[ShadowRO Gift]"; mes "... !?"; close; } } -
[Custom Instance] Dracula's Last Millennium
Dastgir replied to Aeromesi's topic in Event & Game Releases
Not available for rAthena? this is good idea! You expect rA release on hercules forum! Good Idea! Better PM the topic starter to ask if he plans to release for rA, rather than criticizing here. -
atleast a little edit might be required, just to get itemID into script from getrandgroupitem. In that case: Script.c: /* getrandgroupitem <container_item_id>,<quantity> */ BUILDIN(getrandgroupitem) { struct item_data *data = NULL; struct map_session_data *sd = NULL; int nameid = script_getnum(st, 2); int count = script_getnum(st, 3); if( !(data = itemdb->exists(nameid)) ) { ShowWarning("buildin_getrandgroupitem: unknown item id %d\n",nameid); script_pushint(st, 1); } else if ( count <= 0 ) { ShowError("buildin_getrandgroupitem: qty is <= 0!\n"); script_pushint(st, 1); } else if ( !data->group ) { ShowWarning("buildin_getrandgroupitem: item '%s' (%d) isn't a group!\n",data->name,nameid); script_pushint(st, 1); } else if( !( sd = script->rid2sd(st) ) ) { ShowWarning("buildin_getrandgroupitem: no player attached!! (item %s (%d))\n",data->name,nameid); script_pushint(st, 1); } else { int i, get_count, flag; struct item it; memset(&it,0,sizeof(it)); nameid = itemdb->group_item(data->group); it.nameid = nameid; it.identify = itemdb->isidentified(nameid); if (!itemdb->isstackable(nameid)) get_count = 1; else get_count = count; for (i = 0; i < count; i += get_count) { // if not pet egg if (!pet->create_egg(sd, nameid)) { if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); if( pc->candrop(sd,&it) ) map->addflooritem(&sd->bl, &it, get_count, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); } } } script_pushint(st, 0); } return true; } To /* getrandgroupitem <container_item_id>,<quantity> */ BUILDIN(getrandgroupitem) { struct item_data *data = NULL; struct map_session_data *sd = NULL; int nameid = script_getnum(st, 2); int count = script_getnum(st, 3); if( !(data = itemdb->exists(nameid)) ) { ShowWarning("buildin_getrandgroupitem: unknown item id %d\n",nameid); script_pushint(st, 1); } else if ( count <= 0 ) { ShowError("buildin_getrandgroupitem: qty is <= 0!\n"); script_pushint(st, 1); } else if ( !data->group ) { ShowWarning("buildin_getrandgroupitem: item '%s' (%d) isn't a group!\n",data->name,nameid); script_pushint(st, 1); } else if( !( sd = script->rid2sd(st) ) ) { ShowWarning("buildin_getrandgroupitem: no player attached!! (item %s (%d))\n",data->name,nameid); script_pushint(st, 1); } else { int i, get_count, flag; struct item it; memset(&it,0,sizeof(it)); nameid = itemdb->group_item(data->group); it.nameid = nameid; it.identify = itemdb->isidentified(nameid); if (!itemdb->isstackable(nameid)) get_count = 1; else get_count = count; for (i = 0; i < count; i += get_count) { // if not pet egg if (!pet->create_egg(sd, nameid)) { if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); if( pc->candrop(sd,&it) ) map->addflooritem(&sd->bl, &it, get_count, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); } } } script_pushint(st, nameid); } return true; } * just script_pushint(st, 0) is changed above * Then you can do from script side as follows in item_db script section: .@item = getrandgroupitem(12246, 1); if (.@item > 1) { announce strcharinfo(PC_NAME) +" Got "+ getitemname(.@item) +" From MVA", bc_all; }
-
script.c: /* getrandgroupitem <container_item_id>,<quantity> */ BUILDIN(getrandgroupitem) { struct item_data *data = NULL; struct map_session_data *sd = NULL; int nameid = script_getnum(st, 2); int count = script_getnum(st, 3); if( !(data = itemdb->exists(nameid)) ) { ShowWarning("buildin_getrandgroupitem: unknown item id %d\n",nameid); script_pushint(st, 1); } else if ( count <= 0 ) { ShowError("buildin_getrandgroupitem: qty is <= 0!\n"); script_pushint(st, 1); } else if ( !data->group ) { ShowWarning("buildin_getrandgroupitem: item '%s' (%d) isn't a group!\n",data->name,nameid); script_pushint(st, 1); } else if( !( sd = script->rid2sd(st) ) ) { ShowWarning("buildin_getrandgroupitem: no player attached!! (item %s (%d))\n",data->name,nameid); script_pushint(st, 1); } else { int i, get_count, flag; struct item it; memset(&it,0,sizeof(it)); nameid = itemdb->group_item(data->group); it.nameid = nameid; it.identify = itemdb->isidentified(nameid); if (!itemdb->isstackable(nameid)) get_count = 1; else get_count = count; for (i = 0; i < count; i += get_count) { // if not pet egg if (!pet->create_egg(sd, nameid)) { if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); if( pc->candrop(sd,&it) ) map->addflooritem(&sd->bl, &it, get_count, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); } } } script_pushint(st, 0); } return true; } TO /* getrandgroupitem <container_item_id>,<quantity> */ BUILDIN(getrandgroupitem) { struct item_data *data = NULL; struct map_session_data *sd = NULL; int nameid = script_getnum(st, 2); int count = script_getnum(st, 3); if( !(data = itemdb->exists(nameid)) ) { ShowWarning("buildin_getrandgroupitem: unknown item id %d\n",nameid); script_pushint(st, 1); } else if ( count <= 0 ) { ShowError("buildin_getrandgroupitem: qty is <= 0!\n"); script_pushint(st, 1); } else if ( !data->group ) { ShowWarning("buildin_getrandgroupitem: item '%s' (%d) isn't a group!\n",data->name,nameid); script_pushint(st, 1); } else if( !( sd = script->rid2sd(st) ) ) { ShowWarning("buildin_getrandgroupitem: no player attached!! (item %s (%d))\n",data->name,nameid); script_pushint(st, 1); } else { int i, get_count, flag; struct item it; bool isMCA = false; memset(&it,0,sizeof(it)); if (nameid == 12246) { isMCA = true; } nameid = itemdb->group_item(data->group); it.nameid = nameid; it.identify = itemdb->isidentified(nameid); if (!itemdb->isstackable(nameid)) get_count = 1; else get_count = count; if (isMCA) { char message[128]; sprintf(message, "%s got %d %s from MCA", sd->status.name, get_count, (itemdb->exists(nameid))->jname); intif->broadcast(message, (int)strlen(message)+1, BC_DEFAULT); } for (i = 0; i < count; i += get_count) { // if not pet egg if (!pet->create_egg(sd, nameid)) { if ((flag = pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT))) { clif->additem(sd, 0, 0, flag); if( pc->candrop(sd,&it) ) map->addflooritem(&sd->bl, &it, get_count, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); } } } script_pushint(st, 0); } return true; }
-
Any Error on map/char server?
-
It's implemented. Your client doesn't show skills? Maybe missing client side files
-
are you sure it's "size on disk" problem? I doubt, since I remember seeing images above 23kb. Might be it mismatches the size(height*width) or incorrect image format?
-
DB error - Duplicate entry '4700' for key 'PRIMARY'
Dastgir replied to frotek's question in General Server Support
It shouldn't really happen unless your SQL Server/Database got messed up. since PRIMARY KEY is `id` and it's set to AUTO_INCREMENT, it should not generate duplicate value. Anything that happened to your MySQL Server? Any Crashes or anything else? -
int pc_takeitem_pre(struct map_session_data **sd_, struct flooritem_data **fitem_) { struct area_p_data *data; struct map_session_data *sd = *sd_; struct flooritem_data *fitem = *fitem_; data = adb_search(sd); if (data->arealoot && data->in_process==false) { data->in_process = true; map->foreachinrange(skill->greed, &fitem->bl, arealoot_range, BL_ITEM, &sd->bl); hookStop(); data->in_process = false; return 1; } return 1; } in_process is used in pc_takeitem preHook, if you see in_process is set to true and it invokes skill->greed, skill->greed also invokes pc_takeitem, which would make it into possibility of infinite loop. so to prevent this, I set in_process to true, so that the nested calls won't be executing foreachinrange(see if condition, it checks if in_process is false).
- 36 replies
-
- lootarea
- loot by area
-
(and 1 more)
Tagged with:
-
Seems you might be using old hercules?
-
Where does the game apply the bonus ATK from refine in pre-re?
Dastgir replied to Blinzer's question in Source Support
I guess you are looking for: bstatus->batk -
// Hercules version: 20151216 // 2016-02-03aRagexeRE #if PACKETVER >= 20160203 // shuffle packets packet(0x0202,-1,clif->pReqTradeBuyingStore,2,4,8,12); // added in same version // CZ_REQ_TRADE_BUYING_STORE packet(0x0360,6,clif->pReqClickBuyingStore,2); // added in 2016-01-20aRagexeRE // CZ_REQ_CLICK_TO_BUYING_STORE packet(0x0361,26,clif->pFriendsListAdd,2); // added in same version // CZ_ADD_FRIENDS packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // added in 2016-01-20aRagexeRE // CZ_USE_SKILL_TOGROUND_WITHTALKBOX packet(0x0368,6,clif->pSolveCharName,2); // added in 2016-01-20aRagexeRE // CZ_REQNAME_BYGID packet(0x0369,7,clif->pActionRequest,2,6); // added in 2016-01-20aRagexeRE // CZ_REQUEST_ACT packet(0x0436,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // added in same version // CZ_SEARCH_STORE_INFO packet(0x0437,6,clif->pTickSend,2); // added in same version // CZ_REQUEST_TIME packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // added in 2016-01-20aRagexeRE // CZ_USE_SKILL_TOGROUND packet(0x07e4,2,clif->pSearchStoreInfoNextPage,0); // added in same version // CZ_SEARCH_STORE_INFO_NEXT_PAGE packet(0x0811,5,clif->pChangeDir,2,4); // added in same version // CZ_CHANGE_DIRECTION packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // added in 2016-01-20aRagexeRE // CZ_REQ_OPEN_BUYING_STORE packet(0x0817,2,clif->pReqCloseBuyingStore,0); // added in 2015-10-22aRagexeRE // CZ_REQ_CLOSE_BUYING_STORE packet(0x0819,19,clif->pWantToConnection,2,6,10,14,18); // added in same version // CZ_ENTER packet(0x0835,-1,clif->pItemListWindowSelected,2,4,8); // added in same version // CZ_ITEMLISTWIN_RES packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // added in 2016-01-20aRagexeRE // CZ_SSILIST_ITEM_CLICK packet(0x083c,10,clif->pUseSkillToId,2,4,6); // added in 2016-01-20aRagexeRE // CZ_USE_SKILL packet(0x086c,18,clif->pPartyBookingRegisterReq,2,4); // added in same version // CZ_PARTY_BOOKING_REQ_REGISTER packet(0x0872,5,clif->pHomMenu,2,4); // added in same version // CZ_COMMAND_MER packet(0x0873,36,clif->pStoragePassword,0); // added in same version // CZ_ACK_STORE_PASSWORD packet(0x088c,4,clif->pDull); // added in same version // CZ_GANGSI_RANK packet(0x0918,8,clif->pDull); // added in same version // CZ_JOIN_BATTLE_FIELD packet(0x093e,26,clif->pPartyInvite2,2); // added in same version // CZ_PARTY_JOIN_REQ packet(0x0940,5,clif->pWalkToXY,2); // added in same version // CZ_REQUEST_MOVE packet(0x0947,6,clif->pDropItem,2,4); // added in same version // CZ_ITEM_THROW packet(0x0954,8,clif->pMoveFromKafra,2,4); // added in same version // CZ_MOVE_ITEM_FROM_STORE_TO_BODY packet(0x095a,6,clif->pTakeItem,2); // added in same version // CZ_ITEM_PICKUP packet(0x095d,8,clif->pMoveToKafra,2,4); // added in same version // CZ_MOVE_ITEM_FROM_BODY_TO_STORE packet(0x096a,6,clif->pGetCharNameRequest,2); // added in 2016-01-20aRagexeRE // CZ_REQNAME #endif
-
Where does the game apply the bonus ATK from refine in pre-re?
Dastgir replied to Blinzer's question in Source Support
Make sure you are editing correct refine_db.conf According to source: if (r) wa->atk2 = status->dbs->refine_info[wlv].bonus[r-1] / 100; Bonus/100 is the increase in attack. You can find it in status.c function: status_calc_pc_ These are the only lines responsible for refine bonus: if(sd->inventory_data[index]->type == IT_WEAPON) { int r = sd->status.inventory[index].refine,wlv = sd->inventory_data[index]->wlv; struct weapon_data *wd; struct weapon_atk *wa; if (wlv >= REFINE_TYPE_MAX) wlv = REFINE_TYPE_MAX - 1; if(i == EQI_HAND_L && sd->status.inventory[index].equip == EQP_HAND_L) { wd = &sd->left_weapon; // Left-hand weapon wa = &bstatus->lhw; } else { wd = &sd->right_weapon; wa = &bstatus->rhw; } wa->atk += sd->inventory_data[index]->atk; if ( !battle_config.shadow_refine_atk && itemdb_is_shadowequip(sd->inventory_data[index]->equip) ) r = 0; if (r) wa->atk2 = status->dbs->refine_info[wlv].bonus[r-1] / 100; #ifdef RENEWAL wa->matk += sd->inventory_data[index]->matk; wa->wlv = wlv; if( r && sd->weapontype1 != W_BOW ) // renewal magic attack refine bonus wa->matk += status->dbs->refine_info[wlv].bonus[r-1] / 100; #endif //Overrefined bonus. if (r) wd->overrefine = status->dbs->refine_info[wlv].randombonus_max[r-1] / 100; wa->range += sd->inventory_data[index]->range; if(sd->inventory_data[index]->script) { if (wd == &sd->left_weapon) { sd->state.lr_flag = 1; script->run_use_script(sd, sd->inventory_data[index], 0); sd->state.lr_flag = 0; } else script->run_use_script(sd, sd->inventory_data[index], 0); if (!calculating) //Abort, script->run retriggered this. [Skotlex] return 1; } if (sd->status.inventory[index].card[0]==CARD0_FORGE) { // Forged weapon wd->star += (sd->status.inventory[index].card[1]>>8); if (wd->star >= 15) wd->star = 40; // 3 Star Crumbs now give +40 dmg if (pc->fame_rank(MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]), RANKTYPE_BLACKSMITH) > 0) wd->star += 10; if (!wa->ele) //Do not overwrite element from previous bonuses. wa->ele = (sd->status.inventory[index].card[1]&0x0f); } } else if(sd->inventory_data[index]->type == IT_ARMOR) { int r = sd->status.inventory[index].refine; if ( (!battle_config.costume_refine_def && itemdb_is_costumeequip(sd->inventory_data[index]->equip)) || (!battle_config.shadow_refine_def && itemdb_is_shadowequip(sd->inventory_data[index]->equip)) ) r = 0; if (r) refinedef += status->dbs->refine_info[REFINE_TYPE_ARMOR].bonus[r-1]; if(sd->inventory_data[index]->script) { if( i == EQI_HAND_L ) //Shield sd->state.lr_flag = 3; script->run_use_script(sd, sd->inventory_data[index], 0); if( i == EQI_HAND_L ) //Shield sd->state.lr_flag = 0; if (!calculating) //Abort, script->run retriggered this. [Skotlex] return 1; } } } -
Error while starting the Server ???
Dastgir replied to Sidra Harris's question in General Server Support
Type this dos2unix athena-start