Jump to content
  • 0

GoldRoom


Yudax

Question


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  248
  • Reputation:   7
  • Joined:  11/27/12
  • Last Seen:  

Good Evening Rathena,

1) I want this NPC to APPEAR every 1Hour and 10 Minutes, and HIDE himself at exactly 1Hour and 11 Minutes.

2) I want this NPC to announce, 1 Minute before this NPC will appear.

3) Only 8 Players are allowed to enter the Gold Room

Thankyou.

Crystilia,63,78,5    script    Gold Room    757,{
if( getmapusers( .Map$ ) ){
npctalk "You cant go in right now. There is someone inside.";
}else{
announce "["+strcharinfo(0)+"] entered Gold Room.",0;
warp .Map$,0,0;
initnpctimer;
}
end;

OnInit:
set .Map$,"guild_vs5";
monster .Map$,0,0,"Gold",1369,100,strnpcinfo(0)+"::OnMobKill";
while( 1 ){
delwaitingroom;
if( getmapusers( .Map$ ) ){
 waitingroom "Countdown "+( 60 - ( getnpctimer(0) / 1000 ) )+" Seconds",0;
}
sleep 1000;
}
end;

OnClock0010:
OnClock0110:
OnClock0210:
OnClock0310:
OnClock0410:
OnClock0510:
OnClock0610:
OnClock0710:
OnClock0810:
OnClock0910:
OnClock1010:
OnClock1110:
OnClock1210:
OnClock1310:
OnClock1410:
OnClock1510:
OnClock1610:
OnClock1710:
OnClock1810:
OnClock1910:
OnClock2010:
OnClock2110:
OnClock2210:
OnClock2310:
   enablenpc "Gold Room";
   end;

OnClock0011:
OnClock0111:
OnClock0211:
OnClock0311:
OnClock0411:
OnClock0511:
OnClock0611:
OnClock0711:
OnClock0811:
OnClock0911:
OnClock1111:
OnClock1111:
OnClock1211:
OnClock1311:
OnClock1411:
OnClock1511:
OnClock1611:
OnClock1711:
OnClock1811:
OnClock1911:
OnClock2011:
OnClock2111:
OnClock2211:
OnClock2311:
   disablenpc "Gold Room";
   end;

OnMobKill:
getitem 969,1;
monster .Map$,0,0,"Gold",1369,1,strnpcinfo(0)+"::OnMobKill";
end;
OnTimer60000:
mapannounce .Map$,"Time's Up !! You will be warped out right now..",0;
mapwarp .Map$,"Crystilia",70,71;
end;


}


bump

Edited by AnnieRuru
use [codebox] if the script > 10 lines
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


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

1) I want this NPC to APPEAR every 1Hour and 10 Minutes, and HIDE himself at exactly 1Hour and 11 Minutes.

2) I want this NPC to announce, 1 Minute before this NPC will appear.

3) Only 8 Players are allowed to enter the Gold Room

Like you ask for + 10 minutes after enter, player will warp out.

Crystilia,63,78,5	script	Gold Room	757,{

if( getmapusers( .Map$ ) > 7 )
	npctalk "You cant go in right now. There are already 8 peoples inside.";
else {
	announce "["+strcharinfo(0)+"] entered Gold Room. "+(7-getmapusers( .Map$ ))+" place left.",0;
	warp .Map$,0,0;
}
end;


//-- Trigger auto event
OnMinute09:
announce "Gold Room will open his door in one minute !",0;
sleep 1000 * .willopenin;

//-- Gold room open
hideoffnpc "Gold Room";
announce "Gold Room is open ! You have one minute to enter ! Only 8 player are allowed to enter !",0;
sleep 1000 * .timeenter;

//-- Gold room closed
hideonnpc "Gold Room";
announce "Gold Room is close !",0;

//-- 10 minutes before players will be warp
initnpctimer;
while( getmapusers( .Map$ ) ) {
	delwaitingroom;
	waitingroom "Countdown "+( 600 - ( getnpctimer(0) / 1000 ) )+" Seconds",0;
	sleep 1000;
}
delwaitingroom;
end;

OnTimer600000:
mapannounce .Map$,"Time's Up !! You will be warped out right now..",0;
mapwarp .Map$,"Crystilia",70,71;
   stopnpctimer;
end;


OnMobKill:
getitem 969,1;
monster .Map$,0,0,"Gold",1369,1,strnpcinfo(0)+"::OnMobKill";
end;

OnInit:
//-- Gold Room will open his door in XX - in seconds -- 60 seconds = 1 minute x.x
.willopenin = 60;
//-- Time to enter (secondes) before hide the NPC
.timeenter = 60;
//--
hideonnpc "Gold Room";
set .Map$,"guild_vs5";
monster .Map$,0,0,"Gold",1369,100,strnpcinfo(0)+"::OnMobKill";
end;
}

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  248
  • Reputation:   7
  • Joined:  11/27/12
  • Last Seen:  

