-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmatch.pl
24 lines (21 loc) · 866 Bytes
/
match.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
# external, lights match
print "pop=light match\n";
$new="";
($slot,$item)=split(/\-/, $form{'j'});
if ($slot<$NumInven) {
if (length($item)==2) {
if (substr($player{'inven'},$slot*10,2) eq $item) {
$fire=0; $slot=$slot*10;
if ($item eq "Dj") { $fire=1; $player{'inven'}=substr($player{'inven'},0,$slot)."Za00000000".substr($player{'inven'},$slot+10); }
if ($item eq "Dk") { $fire=1; $player{'inven'}=substr($player{'inven'},0,$slot)."Dj".substr($player{'inven'},$slot+2); }
if ($item eq "Dl") { $fire=1; $player{'inven'}=substr($player{'inven'},0,$slot)."Dk".substr($player{'inven'},$slot+2); }
if ($fire) {
do 'inv.pl'; print "dinv=1\n"; $new="Zj"; do "newstamp.pl";
open (FILE,">$datadir/dynamic/$player{'tmap'}/Zj $e $player{'tz'}.txt");
print FILE "\n";
close FILE;
}
}
}
}
1;