Jump to content
  • 0

RG_STEALCOIN more than once


iraciz

Question


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

Well, I wonder if by any mean is it is possible to cast the skill more than once on the same enemy, and increase the steal money trigger not 1 but 3 times. I mean cast the skill 3 times and steal the money 3 times before the flag! thanks in advance

/*==========================================
 * Stole zeny from bl (mob)
 * return
 *	0 = fail
 *	1 = success
 *------------------------------------------*/
int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
{
	int rate,skill;
	struct mob_data *md;
	if(!sd || !target || target->type != BL_MOB)
		return 0;

	md = (TBL_MOB*)target;
	if( md->state.steal_coin_flag || md->sc.data[SC_STONE] || md->sc.data[SC_FREEZE] || md->status.mode&MD_BOSS )
		return 0;

	if( mob_is_treasure(md) )
		return 0;

	// FIXME: This formula is either custom or outdated.
	skill = pc_checkskill(sd,RG_STEALCOIN)*10;
	rate = skill + (sd->status.base_level - md->level)*3 + sd->battle_status.dex*2 + sd->battle_status.luk*2;
	if(rnd()%1000 < rate)
	{
		int amount = md->level*100 + rnd()%100;

		pc_getzeny(sd, amount, LOG_TYPE_STEAL, NULL);
		md->state.steal_coin_flag = 1;
		return 1;
	}
	return 0;
}
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  509
  • Reputation:   80
  • Joined:  11/20/11
  • Last Seen:  

 

/*==========================================

* Stole zeny from bl (mob)

* return

*    0 = fail

*    1 = success

*------------------------------------------*/

int pc_steal_coin(struct map_session_data *sd,struct block_list *target)

{

    int rate,skill;

    struct mob_data *md;

    if(!sd || !target || target->type != BL_MOB)

        return 0;

    md = (TBL_MOB*)target;

    if( md->state.steal_coin_flag || md->sc.data[SC_STONE] || md->sc.data[SC_FREEZE] || md->status.mode&MD_BOSS )

        return 0;

    if( mob_is_treasure(md) )

        return 0;

    // FIXME: This formula is either custom or outdated.

    skill = pc_checkskill(sd,RG_STEALCOIN)*10;

    rate = skill + (sd->status.base_level - md->level)*3 + sd->battle_status.dex*2 + sd->battle_status.luk*2;

    if(rnd()%1000 < rate)

    {

        int amount = md->level*100 + rnd()%100;

        pc_getzeny(sd, amount, LOG_TYPE_STEAL, NULL);

        //md->state.steal_coin_flag = 1;

        return 1;

    }

    return 0;

}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

Posted (edited) · Hidden by Emistry, January 21, 2015 - Merged + Hidden duplicated contents.
Hidden by Emistry, January 21, 2015 - Merged + Hidden duplicated contents.

Well, I wonder if by any mean is it is possible to cast the skill more than once on the same enemy, and increase the steal money trigger not 1 but 3 times. I mean cast the skill 3 times and steal the money 3 times before the flag! thanks in advance

 

 

/*==========================================
* Stole zeny from bl (mob)
* return
*    0 = fail
*    1 = success
*------------------------------------------*/

int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
{
    int rate,skill;
    struct mob_data *md;
    if(!sd || !target || target->type != BL_MOB)
        return 0;

    md = (TBL_MOB*)target;
    if( md->state.steal_coin_flag || md->sc.data[SC_STONE] || md->sc.data[SC_FREEZE] || md->status.mode&MD_BOSS )
        return 0;

    if( mob_is_treasure(md) )
        return 0;

    // FIXME: This formula is either custom or outdated.
    skill = pc_checkskill(sd,RG_STEALCOIN)*10;
    rate = skill + (sd->status.base_level - md->level)*3 + sd->battle_status.dex*2 + sd->battle_status.luk*2;
    if(rnd()%1000 < rate)
    {
        int amount = md->level*100 + rnd()%100;

        pc_getzeny(sd, amount, LOG_TYPE_STEAL, NULL);
        md->state.steal_coin_flag = 1;
        return 1;
    }
    return 0;
}
Edited by iraciz
Link to comment

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   107
  • Joined:  10/05/12
  • Last Seen:  

this is awesome, thankyou so much.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...