TekaZudo
seuserver.com.br
DESCRIÇÃO
Anuncie aqui neste countdown e dê maior visibilidade ao seu lançamento |
Full Global • Custom Quests • Custom Outfits • Lottery System • Version 15x
Inicia em:
--
Participar
Histórico de Curtidas
-
dsoares15 recebeu reputação de Kageyama em PokeGhost ProjectO s3db ja é o arquivo para abrir com banco de dados local, caso tenha o arquivo configurado corretamente, mas se não me engano a database disponibilizada nesse server é mysql
EDIT:
-- Database -- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database. -- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value. sqlType = "mysql" --mysql (site) ou sqlite (local) sqlHost = "localhost" -- padrao sqlPort = 3306 -- padrao sqlUser = "root" -- usuario do banco de dados se na maioria das vezes root padrão alterar quando online pra geral sqlPass = "" -- senha do banco de dados se na maioria das vezes root padrão alterar quando online pra geral sqlDatabase = "database" sqlFile = "Imperium.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "sha1" -
dsoares15 deu reputação a Vodkart em NPC Premiun Pointsse eu nao me engano em 2012 fiz um npc disso... achei o link na otland
function getAccountPoints(cid) local res = db.getResult('select `premium_points` from accounts where name = \''..getPlayerAccount(cid)..'\'') return res:getDataInt("premium_points") < 0 and 0 or res:getDataInt("premium_points") end function doAccountRemovePoints(cid, count) return db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. getAccountPoints(cid) - count .."' WHERE `name` ='"..getPlayerAccount(cid).."'") end
o npc:
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local shopWindow = {} local t = { [2195] = 1, [2493] = 25, [2361] = 30, [8851] = 20, [8925] = 30, [2640] = 50, [2494] = 100, [9932] = 50, [2472] = 70, [8931] = 100 } local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if t[item] and getAccountPoints(cid) < t[item] then selfSay("You need "..t[item].." points to buy this item.", cid) else doAccountRemovePoints(cid, t[item]) doPlayerAddItem(cid, item) selfSay("Here your item!", cid) end return true end if (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE'))then for var, ret in pairs(t) do table.insert(shopWindow, {id = var, subType = 0, buy = ret, sell = 0, name = getItemNameById(var)}) end openShopWindow(cid, shopWindow, onBuy, onSell) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
dsoares15 recebeu reputação de ITALOx em NPC Premiun Pointsmals ae