Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kalamee Q1 2023 #1283

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions Scripts/Python/Kalamee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# /*==LICENSE==*
#
# CyanWorlds.com Engine - MMOG client, server and tools
# Copyright (C) 2011 Cyan Worlds, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Additional permissions under GNU GPL version 3 section 7
#
# If you modify this Program, or any covered work, by linking or
# combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
# NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
# JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
# (or a modified version of those libraries),
# containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
# PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
# JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
# licensors of this Program grant you additional
# permission to convey the resulting work. Corresponding Source for a
# non-source form of such a combination shall include the source code for
# the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
# work.
#
# You can contact Cyan Worlds, Inc. by email legal@cyan.com
# or by snail mail at:
# Cyan Worlds, Inc.
# 14617 N Newport Hwy
# Mead, WA 99021
#
# *==LICENSE==*/

from Plasma import *
from PlasmaTypes import *
class Kalamee(ptResponder):
def __init__(self):
ptResponder.__init__(self)
self.id = 22020001
self.version = 1
94 changes: 94 additions & 0 deletions Scripts/Python/KalameeResetJC.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# /*==LICENSE==*
#
# CyanWorlds.com Engine - MMOG client, server and tools
# Copyright (C) 2011 Cyan Worlds, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Additional permissions under GNU GPL version 3 section 7
#
# If you modify this Program, or any covered work, by linking or
# combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
# NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
# JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
# (or a modified version of those libraries),
# containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
# PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
# JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
# licensors of this Program grant you additional
# permission to convey the resulting work. Corresponding Source for a
# non-source form of such a combination shall include the source code for
# the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
# work.
#
# You can contact Cyan Worlds, Inc. by email legal@cyan.com
# or by snail mail at:
# Cyan Worlds, Inc.
# 14617 N Newport Hwy
# Mead, WA 99021
#
# *==LICENSE==*/

from Plasma import *
from PlasmaTypes import *
from PlasmaVaultConstants import *
from PlasmaNetConstants import *
import xRandom
from xPsnlVaultSDL import *

Activator = ptAttribActivator(1, 'Activator: JC Reset Clickable')

class KalameeResetJC(ptResponder):
__module__ = __name__

def __init__(self):
ptResponder.__init__(self)
self.id = 22100002
self.version = 1
PtDebugPrint('KalameeResetJC: initialised successfully!')

def OnFirstUpdate(self):
pass

def OnServerInitComplete(self):
pass

def OnNotify(self, state, id, events):
if not state:
return None
if id == Activator.id:
self.ResetAgeJourneyCloth()

def OnSDLNotify(self, VARname, SDLname, playerID, tag):
pass

def ResetAgeJourneyCloth(self):
ageChronNode = None
ageName = PtGetAgeName()
vault = ptVault()
chron = vault.findChronicleEntry('JourneyClothProgress')
ageChronRefList = chron.getChildNodeRefList()
for ageChron in ageChronRefList:
ageChild = ageChron.getChild()
ageChild = ageChild.upcastToChronicleNode()
if ageChild.chronicleGetName() == ageName:
ageChronNode = ageChild
break

if type(ageChronNode) != type(None):
PtDebugPrint('KalameeResetJC: resetting JourneyClothProgress')
ageChronNode.chronicleSetValue('')
ageChronNode.save()
else:
PtDebugPrint('KalameeResetJC: unable to find JourneyClothProgress for age!')
4 changes: 4 additions & 0 deletions Scripts/Python/xLinkingBookDefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,13 @@
"Vothol": ( 0, 1.0, 1.0, NoDRCStamp, BookStart1 + DRCStampHolder + NoShare + LinkStart + 'xlinkpanelvothol' + LinkEnd ),
"ChisoPreniv": ( 0, 1.0, 1.0, NoDRCStamp, BookStart1 + DRCStampHolder + NoShare + LinkStart + 'xlinkpanelchisopreniv' + LinkEnd ),
"ChisoPrenivNote": ( 0, 1.0, 1.0, FanAgeStamp, BookStart1 + DRCStampHolder + NoShare + LinkStart + 'xlinkpanelchisopreniv' + LinkEnd ),
"ChisoPrenivLower": ( 0, 1.0, 1.0, NoDRCStamp, BookStart1 + DRCStampHolder + NoShare + LinkStart + 'xlinkpanelchisolower' + LinkEnd ),
"Serene": ( 0, 1.0, 1.0, NoDRCStamp, BookStart1 + DRCStampHolder + NoShare + LinkStart + 'xlinkpanelserene' + LinkEnd ),
"Tiam": ( 1, 1.0, 1.0, NoDRCStamp, BookStart1 + DRCStampHolder + ShareHolder + LinkStart + 'xlinkpaneltiam' + LinkEnd ),
"Elonin": ( 1, 1.0, 1.0, NoDRCStamp, BookStart1 + DRCStampHolder + ShareHolder + LinkStart + 'xlinkpanelelonin' + LinkEnd ),
"EderNaybree": ( 0, 1.0, 1.0, NoDRCStamp, BookStart1 + DRCStampHolder + NoShare + LinkStart + 'xlinkpaneledernaybree' + LinkEnd ),
"FahetsHighgarden": ( 0, 1.0, 1.0, NoDRCStamp, BookStart1 + DRCStampHolder + NoShare + LinkStart + 'xlinkpanelhighgarden' + LinkEnd ),
"Kalamee": ( 1, 1.0, 1.0, NoDRCStamp, BookStart1 + DRCStampHolder + ShareHolder + LinkStart + 'xlinkpanelkalamee' + LinkEnd ),
}

# cross-references the book name with the age and spawn point it links to
Expand Down Expand Up @@ -347,11 +349,13 @@
"VeeTsah": ( "VeeTsah", "LinkInPointDefault" ),
"Vothol": ( "Vothol", "LinkInPointDefault" ),
"ChisoPreniv": ( "ChisoPreniv", "LinkInPointDefault" ),
"ChisoPrenivLower": ( "ChisoPreniv", "LinkInLowerFloor" ),
"Serene": ( "Serene", "LinkInPointDefault" ),
"Tiam": ( "Tiam", "LinkInPointDefault" ),
"Elonin": ( "Elonin", "LinkInPointDefault" ),
"EderNaybree": ( "EderNaybree", "LinkInPointDefault" ),
"FahetsHighgarden": ( "FahetsHighgarden", "LinkInPointDefault" ),
"Kalamee": ( "Kalamee", "LinkInPointDefault" ),
}

#
Expand Down
187 changes: 187 additions & 0 deletions Scripts/Python/xMultiDialogToggle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# /*==LICENSE==*
#
# CyanWorlds.com Engine - MMOG client, server and tools
# Copyright (C) 2011 Cyan Worlds, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Additional permissions under GNU GPL version 3 section 7
#
# If you modify this Program, or any covered work, by linking or
# combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
# NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
# JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
# (or a modified version of those libraries),
# containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
# PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
# JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
# licensors of this Program grant you additional
# permission to convey the resulting work. Corresponding Source for a
# non-source form of such a combination shall include the source code for
# the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
# work.
#
# You can contact Cyan Worlds, Inc. by email legal@cyan.com
# or by snail mail at:
# Cyan Worlds, Inc.
# 14617 N Newport Hwy
# Mead, WA 99021
#
# *==LICENSE==*/

#==============================================================================#
# #
# Offline KI #
# #
# Copyright (C) 2004-2011 The Offline KI contributors #
# See the file AUTHORS for more info about the contributors (including #
# contact information) #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version, with or (at your option) without #
# the Uru exception (see below). #
# #
# 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 General Public License for more details. #
# #
# Please see the file COPYING for the full GPLv3 license, or see #
# <http://www.gnu.org/licenses/> #
# #
# Uru exception: In addition, this file may be used in combination with #
# (non-GPL) code within the context of Uru. #
# #
#==============================================================================#

from Plasma import *
from PlasmaTypes import *
import PlasmaControlKeys
import string
Activate = ptAttribActivator(1, ' clickable ', netForce=1)
Vignettes = ptAttribString(4, 'Toggle multiple dialogs - by Name')
SingleUser = ptAttribBoolean(5, 'One user only?', 0)
KeyMap = {}
KeyMap[PlasmaControlKeys.kKeyMoveForward] = PlasmaControlKeys.kKeyCamPanUp
KeyMap[PlasmaControlKeys.kKeyMoveBackward] = PlasmaControlKeys.kKeyCamPanDown
KeyMap[PlasmaControlKeys.kKeyRotateLeft] = PlasmaControlKeys.kKeyCamPanLeft
KeyMap[PlasmaControlKeys.kKeyRotateRight] = PlasmaControlKeys.kKeyCamPanRight
kExit = 99
Vignette = None
class xMultiDialogToggle(ptModifier,):

def __init__(self):
ptModifier.__init__(self)
self.id = 5104999
self.version = 1
minor = 0
self.me = self.__class__.__name__
self.VignetteList = []
print ('__init__%s v. %d.%d' % (self.me, self.version, minor))



def IGetAgeFilename(self):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
ageInfo = PtGetAgeInfo()
if (type(ageInfo) != type(None)):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
return ageInfo.getAgeFilename()
else:
return 'GUI'



def OnFirstUpdate(self):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
try:
self.VignetteList += Vignettes.value.split(',')
for i in range(len(self.VignetteList)):
self.VignetteList[i] = self.VignetteList[i].strip()
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved

PtDebugPrint(('%s: Dialog list = %s' % (self.me,
self.VignetteList)))
except:
PtDebugPrint(("ERROR: %s.OnFirstUpdate(): Couldn't process dialog list" % self.me))
return
for i in range(len(self.VignetteList)):
PtLoadDialog(self.VignetteList[i], self.key, self.IGetAgeFilename())




def __del__(self):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
for i in range(len(self.VignetteList)):
PtUnloadDialog(self.VignetteList[i])




def OnNotify(self, state, id, events):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
global Vignette
if (state and ((id == Activate.id) and PtWasLocallyNotified(self.key))):
Vignette = self.VignetteList[0]
self.IStartDialog(1)



def OnGUINotify(self, id, control, event):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
global Vignette
if (event == kAction):
if (control.getTagID() == kExit):
for i in range(len(self.VignetteList)):
if (self.VignetteList[i] == Vignette):
try:
tmpVignette = self.VignetteList[(i + 1)]
except IndexError:
self.IQuitDialog(1)
return
self.IQuitDialog(0)
Vignette = tmpVignette
self.IStartDialog(0)
break

elif (event == kExitMode):
self.IQuitDialog(1)



def OnControlKeyEvent(self, controlKey, activeFlag):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
PtDebugPrint(('Got controlKey event %d and its activeFlag is %d' % (controlKey,
activeFlag)), level=kDebugDumpLevel)
if (controlKey == PlasmaControlKeys.kKeyExitMode):
self.IQuitDialog(1)



def IStartDialog(self, init = 1):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
PtLoadDialog(Vignette, self.key, self.IGetAgeFilename())
if PtIsDialogLoaded(Vignette):
PtShowDialog(Vignette)
PtDebugPrint(('%s: Dialog %s goes up' % (self.me,
Vignette)))
if init:
PtGetControlEvents(true, self.key)
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
if SingleUser.value:
Activate.disable()



def IQuitDialog(self, exit = 1):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
if ((type(Vignette) != type(None)) and (Vignette != '')):
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
PtHideDialog(Vignette)
PtDebugPrint(('%s: Dialog %s goes down' % (self.me,
Vignette)))
if exit:
PtGetControlEvents(false, self.key)
DoobesURU marked this conversation as resolved.
Show resolved Hide resolved
Activate.enable()
Loading