Author Topic: Working darklight.  (Read 114 times)

Offline The Unholy

  • Steel Member
  • *
  • Posts: 36
  • Rep 4
    • View Profile
Working darklight.
« on: March 31, 2011, 06:49:09 pm »
Well, this is the snippet section and code doesn't get any smaller than this  :fp:

Basically, when using the Dark light and fighting lesser demons, the sword will always hit 15 + a random amount between 0 and 20. Have fun :D
Code: [Select]
if(plr.playerEquipment[plr.playerWeapon] == 6746 && (npcs[NPCID].npcType == 82)){
hitDiff = 15 + misc.random(20);
}

NOTE: With this code I'm sure you could work out how to make certain items super effective against a certain monster, or certain monsters, to add multiple NPC id's follow the below routine.
Code: [Select]
if(plr.playerEquipment[plr.playerWeapon] == 35 && (npcs[NPCID].npcType == 1 || npcs[NPCID].npcType == 2 || npcs[NPCID].npcType == 3 )){
hitDiff = 7;
}

This code causes the Excalibur to always one-hit men (Dealing 7 damage every time, the amount of HP men have!)

If it wasn't already obvious, yes this is how you can make the anger weapons hit high on the angry NPCs.

Share on Bluesky Share on Facebook


Offline Ferp

  • Dragon Member
  • *
  • Posts: 238
  • Rep 10001
  • Making the impossible, possible.
  • Location: Canada
    • View Profile
Re: Working darklight.
« Reply #1 on: March 31, 2011, 06:50:50 pm »
Darklight works on greater demons as well. To do that would you just re-do the code and change the NPCID to that of a greater demon?


Offline The Unholy

  • Steel Member
  • *
  • Posts: 36
  • Rep 4
    • View Profile
Re: Working darklight.
« Reply #2 on: March 31, 2011, 06:56:25 pm »
Code: [Select]
if(plr.playerEquipment[plr.playerWeapon] == 6746 && (npcs[NPCID].npcType == 82 || npcs[NPCID].npcType == 83 || npcs[NPCID].npcType == 84)){
hitDiff = 15 + misc.random(20);
}

There, that code is set to work for Lesser, Greater and Black demons.

Offline AdotSells

  • Firecape Member
  • *
  • Posts: 300
  • Rep 4
    • View Profile
Re: Working darklight.
« Reply #3 on: March 31, 2011, 07:13:08 pm »
Nicejob bro

Offline The Unholy

  • Steel Member
  • *
  • Posts: 36
  • Rep 4
    • View Profile
Re: Working darklight.
« Reply #4 on: March 31, 2011, 07:34:56 pm »
I know ;)

Offline Tampon Abuse

  • Dragon Member
  • *
  • Posts: 193
  • Rep 1
  • All vote for Rune-Kingdom!
  • Location: Oklahoma, Oklahoma City
    • View Profile
Re: Working darklight.
« Reply #5 on: April 03, 2011, 08:54:27 pm »
oh nice

Everyone Vote For RUNE-KINGDOM at http://www.mmorpgtop200.com/in.php?site=6792