Jump to content

Jonne

Members
  • Posts

    153
  • Joined

  • Last visited

Everything posted by Jonne

  1. Yes that would be possible, but quite the hardcode just for buffing. I'm not home so I can't provide anything, but might give it a shot next year. OT: It feels like you're trying to add ways to cheat/abuse as admin?
  2. Revert the diff I gave you (but only for the skill.c) and apply this one: diff --git a/src/map/skill.c b/src/map/skill.c index 117c0a7..7d3a586 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -11176,6 +11176,12 @@ int skill_castend_map (struct map_session_data *sd, uint16 skill_id, const char wx = sd->menuskill_val>>16; wy = sd->menuskill_val&0xffff; + // check whether it's allowed to cast AL_WARP there + if (map_getcell(sd->bl.m, wx, wy, CELL_CHKNOWARPPORTAL)) { + skill_failed(sd); + return 0; + } + if( lv <= 0 ) return 0; if( lv > 4 ) lv = 4; // crash prevention
  3. It's in skill.c in skill_weaponrefine: /*========================================== * Weapon Refine [Celest] *------------------------------------------*/ void skill_weaponrefine (struct map_session_data *sd, int idx) { nullpo_retv(sd); if (idx >= 0 && idx < MAX_INVENTORY) { int i = 0, ep = 0, per; int material[5] = { 0, 1010, 1011, 984, 984 }; struct item *item; struct item_data *ditem = sd->inventory_data[idx]; item = &sd->status.inventory[idx]; if(item->nameid > 0 && ditem->type == IT_WEAPON) {
  4. Jonne

    NPC Name

    Isn't this rather in clif_joinchatok ? /// Notifies the client about entering a chatroom (ZC_ENTER_ROOM). /// 00db <packet len>.W <chat id>.L { <role>.L <name>.24B }* /// role: /// 0 = owner (menu) /// 1 = normal void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd) { int fd; int i,t; nullpo_retv(sd); nullpo_retv(cd); fd = sd->fd; if (!session_isActive(fd)) return; t = (int)(cd->owner->type == BL_NPC); WFIFOHEAD(fd, 8 + (28*(cd->users+t))); WFIFOW(fd, 0) = 0xdb; WFIFOW(fd, 2) = 8 + (28*(cd->users+t)); WFIFOL(fd, 4) = cd->bl.id; if(cd->owner->type == BL_NPC){ WFIFOL(fd, 30) = 1; WFIFOL(fd, 8) = 0; memcpy(WFIFOP(fd, 12), ((struct npc_data *)cd->owner)->name, NAME_LENGTH); for (i = 0; i < cd->users; i++) { WFIFOL(fd, 8+(i+1)*28) = 1; memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH); } } else for (i = 0; i < cd->users; i++) { WFIFOL(fd, 8+i*28) = (i != 0 || cd->owner->type == BL_NPC); memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH); } WFIFOSET(fd, WFIFOW(fd, 2)); } Try this maybe: /// Notifies the client about entering a chatroom (ZC_ENTER_ROOM). /// 00db <packet len>.W <chat id>.L { <role>.L <name>.24B }* /// role: /// 0 = owner (menu) /// 1 = normal void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd) { int fd; int i,t; nullpo_retv(sd); nullpo_retv(cd); fd = sd->fd; if (!session_isActive(fd)) return; t = (int)(cd->owner->type == BL_NPC); WFIFOHEAD(fd, 8 + (28*(cd->users+t))); WFIFOW(fd, 0) = 0xdb; WFIFOW(fd, 2) = 8 + (28*(cd->users+t)); WFIFOL(fd, 4) = cd->bl.id; if(cd->owner->type == BL_NPC){ char name[NAME_LENGTH+1]; char *pos; strcpy(name, ((struct npc_data *)cd->owner)->name); pos = strchr(name, '#'); if (pos != NULL) { *pos = '\0'; } WFIFOL(fd, 30) = 1; WFIFOL(fd, 8) = 0; memcpy(WFIFOP(fd, 12), name, NAME_LENGTH); for (i = 0; i < cd->users; i++) { WFIFOL(fd, 8+(i+1)*28) = 1; memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH); } } else for (i = 0; i < cd->users; i++) { WFIFOL(fd, 8+i*28) = (i != 0 || cd->owner->type == BL_NPC); memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH); } WFIFOSET(fd, WFIFOW(fd, 2)); }
  5. Try this. It adds a new Cell which is called cell_nowarpportal. You can't cast warp portals onto those cells. diff --git a/db/const.txt b/db/const.txt index 76926dc..9320e38 100644 --- a/db/const.txt +++ b/db/const.txt @@ -388,6 +388,7 @@ cell_basilica 4 cell_landprotector 5 cell_novending 6 cell_nochat 7 +cell_nowarpportal 10 //cell_gettype 0 cell_chkwall 1 diff --git a/src/map/map.c b/src/map/map.c index 2c8bf35..176d2d1 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2664,6 +2664,8 @@ int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) return (cell.maelstrom); case CELL_CHKICEWALL: return (cell.icewall); + case CELL_CHKNOWARPPORTAL: + return (cell.nowarpportal); // special checks case CELL_CHKPASS: @@ -2718,6 +2720,8 @@ void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) case CELL_NOCHAT: map[m].cell[j].nochat = flag; break; case CELL_MAELSTROM: map[m].cell[j].maelstrom = flag; break; case CELL_ICEWALL: map[m].cell[j].icewall = flag; break; + case CELL_NOWARPPORTAL: map[m].cell[j].nowarpportal = flag; break; + default: ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell); break; diff --git a/src/map/map.h b/src/map/map.h index c584671..56bd72c 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -460,6 +460,7 @@ typedef enum { CELL_NOCHAT, CELL_MAELSTROM, CELL_ICEWALL, + CELL_NOWARPPORTAL, } cell_t; @@ -484,6 +485,7 @@ typedef enum { CELL_CHKNOCHAT, CELL_CHKMAELSTROM, CELL_CHKICEWALL, + CELL_CHKNOWARPPORTAL, } cell_chk; @@ -503,7 +505,8 @@ struct mapcell novending : 1, nochat : 1, maelstrom : 1, - icewall : 1; + icewall : 1, + nowarpportal : 1; #ifdef CELL_NOSTACK unsigned char cell_bl; //Holds amount of bls in this cell. diff --git a/src/map/skill.c b/src/map/skill.c index 117c0a7..d5ff5bd 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13397,6 +13397,12 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id clif_displaymessage(sd->fd, output); //"Duel: Can't use %s in duel." return 0; } + if (map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOWARPPORTAL)) { + char output[128]; + sprintf(output, msg_txt(sd, 1404), skill_get_name(AL_WARP)); + clif_displaymessage(sd->fd, output); //"Warpportal failed." + return 0; + } break; case MO_CALLSPIRITS: if(sc && sc->data[SC_RAISINGDRAGON])
  6. Jonne

    NPC_STOP

    You mean to only freeze the target, not the caster?
  7. Er, it's integer division, so it wouldn't be made into a double precision floating point number. It will still be 64 bits because damage itself is declared as an int64 though, so it's kinda moot. Why is that cast even there? Oh yea, that might be. Maybe it gave warnings on some compiler systems? Dunno
  8. Dividing by 3 would make it a double which is 8 Byte = 64Bit. Same size.
  9. using custom name, can you? just look like : [uncommon] Knife, [Ancient] Knife before name? Namelength limitation (50, btw) = Long Item names can't be rare
  10. if((skill=pc_checkskill(sd,MO_DODGE))>0) status->flee += skill*3;
  11. src/map/statuc: if((skill=pc_checkskill(sd,MO_DODGE))>0) status->flee += (skill*3)>>1; The Formula does: (SkillLevel * 3) / 2 because >> 1 acts like / 2
  12. Add to Makefile or your VS C++ Project.
  13. Index: src/map/battle.c =================================================================== --- src/map/battle.c (revision 15627) +++ src/map/battle.c (working copy) @@ -4285,7 +4285,7 @@ switch( target->type ) { // Checks on actual target case BL_PC: - if (((TBL_PC*)target)->invincible_timer != INVALID_TIMER || pc_isinvisible((TBL_PC*)target) || ((TBL_PC*)target)->sc.data[sC__MANHOLE]) + if ((((TBL_PC*)target)->invincible_timer != INVALID_TIMER && src->type == BL_MOB) || pc_isinvisible((TBL_PC*)target) || ((TBL_PC*)target)->sc.data[sC__MANHOLE]) return -1; //Cannot be targeted yet. break; case BL_MOB: Like this?
  14. You get much less EXP when the monsters are out of your Level Range. See renewal.h in sourcecode. You can disable it there and also get information in the Wiki(there is link in the file) about the system.
  15. The player is fully invincible for the time. But it is turned of when the player starts moving or attacking w/e. You want to create a server and don't even know this...?
  16. But hasn't there been new Icons for Equip granted Endure etc. Though rAthena never added them.
  17. ./conf/import - about everything except atcommand related things. pull a diff from ./src/common/ & ./src/map/ and see what you can apply. Char Server is now full SQL, so you can't do it via diff, you need to apply changes manualy. login table changed, so go to your current login table and change 'level' column to 'group_id'. The rest is about the same in the SQL DB, just that *_re was added, but it won't conflict with eA afaik.
  18. It's neither FLEE nor HIT. It's the hitrate calculation which is outdated. RE defines only a Dodgerate which is: 100% - (HIT - FLEE). Athena calculates Hitrate instead, so you need to change the formula to: Hitrate = HIT - FLEE. Here is a diff: Index: src/map/battle.c =================================================================== --- src/map/battle.c (revision 15627) +++ src/map/battle.c (working copy) @@ -1391,7 +1391,7 @@ { //Hit/Flee calculation short flee = tstatus->flee, - hitrate=80; //Default hitrate + hitrate; if(battle_config.agi_penalty_type && battle_config.agi_penalty_target&target->type) @@ -1408,7 +1408,7 @@ } } - hitrate+= sstatus->hit - flee; + hitrate = sstatus->hit - flee; if(wd.flag&BF_LONG && !skill_num && //Fogwall's hit penalty is only for normal ranged attacks. tsc && tsc->data[sC_FOGWALL])
  19. Oh, that wasn't the case long ago afaik. Well then this whole thread is meaningless.
  20. He wants it to be removed when someone moves onto the map with an item equipped that shoudln't be used on the map.
  21. Here is a diff. I didn't test it, but it should work and do what you want it to do: Index: src/map/clif.c =================================================================== --- src/map/clif.c (revision 15627) +++ src/map/clif.c (working copy) @@ -9218,6 +9218,16 @@ mail_clear(sd); + { // Check if through equip if item is allowed on map [Jonne] + int i; + + for (i = 0; i < EQI_MAX; ++i) { + if (sd->equip_index[i] >= 0 && !pc_isequip(sd, sd->equip_index[i])) + pc_unequipitem(sd, sd->equip_index[i], 2); + } + } + + if(map[sd->bl.m].flag.loadevent) // Lance npc_script_event(sd, NPCE_LOADMAP);
  22. Isn't setting a battle config better/easier. It is more variable for users. Also I'd recommend the possibility of changing it via script. (Not that I need this system, just suggestions).
  23. Can't point my figner at it, sorry. But something seems odd. Dunno. Maybe just me having a bad day
  24. So it does not work like this: Client uses Command--(lag)-->Server Reponds--(lag)-->Divide by 2? Both seems legit, now we have to analyze the packet with which this is possible.
  25. Your code looks strange. You also hand out the items at the end. I think Kenpachi is right: This is rather a Change you can throw into the Release section than something everybody needs.
×
×
  • Create New...