shadowwulf Posted July 30, 2008 Author Share Posted July 30, 2008 so in on attack i want to do the following.run my subs for player development on both parties-donecalculate/perform roll for the target to dodge the attack-designed but not scriptedcalculate damage to be done-where i have troublecalculate/perform roll for chance to crit-designed but not scriptedreduce damage if hit based on target def-designed but not scriptednow i can mess with the damage variable all i want but what about weapons?if i change it i am ignoring weapon bonuses.i didnt see any commands for checking the damage.would i have to script all weapons? Link to comment Share on other sites More sharing options...
balliztik1 Posted July 30, 2008 Share Posted July 30, 2008 No, you wouldn't. The OnAttack sub has a damage parameter. You can still use that to get the damage that the player would deal. Link to comment Share on other sites More sharing options...
munro Posted July 30, 2008 Share Posted July 30, 2008 on attack… does it count bows and magic too? Link to comment Share on other sites More sharing options...
balliztik1 Posted July 30, 2008 Share Posted July 30, 2008 Nopes. OnArrowHit controls bows. There's no sub for magic, though. There should be. It'd make for some sweet element systems. Link to comment Share on other sites More sharing options...
munro Posted July 30, 2008 Share Posted July 30, 2008 oh i didnt know there was an on arrow hit sub XDyea some kinda of onmagiccast or something would be helpful Link to comment Share on other sites More sharing options...
shadowwulf Posted July 30, 2008 Author Share Posted July 30, 2008 im dumb… now that i read this the next day i realize that if damage is basically the weapon damage then i should just use damage=damage+mycalculationsright?icould do the same for bows i guess... but it takes the player somuch skill to hit with bows already.... Link to comment Share on other sites More sharing options...
brutal Posted August 3, 2008 Share Posted August 3, 2008 You could do "damage=damage+mycalculations" but when the sub ends it wont add it to the damage they are doing, You would have to set that yourself. with``` Call DamagePlayer(PersonDoingDamageIndex, PersonRecievingDamageIndex, DamageAmount)``` Link to comment Share on other sites More sharing options...
shadowwulf Posted August 4, 2008 Author Share Posted August 4, 2008 isnt that the same as calling damageplayer? Link to comment Share on other sites More sharing options...
brutal Posted August 4, 2008 Share Posted August 4, 2008 No, Because the sub dosent return "damage" back to the server. Mellowz might add this, IDK, I did find a fix for RunCodeReturn in the SadScript class, so maybe he will take advantage of that and use it. Link to comment Share on other sites More sharing options...
dg1423 Posted August 4, 2008 Share Posted August 4, 2008 wait, what? when scripting is enabled, all damage is handled by sadscript. the server just calculates the damage, then damageplayer damages it in the onattack sub in main.txt. if you delete damageplayer from onattack, you can't damage anything. so if you modify the damage, you can change the damage people are doing. I don't know what Brutal is talking about with returning the damage, but modifying the damage variable will work if you modify it before the damageplayer call. Link to comment Share on other sites More sharing options...
shadowwulf Posted August 4, 2008 Author Share Posted August 4, 2008 exactly what i thought.the only question is how is damage being figured before OnAttack?i know the weapon is a factor and there is no other way to get a bonus from weapon damage.so making damage equal only my calculations is bad.but how else do i get weapon bonus? Link to comment Share on other sites More sharing options...
brutal Posted August 5, 2008 Share Posted August 5, 2008 Yes, I was talking to DG about this on MSN, It turns out they changed it in the source from the last time I was here. Sorry for the misleading information. Link to comment Share on other sites More sharing options...
balliztik1 Posted August 5, 2008 Share Posted August 5, 2008 @Shadowwulf:> exactly what i thought.> the only question is how is damage being figured before OnAttack?> i know the weapon is a factor and there is no other way to get a bonus from weapon damage.> so making damage equal only my calculations is bad.> but how else do i get weapon bonus?```Damage = Damage - GetPlayerStr(index) \ 2```Adding that line should make damage equal to just weapon and item bonuses. The Damage variable doesn't include an enemy's defense beforehand, I think. I haven't tested, though, so I'm not sure. Link to comment Share on other sites More sharing options...
dg1423 Posted August 5, 2008 Share Posted August 5, 2008 yes, yes it does. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now