Jump to content
  • 0

Respawn map after death


Question

Posted

a specific map when a player died they will be automatic to a specific map too and if he relogin He will automatic teleport to his/her savepoint

23 answers to this question

Recommended Posts

Posted
-	script	blah	-1,{
OnPCDieEvent:
	sleep2 1000;
	while(.maps$[.@i++]!="")
		if(.maps$[.@i]==strcharinfo(3)) {
			recovery 0;
			warp .spaw$[.@i],.map_x[.@i],.map_y[.@i];
			sleep2 3000;
			atcommand "@pvpoff";
		}
	end;

OnPCLoginEvent:
	warp "SavePoint",0,0;
	end;

OnInit:
	setmapflag "prontera",mf_nosave;
	setarray .maps$[1], "prontera", "geffen", "izlude", "prt_fild01";
	setarray .spaw$[1], "geffen", "prontera", "izlude", "prt_fild02";
	setarray .map_x[1], 10, 15, 88, 13;
	setarray .map_y[1], 20, 16, 55, 12;
}

Alright last attempt lol. Otherwise you might have to search for the event where pvp is activated.

Posted
OnPCDieEvent:
sleep2 1000;
recovery 0;
warp "mapname",x,y;
end;

OnPCLoginEvent:
warp "SavePoint",0,0;
end;

 

how about if there is 3 to 4 map? how can i do that?

Posted

how about add a no pvp in there respawn map after death? so that they will not kill each other?



 

 Error: npc_parsesrcfile: Unknown syntax in file 'npc/custom/death.txt', line '1'. Stopping...

 

 

Posted
setmapflag "<map name>",mf_nosave;

 

Replace map name with your map. And this would go on the inside of the curlys on a script.

 

also works like but independently:

 

prontera	mapflag	NoSave
Posted

like this?

OnPCDieEvent:
sleep2 1000;
recovery 0;
warp "prontera",x,y;
end;

OnPCLoginEvent:
warp "SavePoint",0,0;
end;

prontera    mapflag    NoSave
 
Posted

how can i add to other map?

 

like map2 with specific respawn map too?

 

the same with map3 and map 4



how about this?

 

how about add a no pvp in there respawn map after death? so that they will not kill each other?
Posted

how can i add to other map?

 

like map2 with specific respawn map too?

 

the same with map3 and map 4

how about this?

 

 

how about add a no pvp in there respawn map after death? so that they will not kill each other?

 

Hmm not really sure what you mean if you want to add more maps that you can't save on just add more mapflags above the last curly.

 

OnInit:
	setmapflag "prontera",mf_nosave;
	setmapflag "map1",mf_nosave;
	setmapflag "map2",mf_nosave;
	setmapflag "map3",mf_nosave;
}
Posted

how about the ondie event? map 1 has a different respawn point and map 2, map 3, map 4 they have there individual respawn point



NOTE:

 

even in any map this script is still on even i other pvp rooms

Posted (edited)

how about the ondie event? map 1 has a different respawn point and map 2, map 3, map 4 they have there individual respawn point

NOTE:

 

even in any map this script is still on even i other pvp rooms

 

Edit--

 

Do you want it exclusive to pvp maps?

Edited by Skorm
Posted
 Myth, on 18 Jul 2013 - 18:43, said:

snapback.png

 

how about the ondie event? map 1 has a different respawn point and map 2, map 3, map 4 they have there individual respawn point

NOTE:

 

even in any map this script is still on even i other pvp rooms

-    script    blah    -1,{

OnPCDieEvent:

    sleep2 1000;

    while(.maps$[.@i++]!="")

        if(.maps$[.@i]==strcharinfo(3)) {

            recovery 0;

            warp .spaw$[.@i],.map_x[.@i],.map_y[.@i];

        }

    end;

OnPCLoginEvent:

    warp "SavePoint",0,0;

    end;

OnInit:

    setmapflag "prontera",mf_nosave;

    setarray .maps$[1], "prontera", "geffen", "izlude", "prt_fild01";

    setarray .spaw$[1], "geffen", "prontera", "izlude", "prt_fild02";

    setarray .map_x[1], 10, 15, 88, 13;

    setarray .map_y[1], 20, 16, 55, 12;

}

 

Do you want it exclusive to pvp maps?

let me test first

the only thing is can i add a pvpoff in a certain map? like where they respawn after death because the map is pvpon i want to add a safe area in map 1, 2, 3, 4

Posted
-	script	blah	-1,{
OnPCDieEvent:
	sleep2 1000;
	while(.maps$[.@i++]!="")
		if(.maps$[.@i]==strcharinfo(3)) {
			recovery 0;
			pvpoff .spaw$[.@i];
			warp .spaw$[.@i],.map_x[.@i],.map_y[.@i];
		}
	end;

OnPCLoginEvent:
	warp "SavePoint",0,0;
	end;

OnInit:
	setmapflag "prontera",mf_nosave;
	setarray .maps$[1], "prontera", "geffen", "izlude", "prt_fild01";
	setarray .spaw$[1], "geffen", "prontera", "izlude", "prt_fild02";
	setarray .map_x[1], 10, 15, 88, 13;
	setarray .map_y[1], 20, 16, 55, 12;
}

Maybe try that if it doesn't work...

 

locate conf/mapflag/pvp.txt and comment the maps you don't want pvp on like:

//pvp_y_1-1	mapflag	pvp
Posted

Would you like using this?

 

//======================================================
By mysterious, modified excluded maps by Xanvaroth
//============================================================
prontera,0,0,0	script	Death Angel	1192,{  // Desired Map Where the NPC located
OnPCDieEvent:
undisguise;
   deletearray .@ExcludedMaps$[ 0 ], getarraysize( .@ExcludedMaps$[ 0 ] );
   setarray .@ExcludedMaps$[ 0 ], "pvpmap", "guild_vs3", "pvp_y-82","cell_game","prtg_cas01","payg_cas05","turbo_room","novice_grd"; // Add all the maps to be excluded here.

   for( set .@Index, 0; .@Index <= getarraysize( .@ExcludedMaps$ ); set .@Index, .@Index + 1 )
      if( strcharinfo( 3 ) == .@ExcludedMaps$[ .@Index ] )
         end;
warp "map",0,0;   // The Map where you will respawn
sleep2 1000;
announce "Hey "+strcharinfo(0)+", It seems you have died! Don't worry, you will be resurected in 3 Seconds!",bc_blue|bc_self;
sleep2 3000;
announce "10",bc_blue|bc_self;
sleep2 1000;
announce "9",bc_blue|bc_self;
sleep2 1000;
announce "8",bc_blue|bc_self;
sleep2 1000;
announce "7",bc_blue|bc_self;
sleep2 1000;
announce "6",bc_blue|bc_self;
sleep2 1000;
announce "5",bc_blue|bc_self;
sleep2 1000;
announce "4",bc_blue|bc_self;
sleep2 1000;
announce "3",bc_blue|bc_self;
sleep2 1000;
announce "2",bc_blue|bc_self;
sleep2 1000;
sleep2 1000;
announce "Respawning..",bc_blue|bc_self;
atcommand "@alive "+strcharinfo(0);
announce "1",bc_blue|bc_self;
sleep2 1000;
atcommand "@load "+strcharinfo(0);
}

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