Reformat and clean up npc scripts
This commit is contained in:
@@ -20,23 +20,23 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
Debbie
|
||||
-- By ---------------------------------------------------------------------------------------------
|
||||
Angel (get31720)
|
||||
-- Version Info -----------------------------------------------------------------------------------
|
||||
1.0 - First Version by Angel
|
||||
2.0 - Second Version by happydud3 & XotiCraze
|
||||
---------------------------------------------------------------------------------------------------
|
||||
**/
|
||||
Debbie
|
||||
-- By ---------------------------------------------------------------------------------------------
|
||||
Angel (get31720)
|
||||
-- Version Info -----------------------------------------------------------------------------------
|
||||
1.0 - First Version by Angel
|
||||
2.0 - Second Version by happydud3 & XotiCraze
|
||||
---------------------------------------------------------------------------------------------------
|
||||
**/
|
||||
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
function start() {
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
function action(mode, type, selection) {
|
||||
if (mode == -1 || mode == 0) {
|
||||
cm.sendOk("Goodbye then.");
|
||||
cm.dispose();
|
||||
@@ -46,16 +46,16 @@ function action(mode, type, selection) {
|
||||
} else {
|
||||
status--;
|
||||
}
|
||||
|
||||
|
||||
var eim = cm.getEventInstance();
|
||||
if(eim == null) {
|
||||
cm.warp(680000000,0);
|
||||
if (eim == null) {
|
||||
cm.warp(680000000, 0);
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var isMarrying = (cm.getPlayer().getId() == eim.getIntProperty("groomId") || cm.getPlayer().getId() == eim.getIntProperty("brideId"));
|
||||
|
||||
|
||||
switch (status) {
|
||||
case 0:
|
||||
var hasEngagement = false;
|
||||
@@ -65,12 +65,12 @@ function action(mode, type, selection) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (cm.haveItem(4000313) && isMarrying) {
|
||||
if(eim.getIntProperty("weddingStage") == 3) {
|
||||
if (eim.getIntProperty("weddingStage") == 3) {
|
||||
cm.sendOk("Congratulations on your wedding. Please talk to #b#p9201007##k to start the afterparty.");
|
||||
cm.dispose();
|
||||
} else if(hasEngagement) {
|
||||
} else if (hasEngagement) {
|
||||
if (!cm.createMarriageWishlist()) {
|
||||
cm.sendOk("You have already sent your wishlist...");
|
||||
}
|
||||
@@ -79,8 +79,8 @@ function action(mode, type, selection) {
|
||||
cm.sendOk("You do not have the required item to continue through this wedding. Unfortunately, it's over...");
|
||||
}
|
||||
} else {
|
||||
if(eim.getIntProperty("weddingStage") == 3) {
|
||||
if(!isMarrying) {
|
||||
if (eim.getIntProperty("weddingStage") == 3) {
|
||||
if (!isMarrying) {
|
||||
cm.sendYesNo("The couple #rhas just married#k, and soon #bthey will start the afterparty#k. You should wait here for them. Are you really ready to #rquit this wedding#k and return to #bAmoria#k?");
|
||||
} else {
|
||||
cm.sendOk("Congratulations on your wedding. Please talk to #b#p9201007##k to start the afterparty.");
|
||||
@@ -91,9 +91,9 @@ function action(mode, type, selection) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
cm.warp(680000000,0);
|
||||
cm.warp(680000000, 0);
|
||||
cm.dispose();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user