-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigg
committed
Jan 13, 2011
1 parent
075b752
commit b9a66ad
Showing
7 changed files
with
225 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
# Plugin 1 for PyScript | ||
from MineServer import *; | ||
global M | ||
import math; | ||
global M, lastblock,ltype | ||
|
||
def init(): | ||
global M,lastblock, ltype | ||
M= get_MS() | ||
M.screen.log("Loaded TriggTest") | ||
lastblock = M.map.get_block(0,0,0) | ||
ltype=7 | ||
|
||
def init(MS): | ||
global M | ||
M = MS | ||
print M | ||
|
||
def cb_timer200(): | ||
print "200" | ||
print magical | ||
print magical() | ||
set_time(M,0) | ||
global lastblock, ltype | ||
user = M.get_user("trigg"); | ||
if not user==None: | ||
print user.location.x, user.location.y, user.location.z | ||
block = M.map.get_block(int(math.floor(user.location.x)),int(math.floor(user.location.y-1)),int(math.floor(user.location.z))); | ||
b=block;lb=lastblock | ||
if((not b.x==lb.x) or (not b.y==lb.y) or (not b.z==lb.z)): | ||
ntype= block.get_type() | ||
block.set_type(41) | ||
lastblock.set_type(ltype) | ||
lastblock=block | ||
ltype=ntype | ||
|
||
# Called at BEST every 200 milliseconds, might be later if under | ||
# strain | ||
pass | ||
|
||
def cb_timer1000(): | ||
M.map.set_time(0) | ||
pass | ||
|
||
def cb_timer10000(): | ||
pass | ||
|
||
def cb_block_place(name,block): | ||
return False | ||
pass | ||
|
||
|
||
|
||
def cb_chat(name, msg): | ||
print name,msg | ||
return True | ||
|
||
|
||
version = "0.1" | ||
print "Loaded test.py" |
Oops, something went wrong.