Jump to content
  • 0

Unhide NPC when the Event is Done


Vale

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

 as the title itself said it, I want to unhide the NPC when the event is done

for example, there is a winner, then the other players can closed the dialog box here is my script...

// = Script made by RIKIMARU on rathena.org
// = Profile Link :
// = http://rathena.org/board/user/434-rikimaru/
// = ENJOY THIS SCRIPT!
//===================================================================================
//	    //=====//	 /==/	 /==/		  /==/	 
//	   //	 //	 /==/	 /==/  /=/	 /==/		
//	  //=====//			  /==/  /=/			 /==============/	 /========/   /==//===/    /==/	 /==/
//	 //=//////    /==/	  /==//=/	   /==/    /==/==/==/==/==/	 /	 /  /   /==/		 /==/	 /==/
//    // ==	    /==/	  /==//=/	   /==/    /==/  /==/  /==/	 ======/  /   /==/		 /==/	 /==/
//   //   ==	  /==/	  /==/  /=/	 /==/    /==/  /==/  /==/	 / /===/  /   /==/		 /==/	 /==/
//  //	 ==    /==/	  /==/   /=/    /==/    /==/  /==/  /==/	 / /===/  /   /==/		 /==/=====/==/
// //	   ==  /==/	  /==/    /=/   /==/    /==/  /==/  /==/	 /========/   /==/		 /==///////==/
// ================ rAthena Script ==================================================
// ============== Information =======================================================
// = Automated Guess the Number Event
// = Made by :
// = Rikimaru
//===== Current Version: ===============================================
//= 2.3
//===== Compatible With: ===============================================
//= any rAthena SVN
//===== Description: ===================================================
//= This is an automated Guess the Number Event,which I made
//= for having fun in game,guessing a number. The number is going
//= to be a number between 1 and 2000 , so it'll take time to find out
//= the correct number.
//===== Additional Comments: ===========================================
//= 2.0 Fixed an announcer Bug [Rikimaru]
//= 2.1 Fixed a few Typos in the Script [Rikimaru]
//= 2.2 Fixed the Prize,which was not working correctly. [Rikimaru]
//= 2.3 Fixed another little Bug. [Rikimaru]
//======================================================================
//= DO NOT REMOVE MY CREDITS AND CLAIM MY WORK AS YOURS
//======================================================================
-	script	guessannouncer	-1,{
OnClock0000:
OnClock0200:
OnClock0400:
OnClock0600:
OnClock0800:
OnClock1000:
OnClock1200:
OnClock1400:
OnClock1600:
OnClock1800:
OnClock2200:
announce "[Announcement]: Guess The Number Event will begin",0;
sleep 40000;
announce "[Announcement]: To join event please type @joinevent",0;
sleep 30000;
announce "Guess the Number: Is starting in 30 Seconds in Main  Town!",0;
sleep 20000;
announce "Guess the Number: 10 Seconds! Gather up in Main  Town quick!",0;
sleep 5000;
announce "Guess the Number: 5 Seconds Left!",0;
sleep 1000;
announce "Guess the Number: 4 Seconds!",0;
sleep 1000;
announce "Guess the Number: 3 Seconds!",0;
sleep 1000;
announce "Guess the Number: 2 Seconds!",0;
sleep 1000;
announce "Guess the Number: 1 Second!",0;
sleep 1000;
   announce "Guess the Number: The event has started!",0;
   enablenpc "guess";
   end;

OnInit:
   disablenpc "guess";
   end;
}
// ==============================================================================
firstcity,240,45,8	script	Guess the Number::guess	952,{
// =================== Setting the NPC Name and Prize and amount  =============
set .@n$,"^FF0000[Guess the Number]^000000";
set @prize,33000;//Change the 7227 to your reward item ID
set @amoun,10;//Change the 10 to your reward amount
// ==================== End of settings =========================================
if(.guessstart==1) goto Oneventevent;
set .usednumber, rand(1,3000);
announce "Guess the Number: Guess the Number Event Started in Main Town!",0;
set .guessstart,1;
Oneventevent:
mes .@n$;
mes "Guess the number...It is a number between between 1 and 3,000!";
input .@guessnumber;
next;
if(.@guessnumber > .usednumber) {
mes .@n$;
mes "My number is ^FF0000SMALLER^000000 than the one you guessed!";
close;
} else if(.@guessnumber < .usednumber) {
mes .@n$;
mes "My number is ^FF0000BIGGER^000000 than the one you guessed!";
close;
} else if(.@guessnumber == .usednumber) {
announce ""+strcharinfo(0)+" has won the Guess the Number Event! My number was "+.usednumber+"!",0;
mes .@n$;
mes "You have guessed my number! Congratulations!";
getitem @prize,@amoun;
disablenpc "guess";
set .guessstart,0;
close2;
end;
}
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  748
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

56 minutes ago, Vale said:

 as the title itself said it, I want to unhide the NPC when the event is done

for example, there is a winner, then the other players can closed the dialog box here is my script...


// = Script made by RIKIMARU on rathena.org
// = Profile Link :
// = http://rathena.org/board/user/434-rikimaru/
// = ENJOY THIS SCRIPT!
//===================================================================================
//	    //=====//	 /==/	 /==/		  /==/	 
//	   //	 //	 /==/	 /==/  /=/	 /==/		
//	  //=====//			  /==/  /=/			 /==============/	 /========/   /==//===/    /==/	 /==/
//	 //=//////    /==/	  /==//=/	   /==/    /==/==/==/==/==/	 /	 /  /   /==/		 /==/	 /==/
//    // ==	    /==/	  /==//=/	   /==/    /==/  /==/  /==/	 ======/  /   /==/		 /==/	 /==/
//   //   ==	  /==/	  /==/  /=/	 /==/    /==/  /==/  /==/	 / /===/  /   /==/		 /==/	 /==/
//  //	 ==    /==/	  /==/   /=/    /==/    /==/  /==/  /==/	 / /===/  /   /==/		 /==/=====/==/
// //	   ==  /==/	  /==/    /=/   /==/    /==/  /==/  /==/	 /========/   /==/		 /==///////==/
// ================ rAthena Script ==================================================
// ============== Information =======================================================
// = Automated Guess the Number Event
// = Made by :
// = Rikimaru
//===== Current Version: ===============================================
//= 2.3
//===== Compatible With: ===============================================
//= any rAthena SVN
//===== Description: ===================================================
//= This is an automated Guess the Number Event,which I made
//= for having fun in game,guessing a number. The number is going
//= to be a number between 1 and 2000 , so it'll take time to find out
//= the correct number.
//===== Additional Comments: ===========================================
//= 2.0 Fixed an announcer Bug [Rikimaru]
//= 2.1 Fixed a few Typos in the Script [Rikimaru]
//= 2.2 Fixed the Prize,which was not working correctly. [Rikimaru]
//= 2.3 Fixed another little Bug. [Rikimaru]
//======================================================================
//= DO NOT REMOVE MY CREDITS AND CLAIM MY WORK AS YOURS
//======================================================================
-	script	guessannouncer	-1,{
OnClock0000:
OnClock0200:
OnClock0400:
OnClock0600:
OnClock0800:
OnClock1000:
OnClock1200:
OnClock1400:
OnClock1600:
OnClock1800:
OnClock2200:
announce "[Announcement]: Guess The Number Event will begin",0;
sleep 40000;
announce "[Announcement]: To join event please type @joinevent",0;
sleep 30000;
announce "Guess the Number: Is starting in 30 Seconds in Main  Town!",0;
sleep 20000;
announce "Guess the Number: 10 Seconds! Gather up in Main  Town quick!",0;
sleep 5000;
announce "Guess the Number: 5 Seconds Left!",0;
sleep 1000;
announce "Guess the Number: 4 Seconds!",0;
sleep 1000;
announce "Guess the Number: 3 Seconds!",0;
sleep 1000;
announce "Guess the Number: 2 Seconds!",0;
sleep 1000;
announce "Guess the Number: 1 Second!",0;
sleep 1000;
   announce "Guess the Number: The event has started!",0;
   enablenpc "guess";
   end;

OnInit:
   disablenpc "guess";
   end;
}
// ==============================================================================
firstcity,240,45,8	script	Guess the Number::guess	952,{
// =================== Setting the NPC Name and Prize and amount  =============
set .@n$,"^FF0000[Guess the Number]^000000";
set @prize,33000;//Change the 7227 to your reward item ID
set @amoun,10;//Change the 10 to your reward amount
// ==================== End of settings =========================================
if(.guessstart==1) goto Oneventevent;
set .usednumber, rand(1,3000);
announce "Guess the Number: Guess the Number Event Started in Main Town!",0;
set .guessstart,1;
Oneventevent:
mes .@n$;
mes "Guess the number...It is a number between between 1 and 3,000!";
input .@guessnumber;
next;
if(.@guessnumber > .usednumber) {
mes .@n$;
mes "My number is ^FF0000SMALLER^000000 than the one you guessed!";
close;
} else if(.@guessnumber < .usednumber) {
mes .@n$;
mes "My number is ^FF0000BIGGER^000000 than the one you guessed!";
close;
} else if(.@guessnumber == .usednumber) {
announce ""+strcharinfo(0)+" has won the Guess the Number Event! My number was "+.usednumber+"!",0;
mes .@n$;
mes "You have guessed my number! Congratulations!";
getitem @prize,@amoun;
disablenpc "guess";
set .guessstart,0;
close2;
end;
}
}

 

 

announce ""+strcharinfo(0)+" has won the Guess the Number Event! My number was "+.usednumber+"!",0;
mes .@n$;
mes "You have guessed my number! Congratulations!";
getitem @prize,@amoun;
disablenpc "guess";

 

---------------------------------------

*disablenpc "<NPC object name>";
*enablenpc "<NPC object name>";

These two commands will disable and enable, respectively, an NPC object
specified by name. The disabled NPC will disappear from sight and will no longer
be triggerable in the normal way. It is not clear whether it will still be
accessible through 'donpcevent' and other triggering commands, but it probably
will be. You can disable even warp NPCs if you know their object names, which is
an easy way to make a map only accessible through walking half the time. Then
you 'enablenpc' them back.

You can also use these commands to create the illusion of an NPC switching
between several locations, which is often better than actually moving the NPC -
create one NPC object with a visible and a hidden part to their name, make a few
copies, and then disable all except one.

---------------------------------------

*hideonnpc "<NPC object name>";
*hideoffnpc "<NPC object name>";

These commands will make the NPC object specified display as hidden/visible,
even though not actually disabled per se. Hidden as in thief Hide skill, but
unfortunately, not detectable by Ruwach or Sight.

As they are now, these commands are pointless, it is suggested to use
'disablenpc'/'enablenpc', because these two commands actually unload the NPC
sprite location and other accompanying data from memory when it is not used.
However, you can use these for some quest ideas (such as cloaking NPCs talking
while hidden then revealing.... you can wonder around =P

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

3 minutes ago, Bringer said:

 


announce ""+strcharinfo(0)+" has won the Guess the Number Event! My number was "+.usednumber+"!",0;
mes .@n$;
mes "You have guessed my number! Congratulations!";
getitem @prize,@amoun;
disablenpc "guess";

 


---------------------------------------

*disablenpc "<NPC object name>";
*enablenpc "<NPC object name>";

These two commands will disable and enable, respectively, an NPC object
specified by name. The disabled NPC will disappear from sight and will no longer
be triggerable in the normal way. It is not clear whether it will still be
accessible through 'donpcevent' and other triggering commands, but it probably
will be. You can disable even warp NPCs if you know their object names, which is
an easy way to make a map only accessible through walking half the time. Then
you 'enablenpc' them back.

You can also use these commands to create the illusion of an NPC switching
between several locations, which is often better than actually moving the NPC -
create one NPC object with a visible and a hidden part to their name, make a few
copies, and then disable all except one.

---------------------------------------

*hideonnpc "<NPC object name>";
*hideoffnpc "<NPC object name>";

These commands will make the NPC object specified display as hidden/visible,
even though not actually disabled per se. Hidden as in thief Hide skill, but
unfortunately, not detectable by Ruwach or Sight.

As they are now, these commands are pointless, it is suggested to use
'disablenpc'/'enablenpc', because these two commands actually unload the NPC
sprite location and other accompanying data from memory when it is not used.
However, you can use these for some quest ideas (such as cloaking NPCs talking
while hidden then revealing.... you can wonder around =P

 

pardon me... I don't understand hmmm

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...