added tutorial quest

This commit is contained in:
cale 2016-04-12 19:04:48 +02:00
parent 4b45fc42c1
commit 6a42edb515
11 changed files with 94 additions and 5 deletions

View File

@ -67,9 +67,6 @@ minetest.register_on_joinplayer(function(player)
character_editor.mesh[player:get_player_name()] = "character.x"
character_editor.characters[player:get_player_name()] = {}
character_editor.set_texture(player, 1, "character.png")
end)
minetest.register_on_newplayer(function(player)
character_editor.show_window(player)
end)

View File

@ -297,6 +297,9 @@ function story.generator.run(part, player, line_pos)
out = {part="", wait=false, quit=true}
return out
end
if cmd[1] == "$give" and cmd[2] and cmd[3] then
player:get_inventory():add_item("main", cmd[2].. " " .. cmd[3])
end
end
end
i = i +1

View File

@ -1,3 +1,3 @@
lvl1=quest_1,quest_2,quest_3
lvl2=quest_1,quest_2,quest_3,quest_4
lvl1=tutorial_1
lvl2=quest_3,quest_2
lvl3=quest_5,quest_6

View File

@ -0,0 +1,9 @@
Kai : I havent seen you before, are you new here?
You : Yes, I heard that this is a city where many adventurers live.
Kai : That is right.
Kai : You dont have some basic materials with you to build a house, have you?
You : no, not yet
Kai : Ok, I think you should get some stones - they lay on the floor.
Kai : I have some wood for you.
You : Thank you :D
Kai : Come back when you have some stones.

View File

@ -0,0 +1,15 @@
$dialog tutorial_1
$wait
$give default:wood 5
$quest dignode default:stones_on_floor 3 10
$wait quest
$dialog tutorial_1_2
$wait
$quest placenode default:workbench 1 7
$wait quest
$dialog tutorial_1_3
$wait
$give default:grass 9
$dialog tutorial_1_4
$wait
$quit

View File

@ -0,0 +1,5 @@
Kai : Great, It seems like you got some stones :)
You : Yes
Kai : You should craft a workbench out of the wood I gave you before.
Kai : To craft a workbench put 3 wood into your hand crafting (press I to open your inventory)!
Kai : After that, you should place the workbench on the floor.

View File

@ -0,0 +1,19 @@
Kai : Now, just craft some strings. Like this :
G G G
- - -
- - -
G : Grass
- : nothing
Kai : after that you need to craft a strong string:
S S S
- - -
- - -
S : String
- : nothing
Kai : Now, craft some sticks out of one wood.

View File

@ -0,0 +1,13 @@
Kai : You can craft a stone axe now!
- A -
- B -
- C -
A : Stone
B : String (strong)
C : Stick
Kai : With a stone axe you can dig trees!
Kai : You also can use it to get more stones (from caves).
You : Thank you very much for your help :)

View File

@ -0,0 +1 @@
$quit

View File

@ -107,3 +107,30 @@ minetest.register_decoration({
decoration = "village:spawn",
})
-- after start game
minetest.register_on_joinplayer(function(player)
if not places.pos["home_village"] and minetest.get_player_privs(player:get_player_name()).server then
minetest.chat_send_player(player:get_player_name(), "Choose a point for the home village!")
minetest.chat_send_player(player:get_player_name(), "Try to find a grassland biome - the start is much easier there :)")
minetest.chat_send_player(player:get_player_name(), "The biome should be flat.")
player:get_inventory():add_item("main", "village:create_start_game")
end
end)
minetest.register_craftitem("village:create_start_game", {
description = "Create Home Village",
inventory_image = "village_create.png",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then
village.gen(pointed_thing.above)
itemstack:take_item()
places.pos["home_village"] = pointed_thing.above
placer:setpos(pointed_thing.above)
places.save_places()
end
return itemstack
end,
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B