1function onStepIn(creature, item, position, fromPosition)
2 local STORAGE_BONEBROOK = _SYSTEM.DANGEROUS[03][01].STORAGE
3 local party = creature:getParty()
4 local _DG_BONEBROOK_TUTOR = {
5
6
7
8 [10322] = {"@TutorShow 21", 02}; -- Zona 02 [Sala dos Portais]
9 [10361] = {"@TutorShow 21", 02}; -- Zona 02 [Sala dos Portais]
10 [10362] = {"@TutorShow 21", 02}; -- Zona 02 [Sala dos Portais]
11
12
13
14 [10324] = {"@TutorShow 22", 10}; -- Zona 02 [Sala das Estatuas]
15 [10381] = {"@TutorShow 22", 10}; -- Zona 02 [Sala das Estatuas]
16 [10382] = {"@TutorShow 22", 10}; -- Zona 02 [Sala das Estatuas]
17
18
19
20 [10326] = {"@TutorShow 23", 12}; -- Zona 04-A1 [Sala do Dragon Lord]
21 [10383] = {"@TutorShow 23", 12}; -- Zona 04-A1 [Sala do Dragon Lord]
22 [10384] = {"@TutorShow 23", 12}; -- Zona 04-A1 [Sala do Dragon Lord]
23 }
24 local _DG_PORTAIS = {
25 [10336] = 02;
26 [10337] = 03;
27 [10338] = 04;
28 [10339] = 05;
29 [10340] = 06;
30 [10341] = 07;
31 [10342] = 08;
32
33 [10363] = 02;
34 [10364] = 03;
35 [10365] = 04;
36 [10366] = 05;
37 [10367] = 06;
38 [10368] = 07;
39 [10369] = 08;
40
41 [10500] = 02;
42 [10501] = 03;
43 [10502] = 04;
44 [10503] = 05;
45 [10504] = 06;
46 [10505] = 07;
47 [10506] = 08;
48 }
49 if _DG_BONEBROOK_TUTOR[item.actionid] then
50 if creature:getStorageValue(STORAGE_BONEBROOK) == _DG_BONEBROOK_TUTOR[item.actionid][02] then
51 if item.actionid == 10321 then
52 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, _DG_BONEBROOK_TUTOR[item.actionid][01])
53 return true
54 else
55 creature:sendCancelMessage(_DG_BONEBROOK_TUTOR[item.actionid][01])
56 return true
57 end
58 end
59 end
60 if _DG_PORTAIS[item.uid] then
61 if creature:getStorageValue(STORAGE_BONEBROOK) > 01 then
62 if creature:getStorageValue(STORAGE_BONEBROOK) < 09 then
63 if creature:getStorageValue(STORAGE_BONEBROOK) == _DG_PORTAIS[item.uid] then
64 if not party then
65 creature:say("Portal [ 0" .. (_DG_PORTAIS[item.uid] - 1) .. "/07 ].", TALKTYPE_MONSTER_SAY)
66 creature:setStorageValue(STORAGE_BONEBROOK, (_DG_PORTAIS[item.uid] + 1))
67 creature:getPosition():sendMagicEffect(13)
68 else
69 local members = party:getMembers()
70 members[#members + 1] = party:getLeader()
71 for _, member in ipairs(members) do
72 member:say("Portal [ 0" .. (_DG_PORTAIS[item.uid] - 1) .. "/07 ].", TALKTYPE_MONSTER_SAY)
73 member:setStorageValue(STORAGE_BONEBROOK, (_DG_PORTAIS[item.uid] + 1))
74 member:getPosition():sendMagicEffect(13)
75 end
76 end
77
78 if creature:getStorageValue(STORAGE_BONEBROOK) == 09 then
79 if not party then
80 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Monstros da Zona 03 liberados.")
81 else
82 local members = party:getMembers()
83 members[#members + 1] = party:getLeader()
84 for _, member in ipairs(members) do
85 member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Monstros da Zona 03 liberados.")
86 end
87 end
88
89 if item.uid == 10342 then
90 Game.createMonster("Shaburak Demon", {x=3991, y=1198, z=14});
91 Game.createMonster("Shaburak Demon", {x=3996, y=1199, z=14});
92 Game.createMonster("Shaburak Demon", {x=4001, y=1198, z=14});
93 Game.createMonster("Shaburak Demon", {x=4005, y=1199, z=14});
94 Game.createMonster("Shaburak Demon", {x=4010, y=1097, z=14});
95 Game.createMonster("Shaburak Demon", {x=4012, y=1203, z=14});
96 Game.createMonster("Shaburak Demon", {x=4014, y=1198, z=14});
97 Game.createMonster("Shaburak Demon", {x=4015, y=1194, z=14});
98 Game.createMonster("Shaburak Demon", {x=4018, y=1201, z=14});
99 elseif item.uid == 10369 then
100 Game.createMonster("Shaburak Demon", {x=4099, y=1198, z=14});
101 Game.createMonster("Shaburak Demon", {x=4104, y=1199, z=14});
102 Game.createMonster("Shaburak Demon", {x=4109, y=1198, z=14});
103 Game.createMonster("Shaburak Demon", {x=4113, y=1199, z=14});
104 Game.createMonster("Shaburak Demon", {x=4118, y=1097, z=14});
105 Game.createMonster("Shaburak Demon", {x=4120, y=1203, z=14});
106 Game.createMonster("Shaburak Demon", {x=4122, y=1198, z=14});
107 Game.createMonster("Shaburak Demon", {x=4123, y=1194, z=14});
108 Game.createMonster("Shaburak Demon", {x=4126, y=1201, z=14});
109 elseif item.uid == 10506 then
110 Game.createMonster("Shaburak Demon", {x=4207, y=1198, z=14});
111 Game.createMonster("Shaburak Demon", {x=4212, y=1199, z=14});
112 Game.createMonster("Shaburak Demon", {x=4217, y=1198, z=14});
113 Game.createMonster("Shaburak Demon", {x=4221, y=1199, z=14});
114 Game.createMonster("Shaburak Demon", {x=4226, y=1097, z=14});
115 Game.createMonster("Shaburak Demon", {x=4228, y=1203, z=14});
116 Game.createMonster("Shaburak Demon", {x=4230, y=1198, z=14});
117 Game.createMonster("Shaburak Demon", {x=4231, y=1194, z=14});
118 Game.createMonster("Shaburak Demon", {x=4234, y=1201, z=14});
119 end
120 end
121 else
122 if not party then
123 creature:say("ErroR - Portais Resetados.", TALKTYPE_MONSTER_SAY)
124 creature:setStorageValue(STORAGE_BONEBROOK, 02)
125 creature:getPosition():sendMagicEffect(03)
126 else
127 local members = party:getMembers()
128 members[#members + 1] = party:getLeader()
129 for _, member in ipairs(members) do
130 member:say("ErroR - Portais Resetados.", TALKTYPE_MONSTER_SAY)
131 member:setStorageValue(STORAGE_BONEBROOK, 02)
132 end
133 end
134 end
135 else
136 creature:say("Todos os portais foram selados.", TALKTYPE_MONSTER_SAY)
137 end
138 end
139 end
140 return true
141end
142