Jump to content

Gidz Cross

Members
  • Posts

    646
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Gidz Cross

  1. On 5/9/2023 at 11:46 AM, joecalis said:

    in unit.cpp

    Find:

    	// SC_MAGICPOWER needs to switch states at start of cast
    	skill_toggle_magicpower(src, skill_id);

    Change To:

    	// SC_MAGICPOWER needs to switch states at start of cast
    	skill_toggle_magicpower(src, skill_id);
    
    	if (sd && skill_id == PF_SPIDERWEB && !skill_pos_maxcount_check(src, skill_x, skill_y, skill_id, skill_lv, BL_PC, false)) {
    		int oldweb = -1;
    		int webid = 0;
    		for (int i = 0; i < MAX_SKILLUNITGROUP && sd->ud.skillunit[i]; i++) {
    			if (sd->ud.skillunit[i]->skill_id == skill_id) {
    				if (webid == 0) {
    					webid = sd->ud.skillunit[i]->group_id;
    					oldweb = i;
    				}
    				else if (webid != 0 && sd->ud.skillunit[i]->group_id < webid) {
    					webid = sd->ud.skillunit[i]->group_id;
    					oldweb = i;
    				}
    			}
    		}
    		if (oldweb >= 0) {
    			skill_delunitgroup(sd->ud.skillunit[oldweb]);
    		}
    	}

    This will delete the oldest active spider web when you try to cast it while it is at max count.

    You can change the maxcount in skill_db.txt to any number under 25 to raise the limit before web deletion.

    Edit: Sorry I placed the code before requirement checks, but its fixed now. /no1

    I knew it. The mod requires to add something on unit.c as I understand the code what it does was to remove the older web when you reached the limit. Just like ankle snare right?

     

    ** Edit

    Didn't work for me. It says skill x and y is undeclared. Maybe because im using 2020 trunk. Anyway. If this behave like ankle snare (like deleting the oldest active trap) then its not the one im looking. But can be until the proper coding.

    The first video i showed was its not ignoring the ActiveInstance. In that server the ActiveInstance istance is set to 5. I can still cast 5 spider web to the ground and will have skill failed when i deploy 5 spider webs.

     

    Their spider web behavior is when the target was trapped. And for some reason the target moved to a different cell. The first web will vanished. Thats why I can spam the webs.

    Maybe this is a bug but intended one.

  2. I know that this has been posted several times. By me and some other rA people in the past. But until now it remains a mystery (at least for me LOL) Others might already solved it and just keeping quiet. But I am this close of achieving the perfect mod.

    Here's what I'm trying to achieve.

     

    As you can see. I can spam the spider web regardless of the ActiveInstance. The previous web will disappear once I set another web close to target. 

    Now, I mentioned that I am super close. I manage to replicate everything except for the disappearance of the previous web. Please check the vid below.
     

     

     

    As you can see. I was limited by the ActiveInstance. Thus I cannot spam it.


    I need a way to remove the previous web if its already triggered.

  3. 3 hours ago, Mael said:

    Woooah. So the usual item linking is updated.

    mes "Don't you want to exchange this with " + .@item_data[.@i+1] + " <ITEM>Doram Token<INFO>25142</INFO></ITEM>?";
    into
    mes "Don't you want to exchange this with " + .@item_data[.@i+1] + " " + mesitemlink( 25142, false ) + "?";

    But as much as I wanted to have this. I think imma pass since my trunk is old. Like 3 years ago. Thanks Mael! XD

     

    1 hour ago, joecalis said:

    try this:

    		struct item_data * item_data = item_array[i];
    		sprintf(atcmd_output, "Item: '%s'/'%s' (%hu) Type: %s", // msg_txt(sd, 1277)
    			item_data->name,createItemLink(item_data->nameid, 0, NULL).c_str(),item_data->nameid,
    			(item_data->type != IT_AMMO) ? itemdb_typename((enum item_types)item_data->type) : itemdb_typename_ammo((enum e_item_ammo)item_data->look));

     

    Eyyy! It works like a charm! Thank you so much!

    image.png.15173730f488e90f9136c8c5a0687a6a.png

  4. 3 hours ago, joecalis said:

    If you have itemlink commands by Cydh implemented you just have to edit

    in atcommand.cpp

    Find:

    		struct item_data * item_data = item_array[i];
    		sprintf(atcmd_output, msg_txt(sd,1277), // Item: '%s'/'%s'[%d] (%hu) Type: %s | Extra Effect: %s
    			item_data->name,item_data->jname,item_data->slot,item_data->nameid,
    			(item_data->type != IT_AMMO) ? itemdb_typename((enum item_types)item_data->type) : itemdb_typename_ammo((enum e_item_ammo)item_data->look),
    			(item_data->script==NULL)? msg_txt(sd,1278) : msg_txt(sd,1279) // None / With script
    		);

    Change To:

    		struct item_data * item_data = item_array[i];
    		sprintf(atcmd_output, "Item: '%s'/'%s' (%hu)", // msg_txt(sd, 1277)
    			item_data->name, createItemLink(item_data->nameid, 0, NULL).c_str(),item_data->nameid);

     

    Eyyy!!! It works! Thanks mate you are AWESOME!

  5. Heya. Can i request a replicated method to this @iteminfo.

    So the picture shows is when you type @ii in a wild search. For example @ii Poring Card. Those information on the chat box will appear. And at the same time it will call a npc script with dialog box which shows the item with itemlink in it.

    Tagging @joecalis XD

    Or... The NPC dialog box isn't necessary. Just make the information on the chatbox with item link.

    OSRO_h4qXVLiXo3.png.f57b7dc2b42e109431fc71d74eb4af49.png
     

  6. 2 minutes ago, joecalis said:

    in atcommand.cpp

    Find:

    for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++)
    			{
    				int dropchance = item_data->mob[j].chance;

    Change To:

    for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++)
    			{
    				int dropchance = item_data->mob[j].chance;
      				int dropbonus = 0;

    Find:

    #endif
    				if (pc_isvip(sd)) // Display item rate increase for VIP
    					dropchance += (dropchance * battle_config.vip_drop_increase) / 100;
    				sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.);

    Change To:

    #endif
      				if(sd->sc.count && sd->sc.data[SC_ITEMBOOST]) // Display drop rate increase for SC_ITEMBOOST eg. Bubblegum
    					dropbonus += (dropchance * sd->sc.data[SC_ITEMBOOST]->val1) / 100;
    				if (pc_isvip(sd)) // Display item rate increase for VIP
    					dropbonus += (dropchance * battle_config.vip_drop_increase) / 100;
    				if(dropbonus)
    					sprintf(atcmd_output, "- %s (%d): %02.02f%% + (%02.02f%%)", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100., dropbonus/100.);
                    else
    					sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.);

     

    Oh my goodness! Thank you for getting back with me! Gimme few minutes. Will try this!

    **EDIT

    It Works!

    image.png.d678fa0f120e4f3c3e661ec5a359db8b.png

    • Love 1
  7. On 5/1/2023 at 10:46 AM, joecalis said:

    In the latest version of Rathena this is already implemented.
    If you're using an older version you might have to diff patch the itemlink commands by Cydh.

    The older rathena versions supports the "itemlink-20190319-e6f1f21d.diff"

    Then you would have to edit the atcommand.cpp in ACMD_FUNC(mobinfo)

    Find:

    		for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) {
    			int droprate;
    			if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL)
    				continue;
    			droprate = mob->dropitem[i].p;
    
    #ifdef RENEWAL_DROP
    			if( battle_config.atcommand_mobinfo_type ) {
    				droprate = droprate * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 2) / 100;
    				if (droprate <= 0 && !battle_config.drop_rate0item)
    					droprate = 1;
    			}
    #endif
    			if (pc_isvip(sd)) // Display drop rate increase for VIP
    				droprate += (droprate * battle_config.vip_drop_increase) / 100;
    			if (item_data->slot)
    				sprintf(atcmd_output2, " - %s[%d]  %02.02f%%", item_data->jname, item_data->slot, (float)droprate / 100);
    			else
    				sprintf(atcmd_output2, " - %s  %02.02f%%", item_data->jname, (float)droprate / 100);
    			strcat(atcmd_output, atcmd_output2);
    			if (++j % 3 == 0) {
    				clif_displaymessage(fd, atcmd_output);
    				strcpy(atcmd_output, " ");
    			}
    		}
    		if (j == 0)
    			clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops.
    		else if (j % 3 != 0)
    			clif_displaymessage(fd, atcmd_output);
    		// mvp
    		if (mob->mexp) {
    			float mvppercent, mvpremain;
    			sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); //  MVP Bonus EXP:%u
    			clif_displaymessage(fd, atcmd_output);
    			strcpy(atcmd_output, msg_txt(sd,1248)); //  MVP Items:
    			mvpremain = 100.0; //Remaining drop chance for official mvp drop mode
    			j = 0;
    			for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) {
    				if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL)
    					continue;
    				//Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5%
    				mvppercent = (float)mob->mvpitem[i].p * mvpremain / 10000.0f;
    				if(battle_config.item_drop_mvp_mode == 0) {
    					mvpremain -= mvppercent;
    				}
    				if (mvppercent > 0) {
    					j++;
    					if (j == 1) {
    						if (item_data->slot)
    							sprintf(atcmd_output2, " %s[%d]  %02.02f%%", item_data->jname, item_data->slot, mvppercent);
    						else
    							sprintf(atcmd_output2, " %s  %02.02f%%", item_data->jname, mvppercent);
    					} else {
    						if (item_data->slot)
    							sprintf(atcmd_output2, " - %s[%d]  %02.02f%%", item_data->jname, item_data->slot, mvppercent);
    						else
    							sprintf(atcmd_output2, " - %s  %02.02f%%", item_data->jname, mvppercent);
    					}
    					strcat(atcmd_output, atcmd_output2);
    				}
    			}
    			if (j == 0)
    				clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes.
    			else
    				clif_displaymessage(fd, atcmd_output);
    		}

    Change to:

    		for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) {
    			int droprate;
    			int dropbonus = 0;
    
    			if (mob->dropitem[i].nameid <= 0 || mob->dropitem[i].p < 1 || (item_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL)
    				continue;
    			droprate = mob->dropitem[i].p;
    
    #ifdef RENEWAL_DROP
    			if( battle_config.atcommand_mobinfo_type ) {
    				droprate = droprate * pc_level_penalty_mod(mob->lv - sd->status.base_level, mob->status.class_, mob->status.mode, 2) / 100;
    				if (droprate <= 0 && !battle_config.drop_rate0item)
    					droprate = 1;
    			}
    #endif
    			if((sd->sc.count && sd->sc.data[SC_ITEMBOOST])) // Display drop rate increase for SC_ITEMBOOST eg. Bubblegum
    				dropbonus += (droprate * sd->sc.data[SC_ITEMBOOST]->val1) / 100;
    			if (pc_isvip(sd)) // Display drop rate increase for VIP
    				dropbonus += (droprate * battle_config.vip_drop_increase) / 100;
    			if (dropbonus)
    				sprintf(atcmd_output2, " %s  %02.02f%% + (%02.02f%%)", createItemLink(item_data->nameid, 0, NULL).c_str(), (float)droprate / 100, (float)dropbonus / 100);
    			else
    				sprintf(atcmd_output2, " %s  %02.02f%%", createItemLink(item_data->nameid, 0, NULL).c_str(), (float)droprate / 100);
    			strcat(atcmd_output, atcmd_output2);
    			j++;
    			clif_displaymessage(fd, atcmd_output);
    			strcpy(atcmd_output, " ");
    		}
    		if (j == 0)
    			clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops.
    		// mvp
    		if (mob->mexp) {
    			float mvppercent, mvpremain;
    			sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); //  MVP Bonus EXP:%u
    			clif_displaymessage(fd, atcmd_output);
    			strcpy(atcmd_output, msg_txt(sd,1248)); //  MVP Items:
    			clif_displaymessage(fd, atcmd_output);
    			strcpy(atcmd_output, " ");
    			mvpremain = 100.0; //Remaining drop chance for official mvp drop mode
    			j = 0;
    			for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) {
    				if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL)
    					continue;
    				//Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5%
    				mvppercent = (float)mob->mvpitem[i].p * mvpremain / 10000.0f;
    				if(battle_config.item_drop_mvp_mode == 0) {
    					mvpremain -= mvppercent;
    				}
    				if (mvppercent > 0) {
    					j++;
    					sprintf(atcmd_output2, " %s  %02.02f%%", createItemLink(item_data->nameid, 0, NULL).c_str(), mvppercent);
    					strcat(atcmd_output, atcmd_output2);
    					clif_displaymessage(fd, atcmd_output);
    					strcpy(atcmd_output, " ");
    				}
    			}
    			if (j == 0)
    				clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes.
    		}

     


    Hey mate! Thank you for this. I wish that this can be implemented to @whodrops as well.

    *EDIT

    Item linking is not necessary for @whodrops. Just the original drop rate + (bonuses) when you are on VIP or consumed Bubblegums. 

  8. On 8/30/2022 at 11:32 PM, TheKingDino said:

    I've noticed this with Krieg and Stem of Neph, these are the most up-to-date equip ymls as well that have this error. Is this a problem with bAddEffOnSkill in general or how it is written in the item database?

    https://imgur.com/yJUDxpT

      - Id: 1979
        AegisName: Stem_Of_Nepenthes
        Name: Stem of Nepenthes
        Type: Weapon
        SubType: Whip
        Buy: 20
        Weight: 1000
        Attack: 120
        Range: 2
        Slots: 2
        Jobs:
          BardDancer: true
        Classes:
          All_Upper: true
        Gender: Female
        Locations:
          Right_Hand: true
        WeaponLevel: 4
        EquipLevelMin: 60
        Refineable: true
        Script: |
          bonus bInt,2;
          bonus3 bAddEffOnSkill,"DC_THROWARROW",Eff_Freeze,(getrefine()>=9?2000:1000);

     

    Untitled2z.png

    I think its much better to post this on github.

  9. Calling all High-Rate lovers out there. Please help me by giving suggestions out there. I'm a fan of dark ro based setup. I do happen to have monster arena script. But it was based on low-rate server. I want some advice how will i set it up into high-rate type.

    So basically, my script summons declared monsters. And different monster will give specific point depends on my liking.

    setarray .MOBS[0],    
        // MobID,    MinAmount,    MaxAmount,    Time(ms),    Points,    X1,    Y1,    X2,    Y2,
        // [1]       [2]           [3]          [4]           [5]        [6]    [7]    [8]    [9]
        // Low-Level Monster[Poring Family]
        1002,    30,    50,    15000,    1,    0,    0,    0,    0, // Poring
        1031,    30,    50,    15000,    1,    0,    0,    0,    0, // Poporing
        1062,    30,    50,    15000,    1,    0,    0,    0,    0, // Santa Poring
        1113,    30,    50,    15000,    1,    0,    0,    0,    0, // Drops
        1242,    30,    50,    15000,    1,    0,    0,    0,    0, // Marin
        1836,    30,    50,    15000,    1,    0,    0,    0,    0, // Magmaring

    So, this is the part of my script. When you kill a poring you will be given 1 point.

    Anyways, i want some suggetions how will monster arena will function on high rate setups. Any suggestion will be welcomed. Thanks guys!

    • Upvote 1
  10. 7 hours ago, imat1 said:

    Hello. Sorry if i'm in the wrong section because i really dont know if this is server side or client side. When i use bard or dancer song, moonlit water mill skill effect suddenly appear when i started walking. I'm using 2018-06-21aRagexeRE and i'm running a PRE-RE setup. If you have an idea of what causing this, please let me know. Thanks! Btw i'm really clueless whether this is intended or not.

     

    Its definitely client side. Did you patch your client with restore song effects? I think thats for 2020+ clients. You dont have to do that since you are using 2018 client.

  11. Yes i know this has been requested too many times now. I actually have this mod on my trunk but i think its not properly coded. Well i wanted to request a perfect diff for spider web. Which you can cast it on the ground instead on players.

    The behavior should be default but ground type skill. If you cast 3 spider web the 4th spider web should delete the 1st web you casted.

    Thank you!

  12. 12 hours ago, Keitenai said:

    Currently, only those with gepard shield can get mac address of a player. Aside from gepard, there's no other option that i know of.

    Yes unfortunately. Since i own gepard. Maybe i can take advantage of it. Here my login table looks like with gepard colums.

     

    image.png.3c47b8fbac0b76fdd66248d32241030d.png

    No idea what to change in the script. Or is it be that simple to replace 'last_ip' into 'last_unique_id"

    *EDIT

    Well ill be damned. I guess it works!

×
×
  • Create New...