Litro Endemic

Members
  • Content Count

    164
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

  • Days Won

    4

Litro Endemic last won the day on May 31

Litro Endemic had the most liked content!

Community Reputation

29 Excellent

4 Followers

About Litro Endemic

  • Rank
    Poporing
  • Birthday 10/27/1991

Profile Information

  • Gender
    Male
  • Location
    Indonesia

Contact Methods

Recent Profile Visitors

1,978 profile views
  1. - 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.
  2. thanks a lot for this one @sader1992
  3. oh, sorry about short answer
  4. " 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.
  5. 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
  6. make an entry for your robe item in data\luafiles514\lua files\transparentItem\transparentItem.lub
  7. 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);
  8. you can use ACT Editor
  9. 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; }
  10. you can emulate achievement_get_reward from achievement.cpp
  11. for map you can set it in data\luafiles514\lua files\navigation\navi_map_krpri.lub
  12. 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.
  13. 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);
  14. 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.
  15. 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)