Skip to content

Commit 0a04655

Browse files
committed
2 parents fb0de03 + 0786a6a commit 0a04655

23 files changed

Lines changed: 323 additions & 167 deletions

ngengine_public.jar

-648 Bytes
Binary file not shown.

scripts/buffs/me_evasion_1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
def setup(core, actor, buff):
44
core.skillModService.addSkillMod(actor, 'expertise_dodge', 35)
5-
core.skillModService.addSkillMod(actor, 'expertise_evasion_chance', 50)
5+
core.skillModService.addSkillMod(actor, 'display_only_evasion', 5000)
66
core.skillModService.addSkillMod(actor, 'combat_evasion_value', 50)
77
return
88

99
def removeBuff(core, actor, buff):
1010
core.skillModService.deductSkillMod(actor, 'expertise_dodge', 35)
11-
core.skillModService.deductSkillMod(actor, 'expertise_evasion_chance', 50)
11+
core.skillModService.deductSkillMod(actor, 'display_only_evasion', 5000)
1212
core.skillModService.deductSkillMod(actor, 'combat_evasion_value', 50)
1313
return
1414

scripts/commands/addfriend.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ def setup():
55

66
def run(core, actor, target, commandString):
77
actorGhost = actor.getSlottedObject("ghost")
8+
89
chatSrvc = core.chatService
910
if chatSrvc and actorGhost and commandString:
10-
chatSrvc.addFriend(actorGhost, commandString, 1)
11+
if actorGhost.getFriendList().contains(commandString.split(" ")[0].lower()):
12+
actor.sendSystemMessage(commandString.split(" ")[0].lower() + ' is already in your friend list.', 0)
13+
return
14+
else:
15+
chatSrvc.addFriend(actorGhost, commandString)
1116
return

scripts/commands/addignore.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,14 @@ def setup():
66
def run(core, actor, target, commandString):
77
actorGhost = actor.getSlottedObject("ghost")
88
chatSrvc = core.chatService
9+
10+
if not actorGhost and chatSrvc and commandString:
11+
return
12+
13+
if actorGhost.getIgnoreList().contains(commandString.split(" ")[0].lower()):
14+
actor.sendSystemMessage(commandString.split(' ')[0].lower() + ' is already in your ignore list.', 0)
15+
return
16+
917
chatSrvc.addToIgnoreList(actor, commandString)
18+
1019
return

scripts/commands/findfriend.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from resources.objects.waypoint import WaypointObject
2+
from engine.resources.common import CRC
13
import sys
24

35
def setup():
@@ -11,8 +13,29 @@ def run(core, actor, target, commandString):
1113
friendObj = core.chatService.getObjectByFirstName(friend)
1214
if friendObj is not None:
1315
if friendObj.getSlottedObject('ghost').getFriendList().contains(actor.getCustomName().lower().split(' ')[0]):
14-
fPos = friendObj.getPosition()
15-
core.commandService.callCommand(actor, 'waypoint', None, friendObj.getPlanet().name + ' ' + str(fPos.x) + ' ' + str(fPos.z) + ' ' + str(fPos.y) + ' blue ' + friendObj.getCustomName())
16+
createWaypoint(core, actor, friendObj)
1617
return
1718
return
18-
return
19+
return
20+
21+
22+
def createWaypoint(core, actor, friendObj):
23+
ghost = actor.getSlottedObject('ghost')
24+
friendName = friendObj.getCustomName().split(' ')[0]
25+
wp = WaypointObject()
26+
27+
for wp in ghost.getWaypoints():
28+
if wp.getName() == friendName and wp.getPlanet() == friendObj.getPlanet():
29+
core.commandService.callCommand(actor, 'serverdestroyobject', wp, '')
30+
break
31+
32+
waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', friendObj.getPlanet(), friendObj.getWorldPosition().x, friendObj.getWorldPosition().z, friendObj.getWorldPosition().y)
33+
waypoint.setName(friendName)
34+
waypoint.setActive(True)
35+
waypoint.setColor(WaypointObject.YELLOW)
36+
waypoint.setName(friendName)
37+
waypoint.setPlanetCRC(CRC.StringtoCRC(friendObj.getPlanet().name))
38+
waypoint.setStringAttribute('', '')
39+
ghost.waypointAdd(waypoint)
40+
actor.sendSystemMessage('A waypoint has been created in your datapad at the location.', 0)
41+
return

scripts/commands/getfriendlist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def setup():
55
return
66

77
def run(core, actor, target, commandString):
8-
ghost = actor.getSlottedObject('ghost')
9-
friendsListMessage = ChatOnGetFriendsList(ghost)
10-
actor.getClient().getSession().write(friendsListMessage.serialize())
8+
#ghost = actor.getSlottedObject('ghost')
9+
#friendsListMessage = ChatOnGetFriendsList(ghost)
10+
#actor.getClient().getSession().write(friendsListMessage.serialize())
1111
return

scripts/commands/lfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ def setup():
66

77
def run(core, actor, target, commandString):
88
ghost = actor.getSlottedObject('ghost')
9-
print ('Command recieved!')
109
ghost.toggleFlag(PlayerFlags.LFG)
1110
return

scripts/commands/meditate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ def setup():
66
def run(core, actor, target, commandString):
77
##To do make it reset moodanimations when meditation is cancled.
88

9+
if core.collectionService.isComplete(actor, 'inv_holocron_collection_02') is False:
10+
return
11+
912
if actor.getPosture() != 0x08:
1013
actor.sendSystemMessage('You need to sit',0)
1114
actor.setMoodAnimation('neutral')

scripts/commands/waypoint.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def run(core, actor, target, commandString):
2222
planet = core.terrainService.getPlanetByName(commandArgs[0])
2323
waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', planet, float(commandArgs[1]), float(commandArgs[2]), float(commandArgs[3]))
2424
waypoint.setActive(True)
25-
waypoint.setColor(colorCheck(core, actor, target, commandString, commandArgs[4]))
25+
waypoint.setColor(colorCheck(commandArgs[4]))
2626
name = commandString.split(" ", 5)
2727
waypoint.setName(name[5])
2828
waypoint.setPlanetCRC(crc.StringtoCRC(planet.getName()))
@@ -89,7 +89,10 @@ def run(core, actor, target, commandString):
8989
waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', actor.getPlanet(), actor.getWorldPosition().x, actor.getWorldPosition().z, actor.getWorldPosition().y)
9090
waypoint.setActive(True)
9191
waypoint.setColor(WaypointObject.BLUE)
92-
waypoint.setName(commandString)
92+
if commandString == '':
93+
waypoint.setName(actor.getPlanet().name.capitalize())
94+
else:
95+
waypoint.setName(commandString)
9396
waypoint.setPlanetCRC(crc.StringtoCRC(actor.getPlanet().getName()))
9497
waypoint.setStringAttribute('', '') # This simply allows the attributes to display (nothing else has to be done)
9598
actorPlayer.waypointAdd(waypoint)
@@ -98,7 +101,7 @@ def run(core, actor, target, commandString):
98101

99102
return
100103

101-
def colorCheck(core, actor, target, commandString, validcolors):
104+
def colorCheck(validcolors):
102105
if validcolors == "blue":
103106
return WaypointObject.BLUE
104107
if validcolors == "green":

src/main/NGECore.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ public void initiateShutdown() {
528528
synchronized(getActiveConnectionsMap()) {
529529
for(Client client : getActiveConnectionsMap().values()) {
530530
client.getSession().close(true);
531+
connectionService.disconnect(client.getSession());
531532
}
532533
}
533534

0 commit comments

Comments
 (0)