View Single Post
Old 19.10.2007, 21:38   #4
mcrabben7
Guest
 
Posts: n/a
Default [SHARE] RBs that can absorb SA 11-12

Here is the way I did it recently. It's very similar. I have it set to use a 26% chance right now. Just change "i2 <= 25" to whatever chance you want. It's in two places. Your parameter idea is the better way to do it.

Also, your share has a bug at the line:

i0 = gg->Rand(( i1 + 1 ));

It's already a one-based counter, which is exactly what you want. Rand() will return 0 to i1 - 1 as the result, which is 0 to party members - 1, which is correct for a zero-based array like party. You're now making it a two-based counter, which is wrong, and will fail miserably to ever pick the first party member, and sometimes will try to pick the 10th party member. Take out the +1.

Compiled using SAIC (Supreme AI Compiler) written by Nevyn and Araylon. PM me if you're interested.

Anyways, here is a pack with source for Antaras Cloe along with a compiled version. It's a little different from yours, but works basically the same way. It also doesn't have your bug.

P.S. Not trying to steal your share, but just showing you what you did wrong.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 19 October 2007, 21:38. Открыть источник.