Ir para conteúdo
  • Cadastre-se

Posts Recomendados

[25/09/2014 04:20:45] Kabo Flow has logged in.
[25/09/2014 04:20:45] mysql_real_query(): SELECT `acesstime` FROM `guilds` WHERE `id` = 2 - MYSQL ERROR: Unknown column 'acesstime' in 'field list' (1054)
 
[25/09/2014 04:20:45] [Error - CreatureScript Interface] 
[25/09/2014 04:20:45] data/creaturescripts/scripts/GuildFragsLogin.lua:onLogin
[25/09/2014 04:20:45] Description: 
[25/09/2014 04:20:45] [string "frag_guild = {..."]:49: attempt to perform arithmetic on a nil value
[25/09/2014 04:20:45] stack traceback:
[25/09/2014 04:20:45] [string "frag_guild = {..."]:49: in function 'getDaysAcess'
[25/09/2014 04:20:45] [string "frag_guild = {..."]:53: in function 'HaveAcess'
[25/09/2014 04:20:45] data/creaturescripts/scripts/GuildFragsLogin.lua:9: in function <data/creaturescripts/scripts/GuildFragsLogin.lua:1>
[25/09/2014 04:20:45] Kabo Flow has logged out.

iTRMWRP.png

Link para o post
Compartilhar em outros sites

ty duda sanada :3

 

 

teno error em shopsystem 

 

