Jump to content
  • 0

Random Respawnhelp


kaiGAMING

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   2
  • Joined:  05/11/12
  • Last Seen:  

hi guys, can you help me how to set to random respawn of the monster? this is the script

-	script	PPE_inital	-1,{
OnInit:
set $@PoringEventChecker, 0;
set $@PoringEventPrizeChecker, 0;
set $PPEDefendingChampion$,"secret";
end;
}

poring_w02,129,101,4	script	Pirate Punch Event	2005,{

if (getgmlevel() >= 30) goto LMS_Admin;
mes "[ Pirate Punch Event ]";
mes "Hello, I'm the Pirate Punch Event Manager. My record says that the defending champion on this event was "+$PPEDefendingChampion$+". Anyways, what do you want to do?";
next;
menu "How does this work?",PPE_HowTo,"Join Event Now",PPE_Join,"Claim my reward",PPE_claim,"Nevermind",PPE_nvm;

PPE_HowTo:
mes "[ Pirate Punch Event ]";
mes "This is an event where everyone can join in. All you have to do is to punch the right monsters and to avoid the wrong ones. Each kind of monster has its corresponding points. You only have 5 minutes to earn points as much as you can. The Highest Scorer at the end of this event shall win 150 PvP Coins";
mes "Reminder: No weapons, cart, and pets is allowed in this event.";
close;

PPE_Host:

if ( $@PoringEventChecker != 0 ){
	mes "[ Pirate Punch Event ]";
	mes "There is Pirate Punch Event on-going. You can host this event if it is still on-going.";
	close;

	LMS_Admin:
	if ( $@PoringEventChecker != 0 ){
		mes "[ Pirate Punch Event ]";
		mes "There is Pirate Punch Event on-going. You can host this event if it is still on-going.";
		close;
	}

	mes "[ Pirate Punch Event ]";
	mes "Hi GM! Would you like to start the Pirate Punch Event?";
	next;
	menu "Yes",PPE_HostYes,"No",-;
	mes "[ Pirate Punch Event ]";
	mes "Okay. Maybe next time.";
	close;
	PPE_HostYes:
	if ( Zeny >= 1 ){
		mes "[ Pirate Punch Event ]";
		mes "Thanks "+strcharinfo(0)+", for hosting this event. It will start shortly.";
		set Zeny, Zeny-1;
		close2;
		set $@PoringEventChecker, 1;
		announce ""+strcharinfo(0)+" Started the Pirate Punch Event!", bc_all;
		killmonsterall "job_cru";
		sleep2 10000;
		initnpctimer;
		end;
	}else{
		mes "[ Pirate Punch Event ]";
		mes "Sorry "+strcharinfo(0)+", you dont have enough zenies to host this event.";
		close;
	}end;
}end;

PPE_Join:
if ( $@PoringEventChecker != 0 ){
	if (gethominfo(2) != "null"){
		mes "[ Pirate Punch Event ]";
		mes "No homunculus is allowed in this event! Sorry "+strcharinfo(0)+" but you can't join this event!";
		close;
	}
	if (getpetinfo(2) != "null"){
		mes "[ Pirate Punch Event ]";
		mes "No pet is allowed in this event! Sorry "+strcharinfo(0)+" but you can't join this event!";
		close;
	}
	if (checkcart()){
		mes "[ Pirate Punch Event ]";
		mes "No cart is allowed! Sorry "+strcharinfo(0)+" but you can't join this event!";
		close;
	}
	if (checkfalcon()){
		mes "[ Pirate Punch Event ]";
		mes "No falcon is allowed! Sorry "+strcharinfo(0)+" but you can't join this event!";
		close;
	}
	if (checkriding()){
		mes "[ Pirate Punch Event ]";
		mes "No riding is allowed! Sorry "+strcharinfo(0)+" but you can't join this event!";
		close;
	}
	mes "[ Pirate Punch Event ]";
	mes "Good luck "+strcharinfo(0)+".";
	close2;
	set @PoringPoints, 0;
	warp "job_cru.gat",23,108;
	end;
}else{
	mes "[ Pirate Punch Event ]";
	mes "Sorry. No Pirate Punch Event is held at the moment.";
	close;
}end;

PPE_claim:
if ($HighestPoringPointsName$ == strcharinfo(0) && $@PoringEventPrizeChecker == 1) {
	mes "[Pirate Punch Event]";
	mes "Congragulations "+strcharinfo(0)+". Here is your reward.";
	getitem 6242,150;
	set $HighestPoringPointsName$,"";
	set $HighestPoringPoints,0;
	set $@PoringEventPrizeChecker, 0;
	close;
} else {
	mes "[ Pirate Punch Event ]";
	mes "Sorry "+strcharinfo(0)+". You're not the winner so you can't claim anything";
	close;
}end;

PPE_nvm:
mes "[ Pirate Punch Event ]";
mes "Okay. Maybe next time.";
close;

OnPoringKill:
if (getequipweaponlv(4)==0 && getequipweaponlv(3)==0){
	set @PoringPoints,@PoringPoints+1;
	if (@PoringPoints > $HighestPoringPoints) {
		set $HighestPoringPointsName$,strcharinfo(0);
		set $PPEDefendingChampion$,strcharinfo(0);
		set $HighestPoringPoints,@PoringPoints;
	}
	dispbottom "You have "+@PoringPoints+" point(s)";
	end;
}else {
	dispbottom "You have to punch the monster without any weapon.";
	warp "poring_w02",129,99;
	end;
}

OnDropsKill:
if (getequipweaponlv(4)==0 && getequipweaponlv(3)==0){
	set @PoringPoints,@PoringPoints+5;
	if (@PoringPoints > $HighestPoringPoints) {
		set $HighestPoringPointsName$,strcharinfo(0);
		set $PPEDefendingChampion$,strcharinfo(0);
		set $HighestPoringPoints,@PoringPoints;
	}
	dispbottom "You have "+@PoringPoints+" point(s)";
	end;
}else {
	dispbottom "You have to punch the monster without any weapon.";
	warp "poring_w02",129,99;
	end;
}


OnPoporingKill:
if (getequipweaponlv(4)==0 && getequipweaponlv(3)==0){
	if (@PoringPoints < 10) {
		set @PoringPoints, 0;
		dispbottom "You have "+@PoringPoints+" point(s)";
		end;
	}else {
		set @PoringPoints,@PoringPoints-10;
		dispbottom "You have "+@PoringPoints+" point(s)";
		end;
	}end;
}else {
	dispbottom "You have to punch the monster without any weapon.";
	warp "poring_w02",129,99;
	end;
}

OnFabreKill:
if (getequipweaponlv(4)==0 && getequipweaponlv(3)==0){
	set @PoringPoints,@PoringPoints+2;
	if (@PoringPoints > $HighestPoringPoints) {
		set $HighestPoringPointsName$,strcharinfo(0);
		set $PPEDefendingChampion$,strcharinfo(0);
		set $HighestPoringPoints,@PoringPoints;
	}
	dispbottom "You have "+@PoringPoints+" point(s)";
	end;
}else {
	dispbottom "You have to punch the monster without any weapon.";
	warp "poring_w02",129,99;
	end;
}

if ( $@PoringEventChecker == 0 ) {
	set $@PoringEventChecker, 1;
	initnpctimer;
	end;
}

OnTimer10000:
announce "Pirate Punch Event: will start in 1 Minute.",0;
end;
OnTimer55000:
announce "Pirate Punch Event: ~ 5 ~",0;
end;
OnTimer56000:
announce "Pirate Punch Event: ~ 4 ~",0;
end;
OnTimer57000:
announce "Pirate Punch Event: ~ 3 ~",0;
end;
OnTimer58000:
announce "Pirate Punch Event: ~ 2 ~",0;
end;
OnTimer59000:
announce "Pirate Punch Event: ~ 1 ~",0;
end;
OnTimer60000:
announce "Pirate Punch Event: Has started!",0;
monster "job_cru",23,71,"+1 Point",2005,50,"Pirate Punch Event::OnPoringKill";
monster "job_cru",23,71,"+5 Points",2005,10,"Pirate Punch Event::OnDropsKill";
monster "job_cru",23,71,"+2 Points",2005,20,"Pirate Punch Event::OnFabreKill";
monster "job_cru",23,71,"-10 Points",2005,50,"Pirate Punch Event::OnPoporingKill";
end;

OnTimer70000:
mapannounce "job_cru.gat","Pirate Punch Event: 4 minutes left.",0;
monster "job_cru",23,71,"+1 Point",2005,50,"Pirate Punch Event::OnPoringKill";
monster "job_cru",23,71,"+5 Points",2005,5,"Pirate Punch Event::OnDropsKill";
monster "job_cru",23,71,"+2 Points",2005,20,"Pirate Punch Event::OnFabreKill";
monster "job_cru",23,71,"-10 Points",2005,20,"Pirate Punch Event::OnPoporingKill";
end;

OnTimer130000:
mapannounce "job_cru.gat","Pirate Punch Event: 3 minutes left.",0;
monster "job_cru",23,71,"+1 Point",2005,30,"Pirate Punch Event::OnPoringKill";
monster "job_cru",23,71,"+5 Points",2005,5,"Pirate Punch Event::OnDropsKill";
monster "job_cru",23,71,"+2 Points",2005,20,"Pirate Punch Event::OnFabreKill";
monster "job_cru",23,71,"-10 Points",2005,15,"Pirate Punch Event::OnPoporingKill";
mapannounce "job_cru.gat","Pirate Punch Event: Score Leader is "+$HighestPoringPointsName$+".",0;
end;

OnTimer190000:
mapannounce "job_cru.gat","Pirate Punch Event: 2 minutes left.",0;
monster "job_cru",23,71,"+1 Point",2005,30,"Pirate Punch Event::OnPoringKill";
monster "job_cru",23,71,"+5 Points",2005,5,"Pirate Punch Event::OnDropsKill";
monster "job_cru",23,71,"+2 Points",2005,20,"Pirate Punch Event::OnFabreKill";
monster "job_cru",23,9,"-10 Points",2005,5,"Pirate Punch Event::OnPoporingKill";
mapannounce "job_cru.gat","Pirate Punch Event: Score Leader is "+$HighestPoringPointsName$+".",0;
end;

OnTimer250000:
mapannounce "job_cru.gat","Pirate Punch Event: 1 minute left.",0;
monster "job_cru",23,71,"+1 Point",2005,50,"Pirate Punch Event::OnPoringKill";
monster "job_cru",23,71,"+5 Points",2005,5,"Pirate Punch Event::OnDropsKill";
monster "job_cru",23,71,"+2 Points",2005,20,"Pirate Punch Event::OnFabreKill";
monster "job_cru",23,71,"-10 Points",2005,5,"Pirate Punch Event::OnPoporingKill";
end;

OnTimer310000:
stopnpctimer;
announce "Pirate Punch Event has ended and the event Winner is "+$HighestPoringPointsName$+".",0;
killmonsterall "job_cru";
set $@PoringEventChecker, 0;
set $@PoringEventPrizeChecker, 1;
sleep2 5000;
mapannounce "job_cru.gat","Pirate Punch Event: Thank you for joining the event.",16;
sleep2 10000;
mapwarp "job_cru","que_moon",100,22;
end;

}

thank you!

Edited by Brian
use [codebox] for scripts/code longer than 10 lines
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

try this.

monster "job_cru",00,00,"+1 Point",2005,50,"Pirate Punch Event::OnPoringKill";

monster "job_cru",00,00,"+5 Points",2005,10,"Pirate Punch Event::ondropsKill";

monster "job_cru",00,00,"+2 Points",2005,20,"Pirate Punch Event::OnFabreKill";

monster "job_cru",00,00,"-10 Points",2005,50,"Pirate Punch Event::OnPoporingKill";

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   2
  • Joined:  05/11/12
  • Last Seen:  

try this.

monster "job_cru",00,00,"+1 Point",2005,50,"Pirate Punch Event::OnPoringKill";

monster "job_cru",00,00,"+5 Points",2005,10,"Pirate Punch Event::ondropsKill";

monster "job_cru",00,00,"+2 Points",2005,20,"Pirate Punch Event::OnFabreKill";

monster "job_cru",00,00,"-10 Points",2005,50,"Pirate Punch Event::OnPoporingKill";

thanks Cisqua! /no1

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