Jump to content
  • 0

Who can add whisper to this 2 npc?


eboni001

Question


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

Hello guys as title say does somebody please add whisper to this 2 npc?

 

Broadcaster (only can be whisper if you have an open pub), this is for people who want to have a pub in mall, they can pm the Broadcaster and broadcast their messages w/o closing pub and walk to npc.

prontera,183,215,3	script	Broadcaster#1::BC	894,{
	
	set @npcname$, "Broadcaster";
	set @header$,"[^0000ff" + @npcname$ + "^000000]";

	set broadcastfee, 1000000;

	//if (agitcheck()){mes @header$; mes "War of Emperium is ongoing!"; close;}

	mes @header$;
	mes "Hi, I'm the Broadcaster";
	mes "I can Broadcast a message for you";
	next;
	mes @header$;
	mes "It costs ^ff0000"+ broadcastfee +"^000000 zeny ";
	next;
	mes @header$;
	mes "Would you like to Broadcast?";
	switch (select("yes","No")){
	case 1:
		if(#Broadcast> gettimetick(2)) {
		next;
		mes @header$;
		mes "You already broadcasted a message within 3 minutes... Please Try again Later.";
		close;
		}
		next;
		mes @header$;
		if(Zeny<1000000) goto $nozenybc;
		set Zeny,zeny - broadcastfee;
		mes "Please input your message.";
		next;
		input broadcast$;
		announce "Message from "+strcharinfo(0)+": "+broadcast$+"",0,0xFFCC00; // Edit FFA500 to green color code
		close2;
		set #Broadcast, gettimetick(2)+180;
		dispbottom "Broadcaster: Please wait for 3min until next broadcast to avoid flooding.";
		end;
	case 2:
		mes "Suit yourself";
		close;
}

$nozenybc:
	mes "I have to check that you have";
	mes "enough money";
	next;
	mes @header$;
	mes "Im sorry but you dont have ^ff0000"+broadcastfee+"^000000 zeny";
	mes "Go get it if you want to Broadcast";
	close;
}

louyang,213,45,6	duplicate(BC)	Broadcaster#2	894
hugel,102,153,3	duplicate(BC)	Broadcaster#3	894
gonryun,161,126,4	duplicate(BC)	Broadcaster#4	894
morocc,148,102,5	duplicate(BC)	Broadcaster#5	894
payon,164,216,2	duplicate(BC)	Broadcaster#6	894
geffen,111,64,5	duplicate(BC)	Broadcaster#7	894
turbo_room,94,120,5	duplicate(BC)	Broadcaster#8	894
lighthalzen,166,89,3	duplicate(BC)	Broadcaster#9	894

Soul Linker Npc, i want people can pm this npc anywhere to get soul link or buff w/o going to npc:

 

prontera,180,191,2	script	Soul Buffer#1::SB	936,{
        

        mes "[Soul Buffer]";
        mes " Hello "+strcharinfo(0)+", I am the Soul Buffer npc, i can soul link or buff you at the cost of some zeny. ";
        next;
        mes "[Soul Buffer]";
        mes " What can i do for you?";
        next;

	
	set .@i,select( "Buff Me = $200,000","Soul Link Me = $200,000","I Need Both = $400,000" );
	set .@cost,( ( .@i == 3 )? 400000:200000 );
	if( Zeny < .@cost ){
		mes "You dont have enough "+.@cost+" zeny.";
	}else{
		set Zeny,Zeny - .@cost;
		if( .@i & 1 ){
			percentheal 100,100;
			skilleffect 34,0; sc_start SC_BLESSING,360000,10;
			skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
		}
		if( .@i & 2 ){
			switch ( basejob ) {
			  case Job_Alchemist:	set .@spirit, 445; break;
			  case Job_Monk:	 set .@spirit, 447; break;
			  case Job_Star_Gladiator:  set .@spirit, 448; break;
			  case Job_Sage:	 set .@spirit, 449; break;
			  case Job_Crusader:	set .@spirit, 450; break;
			  case Job_SuperNovice:   set .@spirit, 451; break;
			  case Job_Knight:	set .@spirit, 452; break;
			  case Job_Wizard:	set .@spirit, 453; break;
			  case Job_Priest:	set .@spirit, 454; break;
			  case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
			  case Job_Rogue:	 set .@spirit, 456; break;
			  case Job_Assassin:	set .@spirit, 457; break;
			  case Job_Blacksmith:   set .@spirit, 458; break;
			  case Job_Hunter:	set .@spirit, 460; break;
			  case Job_Soul_Linker:   set .@spirit, 461; break;
			  default:
			   if ( upper == 1 && baselevel < 70 )
				set .@spirit, 494;
			}
			if ( .@spirit ) {
			  sc_start4 sc_spirit, 360000, 5, .@spirit,0,0;
			  skilleffect .@spirit, 5;
			}
		}
		mes "Done, Come back to me if you need my services again.";
	}
