Thread: [503]Dream Lunar spell heal 20 HP[503]

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 [503]Dream Lunar spell heal 20 HP[503] 
    k1ng 0f k1ngs
    Guest
    Discription: This will make the dream spell in the lunar spell book heal you by 20 HP using clean coding
    Diff: -1/10 lol..
    Assumused Knowledge: Searching and also how to C&P
    Classes Modifyed: Button.java, Player.java, PlayerInstance.java
    Testet Base: Danno's 503

    Okay you can start of by going into your Player.java and add this to your other public void's
    Code:
    public void doHealSpell(Player p)
    {
    p.healTimer = 4;
    p.requestGFX(141, 0);
    }
    NOTE: I just typed something and found that GFX (it's an okay GFX)

    Okay now as you can't mass heal add this under your public void process
    Code:
    if(healTimer > 0)
    {
    healTimer--;
    }
    next open up PlayerInstance.java and declare this:
    Code:
    	public int healTimer = 0;
    now open Button.java and add this into your case 430 (<------- Lunar interface)
    Code:
    			if(button == 10) {    
                p.healTimer = 4;
    		    p.doHealSpell(p);
                p.frame.sendMessage(p, "You heal yourself by 20 HP!");			
    		    }
    if you don't have the lunar interface add this:
    Code:
    		case 430:
                if(button == 10) {    
                p.healTimer = 4;
    		    p.doHealSpell(p);
                p.frame.sendMessage(p, "You heal yourself by 20 HP!");			
    		    }
    break;
    now compile and your done!
    btw if you don't know how to change to lunar interface add this to your HandleCommands:
    Code:
    else if(command.startsWith("lunar"))
    {
    p.frame.setInterface(p, 548, 79, 430);
    }
    else if(command.startsWith("normal"))
    {
    p.frame.setInterface(p, 548, 79, 192);
    }
    ~Credits 100% me!
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Apr 2008
    Age
    26
    Posts
    732
    Thanks given
    5
    Thanks received
    76
    Rep Power
    0
    first post w00t, thanks very much for this
    Reply With Quote  
     

  3. #3  
    Stanyer
    Guest
    How is any of this clean coding.
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Jan 2007
    Age
    27
    Posts
    4,417
    Thanks given
    3
    Thanks received
    105
    Rep Power
    0
    Isn't this wrong: healTimer--;
    Reply With Quote  
     

  5. #5  
    Officially Retired


    Join Date
    Oct 2007
    Age
    27
    Posts
    5,456
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    lol...nice
    Reply With Quote  
     

  6. #6  
    Registered Member
    Inspired Dreams's Avatar
    Join Date
    Aug 2007
    Posts
    1,129
    Thanks given
    4
    Thanks received
    5
    Rep Power
    151
    Nice tutorial mate
    keep up the work
    ill update u with the real gfx

    PS: Doesn't update your hp
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    May 2008
    Age
    26
    Posts
    188
    Thanks given
    4
    Thanks received
    1
    Rep Power
    79
    public void doHealSpell(Player p)
    {
    p.healTimer = 4;
    p.updateHP(20, true);
    p.requestGFX(141, 0);
    }
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  8. #8  
    That universal language.
    'Ramon's Avatar
    Join Date
    Nov 2008
    Age
    26
    Posts
    3,026
    Thanks given
    116
    Thanks received
    86
    Rep Power
    3165
    To bad there isnt a PlayerInstance.java in 508īs


    Reply With Quote  
     

  9. #9  
    Donator

    iZAjz's Avatar
    Join Date
    Mar 2007
    Age
    26
    Posts
    3,675
    Thanks given
    105
    Thanks received
    47
    Rep Power
    1882
    Quote Originally Posted by Raid View Post
    Isn't this wrong: healTimer--;
    I guess it depends on your methods.

    Quote Originally Posted by Gєt ∂σωη 4 яคмση♥ View Post
    To bad there isnt a PlayerInstance.java in 508īs
    You can create a file called it PlayerInstance.java
    Either convert it to another file.
    Reply With Quote  
     

  10. #10  
    That universal language.
    'Ramon's Avatar
    Join Date
    Nov 2008
    Age
    26
    Posts
    3,026
    Thanks given
    116
    Thanks received
    86
    Rep Power
    3165
    If u can make a 508 version i will rep++ u


    Reply With Quote  
     

Page 1 of 2 12 LastLast

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
  •