Advertisement
Guest User

Tabela Bonusów ~ KoYGeR

a guest
Mar 25th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.27 KB | None | 0 0
  1. import ui
  2. import player
  3. import wndMgr
  4.  
  5. SILNY = ["Potworom:","Diablom:","Nieumarlym:","Mistykom:","Orkom:","Zwięrzetom:","Ludziom:","Wojownikom:","Ninja:","Sura:","Szamanom:"]
  6. S_P_X = [30, 30, 30, 30, 30, 30, 180, 180, 180, 180, 180]
  7. S_P_Y = [45, 60, 75, 90, 105, 120, 45, 60, 75, 90, 105]
  8.  
  9. ODPORNY = ["Wojowników:","Ninja:","Sura:","Szamanów:","Magie:","Ogień:","Błyskawice:","Wiatr:","Miecze:","Broń dwuręczną:","Sztylety:","Strzały:","Dzwony:","Wachlarze:", "Spowolnienia:", "Omdlenia:"]
  10. O_P_X = [30, 30, 30, 30, 30, 30, 30, 30, 180, 180, 180, 180, 180, 180, 180, 180]
  11. O_P_Y = [180, 195, 210, 225, 240, 255, 270, 285,180, 195, 210, 225, 240, 255, 270, 285]
  12.  
  13. POZOSTALE = ["Regeneracja PŻ:","Regeneracja PE:","Blok ciosu:","Odbicie ciosu:","Bonus doświadczenia:","Drop yang:","Drop przedmiotów:","Obrona:"]
  14. P_P_X = [30, 30, 30, 30, 180, 180, 180, 180]
  15. P_P_Y = [330, 345, 360, 375, 330, 345, 360, 375]
  16.  
  17. BONUSY = ["Silny Przeciwko:","Odporność Na:","Pozostałe:"]
  18. BONUSY_POS_Y = [15, 150, 300]
  19.  
  20. W_P_X = [120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290]
  21. W_P_Y = [45, 60, 75, 90, 105, 120, 180, 195, 210, 225, 240, 255, 270, 285, 330, 345, 360, 375, 45, 60, 75, 90, 105, 180, 195, 210, 225, 240, 255, 270, 285, 330, 345, 360, 375]
  22.  
  23. BONUS = [53,48,47,46,45,44,59,60,61,62,77,75,76,78,32,33,67,79,43,54,55,56,57,69,70,71,74,72,73,89,88,83,84,85,player.DEF_GRADE]
  24.  
  25. PASKI = [40, 175, 325]
  26.  
  27. class OknoBonusow(ui.ThinBoard):
  28.     Opisy = []
  29.     Silny = []
  30.     Odporny = []
  31.     Pozostale = []
  32.     Wartosci = []
  33.     Paski = []
  34.     def __init__(self):
  35.         ui.ThinBoard.__init__(self, "TOP_MOST")
  36.         self.SetSize(350, 410)
  37.         self.Show()
  38.  
  39.         self.BudujOkno()
  40.        
  41.     def __del__(self):
  42.         ui.ThinBoard.__del__(self)
  43.         self.Hide()
  44.    
  45.     def BudujOkno(self):
  46.         for i in xrange(0, 3):
  47.             Vertical = ui.Line()
  48.             Vertical.SetParent(self)
  49.             Vertical.SetPosition(8, PASKI[i])
  50.             Vertical.SetSize(335, 0)
  51.             Vertical.SetColor(0xff777777)
  52.             Vertical.Show()
  53.             self.Paski.append(Vertical)
  54.        
  55.         for i in xrange(0, 3):
  56.             napis = ui.TextLine()
  57.             napis.SetParent(self)
  58.             napis.SetPosition(self.GetWidth()/2, BONUSY_POS_Y[i])
  59.             napis.SetText(BONUSY[i])
  60.             napis.SetHorizontalAlignCenter()
  61.             napis.SetFontColor(1.0, 0.7843, 0.0)
  62.             napis.Show()
  63.             self.Opisy.append(napis)
  64.  
  65.         for i in xrange(0, 11):
  66.             silny = ui.TextLine()
  67.             silny.SetParent(self)
  68.             silny.SetPosition(S_P_X[i], S_P_Y[i])
  69.             silny.SetText(SILNY[i])
  70.             silny.SetFontColor(0.6911, 0.8754, 0.7068)
  71.             silny.Show()
  72.             self.Silny.append(silny)
  73.  
  74.         for i in xrange(0, 16):
  75.             odporny = ui.TextLine()
  76.             odporny.SetParent(self)
  77.             odporny.SetPosition(O_P_X[i], O_P_Y[i])
  78.             odporny.SetText(ODPORNY[i])
  79.             odporny.SetFontColor(0.6911, 0.8754, 0.7068)
  80.             odporny.Show()
  81.             self.Odporny.append(odporny)
  82.  
  83.         for i in xrange(0, 8):
  84.             pozostale = ui.TextLine()
  85.             pozostale.SetParent(self)
  86.             pozostale.SetPosition(P_P_X[i], P_P_Y[i])
  87.             pozostale.SetText(POZOSTALE[i])
  88.             pozostale.SetFontColor(0.6911, 0.8754, 0.7068)
  89.             pozostale.Show()
  90.             self.Pozostale.append(pozostale)
  91.  
  92.         for i in xrange(0, 35):
  93.             wartosc = ui.TextLine()
  94.             wartosc.SetParent(self)
  95.             wartosc.SetPosition(W_P_X[i], W_P_Y[i])
  96.             wartosc.Show()
  97.             wartosc.SetText(str(player.GetStatus(BONUS[i]))+"%")
  98.             if BONUS[i]==88 and player.GetStatus(BONUS[i])>0:
  99.                 wartosc.SetText("Tak")
  100.             elif BONUS[i]==88:
  101.                 wartosc.SetText("Nie")
  102.             if BONUS[i]==89 and player.GetStatus(BONUS[i])>0:
  103.                 wartosc.SetText("Tak")
  104.             elif BONUS[i]==89:
  105.                 wartosc.SetText("Nie")
  106.             if BONUS[i]==player.DEF_GRADE:
  107.                 wartosc.SetText(str(player.GetStatus(BONUS[i])))
  108.             self.Wartosci.append(wartosc)
  109.  
  110.     def OnUpdate(self):
  111.         (mouseX, mouseY) = wndMgr.GetMousePosition()
  112.         self.SetPosition(mouseX-430,mouseY-130)
  113.         for i in xrange(0, 35):
  114.             self.Wartosci[i].SetText(str(player.GetStatus(BONUS[i]))+"%")
  115.             if BONUS[i]==88 and player.GetStatus(BONUS[i])>0:
  116.                 self.Wartosci[i].SetText("Tak")
  117.             elif BONUS[i]==88:
  118.                 self.Wartosci[i].SetText("Nie")
  119.             if BONUS[i]==89 and player.GetStatus(BONUS[i])>0:
  120.                 self.Wartosci[i].SetText("Tak")
  121.             elif BONUS[i]==89:
  122.                 self.Wartosci[i].SetText("Nie")
  123.             if BONUS[i]==player.DEF_GRADE:
  124.                 self.Wartosci[i].SetText(str(player.GetStatus(BONUS[i])))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement