Jump to content
  • 0

Help On CTP event No errors but GM lvl 99 Cant access the NPC


AinsLord

Question


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  



//======Name========================================
// Click The Pub!
//======Version=====================================
// 1.0
//======Author(s)===================================
// Sandbox
//======Comments====================================
// This simple event will create an NPC chatroom upon
// starting, the first player to enter the chat room
// will be declared winner. 
//==================================================
 
morocc,124,101,5	script	Click The Pub	78,{
 
end;
 
if(!.AM) {
	if(getgroupid() > 99) {
		mes "Hello! Do you want to start the event?";
		next;
		close;
		mes "Thank you!";
		goto OnCTPStart;
		close;
	}
}
 
 
OnInit:
	//Set the Prize's Item ID, followed by amount";
		setarray .Prize[0],7227,2;
 
	//Set 1 for Automated, 0 for Manual
		.AM = 0;
	//If automated, set number of hours to repeat it. Default: 1 hour
		.Repeat = 1;
 
	if(!.AM) end;
 
OnCTPStart:
	if(.AM && !agitcheck() && !agitcheck2()) { 
		sleep .Repeat*600000;
		enablenpc strnpcinfo(1);
	}
 
	announce "Click The Pub event will start in a few seconds!",0;
	sleep 2000;
	announce "Gather around morocc 124 101!",0;
	sleep 2000;
	announce "This event will give a prize to the player who enters my Pub first!",0;
	sleep 2000;
	announce "Ready...!",0;
	for(.@i = 10; .@i > 0; .@i--) {
		announce .@i,0;
		waitingroom .@i,0;
		sleep 1000;
		delwaitingroom;
	}
	announce "Go! Go! Go!",0;
	waitingroom "Click Me!",2,strnpcinfo(1)+"::OnFirstClick",1;
	end;
 
OnFirstClick:
	warpwaitingpc "morocc",124,101,1;
	announce rid2name($@warpwaitingpc[0])+" won the Click The Pub event!",0;
	getitem .Prize[0],.Prize[1];
	delwaitingroom;
	disablenpc strnpcinfo(1);
	if(.AM) goto OnCTPStart;
	end;
 
}

dunno what seems to be the problem no errors shows on the console

thnx in advance

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   1
  • Joined:  10/16/16
  • Last Seen:  

You need to change it to > 98 if you want 99 to be able to use it. The coding above implies greater than 99.

if(getgroupid() > 98) {

 

Edited by DapvhirGaming
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


morocc,124,101,5	script	Click The Pub	78,{
 
end;  // <----------- THIS LINE CAUSED NOBODY CAN TALK TO THE NPC.
 
if(!.AM) {

 

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