close;
}

morocc,167,53,3	duplicate(SB)	Soul Buffer#2	936
gonryun,148,174,6	duplicate(SB)	Soul Buffer#3	936
lighthalzen,177,114,5	duplicate(SB)	Soul Buffer#4	936
payon,164,213,2	duplicate(SB)	Soul Buffer#5	936

thanks in advance guys ^_^.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I'm not really sure what you mean by pub, but for different maps just full a string with all the maps that you want and compare it with the users current location.

 

Edit: So I thought about it and if by pub do you mean in a chat room? There really isn't a foolproof way I know of to keep a constant connection with a waiting room while returning the invoked characters rid... because and again I think this was a really dumb move... The rids aren't passed when calling a waiting room event. Instead they are obtained when you warp the player out of the waiting room... I could throw some tricks in the air like I've done before where I attached an OnTouch event to a waiting room npc and then waited for the player to enter a chatting state and cross check it with the status of the existing NPCs waiting room. But again that can be fooled by creating your own chat room in close proximity to the NPC and having someone else already in the NPCs chat room. Really I think we need more specific chat room related commands.

 

-	script	SB	-1,{
L_whisper:
        mes "[Soul Buffer]";
        mes " Hello "+strcharinfo(0)+", I am the Soul Buffer npc, i can soul link or buff you at the cost of some zeny. ";
        next;
        mes "[Soul Buffer]";
        mes " What can i do for you?";
        next;

	
	set .@i,select( "Buff Me = $200,000","Soul Link Me = $200,000","I Need Both = $400,000" );
	set .@cost,( ( .@i == 3 )? 400000:200000 );
	if( Zeny < .@cost ){
		mes "You dont have enough "+.@cost+" zeny.";
	}else{
		set Zeny,Zeny - .@cost;
		if( .@i & 1 ){
			percentheal 100,100;
			skilleffect 34,0; sc_start SC_BLESSING,360000,10;
			skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
		}
		if( .@i & 2 ){
			switch ( basejob ) {
			  case Job_Alchemist:	set .@spirit, 445; break;
			  case Job_Monk:	 set .@spirit, 447; break;
			  case Job_Star_Gladiator:  set .@spirit, 448; break;
			  case Job_Sage:	 set .@spirit, 449; break;
			  case Job_Crusader:	set .@spirit, 450; break;
			  case Job_SuperNovice:   set .@spirit, 451; break;
			  case Job_Knight:	set .@spirit, 452; break;
			  case Job_Wizard:	set .@spirit, 453; break;
			  case Job_Priest:	set .@spirit, 454; break;
			  case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
			  case Job_Rogue:	 set .@spirit, 456; break;
			  case Job_Assassin:	set .@spirit, 457; break;
			  case Job_Blacksmith:   set .@spirit, 458; break;
			  case Job_Hunter:	set .@spirit, 460; break;
			  case Job_Soul_Linker:   set .@spirit, 461; break;
			  default:
			   if ( upper == 1 && baselevel < 70 )
				set .@spirit, 494;
			}
			if ( .@spirit ) {
			  sc_start4 sc_spirit, 360000, 5, .@spirit,0,0;
			  skilleffect .@spirit, 5;
			}
		}
		mes "Done, Come back to me if you need my services again.";
	}
close;
OnWhisperGlobal:
	if( strnpcinfo(2) != "" || !compare(.maps$,strcharinfo(3)) && !checkchatting()) end;
	goto L_whisper;
OnInit:
	set .maps$, "prontera|pay_fild01|geffen|izlude";
}

