Jump to content

Lighta

Members
  • Posts

    737
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Lighta

  1. that a lub/client matter not server.
  2. That could be interesting, you could use unit_id2 for that. (They're usually use when unit is active but you could do something like : hit hit remaining 2 hit ok change unit_id, hit hit...) case UNT_WARP_ACTIVE: // warp portal opens (morph to a UNT_WARP_WAITING cell) group->unit_id = skill_get_unit_id(group->skill_id, 1); // UNT_WARP_WAITING clif_changelook(&unit->bl, LOOK_BASE, group->unit_id); Need to look how to do it proporly but that where I'd go. Also ofc you'll need thr colored ressource in your client. For pneuma yeah pretty easy, when you set the SC, (status_change_start::SC_PNEUMA) put one of is val to the number of hit you want to support : (Actually in current code SC_PNEUMA->val1 = skilllv of pneuma when launched). So in battle.c where you found if(SC_PNEUMA) {d->dmg_lv = ATK_BLOCK; return 0;} do something like safetywall : if(SC_PNEUMA){ tmp=--SC_PNEUMA->val1; if(tmp==2) changelook; elseif(tmp>0) block; else {end status}
  3. Lighta

    Cloning Pet

    well beside job I think it's all a matter of view_data. So spawn a pet-data then change it's view_data by pet_data_init and instead status_set_viewdata take your current data (well you probably need to modify this one too since it's taking a class as parameter) But juging from clif_send_petdata, idk if you could set all the option you wanted, well you still can try. So here your clue, hope it helped a bit.
  4. I was thinking that some general commande like : foreach,map,cmd*,args*; could be usefull to generate easy code. (Well we already have them in C src but they ain't disponible for npc wich often create duplicate code like disguise; disguiseparty etc..) All that change it's either to add a iterator or not and what to parse it with. In other side something like this with probably be harder to validate for code review. (I mean like when server parsing npcs)
  5. Yeah or : update to revision 15922 => apply patch => update to head should be fine if the diff is made right and if they ain't got other customs..
  6. @java it's gonna be hard for him to help you if you don't specify wich architecture you want. I mean sure we could tell you what configuration to put in the end but you need to awser his question 1st : -How many map-server ? -How many char-server ? -How many login-server ? If you just want 2 separate server, like with nothing to share, then yeah this wiki page ain't what you looking for as it was create with those arch in mind : arch1 arch2 For 2 separate one you can pretty much duplicate everything you got and just change the following port in config : (import/(map_conf, login_conf, char_conf) map_port : login_port : char_port : Add a new </connection> info in your clientinfo and you're good to go. NB : also I'd recommand to change binary name : map-server_sql to something like map-server_sql2 or such as for now the stop command is based on name. (So if you keeping it like that and do athena-start stop, it will close both). Either this or attach a PID a screen whatever you just have to know you may get issue with the stop. Never had issue pointing in same DB but I wouldn't recommend it for a prod server as you probably corrupt entry. To finish that the easier way to setup a "Dual" server (actually that really a dual as the other one.. blabla), probably also the saffest but the most expensive either in ram and storage (well you probably figure that already). hope you get it, peace.
  7. yeah goddameit right. Your code fine but you get the wrong class_ here; put a breakpoint on it and you'll see that it wasn't the id you expect. You should have take ((TBL_MOB*)bl)->class_ instead. Also don't have the code here but if I recall there already a place who parse skills to see wheater or not inflict dammage (check on MOBID_EMPERIUM)
  8. like to choose wich map. a bit like item_trade with zone. ex : //skillid,map bitflag,pc,mob,other //bitmapg // 1 : bg maps // 2 : pvp maps // 4 : woe maps // 8 : zone 1.. // 16 : zone 2... 271,1,-50,-50,-50 //reduce skill 271 in bg maps 273,5,-50,-50,-50 //reduce skill 273 in bg and woe maps.. Advantages is to manipulate those reduction on some map easier especially if you can define map zone lime the restricted mapflag.
  9. The snippet I gave you is a src edit Belkan sorry. I can't give you an npc with it beside : atcommand "@homreset"; the rest should be fine. @goddameit the sql way will only work if char and map sharing the same database. It's usually the case but oyu should know you're breaking servers independence here. (since query_sql using map-server db connection to execute his query there no way he acces homunculus table wich part of char db if it's ain't the same. (especially if you're using another host for char and map)
  10. Ain't really script but way easier imo : //simple it to reset homon [Lighta] ACMD_FUNC(homreset) { nullpo_retr(-1, sd); if (!sd->hd) return -1; // nothing to do merc_reset_stats(sd->hd); clif_displaymessage(sd->fd, "[Homunculus Reset]"); atcommand_homstats(fd, sd, command, message); //Print out the new stats return 0; } nb : The sql option it's ok if you have char and map database in the same spot. Otherwise it will fail...
  11. Oki glad to help, now it's just your explanation that is a bit trickie. At first read I tought that I'll join the party if I could (mean party not full and I'm not already part in it) but then I realise type was default to 1. So yep all good, if I want to force join a party I have to specify a type !=1 (I personally would default to 0 and specify both case, so easier to get it but it correct =) Now only real issue is that it will return 1 (succes) even if char-server down (wich will really be a failure).
  12. Lighta

    Changeloger

    Or if you want it as npc I'd suggest to store your text in sql then read it' But motd probably the easier yeah
  13. Well if I was you I'd add some type in getmapusers2 to fit what u want, it's the easiest way : So for example of use for guild and party the syntaxe would be : .@nbguild = getmapusers2,"prontera",3; .@nbparty = getmapusers2,"prontera",4; Code is compilable but I didn't test it, and he may have a probleme after founding more then 128 guild/party on map.. For the kind of syntaxe with only the name as parameter you'll need to slipt party and guild section in 2 command otherwise we can't differentiate them. good luck =) (oh or I just think you may want both result at once.. (well just use some other setreg)) ah oups doing this by npc would be something like : getmapuser "prontera",2; for(.@i=0; .@i<getarraysize($@mapcharname$); .@i++) { .@it_guild = getcharid(2,$@mapcharname$[.@i]); //reste blabla loop it to see if exist etc } sql based would be something like : SELECT count( DISTINCT `guild_id` ) FROM `char` WHERE `last_map` = "prontera" AND `online` =1 but I wont recommand you that since last_map ain't refresh enough for what u want.
  14. For what I understand he wanted to know how many different party and guild are on map not how many people from this party... well maybe I misinterpret.
  15. There ain't a buildin one from what I know but you may do it in script even if that mean it would be less efficient. Erf I just look and I didn't even found how you'll fetch users on map. (You sure can display there name but probably can treat that...) Anyway a pseudo code woul be : but that jsut a pseudo code I'll suggest you request that on work on it. (You can either do that in src or npc but you'll need to fetch all user on map for the npc part)). You can use that old fonction I add for that :
  16. Ye dunno hwo to make it spawn correctly yet. And if he'll intereact correctly too
  17. I think he want to put a player online without someone controling it, (a bit like autotrade). You're is just to say you have more player online that you actually do. Is that the case test124 ? If so I doubt that would be clif oriented since you won't have a client to interact with, I think wou'll more have to play with pc_setnewpc or pc_authok. That all I can tell since I don't know the solution yet
  18. sc_start(bl, type, 30, skilllv, skill_get_time(skillid, skilllv))); That would be a 30% base chance to get mandragora. base chance is being reduce in status_get_sc_def by some stats like luk, or skill like siegfred and such (usually). I can't be more explicit about this sorry.
  19. Ah well more from experience I guess but you can trace it and sd is really a struct map session data or TBL_PC wich is the same (his typedef). You can take a small look at http://rathena.org/doxygen/main.html for more info but it's hard to follow du to low documentation on code. (it's need comment on some attribute to know what they're for)
  20. Hmm I don't understand the context of this error garet, may you be more explicite with pics, code or some examples ?
  21. Quite hard to follow you jezznar, a diff would really help. If you're on windows and using tortoise svn : right click on folder and chose create patch; it will create a unified diff with you change. If you're on linux : "svn diff > mypatch.diff" it will create again an unified diff name mypatch.diff Beside that : MAX_GUILD is usually defined to 76, more specifically to 16+6*10, using something superior is more likely to create out of bound array and crash. (Much more delicate imo) and there some check in guild.c that you didn't take care of : if(g->max_member > MAX_GUILD) { ShowError("guild_recv_info: Received guild with %d members, but MAX_GUILD is only %d. Extra guild-members have been lost!\n", g->max_member, MAX_GUILD); g->max_member = MAX_GUILD; } So in short in think you need to review your release. Still a nice mod tought thx =)
  22. All those you listed are local variable but just to keep it clear : sd = map session data = a player tsd = target map sesssion data = usually another player bl = blocklist = a 2 way chainlist = list of objects. (object can be player,mob,skill,homon...) For most of them you can just right click and use search declaration. THen you'll found the other who are declared in the same spot.
  23. Yep remind me a bit of partyjoin but still good to add some cmd. About bug I didn't try it to be sure but I'm quite sure it wont be good : "If I already have a team and type 1 and 2 ain't specified you'll had me on a second team (best scenario) or make it crash (worse).." So either we had a if(!(type&3)) return 0; //check if valid type. Or we need to change type check.. Also but that quite minor you're returning 1 (success) assuming player was added correctly even trought it may fail on this reply (but since those return nothing ain't much you can do about it ithout affecting other functions...) nb : why not using ARR_FIND to remove thatuseless flag var ? ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == 0); if (i >= MAX_PARTY) push0.....
  24. Well it's just a bug step preventing hp and sp pot for 10s after azura then "just" sp. (actually you block all item like that wich mean no BoS, no green pot etc etc.. The most noticable still hp but it do implie way more. As michieru said this will be quite annoying in pvp, bg, woe. Preventing sp poting is like putting a soft skill cooldown on azura unless you're in a team with a prof or something giving you sp back in that time. Wich I consider quite good for balance and team incitement. But also forbid hp potting is like sending them to certain death... The sp one is quite official since it's on a kro maj but you'll probably have trouble with your champ population for the rest. Now if you said it's fine is up to you I don't mind much (it was just not what u ask in 1st request). To do this I specified a new item type for my sp healing item and prevent them being used. Otherwise you'll need to read their script which then yes will probably a huge slowdown for server execution. (read script for each item.. the best way will probably to cache them when being parsed). Those are just the pretty way for player so they won't lose item. You could just add something in status_heal to prevent healing sp when we had SC_EXTREMITYFIST for less then 10s. (that quite an easy one, but they'll lose their item while not regenating sp).
×
×
  • Create New...