Jump to content

Garr

Members
  • Content Count

    482
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Upvote
    Garr got a reaction from ZelosAvalon in Npc Quest Script   
    gonryun,37,22,0  script  Valkyrie Crafter  811,{mes "[Valkyrie Crafter]";mes "Oh! A visitor. That's so rare!";mes "Welcome to the portal to God's";mes "Relm. I'm the guardian of this place.";next;mes "[Wings Collector]";mes "What are you seeking stranger? The";mes "words of God himself?";mes "Or are you interested in my special";mes "crafting abilities?";next;switch(select("Yeah, I'd like to hear God's voice:So, what can you craft axactly?:That's very interesting but I have to go.")){  case 1:    mes "[Valkyrie Crafter]";    mes "Oh, so you want to hear God's";    mes "voice.";    mes "Well, only angels can hear him. Are";    mes "you an angel?";    next;    mes "[Valkyrie Crafter]";    mes "Mmm, no. You don't seem to";    mes "propagate any Holy Waves of the Angels.";    mes "I'm sorry buy you won't be able to";    mes "hear him today.";    mes "Maybe if you become an angel one";    mes "day.";    next;    mes "[Valkyrie Crafter]";    mes "In this case, I wish you a good day";    mes "traveler!";    close;  case 2:    mes "[Valkyrie Crafter]";    mes "I'm the finest crafter of heaven.";    mes "I can make wings that are completely";    mes "out of this world.";    next;    mes "[Valkyrie Crafter]";    mes "My Finest work consist of crafting";    mes "elemental wings from normal wings.";    mes "It's like refining existing wings";    mes "if you prefer.";    mes "You simply need to hand me the";    mes "elements that i need to do them.";    next;    mes "[Valkyrie Crafter]";    mes "Oh! There is however a little";    mes "special request I would have to ask";    mes "you before starting doing any";    mes "crafting.";    next;    mes "[Valkyrie Crafter]";    mes "I'm a big lover of rare precious";    mes "stones. They're a real source of";    mes "inspiration to me!";    mes "So, for any wings you want me to";    mes "craft, could you please bring me at";    mes "least 10 of each of those ores:";    next;    mes "[Valkyrie Crafter]";    mes "10 Ruby";    mes "10 Sapphire";    mes "10 Topaz";    mes "10 Opal";    mes "10 Emerald";    mes "10 Amethyst";    mes "10 Aquamarine";    Main:    {    next;    mes "[Valkyrie Crafter]";    mes "So what wings would you like me to";    mes "craft for you ?";    next;    switch(select("Artic wings:Nothing for now, thank you.")){      case 1:        mes "[Valkyrie Crafter]";        mes "Those water element wings are said";        mes "to provide extra knowledge about";        mes "the world we live in.";        mes "Ok, i'll need the following:";        next;        mes "[Valkyrie Crafter]";        mes "1x Angel Wings";        mes "25x Mystic Frozen";        mes "10x Frozen Rose";        mes "50x Ice Cubic";        mes "And 100 gold for the crafting";        mes "services";        next;        mes "[Valkyrie Crafter]";        mes "So, do you want me to make them now?";        switch(select("Sure,I got all the items!:Mm, can I choose another wings?:No, I don't have all the items yet...")){        case 1:          {            if(countitem(8002) < 1 || countitem(995) < 25 || countitem(749) < 10 || countitem(7066) < 50 || countitem(969) < 100)            {              mes "[Valkyrie Crafter]";              mes "Mm, I'm sorry. It seems that some";              mes "items are missing";              mes "Please, feel free to come again";              mes "when you have everything.";              close;            }            if(countitem(719) < 10 || countitem(720) < 10 || countitem(721) < 10 || countitem(723) < 10 || countitem(726) < 10 || countitem(727) < 10 || countitem(728) < 10)            {              mes "[Valkyrie Crafter]";              mes "Oh! It seems that you didn't do the";              mes "most important task: that's to";              mes "bring to me all the precious stones";              mes "I requested.";              mes "They are my source of inspiration";              mes "and motivation. Without them,";              mes "I can't do your wings.";              next;              mes "[Valkyrie Crafter]";              mes "Come back when you have them please!";              close;            }            if(countitem(8002) >= 1 && countitem(995) >= 25 && countitem(749) >= 10 && countitem(7066) >= 50 && countitem(969) < 100 && countitem(719) >= 10 && countitem(720) >= 10 && countitem(721) >= 10 && countitem(723) >= 10 && countitem(726) >= 10 && countitem(727) >= 10 && countitem(728) >= 10)            {              mes "[Valkyrie Crafter]";              mes "It looks like you are missing some Gold.";              mes "Come back again, when you have 10 or more Gold.";              close;            }            if(countitem(8002) >= 1 && countitem(995) >= 25 && countitem(749) >= 10 && countitem(7066) >= 50 && countitem(969) >= 100 && countitem(719) >= 10 && countitem(720) >= 10 && countitem(721) >= 10 && countitem(723) >= 10 && countitem(726) >= 10 && countitem(727) >= 10 && countitem(728) >= 10)            {              mes "[Valkyrie Crafter]";              mes "Great! I'll start making them right now. Ok, just wait a few minutes please.";              next;              mes "[Valkyrie Crafter]";              mes "*waiting impatiently for the wings*";              next;              mes "[Valkyrie Crafter]";              mes "(15 minutes later)";              next;              mes "[Valkyrie Crafter]";              mes "Holy God! That's some great work I";              mes "just did! Here you go young";              mes "traveler.";              mes "Those are your Gargoyle Wings.";              delitem 719,10;              delitem 720,10;              delitem 721,10;              delitem 723,10;              delitem 726,10;              delitem 727,10;              delitem 728,10;              delitem 8002,1;              delitem 995,25;              delitem 749,10;              delitem 7066,50;              delitem 969,100;              next;              getitem 8005,1;              mes "[Valkyrie Crafter]";              mes "Bye and don't hesitate to come";              mes "back! Enjoy your new wings ^^";              close;            }          }        case 2:          {goto Main;}        case 3:          {          mes "[Valkyrie Crafter]";          mes "Very well. Good bye traveler and";          mes "please come back again!";          close;          }        }      case 2:      mes "[Valkyrie Crafter]";      mes "Very well. Good bye traveler and";      mes "please come back again!";      close;      }    }  case 3:  mes "[Valkyrie Crafter]";  mes "Very well. Good bye traveler and";  mes "please come back again!";  close;  }} You had logical AND instead of logical OR on missing items, so it'd work if he didn't meet every requirment only. And you need it to work if he meets at least one criteria :3
  2. Upvote
    Garr got a reaction from evilpuncker in script erorr : pet evo [help me plz]   
    Change
    for (set .@i = 0; .@i < @inventorylist_count; set .@i++ ) { into
    for (.@i = 0; .@i < @inventorylist_count; .@i++ ) {
  3. Upvote
    Garr got a reaction from Zirius in exclude specific buffs to be dispelled   
    Uhh, I think using db/sc_config.txt would be a tad easier ^_^'
  4. Upvote
    Garr got a reaction from evilpuncker in exclude specific buffs to be dispelled   
    Uhh, I think using db/sc_config.txt would be a tad easier ^_^'
  5. Upvote
    Garr got a reaction from Yoh Asakura in Soul Linker for all jobs   
    http://herc.ws/board/topic/2124-help-me-with-this-soul-linker-npc/#entry14328
     
    I thik this one should do.
  6. Upvote
    Garr got a reaction from milk in Homunculus name and rename   
    void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) {... // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true) WBUFB(buf,26)=(battle_config.hom_rename && hd->homunculus.rename_flag ? 0x1 : 0x0) | (hd->homunculus.vaporize == HOM_ST_REST ? 0x2 : 0) | (hd->homunculus.hp > 0 ? 0x4 : 0); WBUFW(buf,27)=hd->homunculus.level;... } The one on 26th offset;
    When battle_config.hom_rename is false, first expression is always false, so it always thinks that homun is NOT YET RENAMED.
    I'd replaced it with
    (battle_config.hom_rename?0:hd->homunculus.rename_flag) And now it works fine.
  7. Upvote
    Garr got a reaction from Lilystar in Homunculus name and rename   
    void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) {... // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true) WBUFB(buf,26)=(battle_config.hom_rename && hd->homunculus.rename_flag ? 0x1 : 0x0) | (hd->homunculus.vaporize == HOM_ST_REST ? 0x2 : 0) | (hd->homunculus.hp > 0 ? 0x4 : 0); WBUFW(buf,27)=hd->homunculus.level;... } The one on 26th offset;
    When battle_config.hom_rename is false, first expression is always false, so it always thinks that homun is NOT YET RENAMED.
    I'd replaced it with
    (battle_config.hom_rename?0:hd->homunculus.rename_flag) And now it works fine.
  8. Upvote
    Garr got a reaction from ShadowLight in Custom Mob   
    Did you edit this setting in src/map/mob.h? If not, then increase it and recompile, or decrease the id of mob to under 4000 :3
    // Change this to increase the table size in your mob_db to accommodate a larger mob database.// Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes.// Notice that the last 1000 entries are used for player clones, so always set this to desired value +1000#define MAX_MOB_DB 5000
  9. Upvote
    Garr got a reaction from iCORE in [Help] Cashpoints.php   
    Replace all
    .global_reg_value with one of the following:
    .acc_reg_num_db - account wide points, you probably want this.global_acc_reg_num_db - also account wide, but across all map/char servers if there are many Also, replace
    WHERE `str` with
    WHERE `key`  
    I think that should do it.
     
    ETA:
    For the last, where setting points first time
    if (!$this->cashRecords[$accountID]) { $sql = "INSERT INTO {$this->server->charMapDatabase}.global_reg_value "; $sql .= "(`str`, value, type, account_id, char_id) "; $sql .= "VALUES (?, 0, 2, ?, 0)"; $sth = $this->server->connection->getStatement($sql); $sth->execute(array($this->pointsType, $accountID)); } replace it with
    if (!$this->cashRecords[$accountID]) { $sql = "INSERT INTO {$this->server->charMapDatabase}.acc_reg_num_db "; $sql .= "(`key`, `value`, `account_id`) "; $sql .= "VALUES (?, 0, ?)"; $sth = $this->server->connection->getStatement($sql); $sth->execute(array($this->pointsType, $accountID)); }
  10. Upvote
    Garr got a reaction from Reins in Changelook Function   
    For that to work you need to edit the function itself.
    1) Replace end with return;
    That way it'll change cloth color for a sec, and then change hair color for a sec.
    2) If you need both at the same time you need to edit the function more, like this:
    function script ChangeStyle { changelook 7,getarg(0); changelook 6,getarg(2); dispbottom "Your cloth color has changed to "+getarg(0)+" and hair color to "+getarg(2); dispbottom "With a duration of a second, then your look will return to normal"; sleep2 1000; changelook 7,getarg(1); changelook 6,getarg(3); dispbottom "Your look has returned to normal."; end;} And, accordingly, change the call from item
    callfunc "ChangeStyle",554,getlook(7),264,getlook(6);
  11. Upvote
    Garr got a reaction from luis.seifert in Problem with endless tower quest   
    Find
    2@tower,355,138,0 duplicate(1FGate102tower) WARPNPCFGate102tower WARPNPC,2,2 Change to
    2@tower,355,138,0 duplicate(1FGate102tower) 45FGate102tower WARPNPC,2,2 Think someone was messing with auto-replacing 45 to WARPNPC and replaced an extra one right there.
  12. Upvote
    Garr got a reaction from Tio Akima in soundeffect()   
    So if you'll use
    clif->soundeffect(sd,&sd->bl,"teste.wav",0); it should play "datawavteste.wav".
  13. Upvote
    Garr got a reaction from vBrenth in Reject Swords reflect (max hp cap)   
    Just a question... why were you using ATTACKER'S HP then? You'd need to use target, and not src. Try this one:
     
    if(wd.damage && tsc && tsc->data[SC_SWORDREJECT] && (src->type!=BL_PC || ( ((TBL_PC *)src)->weapontype1 == W_DAGGER || ((TBL_PC *)src)->weapontype1 == W_1HSWORD || ((TBL_PC *)src)->status.weapon == W_2HSWORD )) && rnd()%100 < tsc->data[SC_SWORDREJECT]->val2 ) { ATK_RATER(50); wd.damage = min(status_get_max_hp(target),wd.damage); status_fix_damage(target,src,wd.damage,clif->damage(target,src,0,0,wd.damage,0,0,0)); clif->skill_nodamage(target,target,ST_REJECTSWORD,tsc->data[SC_SWORDREJECT]->val1,1); if( --(tsc->data[SC_SWORDREJECT]->val3) <= 0 ) status_change_end(target, SC_SWORDREJECT, INVALID_TIMER); }
  14. Upvote
    Garr got a reaction from vBrenth in Reject Swords reflect (max hp cap)   
    I'm sorry to break it to you, but if you'll use csnv's fix, it will only send packet to client showing minimized damage, yet the damage applied on server will be full...
    I think if you'll hit the attacker after you'll see what I mean.
     
    ETA: Yup, if you'll check it with monster that shows HP in () after name, you'll see what I mean. Easiest to test with quad tanee shoes stalker.
  15. Upvote
    Garr reacted to Dastgir in Duplicate NPC Commands   
    File Name: Duplicate NPC Commands
    File Submitter: Dastgir
    File Submitted: 12 Jan 2015
    File Category: Plugins
     
    2 Self Explanatory Commands:
    duplicatenpc("NpcName", "DuplicateName", "DupHiddenName", "map", x, y, dir{, sprite{, xs, ys}});duplicateremove({"NPCname"});
     
    Example Script:
    prontera,150,150,5 script DupTest 999,{mes strnpcinfo(0);close;OnInit:duplicatenpc(strnpcinfo(0),"Duplicated","","prontera",150,148,5,998);end;OnWhisperGlobal:duplicateremove();}
    ^ Above script will self-duplicate itself with name "Duplicated" to prontera,150,148 with Sprite ID 998, and upon whispering to any of those npc, the duplicate will be removed.
     
     
    Requested by GMOcean @ http://herc.ws/board/topic/7718-duplicatenpc-duplicateremove/?view=getnewpost
     
    Click here to download this file
  16. Upvote
    Garr got a reaction from Zirius in How to add name of Player who using Mixed Cooking to its produced food   
    conf/battle/items.conf
    // Do produced items have the maker's name on them? (Note 3)// 0x01: Produced Weapons// 0x02: Produced Potions// 0x04: Produced Arrows// 0x08: Produced Holy Water/Ancilla// 0x10: Produced Deadly Potions// 0x80: Other produced items.produce_item_name_input: 0x03 I believe 0x80 is the one you need.
  17. Upvote
    Garr got a reaction from Patskie in MVP Summoner   
    You do realize that it summons MVP on random cell on map?
  18. Upvote
    Garr got a reaction from Nebraskka in Stop "Magnus Exorcismus" damage after Fly Wing (or out of range)   
    Try to do this in src/map/skill.c:
     
    int skill_attack(int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {... nullpo_ret(src); // Source is the master behind the attack (player/mob/pet) nullpo_ret(dsrc); // dsrc is the actual originator of the damage, can be the same as src, or a skill casted by src. nullpo_ret(bl); //Target to be attacked. if (src != dsrc) { //When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex] if (!status->check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skill_id, 2)) return 0; if( skill_id == PR_MAGNUS && !check_distance_bl(src,dsrc,battle_config.area_size) ) //If distance between "damage source" ME and "source" aka player exceeds view range, it has no effect. return 0; }...} Add the 2nd check, the one with if( skill_id == PR_MAGNUS ...)
    Not tested, sorry.
  19. Upvote
    Garr got a reaction from anjasoleil0 in Disabling auto respawn on death in pvp maps.   
    Try to comment these lines in src/map/skill.c:
    int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {... case ALL_RESURRECTION: /* if(sd && (map_flag_gvg2(bl->m) || map->list[bl->m].flag.battleground)) { // Comment starting here //No reviving in WoE grounds! clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); break; } */ // To here...}  
    Also, for PvP try to change all
    return 1|8; to
    return 0; after the commented lines. I think that should do the trick. Yet again, lazy to test
  20. Upvote
    Garr got a reaction from anjasoleil0 in Disabling auto respawn on death in pvp maps.   
    int pc_dead(struct map_session_data *sd,struct block_list *src) {... // pvp // disable certain pvp functions on pk_mode [Valaris] if( map->list[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map->list[sd->bl.m].flag.pvp_nocalcrank ) { sd->pvp_point -= 5; sd->pvp_lost++; if( src && src->type == BL_PC ) { struct map_session_data *ssd = (struct map_session_data *)src; ssd->pvp_point++; ssd->pvp_won++; } if( sd->pvp_point < 0 ) { timer->add(tick+1, pc->respawn_timer,sd->bl.id,0); // Comment this line if you want to disable respawning in PvP return 1|8; } } //GvG if( map_flag_gvg2(sd->bl.m) ) { timer->add(tick+1, pc->respawn_timer, sd->bl.id, 0); //Comment this line if you want to disable respawn in WoE return 1|8; } else if( sd->bg_id ) { struct battleground_data *bgd = bg->team_search(sd->bg_id); if( bgd && bgd->mapindex > 0 ) { // Respawn by BG timer->add(tick+1000, pc->respawn_timer, sd->bl.id, 0); //Comment this line if you want to disable respawn in BG return 1|8; } }...} Comment the lines as told in src/map/pc.c. Untested, but i think it should work.
  21. Upvote
    Garr got a reaction from Singularity in Luk and freezing   
    It's pretty simple, first thing you'll need to know is that max for tick_def is 10000 (100%). Out of this and luk that you want immunity on you solve simple equation:
    x = 10000 / ChosenLuk;
     
    After that just change this line:
     
    tick_def = st->luk*40; to
    tick_def = st->luk*x; Where x is the result of equation.
    Example: You want immunity on 300 luk, that means
    x = 10000 / 300;
    x = 34;
    (It's for you to decide where to round, up or down. I rounded up. That measn that actual luk you'll need for immunity is 295. If you round it down, then needed luk will be 303)
    So the resulting line will be:
    tick_def = st->luk*34;
  22. Upvote
    Garr got a reaction from Muyo in Luk and freezing   
    Umm, tick_def is the reduction. In your case, you just set it up to 0 Of course it had no effect. Try it like this:
    case SC_FREEZE: sc_def = st->mdef*100; sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10); tick_def = (st->luk>249)?10000:0;
  23. Upvote
    Garr got a reaction from Muyo in Luk and freezing   
    Wait wait wait. According to the code you gave there was no reduction to the freeze time whatsoever, just after 250 luk you were pretty much immune to the status change. Like with curse and 100 vit - status still strikes, but is removed same moment.
    Can you clearify what do you want? So that luk would bring linear reduction to freeze time? Or % reduction? How much each point of luck should reduce?
  24. Upvote
    Garr got a reaction from Muyo in Luk and freezing   
    Sigh. The example above will give you at least 2 compiling errors.
     
    case SC_FREEZE: sc_def = st->mdef*100; sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10); tick_def = st->luk*40; Try this one, should reduce it in % manner. Every 25 luk will reduce duration by additinal 10%.
    Like this:
    25 luk -> 10% freeze time reduction
    50 -> 20%
    75 -> 30%
    and so on. On 250 you'll reach immunity.
  25. Upvote
    Garr got a reaction from Break San in Christmas Event Help   
    Try this out.
    prontera,154,186,6 script Daddy Christmas 718,{ mes "[Daddy Christmas]"; mes "Hello there!"; mes "Ho! Ho! Ho!"; mes "Have you been naughty or nice this year?"; next; if (select("I've been nice,Daddy Christmas.:Naughty, you fat prick!.") == 2) { mes "[Daddy Christmas]"; mes "See you around."; close; } else { mes "[Daddy Christmas]"; mes "Very well then!Since you have been nice this year, I will let you enjoy the presents I have in my bag. Here, take a look:"; next; mes "[Daddy Christmas]"; mes "So which one would you like to have?"; next; switch(select("10x Santa Bag:1x Goblin Egg:1x Santa Poring Hat")) { case 1: mes "[Daddy Christmas]"; mes "For the Santa Bag, you’ll need to bring me the following:"; mes "^00FF0010x Well-baked cookie^000000"; mes "^00FF0010x Candy Cane^000000"; mes "^00FF0010x Candy^000000"; mes "^00FF005x Poring Doll^000000"; mes "^00FF001x Santa Hat^000000"; next; mes "[Daddy Christmas]"; mes "Let me check if you have all that I need."; if (select("Yes!:Not Yet!.") == 2) { mes "[Daddy Christmas]"; mes "See you around."; close; } if( countitem(2236) < 1 || countitem(538) < 10 || countitem(530) < 10 || countitem(529) < 10 || countitem(741) < 5 ) { mes "You don't have the requirements."; close; } else { mes "[Daddy Christmas]"; mes "Exactly what I wanted. Here’s your present! Merry Christmas! Ho! Ho! Ho"; delitem 2236, 1; delitem 538, 10; delitem 530, 10; delitem 529, 10; delitem 741, 5; getitem 12132, 10; close; } case 2: mes "[Daddy Christmas]"; mes "For the Christmas Goblin Egg, you’ll need to bring me the following:"; mes "^00FF001x Santa Hat^000000"; mes "^00FF0020x Star Dust^000000"; mes "^00FF0020x Old Broom^000000"; mes "^00FF0010x Witched Starsand^000000"; mes "^00FF0010x Rainbow Carrot^000000"; next; mes "[Daddy Christmas]"; mes "Let me check if you have all that I need."; if (select("Yes!:Not Yet!.") == 2) { mes "[Daddy Christmas]"; mes "See you around."; close; } if( countitem(2236) < 1 || countitem(1148) < 20 || countitem(637) < 20 || countitem(1061) < 10 || countitem(622) < 10 ) { mes "You don't have the requirements."; close; } else { mes "[Daddy Christmas]"; mes "Ho ho ho! *cough *cough"; delitem 2236, 1; delitem 1148, 20; delitem 637, 20; delitem 1061, 10; delitem 622, 10; getitem 9029, 1; mes "[Daddy Christmas]"; mes "Exactly what I wanted. Here’s your present! Merry Christmas! Ho! Ho! Ho"; close; } case 3: mes "[Daddy Christmas]"; mes "For the Santa Poring Hat, you’ll need to bring me the following:"; mes "^00FF001x Santa Poring Card^000000"; mes "^00FF0010x Wrapping Paper^000000"; mes "^00FF0010x Wrapping Lace^000000"; mes "^00FF00Santa Hat^000000"; mes "^00FF001x Stellar^000000"; mes "^00FF00100x Fabric^000000"; mes "^00FF001x Event Ticket^000000"; next; mes "[Daddy Christmas]"; mes "Let me check if you have all that I need."; if (select("Yes!:Not Yet!.") == 2) { mes "[Daddy Christmas]"; mes "See you around."; close; } if( countitem(4005) < 1 || countitem(7175) < 10 || countitem(7174) < 10 || countitem(2294) < 1 || countitem(2236) < 1 || countitem(1059) < 100 || countitem(30802) < 1 ) { mes "You don't have the requirements."; close; } else { mes "[Daddy Christmas]"; mes "Exactly what I wanted. Here’s your present! Merry Christmas! Ho! Ho! Ho"; delitem 4005, 1; delitem 7175, 10; delitem 7174, 10; delitem 2294, 1; delitem 2236, 1; delitem 1059, 1; delitem 3082, 1; getitem 5381, 1; close; } } }close;}
×
×
  • Create New...

Important Information

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