
Tudo que Vodkart postou
-
sistema de patente
mas isso é php
-
Ajuda sistema vip
function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getPlayerStorageValue(cid, 33339) - os.time() <= 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "voce precisa ser vip") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "seja vem vindo.") return true end
-
Ajuda sistema vip
sim testa, vc disse que seu vip é pelo premdays la na db, premdays = premium normal kk é em movements aid do tile é 25550
-
Ajuda sistema vip
function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if not isPremium(cid) then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "voce precisa ser vip") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "seja vem vindo.") return true end <movevent type="StepIn" actionid="25550" event="script" value="nome do seu script.lua"/>
-
NPC que troca itens
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Para encantar o item eh necessario um silver token. Me diga o nome do item a ser encantado 'Carving ' , 'Mayhem ' ou 'Remedy'"}) local player = Player(cid) if isInArray({"blade of carving"}, msg) then npcHandler:say("Voce quer encantar sua blade em troca de um silver token?", cid) npcHandler.topic[cid] = 1 elseif msgcontains(msg, 'yes') and npcHandler.topic[cid] == 1 then npcHandler.topic[cid] = 0 if player:getItemCount(25959) <= 0 or player:getItemCount(25172) <= 0 then npcHandler:say("Desculpe, voce precisa de uma blade e um silver token", cid) return true end player:removeItem(25959, 1) player:removeItem(25172, 1) player:addItem(25962, 1) npcHandler:say("Esta entregue o seu novo item.", cid) elseif msgcontains(msg, 'no') and npcHandler.topic[cid] == 1 then npcHandler.topic[cid] = 0 npcHandler:say("Ok then.", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Alguma alma acolhedora pode me ajudar?
acho que está função não existe no seu distro 'useRewardChest' link do sistema pra vc instalar passo a passo: https://otland.net/threads/reward-chest-boss-reward-tfs-1-2.238554/
-
Ajuda sistema vip
posta o script do item que adiciona o vip
-
Script Morte
hospitaltp.lua function onLogin(cid) local pos = {{x = 10, y = 10, z = 7},{x = 12, y = 12, z = 7},{x = 13, y = 13, z = 7},{x = 14, y = 14, z = 7}} -- defina as pos if getPlayerStorageValue(cid, 789963) > 0 then doTeleportThing(cid, pos[math.random(1, #pos)]) setPlayerStorageValue(cid, 789963, 0) end registerCreatureEvent(cid, "DeathHospital") return true end function onDeath(cid, corpse, deathList) if isPlayer(cid) then setPlayerStorageValue(cid, 789963, 1) end return true end TAG <event type="death" name="DeathHospital" event="script" value="hospitaltp.lua"/> <event type="login" name="LoginHospital" event="script" value="hospitaltp.lua"/>
-
Script Morte
function onLogin(cid) local pos = {{x = 10, y = 10, z = 7},{x = 12, y = 12, z = 7},{x = 13, y = 13, z = 7},{x = 14, y = 14, z = 7}} -- defina as pos if getPlayerStorageValue(cid, 789963) > 0 then doTeleportThing(cid, pos[math.random(1, #pos)]) setPlayerStorageValue(cid, 789963, 0) end return true end function onDeath(cid, corpse, deathList) if isPlayer(cid) then setPlayerStorageValue(cid, 789963, 1) end return true end
-
Premium Gift By Account
@up nova conta
-
3 dias VIPs ao Logar pela primeira vez
vc nem executou a query na db
-
3 dias VIPs ao Logar pela primeira vez
@ZikaLord Desculpe, mas não faço ou dou suporte para script's de Spells!! Não é que eu não queira fazer... É porque eu não sei mexer mesmo
-
Premium Gift By Account
Resumo: Código funciona para distribuir Premium Account para jogadores que recém criaram a conta, uma forma de beneficiar e usufruir das vantagens de serem Premium no seu servidor! Execute no seu banco de dados ALTER TABLE `accounts` ADD `premiumgift` INT NOT NULL DEFAULT '0' e no seu script do onLogin use desta maneira: function onLogin(cid) local days = 3 if db.getResult("SELECT `premiumgift` FROM `accounts` WHERE `id` = "..getPlayerAccountId(cid)):getDataInt("premiumgift") <= 0 then doPlayerAddPremiumDays(cid, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua account acabou de receber "..days.." dias de premium, boa diversão!") db.executeQuery("UPDATE `accounts` SET `premiumgift` = 1 WHERE `id` = "..getPlayerAccountId(cid)) end return true end
-
3 dias VIPs ao Logar pela primeira vez
executa no seu bando de dados: ALTER TABLE `accounts` ADD `premiumgift` INT NOT NULL DEFAULT '0' e usa seu script assim: function onLogin(cid) local days = 3 if db.getResult("SELECT `premiumgift` FROM `players` WHERE `id = "..getPlayerGUID(cid)):getDataInt("premiumgift") <= 0 then doPlayerAddPremiumDays(cid, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua account acabou de receber "..days.." dias de premium, boa diversão!") db.executeQuery("UPDATE `accounts` SET `premiumgift` = 1 WHERE `id` = "..getPlayerAccountId(cid)) end return true end
-
[Pedido/Ajuda] Rank por Storage
troca 'INTEGER' por 'SIGNED' function getRankStorage(value, max, RankName) local str = "--[".. (RankName == nil and "RANK STORAGE" or ""..RankName.."") .."]--\n\n" local query = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..value.." ORDER BY cast(value as SIGNED) DESC;") if (query:getID() ~= -1) then k = 1 repeat str = str .. "\n " .. k .. ". "..getPlayerNameByGUID(query:getDataString("player_id")).." - [" .. query:getDataInt("value") .. "]" k = k + 1 until k > max or not query:next() end return str end function onSay(cid, words, param) local storage = 15000 -- valor da storage local max = 10 -- quantos jogadores irao aparecer no rank local name = "Rank Of Quest" -- nome que vai aparecer no rank return doShowTextDialog(cid, 2529, getRankStorage(storage, max, name)) end
-
[Urgente] bug vocaçoes virando outras vocaçoes
como que eles mudam de vocation? npc ou talkactions? e perde a voc como? quando desloga? ou durante o game?
-
(Resolvido)broadcast apenas pra quem tem storage
coloquei para mandar a mensagem dizendo que a propria guild estaria dominando o proprio castelo, totalmente sem nexo. usa aquele último script que postei e sucesso para seu servidor :D
-
(Resolvido)broadcast apenas pra quem tem storage
tem certeza? fiz algo de proposito aí, te garanto que não ta funcionando corretamente enfim eu coloquei 'cid' para mandar o nome da guild que está dominando, ou seja, vai mandar a mensagem dizendo que a própria guild está dominando? meio sem nexo, não é mesmo? Queria ver como você testava seus códigos '-' function MsgGuildPlayersCastle(msg) for _, tid in pairs(getPlayersOnline()) do if getPlayerGuildId(tid) > 0 and getPlayerGuildName(tid) == getGlobalStorageValue(COH_STATUS) then doPlayerSendTextMessage(tid, MESSAGE_STATUS_WARNING, msg) end end return true end function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "[CoH]", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você nao pertence a guild "..getGlobalStorageValue(COH_STATUS)..".") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!") setGlobalStorageValue(COH_PREPARE1, -1) setGlobalStorageValue(COH_PREPARE2, -1) setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid)) doCastleRemoveEnemies() doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estao no comando do castelo, va dominar e impedir isso!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[Castle of Honor] Voce nao possui uma guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "[CoH]", math.random(1, 255)) -- primeiro tile -- if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) then MsgGuildPlayersCastle("[Castle of Honor] Atencao! A guild "..getPlayerGuildName(cid).." esta tentando dominar o castelo, preparem-se!") setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[Castle of Honor] Voce nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "[CoH]", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then MsgGuildPlayersCastle("[Castle of Honor] Atençao! A guild "..getPlayerGuildName(cid).." esta muito proxima do domíinio, ataquem!") setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid)) end end return true end
-
(Resolvido)broadcast apenas pra quem tem storage
function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "[CoH]", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você nao pertence a guild "..getGlobalStorageValue(COH_STATUS)..".") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!") setGlobalStorageValue(COH_PREPARE1, -1) setGlobalStorageValue(COH_PREPARE2, -1) setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid)) doCastleRemoveEnemies() doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estao no comando do castelo, va dominar e impedir isso!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[Castle of Honor] Voce nao possui uma guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "[CoH]", math.random(1, 255)) -- primeiro tile -- if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) then for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildId(cid) > 0 and getPlayerGuildName(cid) == getGlobalStorageValue(COH_STATUS) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "[Castle of Honor] Atencao! A guild "..getPlayerGuildName(cid).." esta tentando dominar o castelo, preparem-se!") end end setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[Castle of Honor] Voce nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "[CoH]", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildId(cid) > 0 and getPlayerGuildName(cid) == getGlobalStorageValue(COH_STATUS) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "[Castle of Honor] Atençao! A guild "..getPlayerGuildName(cid).." esta muito proxima do domíinio, ataquem!") end end setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid)) end end return true end
-
(Resolvido)broadcast apenas pra quem tem storage
ah ta, agora você explicou, você quer que manda a mensagem para todos daquela guild? no caso a que está sendo dominada né? me manda seu script com as modificações que você fez!
-
(Resolvido)broadcast apenas pra quem tem storage
ai você usa o seu script original, sem nenhuma alteração kk que já mandava a mensagem em broadCast
-
(Resolvido)broadcast apenas pra quem tem storage
que estranho veja bem: if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then local leader = getGuildLeaderName(getGlobalStorageValue(COH_PREPARE1)) local player = getPlayerByName(leader) if player then doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, "[Castle of Honor] Atencao! A guild "..getPlayerGuildName(cid).." esta tentando dominar o castelo, preparem-se!") end setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) end ele está mandando mensagem para o lider da guild, que está na storage global 'COH_PREPARE1' então ele manda mensagem pro lider(atual) e depois que manda a mensagem é que é trocada a storage(ai passa o nome da guild na storage) setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid))
-
(Resolvido)broadcast apenas pra quem tem storage
arrumei agr esqueci de deletar uma coisa, tenta agr
-
(Resolvido)broadcast apenas pra quem tem storage
function getGuildLeaderName(GuildName) -- function by vodkart local leader = db.getResult("SELECT `players`.`name` FROM `players` WHERE `players`.`id` = (SELECT `guilds`.`ownerid` FROM `guilds` WHERE `guilds`.`name` = ".. db.escapeString(GuildName) .. ")") if(leader:getID() ~= -1) then return leader:getDataString("name") end return nil end function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "[CoH]", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você nao pertence a guild "..getGlobalStorageValue(COH_STATUS)..".") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!") setGlobalStorageValue(COH_PREPARE1, -1) setGlobalStorageValue(COH_PREPARE2, -1) setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid)) doCastleRemoveEnemies() doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estao no comando do castelo, va dominar e impedir isso!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[Castle of Honor] Voce nao possui uma guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "[CoH]", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then local leader = getGuildLeaderName(getGlobalStorageValue(COH_PREPARE1)) local player = getPlayerByName(leader) if player then doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, "[Castle of Honor] Atencao! A guild "..getPlayerGuildName(cid).." esta tentando dominar o castelo, preparem-se!") end setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[Castle of Honor] Voce nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "[CoH]", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then local leader = getGuildLeaderName(getGlobalStorageValue(COH_PREPARE2)) local player = getPlayerByName(leader) if player then doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, "[Castle of Honor] Atençao! A guild "..getPlayerGuildName(cid).." esta muito proxima do domíinio, ataquem!") end setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid)) end end return true end
-
Ajuda a colocar tempo no script
local dolls = { [11256] = {pet = "Crystal Spider"}, [11207] = {pet = "Ashmunrah"}, [11144] = {pet = "Demon"}, [9019] = {pet = "Vampire"}, } local store,exausted = 156249,30 --------------------------------------------------- function onUse(cid, item, fromPosition, itemEx, toPosition) local go = dolls[item.itemid] local summon = getCreatureSummons(cid) if not go then return true end if getPlayerStorageValue(cid, store) >= os.time() then return doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.") end if #summon >= 1 then for _, pid in ipairs(summon) do doRemoveCreature(pid) doCreatureSay(cid, "Can go rest ["..go.pet.."]", TALKTYPE_ORANGE_1) end return true end setPlayerStorageValue(cid, store, os.time()+exausted) doConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid))) doCreatureSay(cid, "Let battle ["..go.pet.."]", TALKTYPE_ORANGE_1) return true end