Jump to content
  • 0

Error while all the zombie appear...


Checkmate

Question


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

-	script	zombacolypse	-1,{
	OnInit:
	set .weapon,1203; //ItemID of the weapon to make them never miss
	setarray .prize[0],501,1,1000,3; // [0] = Item ID | [1] = Amount | [2] = Zeny | [3] = Setting ( 0 = Disabled | 1 = Item Prize | 2 = Zeny Prize | 3 = Item+Zeny Prize )
	set .auto_zombie,60; //Seconds before someone is auto-zombiefied.
	set .survival_time,5; //Minutes need to survive to win the event.
	setarray .mapxy$[0],"5@tower","81","84"; //Yes, use the " " marks when specifying X & Y. Because I'm too lazy to make new variables/array for x&y coorinates.
	/* [0] is the Zombie King virus (will only appear once).
	 * [0] = Type-1C.3 Living-dead-blood virus ' in latin ').
	 * [1] = Type-X2 Dead Blood Plague virus ' in latin ').
	 * [2] = Type-7MA0 Star Tart Plague virus ' in latin ').
	 * [3] = Type-9R.1 Jelly Brain Vernacular Vein virus ' in latin '
	 */
	setarray .virus$[0],"Type-1C.3 Victus Mortuus Sanguis","Type-X2 Mortuus Sanguinis Pestis","Type-7MA0 Lumen Acerbus Pestis","Type-9R.1 Gelata Cerebrum Vulgari Vena";
	set .zombie_kill,5; //How many players must a zombie kill before being revived as a human. *Note - will not affect Zombie King*
	set .zombie_king,10; //How many players must a zombie king kill before being revived as a human.
	setarray .zombie_skin[0],1015,1036,1197,1298,1864,1865,1875; //1015 = Zombie | 1036 = Ghoul | 1197 = Zombie Prioner | 1298 = Zombie Master | 1864 = Ragged Zombie | 1865 = Zombie Slaughter | 1875 = Zombie King
	end;
	OnClock0000: //Midnight, so fitting 
	OnClock2100: 
	//Add more times as needed.
	setcell $@map$,98,100,66,100,cell_walkable,0;
	setcell $@map$,98,100,98,68,cell_walkable,0;
	while(!.@warp)
	{query_sql"SELECT `name` FROM `char` WHERE `online`='1' LIMIT 128",.@name$;
	 for(set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1)
		{warpchar .mapxy$[0],atoi(.mapxy$[1]),atoi(.mapxy$[2]),getcharid(0,.@name$[.@i]);
		 setd ".name"+.loop+"$["+.@i+"]",.@name$[.@i];}
	 set .loop,.loop+1;
	 if( getarraysize(.@name$) < 128){set .@warp,1;}}
	set .playercount, getarraysize( getd(".name"+(.loop - 1)+"$") );
	if(.loop>1){set .playercount, ((.loop - 2) * 128) + getarraysize( getd(".name"+(.loop - 1)+"$") );}
	mapannounce .mapxy$[0],"The Zombacolypse event will begin in '"+.auto_zombie+"' seconds. Get ready to fight for your life!!",bc_map,"0x0000FF";
	sleep (.auto_zombie * 1000);
	set .@a,rand( (.loop - 1) );
	attachrid( getcharid(3, getd(".name"+.@a+"$["+( rand( getarraysize( getd(".name"+.@a+"$") ) ) )+"]") ) );
	disguise .zombie_skin[6]; set zombie,2; set .playercount,.playercount-1;
	mapannounce .maxy$[0],strcharinfo(0)+" has become infected with the deadly "+ strtoupper(.virus$[0]) +" virus!! Don't get infected help is on the way!!",bc_map,"0x0000FF";
	detachrid;
	pvpon .mapxy$[0];
	set .zombacolypse,1;
	sleep (.survival_time * 60000);
	pvpoff .mapxy$[0];
	while(.loop>=0)
	{for(set .@i,0; .@i<getarraysize( getd(".name"+.loop+"$") ); set .@i,.@i+1)
	 {if(attachrid( getcharid(3, getd(".name"+.loop+"$["+.@i+"]")) ) ){
	  undisguise; percentheal 100,100; 
	  if(!zombie && .prize[3])
		{if(.prize[3]==1){getitem .prize[0],.prize[1];}
		 if(.prize[3]==2){set zeny,zeny+.prize[2];}
		 if(.prize[3]==3){getitem .prize[0],.prize[1]; set zeny,zeny+.prize[2];}}
	 set zombie,0;
	 if(countitem(.weapon)){delitem .weapon,1;}
	 warp "SavePoint",0,0;}}
	 set .loop,.loop-1;}
	set .loop,0;
	setcell $@map$,98,100,66,100,cell_walkable,1;
	setcell $@map$,98,100,98,68,cell_walkable,1;
	end;
	
	OnPCKillEvent:
	if(!.zombacolypse){end;}
	if(zombie){end;}
	attachrid(killerrid);
	if(!zombie){end;}
	set @zkill,@zkill+1;
	if(@zkill>=.zombie_kill && zombie == 1 || @zkill>=.zombie_king && zombie == 2){set @zkill,0; set zombie,0; undisguise; delitem .weapon,1; set .playercount,.playercount+1;}
	attachrid(killedrid);
	atcommand "@alive";
	warp .mapxy$[0],atoi(.mapxy$[1]),atoi(.mapxy$[2]);
	set zombie,1;
	set .playercount,.playercount-1;
	if(.playercount<=1){awake "zombacolypse"; end;}
	disguise .zombie_skin[rand(6)];
	monster .mapxy$[0],atoi(.mapxy$[1]),atoi(.mapxy$[2]),strcharinfo(0),.zombie_skin[rand(6)],1;
	mapannounce .mapxy$[0],strcharinfo(0)+" has become infected with the deadly "+ strtoupper(.virus$[ ( rand(1,getarraysize(.virus$)) ) ]) +" virus!! Don't get infected, help is on the way!!",bc_map,"0x0000FF";
	getitem .weapon,1; equip .weapon;
	
	OnPCLogoutEvent:
	set zombie,0;
	if(countitem(.weapon)){delitem .weapon,1;}
}
5@tower	mapflag	nomemo
5@tower	mapflag	noteleport
5@tower	mapflag	nosave
5@tower	mapflag	nowarp
5@tower	mapflag	nocommand
5@tower	mapflag	noicewall
5@tower	mapflag	nobranch
5@tower	mapflag	nightenabled
5@tower	mapflag	nomobloot

