Jump to content
  • 0

Instance Script.


jeffsaber

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  03/16/20
  • Last Seen:  

So, I've been working on two instance scripts, both having been redone from scratch and reiterated for god knows how many times already across a week...

I'm already confused and on the verge of giving up entirely, but maybe I'm just too stressed out to realize a simple syntax error or two.

As of now, both scripts show no error whatsoever in the logs, but both still don't work.

Script A:
 

plazuda,148,112,3	script	Plazuda	111,{
end;

OnInstanceInit:
instance_announce 1,"Clear all monsters to proceed.",bc_map;
areamonster instance_mapname("plazuda"),130,92,167,131,"Iruna Orc",1850,50,instance_npcname("Plazuda")+"::OnKill";
end;

OnKill:
set .@mob_dead_num,mobcount(instance_mapname("plazuda"),instance_npcname("Plazuda")+"::OnKill");
if (.@mob_dead_num > 49){
instance_announce 1,"Next wave will crash in 5 seconds.",bc_map;
sleep2 5000;
enablenpc instance_npcname("PlazudaInstance");
end;
}
}

plazuda,148,112,3	script	PlazudaInstance	111,{
end;

OnInstanceInit:
disablenpc instance_npcname("PlazudaInstance");
end;

OnEnable:
instance_announce 1,"Clear all monsters to proceed.",bc_map;
areamonster instance_mapname("plazuda"),130,92,167,131,"Malfil",3456,50,instance_npcname("PlazudaInstance")+"::OnKill";
end;

OnKill:
set .@mob_dead_num,mobcount(instance_mapname("plazuda"),instance_npcname("PlazudaInstance")+"::OnKill");
if (.@mob_dead_num > 49){
instance_announce 1,"Next wave will crash in 5 seconds.",bc_map;
sleep2 5000;
enablenpc instance_npcname("PlazudaInstance#2");
end;
}
}

plazuda,148,112,3	script	PlazudaInstance#2	111,{
end;

OnInstanceInit:
disablenpc instance_npcname("PlazudaInstance#2");
end;

OnEnable:
instance_announce 1,"Clear all monsters to proceed.",bc_map;
areamonster instance_mapname("plazuda"),130,92,167,131,"Malfil",3456,75,instance_npcname("PlazudaInstance#2")+"::OnKill";
end;

OnKill:
set .@mob_dead_num,mobcount(instance_mapname("plazuda"),instance_npcname("PlazudaInstance#2")+"::OnKill");
if (.@mob_dead_num > 74){
instance_announce 1,"Plazuda will re-emerge from the old Magic Institute Core in 5 seconds.",bc_map;
sleep2 5000;
enablenpc instance_npcname("PlazudaInstance#3");
end;
}
}

plazuda,148,112,3	script	PlazudaInstance#3	111,{
end;

OnInstanceInit:
disablenpc instance_npcname("PlazudaInstance#3");
end;

OnEnable:
instance_announce 1,"Defeat Plazuda.",bc_map;
monster instance_mapname("plazuda"),147,104,"Dark-Enchanted Plazuda",2131,1,instance_npcname("PlazudaInstance#3")+"::OnKill";
end;

OnKill:
set .@mob_dead_num,mobcount(instance_mapname("plazuda"),instance_npcname("PlazudaInstance#3")+"::OnKill");
if (.@mob_dead_num > 0){
instance_announce 1,"Plazuda has been defeated.",bc_map;
sleep2 3000;
instance_announce 1,"Instance will close in 20 seconds.",bc_map;
sleep2 20000;
instance_destroy;
end;
}

Script B:

