Thread: Duel arena

Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28
  1. #21  
    Donator

    Join Date
    Nov 2012
    Posts
    769
    Thanks given
    45
    Thanks received
    41
    Rep Power
    18
    Quote Originally Posted by arch337 View Post
    Remove this code inside the walk packet (mention above) if you do not want the user to get the 'spoil' aka the items won when click on the floor.
    Code:
    			if(c.duelStatus == 6) {
    				c.getTradeAndDuel().claimStakedItems();		
    			}
    Now i dont get spoils screen and the items dont appear anywhere

    EDIT: When i moved around its like the interface was invisible and when i clicked the screen i got the spoils in my invent.
    Reply With Quote  
     

  2. Thankful user:


  3. #22  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,584
    Thanks given
    160
    Thanks received
    248
    Rep Power
    396
    Quote Originally Posted by Relentless View Post
    Now i dont get spoils screen and the items dont appear anywhere

    EDIT: When i moved around its like the interface was invisible and when i clicked the screen i got the spoils in my invent.
    Well this code was just about claim items and never to showcase the 'spoil' interface.
    Reason is you just want it to send the interface when someone are finished teleporting.
    So try find what sets the interface and have it send after you done teleporting.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  4. Thankful user:


  5. #23  
    Donator

    Join Date
    Nov 2012
    Posts
    769
    Thanks given
    45
    Thanks received
    41
    Rep Power
    18
    Quote Originally Posted by arch337 View Post
    Well this code was just about claim items and never to showcase the 'spoil' interface.
    Reason is you just want it to send the interface when someone are finished teleporting.
    So try find what sets the interface and have it send after you done teleporting.
    I understand, However it does appear fine unless i click the floor
    Reply With Quote  
     

  6. Thankful user:


  7. #24  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,584
    Thanks given
    160
    Thanks received
    248
    Rep Power
    396
    Quote Originally Posted by Relentless View Post
    I understand, However it does appear fine unless i click the floor
    Above
    Code:
    c.getPA().removeAllWindows();
    add
    Code:
    if(c.duelStatus != 6)
    c.getPA().removeAllWindows();


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. Thankful user:


  9. #25  
    Donator

    Join Date
    Nov 2012
    Posts
    769
    Thanks given
    45
    Thanks received
    41
    Rep Power
    18
    Quote Originally Posted by arch337 View Post
    Above
    Code:
    c.getPA().removeAllWindows();
    add
    Code:
    if(c.duelStatus != 6)
    c.getPA().removeAllWindows();
    Added that to applydeath above removeAllWindows();
    Still the same issue, when the winner kills the other player, And click the floor
    Reply With Quote  
     

  10. Thankful user:


  11. #26  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,584
    Thanks given
    160
    Thanks received
    248
    Rep Power
    396
    Quote Originally Posted by Relentless View Post
    Added that to applydeath above removeAllWindows();
    Still the same issue, when the winner kills the other player, And click the floor

    [Only registered and activated users can see links. ]
    To the walk code not your applyDeath..
    Code:
    package server.model.players.packets;
    
    import server.Server;
    import server.model.players.Client;
    import server.model.players.PacketType;
    
    /**
     * Walking packet
     **/
    public class Walking implements PacketType {
    
    	@Override
    	public void processPacket(Client c, int packetType, int packetSize) {		
    		if (packetType == 248 || packetType == 164) {
    			c.clickObjectType = 0;
    			c.clickNpcType = 0;
    			c.faceUpdate(0);
    			c.npcIndex = 0;
    			c.playerIndex = 0;
    			if (c.followId > 0 || c.followId2 > 0)
    				c.getPA().resetFollow();
    		}		
    		if((c.duelStatus >= 1 && c.duelStatus <= 4) || c.duelStatus == 6) {
    			return;
    		}
    		if(c.duelStatus != 6)
    c.getPA().removeAllWindows();
    		if(c.duelRule[1] && c.duelStatus == 5) {
    			if(Server.playerHandler.players[c.duelingWith] != null) { 
    				if(!c.goodDistance(c.getX(), c.getY(), Server.playerHandler.players[c.duelingWith].getX(), Server.playerHandler.players[c.duelingWith].getY(), 1) || c.attackTimer == 0) {
    					c.sendMessage("Walking has been disabled in this duel!");
    				}
    			}
    			c.playerIndex = 0;	
    			return;		
    		}
    		
    		if(c.openDuel) {
    			Client o = (Client) Server.playerHandler.players[c.duelingWith];
    			c.openDuel = false;
    			o.openDuel = false;
    			c.getPA().closeAllWindows();
    			o.getPA().closeAllWindows();
    	}
    		
    		if(c.freezeTimer > 0) {
    			if(Server.playerHandler.players[c.playerIndex] != null) {
    				if(c.goodDistance(c.getX(), c.getY(), Server.playerHandler.players[c.playerIndex].getX(), Server.playerHandler.players[c.playerIndex].getY(), 1) && packetType != 98) {
    					c.playerIndex = 0;	
    					return;
    				}
    			}
    			if (packetType != 98) {
    				c.sendMessage("A magical force stops you from moving.");
    				c.playerIndex = 0;
    			}	
    			return;
    		}
    		
    		if (System.currentTimeMillis() - c.lastSpear < 4000) {
    			c.sendMessage("You have been stunned.");
    			c.playerIndex = 0;
    			return;
    		}
    		
    		if (packetType == 98) {
    			c.mageAllowed = true;
    		}
    		
    		if(c.respawnTimer > 3) {
    			return;
    		}
    		if(c.inTrade) {
    			return;
    		}
    		if(packetType == 248) {
    			packetSize -= 14;
    		}
    		c.newWalkCmdSteps = (packetSize - 5)/2;
    		if(++c.newWalkCmdSteps > c.walkingQueueSize) {
    			c.newWalkCmdSteps = 0;
    			return;
    		}
    		
    		c.getNewWalkCmdX()[0] = c.getNewWalkCmdY()[0] = 0;
    		
    		int firstStepX = c.getInStream().readSignedWordBigEndianA()-c.getMapRegionX()*8;
    		for(int i = 1; i < c.newWalkCmdSteps; i++) {
    			c.getNewWalkCmdX()[i] = c.getInStream().readSignedByte();
    			c.getNewWalkCmdY()[i] = c.getInStream().readSignedByte();
    		}
    		
    		int firstStepY = c.getInStream().readSignedWordBigEndian()-c.getMapRegionY()*8;
    		c.setNewWalkCmdIsRunning(c.getInStream().readSignedByteC() == 1);
    		for(int i1 = 0; i1 < c.newWalkCmdSteps; i1++) {
    			c.getNewWalkCmdX()[i1] += firstStepX;
    			c.getNewWalkCmdY()[i1] += firstStepY;
    		}
    	}
    
    }


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  12. Thankful users:


  13. #27  
    Donator

    Join Date
    Nov 2012
    Posts
    769
    Thanks given
    45
    Thanks received
    41
    Rep Power
    18
    Fixed. Thank you, much appreciated.
    Reply With Quote  
     

  14. Thankful user:


  15. #28  
    Registered Thanker
    MrClassic's Avatar
    Join Date
    Oct 2008
    Age
    24
    Posts
    1,814
    Thanks given
    5,984
    Thanks received
    144
    Rep Power
    2010
    Glad to hear that
    Thanks, MrClassic.

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

Page 3 of 3 FirstFirst 123

Thread Information
Users Browsing this Thread

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

Similar Threads

  1. o.O My New Pure In Duel Arena
    By JavaŠ in forum Media
    Replies: 8
    Last Post: 04-07-2007, 10:22 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
  •