![]() |
Random Damage for melee players and NPC'S. - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51) +----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44) +------ Forum: Tutorials (https://mirage-engine.uk/forums/forumdisplay.php?fid=13) +------ Thread: Random Damage for melee players and NPC'S. (/showthread.php?tid=2781) |
Random Damage for melee players and NPC'S. - Jack - 04-05-2009 This tutorial is simple to follow and is very good and simple. 0.5/5 Difficulty 1/5 Understanding code Ok lets begin. This is all server side code btw. Go to Game logic and put at bottom of it add: Code: Public Function Rand(ByVal low As Long, high As Long) As Long Now find Code: If Not CanPlayerCriticalHit(index) Then change Code: Damage = GetPlayerDamage(Index) - GetPlayerProtection(i) with Code: Damage = GetPlayerDamage(index) This should help you guys learn some more of damage ranges, ill let you figure out how to do it with Magic damage ranges and how to make it have damage ranges when you attack Npcs.. Dont want everyone copying and pasting ![]() also had help from Dugor if there is any problems message me about it |