[NPC] Item Creator NPC Script!

Results 1 to 6 of 6
  1. #1
    Enthusiast xBlessingx is offline
    MemberRank
    Jun 2010 Join Date
    46Posts

    happy [NPC] Item Creator NPC Script!

    I know this is messy, but it works :)
    Required to work in v83.

    100% Made By Me!

    PHP Code:
    var no "#e#rYou do not have the required materials to create this item!";
    var 
    yes "#e#rEnjoy!";
    var 
    status;

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

    function 
    action(modetypeselection) {
        if (
    mode == 1)
            
    status++;
        else {
            
    cm.sendOk("#e#kOkay, hope to see you again!");
            
    cm.dispose();
            return;
        }
        if (
    status == 0) {
            
    cm.sendNext("#e#k Hey there!#r I am the Item Creator NPC!");
        } else if (
    status == 1) {
            
    cm.sendSimple("#e#bChoose a item below to create! Make sure you have the right materials to create the item!\r\n #e#L0# I want a Facestomper #l \r\n #gMaterials: 25 #i4000021#\r\n 1 #i4011001#\r\n 1 #i4031755#\r\n 1 #i4031913#\r\n 50 #i4000030#\r\n\r\n #b#L1# I want a Stormcaster #l\r\n #gMaterials: 15 #i4000021#\r\n 1 #i4031755#\r\n 1 #i4031759#\r\n 2 #i4005000#\r\n\r\n #b#L2# I want a Crystal Ilbi #l\r\n #gMaterials: 1 #i4031917#\r\n 1 #i2070006#\r\n\r\n #b#L3# I want a Balanced Fury #l\r\n #gMaterials: 1 #i4032017#\r\n 1 #i4032016#\r\n 1 #i4032015#\r\n");
        }else if (
    status == 2) {
            if (
    selection == 0) {
               if (
    cm.haveItem(400002125) && cm.haveItem(40110011) && cm.haveItem(40317551) && cm.haveItem(40319131) && cm.haveItem(400003050)) {
        
    cm.gainItem(4000021, -25);
        
    cm.gainItem(4011001, -1);
        
    cm.gainItem(4031755, -1);
        
    cm.gainItem(4031913, -1);
        
    cm.gainItem(4000030, -50);
            
    cm.gainItem(10723441);
                    
    cm.sendOk(yes); 
                    
    cm.dispose();
                }else{
                    
    cm.sendOk(no); 
                    
    cm.dispose();
                }
            } else if (
    selection == 1) {
                if (
    cm.haveItem(400002115) && cm.haveItem(40317551) && cm.haveItem(40317591) && cm.haveItem(40050002)) {
        
    cm.gainItem(4000021, -15);
        
    cm.gainItem(4031755, -1);
        
    cm.gainItem(4031759, -1);
        
    cm.gainItem(4005000, -2);
            
    cm.gainItem(10822231);
                    
    cm.sendOk(yes); 
                    
    cm.dispose();
                }else{
                    
    cm.sendOk(no);
                    
    cm.dispose();
                }
    } else if (
    selection == 2) {
               if (
    cm.haveItem(40319171) && cm.haveItem(20700061)) {
        
    cm.gainItem(4031917, -1);
        
    cm.gainItem(2070006, -1);
            
    cm.gainItem(20700161);
                    
    cm.sendOk(yes); 
                    
    cm.dispose();
                }else{
                    
    cm.sendOk(no);
                    
    cm.dispose();
    }
     } else if (
    selection == 3) {
                if (
    cm.haveItem(40320171) && cm.haveItem(40320161) && cm.haveItem(40320151)) {
        
    cm.gainItem(4032017, -1);
        
    cm.gainItem(4032016, -1);
        
    cm.gainItem(4032015, -1);
            
    cm.gainItem(20700181);
                    
    cm.sendOk(yes); 
                    
    cm.dispose();
                }else{
                    
    cm.sendOk(no);
                    
    cm.dispose();
                }
            }
        }

    Code:
    1072344 = Facestompers
    1082223 = Stormcaster
    2070016 = Crystal Ilbi Throwing-Stars
    2070018 = Balanced Fury

    Code:
    4000021 = Leather
    4011001 = Steel Plate
    4031755 = Taru Totem
    4031913 = Stone Tiger Head
    4000030 = Dragon Skin
    4031759 = Subani Ankh
    4005000 = Power Crystal
    4031917 = Crystal Shard
    2070006 = Ilbi Throwing-Stars
    4032017 = Tao of Harmony
    4032016 = Tao of Sight
    4032015 = Tao of Shadows
    Last edited by xBlessingx; 25-10-10 at 01:58 AM.


  2. #2
    Enthusiast ShesInMyPants is offline
    MemberRank
    Oct 2010 Join Date
    31Posts

    Re: Item Creator NPC Script!

    Do i put this code in mysql?

  3. #3
    Account Upgraded | Title Enabled! Choobed is offline
    MemberRank
    Jul 2008 Join Date
    AustraliaLocation
    386Posts

    Re: Item Creator NPC Script!

    Quote Originally Posted by ShesInMyPants View Post
    Do i put this code in mysql?
    No. Due to the fact that it's a NPC script, you need to put it in your: source\scripts\npc folder.

    Do note that the script must have an ID corresponding to the NPC you actually want it to display the dialogs on.

  4. #4
    Gamma Samus. is offline
    MemberRank
    Jun 2008 Join Date
    wvndesign.nlLocation
    3,216Posts

    Re: Item Creator NPC Script!

    The fact that he received a warning is probably because this got released several times before.

  5. #5
    Subscriber and Mod! Piggy is offline
    MemberRank
    Jan 2009 Join Date
    AustraliaLocation
    4,379Posts

    Re: Item Creator NPC Script!

    Quote Originally Posted by Settler11 View Post
    The fact that he received a warning is probably because this got released several times before.
    oreally? because there has been a ton of warnings handed out and all situations are different

  6. #6
    Enthusiast xBlessingx is offline
    MemberRank
    Jun 2010 Join Date
    46Posts

    Re: [NPC] Item Creator NPC Script!

    I got a warning because I didn't do [NPC] in the thread and I didn't use proper tags... It's not the reason, "The fact that he received a warning is probably because this got released several times before." -_-



Advertisement