Jump to content
  • 0

Poring Summoner script


Question

Posted (edited)

Hello, I've got some error for this script :

 

//Made by Light from MoonlightRO
//quiz_01,45,180,5	script	Poring Summoner	99,{
-	script	Poring Summoner	-1,{
OnInit:

  //---- NPC Config -----
  set .ItemID, 7539;
  set .SpecialPorings, 30;
  set .NormalPorings, 150;
  set .Map$, "morocc";
//setarray .Map$[0], "morocc";
//setarray .Map$[0], "lighthalzen","louyang","comodo","xmas","aldebaran","izlude","payon","geffen","morocc","prontera";
  //---------------------
  end;
  
OnWhisperGlobal:
mes "[Poring Summoner]";
if(getgmlevel() < 99) {
	if(.Event) mes "There is no Poring Summon Event on now.";
	else {
		mes "There is a Poring Summon Event on now!";
		mes "Location: " + .Map$;
		mes "Special Porings: " + .SpecialPorings[1];
		mes "Normal Porings: " + .NormalPorings[0];
	}
	close;
}
mes "Please customize the Poring Summon Event:";
Main:
next;
mes "[Poring Summoner]";
	switch(select("Item [" + getitemname(.ItemID) + "]:Location [" + .Map$ + "]:Special Porings [" + .SpecialPorings + "]:Normal Porings [" + .NormalPorings + "]:Start Event:End Event")) {
		case 1:
			mes "Which item would you like Special Porings to drop?";
			mes "Please input the item ID:";
			input .ItemID;
			goto Main;
		case 2:
			mes "Which map would you like me to host this event?";
			input .Map$;
			goto Main;
		case 3:
			mes "How many Special Porings would you like me to summon?";
			input .SpecialPorings;
			goto Main;
		case 4:
			mes "How many Normal Porings would you like me to summon?";
			input .NormalPorings;
			goto Main;
		case 5:
			mes "Starting the event now...";

OnMinute17:
			set .Event,1;
			monster .Map$,0,0,"Poring",1725,.SpecialPorings,"Poring Summoner::OnSpecialKill";
			monster .Map$,0,0,"Poring",1725,.NormalPorings,"Poring Summoner::OnNormalKill";
			set .SpecialPorings[1],.SpecialPorings;
			set .NormalPorings[1],.NormalPorings;
			announce "The Poring Event has begun!",bc_all;
			announce "Location: " + .Map$,bc_all;
			announce "Special Porings: " + .SpecialPorings,bc_all;
			announce "Normal Porings: " + .NormalPorings,bc_all;
			close;
		case 6:
			mes "Ending the event now...";
			goto EndEvent;
	}
OnSpecialKill:
	set .SpecialPorings[1],.SpecialPorings[1]-1;
	announce strcharinfo(0) + " got a " + getitemname(.ItemID) + "!",bc_map;
	getitem .ItemID,5;
	goto PoringCount;
OnNormalKill:
	set .NormalPorings[1],.NormalPorings[1]-1;
	goto PoringCount;
PoringCount:
	announce "Special Porings: " + .SpecialPorings[1] + " || Normal Porings: " + .NormalPorings[1],bc_map;
	if(!.SpecialPorings[1]) goto EndEvent;
	end;
EndEvent:
	if(.Event) announce "The Poring Summon Event is now over!",bc_all;
	killmonster .Map$,"All";
	set .Event,0;
	set .SpecialPorings[1],0;
	set .NormalPorings[1],0;
	close;
}

morocc	mapflag	nowarp
morocc	mapflag	noteleport
morocc	mapflag	nomemo
morocc	mapflag	nosave	SavePoint
morocc	mapflag	nobranch
morocc	mapflag	noskill

This is the error at map-server :

[22/Jul 11:17][Error]: script_rid2sd: fatal error ! player not attached!
[22/Jul 11:17][Debug]: Function: close (no parameters)
[22/Jul 11:17][Debug]: Source (NPC): Poring Summoner (invisible/not on a map)

Edited by uDe

9 answers to this question

Recommended Posts

Posted

if(!.SpecialPorings[1]) goto Onendevent;

I need to change it like that right?

yes

 

