forked from Quasic/DragonBasher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tile.pl
26 lines (24 loc) · 813 Bytes
/
tile.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# external, changes tile player is standing on
$version="1.0";
if ($player{'inven'}=~/Zd/) {
if (substr($form{'j'},0,1) ge "A") {
if (substr($form{'j'},0,1) le "Z") {
if (substr($form{'j'},1,1) ge "a") {
if (substr($form{'j'},1,1) le "z") {
if (length($form{'j'})==2) {
open (FILE, "$datadir/maps/$player{'tmap'}/t.txt");
$tileset=<FILE>;
close (FILE);
substr($tileset,$player{'tz'}*2,2)="$form{'j'}";
open (FILE, ">$datadir/maps/$player{'tmap'}/t.txt"); print FILE "$tileset\n"; close FILE;
open (FILE, ">$datadir/maps/$player{'tmap'}/s.txt"); print FILE "$cstamp\n"; close FILE;
# send new $tileset to client
}
}
}
}
}
} else {
print "pop=Need Sysop Key\n";
}
1;