Jump to content
  • 0

Need Help - GX Job Change


GM Takumirai

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

this is a custom script of GX

- i have a problem on this part

//	Waiting Room for "Room of Life"
//	===================================
job3_guil02,41,44,3	script	Waiting Room#guil	467,{

OnInit:
[b]waitingroom "Waiting Room",20,"Waiting Room#guil::OnStartArena",1;[/b]
enablewaitingroomevent;
end;

OnStartArena:
killmonsterall "job3_guil03";
warpwaitingpc "job3_guil03",22,67;
donpcevent "Room of Life::OnEnable";
disablenpc "Waiting Room#guil";
disablewaitingroomevent;
end;

OnStart:
enablewaitingroomevent;
end;
}

//	Room of Life
//	======================================
job3_guil03,1,1,0	script	Room of Life	66,{

OnInit:
disablenpc "Room of Life";
end;

OnEnable:
enablenpc "Room of Life";
set .MyMobs,4;
monster "job3_guil03",47,75,"Raydric",1163,2,"Room of Life::OnMyMobDead";
monster "job3_guil03",47,44,"Raydric",1163,2,"Room of Life::OnMyMobDead";
initnpctimer;
end;

OnDisable:
killmonsterall "job3_guil03";
disablenpc "Room of Life";
end;

OnMyMobDead:
set .MyMobs,.MyMobs-1;
if (.MyMobs < 1) {
	mapannounce "job3_guil03",strcharinfo(0)+" has succeeded in eliminating the monsters.",bc_map;
	sleep2 3000;
	mapannounce "job3_guil03",strcharinfo(0)+" the warp is open.",bc_map;
	enablenpc "warpguil001";
	donpcevent "Room of Life#Door::OnEnable";
	stopnpctimer;
}
end;

OnTimer1000:
mapannounce "job3_guil03","Life Room; The job change test will now proceed.",bc_map;
end;

OnTimer2000:
mapannounce "job3_guil03","Time limit is 5 minutes. We will now start the test.",bc_map;
end;

OnTimer3000:
mapannounce "job3_guil03","Please eliminate all monsters within the time limit.",bc_map;
end;

OnTimer150000:
mapannounce "job3_guil03","It's half time!",bc_map;
end;

OnTimer240000:
mapannounce "job3_guil03","1 minute remaining.",bc_map;
end;

OnTimer270000:
mapannounce "job3_guil03","30 seconds remaining.",bc_map;
end;

OnTimer290000:
mapannounce "job3_guil03","10 seconds remaining.",bc_map;
end;

OnTimer300000:
mapannounce "job3_guil03","Time is up.",bc_map;
donpcevent "Room of Life::OnDisable";
end;

OnTimer301000:
enablenpc "Room of Life#Failed";
end;

OnTimer305000:
mapannounce "job3_guil03","Next candidate, please enter.",bc_map;
end;

OnTimer306000:
disablenpc "Room of Life#Failed";
donpcevent "Room of Life::OnDisable";
donpcevent "Waiting Room#guil::OnStart";
end;
}

job3_guil03,1,2,1	script	Room of Life#Door	66,{

OnInit:
disablenpc "Room of Life#Door";
end;

OnEnable:
enablenpc "Room of Life#Door";
donpcevent "Room of Life::OnDisable";
set .MyMobs,4;
monster "job3_guil03",81,71,"Anubis",1098,2,"Room of Life#Door::OnMyMobDead";
monster "job3_guil03",81,46,"Anubis",1098,2,"Room of Life#Door::OnMyMobDead";
initnpctimer;
end;

OnDisable:
killmonsterall "job3_guil03";
disablenpc "Room of Life#Door";
end;

OnMyMobDead:
set .MyMobs,.MyMobs-1;
set GX_Q2, 9;
if (.MyMobs < 1) {
	mapannounce "job3_guil03",strcharinfo(0)+" has succeeded in eliminating the monsters.",bc_map;
	percentheal 100,100;
	enablenpc "warpguil002";
	donpcevent "Room of Life#Door::OnDisable";
	stopnpctimer;
}
end;

OnTimer1000:
mapannounce "job3_guil03","The guard monster has appeared. You have 5 minutes.",bc_map;
end;

OnTimer125000:
mapannounce "job3_guil03","Half time!",bc_map;
end;

OnTimer240000:
mapannounce "job3_guil03","1 minute remaining.",bc_map;
end;

OnTimer245000:
mapannounce "job3_guil03","30 secounds remaining.",bc_map;
end;

OnTimer250000:
mapannounce "job3_guil03","10 secounds remaining.",bc_map;
end;

OnTimer210000:
mapannounce "job3_guil03","Time is up.",bc_map;
donpcevent "Room of Life#Door::OnDisable";
end;

OnTimer211000:
enablenpc "Room of Life#Failed";
end;

OnTimer212000:
mapannounce "job3_guil03","The Warp to the Guildsman if open.",bc_map;
end;

OnTimer213000:
disablenpc "Room of Life#Failed";
donpcevent "Room of Life#Door::OnDisable";
donpcevent "Waiting Room#guil::OnStart";
end;
}

job3_guil03,1,1,0	script	Room of Life#Failed	-1,160,100,{
OnInit:
disablenpc "Room of Life#Failed";
end;

OnTouch:
mapannounce "job3_guil03",strcharinfo(0)+" has not succeeded.",bc_map;
warp "prontera",120,110;
end;
}

//	Room of Life Warps
//	=============================
job3_guil03,53,64,0	script	warpguil001	45,3,3,{
end;

OnTouch:
warp	"job3_guil03",57,64;
end;
}
job3_guil03,130,50,0	script	warpguil002	45,2,2,{
end;

OnTouch:
warp	"job3_guil03",126,50;
hideoffnpc "GX Guildsman";
end;
}

my problem is

- when the player in the area is dead or gone

- the next player in the waiting room doesn't warp to the area.

- please check the script thanks

Edited by Arcenciel
Codeboxed
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  130
  • Reputation:   43
  • Joined:  12/11/11
  • Last Seen:  

You need to keep track of OnPCLogoutEvent and OnPCDieEvent. When they occur, you want to bring another player in.

Another way to do it is to check if the map is always empty. If it is, bring another player in.

Make sure to check OnPCLoginEvent so that they don't log in to the same map tho. You could warp them away if they log in to an event.

Edited by plankt
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

- thanks plank can u modify the script thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  130
  • Reputation:   43
  • Joined:  12/11/11
  • Last Seen:  

Post it in the script request forum and a member might take the time to modify it.

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