Thread: 317 Mystery box spinner

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 37
  1. #21  
    Banned
    Join Date
    Sep 2017
    Posts
    339
    Thanks given
    24
    Thanks received
    30
    Rep Power
    0
    Added and converted all variables but i run into an issue with spinning animation anyone got any idea how to fix it? Or can someone try help me please?

    https://gyazo.com/af3fdd883dd542d9763abbb092dfd900
    Reply With Quote  
     

  2. #22  
    Server developer


    Join Date
    Jul 2010
    Posts
    881
    Thanks given
    265
    Thanks received
    55
    Rep Power
    94
    Quote Originally Posted by replicant View Post
    Added and converted all variables but i run into an issue with spinning animation anyone got any idea how to fix it? Or can someone try help me please?

    https://gyazo.com/af3fdd883dd542d9763abbb092dfd900
    Im having the same issue. the void startSpinner should do this, but not sure where to call it. Isn't mentioned in this snippet.


    I am the one who knocks
    - - - - -

    Reply With Quote  
     

  3. #23  
    Banned
    Join Date
    Sep 2017
    Posts
    339
    Thanks given
    24
    Thanks received
    30
    Rep Power
    0
    Quote Originally Posted by klaasvaakjes View Post
    Im having the same issue. the void startSpinner should do this, but not sure where to call it. Isn't mentioned in this snippet.
    I do it inside client class. But i think the problem will be in method itself but i can't find what might be issue :/// hopefully someone can help out :C
    Reply With Quote  
     

  4. #24  
    Registered Member
    rebecca's Avatar
    Join Date
    Aug 2017
    Posts
    1,071
    Thanks given
    862
    Thanks received
    915
    Rep Power
    5000
    Quote Originally Posted by klaasvaakjes View Post
    Im having the same issue. the void startSpinner should do this, but not sure where to call it. Isn't mentioned in this snippet.
    you need to put it in a place that draws it every frame.
    Reply With Quote  
     

  5. #25  
    Banned
    Join Date
    Sep 2017
    Posts
    339
    Thanks given
    24
    Thanks received
    30
    Rep Power
    0
    Quote Originally Posted by Expand View Post
    you need to put it in a place that draws it every frame.
    Thanks for this reply hopefully i can find out not that skilled at client side yet so it's difficult to find out

    EDIT: This is what i got so far... https://gyazo.com/dde0313abc196396d6f4b3937b4e1bdc still not the best but i could find out but its weird still how it goes

    Code:
    private void startSpinner() {
    		RSInterface w = RSInterface.interfaceCache[13101];
    		RSInterface w2 = RSInterface.interfaceCache[13200];
    		RSInterface rewardInt = RSInterface.interfaceCache[13300];
    		RSInterface rewards = RSInterface.interfaceCache[13303];
    		if(w.anInt263 >= -1000) {
    			w.anInt263 -= 25;
    			w2.anInt263 -= 25;
    			pushMessage("Spin begin!", 0, "");
    		}
    		if(w.anInt263 >= -1912 && w.anInt263 <= -1001) { //w.anInt263 >= -1912 && w.anInt263 <= -1001
    			w.anInt263 -= (25 / spinSpeed);
    			w2.anInt263 -= (25 / spinSpeed);
    		spinSpeed = spinSpeed + 0.07f;
    		pushMessage("Spin second line!", 0, "");
    		}
    		if(w.anInt263 >= -2000 && w.anInt263 < -1913) {
    			w.anInt263 -= (25 / spinSpeed);
    			w2.anInt263 -= (25 / spinSpeed);
    			spinSpeed = spinSpeed + 2f;
    			pushMessage("Spin middle line!", 0, "");
    		}
    		if(w.anInt263 <= -1913) {
    			rewardInt.isMouseoverTriggered = false;
    			amountValue += (w2.invStackSizes[51] * ItemDef.forID((w2.inv[51]) - 1).value);
    			RSInterface.interfaceCache[13019].disabledMessage = Integer.toString(amountValue);
    			RSInterface.interfaceCache[13305].disabledMessage = ItemDef.forID((w2.inv[51]) - 1).name.replaceAll("_", " ");
    			rewards.inv[0] = w2.inv[51];
    			rewards.invStackSizes[0] = w2.invStackSizes[51];
    			startSpin = false;
    			pushMessage("Spin ends!", 0, "");
    			
    		}
    	}
    It just go from spin begin to second line and than to stop so the anim still looks bit weird
    Reply With Quote  
     

  6. #26  
    Registered Member
    Join Date
    Jul 2017
    Posts
    56
    Thanks given
    24
    Thanks received
    10
    Rep Power
    14
    Quote Originally Posted by replicant View Post
    Thanks for this reply hopefully i can find out not that skilled at client side yet so it's difficult to find out

    EDIT: This is what i got so far... https://gyazo.com/dde0313abc196396d6f4b3937b4e1bdc still not the best but i could find out but its weird still how it goes

    Code:
    private void startSpinner() {
    		RSInterface w = RSInterface.interfaceCache[13101];
    		RSInterface w2 = RSInterface.interfaceCache[13200];
    		RSInterface rewardInt = RSInterface.interfaceCache[13300];
    		RSInterface rewards = RSInterface.interfaceCache[13303];
    		if(w.anInt263 >= -1000) {
    			w.anInt263 -= 25;
    			w2.anInt263 -= 25;
    			pushMessage("Spin begin!", 0, "");
    		}
    		if(w.anInt263 >= -1912 && w.anInt263 <= -1001) { //w.anInt263 >= -1912 && w.anInt263 <= -1001
    			w.anInt263 -= (25 / spinSpeed);
    			w2.anInt263 -= (25 / spinSpeed);
    		spinSpeed = spinSpeed + 0.07f;
    		pushMessage("Spin second line!", 0, "");
    		}
    		if(w.anInt263 >= -2000 && w.anInt263 < -1913) {
    			w.anInt263 -= (25 / spinSpeed);
    			w2.anInt263 -= (25 / spinSpeed);
    			spinSpeed = spinSpeed + 2f;
    			pushMessage("Spin middle line!", 0, "");
    		}
    		if(w.anInt263 <= -1913) {
    			rewardInt.isMouseoverTriggered = false;
    			amountValue += (w2.invStackSizes[51] * ItemDef.forID((w2.inv[51]) - 1).value);
    			RSInterface.interfaceCache[13019].disabledMessage = Integer.toString(amountValue);
    			RSInterface.interfaceCache[13305].disabledMessage = ItemDef.forID((w2.inv[51]) - 1).name.replaceAll("_", " ");
    			rewards.inv[0] = w2.inv[51];
    			rewards.invStackSizes[0] = w2.invStackSizes[51];
    			startSpin = false;
    			pushMessage("Spin ends!", 0, "");
    			
    		}
    	}
    It just go from spin begin to second line and than to stop so the anim still looks bit weird

    Maybe you need to implement this under an event, if I had a server with this added and the player was performing the spin, I would tell the client when and for how long it should spin, or just keep telling it to spin until an outcome has been determined by the server.
    Reply With Quote  
     

  7. #27  
    Banned
    Join Date
    Sep 2017
    Posts
    339
    Thanks given
    24
    Thanks received
    30
    Rep Power
    0
    Quote Originally Posted by HeyPewds View Post
    Maybe you need to implement this under an event, if I had a server with this added and the player was performing the spin, I would tell the client when and for how long it should spin, or just keep telling it to spin until an outcome has been determined by the server.
    Alredy sorted. Expand is cool dude
    Reply With Quote  
     

  8. #28  
    Registered Member
    Join Date
    Aug 2017
    Posts
    6
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Where do u add the code??
    Reply With Quote  
     

  9. #29  
    Registered Member
    rebecca's Avatar
    Join Date
    Aug 2017
    Posts
    1,071
    Thanks given
    862
    Thanks received
    915
    Rep Power
    5000
    Quote Originally Posted by samisbeter1 View Post
    Where do u add the code??
    Interface goes in RSInterface/Widget
    spinning code should go somewhere that is drawn every frame, like drawinterface
    Reply With Quote  
     

  10. #30 I need this for PI PLSSS 
    Registered Member
    Join Date
    Aug 2017
    Posts
    6
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Can anyone get this into PI be cuz I need this badly and I can’t fix it
    Reply With Quote  
     

Page 3 of 4 FirstFirst 1234 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. 317 PI Mystery Box (ADVANCED)
    By x USMC x in forum Tutorials
    Replies: 36
    Last Post: 04-23-2015, 03:35 AM
  2. [317] Mystery Box Help
    By SGS5 in forum Help
    Replies: 4
    Last Post: 08-21-2013, 08:42 PM
  3. Replies: 18
    Last Post: 08-17-2013, 01:18 AM
  4. Replies: 3
    Last Post: 03-30-2013, 08:05 AM
  5. [317] Mystery Box [317]
    By pyrotic in forum Tutorials
    Replies: 25
    Last Post: 08-18-2011, 12:24 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •