Thread: NPC Dual Wield
View Single Post
  #8  
Old 10-15-2009, 06:42 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

Went ahead and tested this, taking above code and adding debug messages:
Code:
					//can only dual weild without a weapon if your a monk
					if((GetEquipment(MATERIAL_SECONDARY) != 0 && GetLevel() > 39) || myclass == MONK || myclass == MONKGM) {
						float DualWieldProbability = (GetSkill(DUAL_WIELD) + GetLevel()) / 400.0f;
						printf("Probability Before Random: %f", DualWieldProbability);
						DualWieldProbability -= MakeRandomFloat(0, 1);
						printf("Probability After Random: %f", DualWieldProbability);
						if(DualWieldProbability < 0){
							Attack(target, 14);
							if (CanThisClassDoubleAttack()) 
							{
								sint32 RandRoll = rand()%100;
								printf("DoubleAttack Check: %i, Success? %i", %i, RandRoll < (GetLevel() + 20));
								if (RandRoll < (GetLevel() + 20))  
								{
									if (Attack(target, 14));
								}
Here's a level 44 Skeletal Monk pet going at it vs. a Phaes Spider in Dragon Necropolis:

Probability Before Random: 0.740000Probability After Random: 0.646369Probability
Before Random: 0.740000Probability After Random: 0.629035Probability Before Ran
dom: 0.740000Probability After Random: 0.349394Probability Before Random: 0.7400
00Probability After Random: 0.328153Probability Before Random: 0.740000Probabili
ty After Random: 0.129569Probability Before Random: 0.740000Probability After Ra
ndom: -0.029433DoubleAttack Check: 49, Success? 1Probability Before Random: 0.74
0000Probability After Random: -0.074081DoubleAttack Check: 8, Success? 1Probabil
ity Before Random: 0.740000Probability After Random: 0.274989Probability Before
Random: 0.740000Probability After Random: 0.279689Probability Before Random: 0.7
40000Probability After Random: 0.206414Probability Before Random: 0.740000Probab
ility After Random: 0.270778Probability Before Random: 0.740000Probability After
Random: -0.111894DoubleAttack Check: 95, Success? 0Probability Before Random: 0
.740000Probability After Random: -0.108079DoubleAttack Check: 43, Success? 1Prob
ability Before Random: 0.740000Probability After Random: 0.161308Probability Bef
ore Random: 0.740000Probability After Random: 0.190362Probability Before Random:
0.740000Probability After Random: -0.156573DoubleAttack Check: 92, Success? 0Pr
obability Before Random: 0.740000Probability After Random: -0.130205DoubleAttack
Check: 34, Success? 1Probability Before Random: 0.740000Probability After Rando
m: 0.103414

Here's a parse of him on another fight, using GAmParse, it has a report showing how many attempts per sec the pet has:

With hits (this ignores kicks)
1 Attempt per sec: 11
2 Attempt per sec: 14
3 Attempts per sec: 4
4 Attempts per sec: 4

I think that implies it's quadding. :P

Next pet is a lvl 60 Earth Pet, summoned via "Rathe's Son". Initially I'll not use weapons. No dual weilding printf messages being spammed.
For simplicity sake Ijust handed him two Fine Steel Scimitars.

Here's this lvl 60 pet spam:
Probability Before Random: 0.762500Probability After Random: 0.633620Probability
Before Random: 0.762500Probability After Random: -0.076210DoubleAttack Check: 8
0, Success? 0Probability Before Random: 0.762500Probability After Random: 0.3631
96Probability Before Random: 0.762500Probability After Random: 0.266910Probabili
ty Before Random: 0.762500Probability After Random: 0.213289Probability Before R
andom: 0.762500Probability After Random: 0.495371Probability Before Random: 0.76
2500Probability After Random: 0.062588Probability Before Random: 0.762500Probabi
lity After Random: -0.093056DoubleAttack Check: 75, Success? 1Probability Before
Random: 0.762500Probability After Random: 0.241183

So he's successfully quadding too. Here's a parse result like I did on the other pet:
Once again, ignoring kicks in parser
1 Attempt per sec: 2
2 Attempt per sec: 14
3 Attempts per sec: 1
4 Attempts per sec: 1

This is non-AA'd pet just using two weapons, it is getting quads off just very rarely.


Here you go:

Code:
[Thu Oct 15 16:13:45 2009] Zekab slashes a phase spider for 85 points of damage.
[Thu Oct 15 16:13:45 2009] Zekab pierces a phase spider for 85 points of damage.
[Thu Oct 15 16:13:47 2009] A phase spider tries to bite YOU, but  are INVULNERABLE!
[Thu Oct 15 16:13:47 2009] A phase spider tries to bite YOU, but  are INVULNERABLE!
[Thu Oct 15 16:13:48 2009] Zekab slashes a phase spider for 85 points of damage.
[Thu Oct 15 16:13:49 2009] A phase spider tries to kick YOU, but  are INVULNERABLE!
[Thu Oct 15 16:13:49 2009] Zekab kicks a phase spider for 21 points of damage.
[Thu Oct 15 16:13:51 2009] A phase spider tries to bite YOU, but  are INVULNERABLE!
[Thu Oct 15 16:13:51 2009] A phase spider tries to bite YOU, but  are INVULNERABLE!
[Thu Oct 15 16:13:51 2009] Zekab slashes a phase spider for 85 points of damage.
[Thu Oct 15 16:13:51 2009] Zekab slashes a phase spider for 58 points of damage.
[Thu Oct 15 16:13:54 2009] A phase spider tries to bite YOU, but  are INVULNERABLE!
[Thu Oct 15 16:13:54 2009] A phase spider tries to bite YOU, but  are INVULNERABLE!
[Thu Oct 15 16:13:54 2009] A phase spider tries to kick YOU, but  are INVULNERABLE!
---[Thu Oct 15 16:13:54 2009] Zekab kicks a phase spider for 61 points of damage.
---[Thu Oct 15 16:13:54 2009] Zekab slashes a phase spider for 59 points of damage.
---[Thu Oct 15 16:13:54 2009] Zekab slashes a phase spider for 65 points of damage.
---[Thu Oct 15 16:13:54 2009] Zekab pierces a phase spider for 59 points of damage.
---[Thu Oct 15 16:13:54 2009] Zekab pierces a phase spider for 60 points of damage.
[Thu Oct 15 16:13:57 2009] A phase spider tries to bite YOU, but  are INVULNERABLE!
[Thu Oct 15 16:13:57 2009] Zekab slashes a phase spider for 58 points of damage.
[Thu Oct 15 16:13:57 2009] Zekab tries to slash a phase spider, but misses!
[Thu Oct 15 16:13:59 2009] A phase spider tries to kick YOU, but  are INVULNERABLE!
[Thu Oct 15 16:13:59 2009] Zekab tries to bash a phase spider, but misses!
[Thu Oct 15 16:13:59 2009] Your EarthElementalStrike2 spell has worn off of a phase spider.
[Thu Oct 15 16:14:00 2009] Zekab tries to slash a phase spider, but misses!
[Thu Oct 15 16:14:00 2009] Zekab tries to slash a phase spider, but misses!
[Thu Oct 15 16:14:00 2009] A phase spider tries to bite YOU, but  are INVULNERABLE!
[Thu Oct 15 16:14:00 2009] A phase spider tries to bite YOU, but  are INVULNERABLE!
[Thu Oct 15 16:14:03 2009] a phase spider scowls at you, ready to attack -- You would probably win this fight..it's not certain though.
That's a quad.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote