Jump to content
  • 0

About this GoldRoom (Read Pls) T_T


Question

Posted (edited)

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

11 answers to this question

Recommended Posts

Posted

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
Posted

.@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
Posted
.@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?

Posted

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;
Posted

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
Posted

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...