Thread: [PI] Mining Animation, Simple Problem

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 [PI] Mining Animation, Simple Problem 
    Registered Member Struct Blitz's Avatar
    Join Date
    Nov 2013
    Age
    28
    Posts
    334
    Thanks given
    41
    Thanks received
    59
    Rep Power
    13
    Well mining works perfectly for me except for the rune and addy ores. When i click to mine them it does the mining animation for like 10 seconds, and then it stops, and 15 seconds later i get the ore + xp. I noticed If u click away after the mining animation has stopped but before you receive the rune or addy ore, it gets buggy and doesn't let u click on the ore for a little while.
    Heres a video to explain my problem View My Video

    Heres some of my Mining.Java
    Code:
     public void startMining(final int j, final int x, final int y, final int type) {
    		if (c.isMining)
    			return;
    		if (c.mining)
    			return;
    		int miningLevel = c.playerLevel[c.playerMining] ;
    		a = -1;
    		c.turnPlayerTo(x, y);
    		if (Rock_Settings[j][1] > miningLevel) {
    			c.sendMessage("You need a Mining level of " + Rock_Settings[j][1] + " to mine this rock.");
    			return;
    		}
    		for (int i = 0; i < Pick_Settings.length; i++) {
    			if (c.getItems().playerHasItem(Pick_Settings[i][0]) || c.playerEquipment[c.playerWeapon] == Pick_Settings[i][0]) {
    				if (Pick_Settings[i][1] <= miningLevel) {
    					a = i;
    				}
    			}
    		}
    		if (a == -1) {
    			c.sendMessage("You need a pickaxe to mine this rock.");
    			return;
    		}
    		if (c.getItems().freeSlots() < 1) {
    			c.sendMessage("You do not have enough inventory slots to do that.");
    			return;
    		}
    		c.startAnimation(Pick_Settings[a][3]);
    		c.isMining = true;
    		c.rockX = x;
    		c.rockY = y;
    		c.mining = true;
    		CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
    			@Override
    			public void execute(CycleEventContainer container) {
    				if (!c.isMining) {
    					container.stop();
    					c.startAnimation(65535);
    					return;
    				}
    				if (c.isMining) {
    					c.getItems().addItem(Rock_Settings[j][4], 1);
    					c.getPA().addSkillXP(Rock_Settings[j][2], c.playerMining);
    				}
    				if (c.getItems().freeSlots() < 1) {
    					c.sendMessage("You have ran out of inventory slots.");
    					container.stop();
    				}
    				mineRock(Rock_Settings[j][3], x, y, type, Rock_Settings[j][0]);
    				c.isMining = false;
    				container.stop();
    			}
    			@Override
    			public void stop() {
    				c.getPA().sendFrame107();
    				c.startAnimation(65535);
    				c.isMining = false;
    				c.rockX = 0;
    				c.rockY = 0;
    				c.mining = false;
    				return;
    			}
    		}, getTimer(j, a, miningLevel));
    	}
    
    	public int getTimer(int b, int c, int level) {
    		double timer = (int)((Rock_Settings[b][1]  * 2) + 20 + Misc.random(20))-((Pick_Settings[c][2] * (Pick_Settings[c][2] * 0.75)) + level);
    		if (timer < 2.0) {
    			return 2;
    		} else {
    			return (int)timer;
    		}
    	}
    
    	public void mineRock(int respawnTime, int x, int y, int type, int i) {
    		new Object(452, x, y, 0, type, 10, i, respawnTime);
    		for (int t = 0; t < Server.playerHandler.players.length; t++) {
    			if (Server.playerHandler.players[t] != null) {
    				if (Server.playerHandler.players[t].rockX == x && Server.playerHandler.players[t].rockY == y) {
    					Server.playerHandler.players[t].isMining = false;
    					Server.playerHandler.players[t].startAnimation(65535);
    					Server.playerHandler.players[t].rockX = 0;
    					Server.playerHandler.players[t].rockY = 0;
    				}
    			}
    		}
    	}
    	
    }
    I would appreciate any help
    Spoiler for Funniest moments on R-Server:

    Quote Originally Posted by Pandora7 View Post
    anyone can convert this ints to itemdef? but with no anInt?
    Code:
     case 18395:
    class8.anInt200 = 55991;
    Quote Originally Posted by Tomp View Post
    here u go
    Code:
    case 18395:
    anIntBallsInUrFace =55991;
    Quote Originally Posted by swizy View Post
    I don't see why you guys hating on trisidiax and insidiax so much, it's great for beginners.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Dec 2011
    Age
    29
    Posts
    794
    Thanks given
    92
    Thanks received
    84
    Rep Power
    250
    That code is an InsidiaX rip?

    Reply With Quote  
     

  3. #3  
    Registered Member Struct Blitz's Avatar
    Join Date
    Nov 2013
    Age
    28
    Posts
    334
    Thanks given
    41
    Thanks received
    59
    Rep Power
    13
    Quote Originally Posted by FortNightAtmo View Post
    That code is an InsidiaX rip?
    Idk? I took this from a tutorial for Better PI Mining because my mining was crap lol. Any ideas on whats wrong?
    Spoiler for Funniest moments on R-Server:

    Quote Originally Posted by Pandora7 View Post
    anyone can convert this ints to itemdef? but with no anInt?
    Code:
     case 18395:
    class8.anInt200 = 55991;
    Quote Originally Posted by Tomp View Post
    here u go
    Code:
    case 18395:
    anIntBallsInUrFace =55991;
    Quote Originally Posted by swizy View Post
    I don't see why you guys hating on trisidiax and insidiax so much, it's great for beginners.
    Reply With Quote  
     

  4. #4  
    Registered Member Struct Blitz's Avatar
    Join Date
    Nov 2013
    Age
    28
    Posts
    334
    Thanks given
    41
    Thanks received
    59
    Rep Power
    13
    Bump, can somebody please help
    Spoiler for Funniest moments on R-Server:

    Quote Originally Posted by Pandora7 View Post
    anyone can convert this ints to itemdef? but with no anInt?
    Code:
     case 18395:
    class8.anInt200 = 55991;
    Quote Originally Posted by Tomp View Post
    here u go
    Code:
    case 18395:
    anIntBallsInUrFace =55991;
    Quote Originally Posted by swizy View Post
    I don't see why you guys hating on trisidiax and insidiax so much, it's great for beginners.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Nov 2013
    Posts
    107
    Thanks given
    22
    Thanks received
    0
    Rep Power
    11
    same problem with my fishing, so BUMP
    im sure its just a problem with the emote not repeating after it completes it the first time. Check your fishing to make sure it doesn't do the same.
    Reply With Quote  
     

  6. #6  
    Registered Member Struct Blitz's Avatar
    Join Date
    Nov 2013
    Age
    28
    Posts
    334
    Thanks given
    41
    Thanks received
    59
    Rep Power
    13
    Quote Originally Posted by igpxnaruto4 View Post
    same problem with my fishing, so BUMP
    im sure its just a problem with the emote not repeating after it completes it the first time. Check your fishing to make sure it doesn't do the same.
    Nope my fishing is working fine o_O
    Spoiler for Funniest moments on R-Server:

    Quote Originally Posted by Pandora7 View Post
    anyone can convert this ints to itemdef? but with no anInt?
    Code:
     case 18395:
    class8.anInt200 = 55991;
    Quote Originally Posted by Tomp View Post
    here u go
    Code:
    case 18395:
    anIntBallsInUrFace =55991;
    Quote Originally Posted by swizy View Post
    I don't see why you guys hating on trisidiax and insidiax so much, it's great for beginners.
    Reply With Quote  
     

  7. #7  
    Registered Wizard

    Jesse's Avatar
    Join Date
    Sep 2009
    Age
    29
    Posts
    5,119
    Thanks given
    1,519
    Thanks received
    1,148
    Rep Power
    5000
    After a certain amount of ticks the animation needs to repeat for mining its 4 also it looks like your not doing anything in your code to repeat the animation and you need to.

    heres an example of how I did on apollo

    heres checking if its 0

    Code:
     if @anim_counter == 0
            mob.play_animation @pickaxe.animation
            @anim_counter = 4
    this is just lowering the tick by one

    Code:
    @anim_counter -= 1

    I'm not going to tell you where and what you should add heres is an example of how you can do it



    Reply With Quote  
     

  8. #8  
    Registered Member Struct Blitz's Avatar
    Join Date
    Nov 2013
    Age
    28
    Posts
    334
    Thanks given
    41
    Thanks received
    59
    Rep Power
    13
    Quote Originally Posted by JesseTheWizard View Post
    After a certain amount of ticks the animation needs to repeat for mining its 4 also it looks like your not doing anything in your code to repeat the animation and you need to.

    heres an example of how I did on apollo

    heres checking if its 0

    Code:
     if @anim_counter == 0
            mob.play_animation @pickaxe.animation
            @anim_counter = 4
    this is just lowering the tick by one

    Code:
    @anim_counter -= 1

    I'm not going to tell you where and what you should add heres is an example of how you can do it
    Im guessing in mining.java a=-1 is what ur talking about?
    Spoiler for Funniest moments on R-Server:

    Quote Originally Posted by Pandora7 View Post
    anyone can convert this ints to itemdef? but with no anInt?
    Code:
     case 18395:
    class8.anInt200 = 55991;
    Quote Originally Posted by Tomp View Post
    here u go
    Code:
    case 18395:
    anIntBallsInUrFace =55991;
    Quote Originally Posted by swizy View Post
    I don't see why you guys hating on trisidiax and insidiax so much, it's great for beginners.
    Reply With Quote  
     

  9. #9  
    Registered Wizard

    Jesse's Avatar
    Join Date
    Sep 2009
    Age
    29
    Posts
    5,119
    Thanks given
    1,519
    Thanks received
    1,148
    Rep Power
    5000
    if thats animations then yes but wouldn't this happen in the event not before it starts mining?



    Reply With Quote  
     

  10. #10  
    Registered Member Struct Blitz's Avatar
    Join Date
    Nov 2013
    Age
    28
    Posts
    334
    Thanks given
    41
    Thanks received
    59
    Rep Power
    13
    Quote Originally Posted by JesseTheWizard View Post
    if thats animations then yes but wouldn't this happen in the event not before it starts mining?
    You are kind of confusing me, i was looking in my Event files , now i'm looking in my mining.java, Can you please tell me where i should be looking?
    Spoiler for Funniest moments on R-Server:

    Quote Originally Posted by Pandora7 View Post
    anyone can convert this ints to itemdef? but with no anInt?
    Code:
     case 18395:
    class8.anInt200 = 55991;
    Quote Originally Posted by Tomp View Post
    here u go
    Code:
    case 18395:
    anIntBallsInUrFace =55991;
    Quote Originally Posted by swizy View Post
    I don't see why you guys hating on trisidiax and insidiax so much, it's great for beginners.
    Reply With Quote  
     

Page 1 of 2 12 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. [PI] Mining Animation Doesn't Reset
    By 2nubs1cup in forum Help
    Replies: 2
    Last Post: 09-06-2013, 04:13 AM
  2. [pi] Mining - Rune Rocks problem.
    By Grey Goose in forum Help
    Replies: 14
    Last Post: 02-14-2013, 01:59 PM
  3. PI mining animations
    By Ed17 in forum Help
    Replies: 0
    Last Post: 07-29-2011, 09:55 PM
  4. [PI]602 animations compile problem[PI]
    By Kittie in forum Help
    Replies: 4
    Last Post: 12-25-2010, 08:44 AM
  5. [PI] Quite A Simple Problem
    By Hustle in forum Help
    Replies: 2
    Last Post: 09-20-2010, 07:46 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
  •