[Tut] get message from npc by typing a commands

Results 1 to 5 of 5
  1. #1
    Account Upgraded | Title Enabled! georgegeorge is offline
    MemberRank
    Oct 2005 Join Date
    Israel, Tel-AviLocation
    1,079Posts

    [Tut] get message from npc by typing a commands

    Hello, today i will teach you how to get message from npc by typing ::letstalk YOURMESSAGE

    Difficult: 1/10
    Will work on all sources i think.

    add this method:
    Code:
    	public void messageFromNpc(String message, int npctalk)
    	{
    		sendFrame200(4883, 591);
    		sendFrame126("", 4884); //tittle message here
    		sendFrame126(message , 4885);
    		sendFrame75(npctalk, 4883);
    		sendFrame164(4882);
    		NpcDialogueSend = true;
    	}
    now search for:
    Code:
    "yell"
    and you will see something like this:
    Code:
    	if (command.startsWith("yell") && command.length() > 5)
    	{
                    if(muted == 1)
                    sendMessage("You are muted and cannot yell!");
                    else
    		PlayerHandler.messageToAll = playerName+": "+command.substring(5);
    	}
    after last } add this:
    Code:
    	if (command.startsWith("letstalk") && command.length() > 8)
    	{
    
    		messageFromNpc(""+command.substring(8), 945);
    	}
    save compile and run.



  2. #2
    Member fotur3z is offline
    MemberRank
    Jul 2007 Join Date
    In RagezoneLocation
    69Posts

    Re: [TUT] get message from npc by typing a commands

    Lol, how does that work?

    PS: you got any more tuts? :D

  3. #3
    Account Upgraded | Title Enabled! georgegeorge is offline
    MemberRank
    Oct 2005 Join Date
    Israel, Tel-AviLocation
    1,079Posts

    Re: [TUT] get message from npc by typing a commands

    Quote Originally Posted by georgegeorge View Post
    Hello, today i will teach you how to get message from npc by typing ::letstalk YOURMESSAGE
    ....

  4. #4
    Apprentice Singhsnumber1 is offline
    MemberRank
    Jul 2007 Join Date
    13Posts

    Re: [TUT] get message from npc by typing a commands

    how do i add text ??? were???

  5. #5
    Account Upgraded | Title Enabled! LittleMaffia is offline
    MemberRank
    Jan 2007 Join Date
    259Posts

    Re: [TUT] get message from npc by typing a commands

    I just removed it, its not really nice...



Advertisement