예제 #1
0
def spawnBarabusKey():
    mandarin = Find("Mandarin")
    center = mandarin.GetCenter()
    point = (center[0], center[1], center[2] + 20)
    key = __main__.CreateEntityNoSpawn("item_k_fu_cell_key", point, (0,0,0) )
    key.SetName("fu_key")
    sparklies = __main__.CreateEntityNoSpawn("inspection_node", point, (0,0,0) )
    sparklies.SetParent("fu_key")
    __main__.CallEntitySpawn(key)
    __main__.CallEntitySpawn(sparklies)
예제 #2
0
def spawnOfficeKey():
    guard = Find("guard_1")
    center = guard.GetCenter()
    point = (center[0], center[1], center[2] + 20)
    key = __main__.CreateEntityNoSpawn("item_k_fu_office_key", point, (0,0,0) )
    key.SetName("office_key")
    sparklies = __main__.CreateEntityNoSpawn("inspection_node", point, (0,0,0) )
    sparklies.SetParent("office_key")
    __main__.CallEntitySpawn(key)
    __main__.CallEntitySpawn(sparklies)
예제 #3
0
def spawnBomb():
    bombGuy = Find("bomberman")
    center = bombGuy.GetCenter()
    point = (center[0] + 25, center[1] + 25, center[2])
    bomb = __main__.CreateEntityNoSpawn("item_g_astrolite", point, (0, 0, 0))
    bomb.SetName("astrolite_bomb")
    sparklies = __main__.CreateEntityNoSpawn("inspection_node", point,
                                             (0, 0, 0))
    sparklies.SetParent("astrolite_bomb")
    __main__.CallEntitySpawn(bomb)
    __main__.CallEntitySpawn(sparklies)
def SpawnStorageKey():
    guard = Find("guard_maker_5")
    center = guard.GetCenter()
    point = (center[0], center[1], center[2])
    key = __main__.CreateEntityNoSpawn("item_k_museum_storage_key", point,
                                       (0, 0, 0))
    key.SetName("storage_key")
    __main__.CallEntitySpawn(key)
    sparklies = __main__.CreateEntityNoSpawn("inspection_node", point,
                                             (0, 0, 0))
    sparklies.SetParent("storage_key")
    __main__.CallEntitySpawn(sparklies)
예제 #5
0
def spawnMariaInvite():
    if G.Maria_Dominate == 0:
        maria = Find("Maria")
        center = maria.GetCenter()
        point = (center[0], center[1], center[2])
        invitem = __main__.CreateEntityNoSpawn(
            "item_g_giovanni_invitation_maria", point, (0, 0, 0))
        invitem.SetName("mar_inv")
        sparklies = __main__.CreateEntityNoSpawn("inspection_node", point,
                                                 (0, 0, 0))
        sparklies.SetParent("mar_inv")
        __main__.CallEntitySpawn(invitem)
        __main__.CallEntitySpawn(sparklies)
예제 #6
0
def spawnVictorInvite():
    victor = Find("Victor")
    center = victor.GetCenter()
    point = (center[0], center[1], center[2])
    invitev = __main__.CreateEntityNoSpawn("item_g_giovanni_invitation_victor",
                                           point, (0, 0, 0))
    invitev.SetName("vic_inv")
    sparklies = __main__.CreateEntityNoSpawn("inspection_node", point,
                                             (0, 0, 0))
    sparklies.SetParent("vic_inv")
    if G.Victor_Dominate == 0:
        __main__.CallEntitySpawn(invitev)
        __main__.CallEntitySpawn(sparklies)
예제 #7
0
def spawnAshKey():
    if (G.Ash_Leave == 1 and G.Patch_Plus == 0):
        guard = Find("guard_patrol_2")
        center = guard.GetCenter()
        point = (center[0], center[1], center[2] + 5)
        key = __main__.CreateEntityNoSpawn("item_k_ash_cell_key", point,
                                           (0, 0, 0))
        key.SetName("ash_key")
        sparklies = __main__.CreateEntityNoSpawn("inspection_node", point,
                                                 (0, 0, 0))
        sparklies.SetParent("ash_key")
        __main__.CallEntitySpawn(key)
        __main__.CallEntitySpawn(sparklies)
def putStuffInMailBox():
    Find = __main__.FindEntityByName
    mailbox = Find("Mailbox_haven")
    if(mailbox):
        G = __main__.G
        if(G.Shubs_Email == 1 and G.Shubs_Email_Read < 1):
            mailbox.SpawnItemInContainer("item_k_shrekhub_one_key")
            G.Shubs_Email_Read = 1
        elif(G.Shubs_Email == 2 and G.Shubs_Email_Read < 2):
            mailbox.SpawnItemInContainer("item_g_wireless_camera_4")
            G.Shubs_Email_Read = 2
        elif(G.Shubs_Email == 3 and G.Shubs_Email_Read < 3):
            mailbox.SpawnItemInContainer("item_k_shrekhub_three_key")
            G.Shubs_Email_Read = 3
        elif(G.Shubs_Email == 4 and G.Shubs_Email_Read < 4):
            mailbox.SpawnItemInContainer("item_k_shrekhub_four_key")
            G.Shubs_Email_Read = 4
        if((G.Tommy_Disgusted == 1 or G.Tommy_Review == 1) and (G.Tommy_Payoff == 0)):
            origin = mailbox.GetOrigin()
            angles = mailbox.GetAngles()
            money = __main__.CreateEntityNoSpawn("item_m_money_envelope", origin, angles )
            money.SetModel( "models/items/MoneyEnvelope/Ground/MoneyEnvelope.mdl" )
            __main__.CallEntitySpawn( money )
            money.SetName( "Tommy_Payoff" )
            money.SetMoney( 300 )
            mailbox.AddEntityToContainer( "Tommy_Payoff" )
            G.Tommy_Payoff = 1
def onHatterDeath():
    pc = __main__.FindPlayer()
    if pc.GetQuestState("Writer") == 1:
        G.Hatter_Dead = 1
        pc.SetQuest("Writer", 4)
        hatter = Find("DHatter")
        center = hatter.GetCenter()
        point = (center[0], center[1], center[2] + 20)
        script = __main__.CreateEntityNoSpawn("item_g_hatters_screenplay",
                                              point, (0, 0, 0))
        script.SetName("script")
        sparklies = __main__.CreateEntityNoSpawn("inspection_node", point,
                                                 (0, 0, 0))
        sparklies.SetParent("script")
        __main__.CallEntitySpawn(script)
        __main__.CallEntitySpawn(sparklies)
def spawnCans():
    for i in range(1, 4):
        target = Find("can_target_%d" % i)
        can = __main__.CreateEntityNoSpawn("prop_physics", target.GetCenter(),
                                           target.GetAngles())
        can.SetName("can")
        can.SetModel("models/scenery/PHYSICS/sardine/sardine.mdl")
        __main__.CallEntitySpawn(can)
def spawnLockpicks():
    player = FindPlayer()
    if player.HasItem("item_g_lockpick"):
        player.RemoveItem("item_g_lockpick")
        node = Find("pt_lockpicks")
        center = node.GetCenter()
        key = __main__.CreateEntityNoSpawn("item_g_lockpick", center,
                                           (0, 0, 0))
        __main__.CallEntitySpawn(key)
예제 #12
0
def checkForPasskey():
    pc = __main__.FindPlayer()
    control = Find("control")
    if (pc.HasItem("item_g_warrens4_passkey")):
        control.Unlock()
    #changed by dan_upright 04/12/04 and by wesp
    elif (pc.CalcFeat("inspection") < 5):
        sparklies = __main__.CreateEntityNoSpawn("inspection_node", 0,
                                                 (0, 0, 0))
        sparklies.SetParent("PassKey")
        __main__.CallEntitySpawn(sparklies)
def SetJiDeathQuestState():
    G.Ji_Killed = 1
    pc = __main__.FindPlayer()
    state = pc.GetQuestState("Hitman")
    if G.Lu_Offer > 0 and state < 7 and G.Lu_Killed == 0:
        pc.SetQuest("Hitman", 4)
    elif state > 0 and G.Lu_Killed == 1 and state < 7:
        pc.SetQuest("Hitman", 9)

    # spawn quest item
    ji = Find("ji")
    center = ji.GetCenter()
    point = (center[0] - 25, center[1] - 25, center[2])
    key = __main__.CreateEntityNoSpawn("item_k_hitman_ji_key", point,
                                       (0, 0, 0))
    key.SetName("ji_key")
    __main__.CallEntitySpawn(key)
    sparklies = __main__.CreateEntityNoSpawn("inspection_node", point,
                                             (0, 0, 0))
    sparklies.SetParent("ji_key")
    __main__.CallEntitySpawn(sparklies)
def abandonedBuildingMurder():
    pc = __main__.FindPlayer()
    state = pc.GetQuestState("Muddy")
    if (state == 2):
        relay = Find("murder_scene_unhider")
        relay.Trigger()
        if (pc.CalcFeat("inspection") > 3):
            sparklies = __main__.CreateEntityNoSpawn("inspection_node", 0,
                                                     (0, 0, 0))
            sparklies.SetParent("stereo")
            __main__.CallEntitySpawn(sparklies)
    if G.Bum_Leave == 1 or G.Killer_Key == 1:
        bum = Find("bum")
        if bum: bum.Kill()
def SetLuDeathQuestState():
    G.Lu_Killed = 1
    pc = __main__.FindPlayer()
    state = pc.GetQuestState("Hitman")
    if state > 0 and state < 7 and G.Ji_Killed == 0:
        pc.SetQuest("Hitman", 3)
    elif state > 0 and G.Ji_Killed == 1 and state < 7:
        pc.SetQuest("Hitman", 9)
    if (pc.humanity >= 4 and G.Patch_Plus == 1):
        pc.HumanityAdd(-1)
    # spawn quest item
    lu = Find("lufang")
    center = lu.GetCenter()
    point = (center[0], center[1], center[2] + 20)
    key = __main__.CreateEntityNoSpawn("item_k_hitman_lu_key", point,
                                       (0, 0, 0))
    __main__.CallEntitySpawn(key)
    key.SetName("lu_key")
    sparklies = __main__.CreateEntityNoSpawn("inspection_node", point,
                                             (0, 0, 0))
    sparklies.SetParent("lu_key")
    __main__.CallEntitySpawn(key)
    __main__.CallEntitySpawn(sparklies)
def InsertIdol2(pillar, idol):
    if pillar == idol:
        G["tpl3_" + idol + "_final"] = 1
    target = Find(pillar + "_target")
    if target:
        item = __main__.CreateEntityNoSpawn("item_g_idol_" + idol, target.GetCenter(), target.GetAngles())
        if item: __main__.CallEntitySpawn(item)

    button = Find(pillar + "_brush")
    if button: button.ScriptUnhide()

    trig = Find("trig_" + pillar)
    if trig: trig.Enable()

    tpl3_check_pedestals()
예제 #17
0
def _zmark_util(ent):
    pc = __main__.FindPlayer()
    if pc.GetOrigin() == ent.GetOrigin():
        # inventory entity
        return 0
    if not gz.Markers.has_key(ent):
        entName = ent.GetName()
        tmpName = "_zvtool_tempname"
        # must assign temporary unique targetname in case of entities with no name,
        # or multiple entities with same name
        ent.SetName(tmpName)
        marker = __main__.CreateEntityNoSpawn("inspection_node",
                                              ent.GetCenter(), (0, 0, 0))
        marker.SetParent(tmpName)
        __main__.CallEntitySpawn(marker)
        # restore original name
        ent.SetName(entName)
        # add inspection entity pointer to persistent list, so we don't have to
        # screw around with temporary targetnames when removing them
        gz.Markers[ent] = marker
        return 1
    else:
        return 0