if (GetBoolean(this, "visited")) {
if (GetBoolean(game, "night")) {
msg("It is night and you have been here before")
}
else {
msg("It is day and you have been here before")
}
}
else {
if (GetBoolean(game, "night")) {
msg("It is night and here is a detailed description")
}
else {
msg("It is day and here is a detailed description")
}
}
Silver wrote:Firstly you need to work out how you're going to change the passage of time. Timers or turn timers seem the obvious (only?) choice. So you'll need two, one called night and one called day. In the before game starts scripts get it to set flag day and start timer day.
game.night = true
orc.dead = false
orc.cash = 100
orc.damage = 50
orc.life = 500
orc.weapon = iron_sword
orc.speed = GetRandomInt (0,100)
player.cash = 0
player.damage = 100
player.life = 999
player.weapon = steel_sword
player.speed = GetRandomInt (0,100)
Object: player
Object: orc
Object: unarmed
Object: iron_sword
Object: steel_sword
if (orc.dead = true) {
if (orc.cash = 0 and orc.weapon = unarmed) {
msg ("The orc is dead, and you've already looted its corpse of cash and equipment, silly.")
else if (orc.cash = 0 and orc.weapon = iron_sword) {
iron_sword.parent = player
orc.weapon = unarmed
msg ("You loot the iron sword from the dead orc's corpse.")
} else if (orc.cash > 0 and orc.weapon = unarmed) {
player.cash = player.cash + orc.cash
orc.cash = 0
msg ("You loot the cash from the dead orc's corpse.")
} else if (orc.cash > 0 and orc.weapon = iron_sword) {
wooden_sword.parent = player
orc.weapon = unarmed
player.cash = player.cash + orc.cash
orc.cash = 0
msg ("You loot the cash and iron sword from the dead orc's corpse.")
}
} else if (orc.dead = false) {
if (player.speed > orc.speed) {
msg ("You attack the orc.")
orc.life = orc.life - player.damage
if (orc.life <= 0) {
orc.dead = true
msg ("You kill the orc.")
} else if (orc.life > 0) {
msg ("The orc attacks you.")
player.life = player.life - orc.damage
if (player.life <= 0) {
msg ("The orc killed you.")
msg ("GAME OVER")
finish
}
}
} else if (player.speed < orc.speed) {
msg ("The orc attacks you.")
player.life = player.life - orc.damage
if (player.life <= 0) {
msg ("The orc killed you.")
msg ("GAME OVER")
finish
} else if (player.life > 0) {
msg ("You attack the orc.")
orc.life = orc.life - player.damage
if (orc.life <= 0) {
orc.dead = true
msg ("You killed the orc.")
}
}
} else if (player.speed = orc.speed) {
if (RandomChance (50) = true) {
msg ("You attack the orc.")
orc.life = orc.life - player.damage
if (orc.life <= 0) {
orc.dead = true
msg ("You kill the orc.")
} else if (orc.life > 0) {
msg ("The orc attacks you.")
player.life = player.life - orc.damage
if (player.life <= 0) {
msg ("The orc killed you.")
msg ("GAME OVER")
finish
}
}
} else {
msg ("The orc attacks you.")
player.life = player.life - orc.damage
if (player.life <= 0) {
msg ("The orc killed you.")
msg ("GAME OVER")
finish
} else if (player.life > 0) {
msg ("You attack the orc.")
orc.life = orc.life - player.damage
if (orc.life <= 0) {
orc.dead = true
msg ("You killed the orc.")
}
}
}
}
}