Sarck3Imperios Posted May 21, 2013 Report Share Posted May 21, 2013 Bueno con esta quest ud podra ver su staff online Quest. quest teamOnline begin state start begin when letter begin send_letter("Lista_de_Sfaff") end when button or info begin local colorList = {} colorList[0] = color256(220, 10, 10) --Offline colorList[1] = color256(10, 220, 10) --Online local query = m_query("SELECT REPLACE(REPLACE(mName, '[', '('),']', ')') as name, last_play > DATE_SUB(NOW(), INTERVAL 15 MINUTE) and visible = 1 as online FROM common.gmlist INNER JOIN player.player ON player.name = gmlist.mName WHERE visible != -1") local height = 310 raw_script("[WINDOW_SIZE width;350|height;"..height.."]") say_title("Team Lisste Root = Offline | Gruen = Online") if table.getn(query) <= 0 then say("Actualmente no hay nadie disponible") return end for i = 1, table.getn(query) do local row = query[i] local name = row[1] local online = tonumber(row[2]) local color = colorList[online] say(color..name) end end end end Deben crear un .sql llamado (common.gmlist) DROP TABLE IF EXISTS `gmlist`; CREATE TABLE `gmlist` ( `mID` int(10) unsigned NOT NULL AUTO_INCREMENT, `mAccount` varchar(16) NOT NULL DEFAULT '', `mName` varchar(16) NOT NULL DEFAULT '', `mContactIP` varchar(16) NOT NULL DEFAULT '', `mServerIP` varchar(16) NOT NULL DEFAULT 'ALL', `mAuthority` enum('IMPLEMENTOR','HIGH_WIZARD','GOD','LOW_WIZARD','PLAYER') DEFAULT 'PLAYER', `visible` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`mID`) ) Y eso es todo credito epvp my freds Debes iniciar sesión para ver el contenido del enlace en esta publicación. Magnus, Tiburon, Luciano Dagostino and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Rafa23Alzira Posted May 22, 2013 Report Share Posted May 22, 2013 Bueno con esta quest ud podra ver su staff online Quest. quest teamOnline begin state start begin when letter begin send_letter("Lista_de_Sfaff") end when button or info begin local colorList = {} colorList[0] = color256(220, 10, 10) --Offline colorList[1] = color256(10, 220, 10) --Online local query = m_query("SELECT REPLACE(REPLACE(mName, '[', '('),']', ')') as name, last_play > DATE_SUB(NOW(), INTERVAL 15 MINUTE) and visible = 1 as online FROM common.gmlist INNER JOIN player.player ON player.name = gmlist.mName WHERE visible != -1") local height = 310 raw_script("[WINDOW_SIZE width;350|height;"..height.."]") say_title("Team Lisste Root = Offline | Gruen = Online") if table.getn(query) <= 0 then say("Actualmente no hay nadie disponible") return end for i = 1, table.getn(query) do local row = query[i] local name = row[1] local online = tonumber(row[2]) local color = colorList[online] say(color..name) end end end end Deben crear un .sql llamado (common.gmlist) DROP TABLE IF EXISTS `gmlist`; CREATE TABLE `gmlist` ( `mID` int(10) unsigned NOT NULL AUTO_INCREMENT, `mAccount` varchar(16) NOT NULL DEFAULT '', `mName` varchar(16) NOT NULL DEFAULT '', `mContactIP` varchar(16) NOT NULL DEFAULT '', `mServerIP` varchar(16) NOT NULL DEFAULT 'ALL', `mAuthority` enum('IMPLEMENTOR','HIGH_WIZARD','GOD','LOW_WIZARD','PLAYER') DEFAULT 'PLAYER', `visible` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`mID`) ) Y eso es todo credito epvp my freds Debes iniciar sesión para ver el contenido del enlace en esta publicación. El gm_list ya está creado, solo tienes que hacer la columna visible. Luciano Dagostino and mauro corio 2 Quote Link to comment Share on other sites More sharing options...
Yori Posted May 22, 2013 Report Share Posted May 22, 2013 m_query es una funcion creada, asique si no esta la definicion de esa funcion esto no sirve, revisa el post de donde lo sacaste, a ver si hay algo mas Quote Link to comment Share on other sites More sharing options...
Unk3n0w7 Posted October 25, 2014 Report Share Posted October 25, 2014 He hecho todo lo que está en ella, voy a llevar el juego en la quest y nada Quote Link to comment Share on other sites More sharing options...
Unk3n0w7 Posted October 26, 2014 Report Share Posted October 26, 2014 up Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.