Actually this script was made by GM Ocean.. But no one seem comment on this script..

So im decide to test it... And found error... The error was look like this...

All player already been warp into 5@tower then after 1 minutes it start.. then all player dc... At time zombie appear... all DC... 

Why was that?..?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Add screenshot of error in mapserver.



I`ll check the script if i can re-write it. :)



This will be a very fun event.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

I posted in the Original Topic, that I think you may not have the Zombie King enabled on your server, since thats the VERY first zombie to spawn. I tested it and I didn't get D/C'd. However, the script also doesn't seem to work.

 

@LilTroll - Feel free to remake it as you see fit, because I just don't have the resources atm to rewrite and test such a script. Resources being people lol. If it were something easy to test then sure no problem, but multi-player scripts such as this, require alot of time to test, and actual people to find bugs in a so called stress test, also in order to balance it to fit needs, alot of people must be involved as 1 person can't think for a hundred.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

I posted in the Original Topic, that I think you may not have the Zombie King enabled on your server, since thats the VERY first zombie to spawn. I tested it and I didn't get D/C'd

King zombie.??

I think.. i have it cuz im trying to disguise like him and its ok...

hurmmm...

 

 

However, the script also doesn't seem to work.

 

Err... Why was that?..?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Well, for one I wrote the script 1 year ago, when I was JUST getting back into scripting, so I was very rusty after a 2-3 year break. However, the issue seems to be with the OnPCKillEvent, somewhere down the line, I completely wrote that wrong. Aside from a few variable changes, that seems to be the main problem. In my preliminary tests earlier today, thats what I've come to suspect i the problem.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

Well, for one I wrote the script 1 year ago, when I was JUST getting back into scripting, so I was very rusty after a 2-3 year break. However, the issue seems to be with the OnPCKillEvent, somewhere down the line, I completely wrote that wrong. Aside from a few variable changes, that seems to be the main problem. In my preliminary tests earlier today, thats what I've come to suspect i the problem

 

That was a long explanation..  ^ ^

I just knowing 1 thing and it was your skill are rusty,but its ok sir.. you can still make it perfect.. But mybe need a little practice..

Hope you can make a new one script to share to all rAthena Community..  ^ ^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  

Any map server error?

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