Premium Jfirewall 280 Posted January 11, 2015 Premium Share Posted January 11, 2015 good day, for days with edward edit the famous premium public system in epvp to give some facilities use. we added some new features that give a noticeable change to the new system use can be premium member now with just a npc dialogue of your choice, be premium member has its benefits January 1 own shop for premium sales (each creates its own items and all), also a second store in which you can use only 5 times when vip member that gives you bonus items with the maximum, you choose the bonus you want to have the item, the randomly generated (configurable). attached some pictures to have more knowledge of what is involved, they can say for improvement in comments or by private message if necessary --[[ Quest: Premium System Version: 1.2 (Game 34k en adelante) ]] quest premium begin state start begin when 20094.chat.'Sistema Premium' begin say_title'Sistema Premium' say(pc.get_name()) say'Hola aca tienes la opcion de poder ser miembo [VIP] de nuestro servidor[ENTER]' say'Con esta opcion tienes la posibilidad de tener nuevos bonus, ademas de nuevas tiendas para tu uso[ENTER]' say'Ademas tu nombre tendra una manera distinta de verse con [VIP], un logo que te ara ver mejor[ENTER]' say'Ademas que cuando hablas podran ver tu rango [VIP], para obtener esto y muchos mas privilegios[ENTER]' say'Deberas cancelar la suma de 50 coins por mes, para poder disfrutar de este sistema.' say_reward'Realmente Quieres obtenerlo?' local elejir = select('Si, Comprarlo', 'Salir') if elejir == 2 then return end if pc.get_coins() < 50 then say_title'Sistema Premium' say(pc.get_name()) say'Lo siento, no tienes los coins suficientes para ser miembo VIP' else say_title'Sistema Premium' say(pc.get_name()) say'FELICIDADES!, de ahora en adelante eres miembro vip de nuestro servidor[ENTER]' say'Usalo bien y con cautela todo estara moritoriado por el staff del servidor.' say'Recibido: bonus de experiencia' pc.change_coins(-50) affect.add(43, 100, 60*60*24) pc.set_vip() end end end end --[[ Quest: Premium System Version: 1.2 (Game 34k en adelante) ]] quest shop_vip begin state start begin when login begin -- aqui yo entiendo que es: cuando se conecta cualquier user, ya le da el premium. Premium.Shop1() end when button or info begin say_title'Sistema Premium' say(pc.get_name()) say'Tienda VIP activa, compra tus objetos unicos' npc.open_shop(3) end end end --[[ Quest: Premium System Version: 1.2 (Game 34k en adelante) ]] quest shop_vip2 begin state start begin when login begin Premium.Shop2() end when button or info begin local items = {19,29,39,49,59}-- vnum items local bonus = { -- puedes agregar mas bonus si lo deseas {1,5000}, -- Max Hp {2,20}, -- Max Sp {3,20}, -- Vitalidad {4,20}, -- Inteligencia {5,20}, -- Fuerza {6,20}, -- Dextreza {7,20}, -- Velocidad de ataque {8,20}, -- Velocidad de Movimiento {9,20}, -- Velocidad Hechizo {10,20}, -- Regeneración de HP {11,20}, -- Regeneración de SP {12,20}, -- Probabilidad de Envenenamiento {13,20}, -- Probabilidad de Apagon {14,20}, -- Probabilidad de Retardo {15,20}, -- Probabilidad de golpes críticos {16,20}, -- Probabilidad de golpes de penetración {17,20}, -- Fuerza Contra MedioHumanos {18,20}, -- Fuerza Contra Animales {19,20}, -- Fuerza Contra Orcos {20,20}, -- Fuerza Contra Misticos {21,20}, -- Fuerza Contra No-muertos {22,20}, -- Fuerza Contra Demonios {23,20}, -- Probabilidad de Absorver HP {24,20}, -- Probabilidad de Absorver SP {25,20}, -- Probabilidad de robar HP {26,20}, -- Probabilidad de recuperar SP al golpear {27,20} -- Posibilidad de bloquear un ataque cuerpo a cuerpo } if pc.getqf('iniciar') <= 5 then say_title'Sistema Premium' say(pc.get_name()) say'Aqui podras obtener un item vip, el cual se te dara al azar.' say'Solo puedes usar 5 veces este metodo.' local aceptar = select('Si, quiero', 'Salir') if aceptar == 2 then return end say_title'Agregar bonus 1' local bonus1 = select('Maximo Hp', 'Maximo Sp', 'Vitalidad', 'Inteligencia', 'Fuerza', 'Dextreza', 'Velocidad de ataque', 'Velocidad de Movimiento', 'Velocidad Hechizo', 'Regeneracion de HP', 'Regeneracion de SP', 'Probabilidad de Envenenamiento', 'Probabilidad de Apagon', 'Probabilidad de Retardo', 'Probabilidad de golpes criticos', 'Probabilidad de golpes de penetracion', 'Fuerza Contra MedioHumanos', 'Fuerza Contra Animales', 'Fuerza Contra Orcos', 'Fuerza Contra Misticos', 'Fuerza Contra No-muertos', 'Fuerza Contra Demonios', 'Probabilidad de Absorver HP', 'Probabilidad de Absorver SP', 'Probabilidad de robar HP', 'Probabilidad de recuperar SP al golpear', 'Posibilidad de bloquear un ataque cuerpo a cuerpo') say_title'Agregar bonus 2' local bonus2 = select('Maximo Hp', 'Maximo Sp', 'Vitalidad', 'Inteligencia', 'Fuerza', 'Dextreza', 'Velocidad de ataque', 'Velocidad de Movimiento', 'Velocidad Hechizo', 'Regeneracion de HP', 'Regeneracion de SP', 'Probabilidad de Envenenamiento', 'Probabilidad de Apagon', 'Probabilidad de Retardo', 'Probabilidad de golpes criticos', 'Probabilidad de golpes de penetracion', 'Fuerza Contra MedioHumanos', 'Fuerza Contra Animales', 'Fuerza Contra Orcos', 'Fuerza Contra Misticos', 'Fuerza Contra No-muertos', 'Fuerza Contra Demonios', 'Probabilidad de Absorver HP', 'Probabilidad de Absorver SP', 'Probabilidad de robar HP', 'Probabilidad de recuperar SP al golpear', 'Posibilidad de bloquear un ataque cuerpo a cuerpo') say_title'Agregar bonus 3' local bonus3 = select('Maximo Hp', 'Maximo Sp', 'Vitalidad', 'Inteligencia', 'Fuerza', 'Dextreza', 'Velocidad de ataque', 'Velocidad de Movimiento', 'Velocidad Hechizo', 'Regeneracion de HP', 'Regeneracion de SP', 'Probabilidad de Envenenamiento', 'Probabilidad de Apagon', 'Probabilidad de Retardo', 'Probabilidad de golpes criticos', 'Probabilidad de golpes de penetracion', 'Fuerza Contra MedioHumanos', 'Fuerza Contra Animales', 'Fuerza Contra Orcos', 'Fuerza Contra Misticos', 'Fuerza Contra No-muertos', 'Fuerza Contra Demonios', 'Probabilidad de Absorver HP', 'Probabilidad de Absorver SP', 'Probabilidad de robar HP', 'Probabilidad de recuperar SP al golpear', 'Posibilidad de bloquear un ataque cuerpo a cuerpo') say_title'Agregar bonus 4' local bonus4 = select('Maximo Hp', 'Maximo Sp', 'Vitalidad', 'Inteligencia', 'Fuerza', 'Dextreza', 'Velocidad de ataque', 'Velocidad de Movimiento', 'Velocidad Hechizo', 'Regeneracion de HP', 'Regeneracion de SP', 'Probabilidad de Envenenamiento', 'Probabilidad de Apagon', 'Probabilidad de Retardo', 'Probabilidad de golpes criticos', 'Probabilidad de golpes de penetracion', 'Fuerza Contra MedioHumanos', 'Fuerza Contra Animales', 'Fuerza Contra Orcos', 'Fuerza Contra Misticos', 'Fuerza Contra No-muertos', 'Fuerza Contra Demonios', 'Probabilidad de Absorver HP', 'Probabilidad de Absorver SP', 'Probabilidad de robar HP', 'Probabilidad de recuperar SP al golpear', 'Posibilidad de bloquear un ataque cuerpo a cuerpo') say_title'Agregar bonus 5' local bonus5 = select('Maximo Hp', 'Maximo Sp', 'Vitalidad', 'Inteligencia', 'Fuerza', 'Dextreza', 'Velocidad de ataque', 'Velocidad de Movimiento', 'Velocidad Hechizo', 'Regeneracion de HP', 'Regeneracion de SP', 'Probabilidad de Envenenamiento', 'Probabilidad de Apagon', 'Probabilidad de Retardo', 'Probabilidad de golpes criticos', 'Probabilidad de golpes de penetracion', 'Fuerza Contra MedioHumanos', 'Fuerza Contra Animales', 'Fuerza Contra Orcos', 'Fuerza Contra Misticos', 'Fuerza Contra No-muertos', 'Fuerza Contra Demonios', 'Probabilidad de Absorver HP', 'Probabilidad de Absorver SP', 'Probabilidad de robar HP', 'Probabilidad de recuperar SP al golpear', 'Posibilidad de bloquear un ataque cuerpo a cuerpo') pc.give_item2_select(items[math.random(1,5)]) -- si agregas mas items debes modificar el numero 4 asta el numero mayor de items agregados item.set_value(0,bonus[bonus1][1],bonus[bonus1][2]) item.set_value(1,bonus[bonus2][1],bonus[bonus2][2]) item.set_value(2,bonus[bonus3][1],bonus[bonus3][2]) item.set_value(3,bonus[bonus4][1],bonus[bonus4][2]) item.set_value(4,bonus[bonus5][1],bonus[bonus5][2]) pc.setqf('iniciar', pc.getqf('iniciar') + 1) else say_title'Sistema Premium' say(pc.get_name()) say'Lo siento, ya lo usaste mas de 5 veces' say'compra premium item para volver a utilizar este metodo otras 5 veces' end end when 40002.use begin say_title'Sistema Premium' say(pc.get_name()) say'Al usar este item premium obtienes la posibilidad de 5 nuevos items nuevos, con los bonus al azar' say'Usalo cuando lo veas necesario es un item bastante valioso' pc.setqf('iniciar', 0) end end end questlib --[[ Quest: Premium System Version: 1.2 (Game 34k en adelante) ]] Premium = Premium or {} function Premium.Shop1() cmdchat("tiendita1 "..q.getcurrentquestindex()) end function Premium.Shop2() cmdchat("tiendita2 "..q.getcurrentquestindex()) end function pc.change_coins(x) mysql_query("UPDATE account.account SET coins=coins+'"..x.."' WHERE id='"..pc.get_account_id().."' LIMIT 1") end function pc.get_coins() local a = mysql_query("select * from account.account where id ='"..pc.get_account_id().."' LIMIT 1") return a.coins[1] end function pc.set_vip() local nombre = pc.get_name() mysql_query("UPDATE player.player SET name='[VIP]"..nombre.."' WHERE account_id='"..pc.get_account_id().."' LIMIT 1") end function pc.give_item2_select(...) local tmp = { ['Alt']={}, ['Neu']={} } for i =0,89 do item.select_cell(i) if not tmp.Alt[item.get_id()] then tmp.Alt[item.get_id()] = i end end if table.getn(arg)< 2 then pc.give_item2(arg[1]) else pc.give_item2(arg[1],arg[2]) end for i =0,89 do item.select_cell(i) if not tmp.Neu[item.get_id()] then tmp.Neu[item.get_id()] = i end end local data = {{},{}} for id,slot in next,tmp.Alt do table.insert(data[1],slot) end for id,slot in next,tmp.Neu do table.insert(data[2],slot) end table.sort(data[1]);table.sort(data[2]) for i = 1,table.getn(data[1]) do for i = 1,table.getn(data[2]) do if data[1][i] ~= data[2][i] then item.select_cell(data[2][i]) return end end end end part client game.py class GameWindow(ui.ScriptWindow): def __init__(self, stream): self.lastupdate = 0 self.lastupdatee = 0 onPressKeyDict[app.DIK_F6] = lambda : self.__premium() def OnUpdate(self): premiumvip = player.GetName() if app.GetGlobalTimeStamp() - self.lastupdate < 0: self.lastupdate = app.GetGlobalTimeStamp() if app.GetGlobalTimeStamp() - self.lastupdatee < 0: self.lastupdatee = app.GetGlobalTimeStamp() if premiumvip.find("[VIP]")!=-1: if self.lastupdate == 0: self.lastupdate = app.GetGlobalTimeStamp() if app.GetGlobalTimeStamp() - self.lastupdate >= 60: self.lastupdate = app.GetGlobalTimeStamp() net.SendEmoticon(12) def __ServerCommand_Build(self): serverCommandList={ # sistema vip 'tiendita1' : self.__tienda1, 'tiendita2' : self.__tienda2, # end sistema vip def __premium(self): import uipremium self.fire = uipremium.Premium() self.fire.Show() def __tienda1(self, tienda1vip): import event,constInfo constInfo.SHOP1 = int(tienda1vip) def __tienda2(self, tienda2vip): import event,constInfo constInfo.SHOP2 = int(tienda2vip) you create uipremium.py and add import ui,uiCommon,item,player class Premium(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.Fire() def __del__(self): ui.ScriptWindow.__del__(self) def Fire(self): self.Board = ui.BoardWithTitleBar() self.Board.SetSize(220, 280) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("Panel Premium") self.Board.SetCloseEvent(self.Close) self.Board.Show() self.cancelar = ui.Button() self.cancelar.SetParent(self.Board) self.cancelar.SetPosition(135,250) self.cancelar.SetUpVisual('d:/ymir work/ui/game/windows/tab_button_small_01.sub') self.cancelar.SetOverVisual('d:/ymir work/ui/game/windows/tab_button_small_02.sub') self.cancelar.SetDownVisual('d:/ymir work/ui/game/windows/tab_button_small_03.sub') self.cancelar.SetText("Cancelar") self.cancelar.SetEvent(ui.__mem_func__(self.Close)) self.cancelar.Show() self.refrescar = ui.Button() self.refrescar.SetParent(self.Board) self.refrescar.SetPosition(90,250) self.refrescar.SetUpVisual('d:/ymir work/ui/game/windows/tab_button_small_01.sub') self.refrescar.SetOverVisual('d:/ymir work/ui/game/windows/tab_button_small_02.sub') self.refrescar.SetDownVisual('d:/ymir work/ui/game/windows/tab_button_small_03.sub') self.refrescar.SetText("Refrescar") self.refrescar.SetEvent(ui.__mem_func__(self.__refrescar)) self.refrescar.Show() self.aceptar = ui.Button() self.aceptar.SetParent(self.Board) self.aceptar.SetPosition(45,250) self.aceptar.SetUpVisual('d:/ymir work/ui/game/windows/tab_button_small_01.sub') self.aceptar.SetOverVisual('d:/ymir work/ui/game/windows/tab_button_small_02.sub') self.aceptar.SetDownVisual('d:/ymir work/ui/game/windows/tab_button_small_03.sub') self.aceptar.SetEvent(ui.__mem_func__(self.__Premium)) self.aceptar.SetText("Aceptar") self.aceptar.Show() self.fileListBox = ui.ListBoxEx() self.fileListBox.SetParent(self.Board) self.fileListBox.SetPosition(20, 50) self.fileListBox.Show() self.ScrollBar = ui.ScrollBar() self.ScrollBar.SetParent(self.Board) self.ScrollBar.SetPosition(190, 35) self.ScrollBar.SetScrollBarSize(220) self.fileListBox.SetScrollBar(self.ScrollBar) self.fileListBox.AppendItem(Item("Abrir Tienda VIP")) self.fileListBox.AppendItem(Item("Obtener Items VIP")) self.ScrollBar.Show() def Close(self): self.Board.Hide() self.ScrollBar.Hide() self.fileListBox.Hide() def __refrescar(self): self.fileListBox.Hide() self.fileListBox.Show() def __Premium(self): premiumvip = player.GetName() elItem=self.fileListBox.GetSelectedItem() if premiumvip.find("[VIP]")!=-1: if elItem: alcanzado=elItem.GetText() if alcanzado =="Abrir Tienda VIP": import event,constInfo event.QuestButtonClick(constInfo.SHOP1) elif alcanzado =="Obtener Items VIP": import event,constInfo event.QuestButtonClick(constInfo.SHOP2) else: self.PopupMessage = uiCommon.PopupDialog() self.PopupMessage.SetWidth(200) self.PopupMessage.SetText("No Seleccionaste ninguna opcion") self.PopupMessage.Show() else: self.PopupMessage = uiCommon.PopupDialog() self.PopupMessage.SetWidth(200) self.PopupMessage.SetText("No Seleccionaste ninguna opcion") self.PopupMessage.Show() else: self.PopupMessage = uiCommon.PopupDialog() self.PopupMessage.SetWidth(200) self.PopupMessage.SetText("Lo siento, no eres miembro VIP") self.PopupMessage.Show() class Item(ui.ListBoxEx.Item): def __init__(self, fileName): ui.ListBoxEx.Item.__init__(self) self.canLoad=0 self.text=fileName self.textLine=self.__CreateTextLine(fileName[:40]) def __del__(self): ui.ListBoxEx.Item.__del__(self) def GetText(self): return self.text def SetSize(self, width, height): ui.ListBoxEx.Item.SetSize(self, 6*len(self.textLine.GetText()) + 4, height) def __CreateTextLine(self, fileName): textLine=ui.TextLine() textLine.SetParent(self) textLine.SetPosition(0, 0) textLine.SetText(fileName) textLine.Show() return textLine constinfo.py SHOP1 = 0 SHOP2 = 0 playersettingmodule.py add chrmgr.RegisterEffect(chrmgr.EFFECT_EMOTICON+12, "", EmoticonStr+"vip_mark.mse") net.RegisterEmoticonString("(vip)") you add emoticon in ymir workeffectetcemoticon attached emoticon and uiquest.py thanks Sema, Rafa, Edward https://mega.co.nz/#!RI8lnDqa!7kALkS7T2URo-U2o08WKbIoyTnev6yLJTPzieb_qoLc 1 9 Link to comment Share on other sites More sharing options...
Premium Galet 514 Posted January 11, 2015 Premium Share Posted January 11, 2015 Thanks Link to comment Share on other sites More sharing options...
guy12 1 Posted January 13, 2015 Share Posted January 13, 2015 (edited) Any1 add this to his server succesfully? Because i have error with "tiendita1" in client after addeded vip system. But meaybe i try and give myself secound chance to add this xd I like this + @Update I succesfully add this but i have only small problem. Why sometimes i see more than 1 vip image? Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium Jfirewall 280 Posted January 14, 2015 Author Premium Share Posted January 14, 2015 1.tiendita1 you create shop if add in my server 2.exist bug if you put on armor remove the logo the fix is update for logo using a time if app.GetGlobalTimeStamp() - self.lastupdate >= 60: edit time 60 = 1 minut Link to comment Share on other sites More sharing options...
tuguinham2 0 Posted February 2, 2015 Share Posted February 2, 2015 Good, someone could give me a little help now and not tried adding'm daring. Link to comment Share on other sites More sharing options...
Premium Jfirewall 280 Posted February 7, 2015 Author Premium Share Posted February 7, 2015 What is the problem ? Link to comment Share on other sites More sharing options...
Sr.Agente 24 Posted August 14, 2015 Share Posted August 14, 2015 0814 14:54:53564 :: File "ui.py", line 1024, in CallEvent 0814 14:54:53564 :: File "game.py", line 2061, in __premium 0814 14:54:53564 :: File "system.py", line 130, in __pack_import 0814 14:54:53564 :: File " 0814 14:54:53564 :: <string> 0814 14:54:53565 :: ", line 0814 14:54:53565 :: 130 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: return textLine 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: 0814 14:54:53565 :: ^ 0814 14:54:53565 :: SyntaxError 0814 14:54:53565 :: : 0814 14:54:53565 :: invalid syntax 0814 14:54:53565 :: What I'm doing wrong? Link to comment Share on other sites More sharing options...
Kykla 0 Posted September 16, 2015 Share Posted September 16, 2015 Update link, the link is not working, the file is deleted Link to comment Share on other sites More sharing options...
arseniuskav 0 Posted October 15, 2015 Share Posted October 15, 2015 update link please?? Link to comment Share on other sites More sharing options...
thespeedy 20 Posted October 22, 2015 Share Posted October 22, 2015 reup? Link to comment Share on other sites More sharing options...
Bituse 61 Posted November 3, 2015 Share Posted November 3, 2015 someone reupload please. Link to comment Share on other sites More sharing options...
Zorke 1 Posted December 1, 2016 Share Posted December 1, 2016 Hello , this script premiumvip = player.GetName() if app.GetGlobalTimeStamp() - self.lastupdate < 0: self.lastupdate = app.GetGlobalTimeStamp() if app.GetGlobalTimeStamp() - self.lastupdatee < 0: self.lastupdatee = app.GetGlobalTimeStamp() if premiumvip.find("[VIP]")!=-1: if self.lastupdate == 0: self.lastupdate = app.GetGlobalTimeStamp() if app.GetGlobalTimeStamp() - self.lastupdate >= 60: self.lastupdate = app.GetGlobalTimeStamp() net.SendEmoticon(12) make a more than one logo i use this: if premiumvip.find("[VIP]")!=-1 and self.lastupdate==0: self.lastupdate = 1 net.SendEmoticon(12) but i have a bug if i put on armor remove , but if i teleport anywhere the logo can see again , this script make better. Good Luck, Zorke. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now