Beispiel #1
0
def GZSetGame(args):
    import Plasma
    import PlasmaKITypes
    if not args or args == "" or args == "1":
        # set a default
        gameString = "1 green:greenlt 0:15"
        level = 1
    elif args == "2":
        gameString = "2 green:greenlt 0:15"
        level = 2
    vault = Plasma.ptVault()
    # is there a chronicle for the GZ games?
    entry = vault.findChronicleEntry(PlasmaKITypes.kChronicleGZGames)
    if type(entry) != type(None):
        entry.chronicleSetValue(gameString)
        entry.save()
    else:
        # if there is none, then just add another entry
        vault.addChronicleEntry(PlasmaKITypes.kChronicleGZGames,PlasmaKITypes.kChronicleGZGamesType,args)
    Plasma.PtSendKIMessageInt(PlasmaKITypes.kUpgradeKIMarkerLevel,level)
    # update the 
    Plasma.PtSendKIMessageInt(PlasmaKITypes.kGZUpdated,30)
Beispiel #2
0
def EnableReltoPage(pagename):
    import xCustomReltoPages  # I leave the string helpers out of here because the original does not have them - and I want to be compatible in both directions
    print "uam.EnableReltoPage: " + str(pagename)
    #get current task list
    tasksstr = _GetPlayerChronicle("UamTasks")
    tasks = xCustomReltoPages._StringToList(tasksstr)
    #add item
    tasks.append("EnableReltoPage=" + pagename)
    #save task list
    taskstr = xCustomReltoPages._ListToString(tasks)
    _SetPlayerChronicle("UamTasks", taskstr)
    Plasma.PtSendKIMessageInt(PlasmaKITypes.kStartBookAlert,
                              0)  #Flash the Relto book.
    print "uam.EnableReltoPage: current tasks: " + taskstr
Beispiel #3
0
def EnableReltoPage(pagename):
    print "uam.EnableReltoPage: "+`pagename`
    import _UamUtils
    #get current task list
    tasksstr = _GetPlayerChronicle("UamTasks")
    tasks = _UamUtils._StringToList(tasksstr)
    #add item
    tasks.append("EnableReltoPage="+pagename)
    #save task list
    taskstr = _UamUtils._ListToString(tasks)
    _SetPlayerChronicle("UamTasks",taskstr)
    Plasma.PtSendKIMessageInt(PlasmaKITypes.kStartBookAlert, 0)  #Flash the Relto book.
    print "current tasks: "+taskstr
    
    
Beispiel #4
0
def GZGiveMeFullAccess(args):
    import Plasma
    import PlasmaKITypes
    Plasma.PtSendKIMessageInt(PlasmaKITypes.kUpgradeKIMarkerLevel,PlasmaKITypes.kKIMarkerNormalLevel)

    #Make sure to update the markers too, as we don't want them to display!!!
    import grtzKIMarkerMachine
    grtzKIMarkerMachine.UpdateGZMarkers(PlasmaKITypes.kGZMarkerUploaded)

    #reset KI's marker display
    resetString = "0 off:off 0:0"
    vault = Plasma.ptVault()
    entry = vault.findChronicleEntry(PlasmaKITypes.kChronicleGZGames)
    if type(entry) != type(None):
        entry.chronicleSetValue(resetString)

    # Finally, update the KI display
    Plasma.PtSendKIMessage(PlasmaKITypes.kGZUpdated,0)
Beispiel #5
0
def UamOnKiCommand(command):
    #print "_UamModCheats.UamOnKiCommand: "+`command`
    if (command == "/opencleftdoor"):
        print "_UamModCheats: Opening Cleft Door"
        #Calling this twice is fine.  And we can call it only from the Cleft.
        if _UamUtils.GetAgeName() != "Cleft":
            uam.PrintKiMessage("You can only do this in the Cleft.")
            return True
        sdl = Plasma.PtGetAgeSDL()
        varname = "clftBahroDoorClosed"
        index = 0
        value = 0  #i.e. we want it opened
        sdl.setFlags(varname, 1, 1)
        sdl.sendToClients(varname)
        sdl.setIndex(varname, index, value)
        return True
    if (command == "/getki"):
        print "_UamModCheats: getting ki"
        #Calling this twice should be okay, since kNormalKI is the highest level, so we won't be downgrading it ever.
        #We can call this from any Age.
        #Add the normal ki:
        Plasma.PtSendKIMessageInt(PlasmaKITypes.kUpgradeKILevel,
                                  PlasmaKITypes.kNormalKI)
        #Set the chronicle directly, because the Offline-KI blocks this for some bizarre reason.
        uam._SetPlayerChronicle(PlasmaKITypes.kChronicleKILevel,
                                str(PlasmaKITypes.kNormalKI),
                                PlasmaKITypes.kChronicleKILevelType)
        return True
    if (command == "/getmarkers"):
        #Register the new link.  From IUpdateNexusLink from grtzKIMarkerMachine.py
        #This can be called multiple times okay, because the chron is never set higher and adding the spawnpoint more than once doesn't create duplicate copies.  And it can be called from any Age.
        #But you need to restart Uru for some unknown reason, before you can use F8 to create a mission.
        print "_UamModCheats: getting markers"
        success = GetMarkersAddGZLink()
        if success:
            #Set the chronicle saying that we've got
            uam._SetPlayerChronicle("KIMarkerLevel", "3")
            uam.PrintKiMessage(
                "You should now be able to do marker missions!  (Though you may need to restart Uru first.)"
            )
        else:
            uam.PrintKiMessage(
                "You need to visit the Great Zero at least once first.")
        return True
Beispiel #6
0
def GiveMeMarkerTag(args):
    import Plasma
    import PlasmaKITypes
    Plasma.PtSendKIMessageInt(PlasmaKITypes.kUpgradeKIMarkerLevel,PlasmaKITypes.kKIMarkerFirstLevel)