Myth Posted July 15, 2013 Posted July 15, 2013 how can i duplicate a NPC? because i have 4 different map with same script example: Map 1 Script 1 Map 2 same script with map 1 but there difference is there map and same as Map 3 and 4 because Map 2 didnt work same as Map 3 and 4 Map log debug: this npc: debug: other npc in 'npc/custom/map1 Quote
Myth Posted July 15, 2013 Author Posted July 15, 2013 (edited) prontera,36,95,5 script ... 111,{input @broadcast$;atcommand ""+@broadcast$+"";} //DO NOT TOUCH //BLUE TEAM prontera,159,157,5 script Deathmatch Grounds#1 734,{ end; OnInit: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control" ) +1, "custom_bg#control::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control" ); set getvariableofnpc( .bluenpcname$, "custom_bg#control" ), strnpcinfo(0); end; } guild_vs2 mapflag battleground 2 guild_vs2 mapflag nosave SavePoint guild_vs2 mapflag nowarp guild_vs2 mapflag nowarpto guild_vs2 mapflag noteleport guild_vs2 mapflag nomemo guild_vs2 mapflag nopenalty guild_vs2 mapflag nobranch guild_vs2 mapflag noicewall the only difference of map 2,3,4 are the maps i change guild_vs2 with other maps i want 4 maps like guild_vs01, guild_vs02, guild_vs03, guild_vs04 Edited August 3, 2013 by Myth Quote
Mootie Posted July 15, 2013 Posted July 15, 2013 prontera,159,157,5 script Deathmatch Grounds#2 734,{ prontera,159,157,5 script Deathmatch Grounds#3 734,{ Do that on the other script you had Quote
Myth Posted July 15, 2013 Author Posted July 15, 2013 still have this error (10:22:45pm) Debug: this npc: (10:22:45pm) Debug: other npc in 'npc/custom/map1.txt' : (10:22:45pm) Debug: this npc: (10:22:45pm) Debug: other npc in 'npc/custom/map1.txt' : (10:22:46pm) Debug: this npc: (10:22:46pm) Debug: other npc in 'npc/custom/map1.txt' : someone says its the core something prontera,36,95,5 script ... 111,{input @broadcast$;atcommand ""+@broadcast$+"";} //DO NOT TOUCH this one still not working Quote
Capuche Posted July 18, 2013 Posted July 18, 2013 guild_vs1 //Made by AnnieRuru - script custom_bg#control1 -1,{ OnInit: set .minplayer2start, 2; // minimum player to start setarray .rewarditem, 12248, 2, // reward to the winning team 12248, 1; // reward to the losing team set .startingscore, 20; // score at start set .eventlasting, 120; // event last 120 seconds or the system abort itself end; onstart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; set .red, waitingroom2bg( "guild_vs1", 8,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", .rednpcname$ ); copyarray .team1aid[.@i], $@arenamembers[.@i], $@arenamembersnum; set .blue, waitingroom2bg( "guild_vs1", 91,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", .bluenpcname$ ); copyarray .team2aid[.@i], $@arenamembers[.@i], $@arenamembersnum; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs1", 8,50; bg_warp .blue, "guild_vs1", 91,50; set .score[1], .startingscore; set .score[2], .startingscore; bg_updatescore "guild_vs1", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) announce "Deathmatch Ground : Draw !", 0; else if ( .score[1] > .score[2] ) { announce "Deathmatch Ground : Red Team Wins !", 0; callsub L_reward, 1, 0; callsub L_reward, 2, 2; } else if ( .score[1] < .score[2] ) { announce "Deathmatch Ground : Blue Team Wins !", 0; callsub L_reward, 2, 0; callsub L_reward, 1, 2; } OnTimer50000: announce "Deathmatch Ground is now open for another match @ prontera 156 170 !",0; bg_warp .red, "prontera", 156,191; bg_warp .blue, "prontera", 156,191; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnInit"; donpcevent .bluenpcname$ +"::OnInit"; end; L_reward: set .@size, getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) if ( isloggedin( getd(".team"+ getarg(0) +"aid["+ .@i +"]" ) ) ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs1", .score[1], .score[2]; if ( .score[ getarg(0) ] == 0 ) awake strnpcinfo(0); sleep2 1500; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; } //RED TEAM prontera,152,157,5 script Deatchmatch Grounds#11 733,{ end; OnInit: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control1" ) +1, "custom_bg#control1::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control1" ); set getvariableofnpc( .rednpcname$, "custom_bg#control1" ), strnpcinfo(0); end; } //BLUE TEAM prontera,159,157,5 script Deathmatch Grounds#12 734,{ end; OnInit: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control1" ) +1, "custom_bg#control1::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control1" ); set getvariableofnpc( .bluenpcname$, "custom_bg#control1" ), strnpcinfo(0); end; } guild_vs1 mapflag battleground 2 guild_vs1 mapflag nosave SavePoint guild_vs1 mapflag nowarp guild_vs1 mapflag nowarpto guild_vs1 mapflag noteleport guild_vs1 mapflag nomemo guild_vs1 mapflag nopenalty guild_vs1 mapflag nobranch guild_vs1 mapflag noicewall guild_vs2 //Made by AnnieRuru - script custom_bg#control2 -1,{ OnInit: set .minplayer2start, 2; // minimum player to start setarray .rewarditem, 12248, 2, // reward to the winning team 12248, 1; // reward to the losing team set .startingscore, 20; // score at start set .eventlasting, 120; // event last 120 seconds or the system abort itself end; onstart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; set .red, waitingroom2bg( "guild_vs2", 8,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", .rednpcname$ ); copyarray .team1aid[.@i], $@arenamembers[.@i], $@arenamembersnum; set .blue, waitingroom2bg( "guild_vs2", 91,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", .bluenpcname$ ); copyarray .team2aid[.@i], $@arenamembers[.@i], $@arenamembersnum; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs2", 8,50; bg_warp .blue, "guild_vs2", 91,50; set .score[1], .startingscore; set .score[2], .startingscore; bg_updatescore "guild_vs2", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) announce "Deathmatch Ground : Draw !", 0; else if ( .score[1] > .score[2] ) { announce "Deathmatch Ground : Red Team Wins !", 0; callsub L_reward, 1, 0; callsub L_reward, 2, 2; } else if ( .score[1] < .score[2] ) { announce "Deathmatch Ground : Blue Team Wins !", 0; callsub L_reward, 2, 0; callsub L_reward, 1, 2; } OnTimer50000: announce "Deathmatch Ground is now open for another match @ prontera 156 170 !",0; bg_warp .red, "prontera", 156,191; bg_warp .blue, "prontera", 156,191; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnInit"; donpcevent .bluenpcname$ +"::OnInit"; end; L_reward: set .@size, getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) if ( isloggedin( getd(".team"+ getarg(0) +"aid["+ .@i +"]" ) ) ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs2", .score[1], .score[2]; if ( .score[ getarg(0) ] == 0 ) awake strnpcinfo(0); sleep2 1500; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; } //RED TEAM prontera,162,157,5 script Deatchmatch Grounds 2#21 733,{ end; OnInit: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control2" ) +1, "custom_bg#control2::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control2" ); set getvariableofnpc( .rednpcname$, "custom_bg#control2" ), strnpcinfo(0); end; } //BLUE TEAM prontera,169,157,5 script Deathmatch Grounds 2#22 734,{ end; OnInit: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control2" ) +1, "custom_bg#control2::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control2" ); set getvariableofnpc( .bluenpcname$, "custom_bg#control2" ), strnpcinfo(0); end; } guild_vs2 mapflag battleground 2 guild_vs2 mapflag nosave SavePoint guild_vs2 mapflag nowarp guild_vs2 mapflag nowarpto guild_vs2 mapflag noteleport guild_vs2 mapflag nomemo guild_vs2 mapflag nopenalty guild_vs2 mapflag nobranch guild_vs2 mapflag noicewall guild_vs3 //Made by AnnieRuru - script custom_bg#control3 -1,{ OnInit: set .minplayer2start, 2; // minimum player to start setarray .rewarditem, 12248, 2, // reward to the winning team 12248, 1; // reward to the losing team set .startingscore, 20; // score at start set .eventlasting, 120; // event last 120 seconds or the system abort itself end; onstart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; set .red, waitingroom2bg( "guild_vs3", 8,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", .rednpcname$ ); copyarray .team1aid[.@i], $@arenamembers[.@i], $@arenamembersnum; set .blue, waitingroom2bg( "guild_vs3", 91,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", .bluenpcname$ ); copyarray .team2aid[.@i], $@arenamembers[.@i], $@arenamembersnum; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs3", 8,50; bg_warp .blue, "guild_vs3", 91,50; set .score[1], .startingscore; set .score[2], .startingscore; bg_updatescore "guild_vs3", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) announce "Deathmatch Ground : Draw !", 0; else if ( .score[1] > .score[2] ) { announce "Deathmatch Ground : Red Team Wins !", 0; callsub L_reward, 1, 0; callsub L_reward, 2, 2; } else if ( .score[1] < .score[2] ) { announce "Deathmatch Ground : Blue Team Wins !", 0; callsub L_reward, 2, 0; callsub L_reward, 1, 2; } OnTimer50000: announce "Deathmatch Ground is now open for another match @ prontera 156 170 !",0; bg_warp .red, "prontera", 156,191; bg_warp .blue, "prontera", 156,191; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnInit"; donpcevent .bluenpcname$ +"::OnInit"; end; L_reward: set .@size, getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) if ( isloggedin( getd(".team"+ getarg(0) +"aid["+ .@i +"]" ) ) ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( .score[ getarg(0) ] == 0 ) awake strnpcinfo(0); sleep2 1500; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; } //RED TEAM prontera,152,167,5 script Deatchmatch Grounds 3#31 733,{ end; OnInit: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control3" ) +1, "custom_bg#control3::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control3" ); set getvariableofnpc( .rednpcname$, "custom_bg#control3" ), strnpcinfo(0); end; } //BLUE TEAM prontera,159,167,5 script Deathmatch Grounds 3#32 734,{ end; OnInit: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control3" ) +1, "custom_bg#control3::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control3" ); set getvariableofnpc( .bluenpcname$, "custom_bg#control3" ), strnpcinfo(0); end; } guild_vs3 mapflag battleground 2 guild_vs3 mapflag nosave SavePoint guild_vs3 mapflag nowarp guild_vs3 mapflag nowarpto guild_vs3 mapflag noteleport guild_vs3 mapflag nomemo guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag noicewall guild_vs4 //Made by AnnieRuru - script custom_bg#control4 -1,{ OnInit: set .minplayer2start, 2; // minimum player to start setarray .rewarditem, 12248, 2, // reward to the winning team 12248, 1; // reward to the losing team set .startingscore, 20; // score at start set .eventlasting, 120; // event last 120 seconds or the system abort itself end; onstart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; set .red, waitingroom2bg( "guild_vs4", 8,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", .rednpcname$ ); copyarray .team1aid[.@i], $@arenamembers[.@i], $@arenamembersnum; set .blue, waitingroom2bg( "guild_vs4", 91,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", .bluenpcname$ ); copyarray .team2aid[.@i], $@arenamembers[.@i], $@arenamembersnum; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs4", 8,50; bg_warp .blue, "guild_vs4", 91,50; set .score[1], .startingscore; set .score[2], .startingscore; bg_updatescore "guild_vs4", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) announce "Deathmatch Ground : Draw !", 0; else if ( .score[1] > .score[2] ) { announce "Deathmatch Ground : Red Team Wins !", 0; callsub L_reward, 1, 0; callsub L_reward, 2, 2; } else if ( .score[1] < .score[2] ) { announce "Deathmatch Ground : Blue Team Wins !", 0; callsub L_reward, 2, 0; callsub L_reward, 1, 2; } OnTimer50000: announce "Deathmatch Ground is now open for another match @ prontera 156 170 !",0; bg_warp .red, "prontera", 156,191; bg_warp .blue, "prontera", 156,191; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnInit"; donpcevent .bluenpcname$ +"::OnInit"; end; L_reward: set .@size, getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) if ( isloggedin( getd(".team"+ getarg(0) +"aid["+ .@i +"]" ) ) ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs4", .score[1], .score[2]; if ( .score[ getarg(0) ] == 0 ) awake strnpcinfo(0); sleep2 1500; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; } //RED TEAM prontera,162,167,5 script Deathmatch Grounds 4#41 733,{ end; OnInit: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control4" ) +1, "custom_bg#control4::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control4" ); set getvariableofnpc( .rednpcname$, "custom_bg#control4" ), strnpcinfo(0); end; } //BLUE TEAM prontera,169,167,5 script Deathmatch Grounds 4#42 734,{ end; OnInit: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control4" ) +1, "custom_bg#control4::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control4" ); set getvariableofnpc( .bluenpcname$, "custom_bg#control4" ), strnpcinfo(0); end; } guild_vs4 mapflag battleground 2 guild_vs4 mapflag nosave SavePoint guild_vs4 mapflag nowarp guild_vs4 mapflag nowarpto guild_vs4 mapflag noteleport guild_vs4 mapflag nomemo guild_vs4 mapflag nopenalty guild_vs4 mapflag nobranch guild_vs4 mapflag noicewall Quote
Myth Posted July 19, 2013 Author Posted July 19, 2013 so i will make text document named map1, 2, 3, 4 in npc/custom/ right? Quote
Capuche Posted July 19, 2013 Posted July 19, 2013 Yes or you can put all these npc in one file, it's the same Quote
Myth Posted July 20, 2013 Author Posted July 20, 2013 map 2, 3 and 4 has a something wrong i set the max player to 7 but the blue team is 1/1 Quote
Capuche Posted July 20, 2013 Posted July 20, 2013 You change this to 7 and the blue team is still 1/1 ? set .minplayer2start, 2; // minimum player to start post your diff Quote
Myth Posted July 21, 2013 Author Posted July 21, 2013 yup, so players can't join because it says the room is full set .minplayer2start, 7; // minimum player to start Quote
Capuche Posted July 21, 2013 Posted July 21, 2013 Add a sleep in every Deathmatch Grounds npc after OnInit Sample prontera,159,157,5 script Deathmatch Grounds#12 734,{ end; OnInit: sleep 1; //RED TEAM prontera,152,157,5 script Deatchmatch Grounds#11 733,{ end; OnInit: sleep 1; etc.. Quote
Myth Posted July 22, 2013 Author Posted July 22, 2013 map 2 has a error. when the team a and team b is already got in the pub they are not automatic recall into the map. it only disappear the pub. Quote
Question
Myth
how can i duplicate a NPC? because i have 4 different map with same script
example:
Map 1 Script 1
Map 2 same script with map 1 but there difference is there map
and same as Map 3 and 4
because Map 2 didnt work same as Map 3 and 4
Map log
debug: this npc:
debug: other npc in 'npc/custom/map1
14 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.