Jump to content
  • 0
Sign in to follow this  
mybitch

Q> How to end the event if no one..

Question

How to end this event if no one has successfully hunted the real poring?

 

 

//=========== PORING CATCHER MADE ==============//=== BY: SHOGS-GFX and RAGNAROK DEVELOPERS ====//= Please Report if you encounter some errors =//===== https://www.facebook.com/ShogsGfx ======//==============================================//==FUNCTIONS===================================/* GM Can start the event manualy   GM Can also stop the event manualyHOW: just PM this npc (npc:pcatch)The Next Guide Will Be Given by the Manager 	*///======= PLEASE DO NOT REMOVE CREDITS =========//==============================================//== MORE UPDATES TO COME FOR BETTER FUNCTION ==//===== https://www.facebook.com/ShogsGfx ======//============================================== //====LEVEL OF GM CAN CONTROL THE EVENT========= -	script	GMCONTROL	-1,{OnInit:set $gmcontrol,60;end; }//---------------END OF SETUP------------------- //================ON WHISPER=========================-	script	pcatch	-1,{ //====LEVEL OF GM CAN CONTROL THE EVENT=========//OnInit://set $gmcontrol,60;//end;//---------------END OF SETUP------------------- OnWhisperGlobal:if(getgmlevel() >= $gmcontrol) {mes "^3399FF[Poring Catcher]^000000";	mes "Hello GameMaster!";mes "What do you want to do?";switch(select("Start Event:Stop Event:Nothing")){	case 1:	 {		next;		mes "^3399FF[Poring Catcher]^000000";		mes "Please confirm by typing START.";		 input .@confirm$;         		 if (.@confirm$ == "START")		 {			donpcevent "Announcer2::OnGMStart";			 close;		}		mes "Confirmation failed";		close;		break;	}	case 2:	{		next;		mes "^3399FF[Poring Catcher]^000000";		mes "Please confirm by typing STOP.";		 input .@confirm$;         		 if (.@confirm$ == "STOP")		 {			donpcevent "Announcer2::OnGMStop";			close;		}		mes "Confirmation failed";		close;		break;			}						case 3:	{		next; mes "^3399FF[Poring Catcher]^000000";		mes "Good bye";		 close;	} }}}  //====================ANNOUNCER====================== -	script	Announcer2	-1,{ OnInit:	disablenpc "Poring Banker";	//disablenpc "PoringCatcher";	//bindatcmd("event","Announcer2::OnPcatch");end; /*OnPcatch:	if($@pcatch != 1){message strcharinfo(0),"Poring Catcher Event has not started yet."; end;}	if($@pcatchstart == 1){message strcharinfo(0),"Poring Catcher Event has already started."; end;}	mes "[Event Warper]";	mes "Would you like to go to the event?";	switch(select("Yes:No")){		case 1:			next;			mes "[Event Warper]";			mes "Good luck!";			warp "poring_c01",103,99;			close;		case 2:			close;		}end;*/  OnGMStart:	killmonster "poring_c01.gat","All";	set $@pcatch,1;	announce "Event Manager : A Gamemaster started a Poring Catcher Event now.",0;	sleep 3000;	announce "Event Manager : If you want to join, type @event and choose Poring Catcher Event.",0;	//enablenpc "PoringCatcher";	sleep 2000;	announce "Event Manager : Prize: will be 100 Cash Points and an Event Point",0;	sleep 2000;	announce "Event Manager : The warper is going to close in one minute.",0; 	 sleep 60000;	announce "Event Manager : The warper has closed.",0;	//disablenpc "PoringCatcher";	if(getmapusers("poring_c01") == 0)	 {		disablenpc "Poring Banker";		announce "Event Poring Catcher didn't start because there's no players.",0;		end;	}	 donpcevent "Poring Banker::OnEnable";	end; OnGMStop:	 killmonster "poring_c01.gat","All";	announce "A Gamemaster has stopped the Poring Catcher Event",0;	mapwarp "poring_c01.gat","prontera.gat",155,173;	disablenpc "Poring Banker";	//disablenpc "PoringCatcher";	set $@pcatch,0;	end;  OnClock0000:OnClock0200:OnClock0400:OnClock0600:OnClock0800:OnClock1000:OnClock1200:OnClock1400:OnClock1600:OnClock1800:OnClock2000:OnClock1157:	killmonster "poring_c01.gat","All";	set $@pcatch,1;	announce "Event Manager : Poring Catcher Event will start at the moment.",0;	sleep 3000;	announce "Event Manager : If you want to join, type @event and choose Poring Catcher Event.",0;	//enablenpc "PoringCatcher";	sleep 2000;	announce "Event Manager : Prize: will be 100 Cash Points and an Event Point",0;	sleep 2000;	announce "Event Manager : The warper is going to close in one minute.",0; 	 sleep 60000;	announce "Event Manager : The warper has been closed.",0;	//disablenpc "PoringCatcher";	if(getmapusers("poring_c01") == 0)	 {		disablenpc "Poring Banker";		announce "Event Manager: Poring Catcher Event didn't start because no players found in map.",0;		end;	}	 donpcevent "Poring Banker::OnEnable";	end; }//---------All Job Registration----------------------------------------//prontera,155,173,0	warp	PoringCatcher	2,2,poring_c01,105,128 //---------------------------------------------------------------------  //----------------------------------------------------------------------	script	Poring Banker	-1,{ OnEnable:set $@pcatchstart,1;mapannounce "poring_c01","Event Manager: The Poring Catcher Event will start shortly",0;sleep2 10000;mapannounce "poring_c01","Event Manager: I will be summoning 100 porings with different names kill the real poring",0;sleep2 10000;mapannounce "poring_c01","Event Manager: What are we waiting for?..Let's Catch some Porings!!...",0;sleep2 10000;goto L_Start;end;L_Start:	if(getmapusers("poring_c01") == 0) goto L_None;	if(getmapusers("poring_c01") >= 1) {	mapannounce "poring_c01","Event Manager: Get ready at the count of 5 we will start!....",0;	sleep2 1000;	mapannounce "poring_c01","Event Manager: 5",0;	sleep2 1000;	mapannounce "poring_c01","Event Manager: 4",0;	sleep2 1000;	mapannounce "poring_c01","Event Manager: 3",0;	sleep2 1000;	mapannounce "poring_c01","Event Manager: 2",0;	sleep2 1000;	mapannounce "poring_c01","Event Manager: 1",0;	donpcevent "Poringsummoner::OnSummon";	end;	}	 L_None:	announce "Event Manager : Poring Catcher Event has been cancelled due to no participants.",0;	set $@pcatch,0;	disablenpc "Poring Banker";	killmonster "poring_c01.gat","All";	end;} //==================SUMMONER OF PORINGS ======================-	script	Poringsummoner	-1,{ OnSummon:	if(getmapusers("poring_c01") == 0) goto L_2None;		monster "poring_c01.gat",0,0,"Poring",1002,1,"poringwin::OnMobKilled";		monster "poring_c01.gat",0,0,"Pouring",1002,10,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Proing",1002,10,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Poirng",1002,10,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Poing",1002,10,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"I'm not a Poring",1002,5,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Gnirop",1002,1,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Poring",1113,1,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Poring",1062,1,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Por|ng",1002,10,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Por1ng",1002,10,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Porong",1002,10,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"P0ring",1002,10,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"P@ring",1002,10,"poringlose::OnMobKilled";		monster "poring_c01.gat",0,0,"Porng",1002,1,"poringlose::OnMobKilled";end; L_2None:set $@pcatch,0;disablenpc "Poring Banker";killmonster "poring_c01.gat","All";end;} //==================REAL PORING FOR WIN======================-	script	poringwin	-1,{ OnMobKilled:	killmonster "poring_c01.gat","All";	atcommand "@doommap";	set #CASHPOINTS,#CASHPOINTS+100;	set #EVTPOINT,#EVTPOINT+1;	announce "Event Manager: We have a winner! well done " + strcharinfo(0) + ".",0;	warp "SavePoint",0,0;	set $@pcatch,0;	end;} //==================DUMY PORINGS FOR LOSERS======================-	script	poringlose	-1,{OnMobKilled:	dispbottom "Your out of the game, You did not catch the right Poring !";	percentheal -99,-99;	warp "SavePoint",0,0;	end;}  //==================Mapflags========================poring_c01	mapflag	nowarpporing_c01	mapflag	nowarptoporing_c01	mapflag	noteleportporing_c01	mapflag	nosaveporing_c01	mapflag	nomemoporing_c01	mapflag	nobranchporing_c01	mapflag	nolootporing_c01	mapflag	noskillporing_c01	mapflag	nopenalty

 

