Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Random attack amount? (I.E in RS)


Pasketi
 Share

Recommended Posts

Oh, wow, I was ready to write a script, but this is in the source section. Sooo much easier. There's a couple ways to do this. One, you could edit all the items to have properties for crit chance, min and max damage, armor penetration, etc. This would provide you a lot of editing power the moment the item is created. Alternately, you could find where the game calls "OnAttack" and change the damage value before it goes through. Better yet, you could take out "OnAttack" altogether, and just make it in the source code. You'd take the damage value, increase it by whatever stats you want, give it a damage range, subtract for resistances, etc., etc.

The first way is a bit more in-depth, but will give you a solid base. The second way is easy, but might require more work, depending on how many weapons you have, or types of damage, or variations that you'll need.

As for a tutorial, no, I don't think one exists. It's been done via scripting quite often. Check out the scripts, and just use them before the OnAttack rather than after.
Link to comment
Share on other sites

I wasn't gonna ask for script, because they make things lil more complicated (I.E. that "advanced attack script" needs all of the weapons be scripted seperatedly) so i'll ask for tutorial now, but i'll show that post to my "coder", so he can say can he do it…
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...