Thread: Prayer Activate [PI Source [Slashscape Client]

Results 1 to 6 of 6
  1. #1 Prayer Activate [PI Source [Slashscape Client] 
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Code:
    	/**Prayer**/
    		
    	public void activatePrayer(int i) {
    		if(c.duelRule[7]){
    			for(int p = 0; p < c.PRAYER.length; p++) { // reset prayer glows 
    				c.prayerActive[p] = false;
    				c.getPA().sendFrame36(c.PRAYER_GLOW[p], 0);	
    			}
    			c.sendMessage("Prayer has been disabled in this duel!");
    			return;
    		}
    		if (i == 24 && c.playerLevel[1] < 65) {
    			c.getPA().sendFrame36(c.PRAYER_GLOW[i], 0);
    			c.sendMessage("You may not use this prayer yet.");
    			return;
    		}
    		if (i == 25 && c.playerLevel[1] < 70) {
    			c.getPA().sendFrame36(c.PRAYER_GLOW[i], 0);
    			c.sendMessage("You may not use this prayer yet.");
    			return;
    		}
    		int[] defPray = {0,5,13,24,25};
    		int[] strPray = {1,6,14,24,25};
    		int[] atkPray = {2,7,15,24,25};
    		int[] rangePray = {3,11,19};
    		int[] magePray = {4,12,20};
    
    		if(c.playerLevel[5] > 0 || !Config.PRAYER_POINTS_REQUIRED){
    			if(c.getPA().getLevelForXP(c.playerXP[5]) >= c.PRAYER_LEVEL_REQUIRED[i] || !Config.PRAYER_LEVEL_REQUIRED) {
    				boolean headIcon = false;
    				switch(i) {
    					case 0:
    					case 5:
    					case 13:
    					if(c.prayerActive[i] == false) {
    						for (int j = 0; j < defPray.length; j++) {
    							if (defPray[j] != i) {
    								c.prayerActive[defPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[defPray[j]], 0);
    							}								
    						}
    					}
    					break;
    					
    					case 1:
    					case 6:
    					case 14:
    					if(c.prayerActive[i] == false) {
    						for (int j = 0; j < strPray.length; j++) {
    							if (strPray[j] != i) {
    								c.prayerActive[strPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[strPray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < rangePray.length; j++) {
    							if (rangePray[j] != i) {
    								c.prayerActive[rangePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[rangePray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < magePray.length; j++) {
    							if (magePray[j] != i) {
    								c.prayerActive[magePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[magePray[j]], 0);
    							}								
    						}
    					}
    					break;
    					
    					case 2:
    					case 7:
    					case 15:
    					if(c.prayerActive[i] == false) {
    						for (int j = 0; j < atkPray.length; j++) {
    							if (atkPray[j] != i) {
    								c.prayerActive[atkPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[atkPray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < rangePray.length; j++) {
    							if (rangePray[j] != i) {
    								c.prayerActive[rangePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[rangePray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < magePray.length; j++) {
    							if (magePray[j] != i) {
    								c.prayerActive[magePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[magePray[j]], 0);
    							}								
    						}
    					}
    					break;
    					
    					case 3://range prays
    					case 11:
    					case 19:
    					if(c.prayerActive[i] == false) {
    						for (int j = 0; j < atkPray.length; j++) {
    							if (atkPray[j] != i) {
    								c.prayerActive[atkPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[atkPray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < strPray.length; j++) {
    							if (strPray[j] != i) {
    								c.prayerActive[strPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[strPray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < rangePray.length; j++) {
    							if (rangePray[j] != i) {
    								c.prayerActive[rangePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[rangePray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < magePray.length; j++) {
    							if (magePray[j] != i) {
    								c.prayerActive[magePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[magePray[j]], 0);
    							}								
    						}
    					}
    					break;
    					case 4:
    					case 12:
    					case 20:
    					if(c.prayerActive[i] == false) {
    						for (int j = 0; j < atkPray.length; j++) {
    							if (atkPray[j] != i) {
    								c.prayerActive[atkPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[atkPray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < strPray.length; j++) {
    							if (strPray[j] != i) {
    								c.prayerActive[strPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[strPray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < rangePray.length; j++) {
    							if (rangePray[j] != i) {
    								c.prayerActive[rangePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[rangePray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < magePray.length; j++) {
    							if (magePray[j] != i) {
    								c.prayerActive[magePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[magePray[j]], 0);
    							}								
    						}
    					}
    					break;
    					case 10:
    						c.lastProtItem = System.currentTimeMillis();
    					break;
    					
    
    					case 16:					
    					case 17:
    					case 18:
    					if(System.currentTimeMillis() - c.stopPrayerDelay < 5000) {
    						c.sendMessage("You have been injured and can't use this prayer!");
    						c.getPA().sendFrame36(c.PRAYER_GLOW[16], 0);
    						c.getPA().sendFrame36(c.PRAYER_GLOW[17], 0);
    						c.getPA().sendFrame36(c.PRAYER_GLOW[18], 0);
    						return;
    					}
    					if (i == 16)
    						c.protMageDelay = System.currentTimeMillis();
    					else if (i == 17)
    						c.protRangeDelay = System.currentTimeMillis();
    					else if (i == 18)
    						c.protMeleeDelay = System.currentTimeMillis();
    					case 21:
    					case 22:
    					case 23:
    					headIcon = true;		
    					for(int p = 16; p < 24; p++) {
    						if(i != p && p != 19 && p != 20) {
    							c.prayerActive[p] = false;
    							c.getPA().sendFrame36(c.PRAYER_GLOW[p], 0);
    						}
    					}
    					break;
    					case 24:
    					case 25:
    					if (c.prayerActive[i] == false) {
    						for (int j = 0; j < atkPray.length; j++) {
    							if (atkPray[j] != i) {
    								c.prayerActive[atkPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[atkPray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < strPray.length; j++) {
    							if (strPray[j] != i) {
    								c.prayerActive[strPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[strPray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < rangePray.length; j++) {
    							if (rangePray[j] != i) {
    								c.prayerActive[rangePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[rangePray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < magePray.length; j++) {
    							if (magePray[j] != i) {
    								c.prayerActive[magePray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[magePray[j]], 0);
    							}								
    						}
    						for (int j = 0; j < defPray.length; j++) {
    							if (defPray[j] != i) {
    								c.prayerActive[defPray[j]] = false;
    								c.getPA().sendFrame36(c.PRAYER_GLOW[defPray[j]], 0);
    							}								
    						}
    					}
    					break;
    				}
    				
    				if(!headIcon) {
    					if(c.prayerActive[i] == false) {
    						c.prayerActive[i] = true;
    						c.getPA().sendFrame36(c.PRAYER_GLOW[i], 1);					
    					} else {
    						c.prayerActive[i] = false;
    						c.getPA().sendFrame36(c.PRAYER_GLOW[i], 0);
    					}
    				} else {
    					if(c.prayerActive[i] == false) {
    						c.prayerActive[i] = true;
    						c.getPA().sendFrame36(c.PRAYER_GLOW[i], 1);
    						c.headIcon = c.PRAYER_HEAD_ICONS[i];
    						c.getPA().requestUpdates();
    					} else {
    						c.prayerActive[i] = false;
    						c.getPA().sendFrame36(c.PRAYER_GLOW[i], 0);
    						c.headIcon = -1;
    						c.getPA().requestUpdates();
    					}
    				}
    			} else {
    				c.getPA().sendFrame36(c.PRAYER_GLOW[i],0);
    				c.getPA().sendFrame126("You need a @blu@Prayer level of "+c.PRAYER_LEVEL_REQUIRED[i]+" to use "+c.PRAYER_NAME[i]+".", 357);
    				c.getPA().sendFrame126("Click here to continue", 358);
    				c.getPA().sendFrame164(356);
    			}
    		} else {
    			c.getPA().sendFrame36(c.PRAYER_GLOW[i],0);
    			c.sendMessage("You have run out of prayer points!");
    		}	
    				
    	}

    when i activate piety and i switch to other prayer..my piety prayer will not turn off.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Dec 2008
    Posts
    2,097
    Thanks given
    1,419
    Thanks received
    732
    Rep Power
    0
    add piety prayer id to atk str and def arrays
    Reply With Quote  
     

  3. #3  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    aready did...when i click piety the prayer going down...when i switch to other prayer..my piety prayer will not dis activate.
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Mar 2008
    Age
    32
    Posts
    749
    Thanks given
    18
    Thanks received
    31
    Rep Power
    130
    You have to change/add the PRAYER_GLOW id... Some clients use different glow ids..
    Message me for a DETAILED security scan of your website.
    Reply With Quote  
     

  5. #5  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    can you show example? cuz

    Code:
    c.getPA().sendFrame36(c.PRAYER_GLOW[atkPray[j]], 0);
    they look all the same.
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    Sep 2009
    Posts
    3,245
    Thanks given
    195
    Thanks received
    255
    Rep Power
    0
    I need this also thanks [=
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •