script that warps you to another place if you have a specific item.
#1
Posted 28 May 2007 - 02:34 PM
#2
Posted 12 September 2007 - 12:54 AM
import "std.zh"
//========================================================
// FFC SCRIPT TRIGGER SECRETS (no pun intended) hah;)
// D0 - Item neccesary. Check std.zh for values
// Gleeok was here-
//========================================================
ffc script trigger_secrets{
void run(int have_item){
if (Link->Item[have_item] == true && Screen->NumNPCs() >= 1){
npc enemy_trig = Screen->LoadNPC(1);
enemy_trig->HP = 0;
}
}
}
How it works;
Set screen enemy one to trigger enemy.
Set enemies->secrets and secret combos 16-32.
Set D0 to the item link must have.
If link has the item he we trigger screen secrets.
...Let me know how it works out.
Edited by Gleeok, 12 September 2007 - 12:55 AM.
#3
Posted 12 September 2007 - 10:02 PM
#4
Posted 12 September 2007 - 11:33 PM
Trifoce I believe is item 44. Just check std.zh for the complete list.
-If you want to use three items(pendants right?) then use this version.
import "std.zh"
//========================================================
// FFC SCRIPT TRIGGER SECRETS (no pun intended) hah;)
// D0 - D2; Items neccesary. Check std.zh for values
// Gleeok was here-
//========================================================
ffc script trig_secret2{
void run(int have_item, int have_item2, int have_item3){
if ((Link->Item[have_item] == true) &&
(Link->Item[have_item2] == true) &&
(Link->Item[have_item3] == true) && Screen->NumNPCs() >= 1){
npc enemy_trig = Screen->LoadNPC(1);
enemy_trig->HP = 0;
}
}
}
Let me know how it works.
#5
Posted 13 September 2007 - 07:09 PM
The error was: Invalid instruction.
The command was ("std.zh") (,)
#6
Posted 13 September 2007 - 07:24 PM
#8
Posted 14 September 2007 - 12:09 AM
Do you have an import "std.zh" already in you notepad? If so leave the second one out.
Also don't change anything in the script; D0 is in Zquest under FFC->Arguments page. You should only have to change the ffc combo and script number.
It should work. Leme know if not and i'll stick it in a while loop or something, although that shouldn't matter.
#9
Posted 14 September 2007 - 03:44 PM
#10
Posted 14 September 2007 - 08:31 PM
This one will allow carry-over ffc as well, though i'm not sure why.....anyway.
import "std.zh"
//========================================================
// FFC SCRIPT TRIGGER SECRETS (no pun intended) hah;)
// D0 - D2; Items neccesary. Check std.zh for values
//========================================================
ffc script trig_secret2{
void run(int have_item, int have_item2, int have_item3){
while(true) {
if ( (Link->Item[have_item] == true) && (Link->Item[have_item2] == true) &&
(Link->Item[have_item3] == true) && (Screen->NumNPCs() >= 1) ) {
npc enemy_trig = Screen->LoadNPC(1);
enemy_trig->HP = 0;
Waitframe()
}
}
}
}
EDIT: THIS THREAD WAS JUST EDITED. just making sure you know it changed.
Edited by Gleeok, 14 September 2007 - 08:35 PM.
#11
Posted 14 September 2007 - 08:36 PM
#13
Posted 14 September 2007 - 09:17 PM
#14
Posted 14 September 2007 - 10:23 PM
#15
Posted 14 September 2007 - 11:54 PM
The ffc somehow doesn't want to work in the first one.(there's no good reason except it ends before the enemy spawning begins)
There was the equivelent of a typo in the last one, meaning it would freeze ZC.(fixed)
Here is the tested and fixed version, it works fine. It will instantly kill any enemies on screen, triggering enemies->secrets, if you have the items in D0-D2. Have fun!
import "std.zh"
//========================================================
// FFC SCRIPT TRIGGER SECRETS (no pun intended) hah;)
// D0 - D2; Items neccesary. Check std.zh for values
//========================================================
ffc script trig_secret2{
void run(int have_item, int have_item2, int have_item3){
while(true) {
if ( (Link->Item[have_item] == true) && (Link->Item[have_item2] == true) &&
(Link->Item[have_item3] == true) && (Screen->NumNPCs() >= 1) ) {
npc enemy_trig = Screen->LoadNPC(1);
enemy_trig->HP = 0;
} // end if
Waitframe();
} //end loop
} // end void
} //end scr
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users