Use act() in reactor scripts where possible, provide empty act() otherwise
"function hit()" has triggered on each reactor hit, while "function act()" is only triggered once it's destroyed or reached an end state
This commit is contained in:
@@ -26,4 +26,6 @@
|
||||
function hit() {
|
||||
var map = rm.getMap();
|
||||
map.moveEnvironment("trap" + rm.getReactor().getName()[5], 1);
|
||||
}
|
||||
}
|
||||
|
||||
function act() {}
|
||||
@@ -25,6 +25,6 @@
|
||||
* Neo City Trash Can
|
||||
*/
|
||||
|
||||
function hit() {
|
||||
function act() {
|
||||
rm.dropItems(true, 2, 5, 10, 1);
|
||||
}
|
||||
@@ -25,6 +25,6 @@
|
||||
* Neo City Trash Can
|
||||
*/
|
||||
|
||||
function hit() {
|
||||
function act() {
|
||||
rm.dropItems(true, 2, 5, 10, 1);
|
||||
}
|
||||
@@ -26,4 +26,6 @@
|
||||
|
||||
function hit() {
|
||||
rm.sprayItems();
|
||||
}
|
||||
}
|
||||
|
||||
function act() {}
|
||||
@@ -2,8 +2,6 @@
|
||||
Yulete's Lab: Making the Reagent
|
||||
*/
|
||||
|
||||
function hit() {
|
||||
if (rm.getReactor().getState() == 4) {
|
||||
rm.dropItems();
|
||||
}
|
||||
function act() {
|
||||
rm.dropItems();
|
||||
}
|
||||
@@ -40,4 +40,6 @@ function hit() {
|
||||
rm.getMap().getReactorByName(reactname).hitReactor(rm.getClient());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function act() {}
|
||||
@@ -20,11 +20,11 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*2618000.js - MagatiaPQ Beaker
|
||||
/*2618001.js - MagatiaPQ Door
|
||||
*@author Ronan
|
||||
*/
|
||||
|
||||
function hit() {
|
||||
function act() {
|
||||
var eim = rm.getEventInstance();
|
||||
|
||||
var isAlcadno = eim.getIntProperty("isAlcadno");
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*2618000.js - MagatiaPQ Beaker
|
||||
/*2618002.js - MagatiaPQ Door
|
||||
*@author Ronan
|
||||
*/
|
||||
|
||||
function hit() {
|
||||
function act() {
|
||||
var eim = rm.getEventInstance();
|
||||
|
||||
var isAlcadno = eim.getIntProperty("isAlcadno");
|
||||
|
||||
@@ -26,4 +26,9 @@
|
||||
|
||||
function hit() {
|
||||
rm.dropItems();
|
||||
}
|
||||
|
||||
function act() {
|
||||
// There's a timeout of 3 seconds to revert back from state 1 to 0.
|
||||
// Reactor is destroyed (state 2) and triggers this if dropping two Magic Devices at once, which shouldn't really happen.
|
||||
}
|
||||
@@ -39,4 +39,6 @@ function hit() {
|
||||
//spawnJrBoss(mapObj.getMonsterById(8820023));
|
||||
|
||||
mapObj.killMonster(8820000);
|
||||
}
|
||||
}
|
||||
|
||||
function act() {}
|
||||
Reference in New Issue
Block a user