- Katılım
- 2 Ara 2024
- Konular
- 186
- Mesajlar
- 1,980
- Çözüm
- 8
- Online süresi
- 5mo 13d
- Reaksiyon Skoru
- 1,493
- Altın Konu
- 1
- Başarım Puanı
- 206
- MmoLira
- 12,354
- DevLira
- 36
ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!
Oyundaki hataları burda balık tutamazsınız vesaire gibi şeyleri yeni bir notice kutusu tarzında size gösterir.
Video link
ANLATIM,
[CODE lang="python" title="ui.py"]Aratılır
class ImageBox(Window):
Bloğun altına eklenir
class NoticeBoxBoard(Window):
CORNER_WIDTH = 11
CORNER_HEIGHT = 11
LINE_WIDTH = 11
LINE_HEIGHT = 11
BOARD_COLOR = grp.GenerateColor(0.165, 0.133, 0.098, 1.0)
LT = 0
LB = 1
RT = 2
RB = 3
L = 0
R = 1
T = 2
B = 3
def __init__(self, msg, lifeTime= 2.0, layer="UI"):
Window.__init__(self, layer)
CornerFileNames = [
"d:/ymir work/ui/pattern/notice_box/noti_box_left_top.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_left_bot.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_right_top.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_right_bot.png"
]
LineFileNames = [
"d:/ymir work/ui/pattern/notice_box/noti_box_left.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_right.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_top.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_bot.png"
]
self.Corners = []
for fn in CornerFileNames:
corner = ExpandedImageBox()
corner.AddFlag("attach")
corner.AddFlag("not_pick")
corner.LoadImage(fn)
corner.SetParent(self)
corner.Show()
self.Corners.append(corner)
self.Lines = []
for fn in LineFileNames:
line = ExpandedImageBox()
line.AddFlag("attach")
line.AddFlag("not_pick")
line.LoadImage(fn)
line.SetParent(self)
line.Show()
self.Lines.append(line)
self.Base = Bar()
self.Base.SetParent(self)
self.Base.AddFlag("attach")
self.Base.AddFlag("not_pick")
self.Base.SetColor(self.BOARD_COLOR)
self.Base.Show()
self.SetSize(200, 32)
self.SetCenterPosition()
x, y = self.GetGlobalPosition()
self.SetPosition(x, y + 255)
self.AddFlag("float")
self.Show()
self.textLine = TextLine()
self.textLine.SetParent(self)
self.textLine.SetHorizontalAlignCenter()
self.textLine.SetVerticalAlignCenter()
self.textLine.SetPosition(self.GetWidth() / 2, self.GetHeight() / 2 -5 )
self.textLine.SetText(msg)
self.textLine.SetPackedFontColor(0xFFF5F5DC)
self.textLine.Show()
self.lifeTime = lifeTime
self.startTime = app.GetTime()
def SetSize(self, width, height):
width = max(self.CORNER_WIDTH*2, width)
height = max(self.CORNER_HEIGHT*2, height)
Window.SetSize(self, width, height)
self.Corners[self.LB].SetPosition(0, height - self.CORNER_HEIGHT)
self.Corners[self.RT].SetPosition(width - self.CORNER_WIDTH, 0)
self.Corners[self.RB].SetPosition(width - self.CORNER_WIDTH, height - self.CORNER_HEIGHT)
self.Lines[self.L].SetPosition(0, self.CORNER_HEIGHT)
self.Lines[self.R].SetPosition(width - self.CORNER_WIDTH, self.CORNER_HEIGHT)
self.Lines[self.T].SetPosition(self.CORNER_WIDTH, 0)
self.Lines[self.B].SetPosition(self.CORNER_HEIGHT, height - self.CORNER_HEIGHT)
verticalShowingPercentage = float((height - self.CORNER_HEIGHT*2) - self.LINE_HEIGHT) / self.LINE_HEIGHT
horizontalShowingPercentage = float((width - self.CORNER_WIDTH*2) - self.LINE_WIDTH) / self.LINE_WIDTH
self.Lines[self.L].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
self.Lines[self.R].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
self.Lines[self.T].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
self.Lines[self.B].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
self.Base.SetPosition(self.CORNER_WIDTH, self.CORNER_HEIGHT)
self.Base.SetSize(width - self.CORNER_WIDTH*2, height - self.CORNER_HEIGHT*2)
def OnUpdate(self):
if self.lifeTime > 0 and (app.GetTime() - self.startTime > self.lifeTime):
self.Hide()[/CODE]
[CODE lang="python" title="game.py"]Aratılıp değiştirilir
# ADD_FISHING_MESSAGE
def OnFishingNotifyUnknown(self):
# chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)
self.noticeBox = ui.NoticeBoxBoard(localeInfo.FISHING_UNKNOWN)
def OnFishingWrongPlace(self):
# chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
self.noticeBox = ui.NoticeBoxBoard(localeInfo.FISHING_WRONG_PLACE)
# END_OF_ADD_FISHING_MESSAGE
def OnFishingNotify(self, isFish, fishName):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))
def OnFishingFailure(self):
chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)
def OnCannotPickItem(self):
# chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)
self.noticeBox = ui.NoticeBoxBoard(localeInfo.GAME_CANNOT_PICK_ITEM)
# MINING
def OnCannotMining(self):
# chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
self.noticeBox = ui.NoticeBoxBoard(localeInfo.GAME_CANNOT_MINING)
# END_OF_MINING
def OnCannotUseSkill(self, vid, type):
if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
# textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
self.noticeBox = ui.NoticeBoxBoard(localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
self.noticeBox = ui.NoticeBoxBoard(localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
def OnCannotShotError(self, vid, type):
# textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))
msg = localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type))
self.noticeBox = ui.NoticeBoxBoard(msg)[/CODE]
Son olarak ekte verdiğim notice_box.rar içindeki klasörünü etc/ymir work/ui/pattern içine atarsanız olay biter.
Video link
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
ANLATIM,
[CODE lang="python" title="ui.py"]Aratılır
class ImageBox(Window):
Bloğun altına eklenir
class NoticeBoxBoard(Window):
CORNER_WIDTH = 11
CORNER_HEIGHT = 11
LINE_WIDTH = 11
LINE_HEIGHT = 11
BOARD_COLOR = grp.GenerateColor(0.165, 0.133, 0.098, 1.0)
LT = 0
LB = 1
RT = 2
RB = 3
L = 0
R = 1
T = 2
B = 3
def __init__(self, msg, lifeTime= 2.0, layer="UI"):
Window.__init__(self, layer)
CornerFileNames = [
"d:/ymir work/ui/pattern/notice_box/noti_box_left_top.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_left_bot.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_right_top.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_right_bot.png"
]
LineFileNames = [
"d:/ymir work/ui/pattern/notice_box/noti_box_left.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_right.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_top.png",
"d:/ymir work/ui/pattern/notice_box/noti_box_bot.png"
]
self.Corners = []
for fn in CornerFileNames:
corner = ExpandedImageBox()
corner.AddFlag("attach")
corner.AddFlag("not_pick")
corner.LoadImage(fn)
corner.SetParent(self)
corner.Show()
self.Corners.append(corner)
self.Lines = []
for fn in LineFileNames:
line = ExpandedImageBox()
line.AddFlag("attach")
line.AddFlag("not_pick")
line.LoadImage(fn)
line.SetParent(self)
line.Show()
self.Lines.append(line)
self.Base = Bar()
self.Base.SetParent(self)
self.Base.AddFlag("attach")
self.Base.AddFlag("not_pick")
self.Base.SetColor(self.BOARD_COLOR)
self.Base.Show()
self.SetSize(200, 32)
self.SetCenterPosition()
x, y = self.GetGlobalPosition()
self.SetPosition(x, y + 255)
self.AddFlag("float")
self.Show()
self.textLine = TextLine()
self.textLine.SetParent(self)
self.textLine.SetHorizontalAlignCenter()
self.textLine.SetVerticalAlignCenter()
self.textLine.SetPosition(self.GetWidth() / 2, self.GetHeight() / 2 -5 )
self.textLine.SetText(msg)
self.textLine.SetPackedFontColor(0xFFF5F5DC)
self.textLine.Show()
self.lifeTime = lifeTime
self.startTime = app.GetTime()
def SetSize(self, width, height):
width = max(self.CORNER_WIDTH*2, width)
height = max(self.CORNER_HEIGHT*2, height)
Window.SetSize(self, width, height)
self.Corners[self.LB].SetPosition(0, height - self.CORNER_HEIGHT)
self.Corners[self.RT].SetPosition(width - self.CORNER_WIDTH, 0)
self.Corners[self.RB].SetPosition(width - self.CORNER_WIDTH, height - self.CORNER_HEIGHT)
self.Lines[self.L].SetPosition(0, self.CORNER_HEIGHT)
self.Lines[self.R].SetPosition(width - self.CORNER_WIDTH, self.CORNER_HEIGHT)
self.Lines[self.T].SetPosition(self.CORNER_WIDTH, 0)
self.Lines[self.B].SetPosition(self.CORNER_HEIGHT, height - self.CORNER_HEIGHT)
verticalShowingPercentage = float((height - self.CORNER_HEIGHT*2) - self.LINE_HEIGHT) / self.LINE_HEIGHT
horizontalShowingPercentage = float((width - self.CORNER_WIDTH*2) - self.LINE_WIDTH) / self.LINE_WIDTH
self.Lines[self.L].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
self.Lines[self.R].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
self.Lines[self.T].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
self.Lines[self.B].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
self.Base.SetPosition(self.CORNER_WIDTH, self.CORNER_HEIGHT)
self.Base.SetSize(width - self.CORNER_WIDTH*2, height - self.CORNER_HEIGHT*2)
def OnUpdate(self):
if self.lifeTime > 0 and (app.GetTime() - self.startTime > self.lifeTime):
self.Hide()[/CODE]
[CODE lang="python" title="game.py"]Aratılıp değiştirilir
# ADD_FISHING_MESSAGE
def OnFishingNotifyUnknown(self):
# chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)
self.noticeBox = ui.NoticeBoxBoard(localeInfo.FISHING_UNKNOWN)
def OnFishingWrongPlace(self):
# chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
self.noticeBox = ui.NoticeBoxBoard(localeInfo.FISHING_WRONG_PLACE)
# END_OF_ADD_FISHING_MESSAGE
def OnFishingNotify(self, isFish, fishName):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))
def OnFishingFailure(self):
chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)
def OnCannotPickItem(self):
# chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)
self.noticeBox = ui.NoticeBoxBoard(localeInfo.GAME_CANNOT_PICK_ITEM)
# MINING
def OnCannotMining(self):
# chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
self.noticeBox = ui.NoticeBoxBoard(localeInfo.GAME_CANNOT_MINING)
# END_OF_MINING
def OnCannotUseSkill(self, vid, type):
if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
# textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
self.noticeBox = ui.NoticeBoxBoard(localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
self.noticeBox = ui.NoticeBoxBoard(localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
def OnCannotShotError(self, vid, type):
# textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))
msg = localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type))
self.noticeBox = ui.NoticeBoxBoard(msg)[/CODE]
Son olarak ekte verdiğim notice_box.rar içindeki klasörünü etc/ymir work/ui/pattern içine atarsanız olay biter.
Ekli dosyalar
Moderatör tarafında düzenlendi:
En Çok Reaksiyon Alan Mesajlar
link rar olarak ekli dosyalarda ekstra üst rütbelerin konusunu raporluyoruz sadece süre vermiyoruzLütfen konuya 24 saat içerisinde virüstotal ekleyiniz.
Paylaşım için Teşekkürler
Öğeyi görmek için üye olmalısınız.
Rica ederimPaylaşım için Teşekkürler
Öğeyi görmek için üye olmalısınız.
- Katılım
- 22 Eki 2024
- Konular
- 91
- Mesajlar
- 467
- Online süresi
- 1mo 12d
- Reaksiyon Skoru
- 493
- Altın Konu
- 13
- Başarım Puanı
- 113
- MmoLira
- 21,982
- DevLira
- 129
Paylaşım için Teşekkürler
- Katılım
- 2 Ara 2024
- Konular
- 186
- Mesajlar
- 1,980
- Çözüm
- 8
- Online süresi
- 5mo 13d
- Reaksiyon Skoru
- 1,493
- Altın Konu
- 1
- Başarım Puanı
- 206
- MmoLira
- 12,354
- DevLira
- 36
Rica ederim
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 0
- Görüntüleme
- 502
- Cevaplar
- 2
- Görüntüleme
- 300
- Cevaplar
- 13
- Görüntüleme
- 1K
- Cevaplar
- 13
- Görüntüleme
- 1K
- Cevaplar
- 42
- Görüntüleme
- 4K