1) I want this NPC to APPEAR every 1Hour and 10 Minutes, and HIDE himself at exactly 1Hour and 11 Minutes.

2) I want this NPC to announce, 1 Minute before this NPC will appear.

3) Only 8 Players are allowed to enter the Gold Room

Like you ask for + 10 minutes after enter, player will warp out.

Crystilia,63,78,5	script	Gold Room	757,{

if( getmapusers( .Map$ ) > 7 )
	npctalk "You cant go in right now. There are already 8 peoples inside.";
else {
	announce "["+strcharinfo(0)+"] entered Gold Room. "+(7-getmapusers( .Map$ ))+" place left.",0;
	warp .Map$,0,0;
}
end;


//-- Trigger auto event
OnMinute09:
announce "Gold Room will open his door in one minute !",0;
sleep 1000 * .willopenin;

//-- Gold room open
hideoffnpc "Gold Room";
announce "Gold Room is open ! You have one minute to enter ! Only 8 player are allowed to enter !",0;
sleep 1000 * .timeenter;

//-- Gold room closed
hideonnpc "Gold Room";
announce "Gold Room is close !",0;

//-- 10 minutes before players will be warp
initnpctimer;
while( getmapusers( .Map$ ) ) {
	delwaitingroom;
	waitingroom "Countdown "+( 600 - ( getnpctimer(0) / 1000 ) )+" Seconds",0;
	sleep 1000;
}
delwaitingroom;
end;

OnTimer600000:
mapannounce .Map$,"Time's Up !! You will be warped out right now..",0;
mapwarp .Map$,"Crystilia",70,71;
stopnpctimer;
end;


OnMobKill:
getitem 969,1;
monster .Map$,0,0,"Gold",1369,1,strnpcinfo(0)+"::OnMobKill";
end;

OnInit:
//-- Gold Room will open his door in XX - in seconds -- 60 seconds = 1 minute x.x
.willopenin = 60;
//-- Time to enter (secondes) before hide the NPC
.timeenter = 60;
//--
hideonnpc "Gold Room";
set .Map$,"guild_vs5";
monster .Map$,0,0,"Gold",1369,100,strnpcinfo(0)+"::OnMobKill";
end;
}

Hi,

( 1 )What i want is how will I make 50% chance to drop Gold and Coin?

( 2 )And instead of 10Minutes, I want it to be only 1 Minute event, before they will warped back to Crystilia

( 3 )Count down Starts when the NPC appears. 60 seconds -> 0.

( 4 ) Is it okay to use OnMobKill: and OnMobKill2: ?

( 5 ) What is the meaning of this?

waitingroom "Countdown "+( 600 - ( getnpctimer(0) / 1000 ) )+" Seconds",0;

OnMobKill:
getitem 969,1;
monster .Map$,0,0,"Gold",1369,1,strnpcinfo(0)+"::OnMobKill";
end;
OnMobKill2:
getitem 20103,1;
monster .Map$,0,0,"Coin",1369,1,strnpcinfo(0)+"::OnMobKill2";
end;
OnInit:
//-- Gold Room will open his door in XX - in seconds -- 60 seconds = 1 minute x.x
.willopenin = 60;
//-- Time to enter (secondes) before hide the NPC
.timeenter = 60;
//--
hideonnpc "Gold Room";
set .Map$,"guild_vs5";
monster .Map$,0,0,"Gold",1369,10,strnpcinfo(0)+"::OnMobKill";
monster .Map$,0,0,"Coin",1369,10,strnpcinfo(0)+"::OnMobKill2";
end;
}

Edited by Yudax
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:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  248
  • Reputation:   7
  • Joined:  11/27/12
  • Last Seen:  

Thanks emistry

By the way, how would i edit that they only drop Golds. and not everything of that monster drops?

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:  

http://rathena.org/wiki/Mapflag#nomobloot

yourmap<tab>mapflag<tab>nomobloot

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  248
  • Reputation:   7
  • Joined:  11/27/12
  • Last Seen:  

nomobloot

yourmap<tab>mapflag<tab>nomobloot

Thank you sir, it works.

How will I set this that there would be 50% chance to double the amount of Gold / Coins they will receive?

Enable Using of Yggdrasil Berry is restricted inside.

How to put NPC waiting room that when this NPC appears, the timer will start its count down from 60 seconds until 0. Then the NPC with the count down.

//-- Trigger auto event
OnMinute16:
announce "Gold Room : I will open my door in One ( 1 ) minute! Head your way to Crystilia 85 , 90.",0;
sleep 1000 * .willopenin;
//-- Gold room open
hideoffnpc "Gold Room";
announce "Gold Room : It is now open ! You have one minute to enter, Only 8 players are allowed to join !",0;
sleep 1000 * .timeenter;
//-- Gold room closed
hideonnpc "Gold Room";
announce "Gold Room is now closed !",0;
//-- 10 minutes before players will be warp
initnpctimer;
while( getmapusers( .Map$ ) ) {
 delwaitingroom;
 waitingroom "Countdown "+( 60 - ( getnpctimer(0) / 100 ) )+" Seconds",0;
 sleep 100;
}
delwaitingroom;
end;
OnTimer60:
mapannounce .Map$,"Time's Up !! You will be warped out right now..",0;
mapwarp .Map$,"Crystilia",70,71;
stopnpctimer;
end;