prontera,180,191,2	duplicate(SB)	Soul Buffer#1	936
morocc,167,53,3	duplicate(SB)	Soul Buffer#2	936
gonryun,148,174,6	duplicate(SB)	Soul Buffer#3	936
lighthalzen,177,114,5	duplicate(SB)	Soul Buffer#4	936
payon,164,213,2	duplicate(SB)	Soul Buffer#5	936
Edited by Skorm
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

prontera,180,191,2	script	Soul Buffer#1::SB	936,{
OnWhisperGlobal:

pm [npc:SB]

 

prontera,183,215,3	script	Broadcaster#1::BC	894,{
OnWhisperGlobal:

pm [npc:BC]

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

prontera,180,191,2	script	Soul Buffer#1::SB	936,{
OnWhisperGlobal:

pm [npc:SB]

 

prontera,183,215,3	script	Broadcaster#1::BC	894,{
OnWhisperGlobal:

pm [npc:BC]

 

 when i pm both of them they pop up but it get stocked in the window, no next button or keep talking, and there is anyway to set BC pm only if you are in a pub?

bump

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

bump

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

try this first:

 

 

prontera,180,215,3    script    Healer::BC    894,{
OnWhisperGlobal:

if (@whispervar0$ == "puff") {

            percentheal 100,100;
            skilleffect 34,0; sc_start SC_BLESSING,360000,10;
            skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;

end;

} else {

end;
}
}

 

whisper to ->   npc:BC

enter message: puff

 

it goes. change the "password" on the IF statement above

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

try this first:

 

 

 

prontera,180,215,3    script    Healer::BC    894,{
OnWhisperGlobal:

if (@whispervar0$ == "puff") {

            percentheal 100,100;
            skilleffect 34,0; sc_start SC_BLESSING,360000,10;
            skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;

end;

} else {

end;
}
}

 

whisper to ->   npc:BC

enter message: puff

 

it goes. change the "password" on the IF statement above

this is not working and the problem with mine is when it pop up it open the first window but it get freeze on there, not keep talking i have to warp or relog to can move again.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I've noticed eAthena has problems with the whisperglobal on timers and stuff...

 

Try after the whisper part detaching and re-attaching the rid of the player...

 

set .@a, getcharid(3);
detachrid;
attachrid(.@a);
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

-	script	SB	-1,{
L_whisper:
        mes "[Soul Buffer]";
        mes " Hello "+strcharinfo(0)+", I am the Soul Buffer npc, i can soul link or buff you at the cost of some zeny. ";
        next;
        mes "[Soul Buffer]";
        mes " What can i do for you?";
        next;

	
	set .@i,select( "Buff Me = $200,000","Soul Link Me = $200,000","I Need Both = $400,000" );
	set .@cost,( ( .@i == 3 )? 400000:200000 );
	if( Zeny < .@cost ){
		mes "You dont have enough "+.@cost+" zeny.";
	}else{
		set Zeny,Zeny - .@cost;
		if( .@i & 1 ){
			percentheal 100,100;
			skilleffect 34,0; sc_start SC_BLESSING,360000,10;
			skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
		}
		if( .@i & 2 ){
			switch ( basejob ) {
			  case Job_Alchemist:	set .@spirit, 445; break;
			  case Job_Monk:	 set .@spirit, 447; break;
			  case Job_Star_Gladiator:  set .@spirit, 448; break;
			  case Job_Sage:	 set .@spirit, 449; break;
			  case Job_Crusader:	set .@spirit, 450; break;
			  case Job_SuperNovice:   set .@spirit, 451; break;
			  case Job_Knight:	set .@spirit, 452; break;
			  case Job_Wizard:	set .@spirit, 453; break;
			  case Job_Priest:	set .@spirit, 454; break;
			  case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
			  case Job_Rogue:	 set .@spirit, 456; break;
			  case Job_Assassin:	set .@spirit, 457; break;
			  case Job_Blacksmith:   set .@spirit, 458; break;
			  case Job_Hunter:	set .@spirit, 460; break;
			  case Job_Soul_Linker:   set .@spirit, 461; break;
			  default:
			   if ( upper == 1 && baselevel < 70 )
				set .@spirit, 494;
			}
			if ( .@spirit ) {
			  sc_start4 sc_spirit, 360000, 5, .@spirit,0,0;
			  skilleffect .@spirit, 5;
			}
		}
		mes "Done, Come back to me if you need my services again.";
	}
close;
OnWhisperGlobal:
	if( strnpcinfo(2) != "" ) end;
	goto L_whisper;
}

