Jump to content

xG000000

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by xG000000

  1. I've shorten the script for better viewing, how can I make this script choose what is on my inventory instead of choosing in the menu. Also Instead of paying coin(20000) i would like to change the requirement on what i choose on my inventory, for example, i choose Anniversary Hat on my inventory therefore the item will be deleted after its done.

    Quote

     

    L_top:    // Top Headgears
        mes "[Premium Disguise]";
        mes "Which one do you want?";
        menu "1. 2nd Anniversary Hat",t1,"Nevermind",L_end;
            next;
    L_mid:    // Middle Headgears
        mes "[Premium Disguise]";
        mes "Which one do you want?";
        menu "Nevermind",L_end;
            next;
    L_lower:    // Lower Headgears
        mes "[Premium Disguise]";
        mes "Which one do you want?";
        menu "Nevermind",L_end;
            next;
            
    t1:        callsub S_GetHeadgear,"top",500, "2nd Anniversary Hat",109;

    L_reset:
        set hastop,0;
        set hasmid,0;
        set haslow,0;
        mes "[Premium Disguise]";
        mes "Options have been reset.";
    L_end:
        close;

    S_GetHeadgear:
    // getarg(0) = type ("top", "mid", or "low")
    // getarg(1) = cost in Reward Coins
    // getarg(2) = "item name"
    // getarg(3) = view_id
        if (getd("#"+getarg(0)+getarg(3)) < 1) {
            mes "[Premium Disguise]";
            mes "Sorry, you have not yet purchased or unlocked this headgear.";
            mes "Would you like to purchase access to it for "+getarg(1)+" Reward Coins?";
            next;
            if (select("Yes:No")==2) close;
            else if (countitem(20000) < getarg(1)) {
            mes "[Premium Disguise]";
            mes "Sorry, you don't have enough coins. Come back when you do!";
            close; 
            }
            mes "[Premium Disguise]";
            mes "Alright, thank you! You can now access the "+getarg(2)+" headgear.";
            delitem 20000,getarg(1);
            setd "#"+getarg(0)+getarg(3),1;
        }
        setd "has"+getarg(0),1;
        setd "premium"+getarg(0),getarg(3);
             if (getarg(0) == "top") changelook 4,getarg(3); // LOOK_HEAD_TOP
        else if (getarg(0) == "mid") changelook 5,getarg(3); // LOOK_HEAD_MID
        else if (getarg(0) == "low") changelook 3,getarg(3); // LOOK_HEAD_BOTTOM
        mes "[Premium Disguise]";
        mes "New disguise applied to "+getarg(0)+" headgear.";
        close;

    OnPCLoginEvent:
        if (hastop) changelook 4,premiumtop; 
        if (hasmid) changelook 5,premiummid; 
        if (haslow) changelook 3,premiumlow;
        end;
    }

     

     

  2. How can i set the bolt damage to per hit, normal behavior is total damage hit, i want to make bolts to deal separate damage not total damage

    for example 

    im dealing 100000 bolt damage

    (Original) Fire bolt lvl 10 - 100000 total damage (10000 per bolt)

     

    (Mod) Fire Bolt lvl 10 - 100000 per bolt damage

  3. I need help with this script because it also removes the random item option of my items when putting stones. also i want to make it only 3rd slot of the item can only be enchant and it requires the Gem or Orb when adding enchant.

     

    [Card] , [Card] , [Orb] , [Empty]

     

    and an option where i can remove the orb without breaking both eqp and orb.

    all_enchanter (1).txt

  4. uqk3OBK.png

     

    it tried to limit the reflect but still exceed the max damage limit bonus.

    return cap_value(min(rdamage,max_damage),INT_MIN,INT_MAX);

    im also using stormbreaker source mod 

    bonus bDamageLimit

    but when i try to make an item that will chance to deal max  pyhiscal damage, it ignores the reflect of it

      if (sd) {
            for (const auto& it : sd->atkratechance) {
                if (it.value2 > rand() % 1000)
                    ATK_ADDRATE(wd.damage, wd.damage2, it.value1);
            }

    but when i try it with magic attack the reflect just work fine.

      if (sd) {
            for (const auto& it : sd->matkratechance) {
                if (it.value2 > rand() % 1000)
                    MATK_ADDRATE(it.value1);
            }

     

    TL:DR. i just want to make a damage cap on my files but looking at battle.cpp i cant make it work. I tried to change max damage in cliff.cpp but it was just visual. max damage on my server deals 2.147Billion and i just want to make it to my specific limit.

  5. 13 hours ago, Start_ said:
    
    setarray .@indices[1], EQI_ACC_L,EQI_ACC_R,EQI_SHOES,EQI_GARMENT,EQI_HEAD_LOW,EQI_HEAD_MID,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R,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;
    for(.@i = 1; .@i<getarraysize(.@indices); ++.@i) {
    	if(getequipisequiped(.@indices[.@i])) {
    		.@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
    		.@equipped = 1;
    	}
    	.@menu$ = .@menu$ + ":";
    }
    .@part = .@indices[select(.@menu$)];
    setrandomoption(.@part,0,rand(1,220),rand(1,2),0);
    setrandomoption(.@part,1,rand(1,220),rand(1,2),0);
    setrandomoption(.@part,2,rand(1,220),rand(1,2),0);
    setrandomoption(.@part,3,rand(1,220),rand(1,2),0);
    setrandomoption(.@part,4,rand(1,220),rand(1,2),0);

     

    thanks bro ?

  6. is there a script for scrolls that will enchant all gears including shadow gears like, I want to have a scroll that will give 1% - 10% random Max HP Percent to an item and i can choose which slot will i put it like Slot 1 to Slot 5. 

    i dont know how to use setrandomoption as a script please help me thanks.

  7. this script give me error when i manually apply it. can you help me make it work for the latest rathena.

     

    error

    
    skill.cpp: In function ‘int64 skill_attack(int, block_list*, block_list*, block_list*, uint16, uint16, t_tick, int)’:
    skill.cpp:3627:44: error: request for member ‘notreflected’ in ‘*(skill_db + ((sizetype)(((long unsigned int)skill_get_index_(((int)skill_id), 0, ((const char*)(& __FUNCTION__)), ((const char*)"skill.cpp"), 3627)) * 8)))’, which is of pointer type ‘s_skill_db*’ (maybe you meant to use ‘->’ ?)
       if( !skill_db[skill_get_index(skill_id)].notreflected && (dmg.damage || dmg.damage2) && (type = skill_magic_reflect(src, bl, src==dsrc)) )
                                                ^~~~~~~~~~~~
    skill.cpp: In function ‘bool skill_parse_row_notreflecteddb(char**, int, int)’:
    skill.cpp:22617:38: error: request for member ‘notreflected’ in ‘*(skill_db + ((sizetype)(((long unsigned int)skill_get_index_(((int)skill_id), 0, ((const char*)(& __FUNCTION__)), ((const char*)"skill.cpp"), 22617)) * 8)))’, which is of pointer type ‘s_skill_db*’ (maybe you meant to use ‘->’ ?)
      skill_db[skill_get_index(skill_id)].notreflected = true;
                                          ^~~~~~~~~~~~
    skill.cpp: In function ‘void skill_readdb()’:
    skill.cpp:22756:71: error: ‘MAX_SKILL_DB’ was not declared in this scope
     sv_readdb(dbsubpath2, "skill_not_reflected_db.txt"  , ',',   1,  1, MAX_SKILL_DB, skill_parse_row_notreflecteddb); // [Cydh]
                                                                         ^~~~~~~~~~~~
    skill.cpp:22756:71: note: suggested alternative: ‘MAX_SKILL_ID’
     sv_readdb(dbsubpath2, "skill_not_reflected_db.txt"  , ',',   1,  1, MAX_SKILL_DB, skill_parse_row_notreflecteddb); // [Cydh]
                                                                         ^~~~~~~~~~~~
                                                                           MAX_SKILL_ID

     

    skill_not_reflected_db-rA.diff

×
×
  • Create New...