Jump to content
  • 0

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


Question

Posted


//======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

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

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

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