Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Ziggeh
2014-02-20 13:03:05 +01:00
29 changed files with 907 additions and 63 deletions
+10
View File
@@ -0,0 +1,10 @@
import sys
from protocol.swg.objectControllerObjects import BiographyUpdate
from protocol.swg import ObjControllerMessage
def setup():
return
def run(core, actor, target, commandString):
print ('do you do anything?!')
return
+9 -3
View File
@@ -10,9 +10,15 @@ def run(core, actor, target, commandString):
print playerObject.getProfession()
if not playerObject or playerObject.getProfession() != "entertainer_1a":
return
print 'x'
if actor.getPosture() != 0x09:
if target is None or actor.getObjectId() == target.getObjectId():
print ('Buffing Player: ' + str(target.getObjectId()) + ' or: ' + target.getCustomName())
openBuffWindow = BuffBuilderStartMessage(actor.getObjectId(), actor.getObjectId(), actor.getObjectId())
objController = ObjControllerMessage(11, openBuffWindow)
actor.getClient().getSession().write(objController.serialize())
return
if actor.getPosture() != 0x09 and target.getObjectId() != actor.getObjectId():
actor.sendSystemMessage('@performance:insp_buff_must_perform', 2)
return
+1 -1
View File
@@ -1,4 +1,4 @@
from resources.common import PlayerFlags
from resources.datatables import PlayerFlags
import sys
def setup():
+1 -1
View File
@@ -1,4 +1,4 @@
from resources.common import PlayerFlags
from resources.datatables import PlayerFlags
import sys
def setup():
+24
View File
@@ -0,0 +1,24 @@
import sys
from protocol.swg.objectControllerObjects import BiographyUpdate
from protocol.swg import ObjControllerMessage
# Called when open Character tab
def setup():
return
def run(core, actor, target, commandString):
if actor is None:
return
if target is None:
return
tGhost = target.getSlottedObject('ghost')
bioUpdate = BiographyUpdate(actor.getObjectId(), target.getObjectId(), tGhost.getBiography())
objMsg = ObjControllerMessage(11, bioUpdate)
actor.getClient().getSession().write(objMsg.serialize())
return
+1 -1
View File
@@ -1,5 +1,5 @@
from java.lang import Integer
from resources.common import PlayerFlags
from resources.datatables import PlayerFlags
import sys
def setup():
+25
View File
@@ -0,0 +1,25 @@
import sys
from protocol.swg.objectControllerObjects import BiographyUpdate
from protocol.swg import ObjControllerMessage
def setup():
return
def run(core, actor, target, commandString):
if actor is None:
return
if len(commandString) > 200:
return
ghost = actor.getSlottedObject('ghost')
if ghost is None:
return
ghost.setBiography(commandString)
bioUpdate = BiographyUpdate(actor.getObjectId(), actor.getObjectId(), commandString)
objMsg = ObjControllerMessage(11, bioUpdate)
actor.getClient().getSession().write(objMsg.serialize())
return
+6
View File
@@ -45,4 +45,10 @@ def run(core, actor, target, commandString):
actor.addAbility(str(arg1))
actor.sendSystemMessage('You have learned ' + arg1 + '')
elif command == 'anim' and arg1:
actor.setCurrentAnimation(arg1)
actor.sendSystemMessage('Performed ' + arg1 ,0)
elif command == 'changeBio' and arg1:
actor.getSlottedObject('ghost').setBiography(arg1)
return
+140
View File
@@ -3,5 +3,145 @@ import sys
def addPlanetSpawns(core, planet):
stcSvc = core.staticService
# Theed Spawns
# OutSide
loruna = stcSvc.spawnObject('object/mobile/shared_loruna_scathe.iff', 'naboo', long(0), float(-5149), float(6), float(4286), float(0.34), float(0.93))
loruna.setCustomName2('Loruna Scathe')
pooja = stcSvc.spawnObject('object/mobile/shared_dressed_pooja_naberrie.iff', 'naboo', long(0), float(-5479.1), float(14), float(4467.3), float(-0.96), float(0.25))
pooja.setCustomName2('Pooja Naberrie')
vaikannaSilverlight = stcSvc.spawnObject('object/mobile/shared_dressed_herald_naboo_01.iff', 'naboo', long(0), float(-5484), float(10), float(4424), float(-0.93), float(0.34))
vaikannaSilverlight.setCustomName2('Vaik\'anna Silverlight')
hannaSkiyah = stcSvc.spawnObject('object/mobile/shared_dressed_herald_noble_twk_female_01.iff', 'naboo', long(0), float(-5480), float(-0.5), float(4398), float(0.44), float(0.89))
hannaSkiyah.setCustomName2('Hanna S\'kiyah')
# Keren Spawns
# Cantina interior
lergoBrazee = stcSvc.spawnObject('object/mobile/shared_dressed_lergo_brazee.iff', 'naboo', long(5), float(2.8), float(-0.9), float(-5.3), float(0.25), float(0.96))
lergoBrazee.setCustomName2('Lergo Brazee')
# Starport interior
gavynSykes = stcSvc.spawnObject('object/mobile/shared_dressed_gavyn_sykes.iff', 'naboo', long(2125382), float(9.3), float(0.6), float(66.6), float(-0.90), float(0.42))
gavynSykes.setCustomName2('Capt. Gavyn Sykes')
#Miscellaneous Building Interiors
kritusMorven = stcSvc.spawnObject('object/mobile/shared_dressed_kritus_morven.iff', 'naboo', long(1685077), float(-3.9), float(-4.9), float(-7.5), float(-0.57), float(0.81))
kritusMorven.setCustomName2('Kritus Morven')
Raev = stcSvc.spawnObject('object/mobile/ep3/shared_ep3_clone_relics_major_raev.iff', 'naboo', long(1393881), float(-10), float(1.7), float(-9.5), float(0.38), float(0.92))
Raev.setCustomName2('Major Raev')
# Outside
brennis = stcSvc.spawnObject('object/mobile/shared_dressed_brennis_doore.iff', 'naboo', long(0), float(1740), float(12), float(2657), float(-0.99), float(0))
brennis.setCustomName2('Brennis Doore')
demitri = stcSvc.spawnObject('object/mobile/shared_dressed_herald_servant_naboo_human_male.iff', 'naboo', long(0), float(1673), float(12), float(2582), float(0.31), float(0.94))
demitri.setCustomName2('Demitri Firewatcher')
ogden = stcSvc.spawnObject('object/mobile/shared_smuggler_broker_ogden.iff', 'naboo', long(0), float(1907), float(12), float(2352), float(0.97), float(0.22))
ogden.setCustomName2('Ogden')
# Kaadara Spawns
#Miscellaneous Building Interiors
barnSinkko = stcSvc.spawnObject('object/mobile/shared_dressed_imperial_trainer_space_03.iff', 'naboo', long(1741494), float(-1.3), float(1.8), float(-14), float(-0.34), float(0.93))
barnSinkko.setCustomName2('Lt. Barn Sinkko')
# OutSide
dakk = stcSvc.spawnObject('object/mobile/shared_dressed_acklay_dakk.iff', 'naboo', long(0), float(5167), float(-192), float(6674), float(-0.99), float(0.04))
dakk.setCustomName2('Dakk')
panaka = stcSvc.spawnObject('object/mobile/shared_panaka.iff', 'naboo', long(0), float(5196.6), float(-192), float(6712.8), float(0.99), float(0.04))
# Dejaa Peak Spawns
# OutSide
arvenWendik = stcSvc.spawnObject('object/mobile/shared_dressed_arven_wendik.iff', 'naboo', long(0), float(4710), float(330), float(-1432), float(-0.70), float(0.70))
arvenWendik.setCustomName2('Arven Wendik')
damaliaKorde = stcSvc.spawnObject('object/mobile/shared_dressed_damalia_korde.iff', 'naboo', long(0), float(5139), float(346.5), float(-1530.9), float(0.34), float(0.93))
damaliaKorde.setCustomName2('Damalia Korde')
hermanPate = stcSvc.spawnObject('object/mobile/shared_naboo_herman_pate.iff', 'naboo', long(0), float(4871.1), float(360.6), float(-1442.1), float(0), float(1))
hermanPate.setCustomName2('Herman Pate')
kimaNazith = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_female_03.iff', 'naboo', long(0), float(4972), float(360), float(-1583), float(-0.95), float(0.28))
kimaNazith.setCustomName2('Kima Nazith')
kippyMartin = stcSvc.spawnObject('object/mobile/shared_naboo_kippy_martin.iff', 'naboo', long(0), float(4324), float(295.1), float(-1250), float(0.55), float(0.82))
kippyMartin.setCustomName2('Kippy Martin')
ruab = stcSvc.spawnObject('object/mobile/shared_smuggler_fence_ruab.iff', 'naboo', long(0), float(4998), float(360), float(-1485), float(-0.34), float(0.93))
ruab.setCustomName2('Ruab')
tanoaVills = stcSvc.spawnObject('object/mobile/shared_naboo_tanoa_vills.iff', 'naboo', long(0), float(4740), float(330), float(-1322), float(-0.96), float(0.27))
tanoaVills.setCustomName2('Tanoa Vills')
vanceGroten = stcSvc.spawnObject('object/mobile/shared_naboo_vance_groten.iff', 'naboo', long(0), float(5144), float(346.5), float(-1530), float(-0.17), float(0.98))
vanceGroten.setCustomName2('Vance Groten')
walker = stcSvc.spawnObject('object/mobile/shared_naboo_walker_luskeske.iff', 'naboo', long(0), float(4994), float(360), float(-1506), float(-0.97), float(0.21))
walker.setCustomName2('Walker Luskeske')
zanier = stcSvc.spawnObject('object/mobile/shared_naboo_professor_hudmasse.iff', 'naboo', long(0), float(4690), float(330.2), float(-1391), float(0.52), float(0.84))
zanier.setCustomName2('Professor Zanier Hudmasse')
# Moenia Spawns
# Cantina interior
borvo = stcSvc.spawnObject('object/mobile/shared_borvo.iff', 'naboo', long(121), float(-29), float(-0.5), float(7.9), float(0.44), float(0.89))
borvo.setCustomName2('Borvo The Hutt')
# OutSide
c3tc = stcSvc.spawnObject('object/mobile/shared_3po_protocol_droid_silver.iff', 'naboo', long(0), float(4723), float(3.8), float(-4935), float(-0.99), float(0))
c3tc.setCustomName2('C-3TC')
dilvin = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_male_03.iff', 'naboo', long(0), float(4893), float(3.8), float(-4998), float(0.96), float(0.27))
dilvin.setCustomName2('Dilvin Lormurojo')
ebenn = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_male_02.iff', 'naboo', long(0), float(4869), float(3.8), float(-4875), float(-0.70), float(0.70))
ebenn.setCustomName2('Ebenn Q3 Baobab')
v3fx = stcSvc.spawnObject('object/mobile/shared_space_rebel_tier1_naboo_v3fx.iff', 'naboo', long(0), float(4764.2), float(6.1), float(-4795), float(0.99), float(0.08))
v3fx.setCustomName2('V3-FX')
roninLightrunner = stcSvc.spawnObject('object/mobile/shared_dressed_herald_naboo_02.iff', 'naboo', long(0), float(4810), float(6.3), float(-4977), float(0), float(1))
roninLightrunner.setCustomName2('Ronin Lightrunner')
dagorel = stcSvc.spawnObject('object/mobile/shared_dressed_gendra.iff', 'naboo', long(0), float(4471), float(4), float(-4714), float(-0.64), float(0.76))
dagorel.setCustomName2('Dagorel')
# Emperor's Retreat interior
kaja = stcSvc.spawnObject('object/mobile/shared_kaja_orzee.iff', 'naboo', long(1418872), float(1.9), float(0.2), float(-13.4), float(0), float(1))
kaja.setCustomName2('Kaja Or\'Zee')
ltVelso = stcSvc.spawnObject('object/mobile/shared_dressed_corvette_imperial_velso.iff', 'naboo', long(1418874), float(23.6), float(0.2), float(-19), float(-0.93), float(0.34))
ltVelso.setCustomName2('Lt. Velso')
royalGuard1 = stcSvc.spawnObject('object/mobile/shared_royal_guard.iff', 'naboo', long(1418874), float(17), float(0.2), float(-31), float(0), float(1))
royalGuard2 = stcSvc.spawnObject('object/mobile/shared_royal_guard.iff', 'naboo', long(1418874), float(9), float(0.2), float(-31), float(0), float(1))
vrke = stcSvc.spawnObject('object/mobile/shared_space_imperial_tier3_naboo_vrke.iff', 'naboo', long(1418875), float(24.3), float(0.2), float(-39.6), float(0), float(1))
vrke.setCustomName2('Inquisitor Vrke')
loamRedge = stcSvc.spawnObject('object/mobile/shared_loam_redge.iff', 'naboo', long(1418875), float(18.6), float(0.2), float(-42), float(0.34), float(0.93))
loamRedge.setCustomName2('Loam Redge')
hethrir = stcSvc.spawnObject('object/mobile/shared_lord_hethrir.iff', 'naboo', long(1418876), float(4.6), float(0.2), float(-41.3), float(0), float(1))
hethrir.setCustomName2('Lord Hethrir')
jaceYiaso = stcSvc.spawnObject('object/mobile/shared_space_imperial_tier4_naboo_inquisitor.iff', 'naboo', long(1418884), float(-44), float(0.2), float(-31.9), float(0), float(1))
jaceYiaso.setCustomName2('Grand Inquisitor Ja\'ce Yiaso')
vader = stcSvc.spawnObject('object/mobile/shared_darth_vader.iff', 'naboo', long(1418884), float(-57), float(0.2), float(-24), float(0.70), float(0.70))
# Outside Emperor's Retreat
veers = stcSvc.spawnObject('object/mobile/naboo_npc/shared_veers.iff', 'naboo', long(0), float(2368), float(291), float(-3921), float(0.64), float(0.76))
veers.setCustomName2('Colonel Veers')
thrawn = stcSvc.spawnObject('object/mobile/naboo_npc/shared_thrawn.iff', 'naboo', long(0), float(2369), float(291), float(-3922), float(0.34), float(0.93))
thrawn.setCustomName2('Captain Thrawn')
fazoll = stcSvc.spawnObject('object/mobile/shared_space_imperial_tier2_naboo.iff', 'naboo', long(0), float(2444), float(292), float(-3896), float(-0.996194), float(0.087155))
fazoll.setCustomName2('Inquisitor Fa\'Zoll')
return
+263 -31
View File
@@ -5,33 +5,34 @@ from resources.datatables import StateStatus
def addPlanetSpawns(core, planet):
stcSvc = core.staticService
# Wayfar Life Day, by Wefi, modified by Fingies
stcSvc.spawnObject('object/mobile/shared_lifeday_saun_dann.iff', 'tatooine', long(0), float(-5037.00), float(75), float(-6561), float(-0.75), float(0)) # Life Day
figlife = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan.iff', 'tatooine', long(0), float(-5046.00), float(75), float(-6560), float(-0.75), float(0)) # LD Figrin
figlife.setCustomName2('Figrin D\'an')
bandtat1 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5040.00), float(75), float(-6557), float(-0.75), float(0)) # LD Band 1
bandtat1.setCustomName2('Doikk Nats')
bandtat2 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5043.00), float(75), float(-6559), float(-0.75), float(0)) # LD band 2
bandtat2.setCustomName2('Tech Mor')
bandtat3 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5048.00), float(75), float(-6557), float(-0.75), float(0)) # LD Band 3
bandtat3.setCustomName2('Nalan Cheel')
bandtat4 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5045.00), float(75), float(-6555), float(-0.75), float(0)) # LD band 4
bandtat4.setCustomName2('Sunil Eide')
reblifevendor = stcSvc.spawnObject('object/mobile/shared_life_day_rebel_vendor.iff', 'tatooine', long(0), float(-5212.2), float(75.0), float(-6571.7), float(0.656), float(-0.7547)) #Rebel Wookiee Vendor
reblifevendor.setCustomName2('Oolovv \(Wookiee Freedom Fighter)')
reblifesold1 = stcSvc.spawnObject('object/mobile/shared_rebel_snow_m_01.iff', 'tatooine', long(0), float(-5208.8), float(75.0), float(-6569.6), float(0.669), float(-0.743)) #Rebel Vendor Guard 1
reblifesold1.setCustomName2('a Rebel Soldier')
reblifesold2 = stcSvc.spawnObject('object/mobile/shared_rebel_snow_m_01.iff', 'tatooine', long(0), float(-5208.8), float(75.0), float(-6573.1), float(0.669), float(-0.743)) #Rebel Vendor Guard 2
reblifesold2.setCustomName2('a Rebel Soldier')
implifevendor = stcSvc.spawnObject('object/mobile/shared_life_day_imperial_vendor.iff', 'tatooine', long(0), float(-5097.1), float(75.0), float(-6570.7), float(0.0087), float(-0.9999)) #Imp Vendor
implifevendor.setCustomName2('Sstrigge \(Trandoshan \'Trader\')')
implifesold1 = stcSvc.spawnObject('object/mobile/shared_snowtrooper_s01.iff', 'tatooine', long(0), float(-5092.2), float(75.0), float(-6569.0), float(0.0087), float(-0.9999)) #Imp Vendor Guard 1
implifesold1.setCustomName2('a Stormtrooper')
implifesold2 = stcSvc.spawnObject('object/mobile/shared_snowtrooper_s01.iff', 'tatooine', long(0), float(-5100.8), float(75.0), float(-6569.4), float(0.0087), float(-0.9999)) #Imp Vendor Guard 2
implifesold2.setCustomName2('a Stormtrooper')
stcSvc.spawnObject('object/tangible/instrument/shared_nalargon.iff', 'tatooine', long(0), float(-5045.00), float(75), float(-6555), float(0.999132931232), float(-0.0416347384453)) # Drums
stcSvc.spawnObject('object/tangible/instrument/shared_ommni_box.iff', 'tatooine', long(0), float(-5043.00), float(75), float(-6559), float(0.999132931232), float(-0.0416347384453)) # Box
# stcSvc.spawnObject('object/mobile/shared_lifeday_saun_dann.iff', 'tatooine', long(0), float(-5037.00), float(75), float(-6561), float(-0.75), float(0)) # Life Day
# figlife = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan.iff', 'tatooine', long(0), float(-5046.00), float(75), float(-6560), float(-0.75), float(0)) # LD Figrin
# figlife.setCustomName2('Figrin D\'an')
# bandtat1 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5040.00), float(75), float(-6557), float(-0.75), float(0)) # LD Band 1
# bandtat1.setCustomName2('Doikk Nats')
# bandtat2 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5043.00), float(75), float(-6559), float(-0.75), float(0)) # LD band 2
# bandtat2.setCustomName2('Tech Mor')
# bandtat3 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5048.00), float(75), float(-6557), float(-0.75), float(0)) # LD Band 3
# bandtat3.setCustomName2('Nalan Cheel')
# bandtat4 = stcSvc.spawnObject('object/mobile/shared_lifeday_figrin_dan_band.iff', 'tatooine', long(0), float(-5045.00), float(75), float(-6555), float(-0.75), float(0)) # LD band 4
# bandtat4.setCustomName2('Sunil Eide')
# reblifevendor = stcSvc.spawnObject('object/mobile/shared_life_day_rebel_vendor.iff', 'tatooine', long(0), float(-5212.2), float(75.0), float(-6571.7), float(0.656), float(-0.7547)) #Rebel Wookiee Vendor
# reblifevendor.setCustomName2('Oolovv \(Wookiee Freedom Fighter)')
# reblifesold1 = stcSvc.spawnObject('object/mobile/shared_rebel_snow_m_01.iff', 'tatooine', long(0), float(-5208.8), float(75.0), float(-6569.6), float(0.669), float(-0.743)) #Rebel Vendor Guard 1
# reblifesold1.setCustomName2('a Rebel Soldier')
# reblifesold2 = stcSvc.spawnObject('object/mobile/shared_rebel_snow_m_01.iff', 'tatooine', long(0), float(-5208.8), float(75.0), float(-6573.1), float(0.669), float(-0.743)) #Rebel Vendor Guard 2
# reblifesold2.setCustomName2('a Rebel Soldier')
# implifevendor = stcSvc.spawnObject('object/mobile/shared_life_day_imperial_vendor.iff', 'tatooine', long(0), float(-5097.1), float(75.0), float(-6570.7), float(0.0087), float(-0.9999)) #Imp Vendor
# implifevendor.setCustomName2('Sstrigge \(Trandoshan \'Trader\')')
# implifesold1 = stcSvc.spawnObject('object/mobile/shared_snowtrooper_s01.iff', 'tatooine', long(0), float(-5092.2), float(75.0), float(-6569.0), float(0.0087), float(-0.9999)) #Imp Vendor Guard 1
# implifesold1.setCustomName2('a Stormtrooper')
# implifesold2 = stcSvc.spawnObject('object/mobile/shared_snowtrooper_s01.iff', 'tatooine', long(0), float(-5100.8), float(75.0), float(-6569.4), float(0.0087), float(-0.9999)) #Imp Vendor Guard 2
# implifesold2.setCustomName2('a Stormtrooper')
# stcSvc.spawnObject('object/tangible/instrument/shared_nalargon.iff', 'tatooine', long(0), float(-5045.00), float(75), float(-6555), float(0.999132931232), float(-0.0416347384453)) # Drums
# stcSvc.spawnObject('object/tangible/instrument/shared_ommni_box.iff', 'tatooine', long(0), float(-5043.00), float(75), float(-6559), float(0.999132931232), float(-0.0416347384453)) # Box
# Mos Eisley Spawns: WORK IN PROGRESS by Levarris
@@ -116,18 +117,33 @@ def addPlanetSpawns(core, planet):
commoner10 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_nikto_male_04.iff', 'tatooine', long(1082877), float(2.1), float(-0.9), float(-8.4), float(0.42), float(0.91))
commoner10.setCustomName2('a Commoner')
anetiaKahryn = stcSvc.spawnObject('object/mobile/shared_dressed_twk_entertainer.iff', 'tatooine', long(1082878), float(19.8), float(-0.9), float(-21), float(-0.03), float(0.99))
anetiaKahryn.setCustomName2('Anetia Kah\'ryn')
dravis = stcSvc.spawnObject('object/mobile/shared_space_privateer_tier1_tatooine.iff', 'tatooine', long(1082886), float(-21.7), float(-0.9), float(25.5), float(0.99), float(0.03))
dravis.setCustomName2('Dravis')
talonKarrde = stcSvc.spawnObject('object/mobile/shared_dressed_talon_karrde.iff', 'tatooine', long(1082887), float(-25.7), float(-0.5), float(8.8), float(0.21), float(0.97))
talonKarrde.setCustomName2('Talon Karrde')
#Starport Interior
bartender1 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_nikto_male_04.iff', 'tatooine', long(1106380), float(-59.1), float(2.6), float(39.5), float(0), float(0))
bartender1.setCustomName2('a Bartender')
#City Hall Interior
#Lucky Despot Interior
hansolo1 = stcSvc.spawnObject('object/mobile/shared_han_solo.iff', 'tatooine', long(26949), float(32.3), float(7.0), float(1.6), float(0), float(0))
hansolo1.setCustomName2('Han Solo')
#Medical Center Interior
#Theater Interior
#Miscellaneous Building Interiors
#Outside
businessman2 = stcSvc.spawnObject('object/mobile/shared_dressed_businessman_human_male_01.iff', 'tatooine', long(0), float(3663.3), float(4.0), float(-4738.6), float(0), float(0))
businessman2.setCustomName2('a Businessman')
@@ -144,7 +160,7 @@ def addPlanetSpawns(core, planet):
jawa1 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3663.3), float(5.0), float(-4858.6), float(0), float(0))
jawa1.setCustomName2('a Jawa')
commoner12 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_moncal_male_01.iff', 'tatooine', long(0), float(3512.2), float(5.0), float(-4764.2), float(0), float(0))
commoner12 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_moncal_male_01.iff', 'tatooine', long(0), float(3490.3), float(5.0), float(-4799.4), float(0), float(0))
commoner12.setCustomName2('a Scientist')
commoner13 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_zabrak_female_02.iff', 'tatooine', long(0), float(3559.7), float(5.0), float(-4725.9), float(0), float(0))
@@ -209,24 +225,240 @@ def addPlanetSpawns(core, planet):
noble4 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_03.iff', 'tatooine', long(0), float(3255.3), float(4.0), float(-4848.1), float(0.42), float(0.91))
noble4.setCustomName2('a Noble')
byxlePedette = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_opening_byxle.iff', 'tatooine', long(0), float(3365), float(5), float(-4639), float(0.99), float(0.12))
byxlePedette.setCustomName2('Byxle Pedette')
errikDarksider = stcSvc.spawnObject('object/mobile/shared_dressed_herald_tatooine_01.iff', 'tatooine', long(0), float(3381), float(4.6), float(-4498), float(0.91), float(0.40))
errikDarksider.setCustomName2('Errik Darksider')
gendra = stcSvc.spawnObject('object/mobile/shared_dressed_gendra.iff', 'tatooine', long(0), float(3308), float(5.6), float(-4785), float(0.84), float(0.53))
gendra.setCustomName2('Gendra')
lurval = stcSvc.spawnObject('object/mobile/shared_lurval.iff', 'tatooine', long(0), float(3387), float(5), float(-4791), float(-0.4), float(0.91))
lurval.setCustomName2('Lurval')
matildaCarson = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_02.iff', 'tatooine', long(0), float(3490.2), float(5), float(-4778), float(0.87), float(0.48))
matildaCarson.setCustomName2('Matilda Carson')
vanvi = stcSvc.spawnObject('object/mobile/shared_dressed_bestine_artist01.iff', 'tatooine', long(0), float(3312), float(5), float(-4655), float(0.95), float(-0.28))
vanvi.setCustomName2('Vanvi Hotn')
#Eisley Legacy Quest NPCs
vourk = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_opening_santos.iff', 'tatooine', long(0), float(3520.0), float(5.0), float(-4821.0), float(0.42), float(0.91))
vourk.setCustomName2('Vourk Ver\'Zremp')
mayor = stcSvc.spawnObject('object/mobile/shared_dressed_mayor_mikdanyell_guhrantt.iff', 'tatooine', long(1279960), float(1.2), float(2.5), float(5.4), float(0), float(0))
mayor.setCustomName2('Mayor Mikdanyell Guh\'rantt')
enthaKandela = stcSvc.spawnObject('object/mobile/shared_dressed_entha_kandela.iff', 'tatooine', long(0), float(3511), float(5.0), float(-4785), float(0.70), float(0.71))
enthaKandela.setCustomName2('Entha Kandela')
purvis = stcSvc.spawnObject('object/mobile/shared_dressed_purvis_arrison.iff', 'tatooine', long(0), float(3512.4), float(5.0), float(-4764.9), float(0.38), float(-0.92))
purvis.setCustomName2('Purvis Arrison')
peawpRdawc = stcSvc.spawnObject('object/mobile/shared_peawp_bodyguard_trainer.iff', 'tatooine', long(1189639), float(-11.8), float(1.1), float(-10.1), float(0), float(0))
peawpRdawc.setCustomName2('Peawp R\'dawc')
peawpRdawc = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_opening_niko.iff', 'tatooine', long(0), float(3506.7), float(5.0), float(-4795.8), float(0.70), float(0.71))
peawpRdawc.setCustomName2('Niko Brehe')
dunir = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_opening_dunir.iff', 'tatooine', long(0), float(3520.7), float(5.0), float(-4683.7), float(0.99), float(-0.08))
dunir.setCustomName2('Dunir')
#Eisley Ship Controller
stcSvc.spawnObject('object/mobile/shared_distant_ship_controller.iff', 'tatooine', long(0), float(3542.3), float(5.0), float(-4826.0), float(0.42), float(0.91))
# Mos Espa NPC Spawns
# Cantina Interior
dalaSocuna = stcSvc.spawnObject('object/mobile/shared_space_rebel_tier1_tatooine_socuna.iff', 'tatooine', long(1256068), float(-28.4), float(-0.5), float(9.4), float(0.33), float(0.94))
dalaSocuna.setCustomName2('Commander Da\'la Socuna')
watto = stcSvc.spawnObject('object/mobile/shared_watto.iff', 'tatooine', long(26670), float(4.7), float(-0.5), float(2.4), float(0.70), float(-0.71))
watto.setCustomName2('Watto')
#Exterior Uninteractables
commoner18 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_zabrak_female_02.iff', 'tatooine', long(0), float(-2915.3), float(5.0), float(2148.5), float(0), float(0))
commoner18.setCustomName2('a Commoner')
jawa10 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(-2966.3), float(5.0), float(2196.9), float(0), float(0))
jawa10.setCustomName2('a Jawa')
commoner19 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_06.iff', 'tatooine', long(0), float(-2960.4), float(5.0), float(2271.3), float(0), float(0))
commoner19.setCustomName2('a Commoner')
commoner20 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_devaronian_male_01.iff', 'tatooine', long(0), float(-2934.3), float(5.0), float(2298.9), float(0.71), float(0.71))
commoner20.setCustomName2('a Commoner')
commoner21 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_01.iff', 'tatooine', long(0), float(-2897.7), float(5.0), float(2345.4), float(0.71), float(0.71))
commoner21.setCustomName2('a Commoner')
commoner22 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_fat_twilek_male_01.iff', 'tatooine', long(0), float(-2763.8), float(5.0), float(2305.2), float(0.71), float(0.71))
commoner22.setCustomName2('a Commoner')
jawa11 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(-2936.8), float(5.0), float(2078.4), float(0.95105), float(0.3090))
jawa11.setCustomName2('a Jawa')
businessman4 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_trandoshan_male_02.iff', 'tatooine', long(0), float(-2914.2), float(5.0), float(2022.4), float(0), float(0))
businessman4.setCustomName2('a Businessman')
commoner23 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_moncal_male_01.iff', 'tatooine', long(0), float(-2904.1), float(5.0), float(1965.3), float(0.71), float(0.71))
commoner23.setCustomName2('a Commoner')
# Mos Entha NPC Spawns
#Outside
ankwee = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_entha_ankwee.iff', 'tatooine', long(0), float(1351), float(5.0), float(3108), float(0.42), float(0.91))
ankwee.setCustomName2('An\'kwee')
# Bestine NPC Spawns
# City hall
indigoSiyan = stcSvc.spawnObject('object/mobile/shared_dressed_indigo_siyan.iff', 'tatooine', long(926483), float(24.7), float(3.2), float(-30.7), float(-0.06), float(0.99))
indigoSiyan.setCustomName2('Indigo Siyan')
keanna = stcSvc.spawnObject('object/mobile/shared_dressed_keanna_likyna.iff', 'tatooine', long(926480), float(-18.7), float(3.2), float(20.6), float(-0.97), float(0.2))
keanna.setCustomName2('Keanna Li\'kyna')
oberhaur = stcSvc.spawnObject('object/mobile/shared_space_imperial_tier2_tatooine_oberhaur.iff', 'tatooine', long(926480), float(-21.9), float(3.2), float(26.9), float(0.99), float(0.01))
oberhaur.setCustomName2('Commander Oberhaur')
seanTrenwell = stcSvc.spawnObject('object/mobile/shared_dressed_sean_trenwell.iff', 'tatooine', long(926483), float(19.4), float(3.2), float(-36), float(-0.06), float(0.99))
seanTrenwell.setCustomName2('Sean Trenwell ')
talmont = stcSvc.spawnObject('object/mobile/shared_prefect_talmont.iff', 'tatooine', long(926475), float(-1.9), float(3.1), float(-10.3), float(0.99), float(0))
tourAryon = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_tour_aryon.iff', 'tatooine', long(926479), float(-36.8), float(1.3), float(0.3), float(0.8), float(0.59))
tourAryon.setCustomName2('Tour Aryon')
victorVisalis = stcSvc.spawnObject('object/mobile/shared_dressed_victor_visalis.iff', 'tatooine', long(926480), float(-26.7), float(3.2), float(20.8), float(0.96), float(0.24))
victorVisalis.setCustomName2('Victor Visalis')
wilhalmSkrim = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_wilhalm_skrim.iff', 'tatooine', long(926482), float(28.9), float(1.3), float(-6.0), float(0.23), float(0.97))
#Miscellaneous Building Interiors
akalColzet = stcSvc.spawnObject('object/mobile/shared_dressed_imperial_trainer_space_01.iff', 'tatooine', long(1212359), float(0.7), float(1.8), float(-14), float(0), float(0.99))
akalColzet.setCustomName2('lt. Akal Colzet')
fariousGletch = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_farious_gletch.iff', 'tatooine', long(1278989), float(2.0), float(-0.4), float(-5.7), float(-0.15), float(0.98))
pfilbeeJhorn = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_pfilbee_jhorn.iff', 'tatooine', long(1279923), float(5.1), float(0.1), float(-3.8), float(-0.7), float(0.71))
pfilbeeJhorn.setCustomName2('Pfilbee Jhorn')
#Hotel interior
gilBurtin = stcSvc.spawnObject('object/mobile/shared_dressed_industrialist_trainer_01.iff', 'tatooine', long(1223850), float(20.3), float(1.6), float(12.8), float(0.99), float(0))
gilBurtin.setCustomName2('Gil Burtin')
# Outside
barak = stcSvc.spawnObject('object/mobile/shared_smuggler_broker_barak.iff', 'tatooine', long(0), float(-1049), float(5.0), float(-3537), float(0.97), float(0.23))
barak.setCustomName2('Barak')
barrezz = stcSvc.spawnObject('object/mobile/shared_dressed_dressed_legacy_barrezz.iff', 'tatooine', long(0), float(-1146.8), float(98.0), float(-3892.1), float(0.75), float(0.65))
barrezz.setCustomName2('Commander Barrezz')
jasha = stcSvc.spawnObject('object/mobile/shared_dressed_bestinejobs_jasha.iff', 'tatooine', long(0), float(-1128), float(98.0), float(-3900), float(-0.42), float(0.90))
jasha.setCustomName2('Captain Jasha')
dkrn = stcSvc.spawnObject('object/mobile/shared_dressed_imperial_general_m.iff', 'tatooine', long(0), float(-1160), float(5.0), float(-3525), float(0.90), float(-0.41))
dkrn.setCustomName2('Commander D\'krn')
gunham = stcSvc.spawnObject('object/mobile/shared_dressed_imperial_lieutenant_m.iff', 'tatooine', long(0), float(-1125), float(12.2), float(-3620), float(0.9), float(0.42))
gunham.setCustomName2('Commander Gunham')
kormundThrylle = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_kormund_thrylle.iff', 'tatooine', long(0), float(-1043), float(10.0), float(-3530), float(0.99), float(0.06))
kormundThrylle.setCustomName2('Kormund Thrylle')
calebKnolar = stcSvc.spawnObject('object/mobile/shared_dressed_imperial_major_cold_m.iff', 'tatooine', long(0), float(-1149), float(98.0), float(-3903), float(0.42), float(0.91))
calebKnolar.setCustomName2('Major Caleb Knolar')
# Anchorhead NPC Spawns
# Cantina Interior
borraSetas = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_rodian_female_03.iff', 'tatooine', long(1213345), float(9.8), float(0.4), float(-1.2), float(-0.65), float(0.75))
borraSetas.setCustomName2('Borra Setas')
# Outside
aaphKoden = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_aaph_koden.iff', 'tatooine', long(0), float(129), float(5.0), float(-5399), float(-0.67), float(0.73))
aaphKoden.setCustomName2('Aaph Koden')
Alger = stcSvc.spawnObject('object/mobile/shared_smuggler_fence_alger.iff', 'tatooine', long(0), float(107), float(5.0), float(-5315), float(0.96), float(0.26))
Alger.setCustomName2('Alger')
carhlaBastra = stcSvc.spawnObject('object/mobile/shared_dressed_legacy_bastra.iff', 'tatooine', long(0), float(128), float(5.0), float(-5428), float(-0.26), float(0.96))
carhlaBastra.setCustomName2('Carh\'la Bastra')
cuanTalon = stcSvc.spawnObject('object/mobile/shared_dressed_legacy_cuan.iff', 'tatooine', long(0), float(-161.7), float(65.0), float(-5322.8), float(0), float(0))
cuanTalon.setCustomName2('Cuan Talon')
dromaOrdo = stcSvc.spawnObject('object/mobile/shared_dressed_anchorjobs_ordo.iff', 'tatooine', long(0), float(110), float(52.0), float(-5431), float(0.36), float(0.93))
dromaOrdo.setCustomName2('Droma Ordo')
Sorna = stcSvc.spawnObject('object/mobile/shared_dressed_tatooine_tosche_sorna.iff', 'tatooine', long(0), float(-135), float(52.0), float(-5331), float(0.36), float(0.93))
Sorna.setCustomName2('Sorna')
# Lars Homestead
zefAndo = stcSvc.spawnObject('object/mobile/shared_dressed_legacy_zef.iff', 'tatooine', long(0), float(-2574.9), float(0), float(-5516.7), float(0), float(0))
zefAndo.setCustomName2('Zef Ando')
# Jawa Sandcrawler (legacy quest)
fa2po = stcSvc.spawnObject('object/mobile/shared_3po_protocol_droid.iff', 'tatooine', long(0), float(-3805.7), float(30.4), float(-4721.6), float(0), float(0))
fa2po.setCustomName2('FA-2PO')
# Darklighter Cache Cave (tat -260 -6930 not spawning from buildout)
# Mos Taike NPC Spawns
# Wayfar NPC Spawns
# Jabba's Palace Theme Park Spawns
# Jabba's Palace Theme Park Spawns
reelo = stcSvc.spawnObject('object/mobile/shared_reelo_baruk.iff', 'tatooine', long(26560), float(-3.5), float(0.2), float(113.5), float(0), float(0))
reelo.setCustomName2('Reelo Baruk')
reeyees = stcSvc.spawnObject('object/mobile/shared_dressed_gran_thug_male_01.iff', 'tatooine', long(26560), float(5.8), float(0.2), float(115.7), float(0.70), float(-0.71))
reeyees.setCustomName2('Ree-Yees')
ephant = stcSvc.spawnObject('object/mobile/shared_ephant_mon.iff', 'tatooine', long(26564), float(-6.1), float(5.8), float(86.1), float(0), float(0))
ephant.setCustomName2('Ephant Mon')
porcellus = stcSvc.spawnObject('object/mobile/shared_dressed_porcellus.iff', 'tatooine', long(26572), float(-44.0), float(3.0), float(63.4), float(0), float(0))
porcellus.setCustomName2('Porcellus')
barada = stcSvc.spawnObject('object/mobile/shared_barada.iff', 'tatooine', long(26596), float(31.2), float(0.2), float(-1.0), float(0.98), float(-0.17))
barada.setCustomName2('Barada')
bibMain = stcSvc.spawnObject('object/mobile/shared_bib_fortuna.iff', 'tatooine', long(26582), float(-11.1), float(2.0), float(49.5), float(0.70), float(0.71))
bibMain.setCustomName2('Bib Fortuna')
jabba = stcSvc.spawnObject('object/mobile/shared_jabba_the_hutt.iff', 'tatooine', long(26582), float(-17.0), float(2.8), float(44.9), float(0.70), float(0.71))
jabba.setCustomName2('Jabba the Hutt')
oola = stcSvc.spawnObject('object/mobile/shared_oola.iff', 'tatooine', long(26582), float(-10.3), float(2.0), float(43.9), float(0.70), float(-0.71))
oola.setCustomName2('Oola')
oola.setCurrentAnimation('wave1')
bobaFett = stcSvc.spawnObject('object/mobile/shared_boba_fett.iff', 'tatooine', long(26582), float(-1.0), float(3.0), float(33.1), float(0), float(0))
bobaFett.setCustomName2('Boba Fett')
ev9d9 = stcSvc.spawnObject('object/mobile/shared_ev_9d9.iff', 'tatooine', long(26574), float(18.8), float(0.2), float(78.7), float(1.0), float(0))
ev9d9.setCustomName2('EV-9D9')
malakili = stcSvc.spawnObject('object/mobile/shared_malakili.iff', 'tatooine', long(26599), float(17.3), float(-11.0), float(43.8), float(0), float(0))
malakili.setCustomName2('Malakili')
#Need to somehow get the cellID for the Rancor Pit or it will NEVER be spawned.
maxRebo = stcSvc.spawnObject('object/mobile/shared_max_rebo.iff', 'tatooine', long(26582), float(-1.4), float(3.0), float(26.9), float(0.42), float(-0.9))
maxRebo.setCustomName2('Max Rebo')
droopy = stcSvc.spawnObject('object/mobile/shared_droopy_mccool.iff', 'tatooine', long(26582), float(-3.9), float(3.0), float(26.1), float(0.42), float(-0.9))
droopy.setCustomName2('Droopy McCool')
sySnootles = stcSvc.spawnObject('object/mobile/shared_sy_snootles.iff', 'tatooine', long(26582), float(-1.4), float(3.0), float(29.8), float(0.42), float(-0.))
sySnootles.setCustomName2('Sy Snootles')
g5po = stcSvc.spawnObject('object/mobile/shared_3po_protocol_droid_red.iff', 'tatooine', long(26582), float(-14.3), float(2.0), float(47.4), float(0.70), float(0.71))
g5po.setCustomName2('G5-PO')
return
+6
View File
@@ -72,6 +72,7 @@ import services.LoginService;
import services.map.MapService;
import services.object.ObjectService;
import services.object.UpdateService;
import services.retro.RetroService;
import services.spawn.SpawnService;
import services.sui.SUIService;
import services.trade.TradeService;
@@ -123,6 +124,7 @@ public class NGECore {
// Services
public LoginService loginService;
public RetroService retroService;
public ConnectionService connectionService;
public CommandService commandService;
public CharacterService characterService;
@@ -221,6 +223,7 @@ public class NGECore {
guildODB = new ObjectDatabase("guild", true, false, true);
// Services
loginService = new LoginService(this);
retroService = new RetroService(this);
connectionService = new ConnectionService(this);
characterService = new CharacterService(this);
mapService = new MapService(this);
@@ -276,6 +279,7 @@ public class NGECore {
// Zone Server
zoneDispatch = new NetworkDispatch(this, true);
zoneDispatch.addService(retroService);
zoneDispatch.addService(connectionService);
zoneDispatch.addService(characterService);
zoneDispatch.addService(factionService);
@@ -347,6 +351,8 @@ public class NGECore {
// spawnService.loadLairGroups();
// spawnService.loadSpawnAreas();
retroService.run();
didServerCrash = false;
System.out.println("Started Server.");
setGalaxyStatus(2);
+34
View File
@@ -0,0 +1,34 @@
package protocol.swg;
import org.apache.mina.core.buffer.IoBuffer;
import resources.common.Console;
import resources.common.StringUtilities;
public class GuildRequestMessage extends SWGMessage {
private long characterId;
public GuildRequestMessage() {
}
@Override
public void deserialize(IoBuffer data) {
//data.getShort();
setCharacterId(data.getLong());
}
@Override
public IoBuffer serialize() {
return null;
}
public long getCharacterId() {
return characterId;
}
public void setCharacterId(long characterId) {
this.characterId = characterId;
}
}
@@ -0,0 +1,61 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package protocol.swg;
import java.nio.ByteOrder;
import org.apache.mina.core.buffer.IoBuffer;
import resources.common.Console;
import resources.common.StringUtilities;
import resources.guild.Guild;
import resources.objects.creature.CreatureObject;
public class GuildResponseMessage extends SWGMessage {
private long player;
private String guildName;
public GuildResponseMessage(long player, String guild) {
this.player = player;
this.guildName = guild;
}
@Override
public void deserialize(IoBuffer data) {
}
@Override
public IoBuffer serialize() {
IoBuffer buffer = IoBuffer.allocate(18 + guildName.length()).order(ByteOrder.LITTLE_ENDIAN);
buffer.putShort((short) 4);
buffer.putInt(0x32263F20);
buffer.putLong(player);
buffer.put(getAsciiString(guildName));
return buffer.flip();
}
}
@@ -45,7 +45,7 @@ public class Animation extends ObjControllerObject {
@Override
public IoBuffer serialize() {
IoBuffer result = IoBuffer.allocate(36).order(ByteOrder.LITTLE_ENDIAN);
IoBuffer result = IoBuffer.allocate(20 + animation.length()).order(ByteOrder.LITTLE_ENDIAN);
result.putInt(ObjControllerMessage.ANIMATION);
@@ -0,0 +1,65 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package protocol.swg.objectControllerObjects;
import java.nio.ByteOrder;
import org.apache.mina.core.buffer.IoBuffer;
import protocol.swg.ObjControllerMessage;
import resources.common.Console;
import resources.common.StringUtilities;
public class BiographyUpdate extends ObjControllerObject {
private long objectId;
private long targetObjectId;
private String biography;
public BiographyUpdate(long objectId, long targetObjectId, String biography) {
this.objectId = objectId;
this.biography = biography;
this.targetObjectId = targetObjectId;
}
@Override
public void deserialize(IoBuffer data) {
}
@Override
public IoBuffer serialize() {
IoBuffer buffer = IoBuffer.allocate(28 + (biography.length() * 2)).order(ByteOrder.LITTLE_ENDIAN);
buffer.putInt(0x000001DB);
buffer.putLong(objectId); // requester
buffer.putInt(0);
buffer.putLong(targetObjectId);
buffer.put(getUnicodeString(biography));
return buffer.flip();
}
}
@@ -27,8 +27,7 @@ public class SecureTrade extends ObjControllerObject{
@Override
public IoBuffer serialize() {
IoBuffer result = IoBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN);
result.setAutoExpand(true);
IoBuffer result = IoBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);
result.putInt(ObjControllerMessage.SPACIAL_CHAT);
result.putInt(1);
@@ -33,5 +33,4 @@ public class ObjControllerOpcodes {
public static final int BUFF_BUILDER_CHANGE = 0x5A020000;
public static final int MISSION_LIST_REQUEST = 0xF5000000;
public static final int ChangeRoleIconChoice = 0x4D040000;
}
+1
View File
@@ -59,5 +59,6 @@ public class Opcodes {
public static int FactionRequestMessage = CRC.StringtoCRC("FactionRequestMessage");
public static int FactionResponseMessage = CRC.StringtoCRC("FactionResponseMessage");
public static int SetWaypointColor = CRC.StringtoCRC("SetWaypointColor");
public static int GuildRequestMessage = CRC.StringtoCRC("GuildRequestMessage");
}
@@ -107,7 +107,7 @@ public class BuildingMessageBuilder extends ObjectMessageBuilder {
int size = buffer.position();
buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size);
buffer.flip();
buffer = createBaseline("TANO", (byte) 8, buffer, size);
buffer = createBaseline("BUIO", (byte) 8, buffer, size);
return buffer;
}
@@ -118,7 +118,7 @@ public class BuildingMessageBuilder extends ObjectMessageBuilder {
int size = buffer.position();
buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size);
buffer.flip();
buffer = createBaseline("TANO", (byte) 9, buffer, size);
buffer = createBaseline("BUIO", (byte) 9, buffer, size);
return buffer;
}
+13 -1
View File
@@ -41,7 +41,7 @@ import engine.resources.scene.Planet;
import engine.resources.scene.Point3D;
import engine.resources.scene.Quaternion;
@Persistent(version=3)
@Persistent(version=4)
public class PlayerObject extends IntangibleObject {
// PLAY 3
@@ -116,6 +116,8 @@ public class PlayerObject extends IntangibleObject {
private int jediState = 0; // unused in NGE
private String biography = "";
@NotPersistent
private PlayerMessageBuilder messageBuilder;
@@ -664,6 +666,16 @@ public class PlayerObject extends IntangibleObject {
}
}
public String getBiography() {
return biography;
}
public void setBiography(String biography) {
synchronized(objectMutex) {
this.biography = biography;
}
}
public int getFlagBitmask() {
synchronized(objectMutex) {
return flagBitmask;
@@ -138,6 +138,16 @@ public class TangibleMessageBuilder extends ObjectMessageBuilder {
}
public IoBuffer buildCustomNameDelta(String customName) {
IoBuffer buffer = bufferPool.allocate(getUnicodeString(customName).length, false).order(ByteOrder.LITTLE_ENDIAN);
buffer.put(getUnicodeString(customName));
int size = buffer.position();
buffer.flip();
buffer = createDelta("TANO", (byte) 3, (short) 1, (short) 2, buffer, size + 4);
return buffer;
}
@Override
public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) {
// TODO Auto-generated method stub
@@ -86,6 +86,12 @@ public class TangibleObject extends SWGObject {
super();
messageBuilder = new TangibleMessageBuilder(this);
}
public void setCustomName2(String customName) {
setCustomName(customName);
notifyObservers(messageBuilder.buildCustomNameDelta(customName), true);
}
public int getIncapTimer() {
return incapTimer;
+35 -1
View File
@@ -40,6 +40,8 @@ import org.apache.mina.core.session.IoSession;
import protocol.swg.ClientIdMsg;
import protocol.swg.ClientMfdStatusUpdateMessage;
import protocol.swg.ExpertiseRequestMessage;
import protocol.swg.GuildRequestMessage;
import protocol.swg.GuildResponseMessage;
import protocol.swg.ServerTimeMessage;
import protocol.swg.SetWaypointColor;
import protocol.swg.objectControllerObjects.ChangeRoleIconChoice;
@@ -51,6 +53,7 @@ import resources.common.Opcodes;
import resources.common.RGB;
import resources.common.SpawnPoint;
import resources.datatables.PlayerFlags;
import resources.guild.Guild;
import resources.objects.Buff;
import resources.objects.building.BuildingObject;
import resources.objects.cell.CellObject;
@@ -237,6 +240,38 @@ public class PlayerService implements INetworkDispatch {
}
});
swgOpcodes.put(Opcodes.GuildRequestMessage, new INetworkRemoteEvent() {
@Override
public void handlePacket(IoSession session, IoBuffer data) throws Exception {
data.order(ByteOrder.LITTLE_ENDIAN);
Client client = core.getClient(session);
if (client == null)
return;
SWGObject player = client.getParent();
if (player == null)
return;
GuildRequestMessage request = new GuildRequestMessage();
request.deserialize(data);
CreatureObject targetPlayer = (CreatureObject) core.objectService.getObject(request.getCharacterId());
if (targetPlayer.getGuildId() != 0) {
Guild targetGuild = core.guildService.getGuildById(targetPlayer.getGuildId());
GuildResponseMessage response = new GuildResponseMessage(request.getCharacterId(), targetGuild.getName());
client.getSession().write(response.serialize());
} else {
GuildResponseMessage response = new GuildResponseMessage(request.getCharacterId(), "None");
client.getSession().write(response.serialize());
}
}
});
swgOpcodes.put(Opcodes.CmdSceneReady, new INetworkRemoteEvent() {
@@ -578,7 +613,6 @@ public class PlayerService implements INetworkDispatch {
return;
player.getTitleList().add(title);
Console.println("Added title" + title);
}
+4 -1
View File
@@ -159,6 +159,9 @@ public class SimulationService implements INetworkDispatch {
core.commandService.registerCommand("roleplay");
core.commandService.registerAlias("afk", "toggleawayfromkeyboard");
core.commandService.registerCommand("toggledisplayingfactionrank");
core.commandService.registerCommand("editbiography");
core.commandService.registerCommand("setbiography");
core.commandService.registerCommand("requestbiography");
}
@@ -620,7 +623,7 @@ public class SimulationService implements INetworkDispatch {
PlayerObject ghost = (PlayerObject) object.getSlottedObject("ghost");
core.weatherService.sendWeather(object);
if (!object.hasSkill(ghost.getProfessionWheelPosition())) {
object.showFlyText("cbt_spam", "skill_up", (float) 2.5, new RGB(154, 205, 50), 0);
object.playEffectObject("clienteffect/skill_granted.cef", "");
+50
View File
@@ -36,8 +36,12 @@ import protocol.swg.FactionResponseMessage;
import resources.common.FileUtilities;
import resources.common.Opcodes;
import resources.datatables.FactionStatus;
import resources.datatables.Options;
import resources.datatables.PvpStatus;
import resources.objects.creature.CreatureObject;
import resources.objects.player.PlayerObject;
import resources.objects.tangible.TangibleObject;
import engine.clientdata.StfTable;
import engine.clients.Client;
@@ -183,6 +187,52 @@ public class FactionService implements INetworkDispatch {
return false;
}
/*
* Calculates the target's pvp bitmask based on the person's
* faction standing and the enemy's options bitmask.
*
* This shouldn't be what we "set" the bitmask to, just
* what we use when calculating how to treat a target
* and when we send it.
*
* This should be used instead of getPvPBitmask where possible, but
* should not be used in setPvPBitmask.
*/
public int calculatePvpStatus(CreatureObject player, TangibleObject target) {
PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost");
int pvpBitmask = target.getPvPBitmask();
if (target.getSlottedObject("ghost") != null) {
pvpBitmask |= PvpStatus.Player;
if (player.getFactionStatus() == FactionStatus.SpecialForces &&
((CreatureObject) target).getFactionStatus() == FactionStatus.SpecialForces) {
pvpBitmask |= (PvpStatus.Attackable | PvpStatus.Aggressive);
}
return pvpBitmask;
}
if (target.getOption(Options.ATTACKABLE)) {
pvpBitmask |= PvpStatus.Attackable;
}
if (target.getOption(Options.AGGRESSIVE)) {
pvpBitmask |= PvpStatus.Aggressive;
} else {
Integer factionStanding = ghost.getFactionStandingMap().get(target.getFaction());
if (factionStanding != null) {
if (((TangibleObject) target).getOption(Options.ATTACKABLE) && factionStanding < 0) {
pvpBitmask |= PvpStatus.Aggressive;
}
}
}
return pvpBitmask;
}
public Map<String, Integer> getFactionMap() {
return factionMap;
}
+12 -3
View File
@@ -23,12 +23,11 @@ package services.guild;
import java.util.Map;
import resources.common.Console;
import resources.guild.Guild;
import resources.objects.SWGList;
import resources.objects.guild.GuildObject;
import main.NGECore;
import engine.resources.objects.SWGObject;
import engine.resources.service.INetworkDispatch;
import engine.resources.service.INetworkRemoteEvent;
@@ -55,7 +54,17 @@ public class GuildService implements INetworkDispatch {
}
public Guild createGuild(String abbreviation, String name, SWGObject leader) {
int id = ((object.getGuildList().get(object.getGuildList().size()).getId()) + 1);
if (leader == null)
return null;
int id = 0;
if (object.getGuildList().size() < 1) {
id = 0;
} else {
id = ((object.getGuildList().get(object.getGuildList().size()).getId() + 1));
}
Guild guild = new Guild(id, abbreviation, name, leader);
object.getGuildList().add(guild);
+18 -14
View File
@@ -44,6 +44,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import resources.common.*;
import resources.datatables.Options;
import resources.datatables.PlayerFlags;
import org.apache.mina.core.buffer.IoBuffer;
@@ -262,36 +263,39 @@ public class ObjectService implements INetworkDispatch {
objectList.put(objectID, object);
// Set Default Tangible Options
/*
// Set Options - easier to set them across the board here
// because we'll be spawning them despite most of them being unscripted.
// Any such settings can be completely reset with setOptionsBitmask
// in scripts and modified with setOptions(Options.X, true/false)
if (Template.startsWith("object/creature/") || Template.startsWith("object/mobile/")) {
((CreatureObject) object).setOptionsBitmask(Options.MOBILE);
if (Template.startsWith("object/mobile/beast_master/")) {
if (Template.startsWith("object/mobile/")) {
((CreatureObject) object).setOptionsBitmask(Options.ATTACKABLE);
} else if (Template.startsWith("object/mobile/beast_master/")) {
((CreatureObject) object).setOptionsBitmask(Options.NONE);
} else if (Template.startsWith("object/mobile/vendor/")) {
((CreatureObject) object).setOptionsBitmask(Options.INVULNERABLE | Options.USABLE);
} else if (Template.startsWith("object/mobile/vehicle/")) {
((CreatureObject) object).addOption(Options.INVULNERABLE | Options.MOUNT);
((CreatureObject) object).setOptionsBitmask(Options.ATTACKABLE | Options.MOUNT);
} else if (Template.startsWith("object/mobile/hologram/")) {
((CreatureObject) object).addOption(Options.INVULNERABLE);
((CreatureObject) object).setOptionsBitmask(Options.INVULNERABLE);
} else if (Template.startsWith("object/creature/npc/theme_park/")) {
((CreatureObject) object).addOption(Options.INVULNERABLE);
} else if (Template.startsWith("object/creature/general/")) {
((CreatureObject) object).setOptionsBitmask(Options.INVULNERABLE);
} else if (Template.startsWith("object/creature/npc/general/")) {
((CreatureObject) object).setOptionsBitmask(Options.INVULNERABLE | Options.CONVERSABLE);
} else if (Template.startsWith("object/creature/droid/crafted/")) {
((CreatureObject) object).setOptionsBitmask(Options.NONE);
} else if (Template.startsWith("object/creature/droid/")) {
((CreatureObject) object).addOption(Options.INVULNERABLE);
((CreatureObject) object).setOptionsBitmask(Options.ATTACKABLE | Options.INVULNERABLE);
} else if (Template.startsWith("object/creature/player/")) {
((CreatureObject) object).setOptionsBitmask(Options.ATTACKABLE);
}
} else if (object instanceof TangibleObject) {
((TangibleObject) object).setOptionsBitmask(Options.INVULNERABLE);
if (Template.startsWith("object/tangible/vendor/")) {
((CreatureObject) object).addOption(Options.USABLE);
} else if (Template.startsWith("object/creature/droid/")) {
((CreatureObject) object).addOption(Options.INVULNERABLE);
((TangibleObject) object).setOptionsBitmask(Options.INVULNERABLE | Options.USABLE);
}
}
*/
return object;
}
@@ -0,0 +1,30 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package services.retro;
import main.NGECore;
public interface IRetroModification {
public void modify(NGECore core);
}
+78
View File
@@ -0,0 +1,78 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package services.retro;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import engine.resources.service.INetworkDispatch;
import engine.resources.service.INetworkRemoteEvent;
import main.NGECore;
/*
* Very often we will need to make changes to existing objects when the server
* boots up. This is especially the case when fixes or new features are
* added that affect already-existing objects. To make the changes retroactive
* we can use this service to make it more tidy. Add to the list of
* modifications in the relevant service's constructor, or in this one.
*/
public class RetroService implements INetworkDispatch {
private NGECore core;
private List<IRetroModification> modifications;
public RetroService(NGECore core) {
this.core = core;
modifications = new ArrayList<IRetroModification>();
/*
core.retroService.addModification(new IRetroModification() {
public void modify(NGECore core) {
}
});
*/
}
public void addModification(IRetroModification modification) {
modifications.add(modification);
}
public void run() {
for (IRetroModification modification : modifications) {
modification.modify(core);
}
}
public void insertOpcodes(Map<Integer, INetworkRemoteEvent> swgOpcodes, Map<Integer, INetworkRemoteEvent> objControllerOpcodes) {
}
public void shutdown() {
}
}