Skip to content

Commit 6f58702

Browse files
committed
2 parents b9a1d93 + 041a226 commit 6f58702

14 files changed

Lines changed: 79 additions & 30 deletions

File tree

config/itemdesc.cfg

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -581,16 +581,6 @@ Item 0x1011
581581
VendorBuysFor 4
582582
}
583583

584-
Item 0x14FB
585-
{
586-
Name lockpick
587-
desc lockpick%s%
588-
Script pickLock
589-
VendorSellsFor 12
590-
VendorBuysFor 4
591-
stackable 1
592-
}
593-
594584
Item 0xF78
595585
{
596586
Name BatWing

pkg/items/treasuremap/decodeMap.src

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ function SetTreasureCoords( map );
8383
endif
8484
map.xeast := x+265;
8585
map.ysouth := y+260;
86+
if(map.ysouth >= 4096)
87+
map.ysouth := 4095;
88+
endif
8689
map.gumpwidth := 200;
8790
map.gumpheight := 200;
8891
map.AppendPin(x,y);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use uo;
2+
use os;
3+
4+
program destroyTimer(chest)
5+
var at := CInt(GetObjProperty(chest,"DestroyAt"));
6+
Detach();
7+
8+
while(1)
9+
if(ReadGameClock() > at)
10+
DestroyItem(chest);
11+
endif
12+
sleep(1);
13+
endwhile
14+
15+
endprogram

pkg/mobiles/damage/include/damage.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function DisplayDamage(damaged, amount, source:=0)
274274

275275
dmg_packet.SetInt32(0x01, damaged.serial);
276276

277-
if ( source.acctname )
277+
if ( source.acctname != damaged.acctname )
278278
dmg_packet.SendPacket(source);
279279
endif
280280

pkg/skills/cartography/cartography.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ program go_go_gadget_map(who)
4848
DestroyItem(blank);
4949
endif
5050
3: if(SkillCheck(who, CARTOGRAPHY, 80, 150))
51-
props := array("world", 0, 0, 5119, 4095, 500, 400);
51+
props := array("world", 0, 0, 5119, 4095, 500, 500);
5252
makemap(who, props, blank);
5353
else
5454
SendSysMessage(who, "You are not familiar enough with the area to draw the map");
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Item 0x14FB
2+
{
3+
Name lockpick
4+
desc lockpick%s%
5+
Script :lockpicking:use/pickLock
6+
VendorSellsFor 12
7+
VendorBuysFor 4
8+
stackable 1
9+
}

pkg/skills/lockpicking/lockpicking.src

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ program pick( me, lockpick )
4747
endprogram
4848

4949
function PickTreasureChest(me, lockpick, chest)
50-
var lvl := GetObjProperty(chest,"level" );
50+
var lvl := GetObjProperty(chest,"level" );
51+
5152
if (!lvl)
5253
DestroyItem(chest);
5354
endif
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,17 @@ endfunction
9999

100100
function PickTreasureChest(me, lockpick, chest)
101101
var lvl := GetObjProperty(chest,"level");
102+
103+
var guardians := GetObjProperty(chest,"#guardianList" );
104+
foreach guard in guardians
105+
if(SystemFindObjectBySerial(guard))
106+
SendSysMessage(me,"You need to kill all the guards");
107+
return;
108+
endif
109+
endforeach
110+
EraseObjProperty(chest, "#guardianList");
111+
112+
102113
if(!lvl)
103114
SendSysMessage(me, "You cannot pick that.");
104115
return;
@@ -114,6 +125,9 @@ function PickTreasureChest(me, lockpick, chest)
114125
PlaySoundEffect(chest,SFX_200);
115126
PrintTextAbovePrivate(chest,"*Unlocked!*",me);
116127
chest.locked := 0;
128+
SetObjProperty(chest,"DestroyAt", (ReadGameClock() + DESTROY_TREASURE_CHEST));
129+
start_script(":treasuremap:destroyTimer", chest);
130+
PrintTextAbove(chest,"The chest will collapse after "+(DESTROY_TREASURE_CHEST / 60)+" minutes");
117131
else
118132
PrintTextAbovePrivate(chest,"You fail to pick the lock.",me);
119133
if(diff < 10)

pkg/skills/mining/mining.src

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,20 @@ program use_picktool(who, tool)
261261
var rand;
262262
var template;
263263
i := 1;
264+
var guardianList := {};
264265
for( i := 1; i <= limit; i := i + 1 )
265266
rand := RandomInt( num ) + 1;
266267
template := GetConfigString( elem, ("creature" + rand) );
267-
CreateGuardian( chest, template );
268+
var npc := CreateGuardian( chest, template );
269+
if(npc)
270+
guardianList.append(npc.serial);
271+
endif
268272
endfor
273+
SetObjProperty(chest, "#guardianList", guardianList);
269274
UnloadConfigFile(":treasuremap:guardians");
270275
SendSysMessage( who, "You unleash the treasure's guardians!" );
271276
ReleaseItem(tool);
277+
ReleaseItem(map);
272278
Detach();
273279
sleep(1800);
274280
DestroyItem(chest);
@@ -319,6 +325,7 @@ function CreateGuardian( chest, template )
319325
if( nasty == "<error>" )
320326
CreateGuardian( chest, template );
321327
endif
328+
return nasty;
322329
endfunction
323330

324331
function is_minable(theobj, othertype)

pkg/skills/musicianship/entice.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ program enticement(who)
2929
SendSysMessage(who, "You don't have an instrument to play!");
3030
return;
3131
endif
32-
var success := play(who, diff, instrument, SKILLID_DISCORDANCE);
32+
var success := play(who, diff, instrument, DISCORDANCE);
3333
if(success)
3434
var ev := struct;
3535
ev.+type := EVID_ALL_FOLLOW_CMD;

0 commit comments

Comments
 (0)