items chegan a player muitos ele compra um item cada 10 seg chega otro mais y mais  :,(

 

 

              <globalevent name="shop" interval="30" script="shop.lua"/>

 

-- ### CONFIG ###


-- message send to player by script "type" (types you can check in "global.lua")
SHOP_MSG_TYPE = 19
-- time (in seconds) between connections to SQL database by shop script
SQL_interval = 30
-- ### END OF CONFIG ###
function onThink(interval, lastExecution)
local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';")
if(result_plr:getID() ~= -1) then
while(true) do
id = tonumber(result_plr:getDataInt("id"))
action = tostring(result_plr:getDataString("action"))
delete = tonumber(result_plr:getDataInt("delete_it"))
cid = getCreatureByName(tostring(result_plr:getDataString("name")))
if isPlayer(cid) == TRUE then
local itemtogive_id = tonumber(result_plr:getDataInt("param1"))
local itemtogive_count = tonumber(result_plr:getDataInt("param2"))
local container_id = tonumber(result_plr:getDataInt("param3"))
local container_count = tonumber(result_plr:getDataInt("param4"))
local add_item_type = tostring(result_plr:getDataString("param5"))
local add_item_name = tostring(result_plr:getDataString("param6"))
local received_item = 0
local full_weight = 0
if add_item_type == 'container' then
full_weight = getItemWeightById(itemtogive_id, 1)
end
local free_cap = getPlayerFreeCap(cid)
if full_weight <= free_cap then
if add_item_type == 'container' then
local new_container = doCreateItemEx(container_id, 1)
local iter = 0
while iter ~= container_count do
doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
iter = iter + 1
end
received_item = doPlayerAddItemEx(cid, new_container)
else
local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
received_item = doPlayerAddItemEx(cid, new_item)
end
if received_item == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.')
db.escapeString("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
db.escapeString("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
doPlayerSave(cid)
end
end
end
if not(result_plr:next()) then
break
end
end
result_plr:free()
end
return TRUE
end


help :S ajuda plisss

iTRMWRP.png

Link para o post
Compartilhar em outros sites

TFS 0.3.6 = 

​<globalevent name="shop" interval="30" event="script" value="shop.lua"/>

TFS 0.4 

​<globalevent name="shop" interval="30000" event="script" value="shop.lua"/>

 

-- ### CONFIG ###
-- message send to player by script "type" (types you can check in "data/lib/000-constants.CODE=LUA")
SHOP_MSG_TYPE = MESSAGE_STATUS_CONSOLE_BLUE
-- time (in seconds) between queries to MySQL database by shop script
SQL_interval = 30
-- ### END OF CONFIG ###
function onThink(interval, lastExecution)
	local result_plr = db.getResult("SELECT * FROM `z_ots_comunication` WHERE `type` = 'login';")
	if(result_plr:getID() ~= -1) then
		while(true) do
			id = tonumber(result_plr:getDataInt("id"))
			action = tostring(result_plr:getDataString("action"))
			delete = tonumber(result_plr:getDataInt("delete_it"))
			cid = getCreatureByName(tostring(result_plr:getDataString("name")))
			if isPlayer(cid) == TRUE then
				local itemtogive_id = tonumber(result_plr:getDataInt("param1"))
				local itemtogive_count = tonumber(result_plr:getDataInt("param2"))
				local container_id = tonumber(result_plr:getDataInt("param3"))
				local container_count = tonumber(result_plr:getDataInt("param4"))
				local add_item_type = tostring(result_plr:getDataString("param5"))
				local add_item_name = tostring(result_plr:getDataString("param6"))
				local received_item = 0
				local full_weight = 0
				if add_item_type == 'container' then
					container_weight = getItemWeightById(container_id, 1)
					if isItemRune(itemtogive_id) == TRUE then
						items_weight = container_count * getItemWeightById(itemtogive_id, 1)
					else
						items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count)
					end
					full_weight = items_weight + container_weight
				else
					full_weight = getItemWeightById(itemtogive_id, itemtogive_count)
					if isItemRune(itemtogive_id) == TRUE then
						full_weight = getItemWeightById(itemtogive_id, 1)
					else
						full_weight = getItemWeightById(itemtogive_id, itemtogive_count)
					end
				end
				local free_cap = getPlayerFreeCap(cid)
				if full_weight <= free_cap then
					if add_item_type == 'container' then
						local new_container = doCreateItemEx(container_id, 1)
						doItemSetAttribute(new_container, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].')
						doItemSetAttribute(new_container, "tid", id)
						local iter = 0
						while iter ~= container_count do
							local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
							doItemSetAttribute(new_item, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].')
							doItemSetAttribute(new_item, "tid", id)
							doAddContainerItemEx(new_container, new_item)
							iter = iter + 1
						end
						received_item = doPlayerAddItemEx(cid, new_container)
					else
						local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
						doItemSetAttribute(new_item, "description", 'Bought by ' .. getCreatureName(cid) .. ' [ID:' .. id .. '].')
						doItemSetAttribute(new_item, "tid", id)
						received_item = doPlayerAddItemEx(cid, new_item)
					end
					if received_item == RETURNVALUE_NOERROR then
						doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.')
						doPlayerSave(cid)
						db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
						db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
					else
						doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.')
					end
				else
					doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.')
				end
			end
			if not(result_plr:next()) then
				break
			end
		end
		result_plr:free()
	end
	return true
end

 

Se for TFS 0.4 troque onde esta db.executeQuery por db.query no código acima.

Link para o post
Compartilhar em outros sites

ty duda sanada :*


Error

 

ajuda 

 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'players.exphist_lastexp' in 'order clause'' in D:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\exphist.php:21 Stack trace: #0 D:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\exphist.php(21): PDO->query(' SELECT * FROM ...') #1 D:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\index.php(82): include('D:\Documents an...') #2 {main} thrown in D:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\exphist.php on line 21

Editado por kaboflow (veja o histórico de edições)

iTRMWRP.png

Link para o post
Compartilhar em outros sites

@kaboflow,

ALTER TABLE `players` ADD `exphist_lastexp` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist1` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist2` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist3` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist4` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist5` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist6` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `exphist7` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetimetoday` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetime1` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetime2` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetime3` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetime4` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetime5` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetime6` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetime7` BIGINT( 255 ) NOT NULL DEFAULT '0',
ADD `onlinetimeall` BIGINT( 255 ) NOT NULL DEFAULT '0'; 
Link para o post
Compartilhar em outros sites

luanluciano93

 

graças homem que me ajudou muito: 3

 

 

Eu quero a conta de acomodar isso, não para baixo como você acomodar isso?

 

 

2ztc5lu.png

iTRMWRP.png

Link para o post
Compartilhar em outros sites
General Information
 
Email Address: [email protected] Created: 1 January 1970, 0:00:00 Last Login: 30 September 2014, 13:22:33 Account Status: Premium Account, 6 days left Vip Status: VIP, 1422202226 Time left Registered: No
 
 
 
 
 
 

 

 

 

 

 

 

 

 

 VIP Days Picture Description Select product 15 15 Vip Days (150 points)
15 Dias Vip.
for 150 points 30 30 Days Vip (300 points)
30 Dias Vips.
for 300 points 60 60 Days Vip (600 points)
60 Dias Vips.
for 600 points 90 90 Days Vip (900 points)
90 Dias Vips.
for 900 points 120 120 Days Vip (1200 points)
120 Dias Vips.
for 1200 points
 

 

 

 

 

120 Days Vip..

 

Ta Dando 10002391203012390 Days :,(

 

 

initialize.js

 

/** ------------------------------------------------------------------


* JavaScripts which are loaded by the OnLoad function of the body tag
* -------------------------------------------------------------------
*/

// executes JavaScripts for the loginbox and the menu
function InitializePage() {
LoadLoginBox();
LoadMenu();
}

// functions for mouse-over and click events of non-content-buttons
function MouseOverBigButton(source)
{
source.firstChild.style.visibility = "visible";
}
function MouseOutBigButton(source)
{
source.firstChild.style.visibility = "hidden";
}

/** ---------------------
* Loginbox functionality
* ----------------------
*/

// initialisation of the loginbox status by the value of the variable 'loginStatus' which is provided to the HTML-document by PHP in the file 'header.inc'
function LoadLoginBox()
{
if(loginStatus == "false") {
document.getElementById('LoginstatusText_1').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-you-are-not-logged-in.gif')";
document.getElementById('ButtonText').style.backgroundImage = "url('" + IMAGES + "/buttons/_sbutton_login.gif')";
document.getElementById('LoginstatusText_2').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-create-account.gif')";
document.getElementById('LoginstatusText_2_1').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-create-account.gif')";
document.getElementById('LoginstatusText_2_2').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-create-account-over.gif')";
} else {
document.getElementById('LoginstatusText_1').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-welcome.gif')";
document.getElementById('ButtonText').style.backgroundImage = "url('" + IMAGES + "/buttons/_sbutton_myaccount.gif')";
document.getElementById('LoginstatusText_2').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-logout.gif')";
document.getElementById('LoginstatusText_2_1').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-logout.gif')";
document.getElementById('LoginstatusText_2_2').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-logout-over.gif')";
}
}

// mouse-over and click events of the loginbox
function MouseOverLoginBoxText(source)
{
source.lastChild.style.visibility = "visible";
source.firstChild.style.visibility = "hidden";
}
function MouseOutLoginBoxText(source)
{
source.firstChild.style.visibility = "visible";
source.lastChild.style.visibility = "hidden";
}
function LoginButtonAction()
{
if(loginStatus == "false") {
window.location = LINK_ACCOUNT + "/?subtopic=accountmanagement";
} else {
window.location = LINK_ACCOUNT + "/?subtopic=accountmanagement";
}
}
function LoginstatusTextAction(source) {
if(loginStatus == "false") {
window.location = LINK_ACCOUNT + "/?subtopic=createaccount";
} else {
window.location = LINK_ACCOUNT + "/?subtopic=accountmanagement&action=logout";
}
}

/** ------------------
* Menu functionality
* ------------------
*/

var menu = new Array();
menu[0] = new Object();
var unloadhelper = false;

// load the menu and set the active submenu item by using the variable 'activeSubmenuItem' (provided to HTML-document by PHP in the file 'header.inc'
function LoadMenu()
{
document.getElementById("submenu_"+activeSubmenuItem).style.color = "white";
document.getElementById("ActiveSubmenuItemIcon_"+activeSubmenuItem).style.visibility = "visible";
if(self.name.lastIndexOf("&") == -1) {
self.name = "news=1&account=0&community=0&library=0&forum=0&shops=0&";
}
FillMenuArray();
InitializeMenu();
}
function SaveMenu()
{
if(unloadhelper == false) {
SaveMenuArray();
unloadhelper = true;
}
}

// store the values of the variable 'self.name' in the array menu
function FillMenuArray()
{
while(self.name.length > 0 ){
var mark1 = self.name.indexOf("=");
var mark2 = self.name.indexOf("&");
var menuItemName = self.name.substr(0, mark1);
menu[0][menuItemName] = self.name.substring(mark1 + 1, mark2);
self.name = self.name.substr(mark2 + 1, self.name.length);
}
}

// hide or show the corresponding submenus
function InitializeMenu()
{
for(menuItemName in menu[0]) {
if(menu[0][menuItemName] == "0") {
document.getElementById(menuItemName+"_Submenu").style.visibility = "hidden";
document.getElementById(menuItemName+"_Submenu").style.display = "none";
document.getElementById(menuItemName+"_Lights").style.visibility = "visible";
document.getElementById(menuItemName+"_Extend").style.backgroundImage = "url(" + IMAGES + "/general/plus.gif)";
}
else {
document.getElementById(menuItemName+"_Submenu").style.visibility = "visible";
document.getElementById(menuItemName+"_Submenu").style.display = "block";
document.getElementById(menuItemName+"_Lights").style.visibility = "hidden";
document.getElementById(menuItemName+"_Extend").style.backgroundImage = "url(" + IMAGES + "/general/minus.gif)";
}
}
}

// reconstruct the variable "self.name" out of the array menu
function SaveMenuArray()
{
var stringSlices = "";
var temp = "";
for(menuItemName in menu[0]) {
stringSlices = menuItemName + "=" + menu[0][menuItemName] + "&";
temp = temp + stringSlices;
}
self.name = temp;
}

// onClick open or close submenus
function MenuItemAction(sourceId)
{
if(menu[0][sourceId] == 1) {
CloseMenuItem(sourceId);
}
else {
OpenMenuItem(sourceId);
}
}
function OpenMenuItem(sourceId)
{
menu[0][sourceId] = 1;
document.getElementById(sourceId+"_Submenu").style.visibility = "visible";
document.getElementById(sourceId+"_Submenu").style.display = "block";
document.getElementById(sourceId+"_Lights").style.visibility = "hidden";
document.getElementById(sourceId+"_Extend").style.backgroundImage = "url(" + IMAGES + "/general/minus.gif)";
}
function CloseMenuItem(sourceId)
{
menu[0][sourceId] = 0;
document.getElementById(sourceId+"_Submenu").style.visibility = "hidden";
document.getElementById(sourceId+"_Submenu").style.display = "none";
document.getElementById(sourceId+"_Lights").style.visibility = "visible";
document.getElementById(sourceId+"_Extend").style.backgroundImage = "url(" + IMAGES + "/general/plus.gif)";
}

// mouse-over effects of menubuttons and submenuitems
function MouseOverMenuItem(source)
{
source.firstChild.style.visibility = "visible";
}
function MouseOutMenuItem(source)
{
source.firstChild.style.visibility = "hidden";
}
function MouseOverSubmenuItem(source)
{
source.style.backgroundColor = "#14433F";
}
function MouseOutSubmenuItem(source)
{
source.style.backgroundColor = "#0D2E2B";
}


/** -------------------------
* functions related to forms
* --------------------------
*/

// set cursor focus in form (g_FormName) to field (g_FieldName)
function SetFormFocus()
{
if (g_FormName.length > 0 && g_FieldName.length > 0 ) {
document.forms[g_FormName].elements[g_FieldName].focus();
}
}


// toggle masked texts with readable texts
function ToggleMaskedText(a_TextFieldID)
{
m_DisplayedText = document.getElementById('Display' + a_TextFieldID).innerHTML;
m_MaskedText = document.getElementById('Masked' + a_TextFieldID).innerHTML;
m_ReadableText = document.getElementById('Readable' + a_TextFieldID).innerHTML;
if (m_DisplayedText == m_MaskedText) {
document.getElementById('Display' + a_TextFieldID).innerHTML = document.getElementById('Readable' + a_TextFieldID).innerHTML;
document.getElementById('Button' + a_TextFieldID).src = IMAGES + '/general/hide.gif';
} else {
document.getElementById('Display' + a_TextFieldID).innerHTML = document.getElementById('Masked' + a_TextFieldID).innerHTML;
document.getElementById('Button' + a_TextFieldID).src = IMAGES + '/general/show.gif';
}
}

Editado por kaboflow (veja o histórico de edições)

iTRMWRP.png

Link para o post
Compartilhar em outros sites

Edite aqui: self.name = "news=1&account=0&community=0&library=0&forum=0&shops=0&";

 

Siga a mesma ordem das abas do site e adicione se faltar ... 

Sobre os dias vips, a coluna é dada em segundos na database, ou seja, voce precisa pegar a váriavel dos dias, e dividi-lá ($days = $vip_time / (60 * 60 * 24))

Caso tenha dúvidas pesquisa ou comente aqui.

 

Link para o post
Compartilhar em outros sites

os Days vip onde ??

 

modifico iso mano?

 

 

Edite aqui: self.name = "news=1&account=0&community=0&library=0&forum=0&shops=0&";

 

 

eu quero trocar asim

 

2vj65w5.png

 

no asim..

 

10fpb4h.png

iTRMWRP.png

Link para o post
Compartilhar em outros sites

ok mano sabe como fijar 

 

Guild Wars? sytem? teno na pag pro 

 

cuando o players logean nao logea :,(

iTRMWRP.png

Link para o post
Compartilhar em outros sites

 

@kaboflow

http://www.tibiaking.com/forum/topic/8827-war-system-guild-war-com-escudos-completo/ 

 

 

 

 

sim ele me da error :,( na ora de logear..

iTRMWRP.png

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo