Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Hello, As the title, how can I force pet turn into egg? And then delete egg ? Like example : 1. Player talk to this npc.. then this NPC will turn his pet into egg. 2. After turn the pet into egg, npc will delete his egg and giving the item as reward or give other egg as reward.
  3. enum e_additem_result pc_additem(map_session_data *sd,struct item *item,int amount,e_log_pick_type log_type) { struct item_data* data; struct homun_data* hd; int i; unsigned int w; int amt2 = 0; if (item->nameid > 8030 && item->nameid < 9001) { for (i = 8031; i < 9001; i++) { amt2 += pc_countitem(sd, i); } amt2 += 1; if ((hd = sd->hd) == NULL) { amt2 -= 1; } if ((sd->status.lock) == 0) amt2 = 0; if (amt2 >= 6) { storage_storageadd(sd, item->nameid, 1, LOG_TYPE_NONE); return 7; } } int pc_countitem(struct map_session_data* sd, int itemid) //[Hold -brA] { struct item_data* it_tmp; int i, id, amt = 0; if (!(it_tmp = item_db.exists(itemid))) return 0; id = it_tmp->nameid; for (i = 0; i < MAX_INVENTORY; i++) if (sd->inventory.u.items_inventory[i].nameid == id) amt += sd->inventory.u.items_inventory[i].amount; return amt; } Anyone can help me adapt this code for Reathena pls Code 01 ERROR - storage_storageadd(sd, item->nameid, 1, LOG_TYPE_NONE); Code 02 ERROR - if(! (it_tmp = item_db.exists(itemid))) return 0 ;
  4. its working in win 11 just follow the steps thank you
  5. Yesterday
  6. On the script page there is a "Support" button which brings you to the support thread for this script. Maybe try to ask there. Akkarin is still around (he's the admin of rAthena actually).
  7. Is there a way to change the emulator's overall damage? Any variables used in calculating overall damage?
  8. I personally would start with pre-renewal, just check out latest rAthena and enable PRERE, compile. For client you can always use the latest client for which there is a diffable executable (and usually can just get the latest data.grf from kRO). I would recommend just starting with the most recent available because diffing the executable is the hardest and most annoying part of setting up a server, so you only want to do it once and not later again if you want even newer content. Tools like WARP already offer quite some modes and tricks (e.g. to remove the doram selection screen). The advantage of starting with PRERE is that you already have all the mechanics work like PRERE and you could already just launch your server in alpha mode. Then slowly start adding renewal content. Since this is a long process that can take years, it's better to do it slowly one after another. If you started with Renewal, you'd have a long phase were you wouldn't even have a working version, so you'll probably lose motivation before you're even down reverting all renewal mechanics back to pre-re. So yeah, my recommendation is to start with pre-renewal. I think on rAthena we already did it so that even in PRERE all the renewal maps are available and you can warp to them with the warp atcommand. Now the work starts. The best thing is probably to start small. Just pick a single renewal map you want to make accessible. You will need to find add the warps from and to the location. You can take them from existing renewal NPC files, but don't blindly copy the complete file because you'll add warps to locations you don't support then. I guess copying or loading the file but commenting out the warps you don't want yet is the best way to go about it. Same strategy should work with NPCs on that map, but might want to remove the scripts for all NPCs you don't want yet (if you keep the file location as it is and then link to it from the pre-re scripts_main file you can easily restore the deleted NPCs just using TortoiseGit Diff or a similar tool). Now you want to add all the database stuff needed for that map: Items, monsters, etc. These you can't simply copy over from renewal as the stats there have a different meaning, you will need to rebalance the items. I don't think automatically converting items in any form will result in a balanced item. You'd need to look at similar items in renewal and decide for a suitable value. For monsters, you can actually convert some values mathematically. I never wrote a converter for it, but it could certainly be done. For example if you look at HORN_SCARABA (2083): Attack: 886 Attack2: 91 Defense: 135 MagicDefense: 20 Defense 135 in renewal means 23% damage reduction. Which is the same as 23 DEF in pre-renewal. MagicDefense 20 in renewal means 15% damage reduction. Which is the same as 15 DEF in pre-renewal. So you would want to put this instead: Attack: 886 Attack2: 91 Defense: 23 MagicDefense: 15 Next problem is the attack. As you know, in pre-renewal Attack is minimum ATK and Attack2 is maximum ATK. But in renewal Attack is physical ATK and Attack2 is magical ATK. This could also automatically be calculated, you just need Level, STR and INT on top of Attack and Attack2. From renewal "Attack", "Level" and "STR", you can actually calculate both minimum ATK and maximum ATK. From renewal "Attack2", "Level" and "INT" you want to calculate the pre-renewal INT as that determines MATK in pre-renewal. But you only really need to do that if the monsters actually has any magical spells. Otherwise you might just want to leave the original INT value as it is. Also consider the "Level" as well. If you keep max level 99 on your server, then monsters have level 130+ will have too high HIT/FLEE, which might make them unbalanced only your server. I just improved my old helper tool to convert those numbers. It's attached. prerenewal_v2.zip
  9. As @Chaos92 said u have to do much stuff by ur self and change items manually. But don't forget that the formula of def or else in renewal is an other. So u can't copy it one by one and have the same result. Rynbef~
  10. since u said pre-re defense but in renewal, with original file its not possible because the def is difference. For example cotton shirt in pre-re def=1 but in renewal def=10. Theres no problem to load all the maps since that is client side. even with pre-re setting should can access renewal maps as long as the client support it. And theres a lot of items with different effect in pre-re and re. In renewal there is rebalance and so much more, so its already different compare to pre-re which is already stopped long time ago. If you asked is it possible, should be. But with more works, more time, more headache, etc.
  11. Good morning! I have a very simple doubt, but its solution is quite complex and I don’t know exactly how to proceed. So let me tell you about my project and ideas so you can give me a hand. I want to create a server that will fundamentally be PRE RENEWAL defense system, in a RENEWAL server (with only 2nd classes/rebirth. No 3rd classes). The biggest issue I have is that I want the “renewal world”, maps, instances, eden group (also to have the advantage of having all renewal objects and skills so I can just edit the database and be able to use them, without the need to load sprites, etc.). But the damage/defense/objects I want are PRE RENEWAL (where the items’ defense is PERCENT-BASED, reason why items have low base numbers, which I like), adding a few RENEWAL (editing them as custom items). So, my dilemma is that I’m not sure what’s easier to implement… Whether creating a PRE RENEWAL server and “importing” (pasting?): · The scripts and sources referred to EDEN GROUP (is it possible?) · 3rd classes skills (just to use the skills) · Edit the cast/dex formula. · Enable double critical hits. · Edit a selection of renewal items (from 3rd and 4th classes) to make custom items. · Create instances on a pre renewal server. OR creating a RENEWAL server and “limit” the mechanics I’d prefer to leave PRE RENEWAL. · Edit the /src so the game calculates def in PRE RENEWAL mode. · Edit/disable all objects with their RENEWAL values (which seems extremely complicated). · Import pre-renewal items (not easy, i guess) so I don’t have to load/edit them one by one. If the answer is: "use a pre renewal server": wich version should I install? Waiting for your comments and advice.
  12. BUILDIN_FUNC(mobcount) { const char *mapname,*event; int16 m; mapname=script_getstr(st,2); event=script_getstr(st,3); if( strcmp(event, "all") == 0 ) event = NULL; else check_event(st, event); if( strcmp(mapname, "this") == 0 ) { struct map_session_data *sd; if( script_rid2sd(sd) ) m = sd->bl.m; else { script_pushint(st,-1); return SCRIPT_CMD_SUCCESS; } } else if( (m = map_mapname2mapid(mapname)) < 0 ) { script_pushint(st,-1); return SCRIPT_CMD_SUCCESS; } script_pushint(st,map_foreachinmap(buildin_mobcount_sub, m, BL_MOB, event)); return SCRIPT_CMD_SUCCESS; } what codes do i need to replace so that the mobcount script will read the mob_id instead of event label?
  13. +1 recommended. i can confidently say that his work exceeded my expectations in every way possible
  14. kind a noob question , how to apply this autoattack[remix} to my current emulator? currently using 4cram
  15. thanks @Tokei it works !! and i learn some new things !
  16. If he want to share it he already did it. Rynbef~
  17. Hi. Find this line: set @npc$,"[ ^0000FFClaude^000000 ]" And insert below: if (#hideseek_cd == gettime(DT_YYYYMMDD)) { mes @npc$; mes "You can come back to play again tomorrow."; close; } Find the line with getitem and insert below: #hideseek_cd = gettime(DT_YYYYMMDD);
  18. @Ai4reias I already said before: I love Ur patcher rly much and recommand everyone to use it instead of Thor patcher. Rynbef~
  19. Last week
  20. @Froostcan u share it to me my brother?
  21. Gracias por tu consejo. Que me podes decir de las "instances" o de agregar skills que son de 3rd clases? Es posible? O es muy dificil?
  22. A few things to note: "next" always comes before the switch/select statement, not after the "case" branches. If you absolutely want to do this, then you might want to use "clear" before your "mes" dialogues instead. When you use delitem, you should always change the status right afterwards. Be it a quest or a variable, something needs to be done after a delitem. Here's a very likely scenario in your case: the player registers, but then the script ends there or the player uses "cancel" in the next menu. He'll then have to pay with the coin again. While that's probably not a huge deal in this particular situation, that's something you should look out for. It could lead to some serious issues later on. The usage of labels is a tad excessive. You'd normally only want to use labels if the code is repeated. Otherwise it doesn't make much sense to make things more complicated. "countitem(id) > 1" means that will only trigger if the player has 2 items in his inventory. You wanted > 0 there. The "mastery" variable doesn't work well here; that's a permanent player variable and it's way too easy to break out of the script in your case. And since the mastery amount is saved, speaking with the NPC again will cause issues since it's already set to 3 (which is the main bug you were having since you probably tested the script more than 3 times at least). I'd personally use a flag variable instead, but since you're already doing checks using a specific item, might as well use that. Well, I'd still recommend using a flag, but I don't know how this script will be used. Since the dialogues were all repeats, I added an array instead with "OnInit". That makes it easier to add more masteries later on and it's easier to read/modify. moc_para01,27,35,4 script FARHANA A 532,{ soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Hello, welcome to GUILD HALL,"; mes "how may i help you ?"; next; switch(select("- Benefit become a member ?:- I wish to register as guild member:- Nothing")){ case 1: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Becoming a member of GUILD HALL"; mes "will enable you to boost your"; mes "MASTERY, take guild quest, and"; mes "many more..."; next; switch(select("- MASTERY ?:- Guild Quest ?:- Nothing")) { case 1: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Yes mastery, such as gathering,"; mes "cooking, weapon and armor Crafting"; mes "as you progress on doing more of"; mes "those activity you will gain"; mes "more points to unlock more"; mes "higher tier stuff.."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "But sadly.. you can only have"; mes "3 main mastery to choose for."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "as for the rest.."; mes "they will remain as tier 1"; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "I would highly recomend to have"; mes "friends with diffrent mastery"; mes "so you can support each others"; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "i guess that will that be all,"; mes "for now, see you soon.."; close3; case 2: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Guild Quest is a great help,"; mes "each member start from low rank"; mes "such a [D Rank] but you can"; mes "higher rank as you completed"; mes "more quest, higher quest get's"; mes "better reward!"; close3; case 3: goto L_Cancel; } end; case 2: if (mastery_paid_price) goto L_MasteryMenuSelect2; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Ahh.. you wish to register,"; mes "sure i can do that, but i will"; mes "need 1 Durengo Coin"; next; switch(select("- I have it:- I need time")) { case 1: if (countitem(40016) < 1) { soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "I dont think you have"; mes "1 Durengo Coin..."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "You can exchange 1000 zeny"; mes "for 1 Durengo Coin from"; mes "my friend next to me"; close3; } delitem 40016, 1; mastery_paid_price = 1; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "I will take your Durengo Coin now"; mes "oh yeah even if you cancel at any"; mes "part of these process, you will not"; mes "getting back that Durengo Coin"; mes "as it is require for precess fee"; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Great, now remember you can"; mes "only select 3 Mastery"; mes "and only those Mastery will be able"; mes "to level up, and as for the rest"; mes "it will remain as Tier 1.."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Now before you pick a Mastery"; mes "if you are new to the server"; mes "i would highly sugguest to pick"; mes "GATHERING, PROCESSING and 1 of"; mes "your own pick."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "But.. if you know what you are doing"; mes "then go for it.."; next; L_MasteryMenuSelect2: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Now please select your"; mes "1st MASTERY"; mes "desire Mastery"; next; L_MasteryMenuSelect: .@menu$ = ""; for (.@i = 0; .@i < .mastery_count; .@i++) { .@menu$ += "- " + .mastery_names$[.@i] + ":"; } .@menu$ += "- I need time"; .@midx = select(.@menu$) - 1; if (.@midx >= .mastery_count) goto L_Cancel; goto L_MasteryConfirm; end; case 2: goto L_Cancel; } end; case 3: goto L_Cancel; } end; L_Cancel: soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "I shall see you soon.."; mes "Good Bye.."; close3; L_MasteryConfirm: // The mastery count is used by checking the amount of items the player has instead of using the 'mastery' variable. .@count = 0; for (.@i = 0; .@i < .mastery_count; .@i++) { .@count += countitem(.mastery_items[.@i]); } if (.@count >= 3) { soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Great now you have 3 main"; mes "MASTERY, remember if you"; mes "in lost or need help"; mes "ask in discord"; close3; } if (countitem(.mastery_items[.@midx]) > 0) { soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "You have already picked"; mes strtoupper(.@mastery_names$[.@midx]) + " MASTERY."; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Now select again.."; next; goto L_MasteryMenuSelect; } soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes strtoupper(.mastery_names$[.@midx]) + "...."; mes "nice choice, are you sure"; mes "you want to get"; mes strtoupper(.mastery_names$[.@midx]) + " MASTERY ?"; next; switch(select("- YES:- NO")){ case 2: goto L_Cancel; } soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Great pick!"; getitem .mastery_items[.@midx], 1; next; soundeffect "menu.wav",0; mes "^ce7e00 === FARHANA === ^000000"; mes "Now select again.."; next; goto L_MasteryMenuSelect; OnInit: // Could just use setarray, but this is easier to read for me. .@i = 0; .mastery_names$[.@i] = "Gathering"; .mastery_items[.@i] = 40008; .@i++; .mastery_names$[.@i] = "Weapon And Tool Crafting"; .mastery_items[.@i] = 40039; .@i++; .mastery_names$[.@i] = "Armor Crafting"; .mastery_items[.@i] = 40040; .@i++; .mastery_names$[.@i] = "Cooking"; .mastery_items[.@i] = 40038; .@i++; .mastery_names$[.@i] = "Slaughter"; .mastery_items[.@i] = 40041; .@i++; .mastery_names$[.@i] = "Processing"; .mastery_items[.@i] = 40007; .@i++; .mastery_count = .@i; end; }
  1. Load more activity
×
×
  • Create New...