Fliger Files Systeme eingefügt : Archivment System, Hadewer ID Bann System, Shop Currency System, Buff Enfernungs System und Multi Language
langua
langu
Beiträge von cCKnocK
-
-
Generell bei jeder.
-
Da sind nur logs von der motlist.txt... Denke das hat nichts damit zu tun
-
Hallo,
habe den bug das sich beim Porten einfach der Client schließt.
D.h. klicke Warp Ring an z.b. Map1 Bild würd Schwarz und schließt sich.
Syser und Debug sind Leer. Hat jmd. eine idee in welchen Pfaden ich suchen könnte?
MFG: Knock
-
Sieht ganz nice aus. Bin mal gespannnt was mich erwartet ;D
-
Habe es jetzt vergrößert.
Nur bekomme ich das anklicken der Zeilen für Nachkaufen und 6/7 nur Optisch tiefer ohne Funktion siehe:
Bitte melden Sie sich an, um diesen Link zu sehen.
Habe knapp 4Stunde jetzt gesucht und gebe auf^^
Kann mir da evtl. jmd weiter helfen?
Das ist der Code:
Code- import shop
- import player
- import item
- import ui
- import net
- import locale
- import chat
- import grp
- import wndMgr
- import mouseModule
- from uitooltip import ItemToolTip
- # Switchbot by Mijago ; v 2.2.1
- WEAR_NAMES = ItemToolTip.WEAR_NAMES
- AFFECT_DICT = ItemToolTip.AFFECT_DICT
- ### Hier die Boni angeben, die auf dem Server aktiviert sind. Die angegebene Liste ist nur ein Beispiel und MUSS angepasst werden!
- BONI_AVAIL = [1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,27,28,29,30,31,32,33,34,35,36,37,38,39,41,43,44,45,48,53,71,72]
- # Hier 6/7 Boni angeben!
- BONI_RARE_AVAIL = [1,2,3,4,5,6,15,16,53,63]
- # Das Switch-Item
- SWITCH_VNUM = 71084
- SWITCH_RARE_VNUM = 71052
- # Die folgenden zahlen geben den MINMAX Bereich des Reglers an, der die Zeit angibt.
- MIN_SWITCH_DELAY = 35
- MAX_SWITCH_DELAY_APPEND = 120
- # Max 10!!
- MAX_NUM = 7
- proposals = {
- 1: { # 1 = Weapon
- "PVP (Koerper)":[
- [9,10],
- [15,10],
- [17,10],
- [16,10],
- [5,8],
- [3,8],
- ],
- "PVP (Mental)":[
- [9,10],
- [15,10],
- [17,10],
- [6,8],
- [5,10],
- [16,10],
- ],
- "PVM": [
- [5,10],
- [19,20],
- ],
- },
- 2: [ # Armor
- [ #BODY,
- ],
- [ #HEAD,
- ],
- [ #SHIELD,
- ],
- [ #WRIST,
- ],
- [ #FOOTS,
- ],
- [ #NECK,
- ],
- [ #EAR,
- ],
- ],
- }
- # Farben :)
- # COLOR_BG = grp.GenerateColor(0.0, 0.0, 0.0, 0.5)
- # COLOR_INACTIVE = grp.GenerateColor(0.0, 0.0, 1.0, 0.2)
- # COLOR_ACTIVE = grp.GenerateColor(0.1, 0.6, 1.0, 0.2)
- # COLOR_FINISHED = grp.GenerateColor(0.0, 0.8, 1.0, 0.3)
- # COLOR_INACTIVE_RARE = grp.GenerateColor(0.0, 0.2, 1.0, 0.2)
- # COLOR_ACTIVE_RARE = grp.GenerateColor(0.2, 0.7, 1.0, 0.2)
- # COLOR_HIGHLIGHT_RARE = grp.GenerateColor(0.2, 0.2, 1.0, 0.05)
- # COLOR_PIN_HINT = grp.GenerateColor(0.0, 0.5, 1.0, 0.3)
- # COLOR_CHECKBOX_NOT_SELECTED = grp.GenerateColor(0.0, 0.3, 1.0, 0.1)
- # COLOR_CHECKBOX_SELECTED = grp.GenerateColor(0.0, 0.3, 1.0, 0.3)
- # Standardfarben:
- COLOR_BG = grp.GenerateColor(0.0, 0.0, 0.0, 0.5)
- COLOR_INACTIVE = grp.GenerateColor(1.0, 0.0, 0.0, 0.2)
- COLOR_ACTIVE = grp.GenerateColor(1.0, 0.6, 0.1, 0.2)
- COLOR_FINISHED = grp.GenerateColor(0.0, 1.0, 0.0, 0.2)
- COLOR_INACTIVE_RARE = grp.GenerateColor(1.0, 0.2, 0.0, 0.2)
- COLOR_ACTIVE_RARE = grp.GenerateColor(1.0, 0.7, 0.2, 0.2)
- COLOR_HIGHLIGHT_RARE = grp.GenerateColor(1.0, 0.2, 0.2, 0.05)
- COLOR_PIN_HINT = grp.GenerateColor(0.0, 0.5, 1.0, 0.3)
- COLOR_CHECKBOX_NOT_SELECTED = grp.GenerateColor(1.0, 0.3, 0.0, 0.1)
- COLOR_CHECKBOX_SELECTED = grp.GenerateColor(0.3, 1.0, 1.0, 0.3)
- DISTANCE_BOTTOM = 1
- class Bar(ui.Bar):
- def __init__(self,layer = "UI"):
- ui.Bar.__init__(self,layer)
- def SetColor(self,color):
- wndMgr.SetColor(self.hWnd, color)
- self.color = color
- class BonusSelector(ui.Bar):
- def Activate(self):
- self.sub_parent.resetSwitch()
- self.Status_new.SetColor(COLOR_ACTIVE)
- self.sub_parent.StatusBar.SetColor(COLOR_ACTIVE)
- self.sub_parent.StatusText.SetText("Aktiv")
- self.Starter.SetText("Switchen ("+str(self.index+1)+") anhalten")
- self.sub_parent.boni_active = 1
- if self.parentWindow.parentWindow.gameWindow != None:
- self.sub_parent.blockBar.swib_normal.SetColor(COLOR_ACTIVE)
- pass
- def Deactivate(self):
- self.sub_parent.resetSwitch()
- self.Status_new.SetColor(COLOR_INACTIVE)
- self.sub_parent.StatusBar.SetColor(COLOR_INACTIVE)
- self.sub_parent.StatusText.SetText("Inaktiv")
- self.Starter.SetText("Switchen ("+str(self.index+1)+") starten")
- self.sub_parent.boni_active = 0
- if self.sub_parent.parentWindow.parentWindow.gameWindow != None:
- self.sub_parent.blockBar.swib_normal.SetColor(COLOR_INACTIVE)
- pass
- def Activate_rare(self):
- self.sub_parent.resetSwitch_rare()
- self.sub_parent.StatusBar_rare.SetColor(COLOR_ACTIVE_RARE)
- self.sub_parent.StatusText_rare.SetText("6/7 Aktiv")
- self.Starter_rare_boni.SetText("6/7 anhalten")
- self.sub_parent.boni_rare_active = 1
- if self.parentWindow.parentWindow.gameWindow != None:
- self.sub_parent.blockBar.swib_rare.SetColor(COLOR_ACTIVE_RARE)
- pass
- def Deactivate_rare(self):
- self.sub_parent.resetSwitch_rare()
- # self.Status_new.SetColor(COLOR_INACTIVE)
- self.sub_parent.StatusBar_rare.SetColor(COLOR_INACTIVE_RARE)
- self.sub_parent.StatusText_rare.SetText("6/7 Inaktiv")
- self.Starter_rare_boni.SetText("6/7 starten")
- self.Starter_rare_boni.SetUp()
- self.sub_parent.boni_rare_active = 0
- if self.sub_parent.parentWindow.parentWindow.gameWindow != None:
- self.sub_parent.blockBar.swib_rare.SetColor(COLOR_INACTIVE_RARE)
- pass
- def Finish(self):
- self.Status_new.SetColor(COLOR_FINISHED)
- self.sub_parent.StatusBar.SetColor(COLOR_FINISHED)
- self.sub_parent.StatusText.SetText("Fertig")
- self.Starter.SetText("Switchen ("+str(self.index+1)+") fortsetzen")
- self.sub_parent.boni_active = 0
- if self.sub_parent.parentWindow.parentWindow.gameWindow != None:
- self.sub_parent.blockBar.swib_normal.SetColor(COLOR_FINISHED)
- pass
- def Finish_rare(self):
- # self.Status_new.SetColor(COLOR_FINISHED)
- self.sub_parent.StatusBar_rare.SetColor(COLOR_FINISHED)
- self.sub_parent.StatusText_rare.SetText("6/7 Fertig")
- self.Starter_rare_boni.SetText("6/7 fortsetzen")
- self.sub_parent.boni_rare_active = 0
- if self.sub_parent.parentWindow.parentWindow.gameWindow != None:
- self.sub_parent.blockBar.swib_rare.SetColor(COLOR_FINISHED)
- pass
- def Block(self):
- self.BlockBar.Show()
- self.BlockBar.sub.Show()
- self.Starter.Hide()
- pass
- def Unblock(self):
- self.BlockBar.sub.Hide()
- self.BlockBar.Hide()
- self.Starter.Show()
- pass
- def enable_rare_boni(self):
- for i in range(0,4):
- self.boni[6][i].Show()
- self.boni[7][i].Show()
- self.Starter.SetPosition(0,140+45)
- self.bg_rare_boni.Show()
- self.bg_rare_boni_but.Show()
- self.Starter_rare_boni.Show()
- self.sub_parent.StatusBar_rare.Show()
- if self.sub_parent.parentWindow.parentWindow.gameWindow != None:
- self.sub_parent.blockBar.Enable_rare(1)
- def disable_rare_boni(self):
- for i in range(0,4):
- self.boni[6][i].Hide()
- self.boni[7][i].Hide()
- self.Starter.SetPosition(0,140)
- self.bg_rare_boni.Hide()
- self.bg_rare_boni_but.Hide()
- self.Starter_rare_boni.Hide()
- self.sub_parent.StatusBar_rare.Hide()
- self.Deactivate_rare()
- if self.sub_parent.parentWindow.parentWindow.gameWindow != None:
- self.sub_parent.blockBar.Enable_rare(0)
- def __init__(self,sub_parent):
- ui.Bar.__init__(self, "UI")
- self.sub_parent = sub_parent
- self.index = sub_parent.index
- self.SetColor(COLOR_BG)
- self.SetSize(500,225+10)
- self.boni = {}
- self.Status_new = ui.Bar()
- self.Status_new.SetParent(self)
- self.Status_new.SetColor(COLOR_INACTIVE)
- self.Status_new.SetSize(500,5)
- self.Status_new.Show()
- self.bg_rare_boni = ui.Bar()
- self.bg_rare_boni.SetColor(COLOR_HIGHLIGHT_RARE)
- self.bg_rare_boni.SetParent(self)
- self.bg_rare_boni.SetPosition(0,132)
- self.bg_rare_boni.SetSize(500,51)
- self.bg_rare_boni.Hide()
- self.bg_rare_boni_but = ui.Bar()
- self.bg_rare_boni_but.SetColor(COLOR_HIGHLIGHT_RARE)
- self.bg_rare_boni_but.SetParent(self)
- self.bg_rare_boni_but.SetPosition(400,133+50)
- self.bg_rare_boni_but.SetSize(100,25)
- self.bg_rare_boni_but.Hide()
- self.EnableRareBoni = CheckBox("6/7 Einblenden")
- self.EnableRareBoni.SetParent(self)
- self.EnableRareBoni.SetPosition(10,185)
- self.EnableRareBoni.eventUp = self.disable_rare_boni
- self.EnableRareBoni.eventDown = self.enable_rare_boni
- self.EnableRareBoni.Show()
- self.Starter = ui.ToggleButton()
- self.Starter.SetWindowHorizontalAlignCenter()
- self.Starter.SetParent(self)
- self.Starter.SetUpVisual("d:/ymir work/ui/public/XLarge_Button_01.sub")
- self.Starter.SetOverVisual("d:/ymir work/ui/public/XLarge_button_02.sub")
- self.Starter.SetDownVisual("d:/ymir work/ui/public/XLarge_button_03.sub")
- self.Starter.SetPosition(0,140)
- self.Starter.SetText("Switchen starten")
- self.Starter.SetToggleDownEvent(self.Activate)
- self.Starter.SetToggleUpEvent(self.Deactivate)
- self.Starter.Show()
- self.Starter_rare_boni = ui.ToggleButton()
- self.Starter_rare_boni.SetWindowHorizontalAlignCenter()
- self.Starter_rare_boni.SetParent(self)
- self.Starter_rare_boni.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
- self.Starter_rare_boni.SetOverVisual("d:/ymir work/ui/public/Large_button_02.sub")
- self.Starter_rare_boni.SetDownVisual("d:/ymir work/ui/public/Large_button_03.sub")
- self.Starter_rare_boni.SetPosition(200,140+45)
- self.Starter_rare_boni.SetText("6/7 Starten")
- self.Starter_rare_boni.SetToggleDownEvent(self.Activate_rare)
- self.Starter_rare_boni.SetToggleUpEvent(self.Deactivate_rare)
- self.Starter_rare_boni.Hide()
- for i in range(7,5,-1):
- vas = i
- self.boni[vas] = {}
- self.boni[vas][0] = ui.TextLine()
- self.boni[vas][0].SetParent(self)
- self.boni[vas][0].SetText("Bonus "+str(vas))
- self.boni[vas][0].SetPosition(15,10+25*(vas-1))
- self.boni[vas][0].Hide()
- self.boni[vas][1] = DropDown(self,"- Keiner -")
- self.boni[vas][1].SetPosition(70,10+25*(vas-1))
- for x in AFFECT_DICT:
- if x in BONI_RARE_AVAIL:
- self.boni[vas][1].AppendItem(str(AFFECT_DICT[x](0)),x)
- self.boni[vas][1].SetSize(330,20)
- self.boni[vas][1].Hide()
- self.boni[vas][2] = ui.Bar("UI")
- self.boni[vas][2].SetParent(self)
- self.boni[vas][2].SetPosition(410,10+25*(vas-1))
- self.boni[vas][2].SetColor(0xC0000000)
- self.boni[vas][2].SetSize(80,20)
- self.boni[vas][2].Hide()
- self.boni[vas][3] = Edit2("0",14)
- self.boni[vas][3].SetParent(self.boni[vas][2])
- self.boni[vas][3].SetNumberMode()
- self.boni[vas][3].SetSize(80,20)
- self.boni[vas][3].SetPosition(4,3)
- self.boni[vas][3].Hide()
- for i in range(0,5):
- vas = 5-i
- self.boni[vas] = {}
- self.boni[vas][0] = ui.TextLine()
- self.boni[vas][0].SetParent(self)
- self.boni[vas][0].SetText("Bonus "+str(vas))
- self.boni[vas][0].SetPosition(15,10+25*(vas-1))
- self.boni[vas][0].Show()
- self.boni[vas][1] = DropDown(self,"- Keiner -")
- self.boni[vas][1].SetPosition(70,10+25*(vas-1))
- for x in AFFECT_DICT:
- if x in BONI_AVAIL:
- self.boni[vas][1].AppendItem(str(AFFECT_DICT[x](0)),x)
- self.boni[vas][1].SetSize(330,20)
- self.boni[vas][1].Show()
- self.boni[vas][2] = ui.Bar("UI")
- self.boni[vas][2].SetParent(self)
- self.boni[vas][2].SetPosition(410,10+25*(vas-1))
- self.boni[vas][2].SetColor(0xC0000000)
- self.boni[vas][2].SetSize(80,20)
- self.boni[vas][2].Show()
- self.boni[vas][3] = Edit2("0",14)
- self.boni[vas][3].SetParent(self.boni[vas][2])
- self.boni[vas][3].SetNumberMode()
- self.boni[vas][3].SetSize(80,20)
- self.boni[vas][3].SetPosition(4,3)
- self.boni[vas][3].Show()
- self.but_propose = DropDown(self,'Vorschlaege',0)
- self.but_propose.SetParent(self)
- self.but_propose.SetPosition(380,210)
- self.but_propose.OnChange=self.change_boni
- self.but_propose.Show()
- self.BlockBar = ui.Bar()
- self.BlockBar.SetParent(self)
- self.BlockBar.SetColor(COLOR_INACTIVE)
- self.BlockBar.SetPosition(0,5)
- self.BlockBar.SetSize(500,170-5+35+2)
- self.BlockBar.Hide()
- self.BlockBar.sub = ui.Bar()
- self.BlockBar.sub.SetParent(self)
- self.BlockBar.sub.SetColor(COLOR_INACTIVE)
- self.BlockBar.sub.SetPosition(500-122,5+170-5+35+2)
- self.BlockBar.sub.SetSize(122,30)
- self.BlockBar.sub.Hide()
- self.BlockText = ui.TextLine()
- self.BlockText.SetParent(self.BlockBar)
- self.BlockText.SetWindowHorizontalAlignCenter()
- self.BlockText.SetHorizontalAlignCenter()
- self.BlockText.SetPosition(0,140)
- self.BlockText.SetText("Dieses Item kannst du nicht switchen.")
- self.BlockText.Show()
- self.prepare_propose()
- def change_boni(self):
- use = self.but_propose.DropList.GetSelectedItem().value
- bon = 1
- item.SelectItem(self.sub_parent.vnum)
- for x in use:
- # TODO: Check if bonus exists on item!!
- ok = 1
- for i in xrange(item.ITEM_APPLY_MAX_NUM):
- (affectType, affectValue) = item.GetAffect(i)
- if affectType == x[0]:
- ok = 0
- if ok == 0:
- continue
- y = self.boni[bon][1]
- y.SelectByAffectId(x[0])
- self.boni[bon][1].act.SetText(y.DropList.GetSelectedItem().textBox.GetText())
- self.boni[bon][3].SetText(str(x[1]))
- bon+=1
- for x in range(bon,6):
- y = self.boni[x][1].DropList
- y.SelectIndex(0)
- self.boni[x][1].act.SetText(y.GetSelectedItem().textBox.GetText())
- self.boni[x][3].SetText("0")
- def prepare_propose(self):
- self.but_propose.DropList.RemoveAllItems()
- self.but_propose.maxh = 95
- self.but_propose.c = 0
- self.but_propose.AppendItem("Leer",[])
- item.SelectItem(self.sub_parent.vnum)
- type = item.GetItemType()
- use = proposals[type]
- if type == 2:
- use = use[item.GetItemSubType()]
- for prop in use:
- self.but_propose.AppendItem(prop,use[prop])
- class ItemTabBar(ui.Window):
- class BlockBar(ui.Window):
- size_res = 32
- multi = 1
- def SetSize(self,i=1):
- self.multi = i
- ui.Window.SetSize(self,self.size_res,self.size_res*i)
- if self.rare_enabled == 1:
- self.swib_normal.SetSize(self.size_res,self.size_res*i/3*2)
- pos1 = int(1.0*self.size_res*i/3.0*2.0)
- self.swib_normal.SetSize(self.size_res,pos1)
- self.swib_rare.SetSize(self.size_res,self.size_res*i-pos1)
- self.swib_rare.SetPosition(0,pos1)
- self.swib_rare.Show()
- else:
- self.swib_normal.SetSize(self.size_res,self.size_res*i)
- self.swib_rare.Hide()
- def Enable_rare(self,o = 1):
- self.rare_enabled = o
- self.SetSize(self.multi)
- def __init__(self):
- ui.Window.__init__(self)
- self.rare_enabled = 0
- self.swib_normal = ui.Bar()
- self.swib_normal.SetParent(self)
- self.swib_normal.SetSize(self.size_res,self.size_res*self.multi)
- self.swib_normal.SetColor(COLOR_INACTIVE)
- self.swib_normal.SetPosition(0,0)
- self.swib_normal.Show()
- self.swib_rare = ui.Bar()
- self.swib_rare.SetParent(self)
- self.swib_rare.SetSize(self.size_res,self.size_res)
- self.swib_rare.SetColor(COLOR_INACTIVE_RARE)
- self.swib_rare.SetPosition(0,0)
- self.swib_rare.Hide()
- self.SetSize(1)
- class ItemTab(ui.Bar):
- height_selected = 36*3+8
- height_unselected = 36*3+5
- def Destroy(self):
- self.parentWindow.parentWindow.enable_rebuy.SetParent(self.parentWindow.parentWindow)
- self.parentWindow.parentWindow.but_speed.SetParent(self.parentWindow.parentWindow)
- self.parentWindow.parentWindow.help_show_rare.SetParent(self.parentWindow.parentWindow)
- self.parentWindow.parentWindow.help_rebuy.SetParent(self.parentWindow.parentWindow)
- # self.parentWindow.parentWindow.help_stop_all.SetParent(self.parentWindow.parentWindow)
- self.parentWindow.parentWindow.help_duration.SetParent(self.parentWindow.parentWindow)
- # self.parentWindow.parentWindow.but_deactivate_all.SetParent(self.parentWindow.parentWindow)
- # self.parentWindow.parentWindow.but_deactivate_all.Hide()
- self.parentWindow.parentWindow.enable_rebuy.Hide()
- self.parentWindow.parentWindow.but_speed.Hide()
- self.bonusSelector.Hide()
- self.bonusSelector.__del__()
- self.Hide()
- self.__del__()
- def DeleteMe(self):
- self.parentWindow.DeleteTab(self.tabnum)
- def __init__(self,parent,tabnum,index = 0,vnum = 0): ## Init ItemTab
- ui.Bar.__init__(self)
- self.SetColor(COLOR_BG)
- self.SetSize(self.width,self.height_unselected)
- self.index = index
- self.tabnum = tabnum
- self.vnum = vnum
- self.count = 0
- self.count_rare = 0
- self.parentWindow = parent
- self.SetParent(parent)
- if self.parentWindow.parentWindow.gameWindow != None:
- self.blockBar = ItemTabBar.BlockBar()
- self.blockBar.SetParent(self.parentWindow.parentWindow.gameWindow.interface.wndInventory.wndItem)
- ipi = self.parentWindow.parentWindow.gameWindow.interface.wndInventory.inventoryPageIndex
- self.blockBar.Show()
- ip2 = self.index - ipi*45
- self.blockBar.SetPosition(((ip2-int(ip2/5)*5)*self.blockBar.size_res),int(ip2/5)*self.blockBar.size_res)
- self.ItemIcon = ui.ImageBox()
- self.ItemIcon.SetParent(self)
- self.ItemIcon.AddFlag("not_pick")
- self.ItemIcon.SetWindowHorizontalAlignCenter()
- self.ItemIcon.SetWindowVerticalAlignCenter()
- self.ItemIcon.Show()
- self.SlotName = ui.TextLine()
- self.SlotName.SetParent(self)
- self.SlotName.SetWindowHorizontalAlignCenter()
- self.SlotName.SetHorizontalAlignCenter()
- self.SlotName.SetPosition(0,5)
- self.SlotName.SetText("Slot %d" % (self.index+1))
- self.SlotName.AddFlag("not_pick")
- self.SlotName.Show()
- self.StatusBar = Bar() # Special Bar
- self.StatusBar.SetParent(self)
- self.StatusBar.SetWindowVerticalAlignBottom()
- self.StatusBar.SetSize(self.width,20)
- self.StatusBar.SetPosition(0,20)
- self.StatusBar.SetColor(COLOR_INACTIVE)
- self.StatusBar.AddFlag("not_pick")
- self.StatusBar.Show()
- self.StatusText = ui.TextLine()
- self.StatusText.SetParent(self.StatusBar)
- # self.StatusText.SetParent(self)
- self.StatusText.SetWindowHorizontalAlignCenter()
- self.StatusText.SetWindowVerticalAlignCenter()
- self.StatusText.SetHorizontalAlignCenter()
- self.StatusText.SetVerticalAlignCenter()
- self.StatusText.SetPosition(0,0)
- self.StatusText.SetText("Inaktiv")
- self.StatusText.Show()
- self.StatusBar_rare = Bar() # Special Bar
- self.StatusBar_rare.SetParent(self)
- self.StatusBar_rare.SetWindowVerticalAlignBottom()
- self.StatusBar_rare.SetSize(self.width,20)
- self.StatusBar_rare.SetPosition(0,40)
- self.StatusBar_rare.SetColor(COLOR_INACTIVE_RARE)
- self.StatusBar_rare.AddFlag("not_pick")
- self.StatusBar_rare.Hide()
- self.StatusText_rare = ui.TextLine()
- self.StatusText_rare.SetParent(self.StatusBar_rare)
- self.StatusText_rare.SetWindowHorizontalAlignCenter()
- self.StatusText_rare.SetWindowVerticalAlignCenter()
- self.StatusText_rare.SetHorizontalAlignCenter()
- self.StatusText_rare.SetVerticalAlignCenter()
- self.StatusText_rare.SetPosition(0,0)
- self.StatusText_rare.SetText("6/7 Inaktiv")
- self.StatusText_rare.Show()
- self.CloseBut = ui.Button()
- self.CloseBut.SetParent(self)
- self.CloseBut.SetUpVisual("d:/ymir work/ui/public/close_button_01.sub")
- self.CloseBut.SetOverVisual("d:/ymir work/ui/public/close_button_02.sub")
- self.CloseBut.SetDownVisual("d:/ymir work/ui/public/close_button_03.sub")
- self.CloseBut.SetToolTipText("Tab schliessen", 0, -23)
- self.CloseBut.SetEvent(self.DeleteMe)
- self.CloseBut.SetPosition(0,0)
- self.CloseBut.Show()
- self.OnMouseLeftButtonDown = lambda: self.Select()
- self.boni_active = 0
- self.boni_rare_active = 0
- self.bonusSelector = BonusSelector(self)
- self.bonusSelector.SetParentProxy(self.parentWindow.parentWindow)
- self.bonusSelector.SetPosition(10,35+36*3+4*2)
- self.bonusSelector.Hide()
- self.vnum = 0
- self.SetIndex(index)
- self.resetSwitch()
- self.resetSwitch_rare()
- def IsActive(self):
- return self.boni_active == 1
- def IsActive_rare(self):
- return self.boni_rare_active == 1
- def SetParentProxy(self,parent):
- ui.Bar.SetParentProxy(self,parent)
- def Select(self):
- for a in self.parentWindow.tabList:
- self.parentWindow.tabList[a].UnSelect()
- self.parentWindow.tabList[a].bonusSelector.Hide()
- self.bonusSelector.Show()
- self.SetSize(self.width,self.height_selected)
- self.Update()
- # self.parentWindow.parentWindow.but_deactivate_all.SetParent(self.bonusSelector)
- # self.parentWindow.parentWindow.but_deactivate_all.SetPosition(415-10,200+10)
- # self.parentWindow.parentWindow.but_deactivate_all.Show()
- self.parentWindow.parentWindow.enable_rebuy.SetParent(self.bonusSelector)
- self.parentWindow.parentWindow.enable_rebuy.SetPosition(10,200+0)
- self.parentWindow.parentWindow.enable_rebuy.Show()
- self.parentWindow.parentWindow.but_speed.SetParent(self.bonusSelector)
- self.parentWindow.parentWindow.but_speed.SetPosition(0,205+10)
- self.parentWindow.parentWindow.but_speed.Show()
- self.parentWindow.parentWindow.help_show_rare.SetParent(self.bonusSelector)
- self.parentWindow.parentWindow.help_rebuy.SetParent(self.bonusSelector)
- # self.parentWindow.parentWindow.help_stop_all.SetParent(self.bonusSelector)
- self.parentWindow.parentWindow.help_duration.SetParent(self.bonusSelector)
- def UnSelect(self):
- self.SetSize(self.width,self.height_unselected)
- self.Update()
- def Update(self):
- self.StatusBar.SetPosition(0,20)
- self.SetPosition((self.width+self.dist)*self.tabnum,0)
- self.SlotName.SetText("Slot %d" % (self.index+1))
- def resetSwitch(self):
- self.values = [0,0,0,0,0]
- def resetSwitch_rare(self):
- self.values_rare = [0,0]
- # last_switch = -1
- rebuyed = 0
- def nachkauf(self):
- if self.parentWindow.parentWindow.buyed != 0:
- return
- else:
- self.parentWindow.parentWindow.buyed = 1
- if self.parentWindow.parentWindow.enable_rebuy.checked == 1:
- for i in range(0,shop.SHOP_SLOT_COUNT):
- me = shop.GetItemID(i)
- if me == SWITCH_VNUM:
- if shop.GetItemPrice(i) > player.GetMoney():
- # chat.AppendChat(1,"-- Switchitem gefunden! Aber wir haben kein Geld :(")
- self.bonusSelector.Deactivate()
- return
- else:
- net.SendShopBuyPacket(i)
- self.rebuyed = 1
- # self.Switch()
- return
- rebuyed_rare = 0
- def nachkauf_rare(self):
- if self.parentWindow.parentWindow.buyed_rare != 0:
- return
- else:
- self.parentWindow.parentWindow.buyed_rare = 1
- if self.parentWindow.parentWindow.enable_rebuy.checked == 1:
- for i in range(0,shop.SHOP_SLOT_COUNT):
- me = shop.GetItemID(i)
- if me == SWITCH_RARE_VNUM:
- if shop.GetItemPrice(i) > player.GetMoney():
- # chat.AppendChat(1,"-- Switchitem gefunden! Aber wir haben kein Geld :(")
- self.bonusSelector.Deactivate_rare()
- return
- else:
- net.SendShopBuyPacket(i)
- self.rebuyed_rare = 1
- # self.Switch()
- return
- # self.bonusSelector.Deactivate()
- def Switch_rare(self):
- lc = 0
- for i in range(0,90*2):
- if player.GetItemIndex(i) == SWITCH_RARE_VNUM:
- lc+=player.GetItemCount(i)
- if lc == 0 and self.parentWindow.parentWindow.enable_rebuy.checked == 0:
- chat.AppendChat(2,"Slot %d: 6/7 Switchen abgebrochen -> Keine Switchitems & Nachkauf war nicht erfolgreich!" % (self.index+1))
- self.bonusSelector.Deactivate_rare()
- return
- if lc < 15:
- self.nachkauf_rare()
- if lc == 0:
- self.bonusSelector.Deactivate_rare()
- chat.AppendChat(2,"Slot %d: 6/7 Switchen abgebrochen -> Keine Switchitems!" % (self.index+1))
- return
- for i in range(0,90*2):
- if player.GetItemIndex(i) == SWITCH_RARE_VNUM:
- net.SendItemUseToItemPacket(i,self.index)
- return
- def Switch(self):
- lc = 0
- for i in range(0,90*2):
- if player.GetItemIndex(i) == SWITCH_VNUM:
- lc+=player.GetItemCount(i)
- if lc == 0 and self.parentWindow.parentWindow.enable_rebuy.checked == 0:
- self.bonusSelector.Deactivate()
- return
- if lc < 15:
- self.nachkauf()
- if lc == 0:
- self.bonusSelector.Deactivate()
- return
- for i in range(0,90*2):
- if player.GetItemIndex(i) == SWITCH_VNUM:
- net.SendItemUseToItemPacket(i,self.index)
- return
- # self.nachkauf()
- def checkSwitch(self):
- ok = 0
- for i in range(0,5):
- if player.GetItemAttribute(self.index, i) != self.values[i]:
- ok = 1
- self.prob = self.GetProb()
- self.StatusText.SetText("Aktiv (%d%%)" %self.prob)
- if ok == 1 or self.prob >= 90:
- if self.prob >= 90:
- chat.AppendChat(1,"Slot %d: fertig geswitcht!" % (self.index+1))
- self.bonusSelector.Finish()
- return
- self.values = [player.GetItemAttribute(self.index, i) for i in range(0,5)]
- self.Switch()
- elif self.rebuyed > 0:
- self.rebuyed = 0
- self.Switch()
- elif ok == 0 and self.count < 5:
- self.count+=1
- elif ok == 0 and self.count >= 5:
- self.count = 0
- self.Switch()
- # elif self.last_switch > -1 and player.GetItemCount(self.last_switch) == 0:
- # chat.AppendChat(2,"%d"%player.GetItemCount(self.last_switch))
- # self.last_switch = 0
- # self.Switch()
- # else:
- # if self.GetProb() != 100:
- # self.Switch()
- pass
- def checkSwitch_rare(self):
- ok = 0
- for i in range(0,2):
- if player.GetItemAttribute(self.index, i+6) != self.values_rare[i]:
- ok = 1
- self.prob_rare = self.GetProb_rare()
- self.StatusText_rare.SetText("Aktiv (%d%%)" %self.prob_rare)
- if ok == 1 or self.prob_rare >= 90:
- if self.prob_rare >= 90:
- self.bonusSelector.Finish_rare()
- chat.AppendChat(1,"Slot %d: 6/7 fertig geswitcht!" % (self.index+1))
- return
- self.values_rare = [player.GetItemAttribute(self.index, i) for i in range(5,7)]
- self.Switch_rare()
- elif self.rebuyed_rare > 0:
- self.rebuyed_rare = 0
- self.Switch_rare()
- elif ok == 0 and self.count_rare < 5:
- self.count_rare+=1
- elif ok == 0 and self.count_rare >= 5:
- self.count_rare = 0
- self.Switch_rare()
- pass
- def UpdateItem(self):
- # try:
- vnum = player.GetItemIndex(self.index)
- if vnum == 0 and self.vnum != 0:
- self.resetSwitch()
- self.resetSwitch_rare()
- self.vnum = 0
- self.bonusSelector.Deactivate()
- self.bonusSelector.Block()
- self.bonusSelector.prepare_propose()
- self.ItemIcon.Hide()
- if self.parentWindow.parentWindow.gameWindow != None:
- self.blockBar.SetSize(1)
- return
- elif vnum != self.vnum:
- self.resetSwitch()
- self.resetSwitch_rare()
- self.vnum = vnum
- self.bonusSelector.Deactivate()
- self.bonusSelector.prepare_propose()
- item.SelectItem(self.vnum)
- if self.parentWindow.parentWindow.gameWindow != None:
- (w,h) = item.GetItemSize()
- self.blockBar.SetSize(h)
- if item.GetItemType() != 1 and item.GetItemType() != 2:
- self.bonusSelector.Block()
- else:
- self.bonusSelector.Unblock()
- self.ItemIcon.Show()
- self.ItemIcon.LoadImage(item.GetIconImageFileName())
- # self.values = [player.GetItemAttribute(self.index, i) for i in range(0,5)]
- return
- if self.IsActive():
- self.checkSwitch()
- if self.IsActive_rare():
- self.checkSwitch_rare()
- # except:
- # pass
- def SetIndex(self,index):
- self.index = index
- self.bonusSelector.index = index
- self.bonusSelector.Starter.SetText("Switchen ("+str(index+1)+") starten")
- self.Update()
- self.UpdateItem()
- def GetProb_rare(self):
- values = [player.GetItemAttribute(self.index, i+6) for i in range(0,2)]
- val2 = {}
- for i in range(0,2):
- try:
- affectString = AFFECT_DICT[values[i][0]](values[i][1])
- val2[values[i][0]] = values[i][1]
- self.bonusSelector.ibi[i+6].SetText(affectString)
- except:
- pass
- prob = 0
- max = 0
- yp = self.GenList_rare()
- for x in yp:
- if yp[x] in val2 and val2[yp[x]] >= int(self.bonusSelector.boni[x+5][3].GetText()):
- prob = prob+1
- max = max+1
- if max > 0:
- prozent = 100/max*prob
- else:
- prozent = 100
- return prozent
- pass
- def GetProb(self):
- values = [player.GetItemAttribute(self.index, i) for i in range(0,5)]
- val2 = {}
- # for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
- for i in range(0,5):
- try:
- affectString = AFFECT_DICT[values[i][0]](values[i][1])
- val2[values[i][0]] = values[i][1]
- self.bonusSelector.ibi[i].SetText(affectString)
- except:
- pass
- prob = 0
- max = 0
- yp = self.GenList()
- for x in yp:
- if yp[x] in val2 and val2[yp[x]] >= int(self.bonusSelector.boni[x][3].GetText()):
- prob = prob+1
- max = max+1
- if max > 0:
- prozent = 100/max*prob
- else:
- prozent = 100
- return prozent
- def GenList(self):
- ret = {}
- for i in range(0,5):
- if self.bonusSelector.boni[5-i][1].selected.value != 0:
- ret[5-i] = self.bonusSelector.boni[5-i][1].selected.value
- return ret
- def GenList_rare(self):
- ret = {}
- for i in range(0,2):
- if self.bonusSelector.boni[6+i][1].selected.value != 0:
- ret[i+1] = self.bonusSelector.boni[6+i][1].selected.value
- return ret
- def __init__(self,parent):
- ui.Window.__init__(self)
- self.SetSize(600,36*3+4*2)
- self.tabCount = 0
- self.tabList = {}
- self.parentWindow = parent
- self.SetParent(parent)
- self.plusBar = ui.Bar()
- self.plusBar.SetParent(self)
- self.plusBar.SetSize(90,30)
- self.plusBar.SetWindowVerticalAlignCenter()
- self.plusBar.SetColor(COLOR_BG)
- # self.plusBar.OnMouseLeftButtonDown = lambda: self.AddTab_pre()
- self.plusBar.OnMouseLeftButtonUp = lambda: self.AddTab_pre()
- self.OnMouseLeftButtonUp = lambda: self.AddTab_pre()
- self.plusBar.SetPosition(30,0)
- self.plusBar.Show()
- self.AddText = ui.TextLine()
- self.AddText.SetParent(self.plusBar)
- self.AddText.SetText("Item hier platzieren")
- self.AddText.SetWindowVerticalAlignCenter()
- self.AddText.SetWindowHorizontalAlignCenter()
- self.AddText.SetVerticalAlignCenter()
- self.AddText.SetHorizontalAlignCenter()
- self.AddText.SetPosition(0,0)
- self.AddText.Show()
- dist = [
- [500, 0 ], #1
- [240, 10 ],
- [160, 10 ],
- [117, 10.5],
- # [ 80, 25 ], #5
- [ 92, 10 ], #5
- [ 75, 10 ], #6
- [ 64, 9 ], #7
- [ 56, 7.5], #8
- [ 50, 6.5], #9
- [ 45, 5.5], #10
- ][MAX_NUM-1]
- self.ItemTab.width = dist[0]
- self.ItemTab.dist = dist[1]
- #For 8
- # dist = 9-1.5
- # width = 56
- # For 9
- # dist = 9-2.5
- # width = 50
- # For 10
- # dist = 9-3.5
- # width = 45
- def DeleteTab(self,id):
- if self.parentWindow.gameWindow != None:
- self.tabList[id].blockBar.Hide()
- self.tabList[id].blockBar.Destroy()
- self.tabList[id].Destroy()
- # del self.tabList[id]
- self.tabCount = self.tabCount -1
- if self.tabCount > id and id < 5:
- for i in xrange(id,self.tabCount):
- self.tabList[i] = self.tabList[i+1]
- self.tabList[i].tabnum = i
- self.tabList[i].SetPosition((self.tabList[i].width+self.tabList[i].dist)*i,0)
- del self.tabList[self.tabCount]
- else:
- del self.tabList[id]
- if self.tabCount > 0:
- self.tabList[0].Select()
- if (self.ItemTab.width+self.ItemTab.dist)*self.tabCount < 20:
- self.parentWindow.SetSize(520,587-210)
- self.parentWindow.but_speed.Hide()
- self.plusBar.SetPosition(20,0)
- else:
- (x,y) = self.tabList[self.tabCount-1].GetLocalPosition()
- self.plusBar.SetPosition(x+self.ItemTab.width+self.ItemTab.dist,0)
- # self.plusBar.SetPosition((self.ItemTab.width+self.ItemTab.dist)*self.tabCount-10,0)
- self.plusBar.Show()
- def AddTab_pre(self):
- if mouseModule.mouseController.isAttached():
- attachedSlotType = mouseModule.mouseController.GetAttachedType()
- attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
- attachedSlotVnum = mouseModule.mouseController.GetAttachedItemIndex()
- item.SelectItem(attachedSlotVnum)
- if item.GetItemType() != 1 and item.GetItemType() != 2:
- mouseModule.mouseController.DeattachObject()
- chat.AppendChat(2,"Dieses Item kannst du nicht switchen.")
- return
- for a in self.tabList:
- if self.tabList[a].index == attachedSlotPos:
- mouseModule.mouseController.DeattachObject()
- chat.AppendChat(2,"Dieser Slot ist bereits eingefuegt worden!")
- return
- if player.SLOT_TYPE_INVENTORY == attachedSlotType:
- self.AddTab(attachedSlotPos,attachedSlotVnum)
- chat.AppendChat(2,"Item hinzugefuegt!")
- mouseModule.mouseController.DeattachObject()
- def AddTab(self,id,vnum = 0):
- if self.tabCount < MAX_NUM:
- self.tabList[self.tabCount] = self.ItemTab(self,self.tabCount,id,vnum)
- self.tabList[self.tabCount].Select()
- self.tabList[self.tabCount].Show()
- self.tabCount+= 1
- if (self.ItemTab.width+self.ItemTab.dist)*self.tabCount < 20:
- self.plusBar.SetPosition(0,0)
- else:
- (x,y) = self.tabList[self.tabCount-1].GetLocalPosition()
- self.plusBar.SetPosition(x+self.ItemTab.width+self.ItemTab.dist,0)
- if self.tabCount == MAX_NUM:
- self.plusBar.Hide()
- self.parentWindow.SetSize(520,587+10)
- self.parentWindow.but_speed.Show()
- # return 0
- class Bot(ui.BoardWithTitleBar):
- class PinGroup(ui.Bar):
- def OnUpdate(self):
- ## Now check position.
- (x,y) = self.GetGlobalPosition()
- max_x = wndMgr.GetScreenWidth()-self.GetWidth()
- max_y = wndMgr.GetScreenHeight()-self.GetHeight()-DISTANCE_BOTTOM
- if not x == self.pos_x or not y == self.pos_y:
- old_dir = self.dir
- if self.pos_x == 0 and not self.pos_y == 0 and not self.pos_y == max_y and old_dir != 1:
- self.parse_dir(1)
- elif self.pos_x == max_x and not self.pos_y == 0 and not self.pos_y == max_y and old_dir != 2:
- self.parse_dir(2)
- elif self.pos_y == max_y and not self.pos_x == 0 and not self.pos_x == max_x and old_dir != 4:
- self.parse_dir(4)
- elif self.pos_y == 0 and not self.pos_x == 0 and not self.pos_x == max_x and old_dir != 3:
- self.parse_dir(3)
- max_x = wndMgr.GetScreenWidth()-self.GetWidth()
- max_y = wndMgr.GetScreenHeight()-self.GetHeight()-DISTANCE_BOTTOM
- if self.pos_x == 0 and not self.pos_y == 0 and not self.pos_y == max_y:
- x = 0
- elif self.pos_x == max_x and not self.pos_y == 0 and not self.pos_y == max_y:
- x = max_x
- elif self.pos_y == 0 and not self.pos_x == 0 and not self.pos_x == max_x:
- y = 0
- elif self.pos_y == max_y and not self.pos_x == 0 and not self.pos_x == max_x:
- y = max_y
- if x > 0 and x < max_x and y > 0 and y < max_y:
- if y < int(max_y/2):
- y = 0
- else:
- y = max_y
- if x < int(max_x/2):
- x = 0
- else:
- x = max_x
- x = min(max(0,x),wndMgr.GetScreenWidth()-self.GetWidth())
- y = min(max(0,y),wndMgr.GetScreenHeight()-self.GetHeight()-DISTANCE_BOTTOM)
- self.SetPosition(x,y)
- self.pos_x = x
- self.pos_y = y
- # (self.pos_x,self.pos_y) = self.GetGlobalPosition()
- self.parent.OnUpdate()
- for c in self.txtlist:
- c.SetColor(c.item.StatusBar.color)
- c.txt2.SetText("Status: %s" % c.item.StatusText.GetText())
- try:
- c.listWin2.SetColor(c.item.StatusBar_rare.color)
- c.txt3.SetText("Status: %s" % c.item.StatusText_rare.GetText())
- except:
- pass
- def ShowMainWindow(self):
- (x,y) = self.parent.GetGlobalPosition()
- x = min(max(32,x),wndMgr.GetScreenWidth()-self.parent.GetWidth()-32)
- y = min(max(32,y),wndMgr.GetScreenHeight()-self.parent.GetHeight()-DISTANCE_BOTTOM-32)
- self.parent.SetPosition(x,y)
- self.parent.Show()
- self.__del__()
- def parse_dir(self,dir):
- self.dir = dir
- w,h = 100,50
- for listWin in self.txtlist:
- itm = listWin.item
- listWin.AddFlag("not_pick")
- if dir >= 3:
- listWin.SetPosition(w,4)
- listWin.SetSize(90,h-8)
- w+=92
- if itm.bonusSelector.EnableRareBoni.checked == 1:
- w+=15
- listWin.SetSize(105,4+12+12)
- listWin.listWin2.SetSize(105,14)
- listWin.listWin2.Show()
- listWin.txt3.Show()
- else:
- listWin.SetPosition(0,h)
- listWin.SetSize(w,4+12+12+2)
- if itm.bonusSelector.EnableRareBoni.checked == 1:
- listWin.SetSize(w,4+12+12)
- listWin.listWin2.SetSize(w,14)
- listWin.listWin2.Show()
- listWin.txt3.Show()
- # itl.append(txt3)
- h+=12
- pass
- h+=4+12+12+4
- self.SetSize(w,h)
- def __init__(self,parent,dir = 1):
- self.parent = parent
- self.dir = dir
- ui.Bar.__init__(self)
- # Direction: 1 = left; 2 = right; 3 = top
- self.SetColor(COLOR_BG)
- w,h = 100,50
- self.AddFlag("float")
- self.AddFlag("movable")
- self.maximise_but = ui.Button()
- self.maximise_but.SetParent(self)
- self.maximise_but.SetPosition(4,4)
- self.maximise_but.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
- self.maximise_but.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
- self.maximise_but.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
- self.maximise_but.SetText("Vergroessern")
- self.maximise_but.SetEvent(self.ShowMainWindow)
- self.maximise_but.Show()
- self.stop_but = ui.Button()
- self.stop_but.SetParent(self)
- self.stop_but.SetPosition(4,24)
- self.stop_but.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
- self.stop_but.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
- self.stop_but.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
- self.stop_but.SetText("Alle Deaktivieren")
- self.stop_but.SetEvent(self.parent.deactivate_all)
- self.stop_but.Show()
- self.txtlist = []
- for a in self.parent.itemTabBar.tabList:
- itm = self.parent.itemTabBar.tabList[a]
- listWin = ui.Bar()
- listWin.item = itm
- self.txtlist.append(listWin)
- listWin.SetColor(itm.StatusBar.color)
- listWin.SetParent(self)
- listWin.AddFlag("not_pick")
- listWin.Show()
- listWin.txt1 = ui.TextLine()
- listWin.txt1.SetParent(listWin)
- listWin.txt1.SetText("Slot %d:" %(itm.index+1))
- listWin.txt1.Show()
- listWin.txt1.SetPosition(4,2)
- listWin.txt2 = ui.TextLine()
- listWin.txt2.SetParent(listWin)
- listWin.txt2.SetText("Status: %s" % itm.StatusText.GetText())
- listWin.txt2.SetPosition(4,2+12)
- listWin.txt2.Show()
- listWin.listWin2 = ui.Bar()
- listWin.listWin2.AddFlag("not_pick")
- listWin.listWin2.SetColor(itm.StatusBar_rare.color)
- listWin.listWin2.SetParent(listWin)
- listWin.listWin2.SetPosition(0,4+12+12)
- listWin.listWin2.SetSize(w,12+2)
- listWin.listWin2.Hide()
- listWin.txt3 = ui.TextLine()
- listWin.txt3.SetParent(listWin.listWin2)
- listWin.txt3.SetText("Status: %s" % itm.StatusText_rare.GetText())
- listWin.txt3.SetPosition(4,0)
- listWin.txt3.Hide()
- if dir >= 3:
- listWin.SetPosition(w,4)
- listWin.SetSize(90,h-8)
- w+=92
- if itm.bonusSelector.EnableRareBoni.checked == 1:
- w+=15
- listWin.SetSize(105,4+12+12)
- listWin.listWin2.SetSize(105,14)
- listWin.listWin2.Show()
- listWin.txt3.Show()
- else:
- listWin.SetPosition(0,h)
- listWin.SetSize(w,4+12+12+2)
- if itm.bonusSelector.EnableRareBoni.checked == 1:
- listWin.SetSize(w,4+12+12)
- listWin.listWin2.Show()
- listWin.txt3.Show()
- # itl.append(txt3)
- h+=12
- pass
- h+=4+12+12+4
- # else:
- # self.txtlist.append(itl)
- self.SetSize(w,h)
- (x,y) = self.parent.GetGlobalPosition()
- x = min(max(0,x),wndMgr.GetScreenWidth()-self.GetWidth())
- y = min(max(0,y),wndMgr.GetScreenHeight()-self.GetHeight()-DISTANCE_BOTTOM)
- if dir == 1:
- # self.SetWindowHorizontalAlignLeft()
- self.SetPosition(0,y)
- elif dir == 2:
- # self.SetWindowHorizontalAlignRight()
- self.SetPosition(wndMgr.GetScreenWidth()-self.GetWidth(),y)
- elif dir == 3:
- # self.SetWindowVerticalAlignTop()
- self.SetPosition(x,0)
- else:
- # self.SetWindowVerticalAlignBottom()
- self.SetPosition(x,wndMgr.GetScreenHeight()-(DISTANCE_BOTTOM+h))
- (self.pos_x,self.pos_y) = self.GetGlobalPosition()
- self.parse_dir(dir)
- # if dir == 1:
- # self.SetWindowHorizontalAlignLeft()
- # self.SetPosition(0,0)
- # elif dir == 2:
- # self.SetWindowHorizontalAlignRight()
- # self.SetPosition(self.GetWidth(),0)
- # elif dir == 3:
- # self.SetWindowHorizontalAlignCenter()
- # self.SetPosition(0,0)
- # elif dir == 4:
- # self.SetWindowHorizontalAlignCenter()
- # self.SetPosition(0,36+h)
- # else:
- # return # ERR
- pinhint = 0
- def ShowPinHint(self,type):
- self.pinhint = type
- if type == 0:
- self.PinHint.Hide()
- return
- # type=2
- (x,y) = self.GetGlobalPosition()
- if type == 1: # Left
- self.PinHint.SetWindowHorizontalAlignLeft()
- self.PinHint.SetWindowVerticalAlignCenter()
- self.PinHint.SetSize(max(min(30,30-x),3),wndMgr.GetScreenHeight())
- self.PinHint.SetPosition(0,0)
- elif type == 2: # Right
- self.PinHint.SetWindowHorizontalAlignRight()
- self.PinHint.SetWindowVerticalAlignCenter()
- self.PinHint.SetSize(30,wndMgr.GetScreenHeight())
- self.PinHint.SetPosition(max(min(30,30-(wndMgr.GetScreenWidth()-(x+self.GetWidth()))),3),0)
- elif type == 3: # Top
- self.PinHint.SetWindowHorizontalAlignCenter()
- self.PinHint.SetWindowVerticalAlignTop()
- self.PinHint.SetSize(wndMgr.GetScreenWidth(),max(min(30,30-y),3))
- self.PinHint.SetPosition(0,0)
- elif type == 4: # Top
- self.PinHint.SetWindowHorizontalAlignCenter()
- self.PinHint.SetWindowVerticalAlignBottom()
- self.PinHint.SetSize(wndMgr.GetScreenWidth(),30)
- self.PinHint.SetPosition(0,36+max(min(30,30-(wndMgr.GetScreenHeight()-36-(y+self.GetHeight()))),3))
- self.PinHint.Show()
- # else:
- def __init__(self):
- ui.BoardWithTitleBar.__init__(self)
- self.gameWindow = None
- self.SetTitleName(" Switchbot ")
- self.AddFlag("float")
- self.AddFlag("movable")
- self.SetPosition(30,30)
- # self.SetSize(520,487)
- # self.SetSize(520,487-210)
- self.SetSize(520,487-210)
- self.PinHint = ui.Bar()
- self.PinHint.SetColor(COLOR_PIN_HINT)
- self.PinHint.Show()
- self.OnMouseLeftButtonDown = self.drag_start
- self.OnMouseLeftButtonUp = self.drag_end
- self.titleBar.MinimizeBut = ui.Button()
- self.titleBar.MinimizeBut.SetParent(self.titleBar)
- self.titleBar.MinimizeBut.SetUpVisual("d:/ymir work/ui/public/minimize_button_01.sub")
- self.titleBar.MinimizeBut.SetOverVisual("d:/ymir work/ui/public/minimize_button_02.sub")
- self.titleBar.MinimizeBut.SetDownVisual("d:/ymir work/ui/public/minimize_button_03.sub")
- self.titleBar.MinimizeBut.SetToolTipText("Minimieren", 0, -23)
- self.titleBar.MinimizeBut.SetPosition(520 - self.titleBar.btnClose.GetWidth()-3- 32 - 3, 3)
- self.titleBar.MinimizeBut.SetEvent(lambda: self.PinShow(1))
- self.titleBar.MinimizeBut.Show()
- self.titleBar.HelpBut = ui.ToggleButton()
- self.titleBar.HelpBut.SetParent(self.titleBar)
- self.titleBar.HelpBut.SetUpVisual("d:/ymir work/ui/public/small_button_01.sub")
- self.titleBar.HelpBut.SetOverVisual("d:/ymir work/ui/public/small_button_02.sub")
- self.titleBar.HelpBut.SetDownVisual("d:/ymir work/ui/public/small_button_03.sub")
- self.titleBar.HelpBut.SetToolTipText("Ausfuehrliche Hilfe", 0, -23)
- self.titleBar.HelpBut.SetText("Hilfe")
- self.titleBar.HelpBut.SetPosition(3, 0)
- self.titleBar.HelpBut.SetToggleDownEvent(lambda: self.ToggleHelp(1))
- self.titleBar.HelpBut.SetToggleUpEvent(lambda: self.ToggleHelp(0))
- self.titleBar.HelpBut.Show()
- self.but_deactivate_all = ui.Button()
- # self.but_deactivate_all.SetParent(self)
- self.but_deactivate_all.SetParent(self.titleBar)
- # self.but_deactivate_all.SetPosition(415,350)
- self.but_deactivate_all.SetPosition(3+5+self.titleBar.HelpBut.GetWidth(), 0)
- self.but_deactivate_all.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
- self.but_deactivate_all.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
- self.but_deactivate_all.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
- self.but_deactivate_all.SetText("Alle anhalten")
- self.but_deactivate_all.SetEvent(self.deactivate_all)
- self.but_deactivate_all.Show()
- self.titleBar.but_deactivate_all = ui.Button()
- self.titleBar.but_deactivate_all.SetParent(self.titleBar)
- self.titleBar.but_deactivate_all.SetPosition(3+5+self.titleBar.HelpBut.GetWidth()+5+self.but_deactivate_all.GetWidth(), 0)
- self.titleBar.but_deactivate_all.SetUpVisual("d:/ymir work/ui/public/small_button_01.sub")
- self.titleBar.but_deactivate_all.SetOverVisual("d:/ymir work/ui/public/small_button_02.sub")
- self.titleBar.but_deactivate_all.SetDownVisual("d:/ymir work/ui/public/small_button_03.sub")
- self.titleBar.but_deactivate_all.SetText("Info")
- self.titleBar.but_deactivate_all.SetEvent(self.about)
- self.titleBar.but_deactivate_all.Show()
- self.titleName.SetPosition(60, 4)
- self.enable_rebuy = CheckBox("Nachkaufen aktivieren")
- self.enable_rebuy.Toggle()
- self.enable_rebuy.Hide()
- self.but_speed = ui.SliderBar()
- self.but_speed.SetParent(self)
- self.but_speed.SetWindowHorizontalAlignCenter()
- self.but_speed.SetPosition(0,60)
- self.but_speed.SetSliderPos(0.0)
- # self.but_speed.SetToolTipText("Switch-Geschwindigkeit", 0, -23)
- # self.but_speed.Show()
- self.but_speed.Hide()
- self.itemTabBar = ItemTabBar(self)
- self.itemTabBar.SetPosition(10,35)
- self.itemTabBar.Show()
- self.buyed = 0
- self.buyed_rare = 0
- self.SetCloseEvent(self._Hide)
- self.Hide = self._Hide
- ### NOW initialize the HELP stuff!
- self.help_add_item = HelpBar(0.8,'Ziehe ein Item hierher, um es hinzuzufuegen.')
- self.help_add_item.SetParent(self)
- self.help_add_item.SetPosition(60,50)
- self.help_minimize = HelpBar(0.8,'Ziehe den Bot an den Rand, um ihn zu verkleinern!',1)
- self.help_minimize.SetParent(self.titleBar)
- self.help_minimize.SetWindowHorizontalAlignCenter()
- self.help_minimize.SetPosition(100,-30)
- self.help_show_rare = HelpBar(0.85,'Hiermit kannst du die Anzeige von 6/7 Boni umschalten.')
- self.help_show_rare.SetParent(self)
- # self.help_show_rare.SetPosition(35,292)
- self.help_rebuy = HelpBar(0.5,'Soll der Bot nachkaufen?')
- self.help_rebuy.SetParent(self)
- # self.help_rebuy.SetPosition(25,277)
- self.help_stop_all = HelpBar(0.8,'Stop ALLE Vorgaenge!',1)
- self.help_stop_all.SetParent(self.titleBar)
- self.help_stop_all.SetPosition(3+5+self.titleBar.HelpBut.GetWidth()*1.2,-30)
- self.help_duration = HelpBar(0.8,'Verlangsamt den Bot.',1)
- self.help_duration.SetParent(self)
- def ToggleHelp(self,val):
- self.help_on = val
- def Show(self):
- ui.BoardWithTitleBar.Show(self)
- self.bot_shown = 1
- def _Hide(self):
- ## ONLY FOR TESTING
- # for a in range(0,self.itemTabBar.tabCount):
- # self.itemTabBar.DeleteTab(0)
- ui.BoardWithTitleBar.Hide(self)
- self.bot_shown = 0
- def deactivate_all(self):
- for a in self.itemTabBar.tabList:
- self.itemTabBar.tabList[a].bonusSelector.Starter.SetUp()
- self.itemTabBar.tabList[a].bonusSelector.Starter.OnToggleUp()
- self.itemTabBar.tabList[a].bonusSelector.Starter_rare_boni.SetUp()
- self.itemTabBar.tabList[a].bonusSelector.Starter_rare_boni.OnToggleUp()
- pass
- drag = 0
- def drag_start(self):
- self.drag = 1
- def drag_end(self):
- self.drag = 0
- if self.pinhint > 0:
- self.PinShow(self.pinhint)
- # self.PinGroupBox = self.PinGroup()
- pass
- self.ShowPinHint(0)
- def PinShow(self,dir):
- self.PinGroupBox = self.PinGroup(self,dir)
- self.Hide()
- self.PinGroupBox.Show()
- def EnableInventoryTweak(self,gameWindow):
- self.gameWindow=gameWindow
- self.gameWindow.interface.wndInventory.inventoryTab[0].SetEvent(lambda arg=0: self.__SetInventoryPage(arg))
- self.gameWindow.interface.wndInventory.inventoryTab[1].SetEvent(lambda arg=1: self.__SetInventoryPage(arg))
- def __SetInventoryPage(self,arg):
- self.gameWindow.interface.wndInventory.SetInventoryPage(arg)
- for a in self.itemTabBar.tabList:
- itm = self.itemTabBar.tabList[a]
- if itm.index >= arg*45 and itm.index < (arg+1)*45:
- itm.blockBar.Show()
- else:
- itm.blockBar.Hide()
- help_on = 0
- counter = 0
- AboutWindow = None
- def OnUpdate(self):
- if self.AboutWindow:
- if self.AboutWindow.x_counter > 1:
- self.AboutWindow.x_counter -=1
- self.AboutWindow.text6.SetText("Zeit: %0.1f" % (self.AboutWindow.x_counter/45.0))
- elif self.AboutWindow.x_counter == 1:
- self.AboutWindow.Hide()
- # self.AboutWindow.Delete()
- if self.help_on == 1:
- (x,y) = self.itemTabBar.plusBar.GetLocalPosition()
- self.help_add_item.SetPosition(x+20,50)
- self.help_add_item.Show()
- self.help_stop_all.Show()
- self.help_minimize.Show()
- if self.itemTabBar.tabCount > 0:
- self.help_show_rare.SetPosition(25,264)
- self.help_show_rare.Show()
- self.help_rebuy.SetPosition(15,247)
- self.help_rebuy.Show()
- # self.help_duration.SetPosition(300,180)
- self.help_duration.SetPosition(190-5.5+self.but_speed.GetSliderPos()*int(35.5+self.but_speed.GetWidth()/2),180)
- self.help_duration.Show()
- else:
- self.help_show_rare.Hide()
- self.help_rebuy.Hide()
- self.help_duration.Hide()
- else:
- self.help_add_item.Hide()
- self.help_minimize.Hide()
- self.help_show_rare.Hide()
- self.help_rebuy.Hide()
- self.help_stop_all.Hide()
- self.help_duration.Hide()
- if self.drag == 1:
- (x1, y1) = self.GetGlobalPosition()
- # if x1 < 0:
- # x1 = 0
- # elif x1 > wndMgr.GetScreenWidth()-520:
- # x1 = wndMgr.GetScreenWidth()-520
- # if y1 < 0:
- # y1 = 0
- # elif y1 > wndMgr.GetScreenHeight()-36-self.GetHeight():
- # y1 = wndMgr.GetScreenHeight()-36-self.GetHeight()
- x1 = max(min(wndMgr.GetScreenWidth()-520,x1),0)
- y1 = max(min(wndMgr.GetScreenHeight()-36-self.GetHeight(),y1),0)
- self.SetPosition(x1,y1)
- if x1 < 30:
- self.ShowPinHint(1)
- elif wndMgr.GetScreenWidth()-x1-520 < 30:
- self.ShowPinHint(2)
- elif y1 < 30:
- self.ShowPinHint(3)
- elif wndMgr.GetScreenHeight()-y1-self.GetHeight() < 60:
- self.ShowPinHint(4)
- else:
- self.ShowPinHint(0)
- # self.SetPosition(x1+(x-self.drag_pos[0]),y1)
- pass
- if self.gameWindow != None:
- for a in self.itemTabBar.tabList:
- itm = self.itemTabBar.tabList[a]
- self.counter+=1
- if self.counter >= int(self.but_speed.GetSliderPos()*MAX_SWITCH_DELAY_APPEND+MIN_SWITCH_DELAY):
- self.buyed = 0
- self.buyed_rare = 0
- self.counter = 0
- for a in self.itemTabBar.tabList:
- itm = self.itemTabBar.tabList[a]
- itm.UpdateItem()
- # if itm.
- def about(self):
- self.AboutWindow = ui.ThinBoard()
- self.AboutWindow.SetParent(self)
- self.AboutWindow.SetSize(250,100)
- self.AboutWindow.SetWindowHorizontalAlignCenter()
- self.AboutWindow.SetWindowVerticalAlignCenter()
- self.AboutWindow.SetPosition(0,0)
- self.AboutWindow.Show()
- self.AboutWindow.x_counter = 450
- self.AboutWindow.text1 = ui.TextLine()
- self.AboutWindow.text1.SetParent(self.AboutWindow)
- self.AboutWindow.text1.SetWindowHorizontalAlignCenter()
- self.AboutWindow.text1.SetHorizontalAlignCenter()
- self.AboutWindow.text1.SetPosition(0,5)
- self.AboutWindow.text1.SetText("Switchbot V2.2 by Mijago")
- self.AboutWindow.text1.SetPackedFontColor(ui.GenerateColor(58, 141, 221))
- self.AboutWindow.text1.Show()
- self.AboutWindow.text2 = ui.TextLine()
- self.AboutWindow.text2.SetParent(self.AboutWindow)
- self.AboutWindow.text2.SetPosition(8,18)
- self.AboutWindow.text2.SetText("Dieser Switchbot wurde von Mijago entwickelt.")
- self.AboutWindow.text2.Show()
- self.AboutWindow.text3 = ui.TextLine()
- self.AboutWindow.text3.SetParent(self.AboutWindow)
- self.AboutWindow.text3.SetPosition(8,18+13)
- self.AboutWindow.text3.SetText("")
- self.AboutWindow.text3.Show()
- self.AboutWindow.text4 = ui.TextLine()
- self.AboutWindow.text4.SetParent(self.AboutWindow)
- self.AboutWindow.text4.SetPosition(8,18+13*3)
- self.AboutWindow.text4.SetText("")
- self.AboutWindow.text4.Show()
- self.AboutWindow.text5 = ui.TextLine()
- self.AboutWindow.text5.SetParent(self.AboutWindow)
- self.AboutWindow.text5.SetPosition(8,18+13*4)
- self.AboutWindow.text5.SetText("")
- self.AboutWindow.text5.Show()
- self.AboutWindow.text6 = ui.TextLine()
- self.AboutWindow.text6.SetParent(self.AboutWindow)
- self.AboutWindow.text6.SetPosition(200,18+13*5)
- self.AboutWindow.text6.SetText("Zeit: %d" % self.AboutWindow.x_counter)
- self.AboutWindow.text6.Show()
- class HelpBar(ui.Window):
- def __init__(self,width,text,centered = 0):
- ui.Window.__init__(self)
- self.AddFlag("not_pick")
- self.AddFlag("attach")
- img = ui.ExpandedImageBox()
- img.SetParent(self)
- img.LoadImage("d:/ymir work/ui/pattern/help_stick.tga")
- img.SetRenderingRect(0.0, -width, 0.0, 0.0)
- img.Show()
- self.img = img
- txt = ui.TextLine()
- txt=ui.TextLine()
- txt.SetParent(self)
- txt.SetText(text)
- txt.Show()
- img.SetPosition(0,18-width*img.GetHeight())
- txt.SetPosition(0,0)
- txt.SetWindowHorizontalAlignCenter()
- if centered != 0:
- txt.SetHorizontalAlignCenter()
- # txt.SetPosition(0,0)
- self.txt = txt
- class DropDown(ui.Window):
- dropped = 0
- dropstat = 0
- last = 0
- lastS = 0
- maxh = 95
- OnChange = None
- class Item(ui.ListBoxEx.Item):
- def __init__(self,parent, text,value=0):
- ui.ListBoxEx.Item.__init__(self)
- self.textBox=ui.TextLine()
- self.textBox.SetParent(self)
- self.textBox.SetText(text)
- # self.textBox.SetLimitWidth(parent.GetWidth()-132)
- self.textBox.Show()
- self.value = value
- def GetValue(self):
- return self.value
- def __del__(self):
- ui.ListBoxEx.Item.__del__(self)
- def __init__(self,parent,tt = "",down=1):
- ui.Window.__init__(self,"TOP_MOST")
- self.down = down
- self.SetParentProxy(parent)
- self.bg = ui.Bar("TOP_MOST")
- self.bg.SetParent(self)
- self.bg.SetPosition(0,0)
- self.bg.SetColor(0xc0000000)
- self.bg.OnMouseOverIn = self.bgMouseIn
- self.bg.OnMouseOverOut = self.bgMouseOut
- self.bg.OnMouseLeftButtonDown = self.ExpandMe
- self.bg.Show()
- self.act = ui.TextLine()
- self.act.SetParent(self.bg)
- self.act.SetPosition(4,2)
- self.act.SetText(tt)
- self.act.Show()
- self.GetText = self.act.GetText
- self.Drop = ui.Bar("TOP_MOST")
- self.Drop.SetParent(self.GetParentProxy())
- self.Drop.SetPosition(0,21)
- # self.Drop.SetSize(150,95)
- self.Drop.SetSize(150,0)
- # self.Drop.SetColor(0xc00a0a0a)
- self.Drop.SetColor(0xff0a0a0a)
- self.ScrollBar = ui.ThinScrollBar()
- self.ScrollBar.SetParent(self.Drop)
- self.ScrollBar.SetPosition(132,0)
- # self.ScrollBar.SetScrollBarSize(95)
- self.ScrollBar.SetScrollBarSize(0)
- # self.ScrollBar.Show()
- self.DropList = ui.ListBoxEx()
- self.DropList.SetParent(self.Drop)
- self.DropList.itemHeight = 12
- self.DropList.itemStep = 13
- self.DropList.SetPosition(0,0)
- # self.DropList.SetSize(132,self.maxh)
- self.DropList.SetSize(132,13)
- self.DropList.SetScrollBar(self.ScrollBar)
- self.DropList.SetSelectEvent(self.SetTitle)
- self.DropList.SetViewItemCount(0)
- self.DropList.Show()
- if tt != "":
- self.AppendItemAndSelect(tt)
- self.selected = self.DropList.GetSelectedItem()
- self.SetSize(120,20)
- def __del__(self):
- ui.Window.__del__(self)
- c = 1
- def AppendItem(self,text,value=0):
- self.c+=1
- self.DropList.AppendItem(self.Item(self,text,value))
- self.maxh = min(95,13*self.c)
- if self.c > 7:
- self.ScrollBar.Show()
- def AppendItemAndSelect(self,text,value=0):
- self.DropList.AppendItem(self.Item(self,text,value))
- self.DropList.SelectIndex(len(self.DropList.itemList)-1)
- def SelectByAffectId(self,id):
- for x in self.DropList.itemList:
- if x.value == id:
- self.DropList.SelectItem(x)
- break
- def SetTitle(self,item):
- self.act.SetText(str(item.textBox.GetText()))
- self.last = self.DropList.basePos
- self.lastS = self.ScrollBar.GetPos()
- self.dropped = 0
- self.selected = item
- if self.OnChange:
- self.OnChange()
- # self.Drop.Hide()
- def SetPosition(self,w,h):
- ui.Window.SetPosition(self,w,h)
- if self.down == 1:
- self.Drop.SetPosition(w,h+21)
- else:
- self.Drop.SetPosition(w,h-self.Drop.GetHeight())
- def SetSize(self,w,h):
- ui.Window.SetSize(self,w,h)
- self.bg.SetSize(w,h)
- self.Drop.SetSize(w,0)
- self.DropList.SetSize(w-18,self.maxh)
- for x in self.DropList.itemList:
- x.SetSize(w-18,12)
- self.ScrollBar.SetPosition(w-18,0)
- def ExpandMe(self):
- if self.dropped == 1:
- # self.Drop.Hide()
- self.dropped = 0
- else:
- # self.Drop.Show()
- self.dropped = 1
- def OnUpdate(self):
- iter = 6
- if self.Drop.GetHeight() < 50:
- self.ScrollBar.Hide()
- else:
- self.ScrollBar.Show()
- if self.dropped == 0 and self.dropstat == 1:
- if self.Drop.GetHeight() <=0:
- self.dropstat = 0
- self.Drop.SetSize(self.Drop.GetWidth(),0)
- self.ScrollBar.SetScrollBarSize(self.Drop.GetHeight())
- self.Drop.Hide()
- else:
- if self.Drop.GetHeight()-iter < 0:
- self.Drop.SetSize(self.Drop.GetWidth(),0)
- else:
- self.Drop.SetSize(self.Drop.GetWidth(),self.Drop.GetHeight()-iter)
- (w,h) = self.GetLocalPosition()
- self.SetPosition(w,h)
- self.ScrollBar.SetScrollBarSize(self.Drop.GetHeight())
- self.DropList.SetViewItemCount(int(self.Drop.GetHeight()/13))
- self.DropList.SetBasePos(self.last+1)
- self.DropList.SetBasePos(self.last)
- elif self.dropped == 1 and self.dropstat == 0:
- self.Drop.Show()
- self.SetTop()
- if self.Drop.GetHeight() >=self.maxh:
- self.Drop.SetSize(self.Drop.GetWidth(),self.maxh)
- self.ScrollBar.SetScrollBarSize(self.maxh)
- self.dropstat = 1
- self.DropList.SetViewItemCount(7)
- self.ScrollBar.SetPos(self.lastS)
- else:
- self.ScrollBar.SetScrollBarSize(self.Drop.GetHeight()+iter)
- self.Drop.SetSize(self.Drop.GetWidth(),self.Drop.GetHeight()+iter)
- (w,h) = self.GetLocalPosition()
- self.SetPosition(w,h)
- self.DropList.SetViewItemCount(int(self.Drop.GetHeight()/13))
- self.DropList.SetBasePos(self.last+1)
- self.DropList.SetBasePos(self.last)
- ## BG Hover
- def bgMouseIn(self):
- self.bg.SetColor(0xc00a0a0a)
- def bgMouseOut(self):
- self.bg.SetColor(0xc0000000)
- class Edit2(ui.EditLine):
- def __init__(self,main = "",ml = 99):
- ui.EditLine.__init__(self)
- self.SetText(main)
- self.main = main
- self.SetMax(ml)
- self.SetUserMax(ml)
- def GetText(self):
- res = ui.EditLine.GetText(self)
- if res == "":
- return "0"
- else:
- return res
- def __del__(self):
- ui.EditLine.__del__(self)
- def OnSetFocus(self):
- ui.EditLine.OnSetFocus(self)
- if ui.EditLine.GetText(self) == self.main:
- self.SetText("")
- def OnKillFocus(self):
- ui.EditLine.OnKillFocus(self)
- if ui.EditLine.GetText(self) == "":
- self.SetText(self.main)
- class CheckBox(ui.Window):
- checked = 0
- eventUp =None
- eventDown=None
- def __init__(self,cont = ""):
- ui.Window.__init__(self)
- self.BG = ui.Bar("UI")
- self.BG.SetParent(self)
- self.BG.SetPosition(0,80)
- self.BG.SetSize(20,20)
- # self.BG.SetColor(0xc00b0b0b)
- self.BG.SetColor(COLOR_CHECKBOX_NOT_SELECTED)
- self.BG.OnMouseLeftButtonUp = self.Toggle
- self.OnMouseLeftButtonUp = self.Toggle
- self.BG.Show()
- self.Title = ui.TextLine()
- self.Title.SetParent(self)
- self.Title.SetPosition(25,82)
- self.Title.SetText(cont)
- self.Title.Show()
- self.stat = ui.TextLine()
- self.stat.SetParent(self.BG)
- self.stat.SetPosition(0,-6)
- self.stat.SetWindowHorizontalAlignCenter()
- self.stat.SetWindowVerticalAlignCenter()
- self.stat.SetHorizontalAlignCenter()
- self.stat.SetVerticalAlignCenter()
- self.stat.SetSize(0,-6)
- self.stat.SetText("")
- self.SetSize(25+self.Title.GetTextSize()[0]+5,20)
- self.stat.Show()
- def __del__(self):
- ui.ToggleButton.__del__(self)
- def Toggle(self):
- if self.checked == 1:
- self.OnToggleUp()
- else:
- self.OnToggleDown()
- def OnToggleUp(self):
- self.stat.SetText("")
- # self.BG.SetColor(0xc00b0b0b)
- self.BG.SetColor(COLOR_CHECKBOX_NOT_SELECTED)
- self.checked = 0
- if self.eventUp:
- self.eventUp()
- def OnToggleDown(self):
- # self.BG.SetColor(0xf00b0b0b)
- self.BG.SetColor(COLOR_CHECKBOX_SELECTED)
- self.stat.SetText("X")
- self.checked = 1
- if self.eventDown:
- self.eventDown()
- # Zum Testen
- # a = Bot()
- # a.Show()
- # oder;
- # Bot().Show()
-
liegt daran das der dropdown, außerhalb des Fensters ist. Mach das Switchbot Fenster größer (Das der Dropdown im Fenster bleibt) und läuft.
Den Fehler sollte jeder haben der den Bot von Mjago nutzt.
oder du kaufst von Sanii den neuen besseren BotWeißt du in welcher datei ich die Größe finde?
-
Hey,
bei 6/7 Boni kann ich die unteren sachen nicht auswhählen:
Bitte melden Sie sich an, um diesen Link zu sehen.
Kennt jmd die Lösung?
-
Hat leider nicht geklappt. trzd. danke Aber man wird jetzt nur noch einzenlt Teleportiert muss aber trzd. Gruppe haben^^
-
Hey,
Wollte fragen ob mir jmd. sagen könnte wie ich die Gruppe aus der Quest rausnehmen kann:
Code- quest devilcatacomb_zone begin
- state start begin
- function is_closed()
- return (game.get_event_flag("dc_closed") > 0) --close dialog
- end
- function setting()
- return
- {
- ["base"]={["x"] = 3072 , ["y"]= 12032 ,},
- ["floor1_s"] = { ["x"] = 20, ["y"] = 20, },
- ["floor1_e"] = { ["x"] = 500, ["y"] = 470,},
- ["floor2_s"] = { ["x"] = 510, ["y"] = 18, },
- ["floor2_e"] = { ["x"] = 978, ["y"] = 470,},
- ["floor1_entry"] = {["x"] = 73, ["y"] = 63,},
- ["floor2_entry"] = {["x"] = 550, ["y"] = 45,},
- ["floor3_entry"] = {["x"] = 1378, ["y"] = 249,},
- ["floor4_entry"] = {["x"] = 70, ["y"] = 592,},
- ["floor5_entry"] = {["x"] = 846, ["y"] = 898},
- ["floor6_entry"] = {["x"] = 1362, ["y"] = 666},
- ["floor7_entry"] = {["x"] = 73, ["y"] = 1156},
- ["map_idx"] = 216,
- ["rag"] = 30311,
- ["devil_king"] = 2591,
- ["reapers_credit1"] = 30319,
- ["reapers_credit2"] = 30320,
- ["reapers_credit3"] = 76002,
- ["floor3_stone"] = 8038,
- ["floor3_stone_pos"] = {
- {1366, 150},
- {1366, 351},
- {1234, 365},
- {1234, 140},
- {1150, 135},
- {1130, 365},
- {1135, 253}
- },
- ["mob_regen_file_path"] = "data/dungeon/devilcatacomb/",
- ["floor4_regen_file"] = {"devilcatacomb_floor4_regen1.txt",
- "devilcatacomb_floor4_regen2.txt",
- "devilcatacomb_floor4_regen3.txt",
- "devilcatacomb_floor4_regen4.txt",
- "devilcatacomb_floor4_regen5.txt"} ,
- ["credit_stone"] = 30101,
- ["credit_stone_pos"] = {307,323},
- ["floor2_stone"] = 30103,
- ["floor2_stone_pos"] = {741,217},
- ["floor2_merchant_npc"] = 20368,
- ["floor2_merchant_npc_pos"] = {734,214},
- ["floor4_npc"] = 30104,
- ["floor4_npc_pos"] = {500, 717},
- ["devil_king_pos"] = {{673,829},{691,638},{848,568},{1026,642},{1008,862}},
- ["unlock_stone"] = 30312,
- ["floor5_stone"] = 30102,
- ["floor5_stone_pos"] = {848, 735},
- ["devil_great_king"] = 2597 ,
- ["devil_great_king_pos"] = {1303,704},
- ["devil_emperor"] = 2598,
- ["devil_emperor_pos"] = {74,1103},
- ["dc2_door_set_size"] = {4,2,3,2},
- ["dc2_door_set1"] = {
- {{30111, 566, 117, 5},{30112, 562, 311, 5,},{30118, 663, 434, 7},{30119, 881, 434, 7}},
- {{30116, 743, 390, 3},{30119, 612, 251, 1,}},
- {{30113, 654, 211, 5},{30111, 707, 338, 7,},{30112, 775, 336, 7}},
- {{30117, 733, 294, 3},{30113, 694, 271, 1,}}
- },
- ["dc2_door_set2"] = {
- {{30115, 942, 141, 5},{30116, 942, 245, 5},{30117, 942, 321, 5},{30115, 763, 64, 7}},
- {{30118, 643, 116, 3},{30114, 900, 167, 1}},
- {{30114, 850, 293, 5},{30113, 715, 164, 7},{30114, 817, 162, 7}},
- {{30111, 802, 277, 1},{30112, 800, 241, 1}}
- },
- }
- end
- when login begin
- local setting = devilcatacomb_zone.setting()
- local idx = pc.get_map_index()
- if idx >= (setting.map_idx * 10000) and idx < ((setting.map_idx + 1) * 10000) then
- -- pc.set_warp_location(65, 5914, 992) -----------아귀동굴 좌표로
- local level = d.getf("level")
- -- warp location이 0,0 이면 시스템 상으로, 종료 시, 종료 위치를 시작 위치로 저장한다.
- d.set_warp_location (0, 0, 0)
- if level == 2 then
- say(gameforge.devilcatacomb_zone._10_say)
- say(string.format(gameforge.devilcatacomb_zone._20_say, 60))
- elseif level == pc.getqf ("level") then
- -- say ("낙오되지 않기 위해 동료들과 합류하십시오.")
- say(gameforge.devilcatacomb_zone._30_say)
- else
- say(gameforge.devilcatacomb_zone._40_say)
- -- say ("당신은 낙오되었습니다. 용신의 힘을 빌어 잠시 뒤 동굴 밖으로 이동합니다.")
- timer ("devilcatacomb_ban_timer", 5)
- end
- end
- if idx == setting.map_idx then
- pc.setf("devilcatacomb_zone","last_exit_time", get_global_time())
- -- 2층이상이면, 쫓겨나
- if pc.get_x() < setting.floor1_s.x + setting.base.x
- or pc.get_y() < setting.floor1_s.y + setting.base.y
- or pc.get_x() > setting.floor1_e.x + setting.base.x
- or pc.get_y() > setting.floor1_e.y + setting.base.y
- then
- -- 아귀동굴 입구로
- -- if not is_test_server() then
- say(gameforge.devilcatacomb_zone._40_say)
- timer ("devilcatacomb_ban_timer", 5)
- -- end
- else
- -- 아귀동굴 입구로
- -- pc.set_warp_location(65, 5914, 992)
- say(gameforge.devilcatacomb_zone._50_say)
- end
- end
- end
- when logout begin
- local idx = pc.get_map_index()
- local setting = devilcatacomb_zone.setting()
- if idx == setting.map_idx or idx >= (setting.map_idx * 10000) and idx < ((setting.map_idx + 1) * 10000) then
- pc.setf("devilcatacomb_zone","last_exit_time", get_global_time())
- end
- end
- when devilcatacomb_ban_timer.timer begin
- pc.warp((5914)*100, (992)*100, 65)
- end
- when warp_timer.timer begin
- local level = d.getf("level")
- local level_switch = {
- [3] = gameforge.devilcatacomb_zone._60_say,
- [4] = gameforge.devilcatacomb_zone._70_say,
- [5] = gameforge.devilcatacomb_zone._80_say,
- [6] = gameforge.devilcatacomb_zone._90_say,
- }
- local t = 3600 -(get_global_time() - d.getf("enter_time"))
- local t_r = math.mod (t, 60)
- local t_m = (t - t_r) / 60
- d.notice ( level_switch[level] )
- d.notice(string.format(gameforge.devilcatacomb_zone._20_say, t_m))
- d.set_warp_location (0, 0, 0)
- end
- when 20367.chat.gameforge.devilcatacomb_zone._100_npcChat with not devilcatacomb_zone.is_closed() begin
- local setting = devilcatacomb_zone.setting()
- if pc.get_level() < 75 then
- say(gameforge.devilcatacomb_zone._110_say)
- -- elseif pc.getf("deviltower_zone","9_done") == 0 then
- -- say(gameforge.devilcatacomb_zone._120_say)
- elseif ((get_global_time() - pc.getf("devilcatacomb_zone","last_exit_time")) < 1800) and not pc.is_gm() then
- say(gameforge.devilcatacomb_zone._130_say)
- else
- say(gameforge.devilcatacomb_zone._140_say)
- local s = select(gameforge.devilcatacomb_zone._150_select, gameforge.devilcatacomb_zone._160_select)
- if s == 1 then
- pc.warp ((setting.floor1_entry.x + setting.base.x )* 100, (setting.floor1_entry.y + setting.base.y) * 100)
- end
- end
- end
- -- 몬스터가 죽으면 발생하는 이벤트.
- when kill begin
- local setting = devilcatacomb_zone.setting()
- -- 아귀동굴 1층이면 1% 확률로 금시건을 드랍한다.
- if pc.get_x() > setting.floor1_s.x + setting.base.x
- and pc.get_y() > setting.floor1_s.y + setting.base.y
- and pc.get_x() < setting.floor1_e.x + setting.base.x
- and pc.get_y() < setting.floor1_e.y + setting.base.y then
- local j = number(1, 100)
- if j == 1 then
- game.drop_item (setting.rag, 1)
- end
- end
- end
- function spawn_doors ()
- local setting = devilcatacomb_zone.setting()
- for i = 1, 4 do
- local mob_set = setting.dc2_door_set1[i]
- local set_size = setting.dc2_door_set_size[i]
- for j = 1, set_size do
- d.set_unique (i.."_1_"..j, d.spawn_mob_dir (mob_set[j][1], mob_set[j][2], mob_set[j][3], mob_set[j][4]))
- end
- mob_set = setting.dc2_door_set2[i]
- for j = 1, set_size do
- d.set_unique (i.."_2_"..j, d.spawn_mob_dir (mob_set[j][1], mob_set[j][2], mob_set[j][3], mob_set[j][4]))
- end
- end
- end
- -- 금시건을 나찰인증석에 드래그하면 2층으로 보낸다. 2층부터는 던전이다.
- -- when devilcatacomb_credit_stone. take begin
- when 30101.take begin
- local setting = devilcatacomb_zone.setting()
- if item.vnum == setting.rag then
- if not party.is_party() then
- say(gameforge.devilcatacomb_zone._170_say)
- return
- elseif party.is_in_dungeon() then
- say(gameforge.devilcatacomb_zone._180_say)
- return
- end
- item.remove()
- say(gameforge.devilcatacomb_zone._190_say)
- wait()
- say(gameforge.devilcatacomb_zone._200_say)
- wait()
- d.new_jump_party (setting.map_idx, setting.floor2_entry.x + setting.base.x , setting.floor2_entry.y + setting.base.y )
- d.setqf2("devilcatacomb_zone","level", 2)
- d.setf ("level",2)
- d.regen_file (setting.mob_regen_file_path.."dc_2f_regen.txt")
- d.spawn_mob (setting.floor2_merchant_npc, setting.floor2_merchant_npc_pos[1], setting.floor2_merchant_npc_pos[2])
- d.spawn_mob (setting.floor2_stone, setting.floor2_stone_pos[1], setting.floor2_stone_pos[2])
- devilcatacomb_zone.spawn_doors ()
- server_timer('devilcatacomb_45m_left_timer',60 * 15, d.get_map_index())
- d.setf("enter_time", get_global_time())
- end
- end
- when devilcatacomb_45m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- d.notice(string.format(gameforge.devilcatacomb_zone._20_say, 45))
- server_timer('devilcatacomb_30m_left_timer', 60 * 15, get_server_timer_arg())
- end
- end
- when devilcatacomb_30m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- d.notice(string.format(gameforge.devilcatacomb_zone._20_say, 30))
- server_timer('devilcatacomb_15m_left_timer', 60 * 15, get_server_timer_arg())
- end
- end
- when devilcatacomb_15m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- d.notice(string.format(gameforge.devilcatacomb_zone._20_say, 15))
- server_timer('devilcatacomb_5m_left_timer', 60 * 10, get_server_timer_arg())
- end
- end
- when devilcatacomb_5m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- d.notice(string.format(gameforge.devilcatacomb_zone._20_say, 5))
- server_timer('devilcatacomb_1m_left_timer', 60 * 4, get_server_timer_arg())
- end
- end
- when devilcatacomb_1m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- d.notice(string.format(gameforge.devilcatacomb_zone._20_say, 1))
- server_timer ("devilcatacomb_0m_left_timer", 60 * 1, get_server_timer_arg())
- end
- end
- when devilcatacomb_0m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- d.notice (gameforge.devilcatacomb_zone._210_dNotice)
- d.set_warp_location (65, 5914, 992)
- server_timer('devilcatacomb_exit_timer', 7, get_server_timer_arg())
- end
- end
- function is_dc2_doors_clear ()
- local setting = devilcatacomb_zone.setting()
- local clear = true
- for i = 1, 4 do
- local set_clear = true
- local mob_set = setting.dc2_door_set1[i]
- local set_size = setting.dc2_door_set_size[i]
- for j = 1, set_size do
- set_clear = set_clear and d.is_unique_dead (i.."_1_"..j)
- end
- if not set_clear then
- set_clear = true
- mob_set = setting.dc2_door_set2[i]
- for j = 1, set_size do
- set_clear = set_clear and d.is_unique_dead (i.."_2_"..j)
- end
- end
- clear = clear and set_clear
- end
- return clear
- end
- when 30103.click begin
- local setting = devilcatacomb_zone.setting()
- if d.getf("devilcatacomb_floor2_stone_clicked") == 0 then
- if not devilcatacomb_zone.is_dc2_doors_clear () then
- say(gameforge.devilcatacomb_zone._220_say)
- wait ()
- return
- end
- say(gameforge.devilcatacomb_zone._230_say)
- wait()
- say(gameforge.devilcatacomb_zone._240_say)
- wait()
- local s = select(gameforge.devilcatacomb_zone._150_select, gameforge.devilcatacomb_zone._160_select)
- if s == 1 then
- if d.getf("devilcatacomb_floor2_stone_clicked") == 0 then
- d.setf("devilcatacomb_floor2_stone_clicked", 1)
- d.setqf2("devilcatacomb_zone","last_exit_time", get_global_time())
- d.set_item_group ("reapers_credit", 3, setting.reapers_credit3, 1, setting.reapers_credit2, 1, setting.reapers_credit1, 1)
- d.say_diff_by_item_group("reapers_credit", gameforge.devilcatacomb_zone._250_say, gameforge.devilcatacomb_zone._260_say)
- timer ("devilcatacomb_floor3_enter_timer", 7)
- end
- end
- else
- say(gameforge.devilcatacomb_zone._270_say)
- end
- end
- when devilcatacomb_floor3_enter_timer.timer begin
- local setting = devilcatacomb_zone.setting()
- d.set_warp_location (65, 5914, 992)
- d.exit_all_by_item_group ("reapers_credit")
- d.delete_item_in_item_group_from_all ("reapers_credit")
- d.purge ()
- d.jump_all (setting.floor3_entry.x + setting.base.x , setting.floor3_entry.y + setting.base.y)
- d.setf("level",3)
- d.setqf2("devilcatacomb_zone","level", 3)
- d.regen_file (setting.mob_regen_file_path.."dc_3f_regen.txt")
- timer("warp_timer",3)
- local position = setting.floor3_stone_pos
- local n = number(1,7)
- for i = 1, 7 do
- if (i != n)
- then
- d.set_unique("fake"..i, d.spawn_mob( setting.floor3_stone, position[i][1], position[i][2]))
- end
- end
- local vid = d.spawn_mob( setting.floor3_stone, position[n][1], position[n][2])
- d.set_unique ("real",vid)
- if (is_test_server()) then
- -- real stone pos
- chat (position[n][1],position[n][2])
- end
- end
- when 8038.kill begin
- local setting = devilcatacomb_zone.setting()
- if d.is_unique_dead("real") then
- d.notice(gameforge.devilcatacomb_zone._280_dNotice)
- d.setf ("level",4)
- d.setqf2("devilcatacomb_zone","level", 4)
- timer ("devilcatacomb_floor4_enter_timer", 3)
- else
- d.notice(gameforge.devilcatacomb_zone._290_dNotice)
- end
- end
- when devilcatacomb_floor4_enter_timer.timer begin
- local setting = devilcatacomb_zone.setting()
- local i = number (1, 5)
- timer("warp_timer",3)
- d.purge ()
- d.jump_all (setting.floor4_entry.x + setting.base.x , setting.floor4_entry.y + setting.base.y)
- d.regen_file (setting.mob_regen_file_path.."dc_4f_regen.txt")
- d.regen_file (setting.mob_regen_file_path..setting.floor4_regen_file[i])
- if (is_test_server()) then
- d.notice (setting.floor4_regen_file[i])
- end
- d.spawn_mob (setting.floor4_npc, setting.floor4_npc_pos[1], setting.floor4_npc_pos[2])
- end
- when 30104.click begin
- local setting = devilcatacomb_zone.setting()
- local n = number (1,5)
- say(gameforge.devilcatacomb_zone._300_say)
- wait()
- if (is_test_server()) then
- -- devil_king pos
- chat (setting.devil_king_pos[n][1], setting.devil_king_pos[n][2])
- end
- d.purge ()
- d.jump_all (setting.floor5_entry.x + setting.base.x, setting.floor5_entry.y + setting.base.y )
- d.setf ("level",5)
- d.setqf2("devilcatacomb_zone","level", 5)
- timer("warp_timer",3)
- d.regen_file (setting.mob_regen_file_path.."dc_5f_regen.txt")
- d.spawn_mob (setting.devil_king, setting.devil_king_pos[n][1], setting.devil_king_pos[n][2])
- d.spawn_mob (setting.floor5_stone, setting.floor5_stone_pos[1], setting.floor5_stone_pos[2])
- end
- when 2591.kill begin
- local setting = devilcatacomb_zone.setting()
- game.drop_item (setting.unlock_stone, 1)
- end
- when 30102.take begin
- local setting = devilcatacomb_zone.setting()
- if item.vnum == setting.unlock_stone then
- item.remove ()
- d.notice(gameforge.devilcatacomb_zone._310_dNotice)
- -- 6층으로 이동
- d.clear_regen()
- d.purge()
- timer("devilcatacomb_floor6_timer",2)
- end
- end
- when devilcatacomb_floor6_timer.timer begin
- local setting = devilcatacomb_zone.setting()
- d.setf("level",6)
- d.setqf2("devilcatacomb_zone","level", 6)
- d.jump_all (setting.floor6_entry.x + setting.base.x, setting.floor6_entry.y + setting.base.y )
- d.regen_file (setting.mob_regen_file_path.."dc_6f_regen.txt")
- d.spawn_mob (setting.devil_great_king, setting.devil_great_king_pos[1], setting.devil_great_king_pos[2])
- timer("warp_timer",3)
- end
- when 2597.kill begin
- server_timer ("floor6_eli_check_timer_1", 5,d.get_map_index())
- end
- when floor6_eli_check_timer_1.server_timer begin
- if d.select(get_server_timer_arg()) then
- if d.count_monster() == 0 then
- say_in_map (get_server_timer_arg(), gameforge.devilcatacomb_zone._320_say)
- server_timer ("devilcatacomb_floor7_timer", 3, get_server_timer_arg())
- else
- server_timer ("floor6_eli_check_timer_2", 5, get_server_timer_arg())
- end
- end
- end
- when floor6_eli_check_timer_2.server_timer begin
- if d.select(get_server_timer_arg()) then
- if d.count_monster() == 0 then
- say_in_map (get_server_timer_arg(), gameforge.devilcatacomb_zone._320_say)
- server_timer("devilcatacomb_floor7_timer", 3, get_server_timer_arg())
- else
- server_timer ("floor6_eli_check_timer_1", 5, get_server_timer_arg())
- end
- end
- end
- when devilcatacomb_floor7_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- local setting = devilcatacomb_zone.setting()
- d.setf("level",7)
- d.setqf2("devilcatacomb_zone","level", 7)
- d.jump_all (setting.floor7_entry.x + setting.base.x, setting.floor7_entry.y + setting.base.y )
- d.regen_file (setting.mob_regen_file_path.."dc_7f_regen.txt")
- d.spawn_mob (setting.devil_emperor, setting.devil_emperor_pos[1], setting.devil_emperor_pos[2])
- server_timer ("devilcatacomb_floor7_say_timer", 2, get_server_timer_arg())
- end
- end
- when devilcatacomb_floor7_say_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- local t = 3600 -(get_global_time() - d.getf("enter_time"))
- local t_r = math.mod (t, 60)
- local t_m = (t - t_r) / 60
- d.notice(gameforge.devilcatacomb_zone._330_dNotice)
- d.notice(string.format(gameforge.devilcatacomb_zone._20_say, t_m))
- d.set_warp_location (0, 0, 0)
- end
- end
- when 2598.kill begin
- server_timer ("floor7_eli_check_timer_1", 5, d.get_map_index())
- end
- when floor7_eli_check_timer_1.server_timer begin
- if d.select(get_server_timer_arg()) then
- if d.count_monster() == 0 then
- d.set_warp_location (65, 5914, 992)
- d.setqf2("devilcatacomb_zone","done", 1)
- say_in_map (get_server_timer_arg(), gameforge.devilcatacomb_zone._340_say)
- clear_server_timer ("devilcatacomb_0m_left_timer", get_server_timer_arg())
- server_timer("devilcatacomb_exit_timer", 60, get_server_timer_arg())
- else
- server_timer ("floor7_eli_check_timer_2", 5, get_server_timer_arg())
- end
- end
- end
- when floor7_eli_check_timer_2.server_timer begin
- if d.select(get_server_timer_arg()) then
- if d.count_monster() == 0 then
- d.set_warp_location (65, 5914, 992)
- d.setqf2("devilcatacomb_zone","done", 1)
- say_in_map (get_server_timer_arg(), gameforge.devilcatacomb_zone._340_say)
- clear_server_timer ("devilcatacomb_0m_left_timer", get_server_timer_arg())
- server_timer("devilcatacomb_exit_timer", 60, get_server_timer_arg())
- else
- server_timer ("floor7_eli_check_timer_1", 5, get_server_timer_arg())
- end
- end
- end
- when devilcatacomb_exit_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- d.setqf2("devilcatacomb_zone","level", 0)
- d.setqf2("devilcatacomb_zone","last_exit_time", get_global_time())
- clear_server_timer("devilcatacomb_5m_left_timer", get_server_timer_arg())
- clear_server_timer("devilcatacomb_1m_left_timer", get_server_timer_arg())
- clear_server_timer("devilcatacomb_0m_left_timer", get_server_timer_arg())
- clear_server_timer("floor6_eli_check_timer_1", get_server_timer_arg())
- clear_server_timer("floor6_eli_check_timer_2", get_server_timer_arg())
- clear_server_timer("floor7_eli_check_timer_1", get_server_timer_arg())
- clear_server_timer("floor7_eli_check_timer_2", get_server_timer_arg())
- clear_server_timer("devilcatacomb_floor7_say_timer", get_server_timer_arg())
- clear_server_timer("devilcatacomb_floor7_timer", 3, get_server_timer_arg())
- d.clear_regen()
- d.exit_all()
- end
- end
- end --state
- end --quest
Danke für jeden den helfen kann
-
Hallo,
Habe es schon mit Googlen und Selbst suche versucht aber leider nicht weiter gekomm deswegen frage ich jetzt einfach mal:
Würde gerne Glocken und Fächer Deff zusammenfügen. Weiß aber leider nicht wie.
Also danke für jede hilfe
MFG:KnocK
-
Danke, haat aber leider nicht Funktioniert ;/
-
Hallo,
würde gerne aus der Quest rausnehmen das man sie nur in der Gruppe Betreten kann:
Code- define BLOCK_DOOR 20387
- define DUNGEON_MAN 20385
- define DUNGEON_MAN_DIR 0
- define DUNGEON_MAP_INDEX 351
- define ENTER_LIMIT_TIME 30
- define ENTRY_MAN 20394
- define ENTRY_MAP_INDEX 62
- define FINAL_BOSS 6091
- define LEVEL2_KEY 30329
- define LEVEL2_STONE 20386
- define LEVEL4_TARGET 6051
- define LEVEL5_REALKEY 30330
- define LEVEL5_STONE 20386
- define LEVEL5_GEN_LIMIT 100
- define LEVEL6_TARGET 8057
- define LEVEL_CUT 100
- define MOB_REGEN_FILE_PATH = "data/dungeon/flame_dungeon/"
- define IN_DOOR 20388
- define NPC_REGEN_FILE_PATH = "data/dungeon/flame_dungeon/npc.txt"
- define TICKET_GROUP 10033
- define LIMITED_PASS_TICKET 71175
- quest flame_dungeon begin
- state start begin
- when ENTRY_MAN.click with pc.get_level() >= 100 begin
- pc.give_item2(LIMITED_PASS_TICKET, 1)
- set_state(run)
- end
- when flame_dungeon_45m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 45),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer('flame_dungeon_30m_left_timer', 15*60, get_server_timer_arg())
- end
- end
- when flame_dungeon_30m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 30),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer('flame_dungeon_15m_left_timer', 15*60, get_server_timer_arg())
- end
- end
- when flame_dungeon_15m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 15),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer('flame_dungeon_5m_left_timer', 10*60, get_server_timer_arg())
- end
- end
- when flame_dungeon_5m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 5),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer('flame_dungeon_1m_left_timer', 4*60, get_server_timer_arg())
- end
- end
- when flame_dungeon_1m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 1),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer ("flame_dungeon_0m_left_timer", 60, get_server_timer_arg())
- end
- end
- when flame_dungeon_0m_left_timer.server_timer begin
- local setting = flame_dungeon.setting()
- if d.select(get_server_timer_arg()) then
- notice_multiline(gameforge.flame_dungeon._190_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._200_notice,d.notice)
- server_timer("dungeon_end_timer",10,d.get_map_index())
- end
- end
- when dungeon_end_timer.server_timer begin -- ?? ??? (??? ????)
- local setting = flame_dungeon.setting()
- if d.select(get_server_timer_arg()) then
- flame_dungeon.clear_timer(d.get_map_index())
- d.set_warp_location(ENTRY_MAP_INDEX, setting.outside_entry_pos[1] , setting.outside_entry_pos[2])
- d.exit_all()
- d.setf("party_leader_pid", 0)
- end
- end
- when killed_A_1.server_timer begin -- ??? ???1 (level1,level3)
- if d.select(get_server_timer_arg()) then
- if d.count_monster() <= 0 then -- 1?? ??? ???
- if d.getf("level") == 11 then
- notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- else
- notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- end
- d.setf("level",0)
- else
- server_timer ("killed_A_2", 6, get_server_timer_arg())
- end
- end
- end
- when killed_A_2.server_timer begin -- ??? ???2 (1? 2 ?????? ???)
- if d.select(get_server_timer_arg()) then
- if d.count_monster() <= 0 then -- 1?? ??? ???
- if d.getf("level") == 11 then
- notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- else
- notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- end
- d.setf("level",0)
- else
- server_timer ("killed_A_1", 6, get_server_timer_arg())
- end
- end
- end
- end
- state run begin
- function setting()
- return
- {
- ["bossroom_entry_pos"] = {8109,6867},
- ["boss_pos"] = {686,637},
- ["doors_pos"] = {
- {320,394},
- {293,359},
- {333,321},
- {378,320},
- {400,355},
- {394,401}
- },
- ["idoors_pos"] = {
- {268,447},
- {234,359},
- {300,264},
- {454,217},
- {470,355},
- {467,469}
- },
- ["doors_dir"] = {135,90,210,152,90,223},
- ["idoors_dir"] = {135,90,210,135,90,239},
- ["dungeon_entry_pos"] = {7762, 6739},-- ??? ?? ???? ?
- ["DUNGEON_MAN_bpos"] = {690,722},
- ["DUNGEON_MAN_pos"] = {354,362},
- ["LEVEL2_STONE_pos"] = {195,352},
- ["LEVEL4_TARGET_pos"] = {470,175},
- ["LEVEL5_STONE_pos"] = {
- {486, 345},
- {511, 336},
- {525, 349},
- {521, 365},
- {503, 372},
- {486, 365},
- {500, 354}
- },
- ["LEVEL6_TARGET_pos"] = {511,480},
- ["outside_entry_pos"] = {6142,7068}, --??????? ??? ?
- ["YAK_pos"] = {376, 397} -- ?? ??
- }
- end
- function is_flamed(idx) -- ???? ??? ??
- return idx >= DUNGEON_MAP_INDEX * 10000 and idx < (DUNGEON_MAP_INDEX + 1) *10000
- end
- function make_dungeon() -- ?? ???
- local setting = flame_dungeon.setting()
- d.new_jump_party(DUNGEON_MAP_INDEX, setting.dungeon_entry_pos[1], setting.dungeon_entry_pos[2])
- -- d.spawn_mob_ac_dir(DUNGEON_MAN, setting.DUNGEON_MAN_pos[1], setting.DUNGEON_MAN_pos[2],DUNGEON_MAN_DIR)
- -- d.spawn_mob(YAK,setting.YAK_pos[1],setting.YAK_pos[2])
- d.regen_file(NPC_REGEN_FILE_PATH)
- d.setf("level",0)
- for i=1,6 do
- d.set_unique("door"..i, d.spawn_mob_ac_dir(BLOCK_DOOR, setting.doors_pos[i][1], setting.doors_pos[i][2],setting.doors_dir[i]))
- end
- for i=1,6 do
- d.set_unique("idoor"..i, d.spawn_mob_ac_dir(IN_DOOR, setting.idoors_pos[i][1], setting.idoors_pos[i][2],setting.idoors_dir[i]))
- end
- d.setf("clear_count",0)
- d.setf("started",0)
- d.setf("dungeon_enter",0) -- ????? ?????? // ??? : 0 ?? : 1 // ??? ??????? ?? ??
- end
- function go_boss() -- ??? ??
- local setting = flame_dungeon.setting()
- if pc.get_level() < 104 then --????
- -- syschat(gameforge.flame_dungeon._580_notice)
- say(gameforge.flame_dungeon._580_notice)
- return
- else
- -- say_title(gameforge.flame_dungeon._010_say)
- say_title("Schlund des Am-heh")
- say("")
- say("Möchtest du durch den Schlund des Am-heh gehen und")
- say("deinem Schicksal begegnen?")
- local warp = select(gameforge.flame_dungeon._020_select,gameforge.flame_dungeon._030_select)
- if warp == 1 then
- d.notice("Besiegt Razador, den König über Feuer und Asche.")
- d.setf("level",17)
- d.jump_all(setting.bossroom_entry_pos[1],setting.bossroom_entry_pos[2])
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_fild_boss.txt")
- -- d.spawn_mob(DUNGEON_MAN,setting.DUNGEON_MAN_bpos[1],setting.DUNGEON_MAN_bpos[2])
- d.spawn_mob(FINAL_BOSS,setting.boss_pos[1],setting.boss_pos[2])
- end
- end
- end
- function level_clear() -- ?? ???, ?????, ?????
- d.setf("level",0)
- d.clear_regen()
- d.purge_area(750000,620000,817400,689400) -- ??? -- d.purge() ????
- end
- function clear_timer(inx) -- ??? ????
- clear_server_timer ("flame_dungeon_0m_left_timer", inx)
- clear_server_timer ("flame_dungeon_1m_left_timer", inx)
- clear_server_timer ("flame_dungeon_5m_left_timer", inx)
- clear_server_timer ("flame_dungeon_10m_left_timer", inx)
- clear_server_timer ("flame_dungeon_15m_left_timer", inx)
- clear_server_timer ("flame_dungeon_30m_left_timer", inx)
- clear_server_timer ("flame_dungeon_45m_left_timer", inx)
- clear_server_timer ("killed_A_1", inx)
- clear_server_timer ("killed_A_2", inx)
- clear_server_timer ("flame_dungeon_ticket_remove", inx)
- end
- when login begin
- local idx = pc.get_map_index()
- local setting = flame_dungeon.setting()
- if idx == DUNGEON_MAP_INDEX then
- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX)
- elseif flame_dungeon.is_flamed(idx) then -- ?? ??, ??? ?? ??
- ------------------------------------------------------------------------------------------------------------------------------------------------------
- --??? ??? ???? ???? ???? ?????? ?? ?? ??? ????. ???? ??? ?? ???? ???? ?? ?? ??? ??? ??.
- --???? ???? ?? ?? ?? ??? ??? ??, ???? ??? ??? ????? ?? ??? ????? ???? ??? ??? ??? ??.
- ------------------------------------------------------------------------------------------------------------------------------------------------------
- -- pc.set_warp_location(0, 0 , 0) --???? ?? ???? ??? ?? ??
- pc.set_warp_location(ENTRY_MAP_INDEX, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) -- ?? ??? ? ??? ????
- local ticketGroup = {71093, 1, 71130, 1}
- if d.getf("dungeon_enter") == 0 then -- ???? ???
- local canPass = false
- for i=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
- canPass = true
- break
- end
- end
- if get_global_time() - pc.getf("flame_dungeon","exit_time") < ENTER_LIMIT_TIME * 60 then -- ??????? ????
- notice_multiline(gameforge.flame_dungeon._050_notice,d.notice)
- say(gameforge.flame_dungeon._060_say)
- timer("flame_dungeon_warp_timer", 5)
- elseif not canPass then
- notice_multiline(gameforge.flame_dungeon._070_notice,d.notice)
- say(gameforge.flame_dungeon._080_say)
- timer("flame_dungeon_warp_timer", 5)
- elseif pc.get_level() < 100 then
- notice_multiline(gameforge.flame_dungeon._090_notice,d.notice)
- say(gameforge.flame_dungeon._100_say)
- timer("flame_dungeon_warp_timer", 5)
- end
- elseif pc.getf("flame_dungeon","ticket_delete") == 0 then -- ????? ??? ???????
- for i=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
- pc.remove_item(ticketGroup[i], ticketGroup[i+1])
- break
- end
- end
- pc.setf("flame_dungeon","ticket_delete",1)
- end
- else
- pc.setf("flame_dungeon","ticket_delete",0)
- end
- end
- when flame_dungeon_warp_timer.timer begin
- local setting = flame_dungeon.setting()
- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX)
- end
- when logout begin
- local idx = pc.get_map_index()
- if flame_dungeon.is_flamed(idx) then
- if d.getf("dungeon_enter") == 1 then -- ???? ?? ?? ? ????
- pc.setf("flame_dungeon","exit_time",get_global_time()) -- ???? ???? ??? ??? ??, ?? ???? ??? or ?? ???? ???
- end
- end
- end
- when ENTRY_MAN.chat.gameforge.flame_dungeon._110_npcChat begin
- local setting = flame_dungeon.setting()
- if party.is_party() then
- -- ?? ?? ?? ?? ??? ?????
- local party_check = 0
- if d.find(party.getf("dungeon_index")) then
- party_check = (d.getf_from_map_index("party_leader_pid", party.getf("dungeon_index")) == party.get_leader_pid())
- end
- if d.find(party.getf("dungeon_index")) and party_check then
- if get_global_time() - pc.getf("flame_dungeon","exit_time") < 5 * 60 then -- ?? ?? 5? ??
- local dungeon_level = d.getf_from_map_index("level", party.getf("dungeon_index"))
- if dungeon_level == 17 then -- ??
- pc.warp(setting.bossroom_entry_pos[1] * 100, setting.bossroom_entry_pos[2] * 100, party.getf("dungeon_index"))
- else
- pc.warp(setting.dungeon_entry_pos[1] * 100, setting.dungeon_entry_pos[2] * 100, party.getf("dungeon_index"))
- end
- else -- 5? ???? ? ?? ??
- say_title(mob_name(ENTRY_MAN))
- say(gameforge.flame_dungeon._590_say)
- end
- else
- local pids = {party.get_member_pids()}
- local noTicketMembers = {}
- local notEnoughLevelMembers = {}
- local ticketCheck = true
- local levelCheck = true
- local ticketGroup = {50150, 1, 50150, 1}
- for i, pid in next, pids, nil do
- q.begin_other_pc_block(pid)
- local canPass = false
- for idx=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
- canPass = true
- break
- end
- end
- if not canPass then
- table.insert(noTicketMembers, pc.get_name())
- ticketCheck = false
- end
- if pc.level < LEVEL_CUT then
- table.insert(notEnoughLevelMembers, pc.get_name())
- levelCheck = false
- end
- q.end_other_pc_block()
- end
- if pc.count_item(50150) == 0 then
- say("Du benötigst einen Razador-Schlüssel um passieren zu können.")
- say_item_vnum(50150)
- return
- end
- if not levelCheck then
- say_title("Die Rotdrachen-Festung ~ Dungeon")
- say("")
- say_reward("Betreten fehlgeschlagen!")
- say("")
- say("Um die Rotdrachen-Festung zu betreten,")
- say("muss jedes Mitglied der Gruppe Level 100")
- say("erreicht haben. Folgende Spieler haben derzeit")
- say("das Level nicht erreicht:")
- for i, name in next, notEnoughLevelMembers, nil do
- say(color(1,1,0), " ~ "..name)
- end
- return
- end
- if party.is_leader() then
- say_title("Die Rotdrachen-Festung ~ Dungeon")
- say("")
- say("Einen Kampf mit Razador aufnehmen.")
- say("")
- say_reward("Möchtest du die Rotdrachen-Festung betreten?")
- local warp = select(gameforge.flame_dungeon._130_select,gameforge.flame_dungeon._140_select)
- if warp == 1 then
- if party.is_map_member_flag_lt("exit_time", get_global_time() - ENTER_LIMIT_TIME * 60 ) then
- pc.remove_item(50150, 1)
- flame_dungeon.make_dungeon()
- else
- --say("test : ???? ?? ????? ??? ?????.")
- say_title("Die Rotdrachen-Festung ~ Dungeon")
- say("")
- say_reward("Betreten fehlgeschlagen!")
- say("")
- say("Die Wartezeit für den Wiedereintritt in die")
- say("Rotdrachen-Festung ist noch nicht abgelaufen. ")
- say("Verb. Zeit: "..LIB_duration(pc.getf("flame_dungeon","exit_time") - get_global_time()).."")
- end
- end
- party.setf("flame_dungeon_boss_kill_count", 0)
- else
- say(gameforge.flame_dungeon._150_say)
- end
- end
- else
- say_title("Die Rotdrachen-Festung ~ Dungeon")
- say("")
- say_reward("Betreten fehlgeschlagen!")
- say("")
- say("Ich schätze deinen Mut, doch alleine wirst du in")
- say("der Rotdrachen-Festung in dein Verderben rennen.")
- say("Stelle eine starke Gruppe zusammen und ich werde")
- say("dir Einlass gewähren.")
- end
- end
- -- when ENTRY_MAN.chat."Test : ?????" with is_test_server() begin -- ????
- -- local setting = flame_dungeon.setting()
- -- pc.setf("flame_dungeon","fdRtest",1)
- -- pc.warp( setting.dungeon_entry_pos[1]*100, setting.dungeon_entry_pos[2]*100, DUNGEON_MAP_INDEX)
- -- end
- when ENTRY_MAN.chat."TEST : Init time limit init" with is_test_server() begin -- ????
- pc.setf("flame_dungeon","exit_time",get_global_time()-3550)
- say("Done")
- end
- -- when DUNGEON_MAN.chat."Test : ?? ??" with is_test_server() begin -- ????
- -- say("?? ??? : "..d.count_monster())
- -- say("level : "..d.getf("level"))
- -- say("Dmap index : "..d.get_map_index())
- -- say("Pmap index : "..pc.get_map_index())
- -- say("access limit : "..pc.getf("flame_dungeon","exit_time"))
- -- say("global time : "..get_global_time())
- -- if flame_dungeon.is_flamed(d.get_map_index()) then
- -- say("in dungeon") -- is_flamed ?? ??
- -- end
- -- if d.is_unique_dead("stone1") then
- -- say("stone1 is dead")
- -- else
- -- say("stone1 is not dead")
- -- end
- -- end
- -- when DUNGEON_MAN.chat."????" begin -- ????
- -- say("??? ???")
- -- flame_dungeon.clear_timer(d.get_map_index())
- -- flame_dungeon.make_dungeon()
- -- end
- when DUNGEON_MAN.chat."Test : Boss Room" with is_test_server() begin -- ????
- flame_dungeon.go_boss()
- end
- -- < ?? ?? ???>
- -- when DUNGEON_MAN.chat."???" begin -- ???? ??? ?? ? ?? ???
- -- local setting = flame_dungeon.setting()
- -- say("??? ????????")
- -- local warp = select("??","??")
- -- if warp == 1 then
- -- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX)
- -- end
- -- end
- -- <<<< ?? ??>>>> --
- when DUNGEON_MAN.chat.gameforge.flame_dungeon._210_npcChat with npc.lock() begin -- '0x'? x?? ?? ??? ?? ? ?? ?? , '1x'? x?? ?? ??? ???
- local setting = flame_dungeon.setting()
- if d.getf("started") == 0 then
- say_title("Schlund des Am-heh")
- say("")
- say_reward("Der Schlund des Am-heh wurde erweckt.")
- say("")
- say("Nun kommt niemand mehr herein – oder heraus.")
- say("Die Tore der Rotdrachen-Festung schließen sich für")
- say("eine Stunde.")
- wait()
- d.setf("started",1)
- -- ???? ?????? ??? ??? exit timer? ???? ???? ????? ????? ????? ?
- server_timer ("flame_dungeon_45m_left_timer",15*60, d.get_map_index())
- notice_multiline(gameforge.flame_dungeon._250_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- -- ??? ??? ??
- -- ?? ?? ??? ?? ??? ???? ??? ???? ??? ??? ????.
- local pids = {party.get_member_pids()}
- local ticketGroup = {71093, 1, 71130, 1}
- for i, pid in next, pids, nil do
- q.begin_other_pc_block(pid)
- local canPass = false
- for idx=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
- canPass = true
- pc.remove_item(ticketGroup[idx], ticketGroup[idx+1])
- break
- end
- end
- if not canPass then
- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX)
- end
- q.end_other_pc_block()
- end
- d.setqf2("flame_dungeon","ticket_delete",1)
- d.setf("dungeon_enter",1)
- -- ??? ??? ??? ?? ??? ????.
- party.setf("dungeon_index", d.get_map_index())
- d.setf("party_leader_pid", party.get_leader_pid())
- end
- if d.getf("level") < 7 then --???? ???
- if d.getf("clear_count") == 6 then -- ? ??? ??? ???
- d.setf("level",7)
- else
- local rand = number(1,6)--???? ????? ?? ???? ?? ?? ?????? ???
- local setlev = 0
- d.setf("level",7) -- ?? ?? ??? ?? ??? ?????? ??? ????? ????
- for i=1,50 do
- setlev = setlev + 1
- if setlev > 6 then
- setlev = 1
- end
- if not d.is_unique_dead("door"..setlev) then
- rand = rand - 1
- if rand == 0 then
- d.setf("level",setlev)
- d.setf("clear_count",d.getf("clear_count")+1)
- break
- end
- end
- end
- end
- end
- if d.getf("level") == 1 then
- say_title("Schlund des Am-heh")
- say("")
- say("Aufgabe: Wagt euch in den Ring der Dämonen und")
- say("geht als Sieger hervor.")
- notice_multiline(gameforge.flame_dungeon._260_say,d.notice)
- d.kill_unique("door1")
- d.kill_unique("idoor1")
- d.setf("level",11)
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_a.txt")
- server_timer ("killed_A_1", 12, d.get_map_index())
- elseif d.getf("level") == 11 then
- say(gameforge.flame_dungeon._270_say)
- say_title(gameforge.flame_dungeon._280_sayTitle .. d.count_monster())
- elseif d.getf("level") == 2 then
- say_title("Schlund des Am-heh")
- say("")
- say("Aufgabe: Findet das goldene Zahnrad und löst damit")
- say("den verborgenen Mechanismus in der Stele der Isfet")
- say("aus.")
- notice_multiline(gameforge.flame_dungeon._290_say,d.notice)
- d.spawn_mob(LEVEL2_STONE, setting.LEVEL2_STONE_pos[1], setting.LEVEL2_STONE_pos[2]) -- ??? ??
- d.kill_unique("door2")
- d.kill_unique("idoor2")
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_b.txt")
- d.setf("level",12)
- elseif d.getf("level") == 12 then
- say(gameforge.flame_dungeon._310_say)
- elseif d.getf("level") == 3 then
- say_title("Schlund des Am-heh")
- say("")
- say("Aufgabe: Wagt euch in den Ring der Dämonen und")
- say("geht als Sieger hervor.")
- notice_multiline(gameforge.flame_dungeon._260_say,d.notice)
- d.kill_unique("door3")
- d.kill_unique("idoor3")
- d.setf("level",13)
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_c.txt")
- server_timer ("killed_A_1", 12, d.get_map_index())
- elseif d.getf("level") == 13 then
- say(gameforge.flame_dungeon._270_say)
- say_title(gameforge.flame_dungeon._280_sayTitle..d.count_monster())
- elseif d.getf("level") == 4 then -- 474 178
- say_title("Schlund des Am-heh")
- say("")
- say("Aufgabe: Besiegt Ignator, Bewacher der Glut.")
- notice_multiline(gameforge.flame_dungeon._320_notice,d.notice)
- d.setf("level",14)
- d.kill_unique("door4")
- d.kill_unique("idoor4")
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_d.txt")
- d.spawn_mob(LEVEL4_TARGET,setting.LEVEL4_TARGET_pos[1],setting.LEVEL4_TARGET_pos[2] ) -- ????? ??
- elseif d.getf("level") == 14 then
- say(gameforge.flame_dungeon._330_say)
- say(gameforge.flame_dungeon._340_say)
- elseif d.getf("level") == 5 then -- 510 355
- say_title("Schlund des Am-heh")
- say("")
- say("Aufgabe: Sucht nach den Steinen der Maat und zieht")
- say("sie in der richtigen Reihenfolge auf die sieben")
- say("Stelen der Isfet.")
- say("Wendet ihr den Stein der Maat auf der falschen")
- say("Stele an, zerbricht er.")
- notice_multiline(gameforge.flame_dungeon._350_say,d.notice)
- notice_multiline(gameforge.flame_dungeon._360_say,d.notice)
- d.kill_unique("door5")
- d.kill_unique("idoor5")
- d.setf("level",15)
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- local vis = { 0,0,0,0,0,0,0}
- for i=1,7 do
- vis[i] = 0
- end
- for i = 1, 7 do -- ???? ???
- local ran = number(1,7)
- local st = 0
- for j = 1, 50 do
- st = st + 1
- if st > 7 then
- st = 1
- end
- if vis[st] == 0 then
- ran = ran - 1
- if ran == 0 then
- vis[st] = 1
- d.set_unique("stone5_"..st, d.spawn_mob(LEVEL5_STONE, setting.LEVEL5_STONE_pos[i][1], setting.LEVEL5_STONE_pos[i][2]))
- break
- end
- end
- end
- end
- elseif d.getf("level") == 15 then
- say(gameforge.flame_dungeon._370_say)
- elseif d.getf("level") == 6 then -- 507 490
- say_title("Schlund des Am-heh")
- say("")
- say("Aufgabe: Nur wer die sengende Hitze nicht scheut,")
- say("wird den Metin des Fegefeuers zerstören.")
- notice_multiline(gameforge.flame_dungeon._380_say,d.notice)
- d.setf("level",16)
- d.kill_unique("door6")
- d.kill_unique("idoor6")
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_f.txt")
- d.spawn_mob(LEVEL6_TARGET, setting.LEVEL6_TARGET_pos[1],setting.LEVEL6_TARGET_pos[2]) -- ?????? ??
- elseif d.getf("level") == 16 then
- say(gameforge.flame_dungeon._390_say)
- say(gameforge.flame_dungeon._400_say)
- elseif d.getf("level") == 7 then
- -- setskin(NOWINDOW)
- flame_dungeon.go_boss()
- else
- say(gameforge.flame_dungeon._410_say)
- end
- npc.unlock()
- end
- when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 12 begin -- 2?? ??? ?? ??
- local i = number(1, 100) -- 100?? 1 ??? ????
- if i == 1 then
- game.drop_item (LEVEL2_KEY, 1)
- end
- end
- when LEVEL2_STONE.take with flame_dungeon.is_flamed(pc.get_map_index()) and item.vnum == LEVEL2_KEY and d.getf("level") == 12 begin -- 2?? ?? ????
- local i = number(1, 5) -- 5?? 1 ??? ?? ??
- if i == 1 then
- npc.purge()
- item.remove()
- notice_multiline(gameforge.flame_dungeon._440_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- flame_dungeon.level_clear()
- else
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Dieses Zahnrad war eine Fälschung und wurde")
- say("zerstört. Findet das Original.")
- end
- end
- when LEVEL4_TARGET.kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 14 begin
- notice_multiline(gameforge.flame_dungeon._460_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- flame_dungeon.level_clear()
- end
- when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 15 begin -- 5?? ??? ?? ??
- local i = number(1, 30) -- 30?? 1 ??? ????
- if i == 1 then
- game.drop_item (LEVEL5_REALKEY, 1)
- end
- end
- when LEVEL5_STONE.take with flame_dungeon.is_flamed(d.get_map_index()) and item.vnum == LEVEL5_REALKEY and d.getf("level") == 15 begin -- 5?? ???? ????
- local setting = flame_dungeon.setting()
- if npc.get_vid() == d.get_unique_vid("stone5_1") then -- ??? ?? ????? ? ?? ????? ???? ????
- npc.purge()
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Das war eine weise Wahl. Zerstört nun die nächste")
- say("Stele.")
- d.setf("stonekill",2) -- 2? ?? ???
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_2") then
- if d.getf("stonekill") == 2 then -- 2??? ?? ??? 2???? ??? ??? ?
- npc.purge()
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Das war eine weise Wahl. Zerstört nun die nächste")
- say("Stele.")
- d.setf("stonekill",3)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Falsche Reihenfolge. Der Stein der Maat wurde")
- say("dabei zerstört.")
- -- say("2?")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_3") then
- if d.getf("stonekill") == 3 then
- npc.purge()
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Das war eine weise Wahl. Zerstört nun die nächste")
- say("Stele.")
- d.setf("stonekill",4)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Falsche Reihenfolge. Der Stein der Maat wurde")
- say("dabei zerstört.")
- -- say("3?")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_4") then
- if d.getf("stonekill") == 4 then
- npc.purge()
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Das war eine weise Wahl. Zerstört nun die nächste")
- say("Stele.")
- d.setf("stonekill",5)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Falsche Reihenfolge. Der Stein der Maat wurde")
- say("dabei zerstört.")
- -- say("4?")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_5") then
- if d.getf("stonekill") == 5 then
- npc.purge()
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Das war eine weise Wahl. Zerstört nun die nächste")
- say("Stele.")
- d.setf("stonekill",6)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Falsche Reihenfolge. Der Stein der Maat wurde")
- say("dabei zerstört.")
- -- say("5?")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_6") then
- if d.getf("stonekill") == 6 then
- npc.purge()
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Das war eine weise Wahl. Zerstört nun die letzte")
- say("Stele.")
- d.setf("stonekill",7)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Falsche Reihenfolge. Der Stein der Maat wurde")
- say("dabei zerstört.")
- -- say("6?")
- end
- else
- if d.getf("stonekill") == 7 then
- npc.purge()
- item.remove()
- notice_multiline(gameforge.flame_dungeon._440_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- flame_dungeon.level_clear()
- else
- item.remove()
- say_title("Schlund des Am-heh")
- say("")
- say("Falsche Reihenfolge. Der Stein der Maat wurde")
- say("dabei zerstört.")
- -- say("7?")
- end
- end
- end
- when LEVEL6_TARGET.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==16 begin -- ??? ???? ?
- notice_multiline(gameforge.flame_dungeon._540_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- flame_dungeon.level_clear()
- end
- when FINAL_BOSS.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==17 begin -- ?? ????
- --notice_multiline(gameforge.flame_dungeon._550_notice,d.notice)
- game.drop_item_with_ownership(72000, 1)
- game.drop_item_with_ownership(81001, 1)
- game.drop_item_with_ownership(72000, 1)
- notice_all("Die Gruppe von ".. pc.get_name() .." haben Razador besiegt. Herzlichen Glückwunsch!")
- notice_all("Endlich herrscht Frieden in der Rotdrachen-Festung.")
- notice_multiline(gameforge.flame_dungeon._560_notice,d.notice)
- server_timer("dungeon_end_timer", 60,d.get_map_index())
- flame_dungeon.level_clear()
- -- ??? ?, ??? ?? ???(104?, 105? ???) ???? ??? ??? ??? ??? ???.
- if party.is_party() then
- party.setf("flame_dungeon_boss_kill_count", 1)
- end
- end
- end
- end
Finde es leider aber nicht vermute mal das es mit den Zeilen zu tun hat:
Code- when login begin
- local idx = pc.get_map_index()
- local setting = flame_dungeon.setting()
- if idx == DUNGEON_MAP_INDEX then
- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX)
- elseif flame_dungeon.is_flamed(idx) then -- ?? ??, ??? ?? ??
- ------------------------------------------------------------------------------------------------------------------------------------------------------
- --??? ??? ???? ???? ???? ?????? ?? ?? ??? ????. ???? ??? ?? ???? ???? ?? ?? ??? ??? ??.
- --???? ???? ?? ?? ?? ??? ??? ??, ???? ??? ??? ????? ?? ??? ????? ???? ??? ??? ??? ??.
- ------------------------------------------------------------------------------------------------------------------------------------------------------
- -- pc.set_warp_location(0, 0 , 0) --???? ?? ???? ??? ?? ??
- pc.set_warp_location(ENTRY_MAP_INDEX, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) -- ?? ??? ? ??? ????
- local ticketGroup = {71093, 1, 71130, 1}
- if d.getf("dungeon_enter") == 0 then -- ???? ???
- local canPass = false
- for i=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
- canPass = true
- break
- end
- end
- if get_global_time() - pc.getf("flame_dungeon","exit_time") < ENTER_LIMIT_TIME * 60 then -- ??????? ????
- notice_multiline(gameforge.flame_dungeon._050_notice,d.notice)
- say(gameforge.flame_dungeon._060_say)
- timer("flame_dungeon_warp_timer", 5)
- elseif not canPass then
- notice_multiline(gameforge.flame_dungeon._070_notice,d.notice)
- say(gameforge.flame_dungeon._080_say)
- timer("flame_dungeon_warp_timer", 5)
- elseif pc.get_level() < 100 then
- notice_multiline(gameforge.flame_dungeon._090_notice,d.notice)
- say(gameforge.flame_dungeon._100_say)
- timer("flame_dungeon_warp_timer", 5)
- end
- elseif pc.getf("flame_dungeon","ticket_delete") == 0 then -- ????? ??? ???????
- for i=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
- pc.remove_item(ticketGroup[i], ticketGroup[i+1])
- break
- end
- end
- pc.setf("flame_dungeon","ticket_delete",1)
- end
- else
- pc.setf("flame_dungeon","ticket_delete",0)
- end
- end
Aber habe keine ahnung wie ich es ändern könnte. Bin dankbar für jede hilfe
MFG: Knock
-
Habe es gemacht aber man kann ingame sehen das es drin ist aber nicht auswählen hat da jmd eine Idee?
-
Code
- define BLOCK_DOOR 20387
- define DUNGEON_MAN 20385
- define DUNGEON_MAN_DIR 0
- define DUNGEON_MAP_INDEX 351
- define ENTER_LIMIT_TIME 30
- define ENTRY_MAN 20394
- define ENTRY_MAP_INDEX 62
- define FINAL_BOSS 6091
- define LEVEL2_KEY 30329
- define LEVEL2_STONE 20386
- define LEVEL4_TARGET 6051
- define LEVEL5_REALKEY 30330
- define LEVEL5_STONE 20386
- define LEVEL5_GEN_LIMIT 100
- define LEVEL6_TARGET 8057
- define LEVEL_CUT 100
- define MOB_REGEN_FILE_PATH = "data/dungeon/flame_dungeon/"
- define IN_DOOR 20388
- define NPC_REGEN_FILE_PATH = "data/dungeon/flame_dungeon/npc.txt"
- define TICKET_GROUP 10033
- define LIMITED_PASS_TICKET 71095
- quest flame_dungeon begin
- state start begin
- when ENTRY_MAN.click with pc.get_level() >= 100 begin
- pc.give_item2(LIMITED_PASS_TICKET, 1)
- set_state(run)
- end
- when flame_dungeon_45m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 45),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer('flame_dungeon_30m_left_timer', 15*60, get_server_timer_arg())
- end
- end
- when flame_dungeon_30m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 30),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer('flame_dungeon_15m_left_timer', 15*60, get_server_timer_arg())
- end
- end
- when flame_dungeon_15m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 15),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer('flame_dungeon_5m_left_timer', 10*60, get_server_timer_arg())
- end
- end
- when flame_dungeon_5m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 5),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer('flame_dungeon_1m_left_timer', 4*60, get_server_timer_arg())
- end
- end
- when flame_dungeon_1m_left_timer.server_timer begin
- if d.select(get_server_timer_arg()) then
- notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 1),d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- server_timer ("flame_dungeon_0m_left_timer", 60, get_server_timer_arg())
- end
- end
- when flame_dungeon_0m_left_timer.server_timer begin
- local setting = flame_dungeon.setting()
- if d.select(get_server_timer_arg()) then
- notice_multiline(gameforge.flame_dungeon._190_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._200_notice,d.notice)
- server_timer("dungeon_end_timer",10,d.get_map_index())
- end
- end
- when dungeon_end_timer.server_timer begin -- 종료 타이머 (끝나고 나가는거)
- local setting = flame_dungeon.setting()
- if d.select(get_server_timer_arg()) then
- flame_dungeon.clear_timer(d.get_map_index())
- d.set_warp_location(ENTRY_MAP_INDEX, setting.outside_entry_pos[1] , setting.outside_entry_pos[2])
- d.exit_all()
- d.setf("party_leader_pid", 0)
- end
- end
- when killed_A_1.server_timer begin -- 타이머 돌리기1 (level1,level3)
- if d.select(get_server_timer_arg()) then
- if d.count_monster() <= 0 then -- 1레벨 몬스터 전멸시
- if d.getf("level") == 11 then
- notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- else
- notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- end
- d.setf("level",0)
- else
- server_timer ("killed_A_2", 6, get_server_timer_arg())
- end
- end
- end
- when killed_A_2.server_timer begin -- 타이머 돌리기2 (1과 2 번갈아가면서 돌아감)
- if d.select(get_server_timer_arg()) then
- if d.count_monster() <= 0 then -- 1레벨 몬스터 전멸시
- if d.getf("level") == 11 then
- notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- else
- notice_multiline(gameforge.flame_dungeon._420_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- end
- d.setf("level",0)
- else
- server_timer ("killed_A_1", 6, get_server_timer_arg())
- end
- end
- end
- end
- state run begin
- function setting()
- return
- {
- ["bossroom_entry_pos"] = {8109,6867},
- ["boss_pos"] = {686,637},
- ["doors_pos"] = {
- {320,394},
- {293,359},
- {333,321},
- {378,320},
- {400,355},
- {394,401}
- },
- ["idoors_pos"] = {
- {268,447},
- {234,359},
- {300,264},
- {454,217},
- {470,355},
- {467,469}
- },
- ["doors_dir"] = {135,90,210,152,90,223},
- ["idoors_dir"] = {135,90,210,135,90,239},
- ["dungeon_entry_pos"] = {7762, 6739},-- 던전에 처음 들어오는 곳
- ["DUNGEON_MAN_bpos"] = {690,722},
- ["DUNGEON_MAN_pos"] = {354,362},
- ["LEVEL2_STONE_pos"] = {195,352},
- ["LEVEL4_TARGET_pos"] = {470,175},
- ["LEVEL5_STONE_pos"] = {
- {486, 345},
- {511, 336},
- {525, 349},
- {521, 365},
- {503, 372},
- {486, 365},
- {500, 354}
- },
- ["LEVEL6_TARGET_pos"] = {511,480},
- ["outside_entry_pos"] = {6142,7068}, --입장시켜주는애 서있는 곳
- ["YAK_pos"] = {376, 397} -- 약환 부하
- }
- end
- function is_flamed(idx) -- 적룡성에 있는지 확인
- return idx >= DUNGEON_MAP_INDEX * 10000 and idx < (DUNGEON_MAP_INDEX + 1) *10000
- end
- function make_dungeon() -- 던전 만들기
- local setting = flame_dungeon.setting()
- d.new_jump_party(DUNGEON_MAP_INDEX, setting.dungeon_entry_pos[1], setting.dungeon_entry_pos[2])
- -- d.spawn_mob_ac_dir(DUNGEON_MAN, setting.DUNGEON_MAN_pos[1], setting.DUNGEON_MAN_pos[2],DUNGEON_MAN_DIR)
- -- d.spawn_mob(YAK,setting.YAK_pos[1],setting.YAK_pos[2])
- d.regen_file(NPC_REGEN_FILE_PATH)
- d.setf("level",0)
- for i=1,6 do
- d.set_unique("door"..i, d.spawn_mob_ac_dir(BLOCK_DOOR, setting.doors_pos[i][1], setting.doors_pos[i][2],setting.doors_dir[i]))
- end
- for i=1,6 do
- d.set_unique("idoor"..i, d.spawn_mob_ac_dir(IN_DOOR, setting.idoors_pos[i][1], setting.idoors_pos[i][2],setting.idoors_dir[i]))
- end
- d.setf("clear_count",0)
- d.setf("started",0)
- d.setf("dungeon_enter",0) -- 정상적으로 입장했는지? // 비정상 : 0 정상 : 1 // 튕기면 입장제한시간을 기록 안함
- end
- function go_boss() -- 보스룸 가기
- local setting = flame_dungeon.setting()
- if pc.get_level() < 104 then --레벨확인
- -- syschat(gameforge.flame_dungeon._580_notice)
- say(gameforge.flame_dungeon._580_notice)
- return
- else
- -- say_title(gameforge.flame_dungeon._010_say)
- say(gameforge.flame_dungeon._010_say)
- local warp = select(gameforge.flame_dungeon._020_select,gameforge.flame_dungeon._030_select)
- if warp == 1 then
- d.setf("level",17)
- d.jump_all(setting.bossroom_entry_pos[1],setting.bossroom_entry_pos[2])
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_fild_boss.txt")
- -- d.spawn_mob(DUNGEON_MAN,setting.DUNGEON_MAN_bpos[1],setting.DUNGEON_MAN_bpos[2])
- d.spawn_mob(FINAL_BOSS,setting.boss_pos[1],setting.boss_pos[2])
- end
- end
- end
- function level_clear() -- 레벨 깼을때, 리젠클리어, 지역클리어
- d.setf("level",0)
- d.clear_regen()
- d.purge_area(750000,620000,817400,689400) -- 맵전체 -- d.purge() 사용고려
- end
- function clear_timer(inx) -- 타이머 다지우기
- clear_server_timer ("flame_dungeon_0m_left_timer", inx)
- clear_server_timer ("flame_dungeon_1m_left_timer", inx)
- clear_server_timer ("flame_dungeon_5m_left_timer", inx)
- clear_server_timer ("flame_dungeon_10m_left_timer", inx)
- clear_server_timer ("flame_dungeon_15m_left_timer", inx)
- clear_server_timer ("flame_dungeon_30m_left_timer", inx)
- clear_server_timer ("flame_dungeon_45m_left_timer", inx)
- clear_server_timer ("killed_A_1", inx)
- clear_server_timer ("killed_A_2", inx)
- clear_server_timer ("flame_dungeon_ticket_remove", inx)
- end
- when login begin
- local idx = pc.get_map_index()
- local setting = flame_dungeon.setting()
- if idx == DUNGEON_MAP_INDEX then
- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX)
- elseif flame_dungeon.is_flamed(idx) then -- 던전 입장, 보스룸 입장 예외
- ------------------------------------------------------------------------------------------------------------------------------------------------------
- --아래의 두줄중 위에줄을 사용하면 던전에서 종료했을경우 다시 원래 위치로 돌아온다. 아래줄을 활성화 하면 던전에서 종료했을 경우 던전 밖으로 나가게 된다.
- --던전에서 종료했을 경우 다시 원래 위치로 돌아올 경우, 던전에서 나가는 방법을 만들어줘야 하기 때문에 적룡성비의 나가기란 옵션을 활성화 해줘야 한다.
- ------------------------------------------------------------------------------------------------------------------------------------------------------
- -- pc.set_warp_location(0, 0 , 0) --튕겼을때 다시 돌아오게 만들어 주는 부분
- pc.set_warp_location(ENTRY_MAP_INDEX, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) -- 던전 나갔을 때 밖으로 튕기게함
- local ticketGroup = {71095, 1, 71130, 1}
- if d.getf("dungeon_enter") == 0 then -- 진행중이 아니면
- local canPass = false
- for i=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
- canPass = true
- break
- end
- end
- if get_global_time() - pc.getf("flame_dungeon","exit_time") < ENTER_LIMIT_TIME * 60 then -- 입장제한시간이 걸렸으면
- notice_multiline(gameforge.flame_dungeon._050_notice,d.notice)
- say(gameforge.flame_dungeon._060_say)
- timer("flame_dungeon_warp_timer", 5)
- elseif not canPass then
- notice_multiline(gameforge.flame_dungeon._070_notice,d.notice)
- say(gameforge.flame_dungeon._080_say)
- timer("flame_dungeon_warp_timer", 5)
- elseif pc.get_level() < 100 then
- notice_multiline(gameforge.flame_dungeon._090_notice,d.notice)
- say(gameforge.flame_dungeon._100_say)
- timer("flame_dungeon_warp_timer", 5)
- end
- elseif pc.getf("flame_dungeon","ticket_delete") == 0 then -- 진행중인데 티켓이 안지워졌을경우
- for i=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then
- pc.remove_item(ticketGroup[i], ticketGroup[i+1])
- break
- end
- end
- pc.setf("flame_dungeon","ticket_delete",1)
- end
- else
- pc.setf("flame_dungeon","ticket_delete",0)
- end
- end
- when flame_dungeon_warp_timer.timer begin
- local setting = flame_dungeon.setting()
- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX)
- end
- when logout begin
- local idx = pc.get_map_index()
- if flame_dungeon.is_flamed(idx) then
- if d.getf("dungeon_enter") == 1 then -- 정상적인 던전 입장 후 로그아웃
- pc.setf("flame_dungeon","exit_time",get_global_time()) -- 인스턴스 안에서의 마지막 시간을 기록, 근데 시간제한 때문에 or 그냥 튕긴거면 안기록
- end
- end
- end
- when ENTRY_MAN.chat.gameforge.flame_dungeon._110_npcChat begin
- local setting = flame_dungeon.setting()
- if party.is_party() then
- -- 던전 도중 나갈 경우 재입장 가능하도록
- local party_check = 0
- if d.find(party.getf("dungeon_index")) then
- party_check = (d.getf_from_map_index("party_leader_pid", party.getf("dungeon_index")) == party.get_leader_pid())
- end
- if d.find(party.getf("dungeon_index")) and party_check then
- if get_global_time() - pc.getf("flame_dungeon","exit_time") < 5 * 60 then -- 접종 이후 5분 내?
- local dungeon_level = d.getf_from_map_index("level", party.getf("dungeon_index"))
- if dungeon_level == 17 then -- 보스
- pc.warp(setting.bossroom_entry_pos[1] * 100, setting.bossroom_entry_pos[2] * 100, party.getf("dungeon_index"))
- else
- pc.warp(setting.dungeon_entry_pos[1] * 100, setting.dungeon_entry_pos[2] * 100, party.getf("dungeon_index"))
- end
- else -- 5분 초과하여 재 입장 불가
- say_title(mob_name(ENTRY_MAN))
- say(gameforge.flame_dungeon._590_say)
- end
- else
- local pids = {party.get_member_pids()}
- local noTicketMembers = {}
- local notEnoughLevelMembers = {}
- local ticketCheck = true
- local levelCheck = true
- local ticketGroup = {71095, 1, 71130, 1}
- for i, pid in next, pids, nil do
- q.begin_other_pc_block(pid)
- local canPass = false
- for idx=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
- canPass = true
- break
- end
- end
- if not canPass then
- table.insert(noTicketMembers, pc.get_name())
- ticketCheck = false
- end
- if pc.level < LEVEL_CUT then
- table.insert(notEnoughLevelMembers, pc.get_name())
- levelCheck = false
- end
- q.end_other_pc_block()
- end
- if not ticketCheck then
- say_title(mob_name(ENTRY_MAN))
- say(gameforge.flame_dungeon._610_say)
- for i, name in next, noTicketMembers, nil do
- say(color(1,1,0), " "..name)
- end
- if levelCheck then
- return
- else
- wait()
- end
- end
- if not levelCheck then
- say_title(mob_name(ENTRY_MAN))
- say(gameforge.flame_dungeon._630_say)
- for i, name in next, notEnoughLevelMembers, nil do
- say(color(1,1,0), " "..name)
- end
- return
- end
- if party.is_leader() then
- say(gameforge.flame_dungeon._120_say)
- local warp = select(gameforge.flame_dungeon._130_select,gameforge.flame_dungeon._140_select)
- if warp == 1 then
- if party.is_map_member_flag_lt("exit_time", get_global_time() - ENTER_LIMIT_TIME * 60 ) then
- flame_dungeon.make_dungeon()
- else
- --say("test : 파티원의 입장 제한시간이 끝나지 않았습니다.")
- say(gameforge.flame_dungeon._600_say)
- end
- end
- party.setf("flame_dungeon_boss_kill_count", 0)
- else
- say(gameforge.flame_dungeon._150_say)
- end
- end
- else
- say(gameforge.flame_dungeon._160_say)
- end
- end
- -- when ENTRY_MAN.chat."Test : 리소스확인" with is_test_server() begin -- 테스트용
- -- local setting = flame_dungeon.setting()
- -- pc.setf("flame_dungeon","fdRtest",1)
- -- pc.warp( setting.dungeon_entry_pos[1]*100, setting.dungeon_entry_pos[2]*100, DUNGEON_MAP_INDEX)
- -- end
- when ENTRY_MAN.chat."TEST : Init time limit init" with is_test_server() begin -- 테스트용
- pc.setf("flame_dungeon","exit_time",get_global_time()-1800)
- say("Done")
- end
- -- when DUNGEON_MAN.chat."Test : 현재 상태" with is_test_server() begin -- 테스트용
- -- say("남은 몬스터 : "..d.count_monster())
- -- say("level : "..d.getf("level"))
- -- say("Dmap index : "..d.get_map_index())
- -- say("Pmap index : "..pc.get_map_index())
- -- say("access limit : "..pc.getf("flame_dungeon","exit_time"))
- -- say("global time : "..get_global_time())
- -- if flame_dungeon.is_flamed(d.get_map_index()) then
- -- say("in dungeon") -- is_flamed 함수 체크
- -- end
- -- if d.is_unique_dead("stone1") then
- -- say("stone1 is dead")
- -- else
- -- say("stone1 is not dead")
- -- end
- -- end
- -- when DUNGEON_MAN.chat."처음으로" begin -- 테스트용
- -- say("초기화 합니다")
- -- flame_dungeon.clear_timer(d.get_map_index())
- -- flame_dungeon.make_dungeon()
- -- end
- when DUNGEON_MAN.chat."Test : Boss Room" with is_test_server() begin -- 테스트용
- flame_dungeon.go_boss()
- end
- -- < 시간 경과 타이머>
- -- when DUNGEON_MAN.chat."나가기" begin -- 던전에서 튕기지 않게 할 경우 활성화
- -- local setting = flame_dungeon.setting()
- -- say("밖으로 나가시겠습니까?")
- -- local warp = select("확인","취소")
- -- if warp == 1 then
- -- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX)
- -- end
- -- end
- -- <<<< 던전 진행>>>> --
- when DUNGEON_MAN.chat.gameforge.flame_dungeon._210_npcChat with npc.lock() begin -- '0x'는 x번째 레벨 퀘스트 받을 수 있는 상태 , '1x'는 x번째 레벨 퀘스트 진행중
- local setting = flame_dungeon.setting()
- if d.getf("started") == 0 then
- say(gameforge.flame_dungeon._230_say)
- say(gameforge.flame_dungeon._240_say)
- wait()
- d.setf("started",1)
- -- 파티원이 튕겨버렸는데 자기만 남아서 exit timer가 리셋되면 안되니깐 다음레벨을 눌렀을때를 시작할때로 봄
- server_timer ("flame_dungeon_45m_left_timer",15*60, d.get_map_index())
- notice_multiline(gameforge.flame_dungeon._250_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._170_notice,d.notice)
- -- 통행증 관련된 처리
- -- 입장 후에 티켓을 없앤 사람을 튕겨내기 위해서 타이머를 이용해 티켓을 제거한다.
- local pids = {party.get_member_pids()}
- local ticketGroup = {71095, 1, 71130, 1}
- for i, pid in next, pids, nil do
- q.begin_other_pc_block(pid)
- local canPass = false
- for idx=1, table.getn(ticketGroup),2 do
- if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
- canPass = true
- pc.remove_item(ticketGroup[idx], ticketGroup[idx+1])
- break
- end
- end
- if not canPass then
- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX)
- end
- q.end_other_pc_block()
- end
- d.setqf2("flame_dungeon","ticket_delete",1)
- d.setf("dungeon_enter",1)
- -- 던전과 파티에 서로에 대한 정보를 저장한다.
- party.setf("dungeon_index", d.get_map_index())
- d.setf("party_leader_pid", party.get_leader_pid())
- end
- if d.getf("level") < 7 then --진행중이 아니면
- if d.getf("clear_count") == 6 then -- 방 여섯개 했으면 보스방
- d.setf("level",7)
- else
- local rand = number(1,6)--랜덤에서 방문체크는 따로 배열없이 방의 문의 열려있는지로 체크함
- local setlev = 0
- d.setf("level",7) -- 혹시 모를 문제가 생겨 레벨이 안잡힐경우를 대비해 보스룸으로 셋팅해둠
- for i=1,50 do
- setlev = setlev + 1
- if setlev > 6 then
- setlev = 1
- end
- if not d.is_unique_dead("door"..setlev) then
- rand = rand - 1
- if rand == 0 then
- d.setf("level",setlev)
- d.setf("clear_count",d.getf("clear_count")+1)
- break
- end
- end
- end
- end
- end
- if d.getf("level") == 1 then
- say(gameforge.flame_dungeon._260_say)
- notice_multiline(gameforge.flame_dungeon._260_say,d.notice)
- d.kill_unique("door1")
- d.kill_unique("idoor1")
- d.setf("level",11)
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_a.txt")
- server_timer ("killed_A_1", 12, d.get_map_index())
- elseif d.getf("level") == 11 then
- say(gameforge.flame_dungeon._270_say)
- say_title(gameforge.flame_dungeon._280_sayTitle .. d.count_monster())
- elseif d.getf("level") == 2 then
- say(gameforge.flame_dungeon._290_say)
- say(gameforge.flame_dungeon._300_say)
- notice_multiline(gameforge.flame_dungeon._290_say,d.notice)
- notice_multiline(gameforge.flame_dungeon._300_say,d.notice)
- d.spawn_mob(LEVEL2_STONE, setting.LEVEL2_STONE_pos[1], setting.LEVEL2_STONE_pos[2]) -- 봉인석 소환
- d.kill_unique("door2")
- d.kill_unique("idoor2")
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_b.txt")
- d.setf("level",12)
- elseif d.getf("level") == 12 then
- say(gameforge.flame_dungeon._310_say)
- elseif d.getf("level") == 3 then
- say(gameforge.flame_dungeon._260_say)
- notice_multiline(gameforge.flame_dungeon._260_say,d.notice)
- d.kill_unique("door3")
- d.kill_unique("idoor3")
- d.setf("level",13)
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_c.txt")
- server_timer ("killed_A_1", 12, d.get_map_index())
- elseif d.getf("level") == 13 then
- say(gameforge.flame_dungeon._270_say)
- say_title(gameforge.flame_dungeon._280_sayTitle..d.count_monster())
- elseif d.getf("level") == 4 then -- 474 178
- say(gameforge.flame_dungeon._320_notice)
- notice_multiline(gameforge.flame_dungeon._320_notice,d.notice)
- d.setf("level",14)
- d.kill_unique("door4")
- d.kill_unique("idoor4")
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_d.txt")
- d.spawn_mob(LEVEL4_TARGET,setting.LEVEL4_TARGET_pos[1],setting.LEVEL4_TARGET_pos[2] ) -- 타겟몬스터 소한
- elseif d.getf("level") == 14 then
- say(gameforge.flame_dungeon._330_say)
- say(gameforge.flame_dungeon._340_say)
- elseif d.getf("level") == 5 then -- 510 355
- say(gameforge.flame_dungeon._350_say)
- say(gameforge.flame_dungeon._360_say)
- notice_multiline(gameforge.flame_dungeon._350_say,d.notice)
- notice_multiline(gameforge.flame_dungeon._360_say,d.notice)
- d.kill_unique("door5")
- d.kill_unique("idoor5")
- d.setf("level",15)
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- local vis = { 0,0,0,0,0,0,0}
- for i=1,7 do
- vis[i] = 0
- end
- for i = 1, 7 do -- 랜덤하게 돌소환
- local ran = number(1,7)
- local st = 0
- for j = 1, 50 do
- st = st + 1
- if st > 7 then
- st = 1
- end
- if vis[st] == 0 then
- ran = ran - 1
- if ran == 0 then
- vis[st] = 1
- d.set_unique("stone5_"..st, d.spawn_mob(LEVEL5_STONE, setting.LEVEL5_STONE_pos[i][1], setting.LEVEL5_STONE_pos[i][2]))
- break
- end
- end
- end
- end
- elseif d.getf("level") == 15 then
- say(gameforge.flame_dungeon._370_say)
- elseif d.getf("level") == 6 then -- 507 490
- say(gameforge.flame_dungeon._380_say)
- notice_multiline(gameforge.flame_dungeon._380_say,d.notice)
- d.setf("level",16)
- d.kill_unique("door6")
- d.kill_unique("idoor6")
- d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_f.txt")
- d.spawn_mob(LEVEL6_TARGET, setting.LEVEL6_TARGET_pos[1],setting.LEVEL6_TARGET_pos[2]) -- 타겟오브젝트 소환
- elseif d.getf("level") == 16 then
- say(gameforge.flame_dungeon._390_say)
- say(gameforge.flame_dungeon._400_say)
- elseif d.getf("level") == 7 then
- -- setskin(NOWINDOW)
- flame_dungeon.go_boss()
- else
- say(gameforge.flame_dungeon._410_say)
- end
- npc.unlock()
- end
- when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 12 begin -- 2레벨 봉인석 열쇠 드랍
- local i = number(1, 100) -- 100분의 1 확률로 열쇠드랍
- if i == 1 then
- game.drop_item (LEVEL2_KEY, 1)
- end
- end
- when LEVEL2_STONE.take with flame_dungeon.is_flamed(pc.get_map_index()) and item.vnum == LEVEL2_KEY and d.getf("level") == 12 begin -- 2레벨 열쇠 먹었을때
- local i = number(1, 5) -- 5분의 1 확률로 진짜 열쇠
- if i == 1 then
- npc.purge()
- item.remove()
- notice_multiline(gameforge.flame_dungeon._440_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- flame_dungeon.level_clear()
- else
- item.remove()
- say(gameforge.flame_dungeon._450_say)
- end
- end
- when LEVEL4_TARGET.kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 14 begin
- notice_multiline(gameforge.flame_dungeon._460_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- flame_dungeon.level_clear()
- end
- when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 15 begin -- 5레벨 봉인석 열쇠 드랍
- local i = number(1, 30) -- 30분의 1 확률로 열쇠드랍
- if i == 1 then
- game.drop_item (LEVEL5_REALKEY, 1)
- end
- end
- when LEVEL5_STONE.take with flame_dungeon.is_flamed(d.get_map_index()) and item.vnum == LEVEL5_REALKEY and d.getf("level") == 15 begin -- 5레벨 진짜열쇠 먹었을때
- local setting = flame_dungeon.setting()
- if npc.get_vid() == d.get_unique_vid("stone5_1") then -- 첫번째 꺼는 선행되어야 할 일이 필요없으니 찾자마자 제거해줌
- npc.purge()
- item.remove()
- say(gameforge.flame_dungeon._470_say)
- d.setf("stonekill",2) -- 2번 돌을 죽여라
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_2") then
- if d.getf("stonekill") == 2 then -- 2번돌을 죽일 차롄데 2번돌에게 열쇠를 먹였을 때
- npc.purge()
- item.remove()
- say(gameforge.flame_dungeon._480_say)
- d.setf("stonekill",3)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say(gameforge.flame_dungeon._490_say)
- -- say("2번")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_3") then
- if d.getf("stonekill") == 3 then
- npc.purge()
- item.remove()
- say(gameforge.flame_dungeon._500_say)
- d.setf("stonekill",4)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say(gameforge.flame_dungeon._490_say)
- -- say("3번")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_4") then
- if d.getf("stonekill") == 4 then
- npc.purge()
- item.remove()
- say(gameforge.flame_dungeon._510_say)
- d.setf("stonekill",5)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say(gameforge.flame_dungeon._490_say)
- -- say("4번")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_5") then
- if d.getf("stonekill") == 5 then
- npc.purge()
- item.remove()
- say(gameforge.flame_dungeon._520_say)
- d.setf("stonekill",6)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say(gameforge.flame_dungeon._490_say)
- -- say("5번")
- end
- elseif npc.get_vid() == d.get_unique_vid("stone5_6") then
- if d.getf("stonekill") == 6 then
- npc.purge()
- item.remove()
- say(gameforge.flame_dungeon._530_say)
- d.setf("stonekill",7)
- if d.count_monster() < LEVEL5_GEN_LIMIT then
- d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt")
- end
- else
- item.remove()
- say(gameforge.flame_dungeon._490_say)
- -- say("6번")
- end
- else
- if d.getf("stonekill") == 7 then
- npc.purge()
- item.remove()
- notice_multiline(gameforge.flame_dungeon._440_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- flame_dungeon.level_clear()
- else
- item.remove()
- say(gameforge.flame_dungeon._490_say)
- -- say("7번")
- end
- end
- end
- when LEVEL6_TARGET.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==16 begin -- 망마석 파괴했을 때
- notice_multiline(gameforge.flame_dungeon._540_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._430_notice,d.notice)
- flame_dungeon.level_clear()
- end
- when FINAL_BOSS.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==17 begin -- 보스 죽였을때
- notice_multiline(gameforge.flame_dungeon._550_notice,d.notice)
- notice_multiline(gameforge.flame_dungeon._560_notice,d.notice)
- server_timer("dungeon_end_timer", 60,d.get_map_index())
- flame_dungeon.level_clear()
- -- 파티원 중, 야마천 잡는 퀘스트(104렙, 105렙 퀘스트) 진행중인 사람이 있으면 퀘스트 클리어 되도록.
- if party.is_party() then
- party.setf("flame_dungeon_boss_kill_count", 1)
- end
- end
- end
- end
- end
Das ist die Quest
-
Hallo,
Habe die Flieger Files und habe das problem das ich bei der Razador run nach dem Zerstören des Metins nicht weiter geht.
Ist der bug bekannt und kann mir sagen woran der Fehler liegt.
MFG: iKnocK
-
Hallo,
würde gerne in meinen ingame switchbot 6/7 Bonis hinzufügen da dort nur : Max. Tp und Max.Mp hinterlegt ist.
Könnte mir jemand sagen wo ich das einstellen kann in welchem Verzeichnis?
MFG: iKnock
-
Hab den Fehler selber gefunden. Alles Gut habe jetzt nur das Problem das man das Reittier nach dem Porten immer noch in der Zeile hat.
-
value0 oder so die zeit anpassen
Klappt leider nicht....
-
Code
- quest ride begin
- state start begin
- function Ride( vnum, remain_time )
- ride_info = {
- [71111] = { 71111, 5*60, apply.MOV_SPEED, 0, 1, false },
- [71114] = { 20110, 5*60, apply.DEF_GRADE_BONUS, 75, 75, false },
- [71115] = { 20110, 5*60, apply.DEF_GRADE_BONUS, 100, 75, false },
- [71116] = { 20111, 5*60, apply.DEF_GRADE_BONUS, 100, 80, false },
- [71117] = { 20111, 5*60, apply.DEF_GRADE_BONUS, 150, 80, false },
- [71118] = { 20112, 5*60, apply.DEF_GRADE_BONUS, 125, 85, false },
- [71119] = { 20112, 5*60, apply.DEF_GRADE_BONUS, 200, 85, false },
- [71120] = { 20113, 5*60, apply.ATT_GRADE_BONUS, 200, 85, false },
- [71121] = { 20113, 5*60, apply.ATT_GRADE_BONUS, 300, 85, false },
- [71171] = { 20227, 5*60, apply.ATTBONUS_MONSTER, 20, 1, false, false, false},
- [71172] = { 20226, 5*60, apply.ATTBONUS_MONSTER, 20, 1, false, false, false},
- [71161] = { 20219, 5*60, apply.STR, 100, 1, false, false, false},
- [71124] = { 20114, 5*60, apply.MOV_SPEED, 0, 1, false },
- [71125] = { 20115, 5*60, apply.ATTBONUS_MONSTER, 20, 20, false },
- [71126] = { 20116, 5*60, apply.ATTBONUS_MONSTER, 20, 20, false },
- [71127] = { 20117, 5*60, apply.ATTBONUS_MONSTER, 20, 20, false },
- [71128] = { 20118, 5*60, apply.ATTBONUS_MONSTER, 20, 20, false },
- [71137] = { 20120, 5*60, apply.MOV_SPEED, 0, 1, false, false, false},
- [71138] = { 20121, 5*60, apply.MOV_SPEED, 0, 1, false, false, false},
- [71139] = { 20122, 5*60, apply.MOV_SPEED, 0, 1, false, false, false},
- [71140] = { 20123, 5*60, apply.MOV_SPEED, 0, 1, false, false, false},
- [71141] = { 20124, 5*60, apply.MOV_SPEED, 0, 1, false, false, false},
- [71142] = { 20125, 5*60, apply.MOV_SPEED, 0, 1, false, false, false},
- [71176] = { 20231, 5*60, apply.MOV_SPEED, 30, 1, false, false, false},
- [71177] = { 20232, 5*60, apply.MOV_SPEED, 30, 1, false, false, false},
- [71131] = { 20119, 5*60, apply.MOV_SPEED, 60, 1, false },
- [71132] = { 20119, 5*60, apply.MOV_SPEED, 60, 1, false },
- [71133] = { 20119, 5*60, apply.MOV_SPEED, 60, 1, false },
- [71134] = { 20119, 5*60, apply.ATTBONUS_MONSTER, 20, 1, false },
- [71161] = { 20219, 5*60, apply.ATTBONUS_MONSTER, 20, 1, false },
- [71164] = { 20220, 5*60, apply.MOV_SPEED, 60, 1, false, false, false},
- [71165] = { 20221, 5*60, apply.MOV_SPEED, 60, 1, false, false, false},
- [71166] = { 20222, 5*60, apply.MOV_SPEED, 60, 1, false, false, false},
- [71178] = { 20134, 5*60, apply.MOV_SPEED, 60, 1, false, false, false},
- [71179] = { 20135, 5*60, apply.MOV_SPEED, 60, 1, false, false, false},
- [71180] = { 20136, 5*60, apply.MOV_SPEED, 60, 1, false, false, false},
- -- Mounturi upgradable
- [52001] = { 20201, 60*60*24*365, apply.ATTBONUS_MONSTER, 0, 0, false, true },
- [52002] = { 20201, 60*60*24*365, apply.MALL_EXPBONUS, 0, 0, false, true },
- [52003] = { 20201, 60*60*24*365, apply.MAX_HP, 0, 0, false, true },
- [52004] = { 20201, 60*60*24*365, apply.DEF_GRADE_BONUS, 0, 0, false, true },
- [52005] = { 20201, 60*60*24*365, apply.ATT_GRADE_BONUS, 0, 0, false, true },
- [52006] = { 20205, 60*60*24*365, apply.ATTBONUS_MONSTER, 3, 0, false, true },
- [52007] = { 20205, 60*60*24*365, apply.MALL_EXPBONUS, 3, 0, false, true },
- [52008] = { 20205, 60*60*24*365, apply.MAX_HP, 250, 0, false, true },
- [52009] = { 20205, 60*60*24*365, apply.DEF_GRADE_BONUS, 50, 0, false, true },
- [52010] = { 20205, 60*60*24*365, apply.ATT_GRADE_BONUS, 30, 0, false, true },
- [52011] = { 20209, 60*60*24*365, apply.ATTBONUS_MONSTER, 5, 0, false, true },
- [52012] = { 20209, 60*60*24*365, apply.MALL_EXPBONUS, 5, 0, false, true },
- [52013] = { 20209, 60*60*24*365, apply.MAX_HP, 500, 0, false, true },
- [52014] = { 20209, 60*60*24*365, apply.DEF_GRADE_BONUS, 150, 0, false, true },
- [52015] = { 20209, 60*60*24*365, apply.ATT_GRADE_BONUS, 100, 0, false, true },
- [52016] = { 20202, 60*60*24*365, apply.ATTBONUS_MONSTER, 0, 0, false, true },
- [52017] = { 20202, 60*60*24*365, apply.MALL_EXPBONUS, 0, 0, false, true },
- [52018] = { 20202, 60*60*24*365, apply.MAX_HP, 0, 0, false, true },
- [52019] = { 20202, 60*60*24*365, apply.DEF_GRADE_BONUS, 0, 0, false, true },
- [52020] = { 20202, 60*60*24*365, apply.ATT_GRADE_BONUS, 0, 0, false, true },
- [52021] = { 20206, 60*60*24*365, apply.ATTBONUS_MONSTER, 3 , 0, false, true },
- [52022] = { 20206, 60*60*24*365, apply.MALL_EXPBONUS, 3 , 0, false, true },
- [52023] = { 20206, 60*60*24*365, apply.MAX_HP, 250, 0, false, true },
- [52024] = { 20206, 60*60*24*365, apply.DEF_GRADE_BONUS, 50, 0, false, true },
- [52025] = { 20206, 60*60*24*365, apply.ATT_GRADE_BONUS, 30, 0, false, true },
- [52026] = { 20210, 60*60*24*365, apply.ATTBONUS_MONSTER, 5 , 0, false, true },
- [52027] = { 20210, 60*60*24*365, apply.MALL_EXPBONUS, 5 , 0, false, true },
- [52028] = { 20210, 60*60*24*365, apply.MAX_HP, 500, 0, false, true },
- [52029] = { 20210, 60*60*24*365, apply.DEF_GRADE_BONUS, 150, 0, false, true },
- [52030] = { 20210, 60*60*24*365, apply.ATT_GRADE_BONUS, 100, 0, false, true },
- [52031]= { 20204, 60*60*24*365, apply.ATTBONUS_MONSTER, 0, 0, false, true },
- [52032]= { 20204, 60*60*24*365, apply.MALL_EXPBONUS, 0, 0, false, true },
- [52033]= { 20204, 60*60*24*365, apply.MAX_HP, 0, 0, false, true },
- [52034]= { 20204, 60*60*24*365, apply.DEF_GRADE_BONUS, 0, 0, false, true },
- [52035]= { 20204, 60*60*24*365, apply.ATT_GRADE_BONUS, 0, 0, false, true },
- [52036]= { 20208, 60*60*24*365, apply.ATTBONUS_MONSTER, 3 , 0, false, true },
- [52037]= { 20208, 60*60*24*365, apply.MALL_EXPBONUS, 3 , 0, false, true },
- [52038]= { 20208, 60*60*24*365, apply.MAX_HP, 250, 0, false, true },
- [52039]= { 20208, 60*60*24*365, apply.DEF_GRADE_BONUS, 50, 0, false, true },
- [52040]= { 20208, 60*60*24*365, apply.ATT_GRADE_BONUS, 30, 0, false, true },
- [52041]= { 20212, 60*60*24*365, apply.ATTBONUS_MONSTER, 5 , 0, false, true },
- [52042]= { 20212, 60*60*24*365, apply.MALL_EXPBONUS, 5 , 0, false, true },
- [52043]= { 20212, 60*60*24*365, apply.MAX_HP, 500, 0, false, true },
- [52044]= { 20212, 60*60*24*365, apply.DEF_GRADE_BONUS, 150, 0, false, true },
- [52045]= { 20212, 60*60*24*365, apply.ATT_GRADE_BONUS, 100, 0, false, true },
- [52046]= { 20203, 60*60*24*365, apply.ATTBONUS_MONSTER, 0, 0, false, true },
- [52047]= { 20203, 60*60*24*365, apply.MALL_EXPBONUS, 0, 0, false, true },
- [52048]= { 20203, 60*60*24*365, apply.MAX_HP, 0, 0, false, true },
- [52049]= { 20203, 60*60*24*365, apply.DEF_GRADE_BONUS, 0, 0, false, true },
- [52050]= { 20203, 60*60*24*365, apply.ATT_GRADE_BONUS, 0, 0, false, true },
- [52051]= { 20207, 60*60*24*365, apply.ATTBONUS_MONSTER, 3 , 0, false, true },
- [52052]= { 20207, 60*60*24*365, apply.MALL_EXPBONUS, 3 , 0, false, true },
- [52053]= { 20207, 60*60*24*365, apply.MAX_HP, 250, 0, false, true },
- [52054]= { 20207, 60*60*24*365, apply.DEF_GRADE_BONUS, 50, 0, false, true },
- [52055]= { 20207, 60*60*24*365, apply.ATT_GRADE_BONUS, 30, 0, false, true },
- [52056]= { 20211, 60*60*24*365, apply.ATTBONUS_MONSTER, 5 , 0, false, true },
- [52057]= { 20211, 60*60*24*365, apply.MALL_EXPBONUS, 5 , 0, false, true },
- [52058]= { 20211, 60*60*24*365, apply.MAX_HP, 500, 0, false, true },
- [52059]= { 20211, 60*60*24*365, apply.DEF_GRADE_BONUS, 150, 0, false, true },
- [52060]= { 20211, 60*60*24*365, apply.ATT_GRADE_BONUS, 100, 0, false, true },
- [52061]= { 20213, 60*60*24*365, apply.ATTBONUS_MONSTER, 0, 0, false, true },
- [52062]= { 20213, 60*60*24*365, apply.MALL_EXPBONUS, 0, 0, false, true },
- [52063]= { 20213, 60*60*24*365, apply.MAX_HP, 0, 0, false, true },
- [52064]= { 20213, 60*60*24*365, apply.DEF_GRADE_BONUS, 0, 0, false, true },
- [52065]= { 20213, 60*60*24*365, apply.ATT_GRADE_BONUS, 0, 0, false, true },
- [52066]= { 20214, 60*60*24*365, apply.ATTBONUS_MONSTER, 3 , 0, false, true },
- [52067]= { 20214, 60*60*24*365, apply.MALL_EXPBONUS, 3 , 0, false, true },
- [52068]= { 20214, 60*60*24*365, apply.MAX_HP, 250, 0, false, true },
- [52069]= { 20214, 60*60*24*365, apply.DEF_GRADE_BONUS, 50, 0, false, true },
- [52070]= { 20214, 60*60*24*365, apply.ATT_GRADE_BONUS, 30, 0, false, true },
- [52071]= { 20215, 60*60*24*365, apply.ATTBONUS_MONSTER, 5 , 0, false, true },
- [52072]= { 20215, 60*60*24*365, apply.MALL_EXPBONUS, 5 , 0, false, true },
- [52073]= { 20215, 60*60*24*365, apply.MAX_HP, 500, 0, false, true },
- [52074]= { 20215, 60*60*24*365, apply.DEF_GRADE_BONUS, 150, 0, false, true },
- [52075]= { 20215, 60*60*24*365, apply.ATT_GRADE_BONUS, 100, 0, false, true },
- [52076]= { 20216, 60*60*24*365, apply.ATTBONUS_MONSTER, 0, 0, false, true },
- [52077]= { 20216, 60*60*24*365, apply.MALL_EXPBONUS, 0, 0, false, true },
- [52078]= { 20216, 60*60*24*365, apply.MAX_HP, 0, 0, false, true },
- [52079]= { 20216, 60*60*24*365, apply.DEF_GRADE_BONUS, 0, 0, false, true },
- [52080]= { 20216, 60*60*24*365, apply.ATT_GRADE_BONUS, 0, 0, false, true },
- [52081]= { 20217, 60*60*24*365, apply.ATTBONUS_MONSTER, 3 , 0, false, true },
- [52082]= { 20217, 60*60*24*365, apply.MALL_EXPBONUS, 3 , 0, false, true },
- [52083]= { 20217, 60*60*24*365, apply.MAX_HP, 250, 0, false, true },
- [52084]= { 20217, 60*60*24*365, apply.DEF_GRADE_BONUS, 50, 0, false, true },
- [52085]= { 20217, 60*60*24*365, apply.ATT_GRADE_BONUS, 30, 0, false, true },
- [52086]= { 20218, 60*60*24*365, apply.ATTBONUS_MONSTER, 5 , 0, false, true },
- [52087]= { 20218, 60*60*24*365, apply.MALL_EXPBONUS, 5 , 0, false, true },
- [52088]= { 20218, 60*60*24*365, apply.MAX_HP, 500, 0, false, true },
- [52089]= { 20218, 60*60*24*365, apply.DEF_GRADE_BONUS, 150, 0, false, true },
- [52090]= { 20218, 60*60*24*365, apply.ATT_GRADE_BONUS, 100, 0, false, true },
- [52091]= { 20223, 60*60*24*365, apply.ATTBONUS_MONSTER, 0, 0, false, true },
- [52092]= { 20223, 60*60*24*365, apply.MALL_EXPBONUS, 0, 0, false, true },
- [52093]= { 20223, 60*60*24*365, apply.MAX_HP, 0, 0, false, true },
- [52094]= { 20223, 60*60*24*365, apply.DEF_GRADE_BONUS, 0, 0, false, true },
- [52095]= { 20223, 60*60*24*365, apply.ATT_GRADE_BONUS, 0, 0, false, true },
- [52096]= { 20224, 60*60*24*365, apply.ATTBONUS_MONSTER, 3 , 0, false, true },
- [52097]= { 20224, 60*60*24*365, apply.MALL_EXPBONUS, 3 , 0, false, true },
- [52098]= { 20224, 60*60*24*365, apply.MAX_HP, 250, 0, false, true },
- [52099]= { 20224, 60*60*24*365, apply.DEF_GRADE_BONUS, 50, 0, false, true },
- [52100]= { 20224, 60*60*24*365, apply.ATT_GRADE_BONUS, 30, 0, false, true },
- [52101]= { 20225, 60*60*24*365, apply.ATTBONUS_MONSTER, 5 , 0, false, true },
- [52102]= { 20225, 60*60*24*365, apply.MALL_EXPBONUS, 5 , 0, false, true },
- [52103]= { 20225, 60*60*24*365, apply.MAX_HP, 500, 0, false, true },
- [52104]= { 20225, 60*60*24*365, apply.DEF_GRADE_BONUS, 150, 0, false, true },
- [52105]= { 20225, 60*60*24*365, apply.ATT_GRADE_BONUS, 100, 0, false, true },
- [52106]= { 20228, 60*60*24*365, apply.ATTBONUS_MONSTER, 0 , 0, false, true },
- [52107]= { 20228, 60*60*24*365, apply.MALL_EXPBONUS, 0 , 0, false, true },
- [52108]= { 20228, 60*60*24*365, apply.MAX_HP, 0, 0, false, true },
- [52109]= { 20228, 60*60*24*365, apply.DEF_GRADE_BONUS, 0, 0, false, true },
- [52110]= { 20229, 60*60*24*365, apply.ATT_GRADE_BONUS, 0, 0, false, true },
- [52111]= { 20229, 60*60*24*365, apply.ATTBONUS_MONSTER, 3 , 0, false, true },
- [52112]= { 20229, 60*60*24*365, apply.MALL_EXPBONUS, 3 , 0, false, true },
- [52113]= { 20229, 60*60*24*365, apply.MAX_HP, 250, 0, false, true },
- [52114]= { 20229, 60*60*24*365, apply.DEF_GRADE_BONUS, 50, 0, false, true },
- [52115]= { 20229, 60*60*24*365, apply.ATT_GRADE_BONUS, 30, 0, false, true },
- [52116]= { 20230, 60*60*24*365, apply.ATTBONUS_MONSTER, 5 , 0, false, true },
- [52117]= { 20230, 60*60*24*365, apply.MALL_EXPBONUS, 5 , 0, false, true },
- [52118]= { 20230, 60*60*24*365, apply.MAX_HP, 500, 0, false, true },
- [52119]= { 20230, 60*60*24*365, apply.DEF_GRADE_BONUS, 150, 0, false, true },
- [52120]= { 20230, 60*60*24*365, apply.ATT_GRADE_BONUS, 100, 0, false, true },
- }
- if pc.level < ride_info[vnum][5] then
- syschat("Nivelul tau este prea mic pentru acest mount.")
- else
- if ride_info[vnum][2] == 0 and remain_time != 0 then
- pc.mount( ride_info[vnum][1], remain_time*60 )
- pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 )
- else
- pc.mount( ride_info[vnum][1], ride_info[vnum][2] )
- pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] )
- end
- if true == ride_info[vnum][6] then
- pc.remove_item(vnum, 1)
- end
- end
- end
- when login begin
- local vnum, remain_time = pc.get_special_ride_vnum()
- if 0 != vnum then
- ride.Ride(vnum, remain_time)
- end
- end
- when 71114.use or 71115.use or 71116.use or 71117.use or
- 71118.use or 71119.use or 71120.use or 71121.use or 71124.use or 71111.use or 71178.use or 71179.use or 71180.use or
- 71125.use or 71126.use or 71127.use or 71128.use or
- 71131.use or 71132.use or 71133.use or 71134.use or
- 71137.use or 71138.use or 71139.use or 71140.use or
- 71141.use or 71142.use or 71161.use or 71164.use or
- 71165.use or 71166.use or 71171.use or 71172.use or
- 71176.use or 71177.use or 52001.use or 52002.use or
- 52003.use or 52004.use or 52005.use or 52006.use or 52007.use or 52008.use or 52009.use or 52010.use or 52011.use or 52012.use or 52013.use or 52014.use or 52015.use or
- 52016.use or 52017.use or 52018.use or 52019.use or 52020.use or 52021.use or 52022.use or 52023.use or 52024.use or 52025.use or 52026.use or 52027.use or 52028.use or 52029.use or 52030.use or
- 52031.use or 52032.use or 52033.use or 52034.use or 52035.use or 52036.use or 52037.use or 52038.use or 52039.use or 52040.use or 52041.use or 52042.use or 52043.use or 52044.use or 52045.use or
- 52046.use or 52047.use or 52048.use or 52049.use or 52050.use or 52051.use or 52052.use or 52053.use or 52054.use or 52055.use or 52056.use or 52057.use or 52058.use or 52059.use or 52060.use or
- 52061.use or 52062.use or 52063.use or 52064.use or 52065.use or 52066.use or 52067.use or 52068.use or 52069.use or 52070.use or 52071.use or 52072.use or 52073.use or 52074.use or 52075.use or
- 52076.use or 52077.use or 52078.use or 52079.use or 52080.use or 52081.use or 52082.use or 52083.use or 52084.use or 52085.use or 52086.use or 52087.use or 52088.use or 52089.use or 52090.use or
- 52091.use or 52092.use or 52093.use or 52094.use or 52095.use or 52096.use or 52097.use or 52098.use or 52099.use or 52100.use or 52101.use or 52102.use or 52103.use or 52104.use or 52105.use or
- 52106.use or 52107.use or 52108.use or 52109.use or 52110.use or 52111.use or 52112.use or 52113.use or 52114.use or 52115.use or 52116.use or 52117.use or 52118.use or 52119.use or 52120.use begin
- if pc.is_polymorphed() then
- syschat("Nu poti calarii in timp ce esti transformat.")
- elseif false == pc.is_riding() then
- if true == horse.is_summon() then
- horse.unsummon()
- end
- ride.Ride(item.vnum, 0)
- else
- pc.unmount()
- end
- end
- end
- end