diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 00000000..56c80727
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,3 @@
+_datafiles/html/public/static/js/xterm.4.19.0.js
+_datafiles/html/public/static/js/xterm-addon-fit.js
+_datafiles/html/admin/static/js/htmx.2.0.3.js
\ No newline at end of file
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 00000000..888a398c
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,4 @@
+{
+ "esversion": 6
+}
+
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 75427807..3ec2f7e2 100644
--- a/Makefile
+++ b/Makefile
@@ -113,6 +113,14 @@ coverage:
go tool cover -html=bin/covdatafiles/cover.out && \
rm -rf bin
+.PHONY: js-lint
+js-lint:
+# Grep filtering it to remove errors reported by docker image around npm packages
+# if "### errors" is found in the output, exits with an error code of 1
+# This should allow us to use it in CI/CD
+ @docker run --rm -v "$(PWD)":/app -w /app node:20 npx jshint . \
+ 2>&1 | grep -v "^npm " | tee /dev/stderr | grep -Eq "^[0-9]+ errors" && exit 1 || true
+
#
#
# Cert generation for testing
diff --git a/_datafiles/sample-scripts/mobs/item-gold-quest.js b/_datafiles/sample-scripts/mobs/item-gold-quest.js
index bb644b3a..cc0b5ab2 100644
--- a/_datafiles/sample-scripts/mobs/item-gold-quest.js
+++ b/_datafiles/sample-scripts/mobs/item-gold-quest.js
@@ -13,9 +13,9 @@ const REQUIRED_ITEM_ID = 10001;
const REQUIRED_GOLD_AMOUNT = 10;
// This corresponds to the quest defined in the _datafiles/quests/ folder.
-const QUEST_START_ID = "1000000-start" // All quests begin with #-start
-const QUEST_NEXT_STEP_ID = "1000000-givegold" // Quest steps can be called #-anything
-const QUEST_END_ID = "1000000-end" // All quests end with #-end
+const QUEST_START_ID = "1000000-start"; // All quests begin with #-start
+const QUEST_NEXT_STEP_ID = "1000000-givegold"; // Quest steps can be called #-anything
+const QUEST_END_ID = "1000000-end"; // All quests end with #-end
//
@@ -129,7 +129,7 @@ function onGive(mob, room, eventDetails) {
//
// Give them the next step of the quest
//
- user.GiveQuest(QUEST_NEXT_STEP_ID)
+ user.GiveQuest(QUEST_NEXT_STEP_ID);
return true;
}
@@ -172,14 +172,14 @@ function onGive(mob, room, eventDetails) {
//
excessGold = eventDetails.gold - REQUIRED_GOLD_AMOUNT;
if ( excessGold > 0 ) {
- mob.Command("say Here's your change.")
+ mob.Command("say Here's your change.");
mob.Command("give "+String(excessGold)+" gold " + user.ShorthandId()); // Give it to the player using shorthand
}
//
// They have now completed the entire quest, all steps are complete.
//
- user.GiveQuest(QUEST_END_ID)
+ user.GiveQuest(QUEST_END_ID);
return true;
}
diff --git a/_datafiles/sample-scripts/spells/harmarea.js b/_datafiles/sample-scripts/spells/harmarea.js
index 8a302c3a..7d73c066 100644
--- a/_datafiles/sample-scripts/spells/harmarea.js
+++ b/_datafiles/sample-scripts/spells/harmarea.js
@@ -1,7 +1,7 @@
-HARM_DICE_QTY = 1
-HARM_DICE_SIDES = 2
-SPELL_DESCRIPTION = 'sample harmful area spell'
+HARM_DICE_QTY = 1;
+HARM_DICE_SIDES = 2;
+SPELL_DESCRIPTION = 'sample harmful area spell';
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -9,7 +9,7 @@ function onCast(sourceActor, targetActors) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActors) {
diff --git a/_datafiles/sample-scripts/spells/harmmulti.js b/_datafiles/sample-scripts/spells/harmmulti.js
index a7c08565..9205d4eb 100644
--- a/_datafiles/sample-scripts/spells/harmmulti.js
+++ b/_datafiles/sample-scripts/spells/harmmulti.js
@@ -1,7 +1,7 @@
-HARM_DICE_QTY = 1
-HARM_DICE_SIDES = 2
-SPELL_DESCRIPTION = 'sample harmful group spell'
+HARM_DICE_QTY = 1;
+HARM_DICE_SIDES = 2;
+SPELL_DESCRIPTION = 'sample harmful group spell';
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -9,7 +9,7 @@ function onCast(sourceActor, targetActors) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActors) {
diff --git a/_datafiles/sample-scripts/spells/harmsingle.js b/_datafiles/sample-scripts/spells/harmsingle.js
index 7f623f16..e9e3487c 100644
--- a/_datafiles/sample-scripts/spells/harmsingle.js
+++ b/_datafiles/sample-scripts/spells/harmsingle.js
@@ -1,7 +1,7 @@
-HARM_DICE_QTY = 1
-HARM_DICE_SIDES = 2
-SPELL_DESCRIPTION = 'sample harmful single target spell'
+HARM_DICE_QTY = 1;
+HARM_DICE_SIDES = 2;
+SPELL_DESCRIPTION = 'sample harmful single target spell';
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -9,7 +9,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/sample-scripts/spells/helparea.js b/_datafiles/sample-scripts/spells/helparea.js
index 601d2ea0..cd0f8cf4 100644
--- a/_datafiles/sample-scripts/spells/helparea.js
+++ b/_datafiles/sample-scripts/spells/helparea.js
@@ -1,7 +1,7 @@
-HEAL_DICE_QTY = 1
-HEAL_DICE_SIDES = 2
-SPELL_DESCRIPTION = 'sample helpful area spell'
+HEAL_DICE_QTY = 1;
+HEAL_DICE_SIDES = 2;
+SPELL_DESCRIPTION = 'sample helpful area spell';
// Called when the casting is initialized (cast command)
@@ -10,7 +10,7 @@ function onCast(sourceActor, targetActors) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActors) {
diff --git a/_datafiles/sample-scripts/spells/helpmulti.js b/_datafiles/sample-scripts/spells/helpmulti.js
index 17a216bf..e5ad5836 100644
--- a/_datafiles/sample-scripts/spells/helpmulti.js
+++ b/_datafiles/sample-scripts/spells/helpmulti.js
@@ -1,7 +1,7 @@
-HEAL_DICE_QTY = 1
-HEAL_DICE_SIDES = 2
-SPELL_DESCRIPTION = 'sample helpful group spell'
+HEAL_DICE_QTY = 1;
+HEAL_DICE_SIDES = 2;
+SPELL_DESCRIPTION = 'sample helpful group spell';
// Called when the casting is initialized (cast command)
@@ -10,7 +10,7 @@ function onCast(sourceActor, targetActors) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActors) {
diff --git a/_datafiles/sample-scripts/spells/helpsingle.js b/_datafiles/sample-scripts/spells/helpsingle.js
index 40c09563..dec37981 100644
--- a/_datafiles/sample-scripts/spells/helpsingle.js
+++ b/_datafiles/sample-scripts/spells/helpsingle.js
@@ -1,7 +1,7 @@
-HEAL_DICE_QTY = 1
-HEAL_DICE_SIDES = 2
-SPELL_DESCRIPTION = 'sample helpful single target spell'
+HEAL_DICE_QTY = 1;
+HEAL_DICE_SIDES = 2;
+SPELL_DESCRIPTION = 'sample helpful single target spell';
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -9,7 +9,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/sample-scripts/spells/neutral.js b/_datafiles/sample-scripts/spells/neutral.js
index 38c8cf40..c6282f27 100644
--- a/_datafiles/sample-scripts/spells/neutral.js
+++ b/_datafiles/sample-scripts/spells/neutral.js
@@ -5,7 +5,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/default/buffs/0-meditating.js b/_datafiles/world/default/buffs/0-meditating.js
index 73733ea4..bab5e886 100644
--- a/_datafiles/world/default/buffs/0-meditating.js
+++ b/_datafiles/world/default/buffs/0-meditating.js
@@ -5,13 +5,13 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You sit down and begin your meditation.' )
- SendUserMessage(actor.UserId(), 'Your meditation must complete without interruption to quit gracefully.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' sits down a begins to meditate.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You sit down and begin your meditation.' );
+ SendUserMessage(actor.UserId(), 'Your meditation must complete without interruption to quit gracefully.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' sits down a begins to meditate.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You continue your meditation. *' + triggersLeft + ' rounds left* ' )
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' continues meditating.', actor.UserId() )
+ SendUserMessage(actor.UserId(), 'You continue your meditation. *' + triggersLeft + ' rounds left* ' );
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' continues meditating.', actor.UserId() );
}
diff --git a/_datafiles/world/default/buffs/1-illumination.js b/_datafiles/world/default/buffs/1-illumination.js
index 268213cd..a34042ff 100644
--- a/_datafiles/world/default/buffs/1-illumination.js
+++ b/_datafiles/world/default/buffs/1-illumination.js
@@ -1,12 +1,12 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'A warm glow surrounds you.')
- SendRoomMessage(actor.GetRoomId(), 'A warm glow surrounds '+actor.GetCharacterName(true)+ '.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'A warm glow surrounds you.');
+ SendRoomMessage(actor.GetRoomId(), 'A warm glow surrounds '+actor.GetCharacterName(true)+ '.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your glowing fades away.' )
- SendRoomMessage(actor.GetRoomId(), 'The glow surrounding '+actor.GetCharacterName(true)+ ' fades away.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Your glowing fades away.' );
+ SendRoomMessage(actor.GetRoomId(), 'The glow surrounding '+actor.GetCharacterName(true)+ ' fades away.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/10-weakness.js b/_datafiles/world/default/buffs/10-weakness.js
index 3ccf565f..534793e2 100644
--- a/_datafiles/world/default/buffs/10-weakness.js
+++ b/_datafiles/world/default/buffs/10-weakness.js
@@ -1,17 +1,17 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Weakness overtakes your body!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks a little shakey.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Weakness overtakes your body!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks a little shakey.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You\'re feeling weak!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks a little shakey.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You\'re feeling weak!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks a little shakey.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You feel a little more like yourself.')
+ SendUserMessage(actor.UserId(), 'You feel a little more like yourself.');
}
diff --git a/_datafiles/world/default/buffs/11-touched.js b/_datafiles/world/default/buffs/11-touched.js
index f4c2fcb5..0101c488 100644
--- a/_datafiles/world/default/buffs/11-touched.js
+++ b/_datafiles/world/default/buffs/11-touched.js
@@ -1,10 +1,10 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You are touched by the gods.')
+ SendUserMessage(actor.UserId(), 'You are touched by the gods.');
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'The gods forget about you.')
+ SendUserMessage(actor.UserId(), 'The gods forget about you.');
}
diff --git a/_datafiles/world/default/buffs/12-tackled.js b/_datafiles/world/default/buffs/12-tackled.js
index efc72ce8..4565d0e2 100644
--- a/_datafiles/world/default/buffs/12-tackled.js
+++ b/_datafiles/world/default/buffs/12-tackled.js
@@ -1,18 +1,18 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You\'re on the ground.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is on the ground.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You\'re on the ground.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is on the ground.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You\'re trying to get up.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is getting up.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You\'re trying to get up.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is getting up.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You\'re standing again.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is standing again.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You\'re standing again.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is standing again.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/13-poisoned.js b/_datafiles/world/default/buffs/13-poisoned.js
index c33dbcea..03b94f66 100644
--- a/_datafiles/world/default/buffs/13-poisoned.js
+++ b/_datafiles/world/default/buffs/13-poisoned.js
@@ -1,20 +1,20 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You begin to feel sick.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is looking sickly.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You begin to feel sick.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is looking sickly.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- dmgAmt = Math.abs(Math.abs(actor.AddHealth(UtilDiceRoll(1, 8)*-1)))
+ dmgAmt = Math.abs(Math.abs(actor.AddHealth(UtilDiceRoll(1, 8)*-1)));
- SendUserMessage(actor.UserId(), 'The poison hurts you for '+String(dmgAmt)+' damage!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' convulses under the effects of a poison.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'The poison hurts you for '+String(dmgAmt)+' damage!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' convulses under the effects of a poison.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'The poison wears off.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks a bit more normal.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'The poison wears off.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks a bit more normal.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/14-minor_heal.js b/_datafiles/world/default/buffs/14-minor_heal.js
index 0a1a5876..e1f8d3f3 100644
--- a/_datafiles/world/default/buffs/14-minor_heal.js
+++ b/_datafiles/world/default/buffs/14-minor_heal.js
@@ -1,21 +1,21 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'A magical healing aura washes over you.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is surrounded by a healing glow.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'A magical healing aura washes over you.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is surrounded by a healing glow.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- healAmt = actor.AddHealth(UtilDiceRoll(1, 10))
+ healAmt = actor.AddHealth(UtilDiceRoll(1, 10));
- SendUserMessage(actor.UserId(), 'You heal for '+String(healAmt)+' damage!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is healing from the effects of a heal spell.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You heal for '+String(healAmt)+' damage!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is healing from the effects of a heal spell.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'The healing aura fades.')
- SendRoomMessage(actor.GetRoomId(), `The healing aura around `+actor.GetCharacterName(true)+' fades.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'The healing aura fades.');
+ SendRoomMessage(actor.GetRoomId(), `The healing aura around `+actor.GetCharacterName(true)+' fades.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/15-sleeping.js b/_datafiles/world/default/buffs/15-sleeping.js
index df4512a6..d8d948be 100644
--- a/_datafiles/world/default/buffs/15-sleeping.js
+++ b/_datafiles/world/default/buffs/15-sleeping.js
@@ -19,5 +19,5 @@ function onEnd(actor, triggersLeft) {
SendUserMessage(actor.UserId(), 'You wake up!');
SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' wakes up.', actor.UserId());
actor.SetAdjective("sleeping", false);
- actor.GiveBuff(16, "sleep") // Well Rested
+ actor.GiveBuff(16, "sleep"); // Well Rested
}
diff --git a/_datafiles/world/default/buffs/16-well_rested.js b/_datafiles/world/default/buffs/16-well_rested.js
index cd35d1d0..c95c6678 100644
--- a/_datafiles/world/default/buffs/16-well_rested.js
+++ b/_datafiles/world/default/buffs/16-well_rested.js
@@ -1,11 +1,11 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You feel very well rested.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks very well rested.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You feel very well rested.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks very well rested.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- healAmt = actor.AddHealth(UtilDiceRoll(1, 2))
+ healAmt = actor.AddHealth(UtilDiceRoll(1, 2));
}
diff --git a/_datafiles/world/default/buffs/17-well_fed.js b/_datafiles/world/default/buffs/17-well_fed.js
index 0c084d94..a033a6a4 100644
--- a/_datafiles/world/default/buffs/17-well_fed.js
+++ b/_datafiles/world/default/buffs/17-well_fed.js
@@ -1,6 +1,6 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You feel well fed.')
+ SendUserMessage(actor.UserId(), 'You feel well fed.');
}
diff --git a/_datafiles/world/default/buffs/18-very_well_fed.js b/_datafiles/world/default/buffs/18-very_well_fed.js
index 0c084d94..a033a6a4 100644
--- a/_datafiles/world/default/buffs/18-very_well_fed.js
+++ b/_datafiles/world/default/buffs/18-very_well_fed.js
@@ -1,6 +1,6 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You feel well fed.')
+ SendUserMessage(actor.UserId(), 'You feel well fed.');
}
diff --git a/_datafiles/world/default/buffs/19-drunk.js b/_datafiles/world/default/buffs/19-drunk.js
index 95a3bb1c..1ebbbb7f 100644
--- a/_datafiles/world/default/buffs/19-drunk.js
+++ b/_datafiles/world/default/buffs/19-drunk.js
@@ -1,18 +1,18 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You\'re feeling a little drunk, but warm!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is tatered.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You\'re feeling a little drunk, but warm!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is tatered.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You hiccup!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' hiccups.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You hiccup!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' hiccups.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your vision straightens out.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks sober again.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Your vision straightens out.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks sober again.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/2-drugged_haze.js b/_datafiles/world/default/buffs/2-drugged_haze.js
index a9016bce..db2b7255 100644
--- a/_datafiles/world/default/buffs/2-drugged_haze.js
+++ b/_datafiles/world/default/buffs/2-drugged_haze.js
@@ -1,19 +1,18 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You catch a whiff of a strange odor carried by the smoke.' )
- SendRoomMessage(actor.GetRoomId(), 'You notice the eyes of '+actor.GetCharacterName(true)+' glaze oover.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You catch a whiff of a strange odor carried by the smoke.' );
+ SendRoomMessage(actor.GetRoomId(), 'You notice the eyes of '+actor.GetCharacterName(true)+' glaze oover.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
-
- SendUserMessage(actor.UserId(), 'You find yourself in a blissful haze, wanting nothing more than to sit and watch the world go by.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks blissfully content.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You find yourself in a blissful haze, wanting nothing more than to sit and watch the world go by.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' looks blissfully content.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You snap out of your haze.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' shakes off the haze and the glaze in their eyes fades away.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You snap out of your haze.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' shakes off the haze and the glaze in their eyes fades away.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/20-very_hidden.js b/_datafiles/world/default/buffs/20-very_hidden.js
index 93eb9171..35a8a0a8 100644
--- a/_datafiles/world/default/buffs/20-very_hidden.js
+++ b/_datafiles/world/default/buffs/20-very_hidden.js
@@ -1,12 +1,12 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You feel sneaky.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' disappears into the shadows.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You feel sneaky.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' disappears into the shadows.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You no longer feel sneaky.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' emerges from the shadows.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You no longer feel sneaky.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' emerges from the shadows.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/21-explosion.js b/_datafiles/world/default/buffs/21-explosion.js
index 2ead234d..7a91cadd 100644
--- a/_datafiles/world/default/buffs/21-explosion.js
+++ b/_datafiles/world/default/buffs/21-explosion.js
@@ -6,13 +6,13 @@ function onStart(actor, triggersLeft) {
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- dmgAmt = Math.abs(actor.AddHealth(-1*(UtilDiceRoll(2, 9)+2)))
+ dmgAmt = Math.abs(actor.AddHealth(-1*(UtilDiceRoll(2, 9)+2)));
- SendUserMessage(actor.UserId(), 'Fiery shrapnel hits you for '+String(dmgAmt)+' damage!')
- SendRoomMessage(actor.GetRoomId(), 'Fiery shrapnel hits '+actor.GetCharacterName(true)+'', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Fiery shrapnel hits you for '+String(dmgAmt)+' damage!');
+ SendRoomMessage(actor.GetRoomId(), 'Fiery shrapnel hits '+actor.GetCharacterName(true)+'', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- actor.GiveBuff(22, "explosion") // On fire
+ actor.GiveBuff(22, "explosion"); // On fire
}
diff --git a/_datafiles/world/default/buffs/22-on_fire.js b/_datafiles/world/default/buffs/22-on_fire.js
index 90299254..1f82e3e6 100644
--- a/_datafiles/world/default/buffs/22-on_fire.js
+++ b/_datafiles/world/default/buffs/22-on_fire.js
@@ -1,20 +1,20 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You catch on fire!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' caught on fire!', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You catch on fire!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' caught on fire!', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- dmgAmt = Math.abs(actor.AddHealth(-1*UtilDiceRoll(2, 6)))
+ dmgAmt = Math.abs(actor.AddHealth(-1*UtilDiceRoll(2, 6)));
- SendUserMessage(actor.UserId(), 'Flames envelop you, causing '+String(dmgAmt)+' damage while you writh in pain!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is enveloped in flames.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Flames envelop you, causing '+String(dmgAmt)+' damage while you writh in pain!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is enveloped in flames.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You are no longer on fire.')
- SendRoomMessage(actor.GetRoomId(), 'The healing aura surrounding '+actor.GetCharacterName(true)+' is no longer on fire.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You are no longer on fire.');
+ SendRoomMessage(actor.GetRoomId(), 'The healing aura surrounding '+actor.GetCharacterName(true)+' is no longer on fire.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/23-warriors_respite.js b/_datafiles/world/default/buffs/23-warriors_respite.js
index 9f15c1b2..bfe6a0eb 100644
--- a/_datafiles/world/default/buffs/23-warriors_respite.js
+++ b/_datafiles/world/default/buffs/23-warriors_respite.js
@@ -1,8 +1,8 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You enter a focused state of rest.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' begins to meditate.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You enter a focused state of rest.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' begins to meditate.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
@@ -17,14 +17,14 @@ function onTrigger(actor, triggersLeft) {
maxHealing = 8;
}
- healAmt = actor.AddHealth(UtilDiceRoll(1, maxHealing))
+ healAmt = actor.AddHealth(UtilDiceRoll(1, maxHealing));
- SendUserMessage(actor.UserId(), 'You heal for '+String(healAmt)+' hitpoints.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is healing while they meditate.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You heal for '+String(healAmt)+' hitpoints.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is healing while they meditate.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your restful state abides.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is done meditating.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Your restful state abides.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is done meditating.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/24-death_recovery.js b/_datafiles/world/default/buffs/24-death_recovery.js
index 30e42584..f67056a5 100644
--- a/_datafiles/world/default/buffs/24-death_recovery.js
+++ b/_datafiles/world/default/buffs/24-death_recovery.js
@@ -3,19 +3,19 @@
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- healAmt = actor.AddHealth(UtilDiceRoll(1, 10))
- manaAmt = actor.AddMana(UtilDiceRoll(1, 10))
+ healAmt = actor.AddHealth(UtilDiceRoll(1, 10));
+ manaAmt = actor.AddMana(UtilDiceRoll(1, 10));
if ( healAmt > 0 && manaAmt > 0 ) {
- SendUserMessage(actor.UserId(), 'The shadow realm heals you for '+String(healAmt)+' damage and restores '+String(manaAmt)+' mana!')
+ SendUserMessage(actor.UserId(), 'The shadow realm heals you for '+String(healAmt)+' damage and restores '+String(manaAmt)+' mana!');
} else if ( healAmt > 0 ) {
- SendUserMessage(actor.UserId(), 'The shadow realm heals you for '+String(healAmt)+' damage!')
+ SendUserMessage(actor.UserId(), 'The shadow realm heals you for '+String(healAmt)+' damage!');
} else if ( manaAmt > 0 ) {
- SendUserMessage(actor.UserId(), 'The shadow realm restores '+String(manaAmt)+' mana!')
+ SendUserMessage(actor.UserId(), 'The shadow realm restores '+String(manaAmt)+' mana!');
}
if ( healAmt > 0 || manaAmt > 0 ) {
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is recovering from a recent death.', actor.UserId())
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is recovering from a recent death.', actor.UserId());
}
}
diff --git a/_datafiles/world/default/buffs/27-minor_potion_mana_recovery.js b/_datafiles/world/default/buffs/27-minor_potion_mana_recovery.js
index 0edcffd8..b5da6697 100644
--- a/_datafiles/world/default/buffs/27-minor_potion_mana_recovery.js
+++ b/_datafiles/world/default/buffs/27-minor_potion_mana_recovery.js
@@ -1,19 +1,19 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'The potion warms you as you drink it down.')
+ SendUserMessage(actor.UserId(), 'The potion warms you as you drink it down.');
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- manaAmt = actor.AddMana(UtilDiceRoll(1, 5))
+ manaAmt = actor.AddMana(UtilDiceRoll(1, 5));
- SendUserMessage(actor.UserId(), 'You recover '+String(manaAmt)+' mana!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is recovery mana from the effects of a potion.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You recover '+String(manaAmt)+' mana!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is recovery mana from the effects of a potion.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'The mana potions effect runs out.')
+ SendUserMessage(actor.UserId(), 'The mana potions effect runs out.');
}
diff --git a/_datafiles/world/default/buffs/28-superior_hearing.js b/_datafiles/world/default/buffs/28-superior_hearing.js
index 6b6aba76..b2043ae0 100644
--- a/_datafiles/world/default/buffs/28-superior_hearing.js
+++ b/_datafiles/world/default/buffs/28-superior_hearing.js
@@ -1,11 +1,11 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Even the smallest sounds become clear as your hearing is enhanced.')
+ SendUserMessage(actor.UserId(), 'Even the smallest sounds become clear as your hearing is enhanced.');
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your hearing returns to normal.')
+ SendUserMessage(actor.UserId(), 'Your hearing returns to normal.');
}
diff --git a/_datafiles/world/default/buffs/29-night_vision.js b/_datafiles/world/default/buffs/29-night_vision.js
index bcf4a2a9..876b13a2 100644
--- a/_datafiles/world/default/buffs/29-night_vision.js
+++ b/_datafiles/world/default/buffs/29-night_vision.js
@@ -1,11 +1,11 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'The shadows come to life as your vision enhances.')
+ SendUserMessage(actor.UserId(), 'The shadows come to life as your vision enhances.');
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your vision returns to normal.')
+ SendUserMessage(actor.UserId(), 'Your vision returns to normal.');
}
diff --git a/_datafiles/world/default/buffs/3-cold_tolerant.js b/_datafiles/world/default/buffs/3-cold_tolerant.js
index f234dd66..05148c92 100644
--- a/_datafiles/world/default/buffs/3-cold_tolerant.js
+++ b/_datafiles/world/default/buffs/3-cold_tolerant.js
@@ -1,11 +1,11 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You feel warm inside. You feel that you could take on even the harshest winter weather.')
+ SendUserMessage(actor.UserId(), 'You feel warm inside. You feel that you could take on even the harshest winter weather.');
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your inner warmth subsides.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' shakes off the haze and the glaze in their eyes fades away.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Your inner warmth subsides.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' shakes off the haze and the glaze in their eyes fades away.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/30-regeneration.js b/_datafiles/world/default/buffs/30-regeneration.js
index 86898126..09d32054 100644
--- a/_datafiles/world/default/buffs/30-regeneration.js
+++ b/_datafiles/world/default/buffs/30-regeneration.js
@@ -1,17 +1,17 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your body\'s natural healing feels super charged.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' begins to regenerate.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Your body\'s natural healing feels super charged.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' begins to regenerate.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- healAmt = actor.AddHealth(UtilDiceRoll(1, 3))
- SendUserMessage(actor.UserId(), 'You regenerate for '+String(healAmt)+' damage!')
+ healAmt = actor.AddHealth(UtilDiceRoll(1, 3));
+ SendUserMessage(actor.UserId(), 'You regenerate for '+String(healAmt)+' damage!');
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your enhanced regeneration goes away.')
+ SendUserMessage(actor.UserId(), 'Your enhanced regeneration goes away.');
}
diff --git a/_datafiles/world/default/buffs/31-freezing_snow.js b/_datafiles/world/default/buffs/31-freezing_snow.js
index 9a3fb33a..9143ef95 100644
--- a/_datafiles/world/default/buffs/31-freezing_snow.js
+++ b/_datafiles/world/default/buffs/31-freezing_snow.js
@@ -3,8 +3,8 @@
function onStart(actor, triggersLeft) {
if ( actor.HasBuffFlag("warmed") ) {
- actor.RemoveBuff(31)
- return
+ actor.RemoveBuff(31);
+ return;
}
harmAmt = actor.AddHealth(-1 * UtilDiceRoll(1, 2));
if (harmAmt < 1 ) {
diff --git a/_datafiles/world/default/buffs/33-thirsty.js b/_datafiles/world/default/buffs/33-thirsty.js
index b5c3d367..839b90ba 100644
--- a/_datafiles/world/default/buffs/33-thirsty.js
+++ b/_datafiles/world/default/buffs/33-thirsty.js
@@ -3,8 +3,8 @@
function onStart(actor, triggersLeft) {
if ( actor.HasBuffFlag("hydrated") ) {
- actor.RemoveBuff(33)
- return
+ actor.RemoveBuff(33);
+ return;
}
SendUserMessage(actor.UserId(), 'You are feeling parched.');
@@ -14,9 +14,9 @@ function onStart(actor, triggersLeft) {
function onTrigger(actor, triggersLeft) {
if ( actor.HasBuffFlag("hydrated") ) {
- actor.RemoveBuff(33)
- return
+ actor.RemoveBuff(33);
+ return;
}
- SendUserMessage(actor.UserId(), 'You feel very thirsty!')
+ SendUserMessage(actor.UserId(), 'You feel very thirsty!');
}
\ No newline at end of file
diff --git a/_datafiles/world/default/buffs/37-remove_curse.js b/_datafiles/world/default/buffs/37-remove_curse.js
index b35c137c..9dd9b71e 100644
--- a/_datafiles/world/default/buffs/37-remove_curse.js
+++ b/_datafiles/world/default/buffs/37-remove_curse.js
@@ -3,15 +3,15 @@
function onEnd(actor, triggersLeft) {
items = actor.Uncurse();
- room = GetRoom(actor.GetRoomId())
+ room = GetRoom(actor.GetRoomId());
for( var i in items ) {
- actor.SendText(`You feel a curse lifted from your `+items[i].Name())
+ actor.SendText(`You feel a curse lifted from your `+items[i].Name());
message = `The `+items[i].Name()+` held by `+actor.GetCharacterName(true)+` glows briefly.`;
- room.SendText(message, actor.UserId())
+ room.SendText(message, actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/4-heal_spell.js b/_datafiles/world/default/buffs/4-heal_spell.js
index 061c7940..5e55196c 100644
--- a/_datafiles/world/default/buffs/4-heal_spell.js
+++ b/_datafiles/world/default/buffs/4-heal_spell.js
@@ -1,20 +1,20 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'A magical healing aura washes over you.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is surrounded by a healing glow.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'A magical healing aura washes over you.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is surrounded by a healing glow.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- healAmt = actor.AddHealth(UtilDiceRoll(1, 10))
+ healAmt = actor.AddHealth(UtilDiceRoll(1, 10));
- SendUserMessage(actor.UserId(), 'You heal for '+String(healAmt)+' damage!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is healing from the effects of a heal spell.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You heal for '+String(healAmt)+' damage!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is healing from the effects of a heal spell.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'The healing aura fades away.')
- SendRoomMessage(actor.GetRoomId(), 'The healing aura surrounding '+actor.GetCharacterName(true)+' fades away.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'The healing aura fades away.');
+ SendRoomMessage(actor.GetRoomId(), 'The healing aura surrounding '+actor.GetCharacterName(true)+' fades away.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/5-minor_potion_healing.js b/_datafiles/world/default/buffs/5-minor_potion_healing.js
index b3d1fb43..8012fae0 100644
--- a/_datafiles/world/default/buffs/5-minor_potion_healing.js
+++ b/_datafiles/world/default/buffs/5-minor_potion_healing.js
@@ -1,19 +1,19 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'The potion warms you as you drink it down.')
+ SendUserMessage(actor.UserId(), 'The potion warms you as you drink it down.');
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- healAmt = actor.AddHealth(UtilDiceRoll(1, 5))
+ healAmt = actor.AddHealth(UtilDiceRoll(1, 5));
- SendUserMessage(actor.UserId(), 'You heal for '+String(healAmt)+' damage!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is healing from the effects of a potion.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You heal for '+String(healAmt)+' damage!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is healing from the effects of a potion.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'The potions effect runs out.')
+ SendUserMessage(actor.UserId(), 'The potions effect runs out.');
}
diff --git a/_datafiles/world/default/buffs/6-power_leveling.js b/_datafiles/world/default/buffs/6-power_leveling.js
index a962ea6f..60f792e2 100644
--- a/_datafiles/world/default/buffs/6-power_leveling.js
+++ b/_datafiles/world/default/buffs/6-power_leveling.js
@@ -1,10 +1,10 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You feel like you\'ve been training in 100x gravity.')
+ SendUserMessage(actor.UserId(), 'You feel like you\'ve been training in 100x gravity.');
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You no longer feel like you\'ve been training in 100x gravity.')
+ SendUserMessage(actor.UserId(), 'You no longer feel like you\'ve been training in 100x gravity.');
}
diff --git a/_datafiles/world/default/buffs/7-hamstrung.js b/_datafiles/world/default/buffs/7-hamstrung.js
index 2a7f2d62..b9621bb6 100644
--- a/_datafiles/world/default/buffs/7-hamstrung.js
+++ b/_datafiles/world/default/buffs/7-hamstrung.js
@@ -1,18 +1,18 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You\'ve been hamstrung!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' has been hamstrung!', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You\'ve been hamstrung!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' has been hamstrung!', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You\'re hamstrung!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is hamstrung!', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You\'re hamstrung!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is hamstrung!', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your leg heals enough that you can fight again.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is no longer hamstrung.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Your leg heals enough that you can fight again.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is no longer hamstrung.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/8-winded.js b/_datafiles/world/default/buffs/8-winded.js
index ef2120a3..fd168e93 100644
--- a/_datafiles/world/default/buffs/8-winded.js
+++ b/_datafiles/world/default/buffs/8-winded.js
@@ -1,18 +1,18 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You\'re exhausted!')
- SendRoomMessage(actor.GetRoomId(), '' + actor.GetCharacterName(true)+' is exhausted.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You\'re exhausted!');
+ SendRoomMessage(actor.GetRoomId(), '' + actor.GetCharacterName(true)+' is exhausted.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You\'re exhausted!')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is exhausted!', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You\'re exhausted!');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is exhausted!', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You catch your breath.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is no longer exhausted.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You catch your breath.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is no longer exhausted.', actor.UserId());
}
diff --git a/_datafiles/world/default/buffs/9-hidden.js b/_datafiles/world/default/buffs/9-hidden.js
index 93eb9171..35a8a0a8 100644
--- a/_datafiles/world/default/buffs/9-hidden.js
+++ b/_datafiles/world/default/buffs/9-hidden.js
@@ -1,12 +1,12 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You feel sneaky.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' disappears into the shadows.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You feel sneaky.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' disappears into the shadows.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You no longer feel sneaky.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' emerges from the shadows.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You no longer feel sneaky.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' emerges from the shadows.', actor.UserId());
}
diff --git a/_datafiles/world/default/items/other-0/100-newbie_kit.js b/_datafiles/world/default/items/other-0/100-newbie_kit.js
index 7536cfb2..40d052d1 100644
--- a/_datafiles/world/default/items/other-0/100-newbie_kit.js
+++ b/_datafiles/world/default/items/other-0/100-newbie_kit.js
@@ -17,7 +17,7 @@ function onCommand_use(user, item, room) {
SendUserMessage(user.UserId(), "You break open the "+item.Name()+" and loot the contents.");
- SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" breaks open their "+item.Name()+", looting the contents.", user.UserId())
+ SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" breaks open their "+item.Name()+", looting the contents.", user.UserId());
for ( var i=0; i"+item.Name()+" into the air. Suddenly it bursts into a shower of golden sparks.");
- SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" thrusts their fist containing a "+item.Name()+" into the air. Suddenly it bursts into a shower of golden sparks.", user.UserId())
+ SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" thrusts their fist containing a "+item.Name()+" into the air. Suddenly it bursts into a shower of golden sparks.", user.UserId());
SendUserMessage(user.UserId(), "");
SendUserMessage(user.UserId(), "*******************************************************************************");
diff --git a/_datafiles/world/default/items/other-0/22-training_coupon.js b/_datafiles/world/default/items/other-0/22-training_coupon.js
index 722cc72e..af59c2b5 100644
--- a/_datafiles/world/default/items/other-0/22-training_coupon.js
+++ b/_datafiles/world/default/items/other-0/22-training_coupon.js
@@ -3,7 +3,7 @@ function onCommand_use(user, item, room) {
SendUserMessage(user.UserId(), "You thrust your fist containing the "+item.Name()+" into the air. Suddenly it bursts into a shower of golden sparks.");
- SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" thrusts their fist containing a "+item.Name()+" into the air. Suddenly it bursts into a shower of golden sparks.", user.UserId())
+ SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" thrusts their fist containing a "+item.Name()+" into the air. Suddenly it bursts into a shower of golden sparks.", user.UserId());
SendUserMessage(user.UserId(), "");
SendUserMessage(user.UserId(), "*******************************************************************************");
diff --git a/_datafiles/world/default/items/other-0/26-broom.js b/_datafiles/world/default/items/other-0/26-broom.js
index fc84f222..931b12c9 100644
--- a/_datafiles/world/default/items/other-0/26-broom.js
+++ b/_datafiles/world/default/items/other-0/26-broom.js
@@ -4,7 +4,7 @@ function onCommand_sweep(user, item, room) {
SendUserMessage(user.UserId(), "You sweep the floors thoroughly, until not a single dust bunny can be found.");
SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" sweeps their heart out with "+item.Name(true)+".", user.UserId());
- room.RemoveMutator("dusty-floors")
+ room.RemoveMutator("dusty-floors");
return true;
}
diff --git a/_datafiles/world/default/items/other-0/6-sleeping_bag.js b/_datafiles/world/default/items/other-0/6-sleeping_bag.js
index dfd1bb30..d186631c 100644
--- a/_datafiles/world/default/items/other-0/6-sleeping_bag.js
+++ b/_datafiles/world/default/items/other-0/6-sleeping_bag.js
@@ -2,7 +2,7 @@
function onCommand_use(user, item, room) {
SendUserMessage(user.UserId(), "You unroll the "+item.Name()+" and hop in.");
- SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" unrolls their "+item.Name()+" and crawls inside.", user.UserId())
+ SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" unrolls their "+item.Name()+" and crawls inside.", user.UserId());
user.CancelBuffWithFlag("hidden"); // cancel any hidden buff (most item use should do this if it's noticeable)
diff --git a/_datafiles/world/default/mobs/dark_forest/scripts/43-faerie_folk-clearing.js b/_datafiles/world/default/mobs/dark_forest/scripts/43-faerie_folk-clearing.js
index 2e0ca79b..5a1b7fca 100644
--- a/_datafiles/world/default/mobs/dark_forest/scripts/43-faerie_folk-clearing.js
+++ b/_datafiles/world/default/mobs/dark_forest/scripts/43-faerie_folk-clearing.js
@@ -1,5 +1,5 @@
-const nouns = ["train", "training", "forest", "mushroom", "mushrooms", "animals", "plants"]
+const nouns = ["train", "training", "forest", "mushroom", "mushrooms", "animals", "plants"];
function onAsk(mob, room, eventDetails) {
@@ -11,9 +11,9 @@ function onAsk(mob, room, eventDetails) {
match = UtilFindMatchIn(eventDetails.askText, nouns);
if ( match.found ) {
- mob.Command("emote sighs.")
- mob.Command("say It's so sad, trying to restore the forest to its old self.")
- mob.Command("say My beautiful mushrooms are slowly disappearing.")
+ mob.Command("emote sighs.");
+ mob.Command("say It's so sad, trying to restore the forest to its old self.");
+ mob.Command("say My beautiful mushrooms are slowly disappearing.");
return true;
}
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/2-guard-hungry.js b/_datafiles/world/default/mobs/frostfang/scripts/2-guard-hungry.js
index eec37fad..956e6798 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/2-guard-hungry.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/2-guard-hungry.js
@@ -1,9 +1,9 @@
-const nouns = ["quest", "hunger", "hungry", "belly", "food"]
+const nouns = ["quest", "hunger", "hungry", "belly", "food"];
function onCommand(cmd, rest, mob, room, eventDetails) {
if (cmd == "wave") {
- mob.Command("wave")
+ mob.Command("wave");
}
return false;
}
@@ -19,15 +19,16 @@ function onAsk(mob, room, eventDetails) {
if ( !user.HasQuest("4-start") ) {
- mob.Command("emote rubs his belly.")
- mob.Command("say I forgot my lunch today, and I'm so hungry.")
- mob.Command("say Do you think you could find a cheese sandwich for me?")
+ mob.Command("emote rubs his belly.");
+ mob.Command("say I forgot my lunch today, and I'm so hungry.");
+ mob.Command("say Do you think you could find a cheese sandwich for me?");
+
+ user.GiveQuest("4-start");
- user.GiveQuest("4-start")
} else if ( user.HasQuest("4-end") ) {
mob.Command("sayto @" + String(user.UserId()) + " Thanks, but you've done enough. Too much, really.");
} else {
- mob.Command("emote rubs his belly.")
+ mob.Command("emote rubs his belly.");
}
return true;
@@ -43,13 +44,13 @@ function onGive(mob, room, eventDetails) {
}
if ( eventDetails.gold > 0 ) {
- mob.Command("say I don't need your money... but I'll take it!")
+ mob.Command("say I don't need your money... but I'll take it!");
// Check a random number
if ( Math.random() > 0.5 ) {
- mob.Command("emote flips a coin into the air and catches it!")
+ mob.Command("emote flips a coin into the air and catches it!");
} else {
- mob.Command("emote flips a coin into the air and misses the catch!")
+ mob.Command("emote flips a coin into the air and misses the catch!");
mob.Command("drop 1 gold");
}
return true;
@@ -57,8 +58,8 @@ function onGive(mob, room, eventDetails) {
if (eventDetails.item) {
if (eventDetails.item.ItemId != 30004) {
- mob.Command("look !"+String(eventDetails.item.ItemId))
- mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5))
+ mob.Command("look !"+String(eventDetails.item.ItemId));
+ mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5));
return true;
}
}
@@ -69,9 +70,9 @@ function onGive(mob, room, eventDetails) {
if ( user.HasQuest("4-start") ) {
- user.GiveQuest("4-end")
- mob.Command("say Thanks! I can get on with my day now.")
- mob.Command("eat !"+String(eventDetails.item.ItemId), )
+ user.GiveQuest("4-end");
+ mob.Command("say Thanks! I can get on with my day now.");
+ mob.Command("eat !"+String(eventDetails.item.ItemId) );
return true;
}
@@ -84,7 +85,7 @@ function onIdle(mob, room) {
round = UtilGetRoundNumber();
- grumbled = false
+ grumbled = false;
userIds = room.GetPlayers();
playersTold = mob.GetTempData('playersTold');
@@ -149,7 +150,7 @@ function onIdle(mob, room) {
action = round % 3;
if ( action == 0 ) {
- mob.Command("wander")
+ mob.Command("wander");
return true;
}
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/2-guard.js b/_datafiles/world/default/mobs/frostfang/scripts/2-guard.js
index 3f9a3021..69c51c0d 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/2-guard.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/2-guard.js
@@ -1,5 +1,5 @@
-var PathTargets = [
+const PathTargets = [
[1, 59, 263, 'home'], // town square => east gate => east residential district => home
[781, 35, 1, 'home'], // west residential district => west gate => town square => home
[166, 63, 76, 62, 61, 'home'], // bank => steelwhisper armory => Hacking Hut => Icy Emporium => Inn => home
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-lakeworker.js b/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-lakeworker.js
index 7c63e8c5..05aed801 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-lakeworker.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-lakeworker.js
@@ -22,7 +22,7 @@ const randomEmotes = [
"emote smooths out a scuffed trail marker.",
"emote pauses to listen to the rustling trees.",
"emote adjusts a loose rock on the path.",
-]
+];
function onAsk(mob, room, eventDetails) {
@@ -98,13 +98,13 @@ function onGive(mob, room, eventDetails) {
if (eventDetails.item) {
if (eventDetails.item.ItemId != 10016) {
- mob.Command("look !"+String(eventDetails.item.ItemId))
- mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5))
+ mob.Command("look !"+String(eventDetails.item.ItemId));
+ mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5));
return true;
}
mob.Command("say Thanks, but my days of rowing are over. I'm just a lowly lake worker now.");
- mob.Command("drop !"+String(eventDetails.item.ItemId))
+ mob.Command("drop !"+String(eventDetails.item.ItemId));
return true;
}
@@ -133,7 +133,7 @@ function onIdle(mob, room) {
if ( mob.IsHome() ) {
SAID_STUFF = false; // reset once they get home
mob.Command("pathto " + TRASH_PICKUP_SPOTS.join(" ") + " " + String(CRASH_ROOM_ID));
- return true
+ return true;
}
if ( mob.GetRoomId() == CRASH_ROOM_ID ) {
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-locketsadness.js b/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-locketsadness.js
index 1402233b..fc92bcf5 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-locketsadness.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-locketsadness.js
@@ -1,7 +1,6 @@
-
-const sadnessSubjects = ["quest", "locket", "sad", "sadness", "crying", "sniffles", "necklace"]
-const gardenSubjects = ["garden", "where", "gardening", "quest", "locket", "sad", "sadness", "necklace"]
+const sadnessSubjects = ["quest", "locket", "sad", "sadness", "crying", "sniffles", "necklace"];
+const gardenSubjects = ["garden", "where", "gardening", "quest", "locket", "sad", "sadness", "necklace"];
function onAsk(mob, room, eventDetails) {
@@ -31,7 +30,7 @@ function onAsk(mob, room, eventDetails) {
mob.Command("emote sighs deeply.");
mob.Command("say I lost my locket. I think it was when I was gardening.");
- user.GiveQuest("1-start")
+ user.GiveQuest("1-start");
return true;
}
@@ -67,7 +66,7 @@ function onGive(mob, room, eventDetails) {
if (eventDetails.item.ItemId == 20025) {
- mob.Command("say Thank you so much! I thought I'd never see this again!")
+ mob.Command("say Thank you so much! I thought I'd never see this again!");
if ( !showLocketCounter[eventDetails.sourceId] ) {
showLocketCounter[eventDetails.sourceId] = 0;
@@ -75,18 +74,18 @@ function onGive(mob, room, eventDetails) {
// Give it back to them
if ( showLocketCounter[eventDetails.sourceId] > 2 ) {
- mob.GiveItem(20033) // Spawn the item in the mobs posession
+ mob.GiveItem(20033); // Spawn the item in the mobs posession
mob.Command("give !20033 @" + String(eventDetails.sourceId)); // Give it to the player using shorthand
}
- user.GiveQuest("1-end")
+ user.GiveQuest("1-end");
return true;
}
if ( !user.HasQuest("1-end") ) {
- mob.Command("say Thank you, but nothing could ever replace my locket.")
+ mob.Command("say Thank you, but nothing could ever replace my locket.");
// Give it back to them
mob.Command("give !"+eventDetails.item.ItemId+" @" + String(eventDetails.sourceId));
}
@@ -95,7 +94,7 @@ function onGive(mob, room, eventDetails) {
}
if ( eventDetails.gold > 0 ) {
- mob.Command("say Just what kind of girl do you think I am???")
+ mob.Command("say Just what kind of girl do you think I am???");
return true;
}
@@ -121,17 +120,17 @@ function onShow(mob, room, eventDetails) {
mob.SetTempData('showLocketCounter', showLocketCounter);
if ( showLocketCounter[eventDetails.sourceId] == 1 ) {
- mob.Command("say Wow, that's it! Can I have it back?")
+ mob.Command("say Wow, that's it! Can I have it back?");
return true;
}
if ( showLocketCounter[eventDetails.sourceId] == 2 ) {
- mob.Command("say Please, it's only worth is sentimental value. Can I have it back?")
+ mob.Command("say Please, it's only worth is sentimental value. Can I have it back?");
return true;
}
if ( showLocketCounter[eventDetails.sourceId] > 2 ) {
- mob.Command("say I can trade you for this other locket I have of equal value.")
+ mob.Command("say I can trade you for this other locket I have of equal value.");
return true;
}
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-rattrap.js b/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-rattrap.js
index 479c0367..54e12cbe 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-rattrap.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/26-frostfang_citizen-rattrap.js
@@ -1,11 +1,10 @@
-const trapNouns = ["trap", "rat trap", "rat", "rodric"]
+const trapNouns = ["trap", "rat trap", "rat", "rodric"];
function onAsk(mob, room, eventDetails) {
user = GetUser(eventDetails.sourceId);
-
if ( user.HasQuest("7-gettrap") && !user.HasQuest("7-tradetrap") ) {
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/38-player_guide.js b/_datafiles/world/default/mobs/frostfang/scripts/38-player_guide.js
index 3a6067a7..f41acc8c 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/38-player_guide.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/38-player_guide.js
@@ -2,15 +2,15 @@
// Invoked once every round if mob is idle
function onIdle(mob, room) {
- roundNow = UtilGetRoundNumber();
+ var roundNow = UtilGetRoundNumber();
- charmedUserId = mob.GetCharmedUserId();
+ var charmedUserId = mob.GetCharmedUserId();
if ( charmedUserId == 0 ) {
return false;
}
- charmer = GetUser(charmedUserId);
+ var charmer = GetUser(charmedUserId);
// If charmer isn't in world, skip
if ( charmer == null ) {
@@ -20,7 +20,7 @@ function onIdle(mob, room) {
// If they aren't in the same room for some reason, skip
if ( charmer.GetRoomId() != mob.GetRoomId() ) {
- lostRoundCt = mob.GetTempData(`roundsLost`);
+ var lostRoundCt = mob.GetTempData("roundsLost");
if (lostRoundCt == null ) lostRoundCt = 0;
lostRoundCt++;
@@ -29,12 +29,12 @@ function onIdle(mob, room) {
mob.SetTempData('roundsLost', 0);
- targetRoom = GetRoom(charmer.GetRoomId() );
+ var targetRoom = GetRoom(charmer.GetRoomId() );
if ( targetRoom != null ) {
mob.MoveRoom( charmer.GetRoomId() );
- room.SendText(`A large ` + UtilApplyColorPattern('swirling portal', 'pink') + ` appears, and ` + mob.GetCharacterName(true) + ` steps into it, right before it disappears.`);
- targetRoom.SendText(`A large ` + UtilApplyColorPattern('swirling portal', 'pink') + ` appears, and ` + mob.GetCharacterName(true) + ` steps out of it, right before it disappears.`);
- mob.Command(`saytoonly @` + charmer.UserId() + ` I almost lost you ` + charmer.GetCharacterName(true) + `!`);
+ room.SendText("A large " + UtilApplyColorPattern('swirling portal', 'pink') + " appears, and " + mob.GetCharacterName(true) + " steps into it, right before it disappears.");
+ targetRoom.SendText("A large " + UtilApplyColorPattern('swirling portal', 'pink') + " appears, and " + mob.GetCharacterName(true) + " steps out of it, right before it disappears.");
+ mob.Command("saytoonly @" + charmer.UserId() + " I almost lost you " + charmer.GetCharacterName(true) + "!");
}
return true;
@@ -46,7 +46,7 @@ function onIdle(mob, room) {
}
- lastTipRound = mob.GetTempData(`lastTipRound`);
+ var lastTipRound = mob.GetTempData("lastTipRound");
if ( lastTipRound == null ) {
lastTipRound = 0;
}
@@ -56,7 +56,7 @@ function onIdle(mob, room) {
}
lastUserInput = charmer.GetLastInputRound();
- roundsSinceInput = roundNow - lastUserInput;
+ var roundsSinceInput = roundNow - lastUserInput;
// Only give a tip if the user has been inactive for 5 rounds
if ( roundsSinceInput < 3 ) {
@@ -73,44 +73,45 @@ function onIdle(mob, room) {
switch( UtilDiceRoll(1, 12) ) {
case 1:
if ( charmer.GetStatPoints() > 0 ) {
- mob.Command(`saytoonly @` + charmer.UserId() + ` It looks like you've got some stat points to spend. Type status train to upgrade your stats!`);
+ mob.Command("saytoonly @" + charmer.UserId() + " It looks like you've got some stat points to spend. Type status train to upgrade your stats!");
}
break;
case 2:
- if ( !charmer.HasQuest(`4-start`) ) {
- mob.Command(`saytoonly @` + charmer.UserId() + ` There's a guard in the barracks that constantly complains about being hungry. You should ask him about it.`);
+ if ( !charmer.HasQuest("4-start") ) {
+ mob.Command("saytoonly @" + charmer.UserId() + " There's a guard in the barracks that constantly complains about being hungry. You should ask him about it.");
}
break;
case 3:
- if ( !charmer.HasQuest(`2-start`) ) {
- mob.Command(`saytoonly @` + charmer.UserId() + ` I have heard the king worries. If we can find an audience with him we can try to ask him about a quest. He is north of town square.`);
+ if ( !charmer.HasQuest("2-start") ) {
+ mob.Command("saytoonly @" + charmer.UserId() + " I have heard the king worries. If we can find an audience with him we can try to ask him about a quest. He is north of town square.");
}
break;
case 4:
- mob.Command(`saytoonly @` + charmer.UserId() + ` You can find help on many subjects by typing help.`);
+ mob.Command("saytoonly @" + charmer.UserId() + " You can find help on many subjects by typing help.");
break;
case 5:
- mob.Command(`saytoonly @` + charmer.UserId() + ` I can create a portal to take us back to Town Square any time. Just ask me about it.`);
+ mob.Command("saytoonly @" + charmer.UserId() + " I can create a portal to take us back to Town Square any time. Just ask me about it.");
break;
case 6:
- mob.Command(`saytoonly @` + charmer.UserId() + ` If you have friends to play with, you can party up! help party to learn more.`);
+ mob.Command("saytoonly @" + charmer.UserId() + " If you have friends to play with, you can party up! help party to learn more.");
break;
case 7:
- mob.Command(`saytoonly @` + charmer.UserId() + ` You can send a message to everyone using the broadcast command.`);
- break
+ mob.Command("saytoonly @" + charmer.UserId() + " You can send a message to everyone using the broadcast command.");
+ break;
case 8:
if ( charmer.GetLevel() < 2 ) {
- mob.Command(`saytoonly @` + charmer.UserId() + ` There are some rats to bash around the The Sanctuary of the Benevolent Heart south of Town Square. Just don't go TOO far south, it get dangerous!`);
+ mob.Command("saytoonly @" + charmer.UserId() + " There are some rats to bash around the The Sanctuary of the Benevolent Heart south of Town Square. Just don't go TOO far south, it get dangerous!");
break;
}
+ break;
case 9:
if ( charmer.GetLevel() < 2 ) {
- mob.Command(`saytoonly @` + charmer.UserId() + ` Type status to learn about yourself!`);
+ mob.Command("saytoonly @" + charmer.UserId() + " Type status to learn about yourself!");
}
break;
case 10:
if ( charmer.GetLevel() < 2 ) {
- mob.Command(`saytoonly @` + charmer.UserId() + ` Killing stuff is a great way to get stronger, but don't pick a fight with the locals!`);
+ mob.Command("saytoonly @" + charmer.UserId() + " Killing stuff is a great way to get stronger, but don't pick a fight with the locals!");
}
break;
default:
@@ -118,23 +119,23 @@ function onIdle(mob, room) {
}
// Prevent from triggering too often
- mob.SetTempData(`lastTipRound`, roundNow);
+ mob.SetTempData("lastTipRound", roundNow);
return true;
}
// Things to ask to get a portal created
-const homeNouns = ["home", "portal", "return", "townsquare", "town square"];
+var homeNouns = ["home", "portal", "return", "townsquare", "town square"];
// Things to ask to shut up the guide
-const silenceNouns = ["silence", "quiet", "shut up", "shh"];
+var silenceNouns = ["silence", "quiet", "shut up", "shh"];
-const leaveNouns = ["leave", "leave me alone", "die", "quit", "go away", "unfollow", "get lost"];
+var leaveNouns = ["leave", "leave me alone", "die", "quit", "go away", "unfollow", "get lost"];
function onAsk(mob, room, eventDetails) {
- charmedUserId = mob.GetCharmedUserId();
+ var charmedUserId = mob.GetCharmedUserId();
if ( eventDetails.sourceId != charmedUserId ) {
return false;
@@ -148,14 +149,14 @@ function onAsk(mob, room, eventDetails) {
if ( match.found ) {
if ( user.GetRoomId() == 1 ) {
- mob.Command(`saytoonly @`+String(eventDetails.sourceId)+` we're already at Town Square. Look around!`);
+ mob.Command("saytoonly @"+String(eventDetails.sourceId)+" we're already at Town Square. Look around!");
return true;
}
- mob.Command(`saytoonly @`+String(eventDetails.sourceId)+` back to Town Square? Sure thing, lets go!`);
- mob.Command(`emote whispers a soft incantation and summons a ` + UtilApplyColorPattern(`glowing portal`, `cyan`) + `.`);
+ mob.Command("saytoonly @"+String(eventDetails.sourceId)+" back to Town Square? Sure thing, lets go!");
+ mob.Command("emote whispers a soft incantation and summons a " + UtilApplyColorPattern("glowing portal", "cyan") + ".");
- room.AddTemporaryExit(`glowing portal`, `:cyan`, 0, 3); // roomId zero is start room alias
+ room.AddTemporaryExit("glowing portal", ":cyan", 0, 3); // roomId zero is start room alias
return true;
}
@@ -163,9 +164,9 @@ function onAsk(mob, room, eventDetails) {
match = UtilFindMatchIn(eventDetails.askText, silenceNouns);
if ( match.found ) {
- mob.Command(`saytoonly @`+String(eventDetails.sourceId)+` I'll try and be quieter.`);
+ mob.Command("saytoonly @"+String(eventDetails.sourceId)+" I'll try and be quieter.");
- mob.SetTempData(`lastTipRound`, -1);
+ mob.SetTempData("lastTipRound", -1);
return true;
}
@@ -174,9 +175,9 @@ function onAsk(mob, room, eventDetails) {
match = UtilFindMatchIn(eventDetails.askText, leaveNouns);
if ( match.found ) {
- mob.Command(`saytoonly @`+String(eventDetails.sourceId)+` I'll be on my way then.`);
- mob.Command(`emote bows and bids you farewell, disappearing into the scenery`);
- mob.Command(`despawn charmed mob expired`)
+ mob.Command("saytoonly @"+String(eventDetails.sourceId)+" I'll be on my way then.");
+ mob.Command("emote bows and bids you farewell, disappearing into the scenery");
+ mob.Command("despawn charmed mob expired");
return true;
}
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/39-elara.js b/_datafiles/world/default/mobs/frostfang/scripts/39-elara.js
index 8c6149d0..c7537891 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/39-elara.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/39-elara.js
@@ -1,6 +1,5 @@
-const nouns = ["quest", "book", "books", "library", "spell", "spells", "worried", "worry"]
-
+const nouns = ["quest", "book", "books", "library", "spell", "spells", "worried", "worry"];
function onAsk(mob, room, eventDetails) {
@@ -16,11 +15,11 @@ function onAsk(mob, room, eventDetails) {
match = UtilFindMatchIn(eventDetails.askText, nouns);
if ( match.found ) {
- mob.Command("emote thinks for a moment.")
- mob.Command("say I took a book called The History of Frostfang out with me weeks ago and can't remember where I left it.")
- mob.Command("say If you can find it for me, I'll teach you a useful spell.")
+ mob.Command("emote thinks for a moment.");
+ mob.Command("say I took a book called The History of Frostfang out with me weeks ago and can't remember where I left it.");
+ mob.Command("say If you can find it for me, I'll teach you a useful spell.");
- user.GiveQuest("6-start")
+ user.GiveQuest("6-start");
return true;
}
@@ -39,14 +38,14 @@ function onGive(mob, room, eventDetails) {
}
if ( eventDetails.gold > 0 ) {
- mob.Command("say I'll use this money to buy more books!")
+ mob.Command("say I'll use this money to buy more books!");
return true;
}
if (eventDetails.item) {
if (eventDetails.item.ItemId != 10) {
- mob.Command("look !"+String(eventDetails.item.ItemId))
- mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5))
+ mob.Command("look !"+String(eventDetails.item.ItemId));
+ mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5));
return true;
}
}
@@ -56,26 +55,25 @@ function onGive(mob, room, eventDetails) {
}
if ( user.HasQuest("6-end") ) {
- mob.Command("say Please don't borrow books from the library without permission!")
+ mob.Command("say Please don't borrow books from the library without permission!");
return true;
}
if ( user.HasQuest("6-start") ) {
- user.GiveQuest("6-end")
+ user.GiveQuest("6-end");
- mob.Command("say Thank you! It is such an interesting history. For example, Frostfang used to be called DragonsFang!")
- mob.Command("say I'll teach you the Illuminate spell. It's useful in dark places.")
- mob.Command("emote Shows you some useful gestures.")
- mob.Command("say Check your spellbook.")
+ mob.Command("say Thank you! It is such an interesting history. For example, Frostfang used to be called DragonsFang!");
+ mob.Command("say I'll teach you the Illuminate spell. It's useful in dark places.");
+ mob.Command("emote Shows you some useful gestures.");
+ mob.Command("say Check your spellbook.");
partyMembers = user.GetPartyMembers();
for( i = 0; i < partyMembers.length; i++ ) {
a = partyMembers[i];
- a.LearnSpell("illum")
+ a.LearnSpell("illum");
}
-
return true;
}
@@ -95,7 +93,7 @@ function onIdle(mob, room) {
action = round % 6;
if ( action == 0 ) {
- mob.Command("say now where did I leave that book?")
+ mob.Command("say now where did I leave that book?");
return true;
}
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/4-clergyman-sanctuary.js b/_datafiles/world/default/mobs/frostfang/scripts/4-clergyman-sanctuary.js
index f8f6793e..e7eb94a8 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/4-clergyman-sanctuary.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/4-clergyman-sanctuary.js
@@ -1,5 +1,5 @@
-const asksubjects = ["quest", "bishop", "arch-bishop", "king"]
+const asksubjects = ["quest", "bishop", "arch-bishop", "king"];
function onAsk(mob, room, eventDetails) {
@@ -12,10 +12,10 @@ function onAsk(mob, room, eventDetails) {
return false;
}
- mob.Command("say I often see some priests snooping around in the alley behind the Sanctuary.")
- mob.Command("say I used to think they were just taking care of the rat problem, but now I'm not so sure.")
+ mob.Command("say I often see some priests snooping around in the alley behind the Sanctuary.");
+ mob.Command("say I used to think they were just taking care of the rat problem, but now I'm not so sure.");
- user.GiveQuest("2-catacombs")
+ user.GiveQuest("2-catacombs");
return true;
}
@@ -37,28 +37,28 @@ function onGive(mob, room, eventDetails) {
user.SetMiscCharacterData("donation-tally-sanctuary", totalDonated);
- mob.Command("say Thank you for your donation.")
- mob.Command("emote nods softly.")
+ mob.Command("say Thank you for your donation.");
+ mob.Command("emote nods softly.");
- mob.Command("say You have donated a total of "+String(totalDonated)+" gold!")
+ mob.Command("say You have donated a total of "+String(totalDonated)+" gold!");
if ( totalDonated >= 200 ) {
// Give the spell "heal"
if ( user.LearnSpell("heal") ) {
- mob.Command("say Thank you for supporting the Sanctuary of the Benevolent Heart!")
- mob.Command("say I'll teach you the Heal spell. It can cure the gravest of wounds.")
- mob.Command("emote Shows you some useful gestures.")
- mob.Command("say Check your spellbook.")
+ mob.Command("say Thank you for supporting the Sanctuary of the Benevolent Heart!");
+ mob.Command("say I'll teach you the Heal spell. It can cure the gravest of wounds.");
+ mob.Command("emote Shows you some useful gestures.");
+ mob.Command("say Check your spellbook.");
}
}
if ( totalDonated >= 1000 ) {
// Give the spell "healall"
if ( user.LearnSpell("healall") ) {
- mob.Command("say Thank you for your extreme support of the Sanctuary of the Benevolent Heart!")
- mob.Command("say I'll teach you the Heal All spell. It can affect your whole party!")
- mob.Command("emote Shows you some useful gestures.")
- mob.Command("say Check your spellbook.")
+ mob.Command("say Thank you for your extreme support of the Sanctuary of the Benevolent Heart!");
+ mob.Command("say I'll teach you the Heal All spell. It can affect your whole party!");
+ mob.Command("emote Shows you some useful gestures.");
+ mob.Command("say Check your spellbook.");
}
}
@@ -76,9 +76,9 @@ function onIdle(mob, room) {
return false;
}
- mob.Command("say Have you taken the time to help the poor today?")
+ mob.Command("say Have you taken the time to help the poor today?");
- mob.Command(`say To make a donation, simply give the gold to me.`)
+ mob.Command("say To make a donation, simply give the gold to me.");
return true;
}
\ No newline at end of file
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/40-rodric.js b/_datafiles/world/default/mobs/frostfang/scripts/40-rodric.js
index d13d60cd..5eebebc0 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/40-rodric.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/40-rodric.js
@@ -46,14 +46,14 @@ function onAsk(mob, room, eventDetails) {
tMatch = UtilFindMatchIn(eventDetails.askText, thievesNouns);
if ( tMatch.found ) {
- askTimes = mob.GetTempData(`ask-`+String(user.UserId()));
+ askTimes = mob.GetTempData("ask-"+String(user.UserId()));
if ( askTimes == null ) {
askTimes = 0;
}
askTimes++;
- mob.SetTempData(`ask-`+String(user.UserId()), askTimes);
+ mob.SetTempData("ask-"+String(user.UserId()), askTimes);
if ( askTimes == 1 ) {
mob.Command("say I really shouldn't talk about the thieves guild. They like it secret for a reason, and it could mean my neck!");
@@ -92,8 +92,8 @@ function onGive(mob, room, eventDetails) {
if (eventDetails.item) {
if (eventDetails.item.ItemId != 11) {
- mob.Command("look !"+String(eventDetails.item.ItemId))
- mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5))
+ mob.Command("look !"+String(eventDetails.item.ItemId));
+ mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5));
return true;
}
@@ -120,7 +120,7 @@ function onPath(mob, room, eventDetails) {
}
-const RANDOM_IDLE = [
+var RANDOM_IDLE = [
"emote shakes his head in disbelief.",
"emote attempts to fix a rat trap.",
"say There's just too many rats. We'll never get rid of them all.",
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/8-king.js b/_datafiles/world/default/mobs/frostfang/scripts/8-king.js
index c64c46a7..9868edd1 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/8-king.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/8-king.js
@@ -1,6 +1,6 @@
-const startQuestSubjects = ["quest", "bishop", "arch", "arch-bishop", "archbishop", "trust"]
-const lichSubjects = ["lich", "old king", "evil king", "tomb", "sarcophagus"]
+const startQuestSubjects = ["quest", "bishop", "arch", "arch-bishop", "archbishop", "trust"];
+const lichSubjects = ["lich", "old king", "evil king", "tomb", "sarcophagus"];
function onAsk(mob, room, eventDetails) {
@@ -20,7 +20,7 @@ function onAsk(mob, room, eventDetails) {
mob.Command("say My spies haven't been able to discover anything suspicious about their behavior, which is the first clue something is up.");
mob.Command("say Maybe you could snoop around there a bit and see if you can discover anything. They are just to the south of Town Square.");
- user.GiveQuest("2-start")
+ user.GiveQuest("2-start");
return true;
}
@@ -45,17 +45,17 @@ function onGive(mob, room, eventDetails) {
if (eventDetails.item.ItemId == 20018) {
- mob.Command("say Thank you for taking care of that problem. The kingdom is indebted to you.")
- mob.Command("say I will add this artifact to the treasury. Here is some gold to compensate you.")
+ mob.Command("say Thank you for taking care of that problem. The kingdom is indebted to you.");
+ mob.Command("say I will add this artifact to the treasury. Here is some gold to compensate you.");
mob.AddGold(1250);
mob.Command("give 1250 gold @" + String(eventDetails.sourceId));
- user.GiveQuest("2-end")
+ user.GiveQuest("2-end");
return true;
} else {
- mob.Command("say I have no need for that.")
+ mob.Command("say I have no need for that.");
// Give it back to them
mob.Command("give !"+String(eventDetails.item.ItemId) + " @" + String(eventDetails.sourceId));
}
@@ -72,14 +72,14 @@ function onShow(mob, room, eventDetails) {
if (eventDetails.item.ItemId == 20018) {
- mob.Command("say Thank you for taking care of that problem. The kingdom is indebted to you.")
+ mob.Command("say Thank you for taking care of that problem. The kingdom is indebted to you.");
- user.GiveQuest("2-end")
+ user.GiveQuest("2-end");
return true;
} else {
- mob.Command("nods patronizingly.")
+ mob.Command("nods patronizingly.");
}
return false;
diff --git a/_datafiles/world/default/mobs/frostfang/scripts/9-kings_guard.js b/_datafiles/world/default/mobs/frostfang/scripts/9-kings_guard.js
index b1040670..bbdac5ff 100644
--- a/_datafiles/world/default/mobs/frostfang/scripts/9-kings_guard.js
+++ b/_datafiles/world/default/mobs/frostfang/scripts/9-kings_guard.js
@@ -1,28 +1,26 @@
-
-
function onIdle(mob, room) {
var random = Math.floor(Math.random() * 10);
switch (random) {
- case 0:
- action = Math.floor(Math.random() * 3);
- if ( action == 0 ) {
- mob.Command("emote flexes his muscles.");
- } else if ( action == 0 ) {
- mob.Command("emote looks at you suspiciously.");
- } else {
- mob.Command("emote examines his sword carefully.");
- }
- return true;
- case 1:
- case 2:
- case 3:
- case 4:
- return true; // does nothing.
- default:
- break;
+ case 0:
+ var action = Math.floor(Math.random() * 3);
+ if (action === 0) {
+ mob.Command("emote flexes his muscles.");
+ } else if ( action === 0 ) {
+ mob.Command("emote looks at you suspiciously.");
+ } else {
+ mob.Command("emote examines his sword carefully.");
+ }
+ return true;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ return true; // does nothing.
+ default:
+ break;
}
return false;
diff --git a/_datafiles/world/default/mobs/frostfang_slums/scripts/30-shadow_master.js b/_datafiles/world/default/mobs/frostfang_slums/scripts/30-shadow_master.js
index c420b45b..a8505f33 100644
--- a/_datafiles/world/default/mobs/frostfang_slums/scripts/30-shadow_master.js
+++ b/_datafiles/world/default/mobs/frostfang_slums/scripts/30-shadow_master.js
@@ -38,14 +38,14 @@ function onGive(mob, room, eventDetails) {
}
if ( eventDetails.gold > 0 ) {
- mob.Command("say I'll use this money to buy more books!")
+ mob.Command("say I'll use this money to buy more books!");
return true;
}
if (eventDetails.item) {
if (eventDetails.item.ItemId != 5) {
- mob.Command("look !"+String(eventDetails.item.ItemId))
- mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5))
+ mob.Command("look !"+String(eventDetails.item.ItemId));
+ mob.Command("drop !"+String(eventDetails.item.ItemId), UtilGetSecondsToTurns(5));
return true;
}
}
@@ -55,12 +55,12 @@ function onGive(mob, room, eventDetails) {
}
- mob.Command("say Well done! A deal's a deal!")
- mob.Command("say I'll teach you the Charm Rat spell.")
- mob.Command("emote Shows you some useful gestures.")
- mob.Command("say Check your spellbook.")
+ mob.Command("say Well done! A deal's a deal!");
+ mob.Command("say I'll teach you the Charm Rat spell.");
+ mob.Command("emote Shows you some useful gestures.");
+ mob.Command("say Check your spellbook.");
- user.LearnSpell("charmrat")
+ user.LearnSpell("charmrat");
return true;
}
diff --git a/_datafiles/world/default/mobs/tutorial/scripts/58-training_dummy.js b/_datafiles/world/default/mobs/tutorial/scripts/58-training_dummy.js
index 1fc1b599..92a1cc8b 100644
--- a/_datafiles/world/default/mobs/tutorial/scripts/58-training_dummy.js
+++ b/_datafiles/world/default/mobs/tutorial/scripts/58-training_dummy.js
@@ -15,8 +15,8 @@ function getTeacher(room) {
var mobActor = null;
mobIds = room.GetMobs();
-
- for ( i in mobIds ) {
+
+ for (var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
diff --git a/_datafiles/world/default/mobs/whispering_wastes/scripts/27-hermit-winterfire.js b/_datafiles/world/default/mobs/whispering_wastes/scripts/27-hermit-winterfire.js
index df186d9c..c9724631 100644
--- a/_datafiles/world/default/mobs/whispering_wastes/scripts/27-hermit-winterfire.js
+++ b/_datafiles/world/default/mobs/whispering_wastes/scripts/27-hermit-winterfire.js
@@ -1,6 +1,6 @@
-const nouns = ["quest", "freezing", "cold", "help"]
-const crystal_nouns = ["crystals", "winterfire", "where"]
+const nouns = ["quest", "freezing", "cold", "help"];
+const crystal_nouns = ["crystals", "winterfire", "where"];
function onAsk(mob, room, eventDetails) {
@@ -11,10 +11,10 @@ function onAsk(mob, room, eventDetails) {
match = UtilFindMatchIn(eventDetails.askText, nouns);
if ( match.found ) {
- mob.Command("say I've been waiting for a shipment of winterfire crystals. They should have been here months ago.")
- mob.Command("say I'll never abandon my post! Can you find out what happened to my crystals?")
+ mob.Command("say I've been waiting for a shipment of winterfire crystals. They should have been here months ago.");
+ mob.Command("say I'll never abandon my post! Can you find out what happened to my crystals?");
- user.GiveQuest("5-start")
+ user.GiveQuest("5-start");
return true;
}
@@ -22,8 +22,8 @@ function onAsk(mob, room, eventDetails) {
match = UtilFindMatchIn(eventDetails.askText, crystal_nouns);
if ( match.found ) {
- mob.Command("say The shipment was supposed to come from the far east city of Mystarion. I'm not sure what happened to it.")
- user.GiveQuest("5-lookeast")
+ mob.Command("say The shipment was supposed to come from the far east city of Mystarion. I'm not sure what happened to it.");
+ user.GiveQuest("5-lookeast");
return true;
}
@@ -42,14 +42,14 @@ function onGive(mob, room, eventDetails) {
}
if ( eventDetails.gold > 0 ) {
- mob.Command("say Moneys no good here, but every now and then I can pay for a little help.")
+ mob.Command("say Moneys no good here, but every now and then I can pay for a little help.");
return true;
}
if (eventDetails.item) {
if (eventDetails.item.ItemId != 4) {
- mob.Command("say Finally! My winterfire crystal! Thank you so much!")
- user.GiveQuest("4-end")
+ mob.Command("say Finally! My winterfire crystal! Thank you so much!");
+ user.GiveQuest("4-end");
return true;
}
}
diff --git a/_datafiles/world/default/rooms/frost_lake/363.js b/_datafiles/world/default/rooms/frost_lake/363.js
index 4ff03a69..469a0f66 100644
--- a/_datafiles/world/default/rooms/frost_lake/363.js
+++ b/_datafiles/world/default/rooms/frost_lake/363.js
@@ -1,5 +1,5 @@
-mapSignData = ""
+mapSignData = "";
// Generic Command Handler
function onCommand(cmd, rest, user, room) {
diff --git a/_datafiles/world/default/rooms/frostfang/1.js b/_datafiles/world/default/rooms/frostfang/1.js
index 9f33d7e6..3690ae4b 100644
--- a/_datafiles/world/default/rooms/frostfang/1.js
+++ b/_datafiles/world/default/rooms/frostfang/1.js
@@ -1,5 +1,5 @@
-mapSignData = ""
+mapSignData = "";
// Generic Command Handler
function onCommand(cmd, rest, user, room) {
@@ -15,7 +15,7 @@ function onCommand(cmd, rest, user, room) {
// Load the cached map, or re-generate and cache it if it's not there
if ( mapSignData == "" ) {
- mapSignData = GetMap(room.RoomId(), 1, 22, 38, "Map of Frostfang", false, String(room.RoomId())+",×,Here")
+ mapSignData = GetMap(room.RoomId(), 1, 22, 38, "Map of Frostfang", false, String(room.RoomId())+",×,Here");
}
// Send the map to the user.
@@ -30,5 +30,5 @@ function onCommand(cmd, rest, user, room) {
// Executes when the room first loads.
function onLoad(room) {
// Just running this to pre-cache the map so that if someone looks at the map it won't time out
- mapSignData = GetMap(room.RoomId(), 1, 22, 38, "Map of Frostfang", false, String(room.RoomId())+",×,Here")
+ mapSignData = GetMap(room.RoomId(), 1, 22, 38, "Map of Frostfang", false, String(room.RoomId())+",×,Here");
}
diff --git a/_datafiles/world/default/rooms/frostfang/26.js b/_datafiles/world/default/rooms/frostfang/26.js
index 321b658a..19f591df 100644
--- a/_datafiles/world/default/rooms/frostfang/26.js
+++ b/_datafiles/world/default/rooms/frostfang/26.js
@@ -17,8 +17,8 @@ function onCommand(cmd, rest, user, room) {
SendUserMessage(user.UserId(), "You press the eyes of the raven, and follow a secret entrance to the west!");
SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" presses in the eyes of the raven, and falls through into a room to the west!", user.UserId());
- user.GiveQuest("2-investigate")
- user.MoveRoom(31)
+ user.GiveQuest("2-investigate");
+ user.MoveRoom(31);
return true;
}
diff --git a/_datafiles/world/default/rooms/frostfang/305.js b/_datafiles/world/default/rooms/frostfang/305.js
index 2b2d5e70..4684a409 100644
--- a/_datafiles/world/default/rooms/frostfang/305.js
+++ b/_datafiles/world/default/rooms/frostfang/305.js
@@ -54,7 +54,7 @@ function onCommand(cmd, rest, user, room) {
user.GiveItem(4);
- crateAvailableRound = roundNow + UtilGetMinutesToRounds(15)
+ crateAvailableRound = roundNow + UtilGetMinutesToRounds(15);
return true;
}
diff --git a/_datafiles/world/default/rooms/frostfang/35.js b/_datafiles/world/default/rooms/frostfang/35.js
index cca77bb4..10ca4bb4 100644
--- a/_datafiles/world/default/rooms/frostfang/35.js
+++ b/_datafiles/world/default/rooms/frostfang/35.js
@@ -11,9 +11,9 @@ function onCommand_west(rest, user, room) {
SendUserMessage(user.UserId(), ' ');
// Queue it with an input blocking flag and ignore further scripts flag
- user.CommandFlagged('west', EventFlags.CmdSkipScripts|EventFlags.CmdBlockInputUntilComplete, 1)
+ user.CommandFlagged('west', EventFlags.CmdSkipScripts|EventFlags.CmdBlockInputUntilComplete, 1);
// return true (handled) to prevent further execution
- return true
+ return true;
}
@@ -25,10 +25,10 @@ function onCommand_west(rest, user, room) {
user.GiveBuff(3, "enchantment");
// Queue it with an input blocking flag and ignore further scripts flag
- user.CommandFlagged('west', EventFlags.CmdSkipScripts|EventFlags.CmdBlockInputUntilComplete, 1)
+ user.CommandFlagged('west', EventFlags.CmdSkipScripts|EventFlags.CmdBlockInputUntilComplete, 1);
// return true (handled) to prevent further execution
- return true
+ return true;
}
diff --git a/_datafiles/world/default/rooms/frostfang/432.js b/_datafiles/world/default/rooms/frostfang/432.js
index 59cda530..907bb8e3 100644
--- a/_datafiles/world/default/rooms/frostfang/432.js
+++ b/_datafiles/world/default/rooms/frostfang/432.js
@@ -41,7 +41,7 @@ function onCommand(cmd, rest, user, room) {
return false;
}
- crowbarAvailableRound = roundNow + UtilGetMinutesToRounds(15)
+ crowbarAvailableRound = roundNow + UtilGetMinutesToRounds(15);
SendUserMessage(user.UserId(), "You take the crowbar. They probably won't miss it.");
SendRoomMessage(room.RoomId(), user.GetCharacterName(true)+" takes the crowbar from beside the fireplace.", user.UserId());
diff --git a/_datafiles/world/default/rooms/tutorial/900.js b/_datafiles/world/default/rooms/tutorial/900.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/default/rooms/tutorial/900.js
+++ b/_datafiles/world/default/rooms/tutorial/900.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/901.js b/_datafiles/world/default/rooms/tutorial/901.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/default/rooms/tutorial/901.js
+++ b/_datafiles/world/default/rooms/tutorial/901.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/902.js b/_datafiles/world/default/rooms/tutorial/902.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/default/rooms/tutorial/902.js
+++ b/_datafiles/world/default/rooms/tutorial/902.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/903.js b/_datafiles/world/default/rooms/tutorial/903.js
index 9b7b1fd2..05728084 100644
--- a/_datafiles/world/default/rooms/tutorial/903.js
+++ b/_datafiles/world/default/rooms/tutorial/903.js
@@ -46,8 +46,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
-
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +59,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +92,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +121,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +140,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +158,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +174,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/910.js b/_datafiles/world/default/rooms/tutorial/910.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/default/rooms/tutorial/910.js
+++ b/_datafiles/world/default/rooms/tutorial/910.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/911.js b/_datafiles/world/default/rooms/tutorial/911.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/default/rooms/tutorial/911.js
+++ b/_datafiles/world/default/rooms/tutorial/911.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/912.js b/_datafiles/world/default/rooms/tutorial/912.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/default/rooms/tutorial/912.js
+++ b/_datafiles/world/default/rooms/tutorial/912.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/913.js b/_datafiles/world/default/rooms/tutorial/913.js
index 9b7b1fd2..05728084 100644
--- a/_datafiles/world/default/rooms/tutorial/913.js
+++ b/_datafiles/world/default/rooms/tutorial/913.js
@@ -46,8 +46,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
-
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +59,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +92,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +121,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +140,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +158,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +174,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/920.js b/_datafiles/world/default/rooms/tutorial/920.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/default/rooms/tutorial/920.js
+++ b/_datafiles/world/default/rooms/tutorial/920.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/921.js b/_datafiles/world/default/rooms/tutorial/921.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/default/rooms/tutorial/921.js
+++ b/_datafiles/world/default/rooms/tutorial/921.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/922.js b/_datafiles/world/default/rooms/tutorial/922.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/default/rooms/tutorial/922.js
+++ b/_datafiles/world/default/rooms/tutorial/922.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/923.js b/_datafiles/world/default/rooms/tutorial/923.js
index 9b7b1fd2..a674cbed 100644
--- a/_datafiles/world/default/rooms/tutorial/923.js
+++ b/_datafiles/world/default/rooms/tutorial/923.js
@@ -47,7 +47,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +60,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +93,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +122,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +141,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +159,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +175,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/930.js b/_datafiles/world/default/rooms/tutorial/930.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/default/rooms/tutorial/930.js
+++ b/_datafiles/world/default/rooms/tutorial/930.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/931.js b/_datafiles/world/default/rooms/tutorial/931.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/default/rooms/tutorial/931.js
+++ b/_datafiles/world/default/rooms/tutorial/931.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/932.js b/_datafiles/world/default/rooms/tutorial/932.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/default/rooms/tutorial/932.js
+++ b/_datafiles/world/default/rooms/tutorial/932.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/933.js b/_datafiles/world/default/rooms/tutorial/933.js
index 9b7b1fd2..a674cbed 100644
--- a/_datafiles/world/default/rooms/tutorial/933.js
+++ b/_datafiles/world/default/rooms/tutorial/933.js
@@ -47,7 +47,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +60,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +93,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +122,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +141,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +159,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +175,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/940.js b/_datafiles/world/default/rooms/tutorial/940.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/default/rooms/tutorial/940.js
+++ b/_datafiles/world/default/rooms/tutorial/940.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/941.js b/_datafiles/world/default/rooms/tutorial/941.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/default/rooms/tutorial/941.js
+++ b/_datafiles/world/default/rooms/tutorial/941.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/942.js b/_datafiles/world/default/rooms/tutorial/942.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/default/rooms/tutorial/942.js
+++ b/_datafiles/world/default/rooms/tutorial/942.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/943.js b/_datafiles/world/default/rooms/tutorial/943.js
index 9b7b1fd2..05728084 100644
--- a/_datafiles/world/default/rooms/tutorial/943.js
+++ b/_datafiles/world/default/rooms/tutorial/943.js
@@ -46,8 +46,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
-
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +59,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +92,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +121,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +140,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +158,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +174,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/990.js b/_datafiles/world/default/rooms/tutorial/990.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/default/rooms/tutorial/990.js
+++ b/_datafiles/world/default/rooms/tutorial/990.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/991.js b/_datafiles/world/default/rooms/tutorial/991.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/default/rooms/tutorial/991.js
+++ b/_datafiles/world/default/rooms/tutorial/991.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/992.js b/_datafiles/world/default/rooms/tutorial/992.js
index 21da308b..ee24ac62 100644
--- a/_datafiles/world/default/rooms/tutorial/992.js
+++ b/_datafiles/world/default/rooms/tutorial/992.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/default/rooms/tutorial/993.js b/_datafiles/world/default/rooms/tutorial/993.js
index 9b7b1fd2..a674cbed 100644
--- a/_datafiles/world/default/rooms/tutorial/993.js
+++ b/_datafiles/world/default/rooms/tutorial/993.js
@@ -47,7 +47,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +60,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +93,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +122,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +141,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +159,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +175,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/default/spells/aidskill.js b/_datafiles/world/default/spells/aidskill.js
index 3855f801..be4ad375 100644
--- a/_datafiles/world/default/spells/aidskill.js
+++ b/_datafiles/world/default/spells/aidskill.js
@@ -25,7 +25,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(targetUserId, PLUS_SIGN_LEFT+sourceName+" prepares to apply first aid on you."+PLUS_SIGN_RIGHT);
SendRoomMessage(roomId, PLUS_SIGN_LEFT+sourceName+" prepares to provide aid to "+targetName+"."+PLUS_SIGN_RIGHT, sourceUserId, targetUserId);
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/default/spells/curepoison.js b/_datafiles/world/default/spells/curepoison.js
index c81aba5b..bed05abc 100644
--- a/_datafiles/world/default/spells/curepoison.js
+++ b/_datafiles/world/default/spells/curepoison.js
@@ -5,7 +5,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to meditate deeply, recalling images of nature.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' enters a meditative trance.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/default/spells/heal.js b/_datafiles/world/default/spells/heal.js
index 8a155715..c36d0300 100644
--- a/_datafiles/world/default/spells/heal.js
+++ b/_datafiles/world/default/spells/heal.js
@@ -1,6 +1,6 @@
-HEAL_DICE_QTY = 2
-HEAL_DICE_SIDES = 3
+HEAL_DICE_QTY = 2;
+HEAL_DICE_SIDES = 3;
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -8,7 +8,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/default/spells/healall.js b/_datafiles/world/default/spells/healall.js
index 7d8a687f..3b64bc26 100644
--- a/_datafiles/world/default/spells/healall.js
+++ b/_datafiles/world/default/spells/healall.js
@@ -1,6 +1,6 @@
-HEAL_DICE_QTY = 2
-HEAL_DICE_SIDES = 3
+HEAL_DICE_QTY = 2;
+HEAL_DICE_SIDES = 3;
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -8,7 +8,7 @@ function onCast(sourceActor, targetActors) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActors) {
diff --git a/_datafiles/world/default/spells/illum.js b/_datafiles/world/default/spells/illum.js
index ae231acc..c9ac01c0 100644
--- a/_datafiles/world/default/spells/illum.js
+++ b/_datafiles/world/default/spells/illum.js
@@ -5,7 +5,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/default/spells/mm.js b/_datafiles/world/default/spells/mm.js
index a2626632..93dd8a07 100644
--- a/_datafiles/world/default/spells/mm.js
+++ b/_datafiles/world/default/spells/mm.js
@@ -1,7 +1,7 @@
-HARM_DICE_QTY = 1
-HARM_DICE_SIDES = 6
-HARM_DICE_MOD = 2
+HARM_DICE_QTY = 1;
+HARM_DICE_SIDES = 6;
+HARM_DICE_MOD = 2;
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -9,7 +9,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/default/spells/sparks.js b/_datafiles/world/default/spells/sparks.js
index c75a11b7..188510a0 100644
--- a/_datafiles/world/default/spells/sparks.js
+++ b/_datafiles/world/default/spells/sparks.js
@@ -1,6 +1,6 @@
-DMG_DICE_QTY = 1
-DMG_DICE_SIDES = 3
+DMG_DICE_QTY = 1;
+DMG_DICE_SIDES = 3;
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -8,7 +8,7 @@ function onCast(sourceActor, targetActors) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActors) {
diff --git a/_datafiles/world/default/spells/tameskill.js b/_datafiles/world/default/spells/tameskill.js
index 413eecd6..3218ece6 100644
--- a/_datafiles/world/default/spells/tameskill.js
+++ b/_datafiles/world/default/spells/tameskill.js
@@ -34,7 +34,7 @@ function onCast(sourceActor, targetActor) {
}
if ( sourceActor.GetCharmCount() >= sourceActor.GetMaxCharmCount() ) {
- sourceActor.SendText(`You already have too many followers.`)
+ sourceActor.SendText(`You already have too many followers.`);
}
chance = sourceActor.GetChanceToTame(targetActor)+sourceActor.GetStatMod(`tame`);
@@ -43,7 +43,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to dance in front of the '+targetActor.GetCharacterName(true)+'.');
SendRoomMessage(sourceActor.GetRoomId(), ``+sourceActor.GetCharacterName(true)+' performs a carefully choreographed dance in front of '+targetActor.GetCharacterName(true)+'.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
@@ -106,7 +106,7 @@ function onMagic(sourceActor, targetActor) {
}
if ( sourceActor.GetCharmCount() >= sourceActor.GetMaxCharmCount() ) {
- sourceActor.SendText(`You already have too many followers.`)
+ sourceActor.SendText(`You already have too many followers.`);
}
targetName = targetActor.GetCharacterName(true);
@@ -120,7 +120,7 @@ function onMagic(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'The '+targetName+' RESISTS your attempt to tame it!');
SendRoomMessage(sourceActor.GetRoomId(), 'The '+targetName+' RESISTS '+sourceName+'\'s attempt to tame it!', sourceActor.UserId());
- targetActor.Command(`attack ` + sourceActor.ShorthandId())
+ targetActor.Command(`attack ` + sourceActor.ShorthandId());
return false;
}
diff --git a/_datafiles/world/empty/buffs/0-meditating.js b/_datafiles/world/empty/buffs/0-meditating.js
index 73733ea4..bab5e886 100644
--- a/_datafiles/world/empty/buffs/0-meditating.js
+++ b/_datafiles/world/empty/buffs/0-meditating.js
@@ -5,13 +5,13 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You sit down and begin your meditation.' )
- SendUserMessage(actor.UserId(), 'Your meditation must complete without interruption to quit gracefully.')
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' sits down a begins to meditate.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'You sit down and begin your meditation.' );
+ SendUserMessage(actor.UserId(), 'Your meditation must complete without interruption to quit gracefully.');
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' sits down a begins to meditate.', actor.UserId());
}
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'You continue your meditation. *' + triggersLeft + ' rounds left* ' )
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' continues meditating.', actor.UserId() )
+ SendUserMessage(actor.UserId(), 'You continue your meditation. *' + triggersLeft + ' rounds left* ' );
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' continues meditating.', actor.UserId() );
}
diff --git a/_datafiles/world/empty/buffs/1-illumination.js b/_datafiles/world/empty/buffs/1-illumination.js
index 268213cd..a34042ff 100644
--- a/_datafiles/world/empty/buffs/1-illumination.js
+++ b/_datafiles/world/empty/buffs/1-illumination.js
@@ -1,12 +1,12 @@
// Invoked when the buff is first applied to the player.
function onStart(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'A warm glow surrounds you.')
- SendRoomMessage(actor.GetRoomId(), 'A warm glow surrounds '+actor.GetCharacterName(true)+ '.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'A warm glow surrounds you.');
+ SendRoomMessage(actor.GetRoomId(), 'A warm glow surrounds '+actor.GetCharacterName(true)+ '.', actor.UserId());
}
// Invoked when the buff has run its course.
function onEnd(actor, triggersLeft) {
- SendUserMessage(actor.UserId(), 'Your glowing fades away.' )
- SendRoomMessage(actor.GetRoomId(), 'The glow surrounding '+actor.GetCharacterName(true)+ ' fades away.', actor.UserId())
+ SendUserMessage(actor.UserId(), 'Your glowing fades away.' );
+ SendRoomMessage(actor.GetRoomId(), 'The glow surrounding '+actor.GetCharacterName(true)+ ' fades away.', actor.UserId());
}
diff --git a/_datafiles/world/empty/buffs/24-death_recovery.js b/_datafiles/world/empty/buffs/24-death_recovery.js
index 30e42584..f67056a5 100644
--- a/_datafiles/world/empty/buffs/24-death_recovery.js
+++ b/_datafiles/world/empty/buffs/24-death_recovery.js
@@ -3,19 +3,19 @@
// Invoked every time the buff is triggered (see roundinterval)
function onTrigger(actor, triggersLeft) {
- healAmt = actor.AddHealth(UtilDiceRoll(1, 10))
- manaAmt = actor.AddMana(UtilDiceRoll(1, 10))
+ healAmt = actor.AddHealth(UtilDiceRoll(1, 10));
+ manaAmt = actor.AddMana(UtilDiceRoll(1, 10));
if ( healAmt > 0 && manaAmt > 0 ) {
- SendUserMessage(actor.UserId(), 'The shadow realm heals you for '+String(healAmt)+' damage and restores '+String(manaAmt)+' mana!')
+ SendUserMessage(actor.UserId(), 'The shadow realm heals you for '+String(healAmt)+' damage and restores '+String(manaAmt)+' mana!');
} else if ( healAmt > 0 ) {
- SendUserMessage(actor.UserId(), 'The shadow realm heals you for '+String(healAmt)+' damage!')
+ SendUserMessage(actor.UserId(), 'The shadow realm heals you for '+String(healAmt)+' damage!');
} else if ( manaAmt > 0 ) {
- SendUserMessage(actor.UserId(), 'The shadow realm restores '+String(manaAmt)+' mana!')
+ SendUserMessage(actor.UserId(), 'The shadow realm restores '+String(manaAmt)+' mana!');
}
if ( healAmt > 0 || manaAmt > 0 ) {
- SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is recovering from a recent death.', actor.UserId())
+ SendRoomMessage(actor.GetRoomId(), actor.GetCharacterName(true)+' is recovering from a recent death.', actor.UserId());
}
}
diff --git a/_datafiles/world/empty/mobs/tutorial/scripts/58-training_dummy.js b/_datafiles/world/empty/mobs/tutorial/scripts/58-training_dummy.js
index 1fc1b599..92a1cc8b 100644
--- a/_datafiles/world/empty/mobs/tutorial/scripts/58-training_dummy.js
+++ b/_datafiles/world/empty/mobs/tutorial/scripts/58-training_dummy.js
@@ -15,8 +15,8 @@ function getTeacher(room) {
var mobActor = null;
mobIds = room.GetMobs();
-
- for ( i in mobIds ) {
+
+ for (var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
diff --git a/_datafiles/world/empty/rooms/startland/1.js b/_datafiles/world/empty/rooms/startland/1.js
index e5b86d63..2f0934be 100644
--- a/_datafiles/world/empty/rooms/startland/1.js
+++ b/_datafiles/world/empty/rooms/startland/1.js
@@ -1,5 +1,5 @@
-mapSignData = ""
+mapSignData = "";
// Generic Command Handler
function onCommand(cmd, rest, user, room) {
@@ -15,7 +15,7 @@ function onCommand(cmd, rest, user, room) {
// Load the cached map, or re-generate and cache it if it's not there
if ( mapSignData == "" ) {
- mapSignData = GetMap(room.RoomId(), 1, 22, 38, "Map of Startland", false, String(room.RoomId())+",×,Here")
+ mapSignData = GetMap(room.RoomId(), 1, 22, 38, "Map of Startland", false, String(room.RoomId())+",×,Here");
}
// Send the map to the user.
@@ -30,5 +30,5 @@ function onCommand(cmd, rest, user, room) {
// Executes when the room first loads.
function onLoad(room) {
// Just running this to pre-cache the map so that if someone looks at the map it won't time out
- mapSignData = GetMap(room.RoomId(), 1, 22, 38, "Map of Startland", false, String(room.RoomId())+",×,Here")
+ mapSignData = GetMap(room.RoomId(), 1, 22, 38, "Map of Startland", false, String(room.RoomId())+",×,Here");
}
diff --git a/_datafiles/world/empty/rooms/tutorial/900.js b/_datafiles/world/empty/rooms/tutorial/900.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/empty/rooms/tutorial/900.js
+++ b/_datafiles/world/empty/rooms/tutorial/900.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/901.js b/_datafiles/world/empty/rooms/tutorial/901.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/empty/rooms/tutorial/901.js
+++ b/_datafiles/world/empty/rooms/tutorial/901.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/902.js b/_datafiles/world/empty/rooms/tutorial/902.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/empty/rooms/tutorial/902.js
+++ b/_datafiles/world/empty/rooms/tutorial/902.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/903.js b/_datafiles/world/empty/rooms/tutorial/903.js
index 9b7b1fd2..05728084 100644
--- a/_datafiles/world/empty/rooms/tutorial/903.js
+++ b/_datafiles/world/empty/rooms/tutorial/903.js
@@ -46,8 +46,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
-
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +59,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +92,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +121,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +140,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +158,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +174,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/910.js b/_datafiles/world/empty/rooms/tutorial/910.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/empty/rooms/tutorial/910.js
+++ b/_datafiles/world/empty/rooms/tutorial/910.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/911.js b/_datafiles/world/empty/rooms/tutorial/911.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/empty/rooms/tutorial/911.js
+++ b/_datafiles/world/empty/rooms/tutorial/911.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/912.js b/_datafiles/world/empty/rooms/tutorial/912.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/empty/rooms/tutorial/912.js
+++ b/_datafiles/world/empty/rooms/tutorial/912.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/913.js b/_datafiles/world/empty/rooms/tutorial/913.js
index 9b7b1fd2..a674cbed 100644
--- a/_datafiles/world/empty/rooms/tutorial/913.js
+++ b/_datafiles/world/empty/rooms/tutorial/913.js
@@ -47,7 +47,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +60,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +93,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +122,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +141,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +159,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +175,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/920.js b/_datafiles/world/empty/rooms/tutorial/920.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/empty/rooms/tutorial/920.js
+++ b/_datafiles/world/empty/rooms/tutorial/920.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/921.js b/_datafiles/world/empty/rooms/tutorial/921.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/empty/rooms/tutorial/921.js
+++ b/_datafiles/world/empty/rooms/tutorial/921.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/922.js b/_datafiles/world/empty/rooms/tutorial/922.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/empty/rooms/tutorial/922.js
+++ b/_datafiles/world/empty/rooms/tutorial/922.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/923.js b/_datafiles/world/empty/rooms/tutorial/923.js
index 9b7b1fd2..05728084 100644
--- a/_datafiles/world/empty/rooms/tutorial/923.js
+++ b/_datafiles/world/empty/rooms/tutorial/923.js
@@ -46,8 +46,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
-
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +59,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +92,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +121,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +140,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +158,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +174,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/930.js b/_datafiles/world/empty/rooms/tutorial/930.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/empty/rooms/tutorial/930.js
+++ b/_datafiles/world/empty/rooms/tutorial/930.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/931.js b/_datafiles/world/empty/rooms/tutorial/931.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/empty/rooms/tutorial/931.js
+++ b/_datafiles/world/empty/rooms/tutorial/931.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/932.js b/_datafiles/world/empty/rooms/tutorial/932.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/empty/rooms/tutorial/932.js
+++ b/_datafiles/world/empty/rooms/tutorial/932.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/933.js b/_datafiles/world/empty/rooms/tutorial/933.js
index 9b7b1fd2..a674cbed 100644
--- a/_datafiles/world/empty/rooms/tutorial/933.js
+++ b/_datafiles/world/empty/rooms/tutorial/933.js
@@ -47,7 +47,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +60,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +93,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +122,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +141,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +159,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +175,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/940.js b/_datafiles/world/empty/rooms/tutorial/940.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/empty/rooms/tutorial/940.js
+++ b/_datafiles/world/empty/rooms/tutorial/940.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/941.js b/_datafiles/world/empty/rooms/tutorial/941.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/empty/rooms/tutorial/941.js
+++ b/_datafiles/world/empty/rooms/tutorial/941.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/942.js b/_datafiles/world/empty/rooms/tutorial/942.js
index d484a3f1..f5029f89 100644
--- a/_datafiles/world/empty/rooms/tutorial/942.js
+++ b/_datafiles/world/empty/rooms/tutorial/942.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/943.js b/_datafiles/world/empty/rooms/tutorial/943.js
index 9b7b1fd2..a674cbed 100644
--- a/_datafiles/world/empty/rooms/tutorial/943.js
+++ b/_datafiles/world/empty/rooms/tutorial/943.js
@@ -47,7 +47,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +60,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +93,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +122,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +141,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +159,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +175,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/990.js b/_datafiles/world/empty/rooms/tutorial/990.js
index 4da9fe48..4962d844 100644
--- a/_datafiles/world/empty/rooms/tutorial/990.js
+++ b/_datafiles/world/empty/rooms/tutorial/990.js
@@ -73,6 +73,9 @@ function onCommand(cmd, rest, user, room) {
break;
case 4:
canGoEast = true;
+ teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
+ teacherMob.Command('say type east to travel through the east exit.');
+ break;
default:
teacherMob.Command('say It\'s time to move on to the next thing you\'ll learn about.');
teacherMob.Command('say type east to travel through the east exit.');
@@ -122,7 +125,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +144,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -158,7 +161,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/991.js b/_datafiles/world/empty/rooms/tutorial/991.js
index b5455bee..a932ac79 100644
--- a/_datafiles/world/empty/rooms/tutorial/991.js
+++ b/_datafiles/world/empty/rooms/tutorial/991.js
@@ -82,6 +82,8 @@ function onCommand(cmd, rest, user, room) {
user.GiveBuff(-32, "training");
teacherMob.Command('say head south for the next lesson.');
canGoSouth = true;
+ room.SetLocked("south", false);
+ break;
default:
room.SetLocked("south", false);
break;
@@ -130,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -148,7 +150,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -165,7 +167,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/992.js b/_datafiles/world/empty/rooms/tutorial/992.js
index 21da308b..ee24ac62 100644
--- a/_datafiles/world/empty/rooms/tutorial/992.js
+++ b/_datafiles/world/empty/rooms/tutorial/992.js
@@ -132,7 +132,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -151,7 +151,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -166,7 +166,7 @@ function getDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
return mobActor;
@@ -182,7 +182,7 @@ function destroyDummy(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == dummyMobId ) {
mobActor.Command(`suicide vanish`);
@@ -199,7 +199,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
diff --git a/_datafiles/world/empty/rooms/tutorial/993.js b/_datafiles/world/empty/rooms/tutorial/993.js
index 9b7b1fd2..a674cbed 100644
--- a/_datafiles/world/empty/rooms/tutorial/993.js
+++ b/_datafiles/world/empty/rooms/tutorial/993.js
@@ -47,7 +47,7 @@ function onCommand(cmd, rest, user, room) {
switch (commandNow) {
case 0:
- teacherMob.Command('emote gestures to the graduation cap on the ground.')
+ teacherMob.Command('emote gestures to the graduation cap on the ground.');
teacherMob.Command('say type get cap to pick up the graduation cap.');
break;
case 1:
@@ -60,7 +60,7 @@ function onCommand(cmd, rest, user, room) {
teacherMob.Command('say I\ll summon a portal to send you to the heart of Frostfang city, where your adventure begins.');
exits = room.GetExits();
- if ( !exits['portal'] ) {
+ if ( !exits.portal ) {
teacherMob.Command('emote glows intensely, and a ' + UtilApplyColorPattern('swirling portal', 'pink') + ' appears!');
room.AddTemporaryExit('swirling portal', ':pink', 0, 9000); // RoomId 0 is an alias for start room
}
@@ -93,7 +93,7 @@ function onEnter(user, room) {
teacherMob.Command('say Congratulation on getting to the end of the training course!');
teacherMob.Command('drop cap');
- teacherMob.Command('emote gestures to the graduation cap on the ground.', 15)
+ teacherMob.Command('emote gestures to the graduation cap on the ground.', 15);
teacherMob.Command('say type get cap to pick up the graduation cap.', 15);
}
@@ -122,7 +122,7 @@ function getTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
return mobActor;
@@ -141,7 +141,7 @@ function destroyTeacher(room) {
mobIds = room.GetMobs();
- for ( i in mobIds ) {
+ for ( var i in mobIds ) {
mobActor = GetMob(mobIds[i]);
if ( mobActor.MobTypeId() == teacherMobId ) {
mobActor.Command(`suicide vanish`);
@@ -159,7 +159,7 @@ function sendWorkingCommands(user) {
ac.push(allowed_commands[i]);
}
- for (var i in unlockedCommands ) {
+ for ( i in unlockedCommands ) {
ac.push(unlockedCommands[i]);
}
@@ -175,7 +175,7 @@ function sendWorkingCommands(user) {
function clearGroundItems(room) {
allGroundItems = room.GetItems();
- for ( i in allGroundItems ) {
+ for ( var i in allGroundItems ) {
room.DestroyItem(allGroundItems[i]);
}
diff --git a/_datafiles/world/empty/spells/aidskill.js b/_datafiles/world/empty/spells/aidskill.js
index 3855f801..be4ad375 100644
--- a/_datafiles/world/empty/spells/aidskill.js
+++ b/_datafiles/world/empty/spells/aidskill.js
@@ -25,7 +25,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(targetUserId, PLUS_SIGN_LEFT+sourceName+" prepares to apply first aid on you."+PLUS_SIGN_RIGHT);
SendRoomMessage(roomId, PLUS_SIGN_LEFT+sourceName+" prepares to provide aid to "+targetName+"."+PLUS_SIGN_RIGHT, sourceUserId, targetUserId);
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/empty/spells/curepoison.js b/_datafiles/world/empty/spells/curepoison.js
index c81aba5b..bed05abc 100644
--- a/_datafiles/world/empty/spells/curepoison.js
+++ b/_datafiles/world/empty/spells/curepoison.js
@@ -5,7 +5,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to meditate deeply, recalling images of nature.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' enters a meditative trance.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/empty/spells/heal.js b/_datafiles/world/empty/spells/heal.js
index 8a155715..c36d0300 100644
--- a/_datafiles/world/empty/spells/heal.js
+++ b/_datafiles/world/empty/spells/heal.js
@@ -1,6 +1,6 @@
-HEAL_DICE_QTY = 2
-HEAL_DICE_SIDES = 3
+HEAL_DICE_QTY = 2;
+HEAL_DICE_SIDES = 3;
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -8,7 +8,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/empty/spells/healall.js b/_datafiles/world/empty/spells/healall.js
index 7d8a687f..3b64bc26 100644
--- a/_datafiles/world/empty/spells/healall.js
+++ b/_datafiles/world/empty/spells/healall.js
@@ -1,6 +1,6 @@
-HEAL_DICE_QTY = 2
-HEAL_DICE_SIDES = 3
+HEAL_DICE_QTY = 2;
+HEAL_DICE_SIDES = 3;
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -8,7 +8,7 @@ function onCast(sourceActor, targetActors) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActors) {
diff --git a/_datafiles/world/empty/spells/illum.js b/_datafiles/world/empty/spells/illum.js
index ae231acc..c9ac01c0 100644
--- a/_datafiles/world/empty/spells/illum.js
+++ b/_datafiles/world/empty/spells/illum.js
@@ -5,7 +5,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/empty/spells/mm.js b/_datafiles/world/empty/spells/mm.js
index a2626632..93dd8a07 100644
--- a/_datafiles/world/empty/spells/mm.js
+++ b/_datafiles/world/empty/spells/mm.js
@@ -1,7 +1,7 @@
-HARM_DICE_QTY = 1
-HARM_DICE_SIDES = 6
-HARM_DICE_MOD = 2
+HARM_DICE_QTY = 1;
+HARM_DICE_SIDES = 6;
+HARM_DICE_MOD = 2;
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -9,7 +9,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
diff --git a/_datafiles/world/empty/spells/sparks.js b/_datafiles/world/empty/spells/sparks.js
index c75a11b7..188510a0 100644
--- a/_datafiles/world/empty/spells/sparks.js
+++ b/_datafiles/world/empty/spells/sparks.js
@@ -1,6 +1,6 @@
-DMG_DICE_QTY = 1
-DMG_DICE_SIDES = 3
+DMG_DICE_QTY = 1;
+DMG_DICE_SIDES = 3;
// Called when the casting is initialized (cast command)
// Return false if the casting should be ignored/aborted
@@ -8,7 +8,7 @@ function onCast(sourceActor, targetActors) {
SendUserMessage(sourceActor.UserId(), 'You begin to chant softly.');
SendRoomMessage(sourceActor.GetRoomId(), sourceActor.GetCharacterName(true)+' begins to chant softly.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActors) {
diff --git a/_datafiles/world/empty/spells/tameskill.js b/_datafiles/world/empty/spells/tameskill.js
index 413eecd6..3218ece6 100644
--- a/_datafiles/world/empty/spells/tameskill.js
+++ b/_datafiles/world/empty/spells/tameskill.js
@@ -34,7 +34,7 @@ function onCast(sourceActor, targetActor) {
}
if ( sourceActor.GetCharmCount() >= sourceActor.GetMaxCharmCount() ) {
- sourceActor.SendText(`You already have too many followers.`)
+ sourceActor.SendText(`You already have too many followers.`);
}
chance = sourceActor.GetChanceToTame(targetActor)+sourceActor.GetStatMod(`tame`);
@@ -43,7 +43,7 @@ function onCast(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'You begin to dance in front of the '+targetActor.GetCharacterName(true)+'.');
SendRoomMessage(sourceActor.GetRoomId(), ``+sourceActor.GetCharacterName(true)+' performs a carefully choreographed dance in front of '+targetActor.GetCharacterName(true)+'.', sourceActor.UserId());
- return true
+ return true;
}
function onWait(sourceActor, targetActor) {
@@ -106,7 +106,7 @@ function onMagic(sourceActor, targetActor) {
}
if ( sourceActor.GetCharmCount() >= sourceActor.GetMaxCharmCount() ) {
- sourceActor.SendText(`You already have too many followers.`)
+ sourceActor.SendText(`You already have too many followers.`);
}
targetName = targetActor.GetCharacterName(true);
@@ -120,7 +120,7 @@ function onMagic(sourceActor, targetActor) {
SendUserMessage(sourceActor.UserId(), 'The '+targetName+' RESISTS your attempt to tame it!');
SendRoomMessage(sourceActor.GetRoomId(), 'The '+targetName+' RESISTS '+sourceName+'\'s attempt to tame it!', sourceActor.UserId());
- targetActor.Command(`attack ` + sourceActor.ShorthandId())
+ targetActor.Command(`attack ` + sourceActor.ShorthandId());
return false;
}