require 1 xp to use 'confuse'

master
rnd1 2017-12-19 19:34:59 +01:00
parent eafa312686
commit c6540083c1
2 changed files with 6 additions and 1 deletions

3
README
View File

@ -23,4 +23,5 @@ HOW TO USE:
1. To CLOAK (hide) your name temporarily use glove while not pointing at any player.
2. To STEAL: sneak behind player, point at him and use glove. After that wait 5s before using glove again and then you can take one item from players pockets (top inventory row only).
3. whenever you steal succesfuly you get 0.1 experience. More experience increases cloak time.
4. if you get caught you will lose 0.5 experience.
4. when you have at least 1 experience you can confuse victims (hold JUMP while using glove), slowing them down to 33% speed for 10s
5. don't get caught. If you do, everyone will know you are thief and you will lose 0.5 experience.

View File

@ -55,6 +55,10 @@ minetest.register_tool("thief:gloves", {
if not player2:is_player() then return end
if pjump then -- SLOW
if thiefxp[name]<1 then
minetest.chat_send_player(name,"#THIEF: you need at least 1 xp to use slow.");
return
end
local speed0 = player2:get_physics_override().speed;
if speed0<0.8 then return end -- normal player speed
player2:set_physics_override({speed=0.33*speed0});