Jump to content

Lighta

Members
  • Posts

    737
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Lighta

  1. status.c::status_change_start case SC_EDP: // [Celest] val2 = val1 + 2; //Chance to Poison enemies. val3 = 50*(val1+1); //Damage increase (+50 +50*lv%) Change the val3 as you wish. nb if skilllv=5 => val1 = 5 => val3 = 50*6 = 300; atk will be +300%. So you could just do val3 = 50*(val1-1) => at lvl5 == +200%, but lvl1 will give no bonus...
  2. Mysterious #ifdef may add some code but it's faster on rumming time then checking for battle.conf each time so that why I wanted that way. You probably know but just a quick note for those who don't and explain my point, #ifdef is preprocessor configuration wich mean you're binary won't run this code (like it's not even exist) wheareas a battle.config cheking everytime to do it or not. So if you sure you wont use it there no point to have those check, the good point about them is that you can just enable or disable it without recompiling. (so no reboot). Now talking about you can take it out yourself or not is not that much relevant, I could and did with no worry but thinking this way is just ok I don't do suggestion anymore since I can do it my own... I just tough since we were aguing to not add thing not official to treat this like a proper module as it should be. Or in comparaison why don't we add irc mod too with just a battle config ? it's exactly the same for me... You could also take other exemple like : "OFFICIAL_WALKPATH" why not setting it as battle.conf so we can change it on flow etc.. I just think they choose to add some prepocessor configuration to optimise it.
  3. Your's will work too Aima don't worry. just use strcharinfo(2) for guildname instead asking for input. If no guild found cause he ain't got none, atcommand will display "Please, enter a guild name/id (usage: @guildrecall <guild_name/id>)." so it's safe but you may add a check like Emistry to change this message. Btw on Emistry code getmapxy may be done after the getcharid(2) check since it's pointless to do it if the char has no guild, also it's better that function use return at the end if you want to use them in longer script. Now quick note about mapflag : warpguild is checking for : nowarp, and noreturn. (with m,x,y option) guilrecall is cheking for : nowarpto, and nowarp both bypassable by PC_PERM_WARP_ANYWHERE And lastly I don't know if you wanted to be excluvise to guild leader but it's not at the moment. (You'll need to add something like : if(getguildmasterid(getcharid(2)) == getcharid(0) ) //i'm gm if true) Oh also idk if you wanted your item to be consomable but if so you will lose it when it fail du to mapflag or no guild wich is quite sad.
  4. search : GN_MANDRAGORA in skill.c then change the rate when applying status : sc_start(bl, type, 25 + 10 * skilllv, skilllv, skill_get_time(skillid, skilllv))) // this is originaly 25+10*skilllv in rate for the status; adjust it as you wish. sc_start(bl, type, 15 + 10 * skilllv, skilllv, skill_get_time(skillid, skilllv))) //now it's 15+10*skilllv for base chance. If you want to increase status resistance then go in status_get_sc_def : sc_def = (status->vit+status->luk)/5; This mean : rate -= rate*(target vit + luk)/500; (sc_def is used with other status to increade status defense..) With this you should have enough info to alter it the way you like.
  5. Just a side note : map_delblock(src); //Required to prevent chain-self-destructions hitting back. and map_addblock(src); seem like a hack for me, it would be better if we could use BCT_SELF for this; like flag |= BCY_ALL; //ok we want to affect all flag &= ~BCT_SELF; //except ourself unfortunatly this doesn't work atm since battle_check_target doesn't handle properly BCT_SELF and if you add a simple check it will break some other mapforeach skill. Still remove and add block it's ugly !
  6. So here a basic suggestion, back on r16025 I[nd] inserted [Dekamaster/Nightroad] the @accinfo with geoip thing. may we had a #ifdef GEOIP or something similar to choose wheter to activate this or not ? I have no doubt it may be a great tool but I'm not interested and it's harder to see what's needed for this mod or not wihout.
  7. check the status in skill_castfix_sc, and apply the change you want in fixed time, should be fine. e.g : if( sc->data[sC_MANDRAGORA] && (skill_id >= SM_BASH && skill_id <= RETURN_TO_ELDICASTES) ) fixed += 2000; Actually since it's already here just move it down the : #ifdef RENEWAL_CAST #endif section and it will work without enable that. nb : anyway mandragora should be skilllv*0.5s so you may need to correct this too.
  8. Actually I would prefere a script argument to switch between the 2 mode presented instead a battleflag : instance_check_party <party_id>{,<menbers needed>,<min lvl>,<max lvl>.<behaviour flag>} This will allow to use it in both way for different script, like for instance x we need to kick player that doesn't have the good requirement while in instaqnce y ok doesn't matter... Also few notes : dunno why it's name instance_* as this is more generally for all party matters. dunno why you checking if party_id exist, you said it was required in comment and either way you didn't had a fallback like player attach to script if not.. finally as Lemongrass pointed out many time they don't know that they need to kick that people or nor who doesn't fit the requirement so perhaps adding some clif_message may be interesting.
  9. What would be the purpose of x1 y1 x2 y2, to spwan one item is the specific area ? Well you can already do the random x and y first to spawn in given are than invoque the fonction e.g .@x1 = xmin; .@y1 =ymin; //min xy of square '@x2 = xmax; .@y2 = ymax //max xy of square .@x = rand()%(.@x2-.@x1)+.@x1; //get a random x in square .@y = rand()%(.@y2-.@y1)+.@y1; //get a random y in square makeitem (601,1,.@x,.@y); but yeah could be easier if integrated to makeitem fonction, what the issue (well not that hard) will be to keep backward compatibility for current makeitem fonction. (like will need to add x2 and y2 as option...)
  10. Actually is this line that configure where it's being saved : kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t %p - PID of dumped process %u - real UID of dumped process %g - real GID of dumped process %s - number of signal causing dump %t - time of dump (seconds since 0:00h, 1 Jan 1970) %h - hostname (same as ’nodename’ returned by uname(2)) %e - executable filename Did you look the command executed with "history" otherwise ?
  11. Well yeah the "do nothing" was obious still i'm pretty sure there was already something similar in emu. I add that "default : break;" only for the switch warnings, but sure we could explain default more, or sometime the switch already have a short desc, (e.g : "parsing boss immunities.."), so well you could understand it like "do nothing for the rest of statuses". It will anyways sound more and more obvious as you know more of emu. My philosophie with it is that comment don't hurt if they're short enough to not increment code line, (like 3 line with /* * */ for something we don't care much is annoying) and that you can maintain them (they are up to date easely, cuz if you have to change 10 comment for 1 move that annoying as well.) Name and Credit, Well sure you can look at svn if you have one, starting to be more delicate when you switching, like if you taking that way you really need to keep old log in memory. (wich is good but longer) Log doesn't always state the change : "* Merged changes up to eAthena 15096" rA r16106. (This one was about 3rparty and vcproj). So let say our myql having an issue, you 1st need to found out that "merge up 15096" was containing the change then go to eathena tracker to see who did it. Ofc since we don't put name on those file this example doesn't match really but the point was log may be long and it will be anyway longer then a comment. Now it's not a big issue you choose to put them or not that all, if it's a basic change then you don't need to add it. If it something that conflict/custom then yeah I'm adding it (that only to prevent people merging this area and broke it, like before changing it you could ask me a quick question and what was that for ?..). With this said it's right that they not that usefull if you can't reach the guys anyway.
  12. You didn't mention it but are you sure you're saving your core file in the good directory ? from the command you quote it suppose to be saved in server/ Anyway take a look at /etc/sysctl.conf to see where your corefile are generated. Then those will only appear if you have a crash, so if you have no errors it sound weird, did you look bash history to be sure no one was turning it off ?, no cron or such ?
  13. If you look closely I wasn't only speaking about documentation, sure code may speak by itself but it's mainly true cause were used to and edit much as we like. Here was really basic thing something better would be general purpose of function and perhaps variable in structure so even fresh dev will know how to edit thing consistently. NB : even on rathena we have something like : status_heal(bl, hp, 0, 0); if( tstatus->hp != tstatus->max_hp ) clif_skill_nodamage(&src->bl, bl, AL_HEAL, hp, 0); Instead simply do status_heal(bl, hp, 0, 2); Here it's quite ok since tstatus take battlestatus wich also take account bonus but there was code similar wich ain't resulting in not healing (if we had done sd.status.max_hp...) Beside this check is unecessary since status_heal can handle it and do a similar check, resulting on a non consistent code at least and not optimise (since I seing lot of optimise attempt lately...) I already told Xaxax about this for EPICLEIS and I see the change was made wich i'm glad but there is other and I hope this probably wouldn't happen with even a basic doc. Another point is if you looked pc.c doc you'll see that some return value conflict, (not a big issue but since they aren't fully consistent we can't really use them safely or at least I wont for all) Now the other part of this was WARNINGS. I honnestly don't see the benefit of shutting them down. (like let's auto ignore them) A warning is afterall just something to point out our attention that something may be wrong. So ok maybe we could keep -Wno switch since we have a lot of enum and turning this one on mean adding a lot of default. But : -Wno-unused-parameter : same as before if we want to do some optimisation why the hell would we want to assign/declare variable we wont use ? -Wno-sign-compare : simple consistency, actually only @mapflag giving some errors on this. -Wno-pointer-sign :I don't really remenber what function had warnings with this one.. Also just a quick note : There been a lot of fileReadCount = fread(...); I suppose this to fix the warnings, "return value unsed", well we still don't really use it if we just assign it to a variable we never read... we might also another warnings exception at this point. A real fix would be to trowh an arror if the bytecount isn't matching we pass on argument or something like this. Hope you get what I mean now.
  14. That not the proper fix, you'll endup changing all ruwach, sight and sightblaster here, wich mean instead when using ruwach he will dehide every 250ms hidden he will do it every 2s. Sound good for shadowform but this will also affect normal hide and such => nerfing ruwach. The easier way to do this is to use sc->data[sC__SHADOWFORM]->val4 wich is a 1s timer, if %2==0 dehide, if not do nothing. Mean you could try to dehide every 2s : t[0;1[ => can dehide; t[1;2] => can't etc etc... Only issue now it's since our ruwach will pass 4x in t[0;1[ we should mark if we already attempt it once.
  15. Perhaps we should have a FAQ section, anyway use dos2unix to fix it : dos2unix athena-start //Use (dos2unix athena-start) if yo uare getting ^M errors ie. newline errors
  16. Hi, in order to improve Rathena dev I believe we need a better inner documentation, as it been said many time. There was no real improvement here for existing code even trough new one had huge comment. So I did a little documentation myself, very basic but may be usefull, I gave it some time before on irc but doesn't seem you guys wanted to comit it so here it is : http://pastebin.com/zB9rBZJb Another subject of great important is all the ignore warnings x in the configure script. Thus creating and compiling our file without those check or at least thoses warnings. So now let's face it what the points of ignoring some warnings ? Are we so great that we know our code so well that we don't need to check warnings ? Even so we still could show them and ignore it'd be better then saying don't even tell me nothing about it. And if it was the case we wouldn't spent so much time trying to fix somes trivial warnings even trought when fixing them we create others warnings that we don't know about cause we don't show them... Finally this would help people doing mod. Ok now to speak more concrete we have those building option : Wno-sign-compare -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -fno-strict-aliasing The only one understanble may be wno-switch since we have really long enumeration sometime, and that adding default : break; isn't something pretty. fno-strict-aliasing may also still since will have to rewrite a lot to match it but it may be good to do it for optimisation : http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html Finally here a quick diff for configure to see our current warnings without the overrinde : http://pastebin.com/UWUisbTi It's quite ugly but it's just to see the warnings, we may add a configure options in future to add those flag or not.
  17. Hoi, nice script but he ain't compatible anymore with latest rA version, since script engine update. (arround 15997) You'll have an error here : while(getd(getarg(0) + "[" + .@i + "]") != "") {
  18. switch only accept integer or constant value in C, Java... so you'll need to insert some lookup to do the job, in the end I doubt your switch will be more effecient then multiple else if. (Well probably still be for long swtich) Anyway we could try treate it like that : #include <string.h> #include <assert.h> #include <stdint.h> #define p_ntohl(u) ({const uint32_t Q=0xFF000000; uint32_t S=(uint32_t)(u); (*(uint8_t*)&Q)?S: ( (S<<24)| ((S<<8)&0x00FF0000)| ((S>>8)&0x0000FF00)| ((S>>24)&0xFF) ); }) main (void) { uint32_t s[0x40]; assert((unsigned char)1 == (unsigned char)(257)); memset(s, 0, sizeof(s)); fgets((char*)s, sizeof(s), stdin); switch (p_ntohl(s[0])) { case 'open': case 'read': case 'seek': puts("ok"); break; case 'rmn0': puts("not authorized"); break; default: puts("unrecognized command"); } return 0; }
  19. Quite hard to understand the issues here, not so familiar with Toasty diff to get an idea. Anyway gdb would help on the matter, you may have some info here : http://rathena.org/wiki/GDB Or all you guys need to do is : gdb -ex run map-server_sql Than also run the 2 other part : ./login-server_sql ./char-server_sql With this will have a better view of what may wrong when crashing. (use "bt full" when this append to have a more consistent report)
  20. It's quite explicite if you read the configure error : "configure: error: MySQL not found or incompatible" You need libmysqlclient-dev Also you don't need to configure / compile in root, in fact if you do that you'll need to be root to run it or shut it down. Never good to run a server as root.
  21. This is the same as removing the log_pick like I said, is up to you to know if you want to log those failerefine or not.
  22. I think it's because you forget to edit the reply of selection : skill_autospell Otherwise the change should be correct but I don't think someone could normally learn hevendrive lvl10 so be carefull in your change.
  23. Seem like you don't have the "replacestr" function, are you sure you're using the latest rA ?. Anyway you'll need it so found that function (I think it was with toasty string command); Put it in script.c, recompile and you should be fine.
  24. This are really old fonction style, rA/Ea don't use if(log_config_enable&0x40) stuf since r15245 and before for harcoded hexed value. Now to fix your compilation you may do as QQfoolsorellina mentionned but in latest rathena it'd more be something like this : //void log_pick_pc(struct map_session_data* sd, e_log_pick_type type, int amount, struct item* itm) so you'll need to change both //Logs items, got from (N)PC scripts [Lupus] if(log_config.enable_logs&0x40) log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]); to log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i]); and if(log_config.enable_logs&0x40) log_pick_pc(sd, "N", sd->status.inventory.nameid, 1, &sd->status.inventory); to log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]); or you can just remove thise since you don't really lose an item anyway, well take a look at the e_log_pick_type to chose the one you want. and last you should update the failedrefitemR to read how much to downgrade the equipement instead hardcoding minus 3, (seem a bit wrong design here)
×
×
  • Create New...