Thread: magic doesnt work[delta]

Results 1 to 3 of 3
  1. #1 magic doesnt work[delta] 
    Extreme Donator

    sexyrussian's Avatar
    Join Date
    Nov 2009
    Posts
    887
    Thanks given
    47
    Thanks received
    23
    Rep Power
    0
    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.
    Reply With Quote  
     

  2. #2  
    Registered Member
    PSNB's Avatar
    Join Date
    Aug 2009
    Posts
    885
    Thanks given
    8
    Thanks received
    103
    Rep Power
    590
    You're trying to attack an invalid npc (at index -1).
    Reply With Quote  
     

  3. #3  
    Extreme Donator

    sexyrussian's Avatar
    Join Date
    Nov 2009
    Posts
    887
    Thanks given
    47
    Thanks received
    23
    Rep Power
    0
    Quote Originally Posted by PSNB View Post
    You're trying to attack an invalid npc (at index -1).
    but meleeing works, range also works
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •