Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Game
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
264
Issues
264
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Open RSC
Game
Commits
da6f3ca9
Commit
da6f3ca9
authored
Jul 14, 2019
by
Luis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.0' into '2.0.0'
Fix check guard varrock for vials Closes
#2188
See merge request
!2231
parents
1153e2d8
63f52663
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
server/plugins/com/openrsc/server/plugins/defaults/DoorAction.java
...ugins/com/openrsc/server/plugins/defaults/DoorAction.java
+9
-6
server/src/com/openrsc/server/plugins/Functions.java
server/src/com/openrsc/server/plugins/Functions.java
+8
-2
No files found.
server/plugins/com/openrsc/server/plugins/defaults/DoorAction.java
View file @
da6f3ca9
...
...
@@ -7,6 +7,7 @@ import com.openrsc.server.Server;
import
com.openrsc.server.event.ShortEvent
;
import
com.openrsc.server.external.ItemId
;
import
com.openrsc.server.external.NpcId
;
import
com.openrsc.server.model.Point
;
import
com.openrsc.server.model.Skills
;
import
com.openrsc.server.model.container.Item
;
import
com.openrsc.server.model.entity.GameObject
;
...
...
@@ -1212,30 +1213,32 @@ public class DoorAction {
return
;
}
if
(
player
.
getX
()
>=
94
)
{
if
(
player
.
getQuestStage
(
Constants
.
Quests
.
BIOHAZARD
)
==
7
)
{
if
(
player
.
getQuestStage
(
Constants
.
Quests
.
BIOHAZARD
)
>=
6
&&
player
.
getQuestStage
(
Constants
.
Quests
.
BIOHAZARD
)
<
8
)
{
Npc
guard
=
getNearestNpc
(
player
,
NpcId
.
GUARD_VARROCKGATE
.
id
(),
10
);
if
(
guard
!=
null
)
{
npcTalk
(
player
,
guard
,
"Halt. I need to conduct a search on you"
,
"There have been reports of a someone bringing a virus into Varrock"
);
}
if
(
hasItem
(
player
,
ItemId
.
ETHENEA
.
id
()))
{
while
(
player
.
getInventory
().
remove
(
new
Item
(
ItemId
.
ETHENEA
.
id
()))
!=
-
1
)
;
removeItem
(
player
,
ItemId
.
ETHENEA
.
id
(),
1
)
;
player
.
message
(
"He takes the vial of ethenea from you"
);
}
if
(
hasItem
(
player
,
ItemId
.
SULPHURIC_BROLINE
.
id
()))
{
while
(
player
.
getInventory
().
remove
(
new
Item
(
ItemId
.
SULPHURIC_BROLINE
.
id
()))
!=
-
1
)
;
removeItem
(
player
,
ItemId
.
SULPHURIC_BROLINE
.
id
(),
1
)
;
player
.
message
(
"He takes the vial of sulphuric broline from you"
);
}
if
(
hasItem
(
player
,
ItemId
.
LIQUID_HONEY
.
id
()))
{
while
(
player
.
getInventory
().
remove
(
new
Item
(
ItemId
.
LIQUID_HONEY
.
id
()))
!=
-
1
)
;
removeItem
(
player
,
ItemId
.
LIQUID_HONEY
.
id
(),
1
)
;
player
.
message
(
"He takes the vial of liquid honey from you"
);
}
}
player
.
teleport
(
92
,
522
,
false
);
player
.
message
(
"you open the gate and pass through"
);
doGate
(
player
,
obj
,
514
,
new
Point
(
92
,
522
));
}
else
{
player
.
message
(
"you open the gate and pass through"
);
doGate
(
player
,
obj
,
514
);
}
player
.
message
(
"you open the gate and pass through"
);
return
;
case
93
:
// Red dragon gate (140, 180)
...
...
server/src/com/openrsc/server/plugins/Functions.java
View file @
da6f3ca9
...
...
@@ -983,8 +983,12 @@ public class Functions {
public
static
void
delayedSpawnObject
(
final
GameObjectLoc
loc
,
final
int
time
)
{
post
(()
->
World
.
getWorld
().
delayedSpawnObject
(
loc
,
time
),
"Delayed Add Game Object"
);
}
public
static
void
doGate
(
final
Player
p
,
final
GameObject
object
,
int
replaceID
)
{
doGate
(
p
,
object
,
replaceID
,
null
);
}
public
static
void
doGate
(
final
Player
p
,
final
GameObject
object
,
int
replaceID
,
Point
destination
)
{
p
.
setBusyTimer
(
650
);
// 0 - East
// 1 - Diagonal S- NE
...
...
@@ -1000,7 +1004,9 @@ public class Functions {
registerObject
(
new
GameObject
(
object
.
getLocation
(),
replaceID
,
object
.
getDirection
(),
object
.
getType
()));
int
dir
=
object
.
getDirection
();
if
(
dir
==
0
)
{
if
(
destination
!=
null
&&
Math
.
abs
(
p
.
getX
()
-
destination
.
getX
())
<=
5
&&
Math
.
abs
(
p
.
getY
()
-
destination
.
getY
())
<=
5
)
{
movePlayer
(
p
,
destination
.
getX
(),
destination
.
getY
());
}
else
if
(
dir
==
0
)
{
if
(
p
.
getX
()
>=
object
.
getX
())
{
movePlayer
(
p
,
object
.
getX
()
-
1
,
object
.
getY
());
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment