Combat code released

A

Aravis

Guest
Yup, after a bit of hacking I managed to find Mythics combat code (melee only I'm afraid). I've put it in pseudo-code for the non-programmers among us;

IF XPToNextLevel > 80% THEN
....IF randomnumber => 1 AND randomnumber <= 49 THEN
........PRINT "You miss!"
....ELSEIF randomnumber => 50 AND randomnumber <= 99 THEN
........PRINT "You fumble!"
....ELSE
........CALL BlimeyHeManagedToHitItMakeSureMobHitsHimBackForTwiceTheDamageHeDoes
....END IF
ELSE
....CALL NormalCombatCode
END IF

The Block/parry/miss code is similar;

IF XPToNextLevel > 80% THEN
....IF randomnumber => 1 AND randomnumber <= 49 THEN
........CALL CriticalHitOnPlayer
....ELSEIF randomnumber => 50 AND randomnumber <= 99 THEN
........CALL SuperCriticalHitOnPlayer
....ELSE
........CALL LinkDeadDuringFight
....END IF
ELSE
....CALL NormalCombatCode
END IF
 
A

Aravis

Guest
I'm still trying to decompile the randomnumber function but it looks like the nerf code is included in there somewhere ;)

Unfortunately the nerf code is the largest part :/
 
G

Gabrial

Guest
its mostly correct but you missed out a little part...

IF XPToNextLevel > 80% THEN
....IF randomnumber => 1 OR randomnumber <= 49 THEN
........PRINT "You miss!"
....ELSEIF randomnumber => 50 OR randomnumber <= 99 THEN
........PRINT "You fumble!"
....ELSEIF randomnumber == 100 THEN
........PRINT "You critical hit!"

....ELSE
........CALL BlimeyHeManagedToHitItMakeSureMobHitsHimBackForTwiceTheDamageHeDoes
....END IF
ELSE
....CALL NormalCombatCode
END IF

Oh, and your OR's should be AND's otherwise if the XPToNextLevel > 80% the result would always be "You miss!" assuming randomnumber cannot be 0 or lower :)
 
T

Teh Fonz!!1

Guest
So DAoC is programmed in Basic huh?

That explains so much...
 
J

Jergiot

Guest
HEY

....ELSEIF randomnumber => 50 OR randomnumber <= 99 THEN
........PRINT "You fumble!"

this one i see way to often, nerf something damn it =P
 
T

Tilda

Guest
im sure this is all very bad :)
and it dosnt make a word of sense to me :)

Tilda
 
S

st-george

Guest
Gabrial, your Boolean Algebra is a bit rusty mate.

If you use OR, any number will pass the IF test:

>=1 means 1 to infinity

<=49 means -infinity to 49

If either of these tests need to be true, then any number from -infinity to infinity will pass, ie the test will always succeed.

Using AND, both tests need to be true, so the test will only succeed where the ranges overlap ie from 1 to 49.

That sounds logical to me...I think :D
 
M

Meatballs

Guest
Code:
if fps() > 5 then
       addlag(2000000)
endif
 
C

Cadire

Guest
Code:
If Mob_Health < 10%
      Call Miss5TimesInARow()
End If


This is fun :)
 
G

Gabrial

Guest
Originally posted by st-george
Gabrial, your Boolean Algebra is a bit rusty mate.

If you use OR, any number will pass the IF test:

>=1 means 1 to infinity

<=49 means -infinity to 49

If either of these tests need to be true, then any number from -infinity to infinity will pass, ie the test will always succeed.

Using AND, both tests need to be true, so the test will only succeed where the ranges overlap ie from 1 to 49.

That sounds logical to me...I think :D


Yeah - thats what I want to happen:)

Lets take a worked example (im bored:)) :

Using the original program (I cant believe im writing this:)) and a random number generated of 5 what happens?

We compare against the first half of the statement : is 5 >= 1? Yes it is. The rest of the line is irrelevant because the operator is OR so as long as one of the Statements is true we can proceed.

Now take a random number of 87 and compare against the first half again: is 87 >= 1? Yes it is. Again we ignore the rest of the line because it is an OR:)

you see?

p.s. I really cant believe im typing this:)


/EDIT
Oh I see what you mean now george:) Read the bottom of my earlier post and I say he needs to use AND and not OR:)
 
R

Roo Stercogburn

Guest
lol :clap:

Had a go. Here's the actual code:

Sub Main()

Dim Roo AS Noob SpiritMaster

Set Roo.Level = INT(RND * 50)+50

CALL SpiritPet

If SpiritPet.Level < Legion.Level then
UNLOAD SpiritPet
LOAD SpiritLegion
Set Legion.Visible = 0
End If

LookHarmlessAndVulnerable(Roo)

Abilities(Roo)

End Main

Sub LookHarmlessAndVulnerable(SpiritMaster as Object)

PyjamaArmour(SpiritMaster)
GimpLook(SpiritMaster)
FalseCon(Yellow=Lvl40, SpiritMaster)

End Sub


Sub Abilities(SpiritMaster AS Object)

With SpiritMaster
.Stealth=True
.TrueSight=True
.BuffbotRemove=TRue
End With

Unload Mjollneir
Unload AreaDoT

End Sub
 
B

BubbleCDR

Guest
So you can change how much you hit for? :-D im no good at all this stuff i only know HTML i heard of some of the commands but not most (and im not v good at HTML either):clap:
 
S

Sharma

Guest
you forgot

Sub_Overpowered

If Damage = Overpowered
Call Nerf

Nerf:
Damage/2/2/2/2/2/2/2-5%

end Sub
 
S

st-george

Guest
Ahhh, I see what happened here now, Gabrial.

Aravis had already edited his post when I read it, so I thought you were trying to make him use OR instead of AND. Or something. My head hurts.

/nerf post editing :D
 
O

old.Tohtori

Guest
IF LAG>PATIENCE=GOTO BEER

IF MONEY<BEER=GOTO HOME

No coder likes these things :p

That's why we at GFX laugh at them so much and make fun fun of the code people. They silly bunch. :D
 
G

Gabrial

Guest
I didnt realise he had edited.

How do these threads live?!
 

Users who are viewing this thread

Top Bottom