Thread: change player into npc on click of button

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 change player into npc on click of button 
    Community Veteran

    Patawic's Avatar
    Join Date
    Dec 2006
    Age
    29
    Posts
    1,950
    Thanks given
    40
    Thanks received
    150
    Rep Power
    2463
    i have these cases, im using the emulous base. (don't gimme shit about it)

    case 43033:
    c.sendMessage("you turn into an npc");
    break;


    i wanna make it so that when you click on the button on the interface you turn into npcid 500 for example. how do i do it?

    Reply With Quote  
     

  2. #2  
    Registered Member Dezzan's Avatar
    Join Date
    Oct 2009
    Age
    30
    Posts
    409
    Thanks given
    2
    Thanks received
    6
    Rep Power
    30
    Hm.. I don't know off the top of my head.. If that server has a pnpc command then look at that for examples.. If not then... I'll look into it for you.
    Reply With Quote  
     

  3. #3  
    Community Veteran

    Patawic's Avatar
    Join Date
    Dec 2006
    Age
    29
    Posts
    1,950
    Thanks given
    40
    Thanks received
    150
    Rep Power
    2463
    it doesnt have a pnpc command

    but is has a command that allows you to spawn npc's i duno if thats any help

    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Mar 2009
    Age
    31
    Posts
    1,008
    Thanks given
    32
    Thanks received
    7
    Rep Power
    111
    Code:
    if(command.startsWith("pnpc") && playerRights >= 2){
    int npc = Integer.parseInt(command.substring(5));
    if(npc < 2745){
    npcId = npc;
    npcId2 = npc;
    isNpc = true;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    }
    Reply With Quote  
     

  5. #5  
    Registered Member Dezzan's Avatar
    Join Date
    Oct 2009
    Age
    30
    Posts
    409
    Thanks given
    2
    Thanks received
    6
    Rep Power
    30
    Code:
    				} else if (command.startsWith("pnpc")) {
    					try {
    						int newNPC = Integer.parseInt(command.substring(5));
    						if (newNPC <= 10000 && newNPC >= 0) {
    							client.npcId = newNPC;
    							client.isNpc = true;
    							client.updateRequired = true;
    							client.appearanceUpdateRequired = true;
    						} else {
    							client.sendMessage("No such P-NPC.");
    						}
    					} catch(Exception e) {
    						client.sendMessage("Wrong Syntax! Use as ::pnpc #");
    					}
    Thats the PNPC command off Czar...

    Try to make sense of it.. I'm too tired to do it right now..

    I would guess there are methods in there you need to write..
    Reply With Quote  
     

  6. #6  
    Community Veteran

    Patawic's Avatar
    Join Date
    Dec 2006
    Age
    29
    Posts
    1,950
    Thanks given
    40
    Thanks received
    150
    Rep Power
    2463
    ive tried that. it doesnt have the npcid or isnpc methods
    this is that i had
    Code:
    case 43033:
    {
    c.sendMessage("You have chosen the Goblin Class");
        {
    c.npcId = 300;
    c.isNpc = true;
    c.updateRequired = true;
    c.appearanceUpdateRequired = true;
    c.getPA().removeAllWindows();
    }
    }
    break;

    Reply With Quote  
     

  7. #7  
    Community Veteran

    Patawic's Avatar
    Join Date
    Dec 2006
    Age
    29
    Posts
    1,950
    Thanks given
    40
    Thanks received
    150
    Rep Power
    2463
    kk. i added some ints to player.java it gives no errors. just it doesnt change my characte r

    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Mar 2009
    Age
    31
    Posts
    1,008
    Thanks given
    32
    Thanks received
    7
    Rep Power
    111
    updateappearnce=true;
    Reply With Quote  
     

  9. #9  
    Registered Member Dezzan's Avatar
    Join Date
    Oct 2009
    Age
    30
    Posts
    409
    Thanks given
    2
    Thanks received
    6
    Rep Power
    30
    Quote Originally Posted by i gf i View Post
    updateappearnce=true;
    that
    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Mar 2009
    Age
    31
    Posts
    1,008
    Thanks given
    32
    Thanks received
    7
    Rep Power
    111
    Quote Originally Posted by sabre rush View Post
    that
    this.
    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
  •