prontera,180,191,2	duplicate(SB)	Soul Buffer#1	936
morocc,167,53,3	duplicate(SB)	Soul Buffer#2	936
gonryun,148,174,6	duplicate(SB)	Soul Buffer#3	936
lighthalzen,177,114,5	duplicate(SB)	Soul Buffer#4	936
payon,164,213,2	duplicate(SB)	Soul Buffer#5	936

same thing for the other npc : make and whisper the floating npc

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

-	script	SB	-1,{
L_whisper:
        mes "[Soul Buffer]";
        mes " Hello "+strcharinfo(0)+", I am the Soul Buffer npc, i can soul link or buff you at the cost of some zeny. ";
        next;
        mes "[Soul Buffer]";
        mes " What can i do for you?";
        next;

	
	set .@i,select( "Buff Me = $200,000","Soul Link Me = $200,000","I Need Both = $400,000" );
	set .@cost,( ( .@i == 3 )? 400000:200000 );
	if( Zeny < .@cost ){
		mes "You dont have enough "+.@cost+" zeny.";
	}else{
		set Zeny,Zeny - .@cost;
		if( .@i & 1 ){
			percentheal 100,100;
			skilleffect 34,0; sc_start SC_BLESSING,360000,10;
			skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
		}
		if( .@i & 2 ){
			switch ( basejob ) {
			  case Job_Alchemist:	set .@spirit, 445; break;
			  case Job_Monk:	 set .@spirit, 447; break;
			  case Job_Star_Gladiator:  set .@spirit, 448; break;
			  case Job_Sage:	 set .@spirit, 449; break;
			  case Job_Crusader:	set .@spirit, 450; break;
			  case Job_SuperNovice:   set .@spirit, 451; break;
			  case Job_Knight:	set .@spirit, 452; break;
			  case Job_Wizard:	set .@spirit, 453; break;
			  case Job_Priest:	set .@spirit, 454; break;
			  case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
			  case Job_Rogue:	 set .@spirit, 456; break;
			  case Job_Assassin:	set .@spirit, 457; break;
			  case Job_Blacksmith:   set .@spirit, 458; break;
			  case Job_Hunter:	set .@spirit, 460; break;
			  case Job_Soul_Linker:   set .@spirit, 461; break;
			  default:
			   if ( upper == 1 && baselevel < 70 )
				set .@spirit, 494;
			}
			if ( .@spirit ) {
			  sc_start4 sc_spirit, 360000, 5, .@spirit,0,0;
			  skilleffect .@spirit, 5;
			}
		}
		mes "Done, Come back to me if you need my services again.";
	}
close;
OnWhisperGlobal:
	if( strnpcinfo(2) != "" ) end;
	goto L_whisper;
}

prontera,180,191,2	duplicate(SB)	Soul Buffer#1	936
morocc,167,53,3	duplicate(SB)	Soul Buffer#2	936
gonryun,148,174,6	duplicate(SB)	Soul Buffer#3	936
lighthalzen,177,114,5	duplicate(SB)	Soul Buffer#4	936
payon,164,213,2	duplicate(SB)	Soul Buffer#5	936

same thing for the other npc : make and whisper the floating npc

TY!! skorm and capuche is working now, but how i can make the bc whisper only work if you are in a pub.? or only people in certain maps can use it, the easy way but preferable in a pub.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

I'm not really sure what you mean by pub, but for different maps just full a string with all the maps that you want and compare it with the users current location.

 

