-
Posts
112 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Yukaiii
-
-
Quote
//===================================================
//= __ __ __ =
//= /\ \/\ \ /\ \ __ =
//= \ \ `\\ \ ___ ___\ \ \____/\_\ __ =
//= \ \ , ` \ / __`\ / __`\ \ '__`\/\ \ /'__`\ =
//= \ \ \`\ \/\ \_\ \/\ \_\ \ \ \_\ \ \ \/\ __/ =
//= \ \_\ \_\ \____/\ \____/\ \_,__/\ \_\ \____\ =
//= \/_/\/_/\/___/ \/___/ \/___/ \/_/\/____/ =
//===================================================
//= Instance PvP =
//= Created by Noobie =
//= Created for FlurryRO =
//= Language: English =
//= Map: 1@pvp =
//= for eAthena =
//= Revision 14006 or above =
//===================================================
//= Credits =
//= Masao for his Support on the script =
//= Davven for creating the used Map =
//===================================================
//= Version 1.0 =
//===================================================
//= Changelog =
//===================================================
//= 0.9 =
//= First Version =
//= 1.0 =
//= Release~ =
//===================================================
// = Settings - Modify them as you feel you should =
// ==================================================
- script PD_Settings -1,{
OnInit:
set $PD_Timelimit,600; // Seconds for entering
set $PD_Minparty,2; // # of players a party must have
//set $PD_ItemID,969; // ItemID //Not working yet
end;
}brasilis,200,258,5 script Duel PVP 406,{
set .@name$,"^0000FFPvP Warper^000000";
getpartymember(getcharid(1));
if(!getcharid(1) || $@partymembercount < $PD_Minparty){
mes .@name$;
mes "Make or join the party with exactly "+$PD_Minparty+" member or try again.";
set PD_makeparty,1;
close;
}
if(PD_makeparty){
mes .@name$;
mes "Confirmed. You are in a party. What would you like to do?";
set PD_makeparty,0;
next;
}
mes .@name$;
mes "If you have generated the PvP Duel already, you can enter it.";
next;
if(getpartyleader(getcharid(1),2) == getcharid(0)){
select("Generate PvP Duel Instance:Enter the PvP Duel Instance:Return to Brasilis:Cancel");
} else {
select(":Enter the PvP Duel Instance:Return to Brasilis:Cancel");
}
switch(@menu){
case 1:
if(instance_id(1)){
if(has_instance("1@pvp") == ""){
mes .@name$;
mes "Your group is already registered at an other instance.";
close;
}
mes .@name$;
mes "Your group is already registered.";
mes "Select ^0000FFEnter the Duel^000000 in the main menu to enter.";
close;
}
mes .@name$;
mes "^0000FFPvP Duel Instance^000000 - Try to reserve";
mes "After making a reservation, you have to talk to NPC behind and";
mes "select the menu 'Enter the Duel' to enter the PvP Duel";
close2;
set .@instance_id,instance_create("PvP_Duel",getcharid(1));
if(.@instance_id < 0){
mes .@name$;
mes "Failed to create PvP Duel Intsance.";
mes "^FF0000PvP Duel Instances reached its limit.^000000";
mes "Please report this error to an administrator or GM.";
close;
}
instance_attachmap("1@pvp",.@instance_id);
instance_set_timeout $PD_Timelimit,600,.@instance_id;
instance_init .@instance_id;
instance_attach instance_id(1);
end;
case 2:
if(!instance_id(1) || has_instance("1@pvp") == ""){
mes .@name$;
mes "The PvP Duel Instance does not exist.";
mes "Please confirm with your party leader wether the memorial dungeon";
mes "has been destructed or if the time given for entering has been expired.";
close;
}
instance_attach instance_id(1);
set PD_Lastinstid,instance_id(1);
set PD_map,1;
set @id,getcharid(1);
donpcevent instance_npcname("PD_Manager")+"::OnInstanceInit";
warpparty "1@pvp",51,46,@id;
//warp has_instance("1@pvp"),0,0;
close;
case 3:
warp "brasilis",195,259;
close;
case 4:
close;
}
}1@pvp,0,0,0 script PD_Manager -1,{
end;OnInstanceInit:
if(strnpcinfo(3) == "PD_Manager")
end;
sleep 3000;
instance_announce .@instance_id,"Get Ready...",0x00FF00;
sleep 3000;
instance_announce .@instance_id,"4",0x00FF00;
sleep 3000;
instance_announce .@instance_id,"3",0x00FF00;
sleep 3000;
instance_announce .@instance_id,"2",0x00FF00;
sleep 3000;
instance_announce .@instance_id,"1",0x00FF00;
sleep 3000;
instance_announce .@instance_id,"GO!",0x00FF00;
atcommand "@pvpon";
end;OnPCKillEvent:
if(PD_map==1){
//getitem $PD_ItemID,1; //Not working yet
pvpoff "1@pvp";
sleep2 1000;
instance_attach instance_id(1);
instance_warpall "brasilis",195,259;
instance_destroy instance_id(1);
set PD_map,0;
end;
}
end;
OnPCLogoutEvent:
if(PD_map==1){
pvpoff "1@pvp";
instance_attach instance_id(1);
instance_warpall "brasilis",195,259;
instance_destroy instance_id(1);
set PD_map,0;
end;
}
end;OnPCDieEvent:
if(PD_map==1){
pvpoff "1@pvp";
sleep2 1000;
instance_attach instance_id(1);
instance_warpall "brasilis",195,259;
instance_destroy instance_id(1);
set PD_map,0;
end;
}
end;
OnPCLoginEvent:
set PD_map,0;
end;
}1@pvp mapflag pvp_noparty
1@pvp mapflag pvp_noguild
1@pvp mapflag partylock
1@pvp mapflag nowarp
1@pvp mapflag nowarptoIn case anyone wants to make it work on ratena..
Just don't take credit from the creator. -
On 6/27/2023 at 7:37 PM, Poring King said:
As you can see in your windows CMD . It's already say the problem . On your server file NPC Script the original race script is still ON you need to put "//" to Disable it. Because in the error it says duplicate name
I did what you told me friend, I deactivated the npcs, it turns out that there's a way to start the game even before starting the race..
-
20 hours ago, Poring King said:
It says you have error on line 15 and it is unmatch ")" .
I already see the problem .if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){
You need to fix your statement .. I don't want to spoon feed you with answer . I want you to learn how to fix this simple thing .. The error already says what the problem . You only need to do is understand the flow of the script
I've tried in every way and the same error continues my friend.
I also don't have a good knowledge with scripting. -
Could someone please help me to fix this script?
I used this script on my old server..
it is giving these errors!
could someone tell me how to fix it?Quotearena_room,105,93,5 script 3 vs 3 Party 822,{
if (BaseLevel < 250 || Class==Job_Novice || Class==Job_Baby || Class==Job_Novice_High) {
mes "[Arena Guide]";
mes "Desculpe, Você precisa está acima do level 250 ou não ser Apredinz.";
close;
}
if (getpartyleader(getcharid(1),2) != getcharid(0)) {
mes "Apenas o líder da Party pode Registrar!";
close;
}
if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){
mes "Desculpe, Você não atende o requesitos, Verifique se sua Party têm 3 pessoas e tente novamente.";
close;
}
getpartymember getcharid(1),0;
getpartymember getcharid(1),1;
getpartymember getcharid(1),2;
set .@count, $@partymembercount;
if(.@count < 3)
end; //Not enough members
copyarray .@charid[0],$@partymembercid[0],$@partymembercount;
//if($@partymembercount != ) end;
for(set .@i,0; .@i < .@count; set .@i, .@i + 1){
if( isloggedin($@partymemberaid[.@i],$@partymembercid[.@i]))
set .@online, .@online + 1;
}
if(.@count != .@online){
mes" Algum membro do grupo não está online!";
close;
} -
-
1 hour ago, Poring King said:
Please check out my script collections i have working race event and i customize it for High rate 255/120
when you release the starting line in the event, if you walk back to the starting point of the event again.
-
1 hour ago, Poring King said:
Please check out my script collections i have working race event and i customize it for High rate 255/120
-
Can someone make available an old script called "crazy race"
In the past, when I played with BR emulators, it was easy to find in the forums. I've never seen it here on the forum.Quotevideo taken from YouTube
-
1 hour ago, java said:
i have full source and full script , here the sample :
if someone help me to renew source code, i will release it here,
It would be nice if someone who has the knowledge updated the scripts.. and the src part.
I have the xileRO emulator and all the scripts it had.. a pity I lost all these scripts in the last update of eathena. -
Speak my dears!
Today I'll be making available a very requested script. It's about the "CTF" That CTF from the xyler PK that I've seen several asking HAHA.
There's only one but the script doesn't work. It could be because XileRO is eathena and eamod.
If someone manages to make it work it will be a great achievement for all of us.
I have all the other scripts.Quote/globals
struct arena_fifo are_queue[ARENA_QUEUES][ARENA_QUEUE_MAX_LENGTH]; //todo: init memcpy
int are_queue_first_empty[ARENA_QUEUES]={0,0,0};
struct arena_fifo *are_queue_first[ARENA_QUEUES]={NULL,NULL,NULL};
struct arena_fifo *are_queue_last[ARENA_QUEUES]={NULL,NULL,NULL};
int are_queue_length[ARENA_QUEUES]={0,0,0};//functions
int fifo_new(struct map_session_data *sd, int que){
struct arena_fifo *newfifo=NULL;
int i;
if( que>=ARENA_QUEUES || are_queue_length[que] >= ARENA_QUEUE_MAX_LENGTH ) return -1;for( i=are_queue_first_empty[que] ; i<ARENA_QUEUE_MAX_LENGTH ; i++ ){ //todo: use newfifo instead of i
newfifo=&(are_queue[que][i]);
if(newfifo->sd == NULL){
if(are_queue_first[que]==NULL) are_queue_first[que] = newfifo;
if(are_queue_last[que]!=NULL) are_queue_last[que]->next = newfifo;
newfifo->prev = are_queue_last[que]; newfifo->next = NULL; are_queue_last[que] = newfifo;
newfifo->sd = sd;
are_queue_length[que]++;
are_queue_first_empty[que] = i+1;
return 0;
}
}
return -1;
}
int fifo_del(struct arena_fifo* fifo, int que){
if(fifo==NULL || que>=ARENA_QUEUES) return -1;if(fifo==are_queue_last[que]) are_queue_last[que] = fifo->prev;
if(fifo==are_queue_first[que]) are_queue_first[que] = fifo->next;
if(fifo->next!=NULL) fifo->next->prev = fifo->prev;
if(fifo->prev!=NULL) fifo->prev->next = fifo->next;
if(fifo->sd==NULL){
fifo->prev = NULL; fifo->next = NULL;
printf("[Warning Arenas]: Attempt to remove someone who had already been removed?"); return 0;
}
fifo->sd = NULL; fifo->prev = NULL; fifo->next = NULL;
are_queue_length[que]--;
if(are_queue_length[que]<0){ are_queue_length[que]=0; printf("[Warning Arenas]: Length of queue reached negative values."); }
if(fifo-&(are_queue[que][0]) < are_queue_first_empty[que]) are_queue_first_empty[que] = fifo-&(are_queue[que][0]);
return 0;
}Quote//TODO:
// -arena_room winner announcement
// -all chars loggoff until no new ones can join -> draw
// -creating a party name that already exists (but is offline)
// -kick afk chars// Mapflags
//==============================================================pvp_n_1-1.gat mapflag noteleport
pvp_n_1-1.gat mapflag nomemo
pvp_n_1-1.gat mapflag nowarp
pvp_n_1-1.gat mapflag nowarpto
pvp_n_1-1.gat mapflag noicewall
pvp_n_1-1.gat mapflag noreturn
pvp_n_1-1.gat mapflag nosave SavePoint
pvp_n_1-1.gat mapflag nopenalty
pvp_n_1-1.gat mapflag noexp
pvp_n_1-1.gat mapflag nobranch
pvp_n_1-1.gat mapflag pvp_noguild
pvp_n_1-1.gat mapflag restricted 4
pvp_n_1-1.gat mapflag partylock
pvp_n_1-1.gat mapflag loadeventpvp_n_2-1.gat mapflag noteleport
pvp_n_2-1.gat mapflag nomemo
pvp_n_2-1.gat mapflag nowarp
pvp_n_2-1.gat mapflag nowarpto
pvp_n_2-1.gat mapflag noicewall
pvp_n_2-1.gat mapflag noreturn
pvp_n_2-1.gat mapflag nosave SavePoint
pvp_n_2-1.gat mapflag nopenalty
pvp_n_2-1.gat mapflag noexp
pvp_n_2-1.gat mapflag nobranch
pvp_n_2-1.gat mapflag pvp_noguild
pvp_n_2-1.gat mapflag restricted 4
pvp_n_2-1.gat mapflag partylock
pvp_n_2-1.gat mapflag loadeventpvp_n_3-1.gat mapflag noteleport
pvp_n_3-1.gat mapflag nomemo
pvp_n_3-1.gat mapflag nowarp
pvp_n_3-1.gat mapflag nowarpto
pvp_n_3-1.gat mapflag noicewall
pvp_n_3-1.gat mapflag noreturn
pvp_n_3-1.gat mapflag nosave SavePoint
pvp_n_3-1.gat mapflag nopenalty
pvp_n_3-1.gat mapflag noexp
pvp_n_3-1.gat mapflag nobranch
pvp_n_3-1.gat mapflag pvp_noguild
pvp_n_3-1.gat mapflag restricted 4
pvp_n_3-1.gat mapflag partylock
pvp_n_3-1.gat mapflag loadevent
// Register NPC
//==============================================================
arena_room,106,94,4 script CaptureTheFlag#reg 823,{getmapxy(@ra_map$, .@x, .@y, 0);
set CTF_lost,CTF_matches-CTF_won; //honor
set @CTF_kill_RB,0; //honor
set @CTF_RB,0; //honor
mes "[Arena Guide]";
mes "Welcome to Capture the flag!!!";
mes "CTF EXP: ^0000ff"+CTF_EXP+"^000000"; //honor
mes "Matches Played: ^777777"+CTF_matches+"^000000"; //honor
mes "Matches Lost: ^ff0000"+CTF_lost+"^000000"; //honor
mes "Matches Won: ^00ff00"+CTF_won+"^000000"; //honor
next;
mes "[Arena Guide]";
mes "Would you like to compete?";
next;
menu "Lets do it!",L_Yes, "Uhh. No thanks", L_No;
close;L_Yes:
if (BaseLevel < 250 || Class==Job_Novice || Class==Job_Baby || Class==Job_Novice_High){
goto L_Level;
}else{
if(@ra_map$ != "ra_in01") {//Honor, house system
if($@antibot_active==0) {//Honor, activate with @quest
if(callfunc("botcheck")==0){//Jason
close;
}
}
}
set @CTF_flag, 0;
set @CTF_team, 0;
set @CTF_arena, 0;
set .@pos, arena_queue_add(3);mes "[Arena Guide]";
if(.@pos==0){
mes "The queue is full. Please wait a while and try again.";
}else if(.@pos==-1){
mes "You already are on a waiting line...";
}else if(.@pos==10){
getmapxy(@CTF_city$, @CTF_x, @CTF_y, 0);
if($@CTF1_running==0){
set $@CTF1_running, 1;
donpcevent "CTF_Engine::OnRestart1";
}else if($@CTF2_running==0){
set $@CTF2_running, 1;
donpcevent "CTF_Engine::OnRestart2";
}else if($@CTF3_running==0){
set $@CTF3_running, 1;
donpcevent "CTF_Engine::OnRestart3";
}else{
set @CTF_active,1;
mes "Congratulations, you are now on the waiting line for Capture the flag!";
mes "Your position is: ^FF0000"+(.@pos-1)+"^000000";
next;
mes "[Arena Guide]";
mes "^0000FFWhen it's your turn, you will be taken to the Arena even if you moved away from this map!";
mes "^FF0000But if you logout, you will be put out of the queue.";
}
}else{
getmapxy(@CTF_city$, @CTF_x, @CTF_y, 0);
set @CTF_active,1;
mes "Congratulations, you are now on the waiting line for Capture the flag!";
mes "Your position is: ^FF0000"+(.@pos-1)+"^000000";
next;
mes "[Arena Guide]";
mes "^0000FFWhen it's your turn, you will be taken to the Arena even if you moved away from this map!";
mes "^FF0000But if you logout, you will be put out of the queue.";
}}
close;
L_No:
mes "[Arena Guide]";
mes "Okay, please come again!";
close;L_Level:
mes "[Arena Guide]";
mes "Sorry, you need to be at least level 250. No Novices allowed either.";
close;//honor
OnPCKillEvent:
getmapxy(@ctfmap$, .@x, .@y, 0);
if(@ctfmap$ == "pvp_n_1-1" || @ctfmap$ == "pvp_n_2-1" || @ctfmap$ == "pvp_n_3-1") {set @CTF_kill_RB,1; //Rbs prize count when killing a player
}
end;}
izlude,132,108,4 duplicate(CaptureTheFlag#reg) CaptureTheFlag#reg2 823
payon, 164,230,4 duplicate(CaptureTheFlag#reg) CaptureTheFlag#reg3 823
ra_in01,313,295,7 duplicate(CaptureTheFlag#reg) CaptureTheFlag#reg4 823//NPC + Flag drop
//==============================================================pvp_n_1-1.gat,0,0,0 script CTF_Engine -1,{
end;
OnInit:
ctf_init(0);
ctf_init(1);
ctf_init(2);set $@CTF_msgA$[0], "Light Team dropped a flag!";
set $@CTF_msgA$[1], "Light Team's flag is back to its base!";
set $@CTF_msgA$[2], "Light Team's flag has been taken!";
set $@CTF_msgA$[3], "Light Team scored a point!";
set $@CTF_msgA$[4], "Light Team won!";set $@CTF_msgB$[0], "Dark Team dropped a flag!";
set $@CTF_msgB$[1], "Dark Team's flag is back to its base!";
set $@CTF_msgB$[2], "Dark Team's flag has been taken!";
set $@CTF_msgB$[3], "Dark Team scored a point!";
set $@CTF_msgB$[4], "Dark Team won!";donpcevent "CTF_Engine::OnRestart1";
donpcevent "CTF_Engine::OnRestart2";
donpcevent "CTF_Engine::OnRestart3";
end;OnRestart1:
set $@CTF_matchover[0], 1;
mapwarp "pvp_n_1-1","prontera",156,173;donpcevent "Light Flag#1_1::OnInit"; donpcevent "Dark Flag#1_1::OnInit";
donpcevent "Light Flag#1_2::OnInit"; donpcevent "Dark Flag#1_2::OnInit";
donpcevent "Light Flag#1_3::OnInit"; donpcevent "Dark Flag#1_3::OnInit";set $CTF_teamA_score[0], 0;
set $CTF_teamB_score[0], 0;party_break($CTF_teamA_id[0]);
party_break($CTF_teamB_id[0]);set $CTF_teamA_id[0], 0; set $CTF1_teamA_leader, 0;
set $CTF_teamB_id[0], 0; set $CTF1_teamB_leader, 0;set $@CTF_times_30s[0], 0;
set $@CTF_matchover[0], 0;
set $@CTF_suddendeath[0], 0;ctf_init(0);
if(warp_arena_queue(3,0,"pvp_n_1-1",0,0,10) > 0){
set $@CTF1_running, 1;
initnpctimer "CTF1_TIMER";
}else{
set $@CTF1_running, 0;
}
end;OnRestart2:
set $@CTF_matchover[1], 1;
mapwarp "pvp_n_2-1","prontera",156,173;donpcevent "Light Flag#2_1::OnInit"; donpcevent "Dark Flag#2_1::OnInit";
donpcevent "Light Flag#2_2::OnInit"; donpcevent "Dark Flag#2_2::OnInit";
donpcevent "Light Flag#2_3::OnInit"; donpcevent "Dark Flag#2_3::OnInit";set $CTF_teamA_score[1], 0;
set $CTF_teamB_score[1], 0;party_break($CTF_teamA_id[1]);
party_break($CTF_teamB_id[1]);set $CTF_teamA_id[1], 0; set $CTF2_teamA_leader, 0;
set $CTF_teamB_id[1], 0; set $CTF2_teamB_leader, 0;set $@CTF_times_30s[1], 0;
set $@CTF_matchover[1], 0;
set $@CTF_suddendeath[1], 0;ctf_init(1);
if(warp_arena_queue(3,1,"pvp_n_2-1",0,0,10) > 0){
set $@CTF2_running, 1;
initnpctimer "CTF2_TIMER";
}else{
set $@CTF2_running, 0;
}
end;OnRestart3:
set $@CTF_matchover[2], 1;
mapwarp "pvp_n_3-1","prontera",156,173;donpcevent "Light Flag#3_1::OnInit"; donpcevent "Dark Flag#3_1::OnInit";
donpcevent "Light Flag#3_2::OnInit"; donpcevent "Dark Flag#3_2::OnInit";
donpcevent "Light Flag#3_3::OnInit"; donpcevent "Dark Flag#3_3::OnInit";set $CTF_teamA_score[2], 0;
set $CTF_teamB_score[2], 0;party_break($CTF_teamA_id[2]);
party_break($CTF_teamB_id[2]);set $CTF_teamA_id[2], 0; set $CTF3_teamA_leader, 0;
set $CTF_teamB_id[2], 0; set $CTF3_teamB_leader, 0;set $@CTF_times_30s[2], 0;
set $@CTF_matchover[2], 0;
set $@CTF_suddendeath[2], 0;ctf_init(2);
if(warp_arena_queue(3,2,"pvp_n_3-1",0,0,10) > 0){
set $@CTF3_running, 1;
initnpctimer "CTF3_TIMER";
}else{
set $@CTF3_running, 0;
}
end;OnFlagCarryEfx:
if(@CTF_flag){
if(@CTF_team==1)
specialeffect2 502;
else
specialeffect2 500;
addtimer 3000, "CTF_Engine::OnFlagCarryEfx";
if(sc_get(SC_QUAGMIRE)==0) sc_start SC_QUAGMIRE,600000,0;
}
end;OnPCDieEvent:
if(@CTF_team){
getmapxy(.@mapname$, .@mapx, .@mapy, 0);if(@CTF_team==1){
warp .@mapname$,95,180;
if(@CTF_flag) mapannounce .@mapname$, $@CTF_msgA$[0], 0;
}else if(@CTF_team==2){
warp .@mapname$,94,15;
if(@CTF_flag) mapannounce .@mapname$, $@CTF_msgB$[0], 0;
}switch(@CTF_flag){
case 1: set .@flagname$, "Light Flag#"; set .@flagnum$, "_1";
ctf_unlockflag(@CTF_arena,1,1);
break;
case 2: set .@flagname$, "Light Flag#"; set .@flagnum$, "_2";
ctf_unlockflag(@CTF_arena,1,2);
break;
case 3: set .@flagname$, "Light Flag#"; set .@flagnum$, "_3";
ctf_unlockflag(@CTF_arena,1,3);
break;
case 4: set .@flagname$, "Dark Flag#"; set .@flagnum$, "_1";
ctf_unlockflag(@CTF_arena,2,1);
break;
case 5: set .@flagname$, "Dark Flag#"; set .@flagnum$, "_2";
ctf_unlockflag(@CTF_arena,2,2);
break;
case 6: set .@flagname$, "Dark Flag#"; set .@flagnum$, "_3";
ctf_unlockflag(@CTF_arena,2,3);
break;
default:
}if(@CTF_flag){
set .@flagdisplayname$, .@flagname$+(@CTF_arena+1)+.@flagnum$;
movenpc .@flagdisplayname$, .@mapx, .@mapy;
set @CTF_flag, 0;
}sleep2 1000;
alive;
sc_end SC_QUAGMIRE;
}
end;OnPCLogoutEvent:
if(@CTF_active==1)
arena_queue_del(3);OnPCLeaveCTF: //do NOT change this label! (used in the source when player warps away)
if(@CTF_team!=0 && $@CTF_matchover[@CTF_arena]==0){
getmapxy(.@mapname$, .@mapx, .@mapy, 0);//if player already left the map?
if(.@mapname$!="pvp_n_1-1" && .@mapname$!="pvp_n_2-1" && .@mapname$!="pvp_n_3-1"){
set .@mapx, 106;
set .@mapy, 96;
}switch(@CTF_arena){
case 0: set .@mapname$, "pvp_n_1-1"; break;
case 1: set .@mapname$, "pvp_n_2-1"; break;
case 2: set .@mapname$, "pvp_n_3-1"; break;
}if(@CTF_flag && @CTF_team==1){
mapannounce .@mapname$, $@CTF_msgA$[0], 0;
}else if(@CTF_flag && @CTF_team==2){
mapannounce .@mapname$, $@CTF_msgB$[0], 0;
}switch(@CTF_flag){
case 1: set .@flagname$, "Light Flag#"; set .@flagnum$, "_1";
ctf_unlockflag(@CTF_arena,1,1);
break;
case 2: set .@flagname$, "Light Flag#"; set .@flagnum$, "_2";
ctf_unlockflag(@CTF_arena,1,2);
break;
case 3: set .@flagname$, "Light Flag#"; set .@flagnum$, "_3";
ctf_unlockflag(@CTF_arena,1,3);
break;
case 4: set .@flagname$, "Dark Flag#"; set .@flagnum$, "_1";
ctf_unlockflag(@CTF_arena,2,1);
break;
case 5: set .@flagname$, "Dark Flag#"; set .@flagnum$, "_2";
ctf_unlockflag(@CTF_arena,2,2);
break;
case 6: set .@flagname$, "Dark Flag#"; set .@flagnum$, "_3";
ctf_unlockflag(@CTF_arena,2,3);
break;
default:
}if(@CTF_flag){
set .@flagdisplayname$, .@flagname$+(@CTF_arena+1)+.@flagnum$;
movenpc .@flagdisplayname$, .@mapx, .@mapy;
set @CTF_flag, 0;
}//get a new member to replace this one
if(@CTF_team==1)
warp_arena_queue(3,@CTF_arena,.@mapname$,94,176,-getcharid(1));
else
warp_arena_queue(3,@CTF_arena,.@mapname$,94,22,-getcharid(1));//safely leave party (changing leadership if necessary)
party_leave(1);}
//clean variables (in case they are warping away)
set @CTF_team, 0;
set @CTF_flag, 0;
set @CTF_arena, 0;sc_end SC_ALL;
end;
OnDetectAfk:
getmapxy(.@mapname$, .@mapx, .@mapy, 0);
if(@CTF_away<3){
set @CTF_away, @CTF_away+1;
if(.@mapname$==@CTF_mapname$ && .@mapx==@CTF_mapx && .@mapy==@CTF_mapy) set @CTF_afk, @CTF_afk+1;
if(@CTF_away<3) addtimer 10000, "CTF_Engine::OnDetectAfk";
}//if player didnt move during the 3 checks
if(@CTF_away>=3){
if(@CTF_afk>=3){
warp "prontera",156,173;
dispbottom "Capture the Flag: you were kicked for inactivity. Another player will take your spot.";
}
set @CTF_mapname$, 0; set @CTF_mapx, 0; set @CTF_mapy, 0;
set @CTF_away, 0; set @CTF_afk, 0;
}
end;OnPCLoadMapEvent:
if(@CTF_team==1 && getcharid(1)==0){
switch(@CTF_arena){
case 0: if($CTF_teamA_id[0]==0) set $CTF_teamA_id[0], party_join("leader",$CTF1_teamA_leader);
else party_join("party",$CTF_teamA_id[0]);
set CTF_matches,CTF_matches+1;
break;
case 1: if($CTF_teamA_id[1]==0) set $CTF_teamA_id[1], party_join("leader",$CTF2_teamA_leader);
else party_join("party",$CTF_teamA_id[1]);
set CTF_matches,CTF_matches+1;
break;
case 2: if($CTF_teamA_id[2]==0) set $CTF_teamA_id[2], party_join("leader",$CTF3_teamA_leader);
else party_join("party",$CTF_teamA_id[2]);
set CTF_matches,CTF_matches+1;
break;
}
}else if(@CTF_team==2 && getcharid(1)==0){
switch(@CTF_arena){
case 0: if($CTF_teamB_id[0]==0) set $CTF_teamB_id[0], party_join("leader",$CTF1_teamB_leader);
else party_join("party",$CTF_teamB_id[0]);
set CTF_matches,CTF_matches+1;
break;
case 1: if($CTF_teamB_id[1]==0) set $CTF_teamB_id[1], party_join("leader",$CTF2_teamB_leader);
else party_join("party",$CTF_teamB_id[1]);
set CTF_matches,CTF_matches+1;
break;
case 2: if($CTF_teamB_id[2]==0) set $CTF_teamB_id[2], party_join("leader",$CTF3_teamB_leader);
else party_join("party",$CTF_teamB_id[2]);
set CTF_matches,CTF_matches+1;
break;
}
}if(@CTF_team){
getmapxy(@CTF_mapname$, @CTF_mapx, @CTF_mapy, 0);
set @CTF_away, 0; set @CTF_afk, 0;
addtimer 10000, "CTF_Engine::OnDetectAfk";
}
end;}
//==============================================================
//
// Arena Timers
//
//==============================================================
//Arena 1
//==============================================================pvp_n_1-1,0,0,4 script CTF1_TIMER -1,{
end;OnTimer30000:
set $@CTF_times_30s[0], $@CTF_times_30s[0] + 1;//Play for 10 minutes
if($@CTF_times_30s[0] < 20){
mapannounce "pvp_n_1-1", "Current score is: Light Team - " +$CTF_teamA_score[0]+
" ~ Dark Team - " +$CTF_teamB_score[0]+ " !", 0;
initnpctimer;
}else{
if($@CTF_times_30s[0] < 24 && $CTF_teamA_score[0]==$CTF_teamB_score[0]){
// sudden death: 2 more minutes
mapannounce "pvp_n_1-1", "This match has been going for 10 minutes. Next team to get a flag wins!", 0;
set $@CTF_suddendeath[0], 1;
initnpctimer;
}else{
// declare winner
mapannounce "pvp_n_1-1", "This match has been going for 10 minutes. We will now declare a winner...", 0;if($CTF_teamA_score[0] > $CTF_teamB_score[0]){
// team A wins
donpcevent "CTF1_Check_TeamA::OnTeamWin";
}else if($CTF_teamA_score[0] < $CTF_teamB_score[0]){
// team B wins
donpcevent "CTF1_Check_TeamB::OnTeamWin";
}else{
// tie
mapannounce "pvp_n_1-1", "This match is a tie! No team is therefore qualified for a prize, sorry :(", 0;
set $@CTF_matchover[0], 1;
sleep 5000;
mapwarp "pvp_n_1-1","prontera",156,173;
sleep 10000;
donpcevent "CTF_Engine::OnRestart1";
}
}
}
end;
}
//Arena 2
//==============================================================pvp_n_2-1,0,0,4 script CTF2_TIMER -1,{
end;OnTimer30000:
set $@CTF_times_30s[1], $@CTF_times_30s[1] + 1;//Play for 10 minutes
if($@CTF_times_30s[1] < 20){
mapannounce "pvp_n_2-1", "Current score is: Light Team - " +$CTF_teamA_score[1]+
" ~ Dark Team - " +$CTF_teamB_score[1]+ " !", 0;
initnpctimer;
}else{
if($@CTF_times_30s[1] < 24 && $CTF_teamA_score[1]==$CTF_teamB_score[1]){
// sudden death: 2 more minutes
mapannounce "pvp_n_2-1", "This match has been going for 10 minutes. Next team to get a flag wins!", 0;
set $@CTF_suddendeath[1], 1;
initnpctimer;
}else{
// declare winner
mapannounce "pvp_n_2-1", "This match has been going for 10 minutes. We will now declare a winner...", 0;if($CTF_teamA_score[1] > $CTF_teamB_score[1]){
// team A wins
donpcevent "CTF2_Check_TeamA::OnTeamWin";
}else if($CTF_teamA_score[1] < $CTF_teamB_score[1]){
// team B wins
donpcevent "CTF2_Check_TeamB::OnTeamWin";
}else{
// tie
mapannounce "pvp_n_2-1", "This match is a tie! No team is therefore qualified for a prize, sorry :(", 0;
set $@CTF_matchover[1], 1;
sleep 5000;
mapwarp "pvp_n_2-1","prontera",156,173;
sleep 10000;
donpcevent "CTF_Engine::OnRestart2";
}
}
}
end;
}
//Arena 3
//==============================================================pvp_n_3-1,0,0,4 script CTF3_TIMER -1,{
end;OnTimer30000:
set $@CTF_times_30s[2], $@CTF_times_30s[2] + 1;//Play for 10 minutes
if($@CTF_times_30s[2] < 20){
mapannounce "pvp_n_3-1", "Current score is: Light Team - " +$CTF_teamA_score[2]+
" ~ Dark Team - " +$CTF_teamB_score[2]+ " !", 0;
initnpctimer;
}else{
if($@CTF_times_30s[2] < 24 && $CTF_teamA_score[2]==$CTF_teamB_score[2]){
// sudden death: 2 more minutes
mapannounce "pvp_n_3-1", "This match has been going for 10 minutes. Next team to get a flag wins!", 0;
set $@CTF_suddendeath[2], 1;
initnpctimer;
}else{
// declare winner
mapannounce "pvp_n_3-1", "This match has been going for 10 minutes. We will now declare a winner...", 0;if($CTF_teamA_score[2] > $CTF_teamB_score[2]){
// team A wins
donpcevent "CTF3_Check_TeamA::OnTeamWin";
}else if($CTF_teamA_score[2] < $CTF_teamB_score[2]){
// team B wins
donpcevent "CTF3_Check_TeamB::OnTeamWin";
}else{
// tie
mapannounce "pvp_n_3-1", "This match is a tie! No team is therefore qualified for a prize, sorry :(", 0;
set $@CTF_matchover[2], 1;
sleep 5000;
mapwarp "pvp_n_3-1","prontera",156,173;
sleep 10000;
donpcevent "CTF_Engine::OnRestart3";
}
}
}
end;
}//==============================================================
//
// Team A's Base (Light)
//
//==============================================================
//Flag 1
//==============================================================pvp_n_1-1,87,182,4 script Light Flag#1_1 722,1,1,{
OnTouch:
getmapxy(.@player_mapname$,.@player_mapx,.@player_mapy,0);
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(0));
set .@distx, .@player_mapx - .@npc_mapx;
set .@disty, .@player_mapy - .@npc_mapy;
if(.@distx > 2 || .@distx < -2 || .@disty > 2 || .@disty < -2) end;if(@CTF_flag!=0){
npctalk "You're already carrying 1 flag!";
end;
}if(@CTF_team==1 && .@npc_mapx==87 && .@npc_mapy==182) end;
if(ctf_lockflag(@CTF_arena,1,1)==0){
npctalk "Someone got it first!";
end;
}if(@CTF_team==1){
//same team gets it -> flag goes to base
//move it somewhere else first temporarily
movenpc strnpcinfo(0),0,0;
sleep2 5000;
//bring flag home and unlock it
movenpc strnpcinfo(0),87,182;
ctf_unlockflag(@CTF_arena,1,1);
initnpctimer;
mapannounce .@npc_mapname$, $@CTF_msgA$[1], 0;
}else{
stopnpctimer;
//enemy team gets it -> player carries flag
set @CTF_flag, 1;
movenpc strnpcinfo(0),0,0;
addtimer 1000, "CTF_Engine::OnFlagCarryEfx";
mapannounce .@npc_mapname$, $@CTF_msgA$[2], 0;
sc_end SC_ALL;
sc_start SC_QUAGMIRE,600000,0;
}//npctalk "You got me!";
end;OnTimer5000:
//specialeffect 71;
initnpctimer;
end;OnInit:
movenpc strnpcinfo(0),87,182;
initnpctimer;
end;
}
//Flag 2
//==============================================================pvp_n_1-1,95,182,4 script Light Flag#1_2 722,1,1,{
OnTouch:
getmapxy(.@player_mapname$,.@player_mapx,.@player_mapy,0);
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(0));
set .@distx, .@player_mapx - .@npc_mapx;
set .@disty, .@player_mapy - .@npc_mapy;
if(.@distx > 2 || .@distx < -2 || .@disty > 2 || .@disty < -2) end;if(@CTF_flag!=0){
npctalk "You're already carrying 1 flag!";
end;
}if(@CTF_team==1 && .@npc_mapx==95 && .@npc_mapy==182) end;
if(ctf_lockflag(@CTF_arena,1,2)==0){
npctalk "Someone got it first!";
end;
}if(@CTF_team==1){
//same team gets it -> flag goes to base
//move it somewhere else first temporarily
movenpc strnpcinfo(0),0,0;
sleep2 5000;
//bring flag home and unlock it
movenpc strnpcinfo(0),95,182;
ctf_unlockflag(@CTF_arena,1,2);
initnpctimer;
mapannounce .@npc_mapname$, $@CTF_msgA$[1], 0;
}else{
stopnpctimer;
//enemy team gets it -> player carries flag
set @CTF_flag, 2;
movenpc strnpcinfo(0),0,0;
addtimer 1000, "CTF_Engine::OnFlagCarryEfx";
mapannounce .@npc_mapname$, $@CTF_msgA$[2], 0;
sc_end SC_ALL;
sc_start SC_QUAGMIRE,600000,0;
}//npctalk "You got me!";
end;OnTimer5000:
//specialeffect 71;
initnpctimer;
end;OnInit:
movenpc strnpcinfo(0),95,182;
initnpctimer;
end;
}
//Flag 3
//==============================================================pvp_n_1-1,102,182,4 script Light Flag#1_3 722,1,1,{
OnTouch:
getmapxy(.@player_mapname$,.@player_mapx,.@player_mapy,0);
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(0));
set .@distx, .@player_mapx - .@npc_mapx;
set .@disty, .@player_mapy - .@npc_mapy;
if(.@distx > 2 || .@distx < -2 || .@disty > 2 || .@disty < -2) end;if(@CTF_flag!=0){
npctalk "You're already carrying 1 flag!";
end;
}if(@CTF_team==1 && .@npc_mapx==102 && .@npc_mapy==182) end;
if(ctf_lockflag(@CTF_arena,1,3)==0){
npctalk "Someone got it first!";
end;
}if(@CTF_team==1){
//same team gets it -> flag goes to base
//move it somewhere else first temporarily
movenpc strnpcinfo(0),0,0;
sleep2 5000;
//bring flag home and unlock it
movenpc strnpcinfo(0),102,182;
ctf_unlockflag(@CTF_arena,1,3);
initnpctimer;
mapannounce .@npc_mapname$, $@CTF_msgA$[1], 0;
}else{
stopnpctimer;
//enemy team gets it -> player carries flag
set @CTF_flag, 3;
movenpc strnpcinfo(0),0,0;
addtimer 1000, "CTF_Engine::OnFlagCarryEfx";
mapannounce .@npc_mapname$, $@CTF_msgA$[2], 0;
sc_end SC_ALL;
sc_start SC_QUAGMIRE,600000,0;
}//npctalk "You got me!";
end;OnTimer5000:
//specialeffect 71;
initnpctimer;
end;OnInit:
movenpc strnpcinfo(0),102,182;
initnpctimer;
end;
}
//Checkpoint
//==============================================================pvp_n_1-1,95,174,4 script CheckPoint::CTF1_Check_TeamA 5254,1,1,{
OnTouch:
if(@CTF_team==1 && $@CTF_matchover[@CTF_arena]==0){
getmapxy(.@player_mapname$,.@player_mapx,.@player_mapy,0);
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(3));
set .@distx, .@player_mapx - .@npc_mapx;
set .@disty, .@player_mapy - .@npc_mapy;
if(.@distx > 3 || .@distx < -3 || .@disty > 3 || .@disty < -3) end;if(@CTF_flag>=4 && @CTF_flag<=6){
set @CTF_flag, 0;
set $CTF_teamA_score[@CTF_arena], $CTF_teamA_score[@CTF_arena] + 1;
mapannounce .@npc_mapname$, $@CTF_msgA$[3], 0;set @CTF_RB,@CTF_RB+1; //Rbs prize count when scoring a flag
sc_end SC_QUAGMIRE;
ctf_unlockflag(0,0,0); //tell src that player isnt holding flag anymoreif($CTF_teamA_score[@CTF_arena]==3 || $@CTF_suddendeath[@CTF_arena]==1){
OnTeamWin: // get mapname?
if(.@npc_mapname$=="")
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(3));// get arena
if(.@npc_mapname$=="pvp_n_1-1") set .@CTF_arena, 0;
else if(.@npc_mapname$=="pvp_n_2-1") set .@CTF_arena, 1;
else if(.@npc_mapname$=="pvp_n_3-1") set .@CTF_arena, 2;// finish game
mapannounce .@npc_mapname$, $@CTF_msgA$[4], 0;
set $@CTF_matchover[.@CTF_arena], 1;
stopnpctimer "CTF"+.@CTF_arena+"_TIMER";
sleep2 5000;
warpparty "lhz_cube",67,74,$CTF_teamA_id[.@CTF_arena];
sleep 5000;
mapwarp .@npc_mapname$,"prontera",156,173;
sleep 10000;
donpcevent "CTF_Engine::OnRestart"+(.@CTF_arena+1);
end;
}
}
}end;
}
//==============================================================
//
// Team B's Base (Dark)
//
//==============================================================
//Flag 4
//==============================================================pvp_n_1-1,94,19,4 script Dark Flag#1_1 722,1,1,{
OnTouch:
getmapxy(.@player_mapname$,.@player_mapx,.@player_mapy,0);
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(0));
set .@distx, .@player_mapx - .@npc_mapx;
set .@disty, .@player_mapy - .@npc_mapy;
if(.@distx > 2 || .@distx < -2 || .@disty > 2 || .@disty < -2) end;if(@CTF_flag!=0){
npctalk "You're already carrying 1 flag!";
end;
}if(@CTF_team==2 && .@npc_mapx==94 && .@npc_mapy==19) end;
if(ctf_lockflag(@CTF_arena,2,1)==0){
npctalk "Someone got it first!";
end;
}if(@CTF_team==2){
//same team gets it -> flag goes to base
//move it somewhere else first temporarily
movenpc strnpcinfo(0),0,0;
sleep2 5000;
//bring flag home and unlock it
movenpc strnpcinfo(0),94,19;
ctf_unlockflag(@CTF_arena,2,1);
initnpctimer;
mapannounce .@npc_mapname$, $@CTF_msgB$[1], 0;
}else{
stopnpctimer;
//enemy team gets it -> player carries flag
set @CTF_flag, 4;
movenpc strnpcinfo(0),0,0;
addtimer 1000, "CTF_Engine::OnFlagCarryEfx";
mapannounce .@npc_mapname$, $@CTF_msgB$[2], 0;
sc_end SC_ALL;
sc_start SC_QUAGMIRE,600000,0;
}//npctalk "You got me!";
end;OnTimer5000:
//specialeffect 71;
initnpctimer;
end;OnInit:
movenpc strnpcinfo(0),94,19;
initnpctimer;
end;
}
//Flag 5
//==============================================================pvp_n_1-1,87,19,4 script Dark Flag#1_2 722,1,1,{
OnTouch:
getmapxy(.@player_mapname$,.@player_mapx,.@player_mapy,0);
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(0));
set .@distx, .@player_mapx - .@npc_mapx;
set .@disty, .@player_mapy - .@npc_mapy;
if(.@distx > 2 || .@distx < -2 || .@disty > 2 || .@disty < -2) end;if(@CTF_flag!=0){
npctalk "You're already carrying 1 flag!";
end;
}if(@CTF_team==2 && .@npc_mapx==87 && .@npc_mapy==19) end;
if(ctf_lockflag(@CTF_arena,2,2)==0){
npctalk "Someone got it first!";
end;
}if(@CTF_team==2){
//same team gets it -> flag goes to base
//move it somewhere else first temporarily
movenpc strnpcinfo(0),0,0;
sleep2 5000;
//bring flag home and unlock it
movenpc strnpcinfo(0),87,19;
ctf_unlockflag(@CTF_arena,2,2);
initnpctimer;
mapannounce .@npc_mapname$, $@CTF_msgB$[1], 0;
}else{
stopnpctimer;
//enemy team gets it -> player carries flag
set @CTF_flag, 5;
movenpc strnpcinfo(0),0,0;
addtimer 1000, "CTF_Engine::OnFlagCarryEfx";
mapannounce .@npc_mapname$, $@CTF_msgB$[2], 0;
sc_end SC_ALL;
sc_start SC_QUAGMIRE,600000,0;
}//npctalk "You got me!";
end;OnTimer5000:
//specialeffect 71;
initnpctimer;
end;OnInit:
movenpc strnpcinfo(0),87,19;
initnpctimer;
end;
}
//Flag 6
//==============================================================pvp_n_1-1,101,19,4 script Dark Flag#1_3 722,1,1,{
OnTouch:
getmapxy(.@player_mapname$,.@player_mapx,.@player_mapy,0);
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(0));
set .@distx, .@player_mapx - .@npc_mapx;
set .@disty, .@player_mapy - .@npc_mapy;
if(.@distx > 2 || .@distx < -2 || .@disty > 2 || .@disty < -2) end;if(@CTF_flag!=0){
npctalk "You're already carrying 1 flag!";
end;
}if(@CTF_team==2 && .@npc_mapx==101 && .@npc_mapy==19) end;
if(ctf_lockflag(@CTF_arena,2,3)==0){
npctalk "Someone got it first!";
end;
}if(@CTF_team==2){
//same team gets it -> flag goes to base
//move it somewhere else first temporarily
movenpc strnpcinfo(0),0,0;
sleep2 5000;
//bring flag home and unlock it
movenpc strnpcinfo(0),101,19;
ctf_unlockflag(@CTF_arena,2,3);
initnpctimer;
mapannounce .@npc_mapname$, $@CTF_msgB$[1], 0;
}else{
stopnpctimer;
//enemy team gets it -> player carries flag
set @CTF_flag, 6;
movenpc strnpcinfo(0),0,0;
addtimer 1000, "CTF_Engine::OnFlagCarryEfx";
mapannounce .@npc_mapname$, $@CTF_msgB$[2], 0;
sc_end SC_ALL;
sc_start SC_QUAGMIRE,600000,0;
}//npctalk "You got me!";
end;OnTimer5000:
//specialeffect 71;
initnpctimer;
end;OnInit:
movenpc strnpcinfo(0),101,19;
initnpctimer;
end;
}
//Checkpoint
//==============================================================pvp_n_1-1,94,27,4 script CheckPoint::CTF1_Check_TeamB 5413,1,1,{
OnTouch:
if(@CTF_team==2 && $@CTF_matchover[@CTF_arena]==0){
getmapxy(.@player_mapname$,.@player_mapx,.@player_mapy,0);
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(3));
set .@distx, .@player_mapx - .@npc_mapx;
set .@disty, .@player_mapy - .@npc_mapy;
if(.@distx > 3 || .@distx < -3 || .@disty > 3 || .@disty < -3) end;if(@CTF_flag>=1 && @CTF_flag<=3){
set @CTF_flag, 0;
set $CTF_teamB_score[@CTF_arena], $CTF_teamB_score[@CTF_arena] + 1;
mapannounce .@npc_mapname$, $@CTF_msgB$[3], 0;set @CTF_RB,@CTF_RB+1; //Rbs prize count when scoring a flag
sc_end SC_QUAGMIRE;
ctf_unlockflag(0,0,0); //tell src that player isnt holding flag anymoreif($CTF_teamB_score[@CTF_arena]==3 || $@CTF_suddendeath[@CTF_arena]==1){
OnTeamWin: // get mapname?
if(.@npc_mapname$=="")
getmapxy(.@npc_mapname$,.@npc_mapx,.@npc_mapy,1,strnpcinfo(3));// get arena
if(.@npc_mapname$=="pvp_n_1-1") set .@CTF_arena, 0;
else if(.@npc_mapname$=="pvp_n_2-1") set .@CTF_arena, 1;
else if(.@npc_mapname$=="pvp_n_3-1") set .@CTF_arena, 2;// finish game
mapannounce .@npc_mapname$, $@CTF_msgB$[4], 0;
set $@CTF_matchover[.@CTF_arena], 1;
stopnpctimer "CTF"+.@CTF_arena+"_TIMER";
sleep2 5000;
warpparty "lhz_cube",67,74,$CTF_teamB_id[.@CTF_arena];
sleep 5000;
mapwarp .@npc_mapname$,"prontera",156,173;
sleep 10000;
donpcevent "CTF_Engine::OnRestart"+(.@CTF_arena+1);
end;
}
}
}end;
}
//==============================================================
//
// Prize Room
//
//==============================================================lhz_cube.gat,67,74,3 script winnerPrize#CTF 818,2,2,{
sc_end SC_ALL;
mes "[Winner Prize]";
mes "Congratulations, you're the winners of Capture the Flag! Here's your prize ~ ";
next;
//honor
getitem 22555,@CTF_kill_RB;
getitem 22555,@CTF_RB;
set CTF_won,CTF_won+1;
set @CTF_kill_RB,0;
set @CTF_RB,0;
set @CTF_RND_EXP,rand(80,238);
set CTF_EXP,CTF_EXP+@CTF_RND_EXP;
dispbottom "You had gained "+@CTF_RND_EXP+" EXP, you have a total of "+CTF_EXP+" CTF EXP.";
percentheal 100,100;
set @CTF_RND_EXP,0;
if(@CTF_x) warp @CTF_city$,@CTF_x,@CTF_y;
else warp "prontera",156,173;
set @CTF_city$, 0; set @CTF_x, 0; set @CTF_y, 0;
end;
}//==============================================================
//
// Equipment Repair
//
//==============================================================pvp_n_1-1,78,182,4 script Repairman#CTF1_A 86,{
if(@CTF_team==2){
mes "[Arena Repairman]";
mes "Did you even think I'd betray my team?";
mes "I will not repair your equipment!";
close;
}else{
callfunc "allrepairmain";
}
end;
}pvp_n_1-1,110,19,4 script Repairman#CTF1_B 86,{
if(@CTF_team==1){
mes "[Arena Repairman]";
mes "Did you even think I'd betray my team?";
mes "I will not repair your equipment!";
close;
}else{
callfunc "allrepairmain";
}
}// All-Equipment Repair Function
//==============================================================function script allrepairmain {
set .@repairprice,10000;
mes "[Arena Repairman]";
mes "I am the Arena's Repair Smith and I can repair all your Arms.";
next;
if(getbrokenid(1)==NULL) {
mes "[Arena Repairman]";
mes "Looks like you don't need anything repaired...";
close;
}
mes "[Arena Repairman]";
mes "To repair all your equipment I need " + .@repairprice + " Zeny.";
mes "Continue?";
next;
if(select("Yes","No") == 2) {
mes "[Arena Repairman]";
mes "Ok, but don't expect to be using that...";
close;
}
if (Zeny < .@repairprice) {
mes "[Arena Repairman]";
mes "Is that all you got?";
mes "Can't do anything for you...";
close;
}
set Zeny,Zeny-.@repairprice;while(getbrokenid(1)!=NULL){
repair(1);
}
close;}
//==============================================================
//
// Duplicates for Multiple rooms
//
//==============================================================pvp_n_2-1,87,182,4 duplicate(Light Flag#1_1) Light Flag#2_1 722,1,1
pvp_n_2-1,95,182,4 duplicate(Light Flag#1_2) Light Flag#2_2 722,1,1
pvp_n_2-1,102,182,4 duplicate(Light Flag#1_3) Light Flag#2_3 722,1,1
pvp_n_2-1,94,19,4 duplicate(Dark Flag#1_1) Dark Flag#2_1 722,1,1
pvp_n_2-1,87,19,4 duplicate(Dark Flag#1_2) Dark Flag#2_2 722,1,1
pvp_n_2-1,101,19,4 duplicate(Dark Flag#1_3) Dark Flag#2_3 722,1,1
pvp_n_2-1,95,174,4 duplicate(CTF1_Check_TeamA) CheckPoint::CTF2_Check_TeamA 5254,1,1
pvp_n_2-1,94,27,4 duplicate(CTF1_Check_TeamB) CheckPoint::CTF2_Check_TeamB 5413,1,1
pvp_n_2-1,78,182,4 duplicate(Repairman#CTF1_A) Repairman#CTF2_A 86
pvp_n_2-1,110,19,4 duplicate(Repairman#CTF1_B) Repairman#CTF2_B 86pvp_n_3-1,87,182,4 duplicate(Light Flag#1_1) Light Flag#3_1 722,1,1
pvp_n_3-1,95,182,4 duplicate(Light Flag#1_2) Light Flag#3_2 722,1,1
pvp_n_3-1,102,182,4 duplicate(Light Flag#1_3) Light Flag#3_3 722,1,1
pvp_n_3-1,94,19,4 duplicate(Dark Flag#1_1) Dark Flag#3_1 722,1,1
pvp_n_3-1,87,19,4 duplicate(Dark Flag#1_2) Dark Flag#3_2 722,1,1
pvp_n_3-1,101,19,4 duplicate(Dark Flag#1_3) Dark Flag#3_3 722,1,1
pvp_n_3-1,95,174,4 duplicate(CTF1_Check_TeamA) CheckPoint::CTF3_Check_TeamA 5254,1,1
pvp_n_3-1,94,27,4 duplicate(CTF1_Check_TeamB) CheckPoint::CTF3_Check_TeamB 5413,1,1
pvp_n_3-1,78,182,4 duplicate(Repairman#CTF1_A) Repairman#CTF3_A 86
pvp_n_3-1,110,19,4 duplicate(Repairman#CTF1_B) Repairman#CTF3_B 86 -
On 07/06/2023 at 08:48, Gidz Cross said:
Depende. O primeiro de. Quantos int seu bragi requer para usar todo o seu potencial? Para economizar tempo e respostas. Aqui está o que eu fiz no meu Poema de Bragi.
Eu fiz assim, então meu Bard/Clown só precisa colocar 100 int para usar todo o potencial do POB.
I did it my friend.
Still the same thing, the only skill that has interference is the assassin cross break ..
I even managed to get the effect, but I had to change the skill formula in the skill db.
but as I don't know if it can generate a bug in the future, I'm back to normal.
In fact, there were few servers that I saw this skill make a difference in the others. Ex: XileRO~2005-2012, My server was the same way but I lost it haha. -
Good morning my dears!
Does any of you know what formula I would put for "Bragi" to remove the skill delay?
On my old server it was like this.. but nowadays I don't even know anymore and I don't remember where I move. -
solved, thank you friend.
-
-
8 hours ago, KazumaSatou said:
You can diff old clients that supports the old emulator.
just like I didn't understand
-
Good morning my dears!
I would like to take a doubt with you..
By the way, is there any way to use a current, hexed patch on an old emulator?
Anyone got it yet? -
-
Guys, First of all good night!
I know this is a rathena forum.. I learn a lot from many things I see around here.
But my emulator is eathena. And I'm having a problem with this script, it simply doesn't open anything when I'm clicking on it. Someone who knows about scripts can give me a tip on how I can fix it.I know that 1 million have already been posted about this type of script here ..
But I don't know if the emulator updated if it changed commands or something like that.
Likewise the script is here.
I also have others with the same problem.5m_ffa
CTF
etc..Thanks in advance. God blesses.
Quotearena_room,102,100,5 script 3vs3Party 822,{
//npctalk getpartymembercount(getcharid(1));
mes "[Arena Guide]";
mes "Welcome to the 3 vs 3 Party Arena!!!";
mes "Would you like to compete?";
next;
menu "Oooh Yeeaahh!!!",L_Yes, "Nuuu", L_No;
close;L_Yes:
if(@ra_map$ != "ra_in01") {//Honor, house system
if($@antibot_active==0) {//Honor, activate with @quest
if(callfunc("botcheck")==0){//Jason
close;
}
}
}if (BaseLevel < 250 || Class==Job_Novice || Class==Job_Baby || Class==Job_Novice_High) goto L_Level;
if (getpartymembercount(getcharid(1)) == 3 && getpartycount(getcharid(1)) == 3){
set .@myparty, getcharid(1);
if(.@myparty==$PP1_Team1_id || .@myparty==$PP1_Team2_id || .@myparty==$PP2_Team1_id || .@myparty==$PP2_Team2_id){
mes "[Arena Guide]";
mes "Your party is already playing...";
close;
}getmapxy(@PRTYPRTY_city$, @PRTYPRTY_x, @PRTYPRTY_y, 0);
set .@pos, arena_queue_add(2); //sets @PRTYPRTY_active=1 as wellmes "[Arena Guide]";
if(.@pos==0){
mes "The queue is full. Please wait a while and try again.";
}else if(.@pos==-2){
mes "Sorry, you and your Party need to be at least level 200. No Novices allowed either.";
}else if(.@pos==-1){
mes "You / your party already are on a waiting line...";
}else if(.@pos==2){
if($@PP1_running==0){
set $@PP1_running, 1;
donpcevent "PARTYVSPARTY_WINR::OnStart1";
}else if($@PP2_running==0){
set $@PP2_running, 1;
donpcevent "PARTYVSPARTY_WINR::OnStart2";
}else{
mes "Congratulations, you are now on the waiting line for 3vs3 Party!";
mes "Your position is: ^FF0000"+(.@pos-1)+"^000000";
next;
mes "[Arena Guide]";
mes "^0000FFWhen it's your turn, you will be taken to the Arena even if you moved away from this map!";
mes "^FF0000But if you logout, you will be put out of the queue.";
}
}else{
mes "Congratulations, you are now on the waiting line for 3vs3 Party!";
mes "Your position is: ^FF0000"+(.@pos-1)+"^000000";
next;
mes "[Arena Guide]";
mes "^0000FFWhen it's your turn, you will be taken to the Arena even if you moved away from this map!";
mes "^FF0000But if you logout, you will be put out of the queue.";
close;
}
}else{
mes "[Arena Guide]";
mes "Sorry, you do not meet the requirements, check that your party has exactly 3 people in it and try again.";
}
close;L_No:
mes "[Arena Guide]";
mes "Okay, please come again!";
close;L_Level:
mes "[Arena Guide]";
mes "Sorry, you need to be at least level 250.";
close;}
izlude,135,114,5 duplicate(3vs3Party) 3vs3Party#2 822
payon, 158,233,5 duplicate(3vs3Party) 3vs3Party#3 822
ra_in01,318,291,2 duplicate(3vs3Party) 3vs3Party#4 822
//-------------------------------------------------------------------------
//
// ARENA 1
//
//-------------------------------------------------------------------------guild_vs1.gat,0,0,0 script PARTYVSPARTY_TIMR1 -1,{
OnTimer10000:
set $PP1_times_10s, $PP1_times_10s + 1;//4 minutes
if ($PP1_times_10s==24){
mapannounce "guild_vs1.gat", "Everyone, you have one minute to finish this fight!!", 1;
}//4.66 minutes
if ($PP1_times_10s==28){
mapannounce "guild_vs1.gat", "Attention! The round is over in 20 seconds, the team with more people alive will win!", 1;
}//5 minutes - time's over
if ($PP1_times_10s>=30){
stopnpctimer;
stopnpctimer "PPTimer1";set .@PP1_Team1_alive, countpartyin("guild_vs1", $PP1_Team1_id);
set .@PP1_Team2_alive, countpartyin("guild_vs1", $PP1_Team2_id);if(.@PP1_Team1_alive > .@PP1_Team2_alive){
//team1 winsif($PP1_Team2_x) warpparty $PP1_Team2_city$,$PP1_Team2_x,$PP1_Team2_y,$PP1_Team2_id;
else warpparty "prontera",156,173,$PP1_Team2_id;if (getpartymembercount($PP1_Team1_id) <= 3)
warpparty "lhz_cube.gat",122,74,$PP1_Team1_id;
else
warpparty "prontera",156,173,$PP1_Team1_id; //they cheatedmapannounce "arena_room", "We have a winner for this 3vs3 fight! Party "
+getpartyname($PP1_Team1_id)+" defeated "+getpartyname($PP1_Team2_id)+"!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart1";
}else if(.@PP1_Team2_alive > .@PP1_Team1_alive){
//team2 winsif($PP1_Team1_x) warpparty $PP1_Team1_city$,$PP1_Team1_x,$PP1_Team1_y,$PP1_Team1_id;
else warpparty "prontera",156,173,$PP1_Team1_id;if (getpartymembercount($PP1_Team2_id) <= 3)
warpparty "lhz_cube.gat",122,74,$PP1_Team2_id;
else
warpparty "prontera",156,173,$PP1_Team2_id; //they cheatedmapannounce "arena_room", "We have a winner for this 3vs3 fight! Party "
+getpartyname($PP1_Team2_id)+" defeated "+getpartyname($PP1_Team1_id)+"!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart1";
}else{
//draw
if($PP1_Team1_x) warpparty $PP1_Team1_city$,$PP1_Team1_x,$PP1_Team1_y,$PP1_Team1_id;
else warpparty "prontera",156,173,$PP1_Team1_id;if($PP1_Team2_x) warpparty $PP1_Team2_city$,$PP1_Team2_x,$PP1_Team2_y,$PP1_Team2_id;
else warpparty "prontera",156,173,$PP1_Team2_id;mapannounce "arena_room", "The 3vs3 fight between party "
+getpartyname($PP1_Team1_id)+" and "+getpartyname($PP1_Team2_id)+" was a draw!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart1";
}
end;
}donpcevent "PARTYVSPARTY_WINR::OnCheckWinner1";
}
guild_vs1.gat,1,1,1 script PPTimer1 -1,{
OnTimer10001:
if (getpartycount($PP1_Team1_id) > 3){ set .@cheater, $PP1_Team1_id; goto L_Cheat; }
if (getpartycount($PP1_Team2_id) > 3){ set .@cheater, $PP1_Team2_id; goto L_Cheat; }
initnpctimer;
end;L_Cheat:
stopnpctimer;
stopnpctimer "PARTYVSPARTY_TIMR1";
set $PP1_Team1_id, 0;
set $PP1_Team2_id, 0;
mapwarp "guild_vs1","prontera",156,173;
mapannounce "arena_room", "Party "
+getpartyname(.@cheater)+" tried to get more than 3 members during the 3vs3 fight. This match is cancelled!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart1";
end;
}
//-------------------------------------------------------------------------
//
// ARENA 2
//
//-------------------------------------------------------------------------guild_vs1-1.gat,0,0,0 script PARTYVSPARTY_TIMR2 -1,{
OnTimer10000:
set $PP2_times_10s, $PP2_times_10s + 1;//4 minutes
if ($PP2_times_10s==24){
mapannounce "guild_vs1-1.gat", "Everyone, you have one minute to finish this fight!!", 1;
}//4.66 minutes
if ($PP2_times_10s==28){
mapannounce "guild_vs1-1.gat", "Attention! The round is over in 20 seconds, the team with more people alive will win!", 1;
}//5 minutes - time's over
if ($PP2_times_10s>=30){
stopnpctimer;
stopnpctimer "PPTimer2";set .@PP2_Team1_alive, countpartyin("guild_vs1-1", $PP2_Team1_id);
set .@PP2_Team2_alive, countpartyin("guild_vs1-1", $PP2_Team2_id);if(.@PP2_Team1_alive > .@PP2_Team2_alive){
//team1 winsif($PP2_Team2_x) warpparty $PP2_Team2_city$,$PP2_Team2_x,$PP2_Team2_y,$PP2_Team2_id;
else warpparty "prontera",156,173,$PP2_Team2_id;if (getpartymembercount($PP2_Team1_id) <= 3)
warpparty "lhz_cube.gat",122,74,$PP2_Team1_id;
else
warpparty "prontera",156,173,$PP2_Team1_id; //they cheatedmapannounce "arena_room", "We have a winner for this 3vs3 fight! Party "
+getpartyname($PP2_Team1_id)+" defeated "+getpartyname($PP2_Team2_id)+"!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart2";
}else if(.@PP2_Team2_alive > .@PP2_Team1_alive){
//team2 winsif($PP2_Team1_x) warpparty $PP2_Team1_city$,$PP2_Team1_x,$PP2_Team1_y,$PP2_Team1_id;
else warpparty "prontera",156,173,$PP2_Team1_id;if (getpartymembercount($PP2_Team2_id) <= 3)
warpparty "lhz_cube.gat",122,74,$PP2_Team2_id;
else
warpparty "prontera",156,173,$PP2_Team2_id; //they cheatedmapannounce "arena_room", "We have a winner for this 3vs3 fight! Party "
+getpartyname($PP2_Team2_id)+" defeated "+getpartyname($PP2_Team1_id)+"!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart2";
}else{
//draw
if($PP2_Team1_x) warpparty $PP2_Team1_city$,$PP2_Team1_x,$PP2_Team1_y,$PP2_Team1_id;
else warpparty "prontera",156,173,$PP2_Team1_id;if($PP2_Team2_x) warpparty $PP2_Team2_city$,$PP2_Team2_x,$PP2_Team2_y,$PP2_Team2_id;
else warpparty "prontera",156,173,$PP2_Team2_id;mapannounce "arena_room", "The 3vs3 fight between party "
+getpartyname($PP2_Team1_id)+" and "+getpartyname($PP2_Team2_id)+" was a draw!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart2";
}
end;
}donpcevent "PARTYVSPARTY_WINR::OnCheckWinner2";
}
guild_vs1-1.gat,1,1,1 script PPTimer2 -1,{
OnTimer10001:
if (getpartycount($PP2_Team1_id) > 3){ set .@cheater, $PP2_Team1_id; goto L_Cheat; }
if (getpartycount($PP2_Team2_id) > 3){ set .@cheater, $PP2_Team2_id; goto L_Cheat; }
initnpctimer;
end;L_Cheat:
stopnpctimer;
stopnpctimer "PARTYVSPARTY_TIMR2";
set $PP2_Team1_id, 0;
set $PP2_Team2_id, 0;
mapwarp "guild_vs1-1","prontera",156,173;
mapannounce "arena_room", "Party "
+getpartyname(.@cheater)+" tried to get more than 3 members during the 3vs3 fight. This match is cancelled!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart2";
end;
}
//-------------------------------------------------------------------------
//
// GAME NPC
//
//-------------------------------------------------------------------------guild_vs1.gat,0,0,0 script PARTYVSPARTY_WINR -1,{
mes "[Arena Guide]";
mes "What are you doing here? :)";
close;OnInit:
mapwarp "guild_vs1.gat","prontera",156,173;
mapwarp "guild_vs1-1.gat","prontera",156,173;set $@PP1_running, 1;
set $@PP2_running, 1;donpcevent "PARTYVSPARTY_WINR::OnStart1";
donpcevent "PARTYVSPARTY_WINR::OnStart2";end;
OnStart1:
set $PP1_Team1_id, 0;
set $PP1_Team2_id, 0;
set $PP1_times_10s, 0;
set $PP1_Team1_city$, 0; set $PP1_Team1_x, 0; set $PP1_Team1_y, 0;
set $PP1_Team2_city$, 0; set $PP1_Team2_x, 0; set $PP1_Team2_y, 0;if(warp_arena_queue(2,1,"guild_vs1",0,0,2) > 0){ //sets $team1id $team2id as well
set $@PP1_running, 1;
set $PP1_times_10s, 0;
initnpctimer "PARTYVSPARTY_TIMR1";
initnpctimer "PPTimer1";
}else{
set $@PP1_running, 0;
}
end;OnStart2:
set $PP2_Team1_id, 0;
set $PP2_Team2_id, 0;
set $PP2_times_10s, 0;
set $PP2_Team1_city$, 0; set $PP2_Team1_x, 0; set $PP2_Team1_y, 0;
set $PP2_Team2_city$, 0; set $PP2_Team2_x, 0; set $PP2_Team2_y, 0;if(warp_arena_queue(2,2,"guild_vs1-1",0,0,2) > 0){ //sets $team1id $team2id as well
set $@PP2_running, 1;
set $PP2_times_10s, 0;
initnpctimer "PARTYVSPARTY_TIMR2";
initnpctimer "PPTimer2";
}else{
set $@PP2_running, 0;
}
end;OnPCLogoutEvent:
if(@PRTYPRTY_active==1)
arena_queue_del(2);
end;OnPCDieEvent:
getmapxy(.@mapname$, .@mapx, .@mapy, 0);
if(.@mapname$=="guild_vs1" || .@mapname$=="guild_vs1-1"){
if(@PRTYPRTY_x) warp @PRTYPRTY_city$,@PRTYPRTY_x,@PRTYPRTY_y;
else warp "prontera",156,173;
set @PRTYPRTY_city$, 0; set @PRTYPRTY_x, 0; set @PRTYPRTY_y, 0;
sleep2 1000;
alive;
}
end;OnCheckWinner1:
set .@PP1_Team1_alive, countpartyin("guild_vs1", $PP1_Team1_id);
set .@PP1_Team2_alive, countpartyin("guild_vs1", $PP1_Team2_id);if ( .@PP1_Team1_alive==0 && .@PP1_Team2_alive==0 ) goto L_NoWinner1;
if ( .@PP1_Team1_alive == 0 ) {
//team2 wins
stopnpctimer "PARTYVSPARTY_TIMR1";
stopnpctimer "PPTimer1";if($PP1_Team1_x) warpparty $PP1_Team1_city$,$PP1_Team1_x,$PP1_Team1_y,$PP1_Team1_id;
else warpparty "prontera",156,173,$PP1_Team1_id;if (getpartymembercount($PP1_Team2_id) <= 3)
warpparty "lhz_cube.gat",122,74,$PP1_Team2_id;
else
warpparty "prontera",156,173,$PP1_Team2_id; //they cheated//declare winner
mapannounce "arena_room", "We have a winner for this 3vs3 fight! Party "
+getpartyname($PP1_Team2_id)+" defeated "+getpartyname($PP1_Team1_id)+"!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart1";
}else if ( .@PP1_Team2_alive == 0){
//team1 wins
stopnpctimer "PARTYVSPARTY_TIMR1";
stopnpctimer "PPTimer1";if($PP1_Team2_x) warpparty $PP1_Team2_city$,$PP1_Team2_x,$PP1_Team2_y,$PP1_Team2_id;
else warpparty "prontera",156,173,$PP1_Team2_id;if (getpartymembercount($PP1_Team1_id) <= 3)
warpparty "lhz_cube.gat",122,74,$PP1_Team1_id;
else
warpparty "prontera",156,173,$PP1_Team1_id; //they cheated//declare winner
mapannounce "arena_room", "We have a winner for this 3vs3 fight! Party "
+getpartyname($PP1_Team1_id)+" defeated "+getpartyname($PP1_Team2_id)+"!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart1";
}else{
initnpctimer "PARTYVSPARTY_TIMR1";
}
end;L_NoWinner1:
stopnpctimer "PARTYVSPARTY_TIMR1";
stopnpctimer "PPTimer1";
mapannounce "arena_room", "The 3vs3 fight between party "
+getpartyname($PP1_Team1_id)+" and "+getpartyname($PP1_Team2_id)+" was a draw!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart1";
end;OnCheckWinner2:
set .@PP2_Team1_alive, countpartyin("guild_vs1-1", $PP2_Team1_id);
set .@PP2_Team2_alive, countpartyin("guild_vs1-1", $PP2_Team2_id);if ( .@PP2_Team1_alive==0 && .@PP2_Team2_alive==0 ) goto L_NoWinner2;
if ( .@PP2_Team1_alive == 0 ) {
//team2 wins
stopnpctimer "PARTYVSPARTY_TIMR2";
stopnpctimer "PPTimer2";if($PP2_Team1_x) warpparty $PP2_Team1_city$,$PP2_Team1_x,$PP2_Team1_y,$PP2_Team1_id;
else warpparty "prontera",156,173,$PP2_Team1_id;if (getpartymembercount($PP2_Team2_id) <= 3)
warpparty "lhz_cube.gat",122,74,$PP2_Team2_id;
else
warpparty "prontera",156,173,$PP2_Team2_id; //they cheated//declare winner
mapannounce "arena_room", "We have a winner for this 3vs3 fight! Party "
+getpartyname($PP2_Team2_id)+" defeated "+getpartyname($PP2_Team1_id)+"!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart2";
}else if ( .@PP2_Team2_alive == 0){
//team1 wins
stopnpctimer "PARTYVSPARTY_TIMR2";
stopnpctimer "PPTimer2";if($PP2_Team2_x) warpparty $PP2_Team2_city$,$PP2_Team2_x,$PP2_Team2_y,$PP2_Team2_id;
else warpparty "prontera",156,173,$PP2_Team2_id;if (getpartymembercount($PP2_Team1_id) <= 3)
warpparty "lhz_cube.gat",122,74,$PP2_Team1_id;
else
warpparty "prontera",156,173,$PP2_Team1_id; //they cheated//declare winner
mapannounce "arena_room", "We have a winner for this 3vs3 fight! Party "
+getpartyname($PP2_Team1_id)+" defeated "+getpartyname($PP2_Team2_id)+"!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart2";
}else{
initnpctimer "PARTYVSPARTY_TIMR2";
}
end;L_NoWinner2:
stopnpctimer "PARTYVSPARTY_TIMR2";
stopnpctimer "PPTimer2";
mapannounce "arena_room", "The 3vs3 fight between party "
+getpartyname($PP2_Team1_id)+" and "+getpartyname($PP2_Team2_id)+" was a draw!!", 1;
sleep 10000;
donpcevent "PARTYVSPARTY_WINR::OnStart2";
end;}
//
// Prize NPC
//lhz_cube.gat,124,74,3 script winnerPrize#3vs3 818,2,2,{
sc_end SC_ALL;
mes "[Winner Prize]";
mes "Congratulations, you're the winners! Here's your prize ~ ";
next;
getitem 22555,1;
percentheal 100,100;
if(@PRTYPRTY_x) warp @PRTYPRTY_city$,@PRTYPRTY_x,@PRTYPRTY_y;
else warp "prontera",156,173;
set @PRTYPRTY_city$, 0; set @PRTYPRTY_x, 0; set @PRTYPRTY_y, 0;
end;
}
-
what's up guys. everything is good?
Can someone explain to me if this script is asking for some sql table?
it has these sql commands in it.. If you're asking, would it be difficult to create it?
the problem I'm having in my script is that it's not checking if the party's member is online.
Quote// Offline user (use sql)
else
{
set .@sql$, .@sql$ + ( .@sql_i ? "OR " : "" ) + "`char_id`='" + $@partymembercid[.@i] + "' ";
set .@sql_i, .@sql_i + 1;
}
}// SQL for offline users
if ( getstrlen(.@sql$) )
{
// get class from offline members
set .@count, query_sql("SELECT `class` FROM `char` WHERE " + .@sql$, .@class );// Check the class.
for ( set .@i, 0; .@i<.@count; set .@i, .@i+1 )
{
if ( compare( .@tmp_class$ + "|", "|" + .@class[.@i] + "|" ) )
{
if ( .@rid )
attachrid(.@rid);
else
detachrid;
return 1;
}
set .@tmp_class$, .@tmp_class -
18 hours ago, bartoaldo said:
esse script so fonciona no emulador do xilero... por que tem alguma função que so nele foi adicionado... porem emulador do xilero e muito antigo... e eamod
Fala Bartoaldo.. blz mano? pois é rapaz. Meu emulador é exatamente o xilero rsrs mas n ta funcionando. Provavelmente faltando alguma parte na src..
-
Good night guys, how are you?
I don't know if I can post it here... But I believe it can serve both me and the community. I have the scripts 3 vs 3 party, capture the flag. The same as the old Xilero PK.
But the problem is that it is not working on my server.
Could someone with knowledge in the area be giving me support?
If all goes well I'll be making the scripts available to all of you too.
I believe that something is missing in the src, but I have no knowledge in the script area.Quotearena_room,102,100,5 script 3vs3Party 822,{
//npctalk getpartymembercount(getcharid(1));
mes "[Arena Guide]";
mes "Welcome to the 3 vs 3 Party Arena!!!";
mes "Would you like to compete?";
next;
menu "Oooh Yeeaahh!!!",L_Yes, "Nuuu", L_No;
close;L_Yes:
if(@ra_map$ != "ra_in01") {//Honor, house system
if($@antibot_active==0) {//Honor, activate with @quest
if(callfunc("botcheck")==0){//Jason
close;
-
Good night people! Can someone explain to me how do I leave the 4rd only for appearance, if the player does not want the appearance of the normal class?
Thanks for the help anyone can
-
I am having a problem with my server, problem with freezing, I would like to ask the help you know how can I fix this. I wanted to get the player to have a certain amount of "LUK" to be immune to freezing, and to decrease the time the guy gets frozen.
-
Can someone tell me how to set up a prize at this event?
//==========================================================//
//========= Script by RyCHIRO =========//
//========= http://reincarnation-network.com =========//
//========= http://chiyan-ro.com =========//
//==========================================================//- script jumpevent -1,{
OnWhisperGlobal:
if ( getgmlevel() < 99 ) end;L_JumpAdmin:
mes "[Manager]";
mes "^FF0000~Hi GM " + strcharinfo(0) + "!~^000000";
mes "^FF0000The Current Prize is:^000000";
mes "^FF00001. Random Prize:^000000 ^008000"+$jmp_item_amount1+" "+getitemname($jmp_item_id1)+"^000000";
mes "^FF00002. Random Prize:^000000 ^008000"+$jmp_item_amount2+" "+getitemname($jmp_item_id2)+"^000000";
mes "^FF00003. Random Prize:^000000 ^008000"+$jmp_item_amount3+" "+getitemname($jmp_item_id3)+"^000000";
switch(select("Start Jump Event?:Set Prize:Not today Fellas!")){case 1:
next;
if( $@JumpStart == 1 ){
mes "[Manager]";
mes "I Can't Start The Event!!";
mes "The Event is still ON!!";
next;
goto L_JumpAdmin;
}
next;
mes "[Manager]";
mes "^FF0000~Sure thing!~^000000";
close2;
goto L_StartJmp;case 2:
next;
mes "[Manager]";
mes "^FF0000~What should the prize for winning be? Please input the ID.~^000000";
menu "Set Prize 1",SP1,"Set Prize 2",SP2,"Set Prize 3",SP3,"Go Back to main",L_JumpAdmin;SP1:
next;
mes "[Manager]";
mes "^FF0000~What should the prize for winning be? Please input the ID.~^000000";
input $jmp_item_id1;
next;
mes "[Manager]";
mes "^FF0000~How many if this item should I give away?~^000000";
input $jmp_item_amount1;
next;
mes "[Manager]";
mes "^FF0000~So, the prize is^000000 ^008000"+ $jmp_item_amount1 +" "+ getitemname($jmp_item_id1) +"^000000? ^FF0000Great.~^000000";
next;
goto L_JumpAdmin;SP2:
next;
mes "[Manager]";
mes "^FF0000~What should the prize for winning be? Please input the ID.~^000000";
input $jmp_item_id2;
next;
mes "[Manager]";
mes "^FF0000~How many if this item should I give away?~^000000";
input $jmp_item_amount2;
next;
mes "[Manager]";
mes "^FF0000~So, the prize is^000000 ^008000"+ $jmp_item_amount2 +" "+ getitemname($jmp_item_id2) +"^000000? ^FF0000Great.~^000000";
next;
goto L_JumpAdmin;SP3:
next;
mes "[Manager]";
mes "^FF0000~What should the prize for winning be? Please input the ID.~^000000";
input $jmp_item_id3;
next;
mes "[Manager]";
mes "^FF0000~How many if this item should I give away?~^000000";
input $jmp_item_amount3;
next;
mes "[Manager]";
mes "^FF0000~So, the prize is^000000 ^008000"+ $jmp_item_amount3 +" "+ getitemname($jmp_item_id3) +"^000000? ^FF0000Great.~^000000";
next;
goto L_JumpAdmin;Case 3:
next;
mes "[Manager]";
mes "Bye!!";
close;}// End Admin Manager...
OnMinute25:
L_StartJmp:
announce "Jumper Event : will begin in 20 seconds",bc_blue;
sleep2 5000;
announce "Jumper Event : I'm Going to JUMP somewhere..!!",bc_blue;
sleep2 5000;
announce "Jumper Event : By the way I'm going to disguise into a random monster.!!",bc_blue;
sleep2 10000;
announce "Jumper Event : Last 10 seconds",bc_blue;
sleep2 10000;
set $@ran, rand(1,10);
if ($@ran == 10) set $@jmpmap$,"hugel";
if ($@ran == 9) set $@jmpmap$,"yuno";
if ($@ran == 8) set $@jmpmap$,"comodo";
if ($@ran == 7) set $@jmpmap$,"xmas";
if ($@ran == 6) set $@jmpmap$,"aldebaran";
if ($@ran == 5) set $@jmpmap$,"izlude";
if ($@ran == 4) set $@jmpmap$,"payon";
if ($@ran == 3) set $@jmpmap$,"geffen";
if ($@ran == 2) set $@jmpmap$,"morocc";
if ($@ran == 1) set $@jmpmap$,"prontera";
announce "Jumper Event : Go Find me!! I'm here in "+$@jmpmap$+"!!!",bc_blue;
set $@JmpRnd,10;
goto OnStart;OnStart:
if ($@JmpRnd == 0){
stopnpctimer;
set $@JumpStart,0;
sleep2 3000;
announce "Jumper Event : is now OVER!!",bc_blue;
sleep2 15000;
movenpc "Jumper"+$@ran+"",1,1; //move the NPC
setnpcdisplay "Jumper"+$@ran+"",1002;
end;
}
if ($@JmpRnd == 10){
goto OnStart2;
}
stopnpctimer;
sleep2 3000;
announce "Jumper Event : Next Round will begin in 15 seconds...",bc_blue;
sleep2 15000;
setnpcdisplay "Jumper"+$@ran+"",1002;
movenpc "Jumper"+$@ran+"",1,1; //move the NPC
set $@ran, rand(1,10);
if ($@ran == 10) set $@jmpmap$,"hugel";
if ($@ran == 9) set $@jmpmap$,"yuno";
if ($@ran == 8) set $@jmpmap$,"comodo";
if ($@ran == 7) set $@jmpmap$,"xmas";
if ($@ran == 6) set $@jmpmap$,"aldebaran";
if ($@ran == 5) set $@jmpmap$,"izlude";
if ($@ran == 4) set $@jmpmap$,"payon";
if ($@ran == 3) set $@jmpmap$,"geffen";
if ($@ran == 2) set $@jmpmap$,"morocc";
if ($@ran == 1) set $@jmpmap$,"prontera";
announce "Jumper Event : Go Find me!! I'm here in "+$@jmpmap$+"!!!",bc_blue;
goto OnStart2;OnStart2:
set $monster, rand(1001,1995);
if($monster == 1003 || $monster == 1218 || $monster == 1006 || $monster == 1017 || $monster == 1021 || $monster == 1022 || $monster == 1027 || $monster == 1043 || $monster == 1006 || $monster == 1136 || $monster == 1137 || $monster == 1168 || $monster == 1171 || $monster == 1172 || $monster == 1173 || $monster == 1181 || $monster == 1210 || $monster == 1223 || $monster == 1284 || ($monster >= 1324 && $monster <= 1363) || $monster == 1006 || $monster == 1407 || $monster == 1411 || $monster == 1414 || $monster == 1496 || $monster == 1501 || $monster == 1900){ goto OnStart2; end; }
while(1) { //Initiate an infinite loop
set $@jx,rand(0,300); //Set a randon X coordinate
set $@jy,rand(0,300); //Set a random Y coordinate
if(checkcell(""+$@jmpmap$+"",$@jx,$@jy,cell_chkpass)) break; //If cell is walkable break out of the loop
}
initnpctimer;
set $@JumpStart,1;
movenpc "Jumper"+$@ran+"",$@jx,$@jy; //move the NPC
setnpcdisplay "Jumper"+$@ran+"",$monster;
set $@JmpRnd,$@JmpRnd-1;
end;OnTimer60000:
set $@JumpStart,0;
announce "Jumper Event : WOW no One Found ME!! I'm here in "+$@jmpmap$+" "+$@jx+" "+$@jy+"!!",bc_blue;
sleep2 3000;
donpcevent "jumpevent::OnStart";
end;}//End Script
- script Jumper -1,{
if( $@JumpStart == 0 ){
mes "[Jumper]";
mes "I'm sorry, Someone Found me..";
close;
}
set $@prize, rand(1,100);
if ( $@prize <= 50 ){
set $@JumpStart,0;
getitem $jmp_item_id1,$jmp_item_amount1;
announce "Jumper Event : "+strcharinfo(0)+" is the WINNER!! I'm here in "+$@jmpmap$+" "+$@jx+" "+$@jy+"!!",bc_blue;
donpcevent "jumpevent::OnStart";
mes "[Jumper]";
mes "WOW you found me!!";
mes "Take this as a REWARD!!";
mes "You got ^008000"+ $jmp_item_amount1 +" "+ getitemname($jmp_item_id1) +"^000000";
close;
end;
}
set $@prize, rand(1,100);
if ( $@prize <= 49 ){
set $@JumpStart,0;
getitem $jmp_item_id2,$jmp_item_amount2;
announce "Jumper Event : "+strcharinfo(0)+" is the WINNER!! I'm here in "+$@jmpmap$+" "+$@jx+" "+$@jy+"!!",bc_blue;
donpcevent "jumpevent::OnStart";
mes "[Jumper]";
mes "WOW you found me!!";
mes "Take this as a REWARD!!";
mes "You got ^008000"+ $jmp_item_amount2 +" "+ getitemname($jmp_item_id2) +"^000000";
close;
end;
}
set $@prize, rand(1,100);
if ( $@prize <= 48 ){
set $@JumpStart,0;
getitem $jmp_item_id3,$jmp_item_amount3;
announce "Jumper Event : "+strcharinfo(0)+" is the WINNER!! I'm here in "+$@jmpmap$+" "+$@jx+" "+$@jy+"!!",bc_blue;
donpcevent "jumpevent::OnStart";
mes "[Jumper]";
mes "WOW you found me!!";
mes "Take this as a REWARD!!";
mes "You got ^008000"+ $jmp_item_amount3 +" "+ getitemname($jmp_item_id3) +"^000000";
close;
end;
}
}//End Scriptprontera,1,1,1 duplicate(Jumper) Jumper1 1002
morocc,1,1,1 duplicate(Jumper) Jumper2 1002
geffen,1,1,1 duplicate(Jumper) Jumper3 1002
payon,1,1,1 duplicate(Jumper) Jumper4 1002
izlude,1,1,1 duplicate(Jumper) Jumper5 1002
aldebaran,1,1,1 duplicate(Jumper) Jumper6 1002
xmas,1,1,1 duplicate(Jumper) Jumper7 1002
comodo,1,1,1 duplicate(Jumper) Jumper8 1002
yuno,1,1,1 duplicate(Jumper) Jumper9 1002
hugel,1,1,1 duplicate(Jumper) Jumper10 1002
multilingual
in Scripting Support
Posted
Is there any way to make an NPC multilingual,
with option to choose the language?
I say when the person clicks on the npc, show the option
example:
English
Spanish