@xray: Ok, first of all you need to define your ball. in your projects PBS folder go to items.txt and open it up. You'll need to add a new item that represents your ball at the bottom of the text file. It will look something like this.
Code:
502,SHADOWBALL,SHADOW BALL,2,400,"An illegal BALL that can be used to catch a trainers POKéMON.",0,2
502 is the item number and there should be a graphic called "item502.png" in the "graphics/items" folder, this will show up when you view the item in the menu. The graphic should be 48*48 pixels.
SHADOWBALL is the internal name of the item and is used to identify the item in any code.
SHADOW BALL is the name that will appear in the menu for the item
2 identifies the item as a BALL.
400 is the price of the item
The text inside the "quotation marks" will be the descritption text that shows up for the item.
0 tells the game that the item can be used only in battle
2 tells the game that when the item is used, it is a ball.
I'm going to assume that these values are the ones that you use.
Ok, now you need to go into the scripts (Press F11 in RMXP). Find the PokeBattle_Battle script. At the top there should be a section called 'def pbGetBallType(ball)'
You need to stick a comma at the end of the PREMIERBALL line then add a new line that reads:
Ok, now you need to find a section that reads
when PBItems::NESTBALL
if battler.level<30
rareness*=(40-battler.level)/10
end
It should be around line 119. After that you'll need a new section to tell the game how likely the ball is to catch the pokémon.
Code:
when PBItems::SHADOWBALL
rareness*=2
In this example I've made the Ball have the same success rate as an Ultra Ball, you can look at the examples if you want the ball to have a different success rate but I'm not sure how to give it the same rate as a normal Poké Ball. You should then copy and paste this code at the end of line 213.
Ok, now for the part that tells the code that the Shadow Ball CAN catch trainers Pokémon. Line 78 of PokeBattle_Battle should contain this code:
Simply change that to this:
Code:
if @opponent and itemname != "SHADOWBALL"
That should do it! I haven't actually tested this but I think I've covered everything. If there are any problems then just let me know and I'll have a look at it. I hope that this helps!