Thread: [Devov7] old and easy.

Results 1 to 4 of 4
  1. #1 [Devov7] old and easy. 
    Banned
    Join Date
    Dec 2006
    Posts
    237
    Thanks given
    2
    Thanks received
    0
    Rep Power
    0
    Hi guys,

    Getting back into coding after an extremely long time out of the game - hence the noob code below.

    Just wanted to know - how do I make it so that the animation complete before the XP is given? so that it looks like once the player finishes the fletching emote it grants the xp because he has actually finished fletching rather than as soon as the player starts the emote xp is granted?

    I'm still unsure of how to use action timers and that so if someone could give me a simple fix that'd be great

    Code:
    			if ((itemUsed == 1507) && (useWith == 5605)) { 
    				setAnimation(1248);
    				actionTimer = 4;
    				addSkillXP(185, 17);
    				AnimationReset = true;
    				updateRequired = true;
    				appearanceUpdateRequired = true;
    			}
    Regards

    Viper
    Reply With Quote  
     

  2. #2  
    -Founder Off Returnofpk-


    Join Date
    Oct 2012
    Age
    28
    Posts
    655
    Thanks given
    97
    Thanks received
    211
    Rep Power
    303
    Quote Originally Posted by Viper View Post
    Hi guys,

    Getting back into coding after an extremely long time out of the game - hence the noob code below.

    Just wanted to know - how do I make it so that the animation complete before the XP is given? so that it looks like once the player finishes the fletching emote it grants the xp because he has actually finished fletching rather than as soon as the player starts the emote xp is granted?

    I'm still unsure of how to use action timers and that so if someone could give me a simple fix that'd be great

    Code:
    			if ((itemUsed == 1507) && (useWith == 5605)) { 
    				setAnimation(1248);
    				actionTimer = 4;
    				addSkillXP(185, 17);
    				AnimationReset = true;
    				updateRequired = true;
    				appearanceUpdateRequired = true;
    			}
    Regards

    Viper
    did you try change
    Code:
    startAnimation(1248);
    and make sure the client got that anim
    Attached image
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Dec 2006
    Posts
    237
    Thanks given
    2
    Thanks received
    0
    Rep Power
    0
    Thanks for the reply mate.

    Don't have that anim only setAnimation.

    But basically I want it to complete the animation before the xp goes through :\
    Reply With Quote  
     

  4. #4  
    Banned [Devov7] old and easy. Market Banned


    Join Date
    Jan 2011
    Age
    26
    Posts
    3,112
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    I have no clue what sheepmonger is talking about

    actual answer: use task/events

    example:

    Code:
    // do the animation
    player.animation(new Animation(...));
    
    // wait 1.2 seconds then add the exp
    GameServer.getWorld().submit(new Worker(2, false) {
         @Override
         public void fire() {
              player.getSkills[...].addExperience(...);
              this.cancel();
         }
    });
    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

Similar Threads

  1. Replies: 34
    Last Post: 09-22-2010, 11:23 PM
  2. Replies: 33
    Last Post: 06-29-2009, 09:35 AM
  3. Replies: 2
    Last Post: 12-02-2008, 09:50 PM
  4. Replies: 0
    Last Post: 06-14-2008, 11:36 PM
  5. Replies: 57
    Last Post: 02-19-2008, 10:42 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
  •