Jump to content

Click The Pub! Event


Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  93
  • Reputation:   6
  • Joined:  12/10/11
  • Last Seen:  

What if... Make a random sentence/words in the Pub then the first player who entered the Pub will be the winner?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

What do you mean by that? What's the point of sentence/word for the pub title?

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  6
  • Reputation:   0
  • Joined:  03/04/14
  • Last Seen:  

Doesnt work (prize dont give, chat no del)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Can you post your error

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  6
  • Reputation:   0
  • Joined:  03/04/14
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

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;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  6
  • Reputation:   0
  • Joined:  03/04/14
  • Last Seen:  


getitem .Prize[0],.Prize[1],($@warpwaitingpc[0]);

Prize works

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Seems weird, we tested this before and it worked. I'll have it checked again. Thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  41
  • Reputation:   0
  • Joined:  03/19/14
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Oh, that was supposed to be a close2; Sorry

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/28/14
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  224
  • Reputation:   4
  • Joined:  02/09/12
  • Last Seen:  

as a request it will have random pub and who 1st enter the pub and type the same pubname win

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  73
  • Reputation:   2
  • Joined:  12/19/11
  • Last Seen:  

how to make this script automated?

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

×
×
  • Create New...