Jump to content

Litro Endemic

Members
  • Posts

    255
  • Joined

  • Days Won

    9

Everything posted by Litro Endemic

  1. how much damage output and damage diff you get from 2nd change mentioned by you above ? int ratio = (int64)(status_get_hp(src) / 10000) * tsc->data[SC_CRESCENTELBOW]->val1 * status_get_lv(target) / 125; if (ratio > 500) ratio = 500; // Maximum of 5000% ATK this is crazy, iirc usually i only cap the hp and lower max ratio of atk, let said player a have crescent elbow and player b hit him, player b has 300k hp, before nerf main damage = (300,000/100) * 5 * 255/ 125 = 30600 * 5000 / 10 = 15,300,000 after nerf, main damge = (300,000/10000) * 5 * 255/ 125 = 306 * 500 / 10 = 1,530,000 if you see the pattern multiply and division of factor damage variable that multiply it, you only need to make it sane enough
  2. from if (getmapxy(@mapa$,@mapx,@mapy,0,strcharinfo(0)) != 0) end; to if (getmapxy(@mapa$,@mapx,@mapy, BL_PC, strcharinfo(0)) != 0) end;
  3. the easier way is do what mabuhay told ya, but if you wanna do it on src, take a look at this part if( tsc && tsc->data[SC_CRESCENTELBOW] && wd->flag&BF_SHORT && rnd()%100 < tsc->data[SC_CRESCENTELBOW]->val2 ) { //ATK [{(Target HP / 100) x Skill Level} x Caster Base Level / 125] % + [Received damage x {1 + (Skill Level x 0.2)}] int64 rdamage = 0; int ratio = (int64)(status_get_hp(src) / 100) * tsc->data[SC_CRESCENTELBOW]->val1 * status_get_lv(target) / 125; if (ratio > 5000) ratio = 5000; // Maximum of 5000% ATK rdamage = battle_calc_base_damage(target,tstatus,&tstatus->rhw,tsc,sstatus->size,0); rdamage = (int64)rdamage * ratio / 100 + wd->damage * (10 + tsc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10; skill_blown(target, src, skill_get_blewcount(SR_CRESCENTELBOW_AUTOSPELL, tsc->data[SC_CRESCENTELBOW]->val1), unit_getdir(src), BLOWN_NONE); clif_skill_damage(target, src, gettick(), status_get_amotion(src), 0, rdamage, 1, SR_CRESCENTELBOW_AUTOSPELL, tsc->data[SC_CRESCENTELBOW]->val1, DMG_SKILL); // This is how official does clif_damage(src, target, gettick(), status_get_amotion(src)+1000, 0, rdamage/10, 1, DMG_NORMAL, 0, false); status_damage(target, src, rdamage, 0, 0, 0); status_damage(src, target, rdamage/10, 0, 0, 1); status_change_end(target, SC_CRESCENTELBOW, INVALID_TIMER); } and compare to this details https://irowiki.org/wiki/Crescent_Elbow, you can make head what you need to nerf from the formula used, there is a comment on how formula worked there... usually pitfall on high cap max level server is the stats go so high and make it dumb damage output.
  4. re configure number of time out param in your summon set @nTime, (300+rand(0,120))-getmonsterinfo(killedrid,1); summon "Ajudante "+getmonsterinfo(killedrid,0), killedrid, @nTime; *summon "monster name",<monster id>{,<Time Out>{,"event label"}}; Timeout is the time in milliseconds the summon lives, and is set default to 60000 (1 minute). Note that also the value 0 will set the timer to default, and it is not possible to create a spawn that lasts forever. If an event label is given, upon the monster being killed, the event label will run as if by 'donpcevent'. time out param is in milliseconds, of course your spawned monster almost disappear instantly, you set time out at range 300 ~ 420 - Monster Killed Level, that not even a second
  5. there is change on getmapxy function long ago you should update all getmapxy param type from 0 to BL_PC *getmapxy("<variable for map name>",<variable for x>,<variable for y>{,<type>,"<search value>"}) This function will locate a character object, NPC object or pet's coordinates and place their coordinates into the variables specified when calling it. It will return 0 if the search was successful, and -1 if the parameters given were not variables or the search was not successful. Type is the type of object to search for: BL_PC - Character object (default) BL_NPC - NPC object BL_PET - Pet object BL_HOM - Homunculus object BL_MER - Mercenary object BL_ELEM - Elemental object The search value is optional. If it is not specified, the location of the invoking character will always be returned for types BL_PC and BL_PET, the location of the NPC running this function for type BL_NPC. If a search value is specified, for types BL_PC and BL_NPC, the character or NPC with the specified name or GID will be located. If type is BL_PET/BL_HOM/BL_MER/BL_ELEM, the search will locate the current object of the character who's name/GID is given in the search value, it will NOT locate the object by name.
  6. it seem there is 2 type of button function, one is sending packet data and the other not, the like shortcut description and tipbox menu button is pure client side button function, well there is function clif_parse_open_ui but it only triger attendance
  7. Is there any way to modify function of client menu button for example i want to change menu button tips for refine ui?
  8. yes you can, create script command and call it from any npc script. this one based on clif_parse_cashshop_open_request ACMD_FUNC(opencashshop) { if (sd->state.cashshop_open) { clif_displaymessage(fd, "Cash Shop has been opened"); retrun -1; } sd->state.cashshop_open = true; sd->npc_shopid = -1; // Set npc_shopid when using cash shop from "cash shop" button [Aelys|Susu] bugreport:96 clif_cashshop_open( sd ); } ACMD_DEF(opencashshop),
  9. cap it to the desired value, use min or max or cap_value function
  10. - script Card Trader -1,{ getinventorylist; for([email protected] = 0; [email protected] < @inventorylist_count; [email protected]++) { // check if this item type in inventory list is card if (getiteminfo(@inventorylist_id[[email protected]], 2) == 6) { // if it a card put in the list [email protected]_list[[email protected]_size] = @inventorylist_id[[email protected]]; [email protected]_size++; } } mes [email protected]_name$ = "[Card Trader]"; mes "I can exchange 10 card to an Old Card Album"; mes "Each card need to be different from each other"; mes "Not accepting more than one of same card"; if ([email protected]_size < 9) close; // don't have 9 different card close. don't continue next; for ([email protected] = 0; [email protected] < 9; [email protected]++) // 10 cards from the list. delitem [email protected]_list[[email protected]], 1; // delete a card from each card getitem 616, 1; // 1x Old_Card_Album mes [email protected]_name$; mes "Thanks for the exchange"; close; } Hope this can help you.
  11. oh, sorry about short answer
  12. " if your rate is anything above 80% itll only return 80% " isn't this same with cap value ? that should be included in code above when updating entry, in example wearing 2 garm card ? here the rate minimum is -100% and maximum is 80% it.rate = cap_value(it.rate + rate, -10000, 8000); when creating new entry, the first garm card, expalanation same with above entry.rate = cap_value(rate, -10000, 8000); try it in your local server or i didn't really get it what are you talking about.
  13. I want to collect item unique id from OnSellItem since it came out as string in script.cpp i can't make it work in npc.cpp
  14. make an entry for your robe item in data\luafiles514\lua files\transparentItem\transparentItem.lub
  15. you need to edit 2 place in that place the first one for when entry is edited, the second one is when new entry created, capped into 8000 (80%) for SC_FREEZE, better use SC_FREEZE instead 1 for comparison, so it will human readable for (auto &it : effect) { if (it.sc == sc && it.flag == flag) { if (sc == SC_FREEZE) it.rate = cap_value(it.rate + rate, -10000, 8000); else it.rate = cap_value(it.rate + rate, -10000, 10000); it.arrow_rate += arrow_rate; it.duration = umax(it.duration, duration); return; } } struct s_addeffect entry = {}; if (rate < -10000 || rate > 10000) ShowWarning("pc_bonus_addeff: Item bonus rate %d exceeds -10000~10000 range, capping.\n", rate); entry.sc = sc; if (sc == SC_FREEZE) entry.rate = cap_value(rate, -10000, 8000); else entry.rate = cap_value(rate, -10000, 10000); entry.arrow_rate = arrow_rate; entry.flag = flag; entry.duration = duration; effect.push_back(entry);
  16. you can try use this one, ref: https://rathena.org/board/topic/112186-faw-enchant-error-script/ moc_para01,179,27,0 script Valkyrie#FAWEnchant 403,{ disable_items; mes [email protected]_name$ = "[^AA0000Valkyrie^000000]"; mes "I am here to enchant the", "magnificent ^000099Fallen Angel Wing^000000.", "Would you like to enchant yours?"; next; [email protected]$ = select("Information:Enchant Fallen Angel Wing:Reset Enchantment"); switch([email protected]$) { default: case 1: break; case 2: callsub S_Check; [email protected] = getequiprefinerycnt(EQI_GARMENT); [email protected][0] = getequipcardid(EQI_GARMENT,0); [email protected][1] = getequipcardid(EQI_GARMENT,1); [email protected][2] = getequipcardid(EQI_GARMENT,2); [email protected][3] = getequipcardid(EQI_GARMENT,3); // Check if enchantment slot is full here, do no need to continue if full. if([email protected][1] && [email protected][2] && [email protected][3]) { mes [email protected]_name$, "Hmm.. it seems that all", "slots have already been enchanted."; close; } if (([email protected][1] && [email protected][2] && ([email protected] < 7)) || ([email protected][1] && [email protected][2] && [email protected][3] && ([email protected] < 9))) { mes [email protected]_name$, "Sorry, but your", "^000099Fallen Angel Wing^000000's", "refinement level is too", "low to continue"; close; } if ([email protected] > 8) [email protected]_count = 3; else if ([email protected] > 6 && [email protected] < 9) [email protected]_count = 2; else [email protected]_count = 1; mes [email protected]_name$; mes "You have a ^000099+"[email protected]+" Fallen Angel Wing^000000.", "It can have a total of "[email protected]_count+" enchantment"+([email protected]_count > 1? "s.":".")+" Please"; mes "select your preferred enchantment."; next; [email protected]$ = ""; for ([email protected] = 0; [email protected] < getarraysize(.enchant_type$); [email protected]++) [email protected]$ = [email protected]$ + .enchant_type$[[email protected]]+":"; [email protected] = select([email protected]$); [email protected]_stat = getd(".enc"[email protected]+"["+callsub(S_ChanceType, .chance_type, [email protected][1], [email protected][2], [email protected][3])+"]"); if(.enchant_cost) { if(Zeny < .enchant_cost) { mes [email protected]_name$, "You don't have enough zeny."; close; } Zeny -= .enchant_cost; } delitem2 2589, 1, 1, [email protected], 0, [email protected][0], [email protected][1], [email protected][2], [email protected][3]; if([email protected][1]) [email protected][1] = [email protected]_stat; else if([email protected][2] && [email protected] > 6) [email protected][2] = [email protected]_stat; else if([email protected][3] && [email protected] > 8) [email protected][3] = [email protected]_stat; getitem2 2589, 1, 1, [email protected], 0, [email protected][0], [email protected][1], [email protected][2], [email protected][3]; mes [email protected]_name$, "Your ^000099Fallen Angel Wing^000000 has", "been enchanted with ^000099"+getitemname([email protected]_stat)+"^000000."; close; case 3: callsub S_Check; mes [email protected]_name$, "This will cost you "+callfunc("F_InsertComma", .reset_cost)+"z.", "Are you sure?"; next; select("Yes"); mes [email protected]_name$; if(Zeny < .reset_cost) { mes "You don't bring enough zeny."; close; } Zeny -= .reset_cost; [email protected] = getequiprefinerycnt(EQI_GARMENT); [email protected][0] = getequipcardid(EQI_GARMENT,0); [email protected][1] = getequipcardid(EQI_GARMENT,1); [email protected][2] = getequipcardid(EQI_GARMENT,2); [email protected][3] = getequipcardid(EQI_GARMENT,3); delitem2 2589, 1, 1, [email protected], 0, [email protected][0], [email protected][1], [email protected][2], [email protected][3]; getitem2 2589, 1, 1, [email protected], 0, [email protected][0], 0, 0, 0; mes "Your ^000099Fallen Angel Wing^000000's", "enchantments have been reset."; equip 2589; // didn't know it will work while npc set disable_items specialeffect2 261; specialeffect2 119; close; } mes [email protected]_name$, "I can enchant your", "^000099Fallen Angel Wing^000000 for", (.enchant_cost ? callfunc("F_InsertComma",.enchant_cost)+"z":"free")+" to give it various.", "effects. In fact, I can do it", "twice if its refinement level is", "+7 ~ +8, and thrice if its", "+9 and above."; next; mes [email protected]_name$, "The 3rd enchantment has a", "chance to be more powerful", "than the first two."; next; mes [email protected]_name$, "There is no chance to", "fail, so enchant away", "as much as you like."; next; mes [email protected]_name$, "But if you're not happy", "with the results, you can", "reset the enchantments", "for ^009900"+callfunc("F_InsertComma",.reset_cost)+"z^000000."; next; mes [email protected]_name$, "That's about everything."; close; S_Check: if (getequipid(EQI_GARMENT) != 2589) { mes [email protected]_name$; mes "Please equip your", "^000099Fallen Angel Wing^000000 if", "you want to have it enchanted."; close; } return; S_ChanceType: switch(getarg(0)) { case 1: //Decreasing Chance of Enchantment //60% low, 30% mid, 10% high for 1st & 2nd enchant slot //40% low, 30% mid, 20% high, 10% special for 3rd enchant slot [email protected] = rand(1,10); if(getarg(2) && getarg(3)) { //For 3rd & 4th Card Slot aka 2nd & 3rd Enchant Slot if ([email protected] < 5 ) [email protected] = 0; else if ([email protected] < 7) [email protected] = 1; else if ([email protected] < 9) [email protected] = 2; else [email protected] = 3; } else { //For 2nd Card slot aka 1st Enchant Slot if ([email protected] < 7) [email protected]=0; else if ([email protected] < 10) [email protected] = 1; else [email protected] = 2; } return [email protected]; case 0: if(getarg(2) && getarg(3)) return rand(0,3); else return rand(0,2); } OnInit: setarray .enchant_type$, "Fighting Enchant", "Magic Enchant", "Archer Enchant", "Critical/Fatal Enchant", "Max HP Enchant", "Max SP Enchant", "ASPD Enchant", "STR Enchant","AGI Enchant", "DEX Enchant", "VIT Enchant","INT Enchant","LUK Enchant"; setarray .enc1[0], 4809,4808,4820, 4821; //Fighting 3~5 setarray .enc2[0], 4812,4826,4827, 4828; //Magic 4~6 setarray .enc3[0], 4832,4833,4834, 4835; //Expert Arc 1~3 setarray .enc4[0], 4863,4864,4865, 4866; //Fatal 1~3 setarray .enc5[0], 4861,4862,4867, 4868; //MHPP 1~3% setarray .enc6[0], 4870,4800,4871, 4801; //MaxSP 25,50,75 setarray .enc7[0], 4869,4872,4873, 4807; //ASPD 1~3 // setarray .enc7[0], 4869,4872,4873, 4881; //ASPD 1~3 setarray .enc8[0], 4702,4703,4704, 4853; //STR 3~5 | Special Str setarray .enc9[0], 4731,4732,4733, 4854; //AGI 2~4 setarray .enc10[0], 4722,4723,4724, 4857; //DEX 3~5 setarray .enc11[0], 4742,4743,4744, 4855; //VIT 3~5 setarray .enc12[0], 4712,4713,4714, 4856; //INT 3~5 setarray .enc13[0], 4752,4753,4754, 4858; //LUK 3~5 // 1 = 60% low, 30% mid, 10% high for 1st & 2nd enchant slot && 40% low, 30% mid, 20% high, 10% special for 3rd enchant slot // 0 = Equal Chance .chance_type = 0; //Cost for Enchanting. It's free in iRO .enchant_cost = 1000000; //Cost to reset | Costs 1Mz in iRO .reset_cost = 5000000; end; }
  17. you can emulate achievement_get_reward from achievement.cpp
  18. for map you can set it in data\luafiles514\lua files\navigation\navi_map_krpri.lub
  19. no it isn't, well you can integrate it into gepard by requesting functor, this mod is hooking into client and modified some part of client function.
  20. no is out dated, for now mapflag has been simplified (click here for more info), if you want the same thing with the guide tutorial, now you can do it by following this add in src/map/map.hpp MF_YOUR_MAPFLAG, before MF_MAX add in src/map/script_constant.hpp export_constant(MF_YOUR_MAPFLAG); after export_constant(MF_SKILL_DURATION);
  21. of course not, i am still one of them :wub: i was making some event treasure hunter, where the player need to break the lock by input serial code number on treasure there is 3 tries for every player, but i was stunted when there is still a player that in process breaking the code, but the treasure have been unlocked by another so the other shouldn't have access on the treasure anymore, btw I am using thanatos tower code guessing.
  22. I just want to override the mes if the states of the npc is no longer available without conditional check, but there is warning pop up on map-server console. while setting state on variable to not longer available can do this it need extra check every continuation, but if there is multiple next or while on the script, it need multiple check after it, so how can I do it the clean or right way ?? protnera,230,273,0 script test override 112,{ attachnpctimer; initnpctimer; while(1) { mes "You are talking to this npc"; next; select("-Yes"); } close; OnTimer15000: detachnpctimer; mes "15 Seconds have passed."; close; } warning pop up on map-server console [Warning]: Unable to restore stack! Double continuation! [Debug]: Previous script (lost): [Debug]: Source (NPC): test override at prontera (230,273) [Debug]: Current script: [Debug]: Source (NPC): test override at prontera (230,273)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.