Jump to content

Haziel

Content Moderator
  • Posts

    635
  • Joined

  • Last visited

  • Days Won

    83

Community Answers

  1. Haziel's post in R>Gold Bar (recolor) was marked as the answer   
    Consider this as an act of kindness.
  2. Haziel's post in Is it possible to make a consumable only usable by certain lvl player ? was marked as the answer   
    I guess it's BaseLevel.
    But I already told you to read doc/item_db.txt because of:
    eLV: Base level required to be able to equip. maxLevel: Only able to equip if base level is lower than this.
  3. Haziel's post in Set variable as a word? was marked as the answer   
    Every string variable should end with $.
    Like: #bankpoints$
    Examples: name - permanent character integer variable name$ - permanent character string variable @name - temporary character integer variable @name$ - temporary character string variable $name - permanent global integer variable $name$ - permanent global string variable [email protected] - temporary global integer variable [email protected]$ - temporary global string variable .name - NPC integer variable .name$ - NPC string variable [email protected] - scope integer variable [email protected]$ - scope string variable #name - permanent local account integer variable #name$ - permanent local account string variable ##name - permanent global account integer variable ##name$ - permanent global account string variable
  4. Haziel's post in Item status only for certain level was marked as the answer   
    Well, on item script just:
    if (BaseLevel < 70) bonus bAllStats,3; It reads: If BaseLevel is less than 70, give All Stats + 3.

    And, for limiting it on certain maps, it's better to disable the item on that specific map, but, you can:
    if (strcharinfo(3) != "prontera") bonus bAllStats,3; It reads: If current map isn't prontera, give All Stats + 3.
     
    But if it's several maps, I, again, would prefer to use db/item_noequip.txt.
  5. Haziel's post in setunitdata ELETYPE was marked as the answer   
    It's signed as a unsigned char, so, any of them.
  6. Haziel's post in Help SQL DB error - incorrect table name ' ' was marked as the answer   
    Did you configure your inter_athena correctly? Look if there isn't a empty field.
  7. Haziel's post in not enough argument was marked as the answer   
    The problem (at least what is giving you the error) is on the:
    autobonus "{ bonus2 bSkillAtk,"WM_SEVERE_RAINSTORM",100; }",5,5000,BF_WEAPON; You just put quotes inside quotes, canceling them, must be:
    autobonus "{ bonus2 bSkillAtk,\"WM_SEVERE_RAINSTORM\",100; }",5,5000,BF_WEAPON; But, I guess there's more wrong things on your code.
    Test it.
  8. Haziel's post in Limited Potions was marked as the answer   
    See db/item_stack.txt.
  9. Haziel's post in MVP LADDER was marked as the answer   
    I updated the mechanics of the Script you posted, try it:
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * ~~~~~~~~ Euphy's MVP Ladder v1.3 ~~~~~~~~ * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ prontera,148,170,6 script MVP Ladder 891,{ mes "[Rank MVP]"; mes "Hello."; mes "What are you doing here"; next; switch(select("Check Ranking.:My points.:Nothing...")) { case 1: mes "[Rank MVP]"; query_sql("SELECT char_id, CAST(`value` AS SIGNED) FROM `char_reg_num` WHERE `key` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",[email protected],[email protected]); for(set [email protected],0; [email protected]<getarraysize([email protected]); set [email protected],[email protected]+1) { query_sql("SELECT `name` FROM `char` WHERE char_id = "[email protected][[email protected]]+";",[email protected]$); set [email protected]$[[email protected]], [email protected]$; } if (!getarraysize([email protected])) mes "The rankings are empty."; else for(set [email protected],0; [email protected]<getarraysize([email protected]); set [email protected],[email protected]+1) mes "["+([email protected]+1)+"] "[email protected]$[[email protected]]+" ~ "[email protected][[email protected]]+" kills"; close; case 2: mes "[Rank MVP]"; mes "You killed "+((MVP_Rank)?"^0055FF"+MVP_Rank:"no")+"^000000 MVP"+((MVP_Rank == 1)?".":"s."); close; case 3: close; } OnNPCKillEvent: if (getmonsterinfo(killedrid,22)) { set MVP_Rank, MVP_Rank+1; if (MVP_Rank == 1) query_sql("INSERT INTO `char_reg_num` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(0)+",'MVP_Rank','0',1)"); else query_sql("UPDATE `char_reg_num` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `key` ='MVP_Rank'"); dispbottom "~ You killed "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~"; dispbottom " ~ Reward: Cash +15 ~ "; set #CASHPOINTS, #CASHPOINTS + 15; specialeffect2 313; } end; } Let me know if there is any errors.
  10. Haziel's post in How to lower guild member capacity? was marked as the answer   
    First of all, find in your mmo.h:
    #define MAX_GUILD 16+10*6 16 is the primary value, it means, it's how many members a Guild can have at Level 0 of Guild Expansion Skill.
    So, change it anyway you want, for example, for the 30 you said:
    #define MAX_GUILD 10+10*2 It means, 10 at Level 0 and plus 2 per Skill Level.

    Once it's done, for the existing Guilds, you need to set some things in your SQL Database:
    Let me say first that, If I were you, I would choose to delete all Guilds an make an Event with Increased Guild Experience than do this...

    There are examples here, here, here, here, here, here and here.
     
  11. Haziel's post in OnTouch questions... was marked as the answer   
    1. Usually NPCs do not trigger it.
    2. Yes.
  12. Haziel's post in How to remove class/lvl limitation from costume was marked as the answer   
    Ok, forget all I did before, please revert the diffs.
    The problem is, after reading part of the source, I was led to believe that that 'signature' with the name of the char was read by the checks as an EQP_COSTUME_HEAD_TOP, EQP_COSTUME_HEAD_MID, EQP_COSTUME_HEAD_LOW or EQP_COSTUME_GARMENT. That's not true.

    So, let's do it pretty easily.
    First of all, there's the case of WHICH diff are you using. I'm currently using rAmod, but I'll assume you're using this diff.

    If so, yet on src/map/pc.c, find the function pc_isequip, I'll guide myself by the one Fantastik posted.
    /*================================================= * Checks if the player can equip the item at index n in inventory. * @param sd * @param n Item index in inventory * @return ITEM_EQUIP_ACK_OK(0) if can be equipped, or ITEM_EQUIP_ACK_FAIL(1)/ITEM_EQUIP_ACK_FAILLEVEL(2) if can't *------------------------------------------------*/ uint8 pc_isequip(struct map_session_data *sd,int n) { struct item_data *item; nullpo_retr(ITEM_EQUIP_ACK_FAIL, sd); item = sd->inventory_data[n]; if(pc_has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT)) return ITEM_EQUIP_ACK_OK; if(item == NULL) return ITEM_EQUIP_ACK_FAIL; if(item->elv && sd->status.base_level < (unsigned int)item->elv) return ITEM_EQUIP_ACK_FAILLEVEL; if(item->elvmax && sd->status.base_level > (unsigned int)item->elvmax) return ITEM_EQUIP_ACK_FAILLEVEL; if(item->sex != 2 && sd->status.sex != item->sex) return ITEM_EQUIP_ACK_FAIL; if (sd->sc.count) { if(item->equip & EQP_ARMS && item->type == IT_WEAPON && sd->sc.data[SC_STRIPWEAPON]) // Also works with left-hand weapons [DracoRPG] return ITEM_EQUIP_ACK_FAIL; if(item->equip & EQP_SHIELD && item->type == IT_ARMOR && sd->sc.data[SC_STRIPSHIELD]) return ITEM_EQUIP_ACK_FAIL; if(item->equip & EQP_ARMOR && sd->sc.data[SC_STRIPARMOR]) return ITEM_EQUIP_ACK_FAIL; if(item->equip & EQP_HEAD_TOP && sd->sc.data[SC_STRIPHELM]) return ITEM_EQUIP_ACK_FAIL; if(item->equip & EQP_ACC && sd->sc.data[SC__STRIPACCESSORY]) return ITEM_EQUIP_ACK_FAIL; if(item->equip && sd->sc.data[SC_KYOUGAKU]) return ITEM_EQUIP_ACK_FAIL; if (sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_SUPERNOVICE) { //Spirit of Super Novice equip bonuses. [Skotlex] if (sd->status.base_level > 90 && item->equip & EQP_HELM) return ITEM_EQUIP_ACK_OK; //Can equip all helms //if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON && item->wlv == 4) if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON) // Modificado 17/09/2015 switch(item->look) { //In weapons, the look determines type of weapon. case W_DAGGER: //All level 4 - Daggers case W_1HSWORD: //All level 4 - 1H Swords case W_1HAXE: //All level 4 - 1H Axes case W_MACE: //All level 4 - 1H Maces case W_STAFF: //All level 4 - 1H Staves case W_2HSTAFF: //All level 4 - 2H Staves return ITEM_EQUIP_ACK_OK; } } } //fail to equip if item is restricted if (!battle_config.allow_equip_restricted_item && itemdb_isNoEquip(item, sd->bl.m)) return ITEM_EQUIP_ACK_FAIL; //Not equipable by class. [Skotlex] if (!(1<<(sd->class_&MAPID_BASEMASK)&item->class_base[(sd->class_&JOBL_2_1)?1:((sd->class_&JOBL_2_2)?2:0)])) return ITEM_EQUIP_ACK_FAIL; if (!pc_isItemClass(sd,item)) return ITEM_EQUIP_ACK_FAIL; return ITEM_EQUIP_ACK_OK; } So, find this fragment:
    struct item_data *item; nullpo_ret(sd); item = sd->inventory_data[n]; And turn into this:
    struct item equip; struct item_data *item; int char_id = 0; nullpo_ret(sd); equip = sd->status.inventory[n]; item = sd->inventory_data[n]; So we can get the important info, which is, if the item has a signature (I don't know how you name it, I'm talking about the name that appears when someone produce an Item, in costume itens it appears Costume in blue), and, if so, if it's the name of the Reserved Char ID for it.

    So, now the function.
    Now, find this fragment:
        if(item == NULL)         return false; And, just below it, paste this check:
    if( equip.card[0] == CARD0_CREATE ){ char_id = MakeDWord(equip.card[2],equip.card[3]); if( battle_config.reserved_costume_id && char_id == battle_config.reserved_costume_id) return true; } I hope all the functions needed exists on your Costume Snippet.
    This one was tested, but I did it on rAmod, so don't know exactly the differences.
  13. Haziel's post in about @noks was marked as the answer   
    The Screenshots are unclear, and maybe, 1 hour can be a little much and broke the Script.
    My config is set to 15s and it's working properly.
    // Time in milliseconds to activate protection against Kill Steal // Set to 0 to disable it. // If this is activated and a player is using @noks, damage from others players (KS) not in the party // will be reduced to 0. ksprotection: 15000
  14. Haziel's post in HELP itemdb script was marked as the answer   
    Always organize the script before putting it into one line.
    bonus bAllStats,5; bonus bdef,5; bonus2 bSubRace,RC_DemiHuman,12; bonus2 bAddRace,RC_DemiHuman,5; bonus bDelayRate,-20; if(BaseJob == Job_Bard) bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5','100; skill "DC_DONTFORGETME",1; else if(BaseJob == Job_Dancer) bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5,100; bonus bBaseAtk,(JobLevel*2)/7; skill "BA_POEMBRAGI",1; First part:
    bonus bAllStats,5; bonus bdef,5; bonus2 bSubRace,RC_DemiHuman,12; bonus2 bAddRace,RC_DemiHuman,5; bonus bDelayRate,-20; Appears to be okay, nothing wrong.

    Second part:
    if(BaseJob == Job_Bard) bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5','100; skill "DC_DONTFORGETME",1; If you're putting more than one command inside an If, you must put { }.
    By the way:
    bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5,100; If I recall correctly, if you will make more than one skill to activate when he character hit, you need to put one line for each.
    bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; //I presume you wanted to put it level 10 bonus3 bAutoSpell,"CG_TAROTCARD",5,100; So, this block would be:
    if(BaseJob == Job_Bard){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; skill "DC_DONTFORGETME",1; } Now, the final block:
    else if(BaseJob == Job_Dancer) bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5,100; bonus bBaseAtk,(JobLevel*2)/7; skill "BA_POEMBRAGI",1; Same errors made before.
    The result should be:
    else if(BaseJob == Job_Dancer){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; bonus bBaseAtk,(JobLevel*2)/7; skill "BA_POEMBRAGI",1; } No, as a result, the final Script may be:
    bonus bAllStats,5; bonus bdef,5; bonus2 bSubRace,RC_DemiHuman,12; bonus2 bAddRace,RC_DemiHuman,5; bonus bDelayRate,-20; if(BaseJob == Job_Bard){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; skill "DC_DONTFORGETME",1; } else if(BaseJob == Job_Dancer){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; bonus bBaseAtk,(JobLevel*2)/7; skill "BA_POEMBRAGI",1; } In one line:
    bonus bAllStats,5; bonus bdef,5; bonus2 bSubRace,RC_DemiHuman,12; bonus2 bAddRace,RC_DemiHuman,5; bonus bDelayRate,-20; if(BaseJob == Job_Bard){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; skill "DC_DONTFORGETME",1; } else if(BaseJob == Job_Dancer){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; bonus bBaseAtk,(JobLevel*2)/7; skill "BA_POEMBRAGI",1; } And on Item Script:
    20091,Dark_Valkyrie_Helm,Dark Valkyrie Helm,5,10000,,10,,10,,1,0xFFFFFFFF,7,2,256,,0,1,1091,{ bonus bAllStats,5; bonus bdef,5; bonus2 bSubRace,RC_DemiHuman,12; bonus2 bAddRace,RC_DemiHuman,5; bonus bDelayRate,-20; if(BaseJob == Job_Bard){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; skill "DC_DONTFORGETME",1; } else if(BaseJob == Job_Dancer){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; bonus bBaseAtk,(JobLevel*2)/7; skill "BA_POEMBRAGI",1; } },{},{} Mother of Odin.
  15. Haziel's post in how to disable transcendent bonus stat point? was marked as the answer   
    On src/map/pc.c.
    There's a function that grants or take the Transcedent Classes' Bonus when a non-Trans turn into Trans and vice-versa.
    // Give or reduce transcendent status points if( (b_class&JOBL_UPPER) && !(sd->class_&JOBL_UPPER) ){ // Change from a non t class to a t class -> give points sd->status.status_point += battle_config.transcendent_status_points; clif_updatestatus(sd,SP_STATUSPOINT); }else if( !(b_class&JOBL_UPPER) && (sd->class_&JOBL_UPPER) ){ // Change from a t class to a non t class -> remove points if( sd->status.status_point < battle_config.transcendent_status_points ){ // The player already used his bonus points, so we have to reset his status points pc_resetstate(sd); } sd->status.status_point -= battle_config.transcendent_status_points; clif_updatestatus(sd,SP_STATUSPOINT); } The answer for your task may be there, try to modify, disable or comment it.
  16. Haziel's post in Berserk Skill Red/Orange Body Effect was marked as the answer   
    You need to edit the source in order to refresh the effect once you change from one map to another.
    I don't remember exactly the fragment where it can be set, but that's the way.

    I guess that usually the Client-Side take care of keeping the effect active while the SC is active, but, since it's a Custom Skill, a Custom Function will be needed.
    The easy way is do that with Scripts, using OnPCMapLoadEvent, but it's a McGyver, not a real solution.
  17. Haziel's post in Skill that callfunc a script was marked as the answer   
    Well, to do that I use a Custom Label, made by AnnieRuru a long time ago, by the way, I had no big trouble into making the snippet work on last revision.
    But pay attention, some variables had changed since and then.

    Look here.
     
  18. Haziel's post in Reducing desperado's hit was marked as the answer   
    Well, let's me see.
    Desperado is not counted as a real 'Multiple Hits' because, as far as I know, it does actually damage in 'Multiple Targets', so, it's correct the 1 on skill_db.
     
    This line only defines the Success Rate:
    case GS_DESPERADO: if (rand()%100 < src->val1)     skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0); break; You may comment the If line to get rid of the failure chance.

    Well, finally, I believe that the number of Targets is defined on the mysterious Duration field on skill_cast_db.txt.
    516,0,1000,1000,1000,0,0 You can try change it to different values, but, If I recall correctly, you will get what you want (5 targets) with 400 or 500.
    516,0,1000,1000,500,0,0 It's not reeeally untested, but neither totally tested, tell me if you get any progress.

    It's also possible to make the Skill Level to define that.
    516,0,1000,1000,100:100:200:200:300:300:400:400:500:500,0,0 I guess that will make Desperado Lv. 9 or 10 to cast the 5 hits, If I'm correct about all of this (you may also try 400...).
  19. Haziel's post in Looking for Green colored-text Armor w/Enchant (+3) was marked as the answer   
    It's simple, if you're used to cardprefixnametable.txt (located into data.grf, client-side).
    Get the file and, at it's end, add the lines:
    4700#[STR + 01]# 4701#[STR + 02]# 4702#[STR + 03]# 4703#[STR + 04]# 4704#[STR + 05]# 4705#[STR + 06]# 4706#[STR + 07]# 4707#[STR + 08]# 4708#[STR + 09]# 4709#[STR + 10]# 4710#[INT + 01]# 4711#[INT + 02]# 4712#[INT + 03]# 4713#[INT + 04]# 4714#[INT + 05]# 4715#[INT + 06]# 4716#[INT + 07]# 4717#[INT + 08]# 4718#[INT + 09]# 4719#[INT + 10]# 4720#[DEX + 01]# 4721#[DEX + 02]# 4722#[DEX + 03]# 4723#[DEX + 04]# 4724#[DEX + 05]# 4725#[DEX + 06]# 4726#[DEX + 07]# 4727#[DEX + 08]# 4728#[DEX + 09]# 4729#[DEX + 10]# 4730#[AGI + 01]# 4731#[AGI + 02]# 4732#[AGI + 03]# 4733#[AGI + 04]# 4734#[AGI + 05]# 4735#[AGI + 06]# 4736#[AGI + 07]# 4737#[AGI + 08]# 4738#[AGI + 09]# 4739#[AGI + 10]# 4740#[VIT + 01]# 4741#[VIT + 02]# 4742#[VIT + 03]# 4743#[VIT + 04]# 4744#[VIT + 05]# 4745#[VIT + 06]# 4746#[VIT + 07]# 4747#[VIT + 08]# 4748#[VIT + 09]# 4749#[VIT + 10]# 4750#[LUK + 01]# 4751#[LUK + 02]# 4752#[LUK + 03]# 4753#[LUK + 04]# 4754#[LUK + 05]# 4755#[LUK + 06]# 4756#[LUK + 07]# 4757#[LUK + 08]# 4758#[LUK + 09]# 4759#[LUK + 10]# The names may turn Green because usually, Runes doesn't cast Prefix names.
    And, if I recall correctly, it needs to be in langtype 0 or 1.
  20. Haziel's post in Does bubblegum affects custom drop rate script ? was marked as the answer   
    No.
×
×
  • Create New...

Important Information

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