here's what I did

 

I tried adding this code

if(getmapusers("poring_c01") == 0) goto L_NoWin;
at 

 

//==================DUMY PORINGS FOR LOSERS======================-	script	poringlose	-1,{OnMobKilled:if(getmapusers("poring_c01") == 0) goto L_NoWin;	dispbottom "Your out of the game, You did not catch the right Poring !";	percentheal -99,-99;	warp "SavePoint",0,0;	end;L_NoWin:set $@pcatch,0;disablenpc "Poring Banker";killmonster "poring_c01.gat","All";end;}

 

unfortunately it didn't worked :(

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Pretty simple, if the last person in the room hit the wrong monster and he got into this menu then the game is supposed to stop, right?
So

OnMobKilled:if(getmapusers("poring_c01") <= 1) goto L_NoWin;    dispbottom "Your out of the game, You did not catch the right Poring !";    percentheal -99,-99;    warp "SavePoint",0,0;    end;

This will end the event. But! it will cause the script to not send the player back to his or her SavePoint, which is what you'll have to figure out next ;)

 

Note I only changed the portion within the if statement, from == 0 to <= 1

Share this post


Link to post
Share on other sites
  • 0

You've got things a bit mixed up.

How is this:

OnMobKilled:if(getmapusers("poring_c01") == 0) goto L_NoWin;    dispbottom "Your out of the game, You did not catch the right Poring !";    percentheal -99,-99;    warp "SavePoint",0,0;    end;

ever supposed to trigger?

 

Killing a monster requires 1 player to be within the map, no? So the first thing it does upon death of the mob is check, is there 1 person in the room, to which it will say yes, 1 or more. So it'll never become true and as such will never invoke the L_NoWin.

 

Share this post


Link to post
Share on other sites
  • 0

You've got things a bit mixed up.

How is this:

OnMobKilled:if(getmapusers("poring_c01") == 0) goto L_NoWin;    dispbottom "Your out of the game, You did not catch the right Poring !";    percentheal -99,-99;    warp "SavePoint",0,0;    end;

ever supposed to trigger?

 

Killing a monster requires 1 player to be within the map, no? So the first thing it does upon death of the mob is check, is there 1 person in the room, to which it will say yes, 1 or more. So it'll never become true and as such will never invoke the L_NoWin.

 

 

How to solution-ize this? Now I know it's not triggered. The problem here is that the event doesn't stop even if no one is already inside the map.

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.