Jump to content

nasagnilac

Members
  • Posts

    232
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by nasagnilac

  1. Anyone can help me about my issue. I cant recall the autotrade or warp.
  2. Does the leader walk randomly? did you already tried to make it walk the path in front of it and go with obstacles?
  3. Already fixed it. the item is not added in the itemdb that cause the error.
  4. I have problem with attendance. Its working before not sure why this message appear.
  5. I am looking for demises of morroc bmp file.
  6. /// List of AFK supported skills. const char afk_supported_skill[] { SM_BASH, SM_ENDURE, MG_ENERGYCOAT, MG_SIGHT, MG_FIREWALL, MG_FROSTDIVER, MG_FIREBOLT, MG_COLDBOLT, MG_LIGHTNINGBOLT, MG_SOULSTRIKE, MG_THUNDERSTORM, AC_DOUBLE, AC_CHARGEARROW, AC_SHOWER, AC_CONCENTRATION, AL_INCAGI, AL_BLESSING, AL_ANGELUS, AL_RUWACH, AL_CURE, AL_PNEUMA, AL_HEAL, MC_MAMMONITE, MC_CARTREVOLUTION, MC_LOUD, TF_POISON, TF_HIDING, TF_DETOXIFY, KN_PIERCE, KN_BOWLINGBASH, KN_BRANDISHSPEAR, KN_TWOHANDQUICKEN, PR_TURNUNDEAD, WZ_FROSTNOVA, WZ_JUPITEL, WZ_STORMGUST, WZ_QUAGMIRE, WZ_VERMILION, WZ_METEOR, WZ_SIGHTBLASTER, BS_ADRENALINE, BS_OVERTHRUST, BS_WEAPONPERFECT, BS_MAXIMIZE, HT_DETECTING, AS_GRIMTOOTH, AS_SONICBLOW, CR_SPEARQUICKEN, CR_REFLECTSHIELD, CR_DEFENDER, CR_GRANDCROSS, CR_AUTOGUARD, MO_CHAINCOMBO, MO_COMBOFINISH, MO_INVESTIGATE, MO_FINGEROFFENSIVE, MO_EXPLOSIONSPIRITS, MO_CALLSPIRITS, LK_AURABLADE, LK_PARRYING, LK_CONCENTRATION, HW_MAGICPOWER, WS_CARTBOOST, WS_OVERTHRUSTMAX, WS_CARTTERMINATION, SN_SIGHT, SN_WINDWALK, ASC_BREAKER, ASC_METEORASSAULT, PA_PRESSURE, PA_SHIELDCHAIN, PF_MEMORIZE, PF_DOUBLECASTING, ST_PRESERVE, }; for(i=0;i<MAX_SKILL;i++){ inf = skill_get_inf(sd->status.skill[i].id); if (!(inf == 0) && sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0) { j++; } } if(j > 0){ clif_displaymessage(fd, "[ Character Skills ]"); for(i=0;i<MAX_SKILL;i++){ inf = skill_get_inf(sd->status.skill[i].id); if (!(inf == 0) && sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0) { ARR_FIND(0, sizeof(afk_supported_skill), a, skill_get_index(afk_supported_skill[a]) == skill_get_index(sd->status.skill[i].id)); if(b == sizeof(afk_supported_skill)){ snprintf(atcmd_output, sizeof atcmd_output, "-- Skill ID: %d | [ %s ] Lv:%d", sd->status.skill[i].id, skill_get_desc(sd->status.skill[i].id), sd->status.skill[i].lv ); clif_displaymessage(fd, atcmd_output); } } } }else{ clif_displaymessage(fd, "Can't find a non-passive skills."); } I want to display the skills that supported only. Thanks in advance to those who can help me.
  7. Maybe the npc is disable. Can you send some part of the code?
  8. just a typo there but working now. Based on my experience on your update. I have arrow, silver, and steel. when I wear the arrow there is no error and not changing. but when you put silver theres still an error message appearing in the chat box that look like its still equipping the used arrow.
  9. I am having a problem in arrow change so I changed it to this. Maybe you can try it also. The main problem on this now is it prioritizing the steel arrow since it has a greater attack. Added this instead of using elemstrong. int arrowstrong(struct mob_data *md, int ele){ if (ele == ELE_WATER) { if (md->status.def_ele == ELE_FIRE) return 1; }else if (ele == ELE_FIRE) { if (md->status.def_ele == ELE_EARTH) return 1; }else if (ele == ELE_WIND) { if (md->status.def_ele == ELE_WATER) return 1; }else if (ele == ELE_EARTH) { if (md->status.def_ele == ELE_WIND) return 1; }else if (ele == ELE_DARK) { if (md->status.def_ele == ELE_HOLY) return 1; }else if (ele == ELE_HOLY) { if (md->status.def_ele == ELE_UNDEAD) return 1; }else if (ele == ELE_GHOST) { if (md->status.def_ele == ELE_GHOST) return 1; }else{ if (md->status.def_ele != ELE_GHOST) return 1; } return 0; }
  10. I am creating a autostorage timer but it dont store the item. Can you please help me check the script. Thanks you. TIMER_FUNC(unit_autostorage){ struct block_list *bl; struct unit_data *ud; bl = map_id2bl(id); if (!bl) return 0; ud = unit_bl2ud(bl); if (!ud) return 0; struct map_session_data *sd = (struct map_session_data*)bl; int i, a; // Store item when weight become 90% if(pc_is90overweight(sd) && sd->state.afk_storeItem == 1){ if (sd->state.storage_flag != 1) { //Open storage. if( storage_storageopen(sd) == 1 ) { return 0; } } for (i = 0; i < MAX_INVENTORY; i++) { ARR_FIND(0, AFKSTOREITEM_LIST, a, sd->state.afk_storeItemlist[a] == sd->inventory.u.items_inventory[i].nameid); if (a != AFKSTOREITEM_LIST) { if (sd->inventory.u.items_inventory[i].amount && sd->inventory.u.items_inventory[i].equip == 0) { storage_storageadd(sd, &sd->storage, i, sd->inventory.u.items_inventory[i].amount); } } } storage_storageclose(sd); } return 0; }
  11. I got it thank.... is okay that I continue this question. I got this code for @command that will show and add skill id in the array like @autolootid. Anyone can help me clean my code and fix some issue. Any one can help me change this to skill id: ACMD_FUNC(afkskills) { int i, inf, j = 0; int action = 3; // 1=add, 2=remove, 3=help+list (default), 4=reset nullpo_retr(-1, sd); if (message && *message) { if (message[0] == '+') { message++; action = 1; } else if (message[0] == '-') { message++; action = 2; } else if (!strcmp(message,"reset")) action = 4; } switch(action) { case 1: /* ARR_FIND(0, AFKSKILLLIST_SIZE, i, sd->state.afk_skilllist[i] == item_data->nameid); if (i != AFKSKILLLIST_SIZE) { //clif_displaymessage(fd, msg_txt(sd,1190)); // You're already autolooting this item. return -1; } ARR_FIND(0, AFKSKILLLIST_SIZE, i, sd->state.afk_skilllist[i] == 0); if (i == AFKSKILLLIST_SIZE) { //clif_displaymessage(fd, msg_txt(sd,1191)); // Your autolootitem list is full. Remove some items first with @autolootid -<item name or ID>. return -1; } sd->state.afk_skilllist[i] = item_data->nameid; // Autoloot Activated //sprintf(atcmd_output, msg_txt(sd,1192), item_data->name, item_data->jname, item_data->nameid); // Autolooting item: '%s'/'%s' {%d} //clif_displaymessage(fd, atcmd_output); sd->state.autolooting = 1; */ break; case 2: break; case 3: for(i=0;i<MAX_SKILL;i++){ inf = skill_get_inf(sd->status.skill[i].id); if (!(inf == 0) && sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0) { j++; } } if(j > 0){ clif_displaymessage(fd, "[ Character Skills ]"); for(i=0;i<MAX_SKILL;i++){ inf = skill_get_inf(sd->status.skill[i].id); if (!(inf == 0) && sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0) { snprintf(atcmd_output, sizeof atcmd_output, "SID: %d | Lv: %d | Name: %s", sd->status.skill[i].id, sd->status.skill[i].lv, skill_get_name(sd->status.skill[i].id)); clif_displaymessage(fd, atcmd_output); } } }else{ clif_displaymessage(fd, "Can't find a non-passive skills."); } break; case 4: memset(sd->state.afk_skilllist, 0, sizeof(sd->state.afk_skilllist)); break; } return 0; }
  12. I would like to request a command that can show your character current skills id and names. At least give me a hint how I can get that skill id and name. Thank you in advance.
  13. int arrowchange(map_session_data * sd, mob_data *targetmd) { unsigned short arrows[] = { 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1762, 1765, 1766, 1767 ,1770, 1772, 1773, 1774 }; unsigned short arrowelem[] = { ELE_NEUTRAL, ELE_HOLY, ELE_FIRE, ELE_NEUTRAL, ELE_WATER, ELE_WIND, ELE_EARTH, ELE_GHOST, ELE_NEUTRAL, ELE_POISON, ELE_HOLY, ELE_DARK, ELE_NEUTRAL, ELE_HOLY, ELE_NEUTRAL, ELE_NEUTRAL }; unsigned short arrowatk[] = { 25,30,30,40,30,30,30,30,30,50,50,30,30,50,45,35 }; if (DIFF_TICK(sd->canequip_tick, gettick()) > 0) return 0; int16 index = -1; int i,j; int best = -1; int bestprio = -1; for (i = 0; i < ARRAYLENGTH(arrows); i++) { if (index = pc_search_inventory(sd, arrows[i]) >= 0) { j = arrowatk[i]; if (elemstrong(targetmd, arrowelem[i])) j += 500; if (elemallowed(targetmd, arrowelem[i]) && j>bestprio) { bestprio = j; best = index; break; } } } if (best > -1) { pc_equipitem(sd, best, EQP_AMMO); return 0; }else { char* msg = "I have no arrows to shoot my target!"; saythis(sd, msg, 50); return 0; } } Suggestion on this part... Better check if item is already equipped. I tried to use 1 arrow only and error message is spamming the chat box because its still equipping the arrow that already equipped.
  14. Look like the wall cause the issue.
  15. I tried it but still working and I adjust the code to this base on unitwalk scriptcommand. If you are going to use unitwalk its working. if (strcmp("new_1-1", map_getmapdata(sd->bl.m)->name)) { int x = 135; int y = 113; add_timer(gettick()+50, unit_delay_walktoxy_timer, sd->bl.id, (x<<16)|(y&0xFFFF)); // Need timer to avoid mismatches }
  16. if(!target_id && battle_config.player_dummy_move){ if (map_getmapdata(sd->bl.m)->name == "new_1-1" && !pc_isdead(sd)) { unit_walktoxy(&sd->bl, 135, 113, 0); }else{ unit_walktoxy(&sd->bl, sd->bl.x + (rand() % 2 == 0 ? -1 : 1)*(rand() % battle_config.player_dummy_move_cell), sd->bl.y + (rand() % 2 == 0 ? -1 : 1)*(rand() % battle_config.player_dummy_move_cell), 0); } } I am working on auto attack but don't know the right code to compare it with map name like new_1-1.
  17. I have this code that should walk the character when he/she is in the same map. When I tried it nothing happens. Any tips for this?
  18. We currently working on dummy characters but when the server restart and load the dummy. All of the characters cant be seen in the map and it was based on do_init_vending_autotrade. I hope that someone can help me about showing the characters in the map. This is the code. void do_init_autoafk(void) { if (Sql_Query(mmysql_handle, "SELECT c.char_id, c.dummy, c.account_id, c.sex FROM `char` as c INNER JOIN `login` as l ON c.account_id = l.account_id AND c.dummy = 1 AND l.dummy = 1;") != SQL_SUCCESS) { Sql_ShowDebug(mmysql_handle); return; } if (Sql_NumRows(mmysql_handle) > 0) { struct s_afk *afk = NULL; while (SQL_SUCCESS == Sql_NextRow(mmysql_handle)) { char* data; afk = NULL; CREATE(afk, struct s_afk, 1); Sql_GetData(mmysql_handle, 0, &data, NULL); afk->char_id = atoi(data); Sql_GetData(mmysql_handle, 2, &data, NULL); afk->account_id = atoi(data); Sql_GetData(mmysql_handle, 3, &data, NULL); afk->sex = atoi(data); // initialize player CREATE(afk->sd, struct map_session_data, 1); pc_setnewpc(afk->sd, afk->account_id, afk->char_id, 0, gettick(), afk->sex, 0); afk->sd->state.autoafk = 1; chrif_authreq(afk->sd, true); } Sql_FreeResult(mmysql_handle); ShowStatus("Done loading '" CL_WHITE "%d" CL_RESET "' afkers.\n"); } }
  19. How to solve random crashed in 2018 client? Mostly when closing client
  20. Its added here /* Colors available */ colors: { Default: "0xffffff" /* Custom channels will use the first in the list unless a color is selected through @channel. */ Red: "0xff0000" Blue: "0x83cfe9" Orange: "0xFF7A23" Cyan: "0x00D8E3" Yellow: "0xffff90" Green: "0x28bf00" White: "0xFFFFFF" Purple: "0xD67FFF" LightGreen: "0xB6FF00" Normal: "0x00ff00" Map: "0xA9DFBF" World: "0xFAD7A0" Arena: "0xFAD7A0" Trade: "0xAED6F1" Recruit: "0x00cc44" /* Add as many colors as you'd like. */ }
  21. Yes even I change it non admin. like my players can still spam that and they should message the #world of chat is false.
  22. Channel is now bypassing the delay and not working. I can spam it. Do you also experience this? And also the chat:false I can still chat even its disabled. { name: "#world" alias: "[ WORLD ]" color: "World" type: "CHAN_TYPE_PUBLIC" delay: 10000 autojoin: true leave: false chat: false },
  23. Cursor is disappearing when hover in non walkable cells in 2018 client.
×
×
  • Create New...