Jump to content
  • 0

About this GoldRoom (Read Pls) T_T


CursorX

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

Hello Everyone.. im having a problem on here in GoldRoom script.. i changed all./ but i did get this here somewhere... can help me change it?

 

1. 1hr open is good.. but after 1minute the npc is hiding

2. how do i change the randome getting of gold.. like 25% 3gold or 50% 2gold or 75% 1gold

3. how do i change the countdown time in waitingroom into something like this XX:XX

 

Am i wrong here?

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


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

//-- Gold room open
hideoffnpc "Gold Room";
announce "Gold Room : It is now open for 1 hour, Only 30 players are allowed to join !",0;

//-- 1 hour before players will be warp
initnpctimer;
while( 3600 - ( getnpctimer(0) / 60000 ) > 0 ) {
delwaitingroom;
waitingroom "Countdown "+( 3600 - ( getnpctimer(0) / 60000 ) )+" Minutes",0;
sleep 100;
}

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

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

OnMobKill:
if( rand(100) < 25 ) getitem 969,3;
monster .Map$,0,0,"Gold",1369,100,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 = 3600;

//--
hideonnpc "Gold Room";
set .Map$,"ordeal_3-2";
monster .Map$,0,0,"Gold",1369,100,strnpcinfo(0)+"::OnMobKill";
end;

}
Edited by DwGen
Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   2
  • Joined:  05/23/12
  • Last Seen:  

1. 1hr open is good.. but after 1minute the npc is hiding -> Add end; no ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

prontera,147,169,5	script	Gold Room	100,{

if ( getmapusers( .map$ ) >= 30 )

dispbottom "You cant go in right now. There are already 30 peoples inside.";

else {

announce "["+ strcharinfo(0) +"] entered Gold Room. "+( 30 - getmapusers( .map$ ) - 1 )+" place left.", bc_all;

warp .map$, 0,0;

}

end;

OnWhisperGlobal:

OnClock0100:

hideoffnpc strnpcinfo(0);

announce "Gold Room : I will open my door in 1 minute! Head your way to Prontera.", bc_all;

// sleep 60 * 1000; // 1 min

// announce "Gold Room : It is now open for 1 hour, Only 30 players are allowed to join !", bc_all;

.@timeover = gettimetick(2) + 60 * 60; // 59 mins

while ( .@timeover >= gettimetick(2) ) {

delwaitingroom;

.@left = .@timeover - gettimetick(2);

.@min = .@left / 60;

.@sec = .@left % 60;

waitingroom "Countdown "+ .@min +":"+( ( .@sec < 10 )? "0"+ .@sec : .@sec ), 0;

sleep 500;

}

delwaitingroom;

mapannounce .map$, "Time's Up !! You will be warped out right now..", bc_all;

mapwarp .map$, "prontera",155,182;

hideonnpc strnpcinfo(0);

announce "Gold Room is now closed !", bc_all;

end;

OnMobKill:

.@r = rand(100);

if ( .@r < 25 )

getitem 969,3;

else if ( .@r < 50 )

getitem 969,2;

else

getitem 969,1;

monster .map$, 0,0, "Gold", 1369,100, strnpcinfo(0)+"::OnMobKill";

end;

OnInit:

.map$ = "ordeal_3-2";

hideonnpc strnpcinfo(0);

monster .map$, 0,0, "Gold", 1369,100, strnpcinfo(0)+"::OnMobKill";

end;

}

dunno why I'm spoon feeding in support section =/
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

are this going to close after 1hr? then close upto 2hrs?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

.@timeover = gettimetick(2) + 60 * 60; // 59 mins
it open for 1 hour then close itself

if you want close up to 2 hour, then add OnClock0400: OnClock0700: ... yourself

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

.@timeover = gettimetick(2) + 60 * 60; // 59 mins
it open for 1 hour then close itself

if you want close up to 2 hour, then add OnClock0400: OnClock0700: ... yourself

 

Where do i put the clock for 2hrs close?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

OnClock0100:

OnClock0400:

OnClock0700:

OnClock1000:

....

read the script and find where the label is ...

don't forget to remove OnWhisperGlobal ....

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

last question:

 

do i need to uncomment this one for the npc to get 1minute interval before opening the gold room?

//	sleep 60 * 1000; // 1 min
//	announce "Gold Room : It is now open for 1 hour, Only 30 players are allowed to join !", bc_all;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

you mean your script has announcement for 1 minute before open, then open for 59 minutes ?

the reason I comment it because I follow your script that doesn't generate the waitingroom countdown for 1 minute,

then 59 minute has the waitingroom countdown

later I feel doesn't make sense for 1 minute open without the countdown so I removed it

if you want to uncomment it, then the 60*60 can be change into 56*60, thus follows what the comment said

btw if that's your script, shouldn't you know how to fix it yourself ?

since the script doesn't has any credit

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

i think my gold room is tripling the spawn after i kill 1...

 

1 kill = more than 50 monster spawns T_T

 

how do i maintain only 50? 1 kill = 1 spawn ^^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

opsss ~~

hahaha

the monster command inside OnMobKill label, only need to spawn 1 back, not spawn 100 more lol

monster .map$, 0,0, "Gold", 1369,1, strnpcinfo(0)+"::OnMobKill";
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

thank you very much annie for your time ^^,

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