GachaponEXP NPC

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1

    GachaponEXP NPC

    This is only me second post so if there is a mistake please let me know so I can change it. I'm very sure there are no careless mistakes though.

    PLEASE tell me if you've used this :]

    Credits for the idea go to Jordan

    Code:
    //GachaphonEXP 9100190
    /*
    -- Odin JavaScript --------------------------------------------------------------------------------
    -- By ---------------------------------------------------------------------------------------------
    NeverCodeNever
    -- Version Info -----------------------------------------------------------------------------------
    1.0 - First Version by NeverCodeNever
    ----------------------------------------------------------------------------
    */
    
    importPackage(net.sf.odinms.client);
    
    
    
    var status = 0;
    var chance1 = Math.floor(Math.random()*200+1);
    var chance2 = Math.floor(Math.random()*50);
    var chance3 = (Math.floor(Math.random()*20)+1);
    var chance4 = Math.floor(Math.random()*2+1);
    var itemchance = chance1 + chance2 + chance3 * chance4;
    var itemamount = Math.floor(Math.random()*50+1);
    
    
    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.sendOk("See you next time, when you try your luck here~!");
    			cm.dispose();
    			return;
    		}
    		if (mode == 1)
    			status++;
    		else
    			status--;
    		if (status == 0) {
    				cm.sendNext("I am gachaponEXP, and you get exp instead of items here.\r\nI'll give EXP if you hand over your Gachapon Tickets.\r\nThe tickets look like this: #v5220000#");
    			}
    		else if (status == 1) {
    			if (cm.haveItem(5220000)) {
    			cm.sendYesNo("I see you have a ticket, do you wish to use it?");
    			}
    			else if (!cm.haveItem(5220000)) {
    			cm.sendOk("You dont have any #bgachapon tickets#k.");
    			cm.dispose();
    			}
    		}
    		else if (status == 2) {
    			cm.gainItem(5220000, -1);
    			if ((itemchance >= 1) && (itemchance <= 20)) {
    			cm.gainExp(1000000);
    			}
    			else if ((itemchance >= 21) && (itemchance <= 40)) {
    			cm.gainExp(-10000);
    			}
    			else if ((itemchance >= 41) && (itemchance <= 50)) {
    			cm.gainExp(50000);
    			}
    			else if ((itemchance >= 51) && (itemchance <= 60)) {
    			cm.gainExp(5000);
    			}
    			else if ((itemchance >= 61) && (itemchance <= 70)) {
    			cm.gainExp(50);
    			}
    			else if (itemchance == 71) {
    			cm.gainExp(4000);
    			}
    			else if (itemchance == 72) {
    			cm.gainExp(500000);
    			}
    			else if (itemchance == 73) {
    			cm.gainExp(10000);
    			}
    			else if (itemchance == 74) {
    			cm.gainExp(242356);
    			}
    			else if (itemchance == 75) {
    			cm.gainExp(24546);
    			}
    			else if (itemchance == 76) {
    			cm.gainExp(60755);
    			}
    			else if (itemchance == 77) {
    			cm.gainExp(3467);
    			}
    			else if (itemchance == 78) {
    			cm.gainExp(35775);
    			}
    			else if (itemchance == 79) {
    			cm.gainExp(86589);
    			}	
    			else if (itemchance == 80) {
    			cm.gainExp(56985453);
    			}	
    			else if (itemchance == 81) {
    			cm.gainExp(357);
    			}
    			else if (itemchance == 82) {
    			cm.gainExp(245244);
    			}
    			else if (itemchance == 83) {
    			cm.gainExp(35778);
    			}	
    			else if (itemchance == 84) {
    			cm.gainExp(1337);
    			}
    			else if (itemchance == 85) {
    			cm.gainExp(547458);
    			}
    			else if (itemchance == 86) {
    			cm.gainExp(48487);
    			}
    			else if (itemchance == 87) {
    			cm.gainExp(45843);
    			}	
    			else if (itemchance == 88) {
    			cm.gainExp(3773);
    			}
    			else if (itemchance == 89) {
    			cm.gainExp(5473);
    			}
    			else if (itemchance == 90) {
    			cm.gainExp(244);
    			}
    			else if (itemchance == 91) {
    			cm.gainExp(3588);
    			}
    			else if (itemchance == 92) {
    			cm.gainExp(4583);
    			}
    			else if (itemchance == 93) {
    			cm.gainExp(247);
    			}
    			else if ((itemchance >= 209) && (itemchance <= 215)) { 
    			cm.gainExp(3);
    			}
    			else if ((itemchance >= 216) && (itemchance <= 221)) { 
    			cm.gainExp(4588);
    			}
    			else if ((itemchance >= 222) && (itemchance <= 228)) { 
    			cm.gainExp(69569);
    			}
    			else if ((itemchance >= 228) && (itemchance <= 240)) { 
    			cm.gainExp(35788);
    			}
    			else if (itemchance >= 228) { 
    			cm.gainExp(1);
    			}
    
    			cm.dispose();
    		}
    	}
    }
    Attached Files Attached Files
    Last edited by NeverCodeNever; 19-02-09 at 01:14 AM.


  2. #2
    Alpha Member MSDartz is offline
    MemberRank
    May 2008 Join Date
    PwnVilleLocation
    2,171Posts

    Re: GachaponEXP NPC

    Not much of a point in it. Released by Jordan already.

  3. #3

    Re: GachaponEXP NPC

    I know... but it was coded in C++ (titan) and most people don't use C++ (Titian) So I translated it for people.

  4. #4
    Alpha Member MSDartz is offline
    MemberRank
    May 2008 Join Date
    PwnVilleLocation
    2,171Posts

    Re: GachaponEXP NPC

    Theres already a translated one in the same exact thread.

    /fail

  5. #5
    Account Upgraded | Title Enabled! Revolution~ is offline
    MemberRank
    Dec 2008 Join Date
    In the street .Location
    461Posts

    Re: GachaponEXP NPC

    PHP Code:
    cm.gainExp([1000000]); 
    [] shouldn't be there .

  6. #6
    Account Upgraded | Title Enabled! renegod is offline
    MemberRank
    Aug 2005 Join Date
    SingaporeLocation
    630Posts

    Re: GachaponEXP NPC

    You should do real random numbers rather than punching in definite numbers.. using math random at the top again you can try something different ;S

  7. #7

    Re: GachaponEXP NPC

    Haha ok I'll keep that in mind P:

  8. #8
    Apprentice mapleman111 is offline
    MemberRank
    Jul 2008 Join Date
    12Posts

    Re: GachaponEXP NPC

    ha thanks

  9. #9

    Re: GachaponEXP NPC

    lol Welcome :]

  10. #10
    Member CherryPop is offline
    MemberRank
    Feb 2009 Join Date
    79Posts

    Re: GachaponEXP NPC

    just wanted to say, i use this and it works fine the newer players love it, haha

  11. #11

    Re: GachaponEXP NPC

    Haha you're welcome I'm glad they like it ^^

  12. #12
    Valued Member Indekms321 is offline
    MemberRank
    Mar 2009 Join Date
    132Posts

    Re: GachaponEXP NPC

    nice idea but you can do it better u can do this script in about 20lines

  13. #13
    Account Upgraded | Title Enabled! Signalize is offline
    MemberRank
    Nov 2008 Join Date
    USALocation
    363Posts

    Re: GachaponEXP NPC

    You can do this in like 5-10 lines with an array. This isn't totally useless though. Jordan's was for Titanms

  14. #14
    Valued Member InvertMaple is offline
    MemberRank
    Nov 2008 Join Date
    145Posts

    Re: GachaponEXP NPC

    is this for all levels or just for 1-50?

  15. #15
    Proficient Member xAuthorityx is offline
    MemberRank
    Feb 2009 Join Date
    Health Sciences AuthorityLocation
    157Posts

    Re: GachaponEXP NPC

    nice release. but you still have to code the item right?



Page 1 of 2 12 LastLast

Advertisement