Thread: [Pi] Better soulsplit code - No crash!

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31
  1. #1 [Pi] Better soulsplit code - No crash! 
    Donator

    Kickyamom's Avatar
    Join Date
    Jul 2010
    Posts
    1,606
    Thanks given
    208
    Thanks received
    157
    Rep Power
    835
    Earlier I posted in help section trying to get a better code, didn't happened. Fixed it myself. I'll get some media in a bit :] Looks almost just like RS
    (602 GFX+)


    Combatassistant:
    Player Soulsplit:
    Code:
    			if(c.curseActive[18]) { // SoulSplit GFX's
    					final int pX = c.getX();
    					final int pY = c.getY();
    					final int nX = Server.playerHandler.players[i].getX();
    					final int nY = Server.playerHandler.players[i].getY();
    					final int offX = (pY - nY)* -1;
    					final int offY = (pX - nX)* -1;
    					final Client giveHP = c;
    					//c.SSPLIT = true;
    					c.getPA().createPlayersProjectile2(pX, pY, offX, offY, 50, 50, 2263, 9, 9, - c.playerIndex - 1, 24, 0);
    				EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer b) {
     					Server.playerHandler.players[c.playerIndex].gfx0(2264); // 1738
    					//c.SSPLIT = false;
    				        b.stop();
    					}
    				}, 500);
    				EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer b) { 
    					c.getPA().createPlayersProjectile2(nX, nY, offX, offY, 50, 50, 2263, 9, 9, - c.playerId - 1, 24, 0);
    				        b.stop();
    					}
    				}, 800);
    				EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer b) {
    						try {
    							int before = giveHP.ssHeal; // Debug
    							giveHP.playerLevel[giveHP.playerHitpoints] += before;
    							if(giveHP.playerLevel[giveHP.playerHitpoints] > giveHP.getLevelForXP(giveHP.playerXP[giveHP.playerHitpoints])) {
    								giveHP.playerLevel[giveHP.playerHitpoints] = giveHP.getLevelForXP(giveHP.playerXP[giveHP.playerHitpoints]);
    							}
    							giveHP.ssHeal -= before;
    							//System.out.println(giveHP.playerName+" has been healed "+before+" HP."); // debugging purposes.
    						} catch(Exception e) { }
    						b.stop();
    					}
    				}, 1300); // Timer should be better.
    			}
    Or NPC soulsplit:
    Code:
    			if(c.curseActive[18]) { // SoulSplit NPC
    					final int pX = c.getX();
    					final int pY = c.getY();
    					final int nX = Server.npcHandler.npcs[i].getX();
    					final int nY = Server.npcHandler.npcs[i].getY();
    					final int offX = (pY - nY)* -1;
    					final int offY = (pX - nX)* -1;
    					final Client giveHP = c;
    					//c.SSPLIT = true;
    					c.getPA().createPlayersProjectile2(pX, pY, offX, offY, 50, 50, 2263, 9, 9, - c.playerIndex - 1, 24, 0);
    				EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer b) {
     					Server.npcHandler.npcs[c.npcIndex].gfx0(2264); // 1738
    					//c.SSPLIT = false;
    				        b.stop();
    					}
    				}, 500);
    				EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer b) { 
    					c.getPA().createPlayersProjectile2(nX, nY, offX, offY, 50, 50, 2263, 9, 9, - c.playerId - 1, 24, 0);
    				        b.stop();
    					}
    				}, 800);
    
    				EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer b) {
    						try {
    							int before = giveHP.ssHeal; // Debug
    							giveHP.playerLevel[giveHP.playerHitpoints] += before;
    							if(giveHP.playerLevel[giveHP.playerHitpoints] > giveHP.getLevelForXP(giveHP.playerXP[giveHP.playerHitpoints])) {
    								giveHP.playerLevel[giveHP.playerHitpoints] = giveHP.getLevelForXP(giveHP.playerXP[giveHP.playerHitpoints]);
    							}
    							giveHP.ssHeal -= before;
    						} catch(Exception e) { }
    						b.stop();
    					}
    				}, 1300); // Timer should be better.
    			}
    Almost forgot, add this to player
    Code:
    	ssHeal = 0,


    Spoiler for Respect for the Truest:

    #TWTMP GANG 4 LYFE
    Reply With Quote  
     

  2. #2  
    Banned Hellobuddyhowareyou's Avatar
    Join Date
    Mar 2011
    Posts
    738
    Thanks given
    27
    Thanks received
    20
    Rep Power
    0
    oo nice release i will add this when i add my curses later
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Sep 2010
    Age
    29
    Posts
    567
    Thanks given
    147
    Thanks received
    202
    Rep Power
    0
    The released project insanity servers already have the proper soulsplit methods these days.
    Reply With Quote  
     

  4. #4  
    Banned Hellobuddyhowareyou's Avatar
    Join Date
    Mar 2011
    Posts
    738
    Thanks given
    27
    Thanks received
    20
    Rep Power
    0
    Quote Originally Posted by Ducky View Post
    The released project insanity servers already have the proper soulsplit methods these days.
    but they are sending crashes lol??!?!

    EDIT: 600 POSTS
    Reply With Quote  
     

  5. #5  
    Donator

    Kickyamom's Avatar
    Join Date
    Jul 2010
    Posts
    1,606
    Thanks given
    208
    Thanks received
    157
    Rep Power
    835
    Gratz on 600 posts

    EDIT: Been using this on my server for an hour now, people pking/PvM'ng with soulsplit. No crashes yet :]


    Spoiler for Respect for the Truest:

    #TWTMP GANG 4 LYFE
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    Sep 2010
    Age
    29
    Posts
    567
    Thanks given
    147
    Thanks received
    202
    Rep Power
    0
    Quote Originally Posted by Wertic PvP View Post
    but they are sending crashes lol??!?!

    EDIT: 600 POSTS
    sending crashes???? I've never had any trouble with soulsplit before.
    Reply With Quote  
     

  7. #7  
    Banned Hellobuddyhowareyou's Avatar
    Join Date
    Mar 2011
    Posts
    738
    Thanks given
    27
    Thanks received
    20
    Rep Power
    0
    Quote Originally Posted by Ducky View Post
    sending crashes???? I've never had any trouble with soulsplit before.
    look at ur cmd when ur using ss and u will see alot's of errors...

    @kickyamom thx
    Reply With Quote  
     

  8. #8  
    Banned

    Join Date
    Sep 2010
    Age
    29
    Posts
    567
    Thanks given
    147
    Thanks received
    202
    Rep Power
    0
    Quote Originally Posted by Wertic PvP View Post
    look at ur cmd when ur using ss and u will see alot's of errors...

    @kickyamom thx
    As I already said, I've never had any trouble before, so also no "errors in the cmd". Anyway, if people have these issues, good job on this fix then.
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    Jun 2009
    Posts
    2,916
    Thanks given
    169
    Thanks received
    806
    Rep Power
    0
    This will crash your server, there is a different way not gonna sponfeed since u know better
    Reply With Quote  
     

  10. #10  
    Donator

    Kickyamom's Avatar
    Join Date
    Jul 2010
    Posts
    1,606
    Thanks given
    208
    Thanks received
    157
    Rep Power
    835
    Says the person who releases tuts on here from people on mopar


    Spoiler for Respect for the Truest:

    #TWTMP GANG 4 LYFE
    Reply With Quote  
     

Page 1 of 4 123 ... LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Soulsplit Crash
    By ashitrin in forum Help
    Replies: 3
    Last Post: 05-10-2011, 01:22 PM
  2. [PI] Soulsplit CRASH
    By Mark in forum Help
    Replies: 6
    Last Post: 05-01-2011, 08:05 PM
  3. Pi/dspk soulsplit crash
    By 'Legend in forum Help
    Replies: 3
    Last Post: 02-19-2011, 10:32 AM
  4. [PI][Soulsplit]Crash
    By Vegas in forum Help
    Replies: 6
    Last Post: 10-17-2010, 12:01 PM
  5. Replies: 3
    Last Post: 02-09-2010, 08:54 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •