Solutions
-
poko360's post in (Resolvido)Ajuste em Script de DNT was marked as the answerfunction timeString(timeDiff) local dateFormat = { {"day", timeDiff / 60 / 60 / 24}, {"hour", timeDiff / 60 / 60 % 24}, {"minute", timeDiff / 60 % 60}, {"second", timeDiff % 60} } local out = {} for k, t in ipairs(dateFormat) do local v = math.floor(t[2]) if(v > 0) then table.insert(out, (k < #dateFormat and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or '')) end end local ret = table.concat(out) if ret:len() < 16 and ret:find("second") then local a, b = ret:find(" and ") ret = ret:sub(b+1) end return ret end function onSay(cid, words, param) if(words == "!donater") then if doPlayerRemoveItem(cid, 9663, 1) == TRUE then local days = 30 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 457382) local timenow = os.time() if getPlayerStorageValue(cid, 457382) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de DNT no seu character.") setPlayerStorageValue(cid, 457382, time) local quantity = math.floor((getPlayerStorageValue(cid, 457382) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem ".. quantity .." dias de DNT restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce precisa do item Donater Acess para usar este comando.") end elseif(words == "!donaterdays") then local time = timeString(-(os.time() - getPlayerStorageValue(cid, 457382))) local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 457382) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem ".. time .." de DNT no seu character.") elseif(words == "/adddonater") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(t[1]) local name = getCreatureName(player) local days = t[2] local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(player, 457382) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de DNT no seu character.") setPlayerStorageValue(player, 457382, time) local quantity = math.floor((getPlayerStorageValue(player, 457382) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Voce tem "..quantity.." dias de DNT restantes.") end return true end testa ai, e me fala
-
poko360's post in (Resolvido)Client 8.60 was marked as the answersó abrir o ObjectBuilder e jogar no seu cliente proprio
female.obdmale.obd
-
poko360's post in (Resolvido)Talkaction que checa quantidade de certo item was marked as the answerola, use a tag:
-
poko360's post in (Resolvido)[AJUDA] Script de porta sem acesso MC was marked as the answereu tenho um movement [SQM] , vc pode adaptar ele pra action facilmente
-
poko360's post in (Resolvido)Piso que muda de cor was marked as the answerta na mao meu patrão
coloque em "pisoesquerda" o sqm que vai checar (a cor do piso), o script é bem facil, se nao entender so falar
-
poko360's post in (Resolvido)BUG memoria e CPU do cloud alguem me ajuda pldm was marked as the answerresolvido
-
poko360's post in (Resolvido)existe algum db.executequery pra remover addons ao logar? was marked as the answernao po, se eu colocar uma função no outfit.xml ele vai desativar a outfit completa, nao só os addons em si
oque eu quero fazer, é remover os addons quando o player tiver free, so isso
EDIT: Consegui, resolvido
doCreatureChangeOutfit(cid, {lookType = 128, lookHead = 78, lookBody = 68, lookLegs = 39, lookFeet = 76, lookTypeEx = 0, lookAddons = 0})
-
poko360's post in (Resolvido)BUG ALETA SIO/ALETA SOM was marked as the answer@theeusata55
@Emanueldk
improvisei... coloquei pro player ser kikado e teleportado pro templo na hora de dar o !leavehouse, dai nao tem como de forma alguma de fazer o bug
script do !leavehouse
-
poko360's post in (Resolvido)Player com Exaust para atacar ao logar was marked as the answerola, procure esta linha no seu config.lua
coloque 0 , que o problema é resolvido
-
poko360's post in (Resolvido)Globalevents executando 2x seguidas was marked as the answerRESOLVIDO !
-
poko360's post in (Resolvido)[Resolvido] Como fazer quest diária? was marked as the answercrie um globalevent com interval e coloque isso, é só colocar a storage que vai remover e botar interval 86400 ou tu bota um function OnTimer se quiser que seja por hora exata.
nao fiz o script, eu peguei de um cara que me ajudou
-
poko360's post in (Resolvido)if getPlayerStorageValue(cid, storage) was marked as the answerConsegui resolver, eu sou muito burro :c
era só colocar entre parenteses o "Finished"
Solução:
if getPlayerStorageValue(cid, storage) == "Finished" then
-
poko360's post in (Resolvido)Barra de VIDA/MANA por % (Porcento) ajuda was marked as the answerSegue o link abaixo do distro de porcentagem
http://www.4shared.com/rar/cjrL3FjZba/TheForgottenServer-console__2_.html?cau2=403tNull&ua=WINDOWS 1 - baixe
2 - exatraia
3 - copie pra sua pasta
4 - abra com esse distro
=]
-
poko360's post in (Resolvido)BroadCast (Player) was marked as the answerlocal config = { storage = 19400, -- storage em que será salvo o tempo cor = "green", -- de acordo com o constant.lua da lib tempo = 1, -- em minutos price = 100000, -- preço pra usar o broadcast level = 500 -- level pra poder utilizar o broadcast } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveMoney(cid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*60)) doBroadcastMessage("[/all] "..getCreatureName(cid)..": "..param.."", config.cor) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You have successfully sent a broadcast, now you'll have to wait " ..config.tempo.. " minute(s) until you broadcast again.") else doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return true end else doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return true end else doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") end end
-
poko360's post in (Resolvido)Save was marked as the answerva em data/globalevents/Scripts/Save.lua
local config = { broadcast = "yes" } config.broadcast = getBooleanFromString(config.broadcast) local function executeSave(seconds) if(seconds == 0) then doSaveServer() return true end if(seconds == 30 or seconds == 10) then doBroadcastMessage("Server save em " .. seconds .. " segundos, se prepare para 1 breve lag!", 22) end seconds = seconds - 10 if(seconds >= 0) then addEvent(executeSave, 10 * 1000, seconds) end end function onThink(interval, lastExecution, thinkInterval) if(not config.broadcast) then doSaveServer() return true end executeSave(120) return true end em globalevents.xml
<globalevent name="save" interval="1800" event="script" value="save.lua"/> /save no god
va em talkactions/script/save
local savingEvent = 0 function onSay(cid, words, param, channel) if(isNumber(param)) then stopEvent(savingEvent) save(tonumber(param) * 60 * 1000) else doSaveServer() end return true end function save(delay) doSaveServer() if(delay > 0) then savingEvent = addEvent(save, delay, delay) end end depois va em talkactions.xml e coloque isso
<talkaction log="yes" words="/save" access="3" event="script" value="save.lua"/> -
poko360's post in (Resolvido)[Spells] Juntar script sem bugar ajuda was marked as the answereu fiz de outra forma, eu colocoquei isso aqui que voce mencionou la emcima
setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
setCombatCallback(combat3, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
ja resolvi! obrigado REP+