Jump to content

kalabasa

Members
  • Content Count

    11
  • Joined

  • Last visited


Reputation Activity

  1. Like
    kalabasa reacted to AnnieRuru in Cluckers npc/custom/events   
    need to stretch my scripting skills a little bit, too long since I done any scripting
     
    https://gist.github.com/AnnieRuru/4a87e0ab7451e671d0e3056aedd2a086
  2. Like
    kalabasa reacted to Dastgir in [Event] Easter Egg Hunt - HAPPY EASTER HERCULES!   
    Little Optimization:
    http://upaste.me/87eb7a (Used Loops and added proper intents)
    Hope you don't mind my edits @@Aeromesi
  3. Like
    kalabasa reacted to Aeromesi in [Event] Easter Egg Hunt - HAPPY EASTER HERCULES!   
    Updated.

    You can download it from the topic-start or from my Github.

    Optimized and fixed a small bug.
    Reduced 32kb to 19kb <:

    https://github.com/Aeromesi/AeromesiCodes/blob/master/Scripts/customnpc/egg_hunt_event.txt

    EDIT: Never noticed Dastgirs comment, our scripts are basically the same. xD Smh...
  4. Upvote
    kalabasa reacted to AnnieRuru in NPC with a Promo Code   
    hmm .. then how do the official server actually preventing players from using the SAME promotion code for multiple accounts ?
    because when I was fixing the script on rathena forum... I already noticed this
    1. each account can only clam once
    2. each IP can only claim once <-- not safe
    3. use *getitembound ... ok I have no objection
    so I can abuse the system with,
    1. after I got a promotion code, that can claim 10 times,
    2. login an account, claim once ....
    3. logout the game, restart the modem, shuffle your IP address
    4. login another account, claim again
    repeat 10 times
    ok, let's say generate 100 different codes for 100 different donors... so they can use each code only once (limit 100 times)
    means generating 100 different codes for each player ... this only makes the GMs confused which code has been used b4 ...
    instead give out some gibberish word that you have sure which code is available, why not just give the item to them by let the player click on the npc ?
    unless I can clear out these doubts, I'm not going to make this scripts ... seems exploitable ...
    or maybe someone who actually has used this system b4, know how this system works, release a script for it so I can take a peek ...
    because all the promotion npc on the forum(hercules/rathena) can be exploit in some way
    prontera,155,185,5 script Reward/Compensation 1_F_MARIA,{ if ( #Compensation_June2018 ) { mes "you have claimed compensation"; close; } mes "We apologize for blah blah blah"; mes "so I give you a candy"; if ( !checkweight(Candy,1) ) { mes "hahaha you don't even has enough space to claim a candy hahaha"; close; } getitembound Candy, 1, 1; #Compensation_June2018 = 1; close; OnInit: OnHour00: if ( gettime(GETTIME_MONTH) == JUNE && gettime(GETTIME_DAYOFMONTH) >= 9 && gettime(GETTIME_DAYOFMONTH) <= 15 ) enablenpc strnpcinfo(0); else disablenpc strnpcinfo(0); end; } for me its a simple script ...
    but now you actually struct me with an idea to actually write one that can configure the time and the prize given.......
  5. Upvote
    kalabasa reacted to AnnieRuru in Castle Guild Member Limit   
    oh ok, you are partially right when it kick excess guild members
    but it isn't the way you claimed that it count from other guild members
     
    upon close inspection, @astralprojection script has 2 problems which is
    1. if the player has multiple characters from the same account join the same guild, it count multiple times instead of 1, it doesn't extend the isloggedin into $@guildmembercid check
    2. it checks as long as the guild member enter ANY CASTLE map, not that particular castle map
     
    try this one
    https://gist.github.com/AnnieRuru/339e268a8be5370fa7ae1aa2f856ca28
  6. Upvote
    kalabasa reacted to Arduino in Random Enchant   
    Im not really sure what you want, but i understood that you wanted the enchantment to be random instead of it to be selected in a list.
    I had made here a modification on line 47 making it random instead of selecting it from the list.
    mes .n$; mes "Hello, "+strcharinfo(0)+"!"; mes "If you like I can enchant your costume equipment with any enchantment I have in store"; mes ( (.exchange_cost[0] > 0)?"in exchange for "+.enchant_cost[1]+"x "+getitemname(.enchant_cost[0]):"for free")+"."; mes "I can also reset an Enchantment "+ ((.enchant_reset[0] > 0)?", but I require "+.enchant_reset[1]+"x "+getitemname(.enchant_reset[0]):"for free")+"."; next; switch(select("- Enchant Costumes:- Reset Enchantment:- Nevermind")) { case 1: mes .n$; mes "Please select the Costume you want me to enchant:"; for ( set .@s,0; .@s < getarraysize(.enchant_slot); set .@s,.@s + 1) { switch(.enchant_slot[.@s]) { case EQI_COSTUME_HEAD_TOP: set .@c_slot$,"Top Headgear"; break; case EQI_COSTUME_HEAD_MID: set .@c_slot$,"Mid Headgear"; break; case EQI_COSTUME_HEAD_LOW: set .@c_slot$,"Low Headgear"; break; case EQI_COSTUME_GARMENT: set .@c_slot$,"Garment"; break; case EQI_SHADOW_ARMOR: set .@c_slot$,"Armor"; break; case EQI_SHADOW_WEAPON: set .@c_slot$,"Weapon"; break; case EQI_SHADOW_SHIELD: set .@c_slot$,"Shield"; break; case EQI_SHADOW_SHOES: set .@c_slot$,"Shoes"; break; case EQI_SHADOW_ACC_R: set .@c_slot$,"Accessory Right"; break; case EQI_SHADOW_ACC_L: set .@c_slot$,"Accessory Left"; break; } set .@c_m$,.@c_m$ + ((getequipid(.enchant_slot[.@s]) != -1)?.@c_slot$ + " - "+getitemname(getequipid(.enchant_slot[.@s])):"") + ( (.enchant_slot[.@s+1] != 0)?":":""); } set .@c_m$,.@c_m$ + ":- Cancel"; set .@c,select(.@c_m$); if(.@c >= getarraysize(.enchant_slot)) close; set .@part,.enchant_slot[.@c-1]; next; mes .n$; if(getequipid(.@part) == -1) { mes "It looks like you don't have any costume equipped on there."; close; } set .@hg,getequipid(.@part); // Saving Item ID set .@ref,getequiprefinerycnt(.@part); // Saving Refine Level, if there is one set .@card1,getequipcardid(.@part,0); // Save Item ID of Card Slot 1 mes "Selected Costume: "+getitemname(getequipid(.@part)); if(getequipcardid(.@part,3) != 0) { mes "But it looks like you already have an enchantment in this costume."; close; } mes "Now please select the Enchantment:"; next; set .@rune,rand(0, getarraysize(.enchant_id) - 1); mes .n$; mes "Selected Enchantment: "+getitemname(.enchant_id[.@rune]); if(.enchant_cost[0] > 0 && countitem(.enchant_cost[0]) < .enchant_cost[1]) { mes "But it looks like you don't have enough "+getitemname(.enchant_cost[0])+"!"; close; } mes "Proceed?"; if(select("- Yes:- No") - 1) close; next; if(.enchant_cost[0] > 0) delitem .enchant_cost[0],.enchant_cost[1]; delequip .@part; getitem2 .@hg,1,1,.@ref,0,.@card1,0,0,.enchant_id[.@rune]; equip .@hg; mes .n$; mes "The enchantment was a success."; mes "See ya next time."; enable_items; break; case 2: mes .n$; mes "Please select the Costume you want me to reset the enchantment!"; for ( set .@s,0; .@s < getarraysize(.enchant_slot); set .@s,.@s + 1) { switch(.enchant_slot[.@s]) { case EQI_COSTUME_HEAD_TOP: set .@c_slot$,"Top Headgear"; break; case EQI_COSTUME_HEAD_MID: set .@c_slot$,"Mid Headgear"; break; case EQI_COSTUME_HEAD_LOW: set .@c_slot$,"Low Headgear"; break; case EQI_COSTUME_GARMENT: set .@c_slot$,"Garment"; break; case EQI_SHADOW_ARMOR: set .@c_slot$,"Armor"; break; case EQI_SHADOW_WEAPON: set .@c_slot$,"Weapon"; break; case EQI_SHADOW_SHIELD: set .@c_slot$,"Shield"; break; case EQI_SHADOW_SHOES: set .@c_slot$,"Shoes"; break; case EQI_SHADOW_ACC_R: set .@c_slot$,"Accessory Right"; break; case EQI_SHADOW_ACC_L: set .@c_slot$,"Accessory Left"; break; } set .@c_m$,.@c_m$ + ((getequipid(.enchant_slot[.@s]) != -1)?.@c_slot$ + " - "+getitemname(getequipid(.enchant_slot[.@s])):"") + ( (.enchant_slot[.@s+1] != 0)?":":""); } set .@c_m$,.@c_m$ + ":- Cancel"; set .@c,select(.@c_m$); if(.@c >= getarraysize(.enchant_slot)) close; set .@part,.enchant_slot[.@c-1]; next; mes .n$; if(getequipcardid(.@part,3) == 0) { mes "It looks like you don't have any enchantment in this costume."; close; } set .@hg,getequipid(.@part); // Saving Item ID set .@ref,getequiprefinerycnt(.@part); // Saving Refine Level, if there is one set .@card1,getequipcardid(.@part,0); // Save Item ID of Card Slot 1 mes "Selected Costume: "+getitemname(getequipid(.@part)); if(.enchant_reset[0] > 0 && countitem(.enchant_reset[0]) < .enchant_reset[1]) { mes "But you don't have the required Items to reset the enchantment!"; close; } mes "Proceed?"; if(select("- Yes:- No") - 1) close; next; if(.enchant_reset[0]) delitem .enchant_reset[0],.enchant_reset[1]; delequip .@part; getitem2 .@hg,1,1,.@ref,0,.@card1,0,0,0; equip .@hg; mes .n$; mes "The enchantment has been reseted."; mes "See ya next time."; break; case 3: break; } end; OnInit: set .n$,"[Costume Enchanter]"; // Enter here every Costume Slot, which you want to be enchantable // Valid Entries: // - EQI_COSTUME_HEAD_TOP // - EQI_COSTUME_HEAD_MID // - EQI_COSTUME_HEAD_LOW // - EQI_COSTUME_GARMENT // - EQI_SHADOW_ARMOR // - EQI_SHADOW_WEAPON // - EQI_SHADOW_SHIELD // - EQI_SHADOW_SHOES // - EQI_SHADOW_ACC_R // - EQI_SHADOW_ACC_L setarray .enchant_slot[0],EQI_COSTUME_HEAD_TOP,EQI_COSTUME_HEAD_MID,EQI_COSTUME_HEAD_LOW; // Enchantment ID's setarray .enchant_id[0],6636,6637,6638,6639,6640,6641; // Price for enchanting: // To disable the price, put 0 as values setarray .enchant_cost[0],501,10; // Item ID,Amount // Price for reseting: // To disable the price, put 0 as values setarray .enchant_reset[0],501,10; // Item ID,Amount end; } If you can be more specific of what do you need maybe i can help you further. If you dont know how to say it you can use the help of google translate
  7. Upvote
    kalabasa reacted to Pandaaa in [Event] Stop the Clock Request   
    I Found a script made from eathenaa... anyone can make it work for herc?
     
    prontera,156,122,4 script Stop the Clock 102,{ if(.game == 1 && stopped != 1) { set stopped, 1; set @stopped, .i; message strcharinfo(0), "You stopped the clock at "+@stopped+"."; if(.lowest > @stopped) { set .lowest, @stopped; set .winner$, strcharinfo(0); } end; } else if(.game == 1) { message strcharinfo(0), "You already stopped the clock."; end; } set .name$, "[Event Manager]"; set .menu$, "Times:Information:Price:Leave"; if(strcharinfo(0) == .winner$) { set stopped, 0; mes .name$; mes "Here you get your price."; mes "Your Price is:"; mes "^ff0000"+$prize_amount+" "+getitemname($prize_id)+"^000000"; getitem $prize_id, $prize_amount; set .winner$, ""; close; } if(stopped == 1) { set stopped, 0; mes .name$; mes "You activated your char for the next round."; close; } if(getgmlevel() > 60) set .menu$, .menu$ + ":StartGame:SetPrice"; mes .name$; mes "Welcome to the ^ff0000Stop the Clock^000000."; next; switch(select(.menu$)) { case 1: mes .name$; mes "^ff0000Stop the Clock^000000 starts each day at:"; mes "^00800015:00^000000, ^00800018:00^000000 and ^00800021:00^000000 o'clock."; close; case 2: mes .name$; mes "^ff0000Stop the Clock^000000"; mes "is a game where you need to"; mes "click on me exactly when the counter reached 0."; next; mes .name$; mes "It counts down from ^0080001000^000000 to ^ff00000^000000."; next; mes .name$; mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000."; next; mes .name$; mes "The winner will recieve a prize."; mes "^ff0000Don't forget to talk to me after the Event is over,"; mes "to reset your counter to take part on the next event.^000000"; close; case 3: mes .name$; mes "The Price is:"; mes "^ff0000"+$prize_amount+" "+getitemname($prize_id)+"^000000"; close; case 4: close; case 5: sleep2 100; close2; goto l_start; end; case 6: mes .name$; mes "Enter the item id of the prize:"; input $prize_id; next; mes .name$; mes "Enter the amount if items the winner will recieve:"; input $prize_amount; next; mes .name$; mes "The price id is: ^ff0000"+$prize_id+"^000000"; mes "^008000("+getitemname($prize_id)+")^000000."; mes "The amount is: ^ff0000"+$prize_amount+"^000000."; close; } OnClock1500: OnClock1800: OnClock2100: l_start: announce "[Aline]: We are going to start an Stop the Clock Event in 1 Minute at Prontera!",bc_all; sleep2 30000; announce "[Aline]: We are going to start in 30 Seconds!",bc_all; sleep2 20000; announce "[Aline]: Hurry up! Event starts in 10 Seconds!",bc_all; sleep2 5000; announce "[Aline]: Get Ready only 5 seconds left!",bc_all; sleep2 5000; announce "[Aline]: START!!!",bc_all; sleep2 5000; set .winner$, ""; set .game, 1; set .lowest, 1000; for(set .i, 1000; .i > 300;set .i, .i - 100) { announce ":: "+.i+" ::",bc_blue|bc_area; misceffect 377; sleep2 1000; } for(set .i, 300; .i > 50;set .i, .i - 10) { announce ":: "+.i+" ::",bc_blue|bc_area; misceffect 377; sleep2 100; } for(set .i, 50; .i > 0;set .i, .i - 1) { announce ":: "+.i+" ::",bc_blue|bc_area; misceffect 377; sleep2 10; } set .game, 0; if(.winner$ == "") { announce "Nobody hit the clock at the right moment. There is no winner.",bc_blue; end; } announce .winner$+" won Stop the Clock. He stopped it at "+.lowest+".",bc_blue; sleep2 5000; announce .winner$+"Please talk to me to get your price.",bc_blue; sleep2 5000; announce "To activate your char for the next round, please talk to me, too.",bc_all; end; }  
  8. Upvote
    kalabasa reacted to bWolfie in FCP debuff Strip   
    Yup it seems this may be official behavior...it is silly though isn't it. A former dev on my server fixed this for me. If I recall, another issue is if you don't have an item equipped in that area, the skill Chemical Protection cannot be cast.
     
    I'm sure he wouldn't mind me sharing this here. Hopefully...
    Can't guarantee it will work or if all the code is the same as this was from an old revision.
     
    1. Open skill.c
    - Find:
             case AM_CP_ARMOR:          case AM_CP_HELM:          {             unsigned int equip[] = { EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP };             int index;             if ( sd && (bl->type != BL_PC || (dstsd && pc->checkequip(dstsd, equip[skill_id - AM_CP_WEAPON]) < 0) ||                 (dstsd && equip[skill_id - AM_CP_WEAPON] == EQP_SHIELD && pc->checkequip(dstsd, EQP_SHIELD) > 0                 && (index = dstsd->equip_index[EQI_HAND_L]) >= 0 && dstsd->inventory_data[index]                 && dstsd->inventory_data[index]->type != IT_ARMOR)) ) {                  clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);                  map->freeblock_unlock(); // Don't consume item requirements                  return 0;              }              clif->skill_nodamage(src, bl, skill_id, skill_lv,              break;          }          case AM_TWILIGHT1:  Replace with:
             case AM_CP_ARMOR:          case AM_CP_HELM:          {             if ( sd && (bl->type != BL_PC ) ) {                  clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);                  map->freeblock_unlock(); // Don't consume item requirements                  return 0;              }              clif->skill_nodamage(src, bl, skill_id, skill_lv,             sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));             if (tsc->data[SC_PROTECTWEAPON])                 status_change_end(bl, SC_NOEQUIPWEAPON, INVALID_TIMER);             if (tsc->data[SC_PROTECTSHIELD])                 status_change_end(bl, SC_NOEQUIPSHIELD, INVALID_TIMER);             if (tsc->data[SC_PROTECTARMOR])                 status_change_end(bl, SC_NOEQUIPARMOR, INVALID_TIMER);             if (tsc->data[SC_PROTECTHELM])                 status_change_end(bl, SC_NOEQUIPHELM, INVALID_TIMER);              break;          }          case AM_TWILIGHT1:  2. Then find:
             // Full Chemical Protection          case CR_FULLPROTECTION:          {             unsigned int equip[] = { EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP };              int i, s = 0, skilltime = skill->get_time(skill_id, skill_lv);              for ( i = 0; i < 4; i++ ) {                 if ( bl->type != BL_PC || (dstsd && pc->checkequip(dstsd, equip[i]) < 0) )                      continue;                 if ( dstsd && equip[i] == EQP_SHIELD ) {                     short index = dstsd->equip_index[EQI_HAND_L];                     if ( index >= 0 && dstsd->inventory_data[index] && dstsd->inventory_data[index]->type != IT_ARMOR )                         continue;                 }                  sc_start(src, bl, (sc_type)(SC_PROTECTWEAPON + i), 100, skill_lv, skilltime);                  s++;              }              if ( sd && !s ) {  And replace with:
             // Full Chemical Protection          case CR_FULLPROTECTION:          {              int i, s = 0, skilltime = skill->get_time(skill_id, skill_lv);              for ( i = 0; i < 4; i++ ) {                 if ( bl->type != BL_PC )                      continue;                  sc_start(src, bl, (sc_type)(SC_PROTECTWEAPON + i), 100, skill_lv, skilltime);                 status_change_end(bl, (sc_type)(SC_NOEQUIPWEAPON + i), INVALID_TIMER);                  s++;              }              if ( sd && !s ) {
  9. Upvote
    kalabasa reacted to Easycore in [Guide] How to add items to bNoGemStone   
    [Guide] How to add items to bNoGemStone
     
    Hi guys, I have made this little guide for those who want add items such as Element Stones (Ninja Skills) or Wind of Verdure, Red Blood, etc (Sage Skills).
     
     
    Step 1:
     
    Open itemdb.h and find this:
     

     
    So, add this after:
     

     
    ITEMID_STONE_FLAME, ITEMID_STONE_ICE, etc, correspond to Element Stone items (IDs 7521, 7522, 7523, 7524).
     
     
    Step 2:
     
    Again in itemdb.h find this:
     

     
    And replace Line 524 (which is shown in the picture), with this:
     

     
    #define itemid_isgemstone(n)     ((n) >= ITEMID_YELLOW_GEMSTONE && (n) <= ITEMID_BLUE_GEMSTONE || (n) >= ITEMID_STONE_FLAME && (n) <= ITEMID_STONE_SHADOW)
     
    >=ITEMID_STONE_FLAME && (n) <=ITEMID_STONE_SHADOW It refers that covers between ITEMID_STONE_FLAME and ITEMID_STONE_SHADOW,
    it mean that,
    ITEMID_STONE_FLAME           = 7521, // Start Here ITEMID_STONE_ICE             = 7522, ITEMID_STONE_WIND            = 7523, ITEMID_STONE_SHADOW          = 7524, // End Here   In the case that you want add existent items in itemdb.h,  such as:     (Needed to Endow Skills), use the method above.   Finally compile the emulator.         Remember that this only affect "bonus bNoGemStone" (Mistress Card effect)    Regards   
  10. Upvote
    kalabasa reacted to AnnieRuru in About the mushroom_event   
    OnMinute40: if (mobcount(.Map$, strnpcinfo(0)+"::OnMobKilled") == 0) end; killmonster .Map$, strnpcinfo(0)+"::OnMobKilled"; announce "All left over mushroom has been removed", bc_all; end;  
    I don't use rAthena but should work
×
×
  • Create New...

Important Information

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