Jump to content
  • 0

Respawn map after death


Myth

Question


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

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

Link to comment
Share on other sites

23 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


OnPCDieEvent:

sleep2 1000;

recovery 0;

warp "mapname",x,y;

end;

OnPCLoginEvent:

warp "SavePoint",0,0;

end;

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

he relogin He will automatic teleport to his/her savepoint

or Mapflag#nosave instead of warp on onpcloginevent

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


if( strcharinfo(3) == "map1" || strcharinfo(3) == "map2" || strcharinfo(3) == "map3" || strcharinfo(3) == "map4" ){

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

not working

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

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

 

 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

like this?

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

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

prontera    mapflag    NoSave
 
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  


Edit---

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

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?
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

 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

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  


Edit--

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

pvpoff not working

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

-	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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

i already edit the pvp mapflag and the pvp is still off

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Wait... do you want it on or off?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

yup. and the respawn map the pvp is off

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  225
  • Reputation:   5
  • Joined:  05/30/12
  • Last Seen:  

hhaha ok lets try

Link to comment
Share on other sites


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

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);
}
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...