Yardım Python da kamuflajın süresini öğrenmek istiyorum.

  • Konuyu açan Konuyu açan hayalimsi
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 1
  • Gösterim Gösterim 62
Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

hayalimsi

Üye
Üye
Mesaj
4
Beğeni
0
Puan
38
Ticaret Puanı
0
Merhaba, yazdığım scriptte kamuflaj kullandırıyorum. Ama bazen buglanabiliyor. Karakterin kamuflajının süresini görmek istiyorum ama bir türlü bulamadım. Yardım edebilecek var mı?
if skill.GetDuration(4) > 0:
chat.AppendChat(7, '11')

şeklinde giriyorum ama ne yazık ki çalışmıyor. Hata nedir?
 
Kod:
Genişlet Daralt Kopyala
        self.UI_Elements["SKILL_GRID_SLOT"].SetSelectEmptySlotEvent(ui.__mem_func__(self.MoveInOutSkillSlot))
        self.UI_Elements["SKILL_GRID_SLOT"].SetSelectItemSlotEvent(ui.__mem_func__(self.MoveInOutSkillSlot))
        self.UI_Elements["SKILL_GRID_SLOT"].SetUnselectItemSlotEvent(ui.__mem_func__(self.MoveInOutSkillSlot))

    def MoveInOutSkillSlot(self, selectedSlot):
        if mouseModule.mouseController.isAttached():
            attachedType = mouseModule.mouseController.GetAttachedType()
            attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
            attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
            attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()

            skillIndex = 0
 
            if player.SLOT_TYPE_QUICK_SLOT == attachedType:
                (quickSlotType, position) = player.GetGlobalQuickSlot(attachedItemSlotPos)
                if quickSlotType == player.SLOT_TYPE_SKILL:
                    skillIndex = player.GetSkillIndex(position)
            elif player.SLOT_TYPE_SKILL == attachedType:
                skillIndex = player.GetSkillIndex(attachedItemSlotPos)
            else:
                chat.AppendChat(1, "Unknown window type")
                mouseModule.mouseController.DeattachObject()
                return

            if not skillIndex:
                chat.AppendChat(1, "Unknown skill index")
                mouseModule.mouseController.DeattachObject()
                return

            skillRealSlot = player.GetSkillSlotIndex(skillIndex)
            (coolTime, elapsedTime) = player.GetSkillCoolTime(skillRealSlot)

grid üzerinden kullanılıyorsa direkt olarak bu kod işinize yarayacaktır, UI olmadan kullanıyorsanız "player.GetSkillIndex" ile "skillIndex" kısmını ve sonrasını alırsanız yeterli olacaktır
 
Geri
Üst