[Release] Reviving item.

Results 1 to 13 of 13
  1. #1
    Account Inactive acEvolution is offline
    InactiveRank
    Oct 2008 Join Date
    329Posts

    [Release] Reviving item.


    RaGEZONE Recommends

    RaGEZONE Recommends

    Whats up RageZone. Haven't been here in a long time. My java's gone slightly cocky too. Here's something small that I thought would be cool.

    In MapleCharacter.java :
    Search :
    Code:
    private void playerDead() {
    Right under, add :
    Code:
    if (getItemQuantity(3995000, false) >= 1) {
                NPCScriptManager.getInstance().start(getClient(), YOURNPCIDHERE);
    Add import :
    Code:
    import net.sf.odinms.scripting.npc.NPCScriptManager;
    Place this into any npc you want :
    Code:
    /**
    *@author - AceEvolution
    */
    importPackage(net.sf.odinms.client);
    var status = 0;
    
    
    
    function start() {
        status = -1;
        action(1, 0, 0);
    }
    
    
    function action(mode, type, selection) {
        if (mode == -1) {
            cm.dispose();
        } else {
            if (status >= 2 && mode == 0) {
            cm.dispose();
                return;
            }
            if (mode == 1)
                status++;
            else
                status--;
            if (status == 0) {
                cm.sendYesNo("You have just died, but since you possess the reviving item, you will be given a choice to be revived. Would you like to be revived?");
     }
    		else if (status == 1) {
    			cm.gainItem(3995000, -1);
    			cm.getChar().setHp(cm.getChar().getMaxHp());
    			cm.dispose();
    		}
    		else {
    			cm.dispose();
    		}
    		}
    		}
    Enjoy. The item is some useless item that is unstackable so players cant possess too much of it (it is also untradable).


  2. #2
    The almighty chicken kippieeej is offline
    True MemberRank
    Apr 2008 Join Date
    1,048Posts

    Re: [Release] Reviving item.

    not bad
    wont the npc error with the 'you have died' message though?

  3. #3
    Account Upgraded | Title Enabled! ~Justin~ is offline
    True MemberRank
    Jul 2008 Join Date
    Up Your Buttt ALocation
    911Posts

    Re: [Release] Reviving item.

    Nice release!

  4. #4
    Account Inactive xbLazE is offline
    InactiveRank
    Jul 2008 Join Date
    SingaporeLocation
    1,282Posts

    Re: [Release] Reviving item.

    Is it a potion you eat when you die to revive yourself? o.O

  5. #5
    Account Inactive EspadaFung is offline
    InactiveRank
    Jul 2008 Join Date
    Home, don't stalk meLocation
    1,034Posts

    Re: [Release] Reviving item.

    @xblaze

    it'll check for item 3995000
    if you have it then the npc will pop out.

    and the npc will -3995000 and revive u.

  6. #6
    Account Inactive acEvolution is offline
    InactiveRank
    Oct 2008 Join Date
    329Posts

    Re: [Release] Reviving item.

    Quote Originally Posted by kippieeej View Post
    not bad
    wont the npc error with the 'you have died' message though?
    actually im not really sure. i'll have it tested. if that be the case then i'll just have it removed with no notice like how a charm works. Grats on mod btw.

  7. #7
    Infraction Banned XxOsirisxX is offline
    Alpha MaleRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] Reviving item.

    Quote Originally Posted by kippieeej View Post
    not bad
    wont the npc error with the 'you have died' message though?
    The die MSG and the pop up I believe are kinda the same, So i doubt it does case any crash.


    Trough you quitted AcE, Welcome Back :)

  8. #8
    Back? gmsinister is offline
    Alpha MaleRank
    Apr 2008 Join Date
    New YorkLocation
    1,744Posts

    Re: [Release] Reviving item.

    nice job acevo bummer you left and lol at your sig osiris

  9. #9
    Account Inactive purpleNblack2 is offline
    InactiveRank
    Oct 2008 Join Date
    2,240Posts

    Re: [Release] Reviving item.

    this is real nice,
    and useful,
    its actually pretty creative too

  10. #10
    Account Inactive Shinykirby is offline
    InactiveRank
    Apr 2008 Join Date
    297Posts

    Re: [Release] Reviving item.

    -----
    Last edited by Shinykirby; 21-08-09 at 10:07 PM.

  11. #11
    Account Inactive acEvolution is offline
    InactiveRank
    Oct 2008 Join Date
    329Posts

    Re: [Release] Reviving item.

    back and tested. it won't crash and theres no nid for enableActions since the npc is disposed.
    Quote Originally Posted by XxOsirisxX View Post
    The die MSG and the pop up I believe are kinda the same, So i doubt it does case any crash.


    Trough you quitted AcE, Welcome Back :)
    hehe ty. only back for a while ;P

  12. #12
    Account Inactive MrMysterious is offline
    InactiveRank
    Dec 2008 Join Date
    In a treeLocation
    752Posts

    Re: [Release] Reviving item.

    Awesome release acEvolution .. very original idea

  13. #13
    Account Inactive lxCrAzYsEl is offline
    InactiveRank
    May 2008 Join Date
    Her heart :)Location
    281Posts

    Re: [Release] Reviving item.

    n1 sufi didi :D
    i thought we nvr had this finished that time , and u went to msea alr. =/
    Anyway , nice release. Free chat with me on msn ok :D




Advertisement