Thread: [Emulous] Working vengeance

Results 1 to 9 of 9
  1. #1 [Emulous] Working vengeance 
    Runeblade912
    Guest
    I've tried following veng tuts like [Only registered and activated users can see links. ] but I can't figure out where to put it all on Emulous, and things like AttackingOn2, txt4, and playerHasItemAmount give me errors. Can anyone help or give me these methods to use? Go easy on me, I'm a beginner coder.
    Reply With Quote  
     

  2. #2  
    Registered Member
    CTucker's Avatar
    Join Date
    Oct 2008
    Posts
    2,423
    Thanks given
    263
    Thanks received
    281
    Rep Power
    343
    Code:
    Client AttackingOn2 = (Client) Server.playerHandler.players[i];
    will fix attackingon2

    playerHasItemAmount ... why the fuck would you need this for veng

    oo nvm runes

    delete that, emulous uses an array for spells like

    {0,0,0,0,0,4,0,0,1,0,0,4}; i.e i have no idea what that does i just wrote it out lol
    Reply With Quote  
     

  3. #3  
    Runeblade912
    Guest
    Quote Originally Posted by faerion View Post
    Code:
    Client AttackingOn2 = (Client) Server.playerHandler.players[i];
    will fix attackingon2

    playerHasItemAmount ... why the fuck would you need this for veng

    oo nvm runes

    delete that, emulous uses an array for spells like

    {0,0,0,0,0,4,0,0,1,0,0,4}; i.e i have no idea what that does i just wrote it out lol
    I know, but it all uses projectile spells. I'll see what I can do. So far I've been trying to convert the code to work on Emulous.


    Edit:
    Fixed errors
    Heres the top part of the code, the method. Trying to work on others as I type.
    Code:
    	public boolean Vengeance = false;
    	public boolean CanVen = false;
    	public int vengtimer = 0;
    	public int VengeanceTimer = 0;
    	public int VenTimer = 0;
    
    	public void CastVengeance() {
    		if (playerLevel[6] <= 93)
    		{
    			sendMessage("You need a magic level of 94 or higher to cast this spell.");
    		}
    			else if (Vengeance == true) {
    			sendMessage("You already have Vengeance casted.");
    		}
    			else if (vengtimer >= 1) {
    			sendMessage("You need to wait "+vengtimer/2+" seconds to cast Vengeance again.");
    		}
    			else if (!getItems().playerHasItem(560, 2) || !getItems().playerHasItem(557, 10) || !getItems().playerHasItem(553, 4)) {
    			sendMessage("You do not have have enough runes to cast this spell.");
    		}
    			else if (getItems().playerHasItem(560, 2) || getItems().playerHasItem(557, 10) || getItems().playerHasItem(553, 4) && playerLevel[6] >= 94 || vengtimer == 0) { 
    			updateRequired = true; 
    			appearanceUpdateRequired = true; 
    			vengtimer = 60;
    			VengeanceTimer = 240;
    			Vengeance = true;
    			getItems().deleteItem(560, getItems().getItemSlot(560), 2);
    			getItems().deleteItem(557, getItems().getItemSlot(557), 10);
    			getItems().deleteItem(553, getItems().getItemSlot(553), 4);  
    			startAnimation(609);
    			gfx100(607);
    			getPA().addSkillXP(playerLevel[6] * Config.MAGIC_EXP_RATE, 15);
    			//RemoveAllWindows(); // What the hell does this do?  Giving errors.
    		} 
    	}
    If anyone has MSN and wants to add me, just click the MSN button below my name over there. It would be easier. Same with Skype.
    Reply With Quote  
     

  4. #4  
    Runeblade912
    Guest
    Code:
    	client AttackingOn2 = (client) server.playerHandler.players[AttackingOn];
    	client player = (client) server.playerHandler.players[playerId];
    	if (AttackingOn2.Vengeance && hitDiff != 0) {
    	player.hitDiff = (int)(hitDiff / 1.2);
    	player.currentHealth -= (int)(hitDiff / 1.2);
    	player.hitUpdateRequired = true; // So the hit will append to you.
    	player.updateRequired = true; // So the hit will append to you.
    	player.appearanceUpdateRequired = true; // So the hit will append to you.
    	AttackingOn2.Vengeance = false;
    	AttackingOn2.txt4 = "Taste vengeance!"; // This says it in itself.
    	AttackingOn2.string4UpdateRequired = true;
    	}
    That piece of code gives these errors:
    Code:
    .\server\model\players\Client.java:115: illegal start of type
            if (AttackingOn2.Vengeance && hitDiff != 0) {
            ^
    .\server\model\players\Client.java:115: <identifier> expected
            if (AttackingOn2.Vengeance && hitDiff != 0) {
                                      ^
    .\server\model\players\Client.java:115: ';' expected
            if (AttackingOn2.Vengeance && hitDiff != 0) {
                                         ^
    .\server\model\players\Client.java:115: illegal start of type
            if (AttackingOn2.Vengeance && hitDiff != 0) {
                                                  ^
    .\server\model\players\Client.java:115: <identifier> expected
            if (AttackingOn2.Vengeance && hitDiff != 0) {
                                                    ^
    .\server\model\players\Client.java:115: ';' expected
            if (AttackingOn2.Vengeance && hitDiff != 0) {
                                                      ^
    .\server\model\players\Client.java:113: cannot find symbol
    symbol  : class client
    location: class server.model.players.Client
            client AttackingOn2 = (client) server.playerHandler.players[AttackingOn]
    ;
            ^
    .\server\model\players\Client.java:114: cannot find symbol
    symbol  : class client
    location: class server.model.players.Client
            client player = (client) server.playerHandler.players[playerId];
            ^
    .\server\model\players\Client.java:115: package AttackingOn2 does not exist
            if (AttackingOn2.Vengeance && hitDiff != 0) {
                            ^
    .\server\model\players\Client.java:113: cannot find symbol
    symbol  : class client
    location: class server.model.players.Client
            client AttackingOn2 = (client) server.playerHandler.players[AttackingOn]
    ;
                                   ^
    .\server\model\players\Client.java:113: cannot find symbol
    symbol  : class playerHandler
    location: package server
            client AttackingOn2 = (client) server.playerHandler.players[AttackingOn]
    ;
                                                 ^
    .\server\model\players\Client.java:113: cannot find symbol
    symbol  : variable AttackingOn
    location: class server.model.players.Client
            client AttackingOn2 = (client) server.playerHandler.players[AttackingOn]
    ;
                                                                        ^
    .\server\model\players\Client.java:114: cannot find symbol
    symbol  : class client
    location: class server.model.players.Client
            client player = (client) server.playerHandler.players[playerId];
                             ^
    .\server\model\players\Client.java:114: cannot find symbol
    symbol  : class playerHandler
    location: package server
            client player = (client) server.playerHandler.players[playerId];
                                           ^
    14 errors
    Press any key to continue . . .
    I'm trying to find a player client as the one below doesn't work.
    Code:
    client player = (client) server.playerHandler.players[playerId];
    Reply With Quote  
     

  5. #5  
    Runeblade912
    Guest
    bump. any help?
    Reply With Quote  
     

  6. #6  
    Registered Member
    CTucker's Avatar
    Join Date
    Oct 2008
    Posts
    2,423
    Thanks given
    263
    Thanks received
    281
    Rep Power
    343
    Also, if you find the place to put this tell me, once i figure out where to lay my smite code to take away the opponents prayer i will give you my veng code
    Reply With Quote  
     

  7. #7  
    Runeblade912
    Guest
    Quote Originally Posted by faerion View Post
    Also, if you find the place to put this tell me, once i figure out where to lay my smite code to take away the opponents prayer i will give you my veng code
    Do you have MSN/Skype? I'll get looking in a second.
    Reply With Quote  
     

  8. #8  
    Runeblade912
    Guest
    Prayer:

    In server\model\players\Player.java find
    Code:
    public final String[] PRAYER_NAME =
    In server\model\players\packets\ClickingButtons.java find
    Code:
    case 21247: // protect from melee
    Reply With Quote  
     

  9. #9  
    Runeblade912
    Guest
    In CombatAssistant.java find:
    Code:
    public void applyPlayerMeleeDamage(int i, int damageMask){
    That might help too.

    Edit:

    Updated some stuff, less errors.
    Code:
    	Client AO2 = (Client) Server.playerHandler.players[playerId];
    	Client p = (Client) Server.playerHandler.players[playerId];
    	if (AO2.Vengeance && hitDiff != 0) {
    	p.hitDiff = (int)(hitDiff / 1.2);
    	p.currentHealth -= (int)(hitDiff / 1.2);
    	p.hitUpdateRequired = true; // So the hit will append to you.
    	p.updateRequired = true; // So the hit will append to you.
    	p.appearanceUpdateRequired = true; // So the hit will append to you.
    	AO2.Vengeance = false;
    	AO2.txt4 = "Taste vengeance!"; // This says it in itself.
    	AO2.string4UpdateRequired = true;
    	}
    Errors:
    Code:
    .\server\model\players\Client.java:115: illegal start of type
            if (AO2.Vengeance && hitDiff != 0) {
            ^
    .\server\model\players\Client.java:115: <identifier> expected
            if (AO2.Vengeance && hitDiff != 0) {
                             ^
    .\server\model\players\Client.java:115: ';' expected
            if (AO2.Vengeance && hitDiff != 0) {
                                ^
    .\server\model\players\Client.java:115: illegal start of type
            if (AO2.Vengeance && hitDiff != 0) {
                                         ^
    .\server\model\players\Client.java:115: <identifier> expected
            if (AO2.Vengeance && hitDiff != 0) {
                                           ^
    .\server\model\players\Client.java:115: ';' expected
            if (AO2.Vengeance && hitDiff != 0) {
                                             ^
    .\server\model\players\Client.java:115: package AO2 does not exist
            if (AO2.Vengeance && hitDiff != 0) {
                   ^
    .\server\model\players\Client.java:117: cannot find symbol
    symbol  : variable currentHealth
    location: class server.model.players.Client
            p.currentHealth -= (int)(hitDiff / 1.2);
             ^
    .\server\model\players\Client.java:122: cannot find symbol
    symbol  : variable txt4
    location: class server.model.players.Client
            AO2.txt4 = "Taste vengeance!"; // This says it in itself.
               ^
    .\server\model\players\Client.java:123: cannot find symbol
    symbol  : variable string4UpdateRequired
    location: class server.model.players.Client
            AO2.string4UpdateRequired = true;
               ^
    10 errors
    Press any key to continue . . .
    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
  •