
Sadness
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
Sadness recebeu reputação de Gabrielx17 em Shop Gesior Errorlocal SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGE local SQL_interval = 30 --- ### Outfits List ### local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["noblewoman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={336}, ["wayfarer"]={366}, ["afflicted"]={431}, ["elementalist"]={433}, ["deepling"]={464}, ["insectoid"]={466}, ["red baron"]={471}, ["crystal warlord"]={513}, ["soil guardian"]={514}, ["demon"]={542} } local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["noblewoman"]={132}, ["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={335}, ["wayfarer"]={367}, ["afflicted"]={430}, ["elementalist"]={432}, ["deepling"]={463}, ["insectoid"]={465}, ["red baron"]={472}, ["crystal warlord"]={512}, ["soil guardian"]={516}, ["demon"]={541} } function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getPlayerByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local outfit_name = string.lower(tostring(result_plr:getDataString("param3"))) local itemvip = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local points = tonumber(result_plr:getDataInt("param7")) local received_item = 0 local full_weight = 0 if(action == 'give_item') then 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 local free_cap = getPlayerFreeCap(cid) local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) if full_weight <= free_cap then if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << RELOGUE PARA SALVAR URGENTE.') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("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(action == 'give_outfit') then if outfit_name ~= "" and maleOutfits[outfit_name] and femaleOutfits[outfit_name] then local add_outfit = getPlayerSex(cid) == 0 and femaleOutfits[outfit_name][1] or maleOutfits[outfit_name][1] if not canPlayerWearOutfit(cid, add_outfit, 3) then db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) doPlayerAddOutfit(cid, add_outfit, 3) doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, "You received the outfit " .. add_item_name .. " of our Shop Online.") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, "You already have this outfit. Your points were returned, thank you.") db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") end end end end if not(result_plr:next()) then break end end result_plr:free() end return true end Testa esse aí.
-
Sadness recebeu reputação de Maxxx em (Resolvido)Remover [VIP] do nome do playerRetire esta linha:
doRemoveCreature(cid) -
Sadness recebeu reputação de Maxxx em (Resolvido)Remover [VIP] do nome do playerTente retirar esta linha:
db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(player)..";") doRemoveCreature(player) -
Sadness deu reputação a Danihcv em [TUTORIAL] Resolvendo qualquer erro na data baseOpa, galerinha do TK, pro meu primeiro tutorial resolvi fazer uma solução de um problema que desde que cheguei no TK, vejo que ocorre com uma certa frequência. Os erros da data base.
Neste tutorial vou ensinar a resolver os erros do tipo No such table, Insert into, No such column, ... has no column named... etc.
1°) NO SUCH TABLE
Bom, para o erro No such table, basta vc visualizar qual table está faltando. Para isso basta ler o erro na distro:
No caso da imagem, está faltando a table: player_statements
Para resolver este e qualquer outro problema deste tipo, caso sua data base seja sqlite,
basta abrir sua data base pelo Sqlite Studio(download: http://sqlitestudio.pl/?act=download) e clicar em Open SQL query editor:
Mas caso sua data base seja Mysql abra pelo phpMyadmin, ou por outro editor de sua preferencia.
1.1°) EXECUTANDO OS COMANDOS PARA RESOLVER O PROBLEMA
Bom, dependendo da table que estiver faltando, vc irá colocar seu respectivo comando, segue abaixo TODOS os comandos básicos necessários para que sua data base fique Ok! : (VC VAI PEGAR O COMANDO REFERENTE À TABLE QUE VC QUER!!!)
account_viplist
Sqlite
accounts
Sqlite
bans
Sqlite
environment_killers
Sqlite
global_storage
Sqlite
guild_invites
Sqlite
guild_kills
Sqlite
guild_ranks
Sqlite
guild_wars
Sqlite
guilds
Sqlite
house_auctions
Sqlite
house_data
Sqlite
house_lists
Sqlite
houses
Sqlite
killers
Sqlite
market_history
Sqlite
market_offers
Sqlite
player_deaths
Sqlite
player_depotitems
Sqlite
player_inboxitems
Sqlite
player_items
Sqlite
player_killers
Sqlite
player_namelocks
Sqlite
player_skills
Sqlite
player_spells
Sqlite
player_statements
Sqlite
player_storage
Sqlite
player_viplist
Sqlite
players
Sqlite
server_config
Sqlite
server_motd
Sqlite
server_record
Sqlite
server_reports
Sqlite
tile_items
Sqlite
tile_store
Sqlite
tiles
Sqlite
announcements
Sqlite
pagsegurotransacoes
Sqlite
player_advances
Sqlite
reports
Sqlite
thanks
Sqlite
z_bug_logs
Sqlite
z_featured_article
Sqlite
z_forum
Sqlite
z_helpdesk
Sqlite
z_monsters
Sqlite
z_network_box
Sqlite
z_news_tickers
Sqlite
z_ots_comunication
Sqlite
z_polls
Sqlite
z_polls_answers
Sqlite
z_poll_votes
Sqlite
z_shop_history_item
Sqlite
z_shop_history_pacc
Sqlite
z_shop_offer
Sqlite
z_spells
Sqlite
z_news_big
Sqlite
2°) No such column / "NOME DA TABLE" has no column named "NOME DA COLUMN QUE FALTA" / Insert into
Bom, para resolver esse problema vc deve identificar em qual TABLE está essa coluna que falta. Para isso, basta ler o erro como na imagem:
No caso da imagem, está faltando a column WORLD_ID dentro da table MARKET_OFFERS. Para resolver, vc deve executar excluir a sua table MARKET_OFFERS existante em sua data base, e em seguida, executar o domando da da market_offers, encontrado acima, logicamente isso só se aplica ao caso da imagem, depende do seu caso, vc deve excutar o comando da table que estiver sendo referida no erro. Mas antes de executá-lo vc deve excluir a sua table EXISTENTE, para então executar o comando.
ESTA FORMA DE RESOLUÇÃO SE APLICA AOS TRÊS CASOS: NO SUCH COLUMN, ...HAS NO COLUMN NAMED... e INSERT INTO.
Bom galera, é isso.
SE ENCONTRAREM, OU SE DEPARAREM COM ALGUM ERRO, BASTA ME PEDIR AJUDA QUE EU DAREI TOTAL SUPORTE PARA VOCÊS!
SE ESTIVR FALTANDO MAIS ALGUMA TABLE QUE EU NÃO COLOQUEI AQUI, PF ME INFORMEM E EU ATUALIZAREI O TÓPICO!!!
Lembrem-se, se eu te ajudei, por favor, deem REP++ pois foi meio trabolhoso fazer este tutorial todo...
ESTOU A DISPOSIÇÃO DE TODOS! Tanto por PM quanto por SKYPE, e até mesmo por aqui, pois vou checar este tópico regularmente!!
Espero ter ajudado!!
Abraços.
-
Sadness recebeu reputação de Zard em [Duvida] Colocando Spells no jogo.Na pasta data -> Spells -> scripts
Aí coloca á tag no spells.xml
-
Sadness recebeu reputação de Tricoder em (Resolvido)Erro no BANEu segui este tópico -> http://www.tibiaking.com/forum/topic/25569-talkaction-ban-system-96/
Fiz pelo MOD.
Eu também não sabia que havia pessoas como você por aqui
-
Sadness recebeu reputação de Tricoder em (Resolvido)Erro no BANMoro sim no c1 - Já resolvi, obrigado por me ajudar 2x
-
Sadness deu reputação a Tricoder em (Resolvido)Erro no BANOi de novo! kk Não sei se vai resolver, mas tente executando em Sqlitestudio > Open SQL query editor:
DROP TABLE IF EXISTS player_statements; CREATE TABLE player_statements ( id INTEGER PRIMARY KEY, player_id INTEGER NOT NULL, channel_id INTEGER NOT NULL DEFAULT '0', text VARCHAR( 255 ) NOT NULL, date INTEGER NOT NULL DEFAULT '0', FOREIGN KEY ( player_id ) REFERENCES players ( id ) ); -
Sadness recebeu reputação de Tricoder em (Resolvido)Erro na SQLObrigadoooooo.
-
Sadness deu reputação a Tricoder em (Resolvido)Erro na SQLTente executar isso em Sqlitestudio > Open SQL query editor
DROP TABLE IF EXISTS guild_wars; CREATE TABLE guild_wars ( id INTEGER NOT NULL, guild_id INT NOT NULL, enemy_id INT NOT NULL, begin BIGINT NOT NULL DEFAULT '0', end BIGINT NOT NULL DEFAULT '0', frags INT NOT NULL DEFAULT '0', payment BIGINT NOT NULL DEFAULT '0', guild_kills INT NOT NULL DEFAULT '0', enemy_kills INT NOT NULL DEFAULT '0', status TINYINT( 1 ) NOT NULL DEFAULT '0', PRIMARY KEY ( id ), FOREIGN KEY ( guild_id ) REFERENCES guilds ( id ), FOREIGN KEY ( enemy_id ) REFERENCES guilds ( id ) ); -
Sadness deu reputação a Kurwanuss em (Resolvido)Área PVPFaz Como Se Você Fosse Adicionar Essa Zona Mas Segure O CTRL.
-
Sadness deu reputação a Qwizer em Erro Stack e Bueiros.<!-- Teleport (stairs, ladders) -->
<action itemid="430;1369;1386;3678;5543;8580;8599;10035;13010" event="script" value="other/teleport.lua"/>
teleport.lua
depois em actions/lib/actions.lua troque ou adicione por: