Thread: 27 errors while trying to add ::god on [PI]

Results 1 to 2 of 2
  1. #1 27 errors while trying to add ::god on [PI] 
    Registered Member
    Join Date
    Nov 2012
    Posts
    33
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    this is what i used.
    if (command.equalsIgnoreCase("god") && playerRights >= 2) {
    setAnimation(1500);
    playerSE = 1501;
    playerSEW = 1851;
    playerSER = 1851;
    playerSEA = 1851;
    playerEnergy = 99999999;
    playerLevel[3] = 99999999;
    sendFrame126(playerEnergy + "%", 149);
    sm("God mode on");
    updateRequired = true;
    appearanceUpdateRequired = true;
    } else if (command.equalsIgnoreCase("godoff") && playerRights >= 2) {
    sm("god mode off");
    setAnimation(760);
    playerSE = 0x328;
    playerSEW = 0x333;
    playerSER = 0x338;
    playerSEA = 0x326;
    playerEnergy = 100;
    playerLevel[3] = getLevelForXP(playerXP[3]);
    sendFrame126(playerEnergy + "%", 149);
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    and this is what is showed. please help
    Reply With Quote  
     

  2. #2  
    Registered Member KANYE WEST's Avatar
    Join Date
    Oct 2011
    Posts
    178
    Thanks given
    9
    Thanks received
    58
    Rep Power
    44
    There's a lot to say about your code. Unless you are adding this statement in the client or player class, you shouldn't treat those variables as local.

    Anyways, use this command instead and tell me how it works out for you. Make sure you are adding this in the Commands.java class!

    Code:
    if (playerCommand.startsWith("god") && c.playerRights >= 3) {
    			if (c.playerStandIndex != 1501) {
    				c.startAnimation(1500);
    				c.playerStandIndex = 1501;
    				c.playerTurnIndex = 1851;
    				c.playerWalkIndex = 1851;
    				c.playerTurn180Index = 1851;
    				c.playerTurn90CWIndex = 1501;
    				c.playerTurn90CCWIndex = 1501;
    				c.playerRunIndex = 1851;
    				c.updateRequired = true;
    				c.appearanceUpdateRequired = true;
    				c.sendMessage("God mode [ON]");
    			} else {
    				c.playerStandIndex = 0x328;
    				c.playerTurnIndex = 0x337;
    				c.playerWalkIndex = 0x333;
    				c.playerTurn180Index = 0x334;
    				c.playerTurn90CWIndex = 0x335;
    				c.playerTurn90CCWIndex = 0x336;
    				c.playerRunIndex = 0x338;
    				c.updateRequired = true;
    				c.appearanceUpdateRequired = true;
    				c.sendMessage("God mode [OFF]");
    			}
    }
    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. Trying to add dung but errors..
    By Ashley in forum Help
    Replies: 5
    Last Post: 12-16-2011, 03:19 AM
  2. [PI] Errors when trying to add interface
    By Tinkerbell1234 in forum Help
    Replies: 13
    Last Post: 07-06-2011, 02:08 PM
  3. How to add God War?
    By Prince Yum III in forum Help
    Replies: 9
    Last Post: 06-25-2009, 06:17 AM
  4. How To Add Simple God Book Preaches
    By Crazy Cam10 in forum Tutorials
    Replies: 5
    Last Post: 08-04-2008, 03:05 PM
  5. Add working god sword constructing
    By Eternal Darknes in forum Tutorials
    Replies: 8
    Last Post: 09-15-2007, 04:21 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
  •