Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

Page 1 of 3 123 LastLast
Results 1 to 15 of 36
  1. #1
    Smoke & Fly Kars is offline
    MemberRank
    Apr 2008 Join Date
    The NetherlandsLocation
    3,383Posts

    Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Sera

    she's ment to be the starter NPC, but you can use it for many other things.
    The items are easily editable, as is the map and the event possibility.
    If the event is enabled you get to pick an extra item.
    To add an item, simply add it's item id after the other ones, if you want her to give other items, simply remove the whole list and start over.

    Pics:
    Spoiler:

    Items


    Event enabled, you get to pick two items.


    Event disabled, you get to pick only one.




    Hope you people like it.

    Code:
    PHP Code:
    /*  
        Sera
        by Kars
    */

    importPackage(net.sf.odinms.client);

    var 
    status 0;
    var 
    item = Array(1002498100203110022351002279100228010024171002536100267810027351002736100001410000201002071 ,100218610022561002317100231210023431002409);
    var 
    eq 1312017// Chief axe
    var map 100000000// Henesys
    var christmas 0// 1 = true, 0 = false.
    var selectedItem = -1;
    var 
    nextItem = -1;


    function 
    start() {
        
    status = -1;
        
    action(100);
    }

    function 
    action(modetypeselection) {
        if (
    mode == -1) {
            
    cm.getChar().maxAllSkills(); // Remove this line if it error's you
            
    cm.resetStats(); // Remove this line if it error's you
            
    cm.gainItem(eq,1);
            
    cm.warp(map,0);
            
    cm.dispose();
        } else {
            if (
    status >= && mode == 0) {
                
    cm.getChar().maxAllSkills(); // Remove this line if it error's you
                
    cm.resetStats(); // Remove this line if it error's you
                
    cm.gainItem(eq,1);
                
    cm.warp(map,0);
                
    cm.dispose();
            }
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
                var 
    select "Hello, please choose an item:#b";
                for (var 
    0item.lengthi++)
                    
    select += "\r\n#L" "##v" item[i] + "# #z" item[i] + "##l";
                
    cm.sendSimple(select);
            } else if (
    status == 1) {
                
    cm.sendYesNo("Are you sure you want\r\n#b#v" item[selection] + "# #z" item[selection] + "##k\r\nAs your starter item?");
                
    selectedItem selection;
            } else if (
    status == 2) {
                if (
    christmas == 1) {
                    var 
    xmas "There you go, and because it's christmas (orly?) you get to pick ANOTHER item :D#b"
                    
    for (var 0item.lengthi++)
                        
    xmas += "\r\n#L" "##v" item[i] + "# #z" item[i] + "##l";
                    
    cm.sendSimple(xmas);
                } else {
                    
    cm.sendNext("Wise choise my friend...");
                }
                
    cm.gainItem(item[selectedItem],1);
            } else if (
    status == 3) { 
                if (
    christmas == 1) {
                    
    cm.sendNext("You picked\r\n#b#v" item[selection] + "# #z" item[selection] + "##k\r\nAs your second item...");
                    
    nextItem selection;
                } else {
                    
    cm.sendNext("Get ready to start your journey..");
                }
            } else if (
    status == 4) { 
                if (
    christmas == 1) {
                    
    cm.sendNext("Here you go, enjoy your\r\n#b#v" item[selectedItem] + "# #z" item[selectedItem] + "#\r\n#v" item[nextItem] + "# #z" item[nextItem] + "##k\r\nA gift from me, #b#v" eq "# #z" eq "##k.\r\n I'm maxing your skills and resetting your stats now, so it might lagg a little...");
                    
    cm.gainItem(item[nextItem],1);            
                } else {
                    
    cm.sendNext("Oh by the way, enjoy your\r\n#b#v" item[selectedItem] + "# #z" item[selectedItem] + "##k\r\nA gift from me, #b#v" eq "# #z" eq "##k.\r\nAnd one other thing, i'm maxing your skills & resetting your stats, so it might lagg a little...");
                }
                
    cm.getChar().maxAllSkills(); // Remove this line if it error's you
                
    cm.resetStats(); // Remove this line if it error's you
            
    } else if (status == 5) {
                
    cm.gainItem(eq,1);
                
    cm.warp(map,0);
                
    cm.dispose();
            }
        }

    Last edited by Kars; 15-03-09 at 11:47 AM. Reason: Added warnings after some commands


  2. #2
    Apprentice Darkstorm is offline
    MemberRank
    Mar 2008 Join Date
    23Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Cool :]
    nice release.

  3. #3
    Account Upgraded | Title Enabled! rogue1234567 is offline
    MemberRank
    Apr 2008 Join Date
    437Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Looks nice, keep up the good work.

  4. #4
    Apprentice joey255 is offline
    MemberRank
    Jun 2008 Join Date
    19Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Thx ! works perfect =]

  5. #5
    Valued Member ZeroCold is offline
    MemberRank
    Mar 2009 Join Date
    Somewhere I belong.Location
    146Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Nice release! Works perfect!

  6. #6
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by ZeroCold View Post
    Nice release! Works perfect!
    Can you stop saying the same shit in all threads?

    BTW Kars, you don't needed to extend the regular text because of Christmas.

  7. #7
    Smoke & Fly Kars is offline
    MemberRank
    Apr 2008 Join Date
    The NetherlandsLocation
    3,383Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by XxOsirisxX View Post
    Can you stop saying the same shit in all threads?

    BTW Kars, you don't needed to extend the regular text because of Christmas.
    Whatta you mean, the whole because its christmas you get ANOTHEr item part?

  8. #8
    Account Upgraded | Title Enabled! xcelinex33 is offline
    MemberRank
    Apr 2008 Join Date
    spooksLocation
    859Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by XxOsirisxX View Post
    Can you stop saying the same shit in all threads?

    BTW Kars, you don't needed to extend the regular text because of Christmas.
    I lolled haha!

    Nice release Kars. A different "Sera" xD.

  9. #9
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by Kars View Post
    Whatta you mean, the whole because its christmas you get ANOTHEr item part?
    I means..
    cm.sendNext("Wise choise my friend...");

    cm.sendNext("Get ready to start your journey..");

    cm.sendNext("Oh by the way, enjoy your\r\n#b#v" + item[selectedItem] + "# #z" + item[selectedItem] + "##k\r\nA gift from me, #b#v" + eq + "# #z" + eq + "##k.\r\nAnd one other thing, i'm maxing your skills & resetting your stats, so it might lagg a little...");
    It's so obvious you put those random test because Christmas part where still being on process. when you could dispose intermediately.

  10. #10
    Smoke & Fly Kars is offline
    MemberRank
    Apr 2008 Join Date
    The NetherlandsLocation
    3,383Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by XxOsirisxX View Post
    I means..


    It's so obvious you put those random test because Christmas part where still being on process. when you could dispose intermediately.
    Yes you're right, but i figured i wanted it to warp you at the end, and othewise i'd have to move the warp part again, and then it'd be declared 4x.

  11. #11
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by Kars View Post
    Yes you're right, but i figured i wanted it to warp you at the end, and othewise i'd have to move the warp part again, and then it'd be declared 4x.
    Actually, only once could be done.

    mode = -1 FTW?

    And for the actual structure, you could just used status = 4.

  12. #12
    Smoke & Fly Kars is offline
    MemberRank
    Apr 2008 Join Date
    The NetherlandsLocation
    3,383Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by XxOsirisxX View Post
    Actually, only once could be done.

    mode = -1 FTW?

    And for the actual structure, you could just used status = 4.
    I noticed that later, but didnt feel like gettin into the wui stuff, so this is ok.

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

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by XxOsirisxX View Post
    Actually, only once could be done.

    mode = -1 FTW?

    And for the actual structure, you could just used status = 4.
    He did a great job. If you dont like what he did, edit it yourself.

  14. #14
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by Kars View Post
    I noticed that later, but didnt feel like gettin into the wui stuff, so this is ok.
    wui??

    wui is a variable used on sera as status for the default one.

    ~Justin~:

    I'm not saying it's bad, just recommend him, since he extended text for a non real reason :/, not like I'm being mean.

  15. #15
    Smoke & Fly Kars is offline
    MemberRank
    Apr 2008 Join Date
    The NetherlandsLocation
    3,383Posts

    Re: Sera (starter npc) [Item Giver] [Easily editable] [Event Possibility]

    Quote Originally Posted by XxOsirisxX View Post
    wui??

    wui is a variable used on sera as status for the default one.
    Yea i got that, but editing the basic npc's from odin is how i learned scripting them, so i use those therms.

    @Justin
    Don't be mean, he's a perfectionist, which is cool.



Page 1 of 3 123 LastLast

Advertisement