1local StonePos_1 = Position(3470, 969, 11)
2local StonePos_2 = Position(3463, 952, 11)
3local StonePos_3 = Position(3469, 958, 11)
4
5function onStepIn(creature, item, position, fromPosition)
6 local StoneID_1 = Tile(StonePos_1):getItemById(1304)
7 local StoneID_2 = Tile(StonePos_2):getItemById(1304)
8 local StoneID_3 = Tile(StonePos_3):getItemById(1304)
9
10 if item.uid == 10437 then
11 if creature:isPlayer() then
12 item:transform(425)
13 if StoneID_1 then
14 StoneID_1:remove()
15 StonePos_1:sendMagicEffect(CONST_ME_POFF)
16 return true
17 end
18 end
19 end
20 if item.uid == 10438 then
21 if creature:isPlayer() then
22 item:transform(425)
23 if StoneID_2 then
24 StoneID_2:remove()
25 StonePos_2:sendMagicEffect(CONST_ME_POFF)
26 return true
27 end
28 end
29 end
30 if item.uid == 10439 then
31 if creature:isPlayer() then
32 item:transform(425)
33 if StoneID_3 then
34 StoneID_3:remove()
35 StonePos_3:sendMagicEffect(CONST_ME_POFF)
36 return true
37 end
38 end
39 end
40 return true
41end
42function onStepOut(creature, item, position, fromPosition)
43 local StoneID_1 = Tile(StonePos_1):getItemById(1304)
44 local StoneID_2 = Tile(StonePos_2):getItemById(1304)
45 local StoneID_3 = Tile(StonePos_3):getItemById(1304)
46
47 if item.uid == 10437 then
48 item:transform(426)
49 if creature:isPlayer() then
50 if not StoneID_1 then
51 Game.createItem(1304, 1, StonePos_1)
52 StonePos_1:sendMagicEffect(CONST_ME_POFF)
53 return true
54 end
55 end
56 end
57 if item.uid == 10438 then
58 item:transform(426)
59 if creature:isPlayer() then
60 if not StoneID_2 then
61 Game.createItem(1304, 1, StonePos_2)
62 StonePos_2:sendMagicEffect(CONST_ME_POFF)
63 return true
64 end
65 end
66 end
67 if item.uid == 10439 then
68 item:transform(426)
69 if creature:isPlayer() then
70 if not StoneID_3 then
71 Game.createItem(1304, 1, StonePos_3)
72 StonePos_3:sendMagicEffect(CONST_ME_POFF)
73 return true
74 end
75 end
76 end
77 return true
78end
79