Reformat and clean up reactor and base scripts
This commit is contained in:
@@ -19,36 +19,36 @@
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* @Author Ronan
|
||||
*
|
||||
* 2001002.js: Either spawns a PQ mob or drops the Statue piece.
|
||||
*/
|
||||
|
||||
function act() {
|
||||
if(rm.getEventInstance().getIntProperty("statusStg2") == -1) {
|
||||
if (rm.getEventInstance().getIntProperty("statusStg2") == -1) {
|
||||
var rnd = Math.floor(Math.random() * 14);
|
||||
|
||||
|
||||
rm.getEventInstance().setProperty("statusStg2", "" + rnd);
|
||||
rm.getEventInstance().setProperty("statusStg2_c", "0");
|
||||
}
|
||||
|
||||
|
||||
var limit = rm.getEventInstance().getIntProperty("statusStg2");
|
||||
var count = rm.getEventInstance().getIntProperty("statusStg2_c");
|
||||
if(count >= limit) {
|
||||
if (count >= limit) {
|
||||
rm.dropItems();
|
||||
|
||||
|
||||
var eim = rm.getEventInstance();
|
||||
eim.giveEventPlayersExp(3500);
|
||||
|
||||
|
||||
eim.setProperty("statusStg2", "1");
|
||||
eim.showClearEffect(true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
count++;
|
||||
rm.getEventInstance().setProperty("statusStg2_c", count);
|
||||
|
||||
|
||||
var nextHashed = (11 * (count)) % 14;
|
||||
|
||||
|
||||
var nextPos = rm.getMap().getReactorById(2001002 + nextHashed).getPosition();
|
||||
rm.spawnMonster(9300040, 1, nextPos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user