Tudo que Storm postou
-
Alguem ajuda "erro ao criar itens "paisagens"
Quando for adicionar um tile , em Type coloque Ground e quando for adicionar um objeto deixe None e em Stack Order coloque Bottom
-
Hakcer
function onLogin(cid) local ip = 192132456 -- coloca o IP aqui if getPlayerIp(cid) == ip then doAddIpBanishment(ip) return false end end Registra no login.lua e na XML
-
Hakcer
Deve ser alguma script ; tente criar outro char e por ele de GOD e deletar o antigo.
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
function onTime() local day = {"Tuesday", "Thursday","Saturday"} -- em ingles local itemid = 3456 -- item que sera criado local pos = {x=94, y=126, z=7, stackpos= 1} -- pos onde será criado local newitem = 2768 -- Id do novo item local min = 1 -- minutos de duração do evento if (os.date("%A") == #day) then doRemoveItem(getThingfromPos(pos).uid, 1) addEvent(doCreateItem, 100, itemid, 1, pos) doBroadcastMessage("O evento abriu", 25) addEvent(function() doTransformItem(getThingFromPos(pos).uid, newitem) end, min * 60 * 1000) addEvent(doBroadcastMessage, min * 60 * 1000, "O evento encerrou", 25) end return true end
-
(Resolvido)[DUVIDA] Tile trapp
function onStepIn(cid, item, pos, fromPos) local pid = getCreaturePosition(cid) local itemid = 2768 -- id do item local seg = 60 -- segundos para remover os itens local position1 = {x = pid.x , y = pid.y - 1 , z = pid.z, stackpos = 1} local position2 = {x = pid.x , y = pid.y + 1 , z = pid.z, stackpos = 1} local position3 = {x = pid.x + 1 , y = pid.y , z = pid.z, stackpos = 1} local position4 = {x = pid.x - 1, y = pid.y , z = pid.z, stackpos = 1} local position5 = {x = pid.x - 1 , y = pid.y - 1 , z = pid.z, stackpos = 1} local position6 = {x = pid.x - 1 , y = pid.y + 1 , z = pid.z, stackpos = 1} local position7 = {x = pid.x + 1 , y = pid.y -1 , z = pid.z, stackpos = 1} local position8 = {x = pid.x +1 , y = pid.y +1 , z = pid.z, stackpos = 1} doCreateItem(itemid, 1, position1) doCreateItem(itemid, 1, position2) doCreateItem(itemid, 1, position3) doCreateItem(itemid, 1, position4) doCreateItem(itemid, 1, position5) doCreateItem(itemid, 1, position6) doCreateItem(itemid, 1, position7) doCreateItem(itemid, 1, position8) addEvent(function() doRemoveItem(getThingFromPos(position1).uid, 1) doRemoveItem(getThingFromPos(position2).uid, 1) doRemoveItem(getThingFromPos(position3).uid, 1) doRemoveItem(getThingFromPos(position4).uid, 1) doRemoveItem(getThingFromPos(position5).uid, 1) doRemoveItem(getThingFromPos(position6).uid, 1) doRemoveItem(getThingFromPos(position7).uid, 1) doRemoveItem(getThingFromPos(position8).uid, 1) end, seg * 1000) return true end
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
Tanto faz , oque importa é o horario .
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
@Yamborghini Resolvi o problema function onTime() local day = "Tuesday", "Thursday","Saturday" -- em ingles local itemid = 3456 -- item que sera criado local pos = {x=94, y=126, z=7, stackpos= 1} -- pos onde será criado local newitem = 2768 -- Id do novo item local min = 1 -- minutos de duração do evento if (os.date("%A") == day) then doRemoveItem(getThingfromPos(pos).uid, 1) addEvent(doCreateItem, 100, itemid, 1, pos) doBroadcastMessage("O evento abriu", 25) addEvent(function() doTransformItem(getThingFromPos(pos).uid, newitem) end, min * 60 * 1000) addEvent(doBroadcastMessage, min * 60 * 1000, "O evento encerrou", 25) end return true end
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
Não é um raid e sim um globalevent ; não sei porque está dando esse erro
-
Premium acaba perde house
Você registra na XML e no login.lua você cria um registerEvent
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
Estranho ... esse erro só foi dar agora e antes não .. não tem sentido , eu só adicionei uma linha
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
@Yamborghini -- <globalevent name="Terça" time="14:00" event="script" value="evento.lua"/> -- <globalevent name="Quinta" time="18:00" event="script" value="evento.lua"/> -- <globalevent name="Sabado" time="09:30" event="script" value="evento.lua"/> local day = "Tuesday", "Thursday","Saturday" -- em ingles function onTimer() local itemid = 3456 -- item que sera criado local pos = {x=928, y=1761, z=7, stackpos=1} -- pos onde o item será criado local newitem = 34567 -- Id do novo item local min = 15 -- minutos de duração do evento if (os.date("%A") == config.day) then doRemoveItem(pos, 1) addEvent(doCreateItem, 100, itemid, 1, pos) doBroadcastMessage("O evento abriu", 25) addEvent(doTransformItem, min * 60 * 1000, getThingPos(pos), newitem) addEvent(doBroadcastMessage, min*60*1000, "O evento encerrou", 25) end return true end
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
Como assim ? Explique novamente oq você quer que a script faça.
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
@Yamborghini Perdão pela falta de atenção -- <globalevent name="Terça" time="14:00" event="script" value="evento.lua"/> -- <globalevent name="Quinta" time="18:00" event="script" value="evento.lua"/> -- <globalevent name="Sabado" time="09:30" event="script" value="evento.lua"/> local day = "Tuesday", "Thursday","Saturday" -- em ingles function onTimer() local itemid = 3456 -- item que sera criado local pos = {x=928, y=1761, z=7, stackpos=1} -- pos onde o item será criado local newitem = 34567 -- Id do novo item local min = 15 -- minutos de duração do evento if (os.date("%A") == config.day) then doCreateItem(itemid, 1, pos) doBroadcastMessage("O evento abriu", 25) addEvent(doTransformItem, min * 60 * 1000, getThingPos(pos), newitem) addEvent(doBroadcastMessage, min*60*1000, "O evento encerrou", 25) end return true end
-
Premium acaba perde house
function onLogin(cid) local house = getHouseByPlayerGUID(getPlayerGUID(cid)) if not isPremium(cid) and house then doPlayerSendTextMessage(cid, 27, "Seu premium acabou e você perdeu a house.") setHouseOwner(house, 0) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true end @Thalles Novais
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
@Yamborghini È um globalevent , não testei mas acho que dará certo porque fiz na pressa. -- <globalevent name="Terça" time="14:00" event="script" value="evento.lua"/> -- <globalevent name="Quinta" time="18:00" event="script" value="evento.lua"/> -- <globalevent name="Sabado" time="09:30" event="script" value="evento.lua"/> local day = "Tuesday", "Thursday","Saturday" -- em ingles function onTimer() local itemid = 3456 -- item que sera criado local pos = {x=928, y=1761, z=7, stackpos=1} -- pos onde o item será criado if (os.date("%A") == config.day) then doCreateItem(itemid, 1, pos) doBroadcastMessage("O evento abriu", 25) end return true end
-
(Resolvido)[PEDIDO] Raid de aparecer uma Porta!
Claro é possível sim , farei para você quando eu chegar da aula , caso alguem não faça antes por ser um sistema simples.
-
SCRIPT QUE DOBRE A EXP
È na pasta mods cara , depois você configura nessa parte <action itemid="7440" event="script"><![CDATA[ Certifique que não haja itens com o mesmo ID registrado na XML
-
SCRIPT QUE DOBRE A EXP
@Sotten Tenta essa , coloca na pasta mods <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="Tibiaking.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = TRUE, needlvl = {TRUE, level = 50}, costmana = {TRUE, mana = 300}, addrate = 50, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="7440" event="script"><![CDATA[ domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 62164) >= 1 then return doPlayerSendCancel(cid, "Voce ja ta Sob o Efeito da Potion.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "Voce Precisar ser Premium Para Usar") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "Voce Precisa ser " .. configs.needlvl.level .. " Para usar a Potion.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "Voce Precisar ter " .. configs.costmana.mana .. " de Mana Para usar a Potion") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "Efeito Final da Pocao de EXP.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O Efeito da Pocao vai acabar em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora Voce Esta Recebendo mais EXP por Matar Monstros.") setPlayerStorageValue(cid, 62164, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62164, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62164) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000 , cid, 62164, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62164))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "O Efeito da Potion Termina em.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "O Efeito da Potion Termina em "..a..".") end end return TRUE ]]></creaturescript> </mod>
-
SCRIPT QUE DOBRE A EXP
Você registrou na XML ? qual versão da TFS você usa ?
-
SCRIPT QUE DOBRE A EXP
Qual erro deu ?
-
Bug Em sistema
function onUse(cid, item, itemEx) local info = { speed = 100, storage = 2135, } if not isCreature(cid) then return true end if checkCmd(cid, "mold") then return doPlayerSendCancel(cid, "you cannot running while you are mold chakra.") end if checkCmd(cid, "rest") then return doPlayerSendCancel(cid, "you cannot running while you are resting.") end if getPlayerStorageValue(cid, sto_nara[2]) == 0 then return doPlayerSendCancel(cid, "Sorry this is not possible.") end if(getPlayerStorageValue(cid, sto_jutsu[1]) > os.time() and getPlayerStorageValue(cid, sto_jutsu[1]) < 100+os.time()) then doPlayerSendTextMessage(cid, 24, "Voce ja esta fazendo um jutsu") return true end if checkJutsu(cid, "Kagemane") then return doPlayerSendCancel(cid, "you cannot use jutsu") end if checkJutsu(cid, "Nikudan") then return doPlayerSendCancel(cid, "you cannot use jutsu") end if checkJutsu(cid, "Hari") then return doPlayerSendCancel(cid, "you cannot use jutsu") end if getPlayerStorageValue(cid, sto_gen[1]) == 0 then return doPlayerSendCancel(cid, "Sorry this is not possible.") end if getPlayerStorageValue(cid, temp.storage) >= os.time() then return doPlayerSendCancel(cid, "You are exhausted.") end if not infoClan[getPlayerVocation(cid)] then return doPlayerSendCancel(cid, "You cant use this item.") end if (getCreatureStorage(cid, info.storage) > 0) then if getPlayerStorageValue(cid, 87564) >= 1 then setPlayerStorageValue(cid,87564, 0) doSendMagicEffect(getThingPos(cid), 110) end if getPlayerStorageValue(cid, initStorages.graduation) == "Gennin" then end doPlayerSendCancel(cid, "You are now running.") doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, getCreatureBaseSpeed(cid) + info.speed) setPlayerStorageValue(cid, info.storage, 0) setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted) setPlayerStorageValue(cid, info.storage, 0) else doPlayerSendCancel(cid, "You are already running.") end return true end
-
creaturescripts limite de skill
-- <event type="advance" name="skill" event="script" value="skill.lua"/> -- <event type="login" name="skill2" event="script" value="skill2.lua"/> -- registerCreatureEvent(cid, "skill") -- registerCreatureEvent(cid, "skill2") function onAdvance(cid, skill, oldLevel, newLevel) local t = { -- [id da skill] = {Max = maximo de skill} [SKILL_FIST] = {Max = 100}, [SKILL_SWORD] = {Max = 100}, [SKILL_AXE] = {Max = 100}, [SKILL_CLUB] = {Max = 100}, [SKILL_DISTANCE] = {Max = 100}, [SKILL__MAGLEVEL] = {Max = 100}, [SKILL_FISHING] = {Max = 100}, } local check_skill = t[skill] if check_skill then if newLevel > check_skill.Max then doPlayerSetRate(cid, skill, 0.0) doPlayerSave(cid) setPlayerStorageValue(cid, skill + 1000, 1) return false end end return true end function onLogin(cid) if getPlayerStorageValue(cid, 1000) == 1 then doPlayerSetRate(cid, 0, 0.0) elseif getPlayerStorageValue(cid, 1000 + 1) == 1 then doPlayerSetRate(cid, 1, 0.0) elseif getPlayerStorageValue(cid, 1000 + 2) == 1 then doPlayerSetRate(cid, 2, 0.0) elseif getPlayerStorageValue(cid, 1000 + 3) == 1 then doPlayerSetRate(cid, 3, 0.0) elseif getPlayerStorageValue(cid, 1000 + 4) == 1 then doPlayerSetRate(cid, 4, 0.0) elseif getPlayerStorageValue(cid, 1000 + 5) == 1 then doPlayerSetRate(cid, 5, 0.0) elseif getPlayerStorageValue(cid, 1000 + 6) == 1 then doPlayerSetRate(cid, 6, 0.0) elseif getPlayerStorageValue(cid, 1000 + 7) == 1 then doPlayerSetRate(cid, 7, 0.0) return true end return true end
-
Script
Qual erro está dando nessa script ?
-
SCRIPT QUE DOBRE A EXP
O código já existe, procure melhor no fórum da próxima vez. -- By Luquinha for TibiaKing -- <action itemid="id do item" event="script" value="potionexp.lua"/> local config = { rate = 2, time = 15, -- AQUI É QUANTOS MINUTOS VAI FICAR O DOUBLE storage = 21002 } local function endExpRate(cid) if isPlayer(cid) then doPlayerSetRate(cid, SKILL__LEVEL, 1) setPlayerStorageValue(cid, config.storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "O efeito da Double Exp Potion acabou!") end end function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, config.storage) < 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sua experiencia foi dobrada durante ".. config.time .." minutos.") doSendMagicEffect(getPlayerPosition(cid), 28) doCreatureSay(cid,'Double Experience Actived!', TALKTYPE_ORANGE_1) doPlayerSetRate(cid, SKILL__LEVEL, config.rate) setPlayerStorageValue(cid, config.storage, os.time() + config.time * 60) addEvent(endExpRate, config.time * 60 * 1000, cid) doRemoveItem(item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ainda está sob o efeito da Double Exp Potion, espere acabar o tempo para usa-la novamente.") end return true end
-
[Pedido] Script ao morrer Aol equipado virar outro aumeleto
Tudo bem cara , eu que agradeço. A única coisa que eu peço em troca é a aprendizagem , pois a mesma me da erros em qual eu posso concertar.