Jump to content

Recommended Posts

Posted

File Name: Click The Pub

File Submittersandbox

File Submitted: 14 Mar 2014

File Category: Game, Event, Quest

Content Author: sandbox


Script Details & Usage

This simple event will create an NPC chatroom upon starting, the first player to enter the chat room will be declared winner.

Feel free to suggest on how can I improve this very simple script even more. Thank you!

Installation
  • Enable the script on your NPC folder
  • Carefully read the comments I made inside the script and make sure to configure it properly

Terms & Conditions
  • You are not allowed to reproduce or make profit of this script
  • You are not allowed to take credit for this script. Though you can modify/edit it to your liking.
  • I can give you support, but please, do not message me.
  • It is your own responsibility to create a backup before implementing anything new.

Pastebin: http://rathena.org/board/pastebin/nc21plexy9b/

 

Special thanks to: @ToastOfDoom, @nanakiwurtz for helping me with this script!

 

Version History:

  • 1.0 - Initial Release
  • 1.1 - Fixed minor errors thanks to @666BANDIT007

clickthepub.txt

  • Upvote 1
  • 4 weeks later...
  • 3 weeks later...
Posted

Sry for my badly english.

1. Dont click (if default script)
I think its because:

prontera,100,200,3    script    Click The Pub    78,{

end; <== This

if(!.AM) {
    if(getgroupid() > 40) {
        mes "Hello! Do you want to start the event?";
        next;
        close;
        mes "Thank you!";
        goto OnCTPStart;
        close;
    }
}

2. If comment end, then npc dont start. I think:

prontera,100,200,3	script	Click The Pub	78,{

//end;

if(!.AM) {
	if(getgroupid() > 40) {
		mes "Hello! Do you want to start the event?";
		next;
		close; <== This
		mes "Thank you!";
		goto OnCTPStart;
		close;
	}
}

3. Result:

777d5ee01b8181da9bf84e419b0f84bea82c0041

Prize dont give, event dont stop.

What im doing wrong?

Posted

Revised the script, kindly test. Also, don't forget to config it properly.. 

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

prontera,100,200,3	script	Click The Pub	78,{


if(!.AM) {
	if(getgroupid() > 40) {
		mes "Hello! Do you want to start the event?";
		next;
		close;
		mes "Thank you!";
		goto OnCTPStart;
		close;
	} else end;
}


OnInit:
	//Set the Prize's Item ID, followed by amount";
		setarray .Prize[0],607,1;

	//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 prontera 100 200!",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 "prontera",100,200,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;

}

Posted

sir sandbox why ur script have debug hahahaha i see other fix but i dont know add what this is code need to fix

announce "Ready...!",0;
for(.@i = 10; .@i > 0; .@i--) {
announce .@i,0;
waitingroom .@i,0;
 
its show debug everytime the npc counting
  • 1 month later...
Posted (edited)

I've updated the script, can you try the new file?

I tryed http://rathena.org/board/pastebin/f4nxnnt3ba3/ and it didn't start, ive seen one of the reports of 666BANDIT007 and this didn't change in your latest.

 

if(!.AM) {
if(getgroupid() > 40) {
mes "Hello! Do you want to start the event?";
next;
close; <---------- What is the purpose of this close function??
mes "Thank you!";
goto OnCTPStart;
close;
} else end;
}
Edited by Lelouch vi Britannia
  • 3 months later...
Posted
//======Name========================================
// Click The Pub!
//======Version=====================================
// 1.1
//======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. 
//==================================================

sec_in01,92,171,4	script	Click The Pub	78,{


if(!.AM) {
	if(getgroupid() > 40) {
		mes "Hello! Do you want to start the event?";
		next;
		close;
		mes "Thank you!";
		goto OnCTPStart;
		close;
	} else end;
}


OnInit:
	//Set the Prize's Item ID, followed by amount";
		setarray .Prize[0],7227,1;

	//Set 1 for Automated, 0 for Manual
		.AM = 1;
	//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 "Just go to the Event Area!",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 "prontera",155,178,1;
	announce rid2name($@warpwaitingpc[0])+" won the Click The Pub event!",0;
	getitem .Prize[0],.Prize[1],$@warpwaitingpc[0];
	delwaitingroom;
	disablenpc strnpcinfo(1);
//	if(.AM) goto OnCTPStart;
	end;

}

sir im using your script but the thing is sometimes it keeps on doing the event..not only once..sometimes 2x/3x

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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