Jump to content
Sarck3Imperios

Quest "STAFF "Online"

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...