xxXReichoXxx Posted December 8, 2011 Author Share Posted December 8, 2011 i have a mod witch allows npc to use spells but its spell damage is always same. ex: it will always hit 700 vital dmg .for spell atm its```InitDamage = Spell(spellNum).Vital + (Npc(MapNpc(mapNum).Npc(mapNpcNum).Num).Stat(Stats.intelligence) / 2)Damage = InitDamage - Player(victim).Stat(Stats.willpower)```that code is basically like = spell damage - player def (but it will still stay same)If Npc uses melee hit it will vary so it doesnt always hit the same amount. so i thought if i could put spell dmg + melee so spell damage is always different.id like to add here + physical damageĀ but i have no idea how to code that. Link to comment Share on other sites More sharing options...
Jacquelinett Posted December 8, 2011 Share Posted December 8, 2011 Look.just add a + (NPC(MapNpc(mapNum).npc(mapNpcNum).num).stat(Stats.Attackorsomething represent it like GetDamage)/1 or by 2) up to u Link to comment Share on other sites More sharing options...
xxXReichoXxx Posted December 8, 2011 Author Share Posted December 8, 2011 actually i tryed + Strength but it just adds the strength and damage is still same-.- .lets say str is 255 and spell vit is 600 now it will just hit 855 and whenever it hits char its just the same this isnt really what i want. i want it to attack like its hitting with its basic attack.(dmg is different) Link to comment Share on other sites More sharing options...
blkcrow Posted December 8, 2011 Share Posted December 8, 2011 this code is for calculating the max damage the ncp can do after that you have to calculate a random number from a lower value to max damage (the lower value is up to you). My english is bad so i hope you understand what i am saying 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