Onendevent:
	if(.Event) announce "The Poring Summon Event is now over!",bc_all;
	killmonster .Map$,"All";
	set .Event,0;
	set .SpecialPorings[1],0;
	set .NormalPorings[1],0;
	close;

change close to end here

 

 

		case 6:
			mes "Ending the event now...";
			donpcevent strnpcinfo(0) +"::Onendevent";
	}

add a close after the donpcevent

Posted
OnMinute17:
			set .Event,1;
	...
			announce "Special Porings: " + .SpecialPorings,bc_all;
			announce "Normal Porings: " + .NormalPorings,bc_all;
			close;

when there is no player attached, close is depreciated

 

 

I suggest

		case 5:
			mes "Starting the event now...";
			donpcevent strnpcinfo(0) +"::Onstartevent";
			close;
		case 6:
			mes "Ending the event now...";
			donpcevent strnpcinfo(0) +"::Onendevent";
	}
OnMinute17:
	if ( .Event )
		donpcevent strnpcinfo(0) +"::Onendevent";// stop the event if already on
	donpcevent strnpcinfo(0) +"::Onstartevent";
	end;
Onstartevent:
	set .Event,1;
	monster .Map$,0,0,"Poring",1725,.SpecialPorings,"Poring Summoner::OnSpecialKill";
	monster .Map$,0,0,"Poring",1725,.NormalPorings,"Poring Summoner::OnNormalKill";
	set .SpecialPorings[1],.SpecialPorings;
	set .NormalPorings[1],.NormalPorings;
	announce "The Poring Event has begun!",bc_all;
	announce "Location: " + .Map$,bc_all;
	announce "Special Porings: " + .SpecialPorings,bc_all;
	announce "Normal Porings: " + .NormalPorings,bc_all;
	end;
-	EndEvent:
-	Onendvent:
		if(.Event) announce "The Poring Summon Event is now over!",bc_all;
		killmonster .Map$,"All";
		set .Event,0;
		set .SpecialPorings[1],0;
		set .NormalPorings[1],0;
-		close;
+		end;
Posted (edited)

Thanks for the help Capuche

 

Edited script :

 

//////////////
//OLD SCRIPT//
//////////////
//Made by Light from MoonlightRO
//quiz_01,45,180,5	script	Poring Summoner	99,{
-	script	Poring Summoner	-1,{
OnInit:

  //---- NPC Config -----
  set .ItemID, 7539;
  set .SpecialPorings, 30;
  set .NormalPorings, 150;
  set .Map$, "morocc";
//setarray .Map$[0], "morocc";
//setarray .Map$[0], "lighthalzen","louyang","comodo","xmas","aldebaran","izlude","payon","geffen","morocc","prontera";
  //---------------------
  end;
  
OnWhisperGlobal:
mes "[Poring Summoner]";
if(getgmlevel() < 99) {
	if(.Event) mes "There is no Poring Summon Event on now.";
	else {
		mes "There is a Poring Summon Event on now!";
		mes "Location: " + .Map$;
		mes "Special Porings: " + .SpecialPorings[1];
		mes "Normal Porings: " + .NormalPorings[0];
	}
	close;
}
mes "Please customize the Poring Summon Event:";
Main:
next;
mes "[Poring Summoner]";
	switch(select("Item [" + getitemname(.ItemID) + "]:Location [" + .Map$ + "]:Special Porings [" + .SpecialPorings + "]:Normal Porings [" + .NormalPorings + "]:Start Event:End Event")) {
		case 1:
			mes "Which item would you like Special Porings to drop?";
			mes "Please input the item ID:";
			input .ItemID;
			goto Main;
		case 2:
			mes "Which map would you like me to host this event?";
			input .Map$;
			goto Main;
		case 3:
			mes "How many Special Porings would you like me to summon?";
			input .SpecialPorings;
			goto Main;
		case 4:
			mes "How many Normal Porings would you like me to summon?";
			input .NormalPorings;
			goto Main;
		case 5:
			mes "Starting the event now...";
			donpcevent strnpcinfo(0) +"::Onstartevent";
			close;
		case 6:
			mes "Ending the event now...";
			donpcevent strnpcinfo(0) +"::Onendevent";
	}

OnMinute17:
	if ( .Event )
		donpcevent strnpcinfo(0) +"::Onendevent";// stop the event if already on
	donpcevent strnpcinfo(0) +"::Onstartevent";
	end;
Onstartevent:
	set .Event,1;
	monster .Map$,0,0,"Poring",1725,.SpecialPorings,"Poring Summoner::OnSpecialKill";
	monster .Map$,0,0,"Poring",1725,.NormalPorings,"Poring Summoner::OnNormalKill";
	set .SpecialPorings[1],.SpecialPorings;
	set .NormalPorings[1],.NormalPorings;
	announce "The Poring Event has begun!",bc_all;
	announce "Location: " + .Map$,bc_all;
	announce "Special Porings: " + .SpecialPorings,bc_all;
	announce "Normal Porings: " + .NormalPorings,bc_all;
	end;
	
OnSpecialKill:
	set .SpecialPorings[1],.SpecialPorings[1]-1;
	announce strcharinfo(0) + " got a " + getitemname(.ItemID) + "!",bc_map;
	getitem .ItemID,5;
	goto PoringCount;
OnNormalKill:
	set .NormalPorings[1],.NormalPorings[1]-1;
	goto PoringCount;
PoringCount:
	announce "Special Porings: " + .SpecialPorings[1] + " || Normal Porings: " + .NormalPorings[1],bc_map;
	if(!.SpecialPorings[1]) goto Onendevent;
	end;
Onendevent:
	if(.Event) announce "The Poring Summon Event is now over!",bc_all;
	killmonster .Map$,"All";
	set .Event,0;
	set .SpecialPorings[1],0;
	set .NormalPorings[1],0;
	close;
}