1@dth2,16,105,3	script	Memory of Mezzaluna	1689,{
set talk,0;
if(!instance_id()){
end;
}
else {
if (talk < 1 && talk2 < 1){
mes "[Fallen Empress Mezzaluna]";
mes "Please help me get over my past...";
close2;
set talk,1;
set talk2,1;
set gryps,0;
set guard,0;
set evil,0;
hideonnpc "Slebinian Statue";
hideonnpc "Slebinian Statue#1";
hideonnpc "Slebinian Statue#2";
hideonnpc "Slebinian Statue#3";
hideonnpc "Slebinian Statue#4";
areamonster instance_mapname("1@dth2"),98,42,250,175,"Gryps",1447,50,"Memory of Mezzaluna::OnGrypsKill";
areamonster instance_mapname("1@dth2"),98,42,250,175,"Slebinian Royal Guard",1805,5,"Memory of Mezzaluna::OnGuardKill";
end;
}
}

OnGrypsKill:
set gryps,gryps+1;
.@i = 50-gryps;
if (.@i > 0 && .@i < 50){
announce .@i+" Gryps remain.",0;
end;
}
if (.@i < 1 && .@j > 0){
instance_announce 0,"Find Slebinian Royal Guards and collect their Evil Hearts!",0;
end;
}
else if (.@i < 1 && .@j < 1){
instance_announce 0,"Find and activate the Slebinian Statues!",0;
hideoffnpc "Slebinian Statue";
hideoffnpc "Slebinian Statue#1";
hideoffnpc "Slebinian Statue#2";
hideoffnpc "Slebinian Statue#3";
hideoffnpc "Slebinian Statue#4";
end;
}

OnGuardKill:
set guard,guard+1;
.@j = 5-guard;
if (.@j > 0 && .@j < 5){
instance_announce 0,"You've killed a Slebinian Royal Guard! Get his Evil Heart to activate a Slebinian Statue!",0;
end;
}
if (.@i > 0 && .@j < 1){
instance_announce 0,"Find and kill all the remaining Gryps to continue.",0;
end;
}
else if (.@i < 1 && .@j < 1){
instance_announce 0,"Find and activate the Slebinian Statues!",0;
hideoffnpc "Slebinian Statue";
hideoffnpc "Slebinian Statue#1";
hideoffnpc "Slebinian Statue#2";
hideoffnpc "Slebinian Statue#3";
hideoffnpc "Slebinian Statue#4";
end;
}

OnMezzKill:
hideoffnpc "Memory of Mezzaluna#1";
set talk,2;
end;
}

1@dth2,111,93,3	script	Slebinian Statue	111,{
if (evil < 1 && .@i < 1 && .@j < 1){
mes "You put an Evil Heart near the statue, and you feel something ominous.";
close2;
delitem 7583,1;
set evil,1;
end;
}
else if (evil != 0 && .@i > 0 || .@j > 0){
mes "Collect Evil Hearts and clear all monsters first to activate this statue.";
close;
end;
}
}

1@dth2,127,46,3	script	Slebinian Statue#1	111,{
if (evil > 0 && evil < 2 && .@i < 1 && .@j < 1){
mes "You put an Evil Heart near the statue, and you feel something ominous.";
close2;
delitem 7583,1;
set evil,2;
end;
}
else if (evil != 1 && .@i > 0 || .@j > 0){
mes "Collect Evil Hearts, clear all monsters and find the other statues first.";
close;
end;
}
}

1@dth2,143,120,3	script	Slebinian Statue#2	111,{
if (evil > 1 && evil < 3 && .@i < 1 && .@j < 1){
mes "You put an Evil Heart near the statue, and you feel something ominous.";
close2;
delitem 7583,1;
set evil,3;
end;
}
else if (evil != 2 && .@i > 0 || .@j > 0){
mes "Collect Evil Hearts, clear all monsters and find the other statues first.";
close;
end;
}
}

1@dth2,216,98,3	script	Slebinian Statue#3	111,{
if (evil > 2 && evil < 4 && .@i < 1 && .@j < 1){
mes "You put an Evil Heart near the statue, and you feel something ominous.";
close2;
delitem 7583,1;
set evil,4;
end;
}
else if (evil != 3 && .@i > 0 || .@j > 0){
mes "Collect Evil Hearts, clear all monsters and find the other statues first.";
close;
end;
}
}

1@dth2,233,103,3	script	Slebinian Statue#4	111,{
if (evil > 3 && evil < 5 && .@i < 1 && .@j < 1){
mes "You put an Evil Heart near the statue, and you feel something ominous.";
next;
mes "[Empress Mezzaluna]";
mes "Help me...";
close2;
delitem 7583,1;
monster instance_mapname("1@dth2"),314,104,"Empress Mezzaluna",1689,1,"Memory of Mezzaluna::OnMezzKill";
instance_announce 0,"The spirit of the fallen Slebinian Empress Mezzaluna II has appeared! Proceed further and defeat her!",0,"0x00ff99";
end;
}
else if (evil != 4 && .@i > 0 || .@j > 0){
mes "Collect Evil Hearts, clear all monsters and find the other statues first.";
close;
end;
}
}

1@dth2,327,115,3	script	Memory of Mezzaluna#1	1689,{
if (talk != 2){
end;
}
else {
mes "[Fallen Empress Mezzaluna]";
mes "Thank you, brave one.";
next;
mes "[Fallen Empress Mezzaluna]";
mes "My good friend, the High Empress of Iruna's hard choice would've been for nothing if you didn't come here to help...";
next;
mes "[Fallen Empress Mezzaluna]";
mes "With the last of my powers, I can take you back to where you came from.";
next;
mes "[Fallen Empress Mezzaluna]";
mes "Hold on tight...";
close2;
set talk,0;
set talk2,0;
instance_destroy;
end;
}

OnInstanceDestroy:
hideonnpc "Memory of Mezzaluna#1";
end;
}

Not asking for much, but can anyone help out a struggler here just by checking a few lines of code?
Thank you, everyone.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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