Jump to content
  • 0
JoseRicart

[MVP COIN] MvP Drop Coin

Question

good morning, my name is Jose and it is a pleasure to return to these whereabouts of the world of rathena after a long break for personal reasons, as usual I come to disturb a bit here.

About 4-5 years ago I had a script which when you killed an MvP gave you a coin automatically, it turns out that when I added it to the server's custom scripts it is, let's say, "half-working" since it is true that the script when you kill an MvP, it drops the coin, but also when you kill a poring, a skeleton, a zombie, a plant, a spore, in short, when you kill everything.

Could someone help me or give me some support?

I upload the script with an imagen for example

 

drop.png

mvpdropcoin.txt

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
4 hours ago, JoseRicart said:

good morning, my name is Jose and it is a pleasure to return to these whereabouts of the world of rathena after a long break for personal reasons, as usual I come to disturb a bit here.

About 4-5 years ago I had a script which when you killed an MvP gave you a coin automatically, it turns out that when I added it to the server's custom scripts it is, let's say, "half-working" since it is true that the script when you kill an MvP, it drops the coin, but also when you kill a poring, a skeleton, a zombie, a plant, a spore, in short, when you kill everything.

Could someone help me or give me some support?

I upload the script with an imagen for example

 

drop.png

mvpdropcoin.txt 282 B · 2 downloads

Try to use this line, change your script a bit.

if ( getmonsterinfo( killedrid, MOB_MVPEXP ))
Edited by Chaos92
missing a curly bracket
Link to comment
Share on other sites

  • 0
Posted (edited)

Still the same, i add an image,

 

Red Reference means i killed an MvP = Drop coin and announce it

Green referente means i killed poring = drop coin no announce it

drop2.png

Edited by JoseRicart
Link to comment
Share on other sites

  • 0
58 minutes ago, JoseRicart said:

Still the same, i add an image,

 

Red Reference means i killed an MvP = Drop coin and announce it

Green referente means i killed poring = drop coin no announce it

drop2.png

 this?

Spoiler

OnNPCKillEvent:
    [email protected] = 607;
    if(getmonsterinfo(killedrid,MOB_MVPEXP)){
        announce strcharinfo(0)+" killed "+getmonsterinfo(killedrid,MOB_NAME)+" get "+getitemname([email protected]),bc_all,0x00FF00;
        getitem [email protected],1;
    }
    end;

 

  • Upvote 1
Link to comment
Share on other sites

  • 0
36 minutes ago, Mahiro said:

 this?

  Hide contents

OnNPCKillEvent:
    [email protected] = 607;
    if(getmonsterinfo(killedrid,MOB_MVPEXP)){
        announce strcharinfo(0)+" killed "+getmonsterinfo(killedrid,MOB_NAME)+" get "+getitemname([email protected]),bc_all,0x00FF00;
        getitem [email protected],1;
    }
    end;

 

 

oh wow your amazin, was missing a curly but now all work, tysm

 

 

in case someone wants the script working, here the script

NOTE: IGNORE THE COMMENT ON THE CODE

 

curly.png

mvpdropcoin.txt

Link to comment
Share on other sites

  • 0
6 hours ago, JoseRicart said:

good morning, my name is Jose and it is a pleasure to return to these whereabouts of the world of rathena after a long break for personal reasons, as usual I come to disturb a bit here.

About 4-5 years ago I had a script which when you killed an MvP gave you a coin automatically, it turns out that when I added it to the server's custom scripts it is, let's say, "half-working" since it is true that the script when you kill an MvP, it drops the coin, but also when you kill a poring, a skeleton, a zombie, a plant, a spore, in short, when you kill everything.

Could someone help me or give me some support?

I upload the script with an imagen for example

 

drop.png

mvpdropcoin.txt 282 B · 4 downloads

I made this on a phone...Please give a try (based on your script and optimized it).

I added some multiple items  reward with chances added some flavor to your server. 🤣

//Created Date: 04/07/2022
-	script	AEOUS_MVP_DROP	FAKE_NPC,{
	end;
OnNPCKillEvent:
	[email protected] = rand(1,100);
	if( getmonsterinfo( killedrid,MOB_MVPEXP ) ) {
	for( [email protected] = 0; [email protected] < getarraysize(.item_arrays); [email protected] += 3 ) {
		if( [email protected] < .item_arrays[[email protected]+2] ) {
			getitem .item_arrays[[email protected]], .item_arrays[[email protected]+1];
			announce "Congratulations! Player "+ strcharinfo(0) +" has obtained "+ getitemname( .item_arrays[[email protected]] ) +" ["+ .item_arrays[[email protected]+1] +"] from "+ getmonsterinfo(killedrid, 0) +" (chance: "+.item_arrays[[email protected]+2]+"%) MVP Drop(s).",bc_all,0x00FF00;
		}
	}
	end;
}

OnInit:
//	(<structure,<item_id>,<chances>)
	setarray .item_arrays[0],
		675,	1,	10,
		677,	1,	30,
		7539,	1,	100;
	end;
}

 

Edited by Royr
Link to comment
Share on other sites

  • 0
2 hours ago, Royr said:

I made this on a phone...Please give a try (based on your script and optimized it).

I added some multiple items  reward with chances added some flavor to your server. 🤣

//Created Date: 04/07/2022
-	script	AEOUS_MVP_DROP	FAKE_NPC,{
	end;
OnNPCKillEvent:
	[email protected] = rand(1,100);
	if( getmonsterinfo( killedrid,MOB_MVPEXP ) ) {
	for( [email protected] = 0; [email protected] < getarraysize(.item_arrays); [email protected] += 3 ) {
		if( [email protected] < .item_arrays[[email protected]+2] ) {
			getitem .item_arrays[[email protected]], .item_arrays[[email protected]+1];
			announce "Congratulations! Player "+ strcharinfo(0) +" has obtained "+ getitemname( .item_arrays[[email protected]] ) +" ["+ .item_arrays[[email protected]+1] +"] from "+ getmonsterinfo(killedrid, 0) +" (chance: "+.item_arrays[[email protected]+2]+"%) MVP Drop(s).",bc_all,0x00FF00;
		}
	}
	end;
}

OnInit:
//	(<structure,<item_id>,<chances>)
	setarray .item_arrays[0],
		675,	1,	10,
		677,	1,	30,
		7539,	1,	100;
	end;
}

 

wow man you give me a fucking idea and sorry for the word ffs, your a fking legend.

Basically i can add custom items wiht % of drop whenever you kill an MvP omfg asjhkdhjksfjhdsfjhkdashfnbjkh im so excited

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...

Important Information

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