Jump to content

Nerfwood

Members
  • Posts

    104
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Nerfwood

  1. Try scr/map/itemdb.c. if (str[6] != NULL) entry.duration = cap_value(atoi(str[6]),0,UINT16_MAX); Try replacing UINT16_MAX with UINT32_MAX. I haven't tried this one, so I can't assure you of anything.
  2. I have actually misunderstood/misread the code/explanation in the source code. Shame, shame... So sc/tick_def is %-based, while sc/tick_def2 is fixed. 255 luk = 100% immunity? case SC_FREEZE: sc_def = status->mdef*100 + status->luk*10000/255; tick_def = status->mdef*100 + status->luk*2; sc_def2 = status_get_lv(bl)*10 - status_get_lv(src)*10; tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk break; The above code should now make each point in Equip MDef reduce frozen status duration by 1% and each luk by 0.2% . 255 luk should also give 100% immunity (disregarding the source/enemy's parameters), as well does 100 Equip Mdef. Additionally, each 100 point in luk should reduce the duration at a fixed 1 sec. Btw, what skills are you using to test the frozen duration? Skills inflict frozen status at varying durations, so you have to change the value of each skill if you want to define an absolute duration of frozen status. Storm Gust, for example, can freeze an enemy for up to 12 seconds, while a level 5 Jack Frost can freeze enemies up to 30 seconds. (This is for renewal) Edit: If you want to edit the frozen status duration of each skill, check skill.c and look for: sc_start(src,bl,SC_FREEZE,etc.... In the same line of code, you will notice something like this: skill_get_time2(skill_id,skill_lv) If it's skill_get_time2, then edit the Duration2 of the skill in skill_cast_db.txt. If it says skill_get_time only, then edit the Duration1. I'm not 100% sure about this, but it's worth a try. As for frozen status caused by cards/items, I don't know lol. Try searching script.c.
  3. It's working fine.. just tested it. Take note that there can only be one MVP spawned within a certain time (in this script), so use @mobsearch 1646 ~ 1651 after you killed one MVP. http://rathena.org/board/pastebin/1mo7c9hh5kv27/
  4. I'm only replying here because no one else did, even if I don't understand much of your issue. So I assume that you mean conquered castles are not spawning Emperium during WoE (because they really don't if WoE is disabled, just to make things clear). Have you disabled the official WoE controllers (agit_controller.txt) in scripts_guild.conf and you didn't disable agit_main.txt as well? If you haven't disabled the official WoE controller, then disable it. If you have disabled the agit_main.txt, then go enable it. You may also want to switch to Euphy's WoE controller, but make sure to apply the changes I have mentioned. Edit: If those doesn't work, then you should provide more information.
  5. Not sure about this, but check skill.c if( sd && battle_config.equip_self_break_rate ) { // Self weapon breaking rate = battle_config.equip_natural_break_rate; if( sc ) { if(sc->data[SC_GIANTGROWTH]) rate += 10; if(sc->data[SC_OVERTHRUST]) rate += 10; if(sc->data[SC_MAXOVERTHRUST]) rate += 10; }
  6. Have you already tried the example? Anyway, try this one. case SC_FREEZE: sc_def = status->mdef*100; sc_def2 = status->luk*100/35 + status_get_lv(bl)*10 - status_get_lv(src)*10; tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk break; Hard/equip mdef should already be decreasing the duration by 0.1 sec each. Or are you referring to soft/status mdef?
  7. Are you sure the script isn't working? A random MVP spawns at random locations, so you should use @mobsearch or @mapmoblist (if you have it).
  8. Nerfwood

    unitwalk

    As stated in the script_commands.txt file: It also has something to do with the mob's sight range, if not mistaken, just like how you can't directly walk to cells that is not within your character's view or walk range. (Not sure about this.) I don't recommend increasing it because the mob will be able to detect players from afar as well. Just try looping unitwalk until the mob reaches its destination.
  9. Try this? Untested: ....{},{ setoption 0x100000; },{ setoption 0x100000,0; } This should add a warg to the character if the item is equipped, and remove the warg if it's unequipped. I do not guarantee that this will work, whatsoever.
  10. Nerfwood

    Need Help!

    Aside from Skorm's way, you can use item_noequip.txt in your /db/import folder in conjunction with the restricted zone mapflag to add restrictions to items in certain maps. This method is longer but preferable when adding numerous item (and/or skill) restrictions. For skills, use skill_nocast_db.txt instead of item_noequip.txt.
  11. It has been over a year, and, I presume, it's still on hold. It would be really great if there's an update regarding this new upcoming feature of rAthena. Any way the community can help to speed up the process? Also, is it possible to develop this feature without looking into multi-client support? I mean, why is it so important to put the development on hold because of multi-client support? I genuinely don't know what I'm talking about, so please do enlighten me.
  12. I think you should edit mmo.h instead. //For character names, title names, guilds, maps, etc. //Includes null-terminator as it is the length of the array. #define NAME_LENGTH (23 + 1) #define PASSWD_LENGTH (32+1) Not sure. I haven't tested this.
  13. No, don't change that, unless you want all statuses to be about 3x harder to resist. It only changes the natural resistance of players comparative to those set in status.c. So let's say you set pc_status_def_rate to 200, which is twice as normal. It will make resisting all the statuses twice as easier, e.g., 50 vit instead of 100 for stun immunity. Just change the following in status.c: case SC_FREEZE: sc_def = status->mdef*100; sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10; tick_def2 = status_src->luk*-10; // Caster can increase final duration with luk break; to: case SC_FREEZE: sc_def = status->mdef*100 + status->luk*100/35; sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10; tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk break; 350 LUK should give a 100% immunity, but immunity can also be achieved with less LUK by having a high/decent MDEF. (1MDEF = 1% resistance.) Target's LUK should also affect the duration now, but not sure if every 100 LUK can reduce 1 second.
  14. Ohh, I see. I kind of feel guilty replying at topics posted in the wrong section. lol
  15. I really don't like to spoonfeed people, but since I already have the code: 18666,CD_In_Mouth,CD In Mouth,4,20,,200,,0,,0,0xFFFFFFFE,63,2,1,,20,0,815,{ autobonus "{ bonus3 bAutoSpell,8013,5,40; bonus3 bAutoSpell,8013,4,40; bonus3 bAutoSpell,8013,3,40; bonus3 bAutoSpell,8013,2,40; bonus3 bAutoSpell,8013,1,40; bonus3 bAutoSpell,13,1,10; bonus3 bAutoSpell,13,2,10; bonus3 bAutoSpell,13,3,10; bonus3 bAutoSpell,13,4,10; bonus3 bAutoSpell,13,1,10; }",60,5000,0,"{ specialeffect2 EF_POTION_BERSERK; }"; },{},{} Notes: Skill ID 8013 = Caprice; 13 = Soul Strike. Autobonus doesn't support skill names since they (skill names) break the quotation ("") marks. Caprice randomly casts FB, LB, CB and ES. I gave it a 4% chance of autocasting so as if each bolt is casted at a 1% rate. Edit: Should have been posted at the requests section?
  16. Not exactly, but you can use either currency to buy items at the Cash Shop (in value, they are the same). You can use the variable #KAFRAPOINTS for setting, well, Kafra Points.
  17. Replace the comma at the end of L_arug_cas01 with a semi-colon (;). menu "Kriemhild",L_prt_cas01, "Sacred Altar",L_pay_cas04, "Horn",L_arug_cas03, "Vidblainn",L_schg_cas03, "Mardol",L_arug_cas01, You should look at the console next time to see the errors you are getting. Also, I'm not sure if there are any other errors in this script.
  18. Edit it at src/map/status.c. Start at Line 7190. I'm not sure about the exact values, but sc_def and sc_def2 deals with the resistance, while tick_def deals with the duration. I'm guessing that a 100 sc_def will result to 100% resistance a.k.a. immunity, but I'm not so sure. Go experiment. And remember to compile after saving your changes, or it won't take effect.
  19. I would really like to see a script command where we can spawn a monster and set it as a player's ally without being in a battleground area. If there's a command like that, please let me know since I need it for a script I'm itching to do. lol I'll try to apply this patch sometime later... hope it works!
  20. I believe he meant to add another category aside from the Normal and MVP cards. Anyway, here it is. All cards are categorized as class 1 by default. You have to specify which will be class 2, 3 and 4 in the script. Note: I did not edit the information part so you have to edit it yourself. //===== rAthena Script ======================================= //= Card Trader //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Exchange cards for points. //============================================================ ruhel,74,58,4 script Card Captor Sakura 10044,{ mes "[^995050Card Captor Sakura^000000]"; mes "Hi, "+strcharinfo(0)+"!"; mes "What can I do for you?"; next; switch(select(" > Information: > Trade in cards: > Point shop (^0055FF"+getd(.Points$)+"^000000): > Leave")) { case 1: mes "[^995050Card Captor Sakura^000000]"; mes "Do you find that you've got"; mes "useless cards lying around?"; mes "I'll be glad to take them off"; mes "your hands!"; next; mes "[^995050Card Captor Sakura^000000]"; mes "I'll give you ^0055FF"+.Points[0]+" Point"+((.Points[0] == 1)?"":"s")+"^000000 for each"; mes "card you give me, and"; mes "^0055FF"+.Points[1]+" Points^000000 for MVP cards."; mes "You can trade those points"; mes "for items later on."; mes "How does that sound?"; emotion e_cash; close; case 2: mes "[^995050Card Captor Sakura^000000]"; mes "Select the cards you"; mes "want to trade in."; if (.Level) { mes " "; mes "They must be dropped"; mes "by monsters of level"; mes .Level+" and above."; } deletearray @sold_nameid[0],getarraysize(@sold_nameid); callshop "card_shop",2; npcshopattach "card_shop"; end; case 3: mes "[^995050Card Captor Sakura^000000]"; mes "You have ^0055FF"+getd(.Points$)+"^000000 Point"+((getd(.Points$) == 1)?".":"s."); callshop "card_shop",1; npcshopattach "card_shop"; end; case 4: mes "[^995050Card Captor Sakura^000000]"; mes "*yawn*"; mes "See you later!"; emotion e_yawn; close; } OnSellItem: mes "Cards to sell:"; mes "-----------------------------------"; for(set .@i,0; .@i<getarraysize(@sold_nameid); set .@i,.@i+1) if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) { if (.Level) { query_sql("SELECT `LV` FROM `mob_db` WHERE `DropCardid` = "+@sold_nameid[.@i],.@lv); if (.@lv < .Level) { dispbottom getitemname(@sold_nameid[.@i])+" is under the minimum level."; continue; } } set .@card_id[getarraysize(.@card_id)], @sold_nameid[.@i]; set .@card_amt[getarraysize(.@card_amt)], @sold_quantity[.@i]; set .@class2, compare(.class2$,""+@sold_nameid[.@i]); set .@class3, compare(.class3$,""+@sold_nameid[.@i]); set .@class4, compare(.class4$,""+@sold_nameid[.@i]); mes ((.@class2 || .@class3 || .@class4)?" ^FF0000":" ^777777")+@sold_quantity[.@i]+"x "+getitemname(@sold_nameid[.@i])+"^000000"; if(.@class2) { .@class=1; } else if(.@class3) { .@class=2; } else if(.@class4) { .@class=3; } else { .@class=0; } set .@card_total, .@card_total+ ( @sold_quantity[.@i]* .Points[.@class] ); } deletearray @sold_nameid[0], getarraysize(@sold_nameid); deletearray @sold_quantity[0], getarraysize(@sold_quantity); if (!.@card_id) { mes " ^777777(none)^000000"; emotion e_swt; close; } mes " "; mes "---------- Total: ^0055FF"+.@card_total+" pt.^000000 -------"; next; if(select(" > ^0055FFComplete trade...^000000: > ^777777Cancel^000000") == 2) { mes "[Card Trader]"; mes "Oh, okay..."; emotion e_hmm; close; } for(set .@i,0; .@i<getarraysize(.@card_id); set .@i,.@i+1) delitem .@card_id[.@i],.@card_amt[.@i]; setd .Points$, getd(.Points$)+.@card_total; mes "[Card Trader]"; mes "All done!"; emotion e_ho; close; OnBuyItem: for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) for(set .@j,0; .@j<getarraysize(.Shop); set .@j,.@j+2) if (@bought_nameid[.@i] == .Shop[.@j]) { set .@cost, .@cost+(.Shop[.@j+1]*@bought_quantity[.@i]); break; } if (.@cost > getd(.Points$)) { mes "[Card Trader]"; mes "You don't have enough Points."; emotion e_omg; } else { mes "Items purchased:"; mes "-----------------------------------"; for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; mes " ^777777"+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"^000000"; } mes " "; mes "---------- Total: ^0055FF"+.@cost+" pt.^000000 -------"; setd .Points$, getd(.Points$)-.@cost; emotion e_cash; } deletearray @bought_nameid[0], getarraysize(@bought_nameid); deletearray @bought_quantity[0], getarraysize(@bought_quantity); close; OnInit: set .Level,0; // Minimum monster level to trade corresponding cards. set .Points$,"#CASHPOINTS"; // Variable to store points. setarray .Shop[0], // Card Shop items: <ID>,<point cost> 5027,10, 18505,10, 5176,10, 5305,20; //setarray .Points[0],5,100; // Points per <normal card>,<MVP card> setarray .Points[0],3,5,10,25; // Points per <Class 1>,<Class 2>,<Class 3>,<Class 4> set .class2$, // Class 2 cards | Those not within Class 2 ~4 are all Class 1 "4268,4194,4222,4275"; set .class3$, "4054,4047,4174"; set .class4$, // List of MVP cards. | Previously .MVP$ "4121,4123,4128,4131,4132,4134,4135,4137,4142,4143,4144,4145,4146,4147,4148,4168,4236,"+ "4241,4263,4276,4302,4305,4318,4324,4330,4342,4357,4359,4361,4363,4365,4399,4403,4407"; npcshopdelitem "card_shop",909; for(set .@i,0; .@i<getarraysize(.Shop); set .@i,.@i+2) npcshopadditem "card_shop",.Shop[.@i],.Shop[.@i+1]; end; } - shop card_shop -1,909:-1
  21. Are you referring to the X/Y pvp ranking display on the lower right corner of the screen? If so, it won't show if your server is on PK mode. If you're referring to official servers' PVP room brackets, then just copy them?
  22. In your db/(p)re/item_db.txt. Much better if you add a copy to your import folder so it won't be affected when you update your rathena directory.
  23. Use rand(min,max) for the refine argument, e.g., getitem2 <item id>,<amount>,<identify>,rand(5,10),<attribute>,<card1>,<card2>,<card3>,<card4>; The above code will generate an item with a random refine rate of 5 ~ 10.
  24. It should still work., but maybe with minor adjustments.
×
×
  • Create New...