OnMobKill:
getitem 969,1;
monster .Map$,0,0,"Gold",1369,1,strnpcinfo(0)+"::OnMobKill";
end;
OnMobKill2:
getitem 20103,1;
monster .Map$,0,0,"Coin",1369,1,strnpcinfo(0)+"::OnMobKill2";
end;

OnMobKill3:
getitem 20103,0;
monster .Map$,0,0,"Gold",1369,1,strnpcinfo(0)+"::OnMobKill3";
end;
OnMobKill4:
getitem 20103,0;
monster .Map$,0,0,"Coin",1369,1,strnpcinfo(0)+"::OnMobKill4";
end;
OnInit:
//-- Gold Room will open his door in XX - in seconds -- 60 seconds = 1 minute x.x
.willopenin = 60;
//-- Time to enter (secondes) before hide the NPC
.timeenter = 60;
//--
hideonnpc "Gold Room";
set .Map$,"guild_vs5";
monster .Map$,0,0,"Gold",1369,10,strnpcinfo(0)+"::OnMobKill";
monster .Map$,0,0,"Coin",1369,20,strnpcinfo(0)+"::OnMobKill2";
monster .Map$,0,0,"Gold",1369,25,strnpcinfo(0)+"::OnMobKill3";
monster .Map$,0,0,"Coin",1369,25,strnpcinfo(0)+"::OnMobKill4";
end;
}

Edited by Yudax
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:  

How will I set this that there would be 50% chance to double the amount of Gold / Coins they will receive?

Like Emistry wrote in this script

if( rand(100) < 50 ) getitem 969,1;

Adjust it in your script, it's very easy.

Enable Using of Yggdrasil Berry is restricted inside.

Disabled Yggdrasil Berry's effect on the map ?

Option 1 :

In your db/re/item_db.txt folder

replace

607,Yggdrasilberry,Yggdrasil Berry,0,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 100,100; },{},{}

by

607,Yggdrasilberry,Yggdrasil Berry,0,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ if( strcharinfo(3) != "guild_vs5" ) percentheal 100,100; },{},{}

Option 2 :

You have got all the informations in this link

http://rathena.org/wiki/Mapflag#restricted.txt

How to put NPC waiting room that when this NPC appears, the timer will start its count down from 60 seconds until 0. Then the NPC with the count down.

replace

//-- Trigger auto event
OnMinute16:
announce "Gold Room : I will open my door in One ( 1 ) minute! Head your way to Crystilia 85 , 90.",0;
sleep 1000 * .willopenin;

//-- Gold room open
hideoffnpc "Gold Room";
announce "Gold Room is open ! You have one minute to enter ! Only 8 player are allowed to enter !",0;
sleep 1000 * .timeenter;

//-- Gold room closed
hideonnpc "Gold Room";
announce "Gold Room is close !",0;

//-- 10 minutes before players will be warp
initnpctimer;
while( getmapusers( .Map$ ) ) {
	delwaitingroom;
	waitingroom "Countdown "+( 60 - ( getnpctimer(0) / 1000 ) )+" Seconds",0;
	sleep 1000;
}
delwaitingroom;
end;

OnTimer60000:
   mapannounce .Map$,"Time's Up !! You will be warped out right now..",0;
   mapwarp .Map$,"prontera",70,71;
   stopnpctimer;
   end;

by

//-- Trigger auto event
OnMinute16:
announce "Gold Room : I will open my door in One ( 1 ) minute! Head your way to Crystilia 85 , 90.",0;
   sleep 1000 * .willopenin;

//-- Gold room open
   hideoffnpc "Gold Room";
   announce "Gold Room : It is now open ! You have one minute to enter, Only 8 players are allowed to join !",0;

//-- 1 minutes before players will be warp
   initnpctimer;

   while( 60 - ( getnpctimer(0) / 1000 ) > 0 ) {
       delwaitingroom;
       waitingroom "Countdown "+( 60 - ( getnpctimer(0) / 1000 ) )+" Seconds",0;
       sleep 100;
   }
   delwaitingroom;

   mapannounce .Map$,"Time's Up !! You will be warped out right now..",0;
   mapwarp .Map$,"prontera",70,71;
   stopnpctimer;

   //-- Gold room closed
   hideonnpc "Gold Room";
   announce "Gold Room is now closed !",0;
   end;

Your request will never finish XD

Edited by Capuche
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  248
  • Reputation:   7
  • Joined:  11/27/12
  • Last Seen:  

Thank you Capuche, It all solved my problem.

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