Jump to content
  • 0

I want All monsters to drop a Specific Item but im failing


Hayato

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   10
  • Joined:  11/15/17
  • Last Seen:  

Hi guys.. Im pretty new to rAthena and could need a little help here.

Im usingRagnarok Online complete offline pack 2017 | Make your RO server in less then 5 minutes

In my Server i want ALL monsters to drop a poring coin (@item 7539) with a 90% chance.

what i tried so far:

1. Create a txt in npc/custom called allmonstersdrop

2. edited the txt with

OnNPCKillEvent:
if( rand(100) < 10 ) // <---- tried 90 here instead of 10 aswell.. still no drops
   getitem 671,1;
end;

3. saved

4. opened \rathena\npc\scripts_custom.conf

and added the line

npc: npc/custom/allmonstersdrop.txt

5. went ingame and typed @loadnpc npc/custom/allmonstersdrop.txt

6. typed @reload script ingame

7. killed monsters but no poring coin drops

8. restarted server

9. killed monsters again and again no drop...

 

please help me out im kinda desperate

thanks a lot for your time!

Edited by rye305
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   21
  • Joined:  11/08/15
  • Last Seen:  

@Emistry Code:

 

OnNPCKillEvent:

if ( rand( 2 ) ) {

.@item_id = F_Rand( 501,502,503,504,505 );

getitem .@item_id,1;

}

end;

Just change:

-	script	Poring_Coin	-1,{
OnNPCKillEvent:

if ( rand( 100 ) <= 90 ) {

.@item_id = F_Rand( 7539 );

getitem .@item_id,1;

}

end;

}

Steps:

1) Create a txt in npc/custom/allmonstersdrop.txt

2) Put the code.

3) Save the file.

4) open  ...\rathena\npc\scripts_custom.conf

5) add npc: npc/custom/allmonstersdrop.txt

6)  type @reload script ingame

7). kill monsters.

Edited by Scanty
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  66
  • Reputation:   10
  • Joined:  11/15/17
  • Last Seen:  

On 17.11.2017 at 2:00 AM, Scanty said:

@Emistry Code:

 


OnNPCKillEvent:

if ( rand( 2 ) ) {

.@item_id = F_Rand( 501,502,503,504,505 );

getitem .@item_id,1;

}

end;

Just change:


-	script	Poring_Coin	-1,{
OnNPCKillEvent:

if ( rand( 100 ) <= 90 ) {

.@item_id = F_Rand( 7539 );

getitem .@item_id,1;

}

end;

}

Steps:

1) Create a txt in npc/custom/allmonstersdrop.txt

2) Put the code.

3) Save the file.

4) open  ...\rathena\npc\scripts_custom.conf

5) add npc: npc/custom/allmonstersdrop.txt

6)  type @reload script ingame

7). kill monsters.

best man

Edited by rye305
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

4 hours ago, rye305 said:

YOU ARE THE BEEEEEEEEEEEEEEEEEEEEEEEEEEST THANK YOUUUUUUUUUUU <3

 

Edit: Could you tell me how Mvps drop 5 poring coins instead of 1 ^^? PLEASE <3

If you want that every MvP get killed and obtain 5 x Poring Coin.

Here's the simple script:
 

-	script	F_TriggerMVVP	-1,{

OnNPCKillEvent:
	if( getmonsterinfo(killedrid,22) )
		announce "Congratulations! Player, "+ strcharinfo(0) +" has killed MVP "+ getmonsterinfo( killedrid, MOB_NAME ) +" and obtained 'Poring Coin' at "+ strcharinfo(3),0,0x00FF00;
		getitem 7539,5;
	end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  58
  • Reputation:   5
  • Joined:  07/16/17
  • Last Seen:  

A little late here, but Can you explain the rand ( 100 ) <=90? Lets say i wanted it to be 5%, what would the number have to changed to, <=5?

@Royr I figured it out in like 2 secs but thanks anyway! ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  90
  • Reputation:   34
  • Joined:  10/01/18
  • Last Seen:  

55 minutes ago, Kaleidoscope said:

A little late here, but Can you explain the rand ( 100 ) <=90? Lets say i wanted it to be 5%, what would the number have to changed to, <=5?

if( rand( 100 ) < 5 ) { // 5% 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

On 11/17/2017 at 11:13 AM, Deleted User said:

If you want that every MvP get killed and obtain 5 x Poring Coin.

Here's the simple script:
 

-	script	F_TriggerMVVP	-1,{

OnNPCKillEvent:
	if( getmonsterinfo(killedrid,22) )
		announce "Congratulations! Player, "+ strcharinfo(0) +" has killed MVP "+ getmonsterinfo( killedrid, MOB_NAME ) +" and obtained 'Poring Coin' at "+ strcharinfo(3),0,0x00FF00;
		getitem 7539,5;
	end;
}

 

I tried this script but let's say it barely works for me, I would like it to drop the poring coin only when I kill an MvP, but it turns out that when I kill an MvP, when I kill a skeleton, a poring, whatever it is, it drops the coin

 

here an imagen

drop.png

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2341
  • Joined:  10/28/11
  • Last Seen:  

OnNPCKillEvent:
	if (getmonsterinfo(killedrid,22)) {
		announce "Congratulations! Player, "+ strcharinfo(0) +" has killed MVP "+ getmonsterinfo( killedrid, MOB_NAME ) +" and obtained 'Poring Coin' at "+ strcharinfo(3), 0, 0x00FF00;
		getitem 7539, 5;
	}
	end;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.02
  • Content Count:  87
  • Reputation:   1
  • Joined:  01/18/18
  • Last Seen:  

On 11/17/2017 at 9:00 AM, Scanty said:

@Emistry Code:

 

OnNPCKillEvent:

if ( rand( 2 ) ) {

.@item_id = F_Rand( 501,502,503,504,505 );

getitem .@item_id,1;

}

end;

Just change:

-	script	Poring_Coin	-1,{
OnNPCKillEvent:

if ( rand( 100 ) <= 90 ) {

.@item_id = F_Rand( 7539 );

getitem .@item_id,1;

}

end;

}

 

how to add only  monster above 50 will drop thanks

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