morocc	mapflag	nowarp
morocc	mapflag	noteleport
morocc	mapflag	nomemo
morocc	mapflag	nosave	SavePoint
morocc	mapflag	nobranch
morocc	mapflag	noskill

 

Error when I manually use End Event (by whisper) :

 

[22/Jul 12:16][Error]: script_rid2sd: fatal error ! player not attached!
[22/Jul 12:16][Debug]: Function: close (no parameters)
[22/Jul 12:16][Debug]: Source (NPC): Poring Summoner (invisible/not on a map)

I'm a bit confuse with your edit about this :

 

-	EndEvent:
-	Onendvent:
		if(.Event) announce "The Poring Summon Event is now over!",bc_all;
		killmonster .Map$,"All";
		set .Event,0;
		set .SpecialPorings[1],0;
		set .NormalPorings[1],0;
-		close;
+		end;

Is there any typo about "Onendvent" ?

 

if(!.SpecialPorings[1]) goto Onendevent;

I need to change it like that right?

Edited by uDe
Posted

It's working. For those who need automatic Poring Summoner script here it is.

attachicon.gifWorking_Poring_Summoner.txt

 

Thank you for the post... I actually already have a script a lot like this... Even though it says mvpspawner it works for all monsters. You can even add multiple drop lists and save them with rates :)

 

I think you might find it useful.

http://code.google.com/p/ea-addicts/downloads/detail?name=mvpspawner.txt&can=2&q=

Posted

It's working. For those who need automatic Poring Summoner script here it is.

attachicon.gifWorking_Poring_Summoner.txt

 

Thank you for the post... I actually already have a script a lot like this... Even though it says mvpspawner it works for all monsters. You can even add multiple drop lists and save them with rates :)

 

I think you might find it useful.

http://code.google.com/p/ea-addicts/downloads/detail?name=mvpspawner.txt&can=2&q=

 

Woah~ This is nice. Thank you very much!! /no1

Posted

It's working. For those who need automatic Poring Summoner script here it is.

attachicon.gifWorking_Poring_Summoner.txt

how to stat this event ?

 

 

It's working. For those who need automatic Poring Summoner script here it is.

attachicon.gifWorking_Poring_Summoner.txt

 

I've already wrote "Automatic Poring Summoner Script". So, it's AUTOMATIC.

 

But IF YOU WANT TO KNOW HOW TO CHANGE THE EVENT TIME, please find this (line 62) :

 

OnMinute17:

and change it.

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