Edit: So I thought about it and if by pub do you mean in a chat room? There really isn't a foolproof way I know of to keep a constant connection with a waiting room while returning the invoked characters rid... because and again I think this was a really dumb move... The rids aren't passed when calling a waiting room event. Instead they are obtained when you warp the player out of the waiting room... I could throw some tricks in the air like I've done before where I attached an OnTouch event to a waiting room npc and then waited for the player to enter a chatting state and cross check it with the status of the existing NPCs waiting room. But again that can be fooled by creating your own chat room in close proximity to the NPC and having someone else already in the NPCs chat room. Really I think we need more specific chat room related commands.

 

-	script	SB	-1,{
L_whisper:
        mes "[Soul Buffer]";
        mes " Hello "+strcharinfo(0)+", I am the Soul Buffer npc, i can soul link or buff you at the cost of some zeny. ";
        next;
        mes "[Soul Buffer]";
        mes " What can i do for you?";
        next;

	
	set .@i,select( "Buff Me = $200,000","Soul Link Me = $200,000","I Need Both = $400,000" );
	set .@cost,( ( .@i == 3 )? 400000:200000 );
	if( Zeny < .@cost ){
		mes "You dont have enough "+.@cost+" zeny.";
	}else{
		set Zeny,Zeny - .@cost;
		if( .@i & 1 ){
			percentheal 100,100;
			skilleffect 34,0; sc_start SC_BLESSING,360000,10;
			skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
		}
		if( .@i & 2 ){
			switch ( basejob ) {
			  case Job_Alchemist:	set .@spirit, 445; break;
			  case Job_Monk:	 set .@spirit, 447; break;
			  case Job_Star_Gladiator:  set .@spirit, 448; break;
			  case Job_Sage:	 set .@spirit, 449; break;
			  case Job_Crusader:	set .@spirit, 450; break;
			  case Job_SuperNovice:   set .@spirit, 451; break;
			  case Job_Knight:	set .@spirit, 452; break;
			  case Job_Wizard:	set .@spirit, 453; break;
			  case Job_Priest:	set .@spirit, 454; break;
			  case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
			  case Job_Rogue:	 set .@spirit, 456; break;
			  case Job_Assassin:	set .@spirit, 457; break;
			  case Job_Blacksmith:   set .@spirit, 458; break;
			  case Job_Hunter:	set .@spirit, 460; break;
			  case Job_Soul_Linker:   set .@spirit, 461; break;
			  default:
			   if ( upper == 1 && baselevel < 70 )
				set .@spirit, 494;
			}
			if ( .@spirit ) {
			  sc_start4 sc_spirit, 360000, 5, .@spirit,0,0;
			  skilleffect .@spirit, 5;
			}
		}
		mes "Done, Come back to me if you need my services again.";
	}
close;
OnWhisperGlobal:
	if( strnpcinfo(2) != "" || !compare(.maps$,strcharinfo(3)) && !checkchatting()) end;
	goto L_whisper;
OnInit:
	set .maps$, "prontera|pay_fild01|geffen|izlude";
}

prontera,180,191,2	duplicate(SB)	Soul Buffer#1	936
morocc,167,53,3	duplicate(SB)	Soul Buffer#2	936
gonryun,148,174,6	duplicate(SB)	Soul Buffer#3	936
lighthalzen,177,114,5	duplicate(SB)	Soul Buffer#4	936
payon,164,213,2	duplicate(SB)	Soul Buffer#5	936
ok ty skorm, what i mean by a pub is when you open a public room chat with alt +c, there is any way to make this?
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

ok ty skorm, what i mean by a pub is when you open a public room chat with alt +c, there is any way to make this?

 

If you want it exclusive to chat rooms on specific maps leave it as is.

 

if you want it to work in chat rooms on any map change it to.

!compare(.maps$,strcharinfo(3)) || !checkchatting()

Although I really don't know if whisper events work from inside chat rooms to begin with.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

ok ty skorm, what i mean by a pub is when you open a public room chat with alt +c, there is any way to make this?

 

If you want it exclusive to chat rooms on specific maps leave it as is.

 

if you want it to work in chat rooms on any map change it to.

!compare(.maps$,strcharinfo(3)) || !checkchatting()

Although I really don't know if whisper events work from inside chat rooms to begin with.

ok i'll leave as is, ty skorm you really helped me ^_^.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...