i noticed that hit diff doesn't work in special attacks of ranged weapons.
so i tried fixing it.
i messed around and then gave up and like a month later i get find out my magic doesn't work.
when i use a spell on a npc, it does the casting emote, and then
it gives me an error
Code:
Loaded WorldMap In (78 ms)...
DeltaScape Server.
Connection from cpe-24-94-71-183.hawaii.res.rr.com:4198
[client-1-Sexyrussian]: Loading Process Completed [Has powers, lag: 16 ms]
Error with player 1, Sexyrussian
java.lang.ArrayIndexOutOfBoundsException: -1
at client.npcMageHit(client.java:3180)
at client.npcMageDamage(client.java:3028)
at client.appendHitToNpc(client.java:3586)
at client.process(client.java:19630)
at PlayerHandler.process(PlayerHandler.java:319)
at process.run(process.java:23)
at java.lang.Thread.run(Unknown Source)
Game saved for player Sexyrussian
ClientHandler: Client Sexyrussian disconnected (cpe-24-94-71-183.hawaii.res.rr.c
om)
Connection from cpe-24-94-71-183.hawaii.res.rr.com:4199
[client-1-Sexyrussian]: Loading Process Completed [Has powers, lag: 0 ms]
line 3180 through 3190
Code:
if (server.npcHandler.npcs[attacknpc].npcType == 3799) { //corp
rand_npc = misc.random(999);
}
if (server.npcHandler.npcs[attacknpc].npcType == 1114) { //kree'arra
rand_npc = misc.random(120);
}
if (server.npcHandler.npcs[attacknpc].npcType == 3599) { //td
rand_npc = misc.random(146);
}
if (server.npcHandler.npcs[attacknpc].npcType == 117 || server.npcHandler.npcs[attacknpc].npcType == 112) { // giant
rand_npc = misc.random(50);
lines 3028 to 3038
Code:
if(npcMageHit()){
return misc.random(MagicHandler.spellID);
} else {
return 0;
}
}
public boolean npcRangeHit(){
int rand_att = misc.random(playerLevel[4]) + misc.random(playerBonus[4]) + misc.random(RangePray * 8);
int rand_npc = 0;
if (server.npcHandler.npcs[attacknpc].npcType == 3799) { //corp
rand_npc = misc.random(315);
so pretty much it turned the whole magic thing into error
can someone pleeeeease lay out all the parts of magic in delta that are located in client.java? cuz thats the only thing i modified.