Thread: Protection prayer calculation

Results 1 to 2 of 2
  1. #1 Protection prayer calculation 
    :doge:

    Join Date
    Jan 2009
    Posts
    3,759
    Thanks given
    221
    Thanks received
    816
    Rep Power
    2113
    Code:
    public boolean usingCorrespondingPrayer(FightType style) {
    		int book = ancientcurses ? 1 : 0;
    		switch (book) {
    		case 0:
    			switch(style) {
    			case MELEE:
    				return onPrayers[0][PROTECT_FROM_MELEE];
    			case RANGE:
    				return onPrayers[0][PROTECT_FROM_MISSILES];
    			case MAGIC:
    				return onPrayers[0][PROTECT_FROM_MAGIC];
    			}
    		case 1:
    			switch (style) {
    			case MELEE:
    				return onPrayers[1][DEFLECT_MELEE];
    			case RANGE:
    				return onPrayers[1][DEFLECT_MISSILES];
    			case MAGIC:
    				return onPrayers[1][DEFLECT_MAGIC];
    			}
    		default:
    			return false;
    		}
    	}
    Basically book 0 is normal prayers and 1 is curses. you would have to modify the way you calculate styles as you don't have our FightType stuff. (perhaps use an integer for styles, 0 melee, 1 range, 2 mage or something like that)
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jun 2010
    Age
    33
    Posts
    4,337
    Thanks given
    4
    Thanks received
    274
    Rep Power
    0
    nice man. Work's decent.
    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. My calculation of bitwise operators
    By 03data in forum Application Development
    Replies: 10
    Last Post: 05-24-2010, 07:42 PM
  2. Void Bonus Calculation
    By Greyfield in forum Snippets
    Replies: 4
    Last Post: 12-20-2009, 04:37 PM
  3. [508] Making NPCs hit 0s with protection prayer
    By runefire1 in forum Tutorials
    Replies: 31
    Last Post: 10-01-2009, 04:52 AM
  4. Good calculation for..
    By americanboyg in forum Help
    Replies: 1
    Last Post: 07-12-2009, 02:17 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
  •