
-
-
-
-
(Resolvido)Effecs Aparecendo Errado
Isso acontece pq seu servidor tem limite de 255 effects
-
-
[OPEN-SOURCE] PokeChampions
Source além de ser uma gambiarra , contém traps e foi jogada em cima de um servidor com mais erros ainda ... tópico denunciado.
-
-
Bike system
Olá galera , do TibiaKing , venho trazer pra vocês um bike sistem por movements. QUAL A DIFERENÇA DESSE SISTEMA PARA O ANTIGO ? ( POR ACTIONS) Esse sistema evita aquele famoso bug do player dar use na bike e jogar pra outro amigo dar use , fazendo os dois terem bike. COMO ESSE SISTEMA FUNCIONA ?? Funciona por movements , ao equipar( no slot do ring[configurável]) ganha a outfit e a speed ( configuráveis) XML <movevent type="Equip" itemid="2195" slot="ring" event="script" value="bike.lua"/> <movevent type="DeEquip" itemid="2195" slot="ring" event="script" value="bike.lua"/> SCRIPT local bike = {lookType = 100, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser Homen local bike1 = {lookType = 101, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser mulher local speed = 20 --- Velocidade que a bike dará local storage = 3421 function onEquip(cid, item, slot) if not isPlayer(cid) and not isPremium(cid) then -- tire o primeiro not, atras do isPlayer para ativar o premium doPlayerSendCancel(cid, "Only premium members are allowed to mount.") return true end if getPlayerSex(cid) == 1 then -- Homem doChangeSpeed(cid, speed) doSetCreatureOutfit(cid, bike, -1) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, storage, 1) elseif getPlayerSex(cid) == 0 then -- Girl doChangeSpeed(cid, speed) doSetCreatureOutfit(cid, bike1, -1) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, storage, 1) end return true end function onDeEquip(cid, item, slot) doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -speed) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, storage, 0) end
-
Ajuda, velocidade da bike ao montar
function onUse(cid, item, frompos, itemEx, topos) local bike = {lookType = 738, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser Homen local bike1 = {lookType = 737, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser mulher local speed = 20 --- Velocidade que a bike terá. if isPlayer(cid) and not isPremium(cid) and premium == true then doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Only premium accounts can mount.") return true end if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_RING).uid then doPlayerSendCancel(cid, "Put in the correct slot.") return true end if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "Dismount your pokemon to ride.") return true end if getPlayerStorageValue(cid, 32001) == 1 then doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -speed) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, 32001, -1) else local base = getCreatureBaseSpeed(cid) if getPlayerSex(cid) == 1 then -- homem doChangeSpeed(cid, base + speed) doSetCreatureOutfit(cid, bike, -1) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, 32001, 1) elseif getPlayerSex(cid) == 0 then -- homem doChangeSpeed(cid, base + speed) doSetCreatureOutfit(cid, bike1, -1) doSendMagicEffect(getPlayerPosition(cid), 18) setPlayerStorageValue(cid, 32001, 1) end end return true end
-
-
-
Daily Reward (8.6)
local storage = 3234 local horas = 24 -- tempo para pegar dnv em horas local tabela = {2160, 2152, 2148} -- ID dos itens. function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, config.storage) >= os.time() then doPlayerSendTextMessage(cid,25, "voce so pode pegar a cada 24 horas") return true end setPlayerStorageValue(cid, config.storage, os.time() + horas * 3600000 ) doPlayerAddItem(cid, tabela[math.random(#tabela)], 1) doSendMagicEffect(getCreaturePosition(cid), 2) doPlayerSendTextMessage(cid,25, "voce recebeu seu premio") return true end
-
[SCRIPT] Erro speed não sai
Já testei em meu próprio otserver , a ultima script que postei aqui está funcionando 100%.
-
[SCRIPT] Erro speed não sai
function Normal(cid) local vel = 200 -- velocidade que o player ganhou ao usar a Spell doChangeSpeed(cid, -vel) end function onCastSpell(cid, var) local mninja = {lookType = 377, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local fninja = {lookType = 368, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local second = 10000 local speed = 200 local sex = getPlayerSex(cid) local tempo = 10 -- segundos para voltar a speed normal if sex == 0 then doSetCreatureOutfit(cid, fninja, second) doChangeSpeed(cid, speed) addEvent(Normal, tempo * 1000, cid) else doSetCreatureOutfit(cid, mninja, second) doChangeSpeed(cid, speed) addEvent(Normal, tempo * 1000, cid) end return true end
-
[SCRIPT] Erro speed não sai
function Normal(cid) doRegainSpeedLevel(cid) end function onCastSpell(cid, var) local mninja = {lookType = 377, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local fninja = {lookType = 368, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local second = 10000 local speed = 200 local sex = getPlayerSex(cid) local tempo = 10 -- segundos para voltar a speed normal if sex == 0 then doSetCreatureOutfit(cid, fninja, second) doChangeSpeed(cid, speed) addEvent(Normal, tempo * 1000, cid) else doSetCreatureOutfit(cid, mninja, second) doChangeSpeed(cid, speed) addEvent(Normal, tempo * 1000, cid) end return true end
-
[MOVEMENTS/ACTION]: Sistema de bike
local storage = 243656 -- Coloque a Storage Que Controla o Sistema de Bike function onDeEquip(cid, item, slot) if getPlayerStorageValue(cid, storage) = 1 then doPlayerSendCancel(cid, "Voce nao pode remover a bike enquanto esta montado.") return false end end
-
[SCRIPT] Erro speed não sai
function Normal(cid) local base = getCreatureBaseSpeed(cid) doChangeSpeed(cid, base) end function onCastSpell(cid, var) local mninja = {lookType = 377, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local fninja = {lookType = 368, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local second = 10000 local speed = 200 local sex = getPlayerSex(cid) local tempo = 10 -- segundos para voltar a speed normal if sex == 0 then doSetCreatureOutfit(cid, fninja, second) doChangeSpeed(cid, speed) addEvent(Normal, tempo * 1000, cid) else doSetCreatureOutfit(cid, mninja, second) doChangeSpeed(cid, speed) addEvent(Normal, tempo * 1000, cid) end return true end
-
request LEVER + MONSTER + STORAGETIME
Yes, it is action, but it is not for 5 players and nor does it summon any monster, each player to be teleported has to pull the lever once every 24 hours
-
request LEVER + MONSTER + STORAGETIME
local config = { storage = 9844, -- storage days = 1 -- days to use a lever } function onUse(cid, item, frompos, item2, topos) local teleport = {x=986, y=926, z=7} -- Coordinates to where the player will be teleported. if getPlayerStorageValue(cid, config.storage) >= os.time() then doPlayerSendTextMessage(cid,25, string.format('You can teleport after %d day%s', config.days, config.days ~= 1 and "s" or "")) return true end doPlayerSendTextMessage(cid, 25, string.format('Congratulations! You you are teleported, you can get your item after %d day%s', config.days, config.days ~= 1 and "s" or "")) setPlayerStorageValue(cid, config.storage, os.time() + config.days * 86400) doTeleportThing(cid, teleport) doSendMagicEffect(getCreaturePosition(cid), 2) return true end
-
Addons com efeitos
Como a script não é da TFS 1.3 , não ia funcionar mesmo. Tentei adaptar , teste a script function onLogin(cid) creature:registerEvent(cid, "EffectOutLogin") creature:registerEventt(cid, "OutfitEffects") return creature:setOutfit(cid,{lookType = creature:getOutfit(cid).lookType, lookHead = creature:getOutfit(cid).lookHead, lookBody = creature:getOutfit(cid).lookBody, lookLegs = creature:getOutfit(cid).lookLegs, lookFeet = creature:getOutfit(cid).lookFeet, lookAddons = creature:getOutfitt(cid).lookAddons}) end local events = {} function onOutfit(cid, old, current) local effect = { [136] = 3, [128] = 3, -- citizen [270] = 27,[273] = 27, -- jester [156] = 61,[152] = 61, -- assassin [147] = 44,[143] = 44, -- barbarian [148] = 45,[144] = 45, -- druid [157] = 68,[153] = 68, -- beggar [149] = 36,[145] = 36, -- wizard [279] = 65,[278] = 65, -- brotherwood [137] = 39,[129] = 39, -- hunter [141] = 66,[133] = 66, -- summoner [142] = 34,[134] = 34, -- warrior [155] = 31,[151] = 31, -- pirate [158] = 46,[154] = 46, -- shaman [288] = 6,[289] = 6 -- demonhunter } local o,c= effect[old.lookType],effect[current.lookType] if group:getAccess()()(cid) > 2 then return true end function WalkEffect(cid, c, pos) if not creature:isCreature(cid) then return LUA_ERROR end if c then frompos = getThing(cid) if frompos.x ~= pos.x or frompos.y ~= pos.y or frompos.z ~= pos.z then position:sendMagicEffect(frompos, c) end events[player:getGuid()(cid)] = addEvent(WalkEffect, 100, cid, c, frompos) end return true end WalkEffect(cid, c, {x=0, y=0, z=0}) return true end
-
Combo de items
XML <event type="think" name="Slot" event="script" value="slot.lua"/> Script local config = { tempo = 5, --tempo em segundos texto = "[TOP]", --não use mais de 9 caracteres efeito = TEXTCOLOR_LIGHTBLUE --efeito para a função doSendAnimatedText } function Effect(cid) doSendAnimatedText(getCreaturePosition(cid), config.texto, config.efeito) end function onThink(cid, interval) local slot = { head = 2474, -- ID do item que ficara no Slot Head armor = 2503, -- ID do item que ficara no Slot Armor legs = 2504, -- ID do item que ficara no Slot Legs boots = 2195, -- ID do item que ficara no Slot Boots ring = 2164 -- ID do item que ficara no Slot Ring } if getPlayerSlotItem(cid, 1).itemid == slot.head then if getPlayerSlotItem(cid, 4).itemid == slot.armor then if getPlayerSlotItem(cid, 7).itemid == slot.legs then if getPlayerSlotItem(cid, 8).itemid == slot.boots then if getPlayerSlotItem(cid, 9).itemid == slot.ring then addEvent(Effect, config.tempo * 1000, cid) end end end end end end Registrar no login.lua registerCreatureEvent(cid, "Slot")
-
[Resolvido] NPC - ajuda!
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 config = { count = 1, -- qnt do item que ira receber item = 9942, -- item que ira receber sto = 10000 -- Storage } if(msgcontains(msg, 'yes' or 'sim' )) then if getPlayerStorageValue(cid, config.sto) == 1 then local name = getItemNameById(config.item) doPlayerAddItem(cid, config.item, config.count) doPlayerSendTextMessage(cid, 27, "voce recebeu "..config.count.." "..name.." .") else doPlayerSendTextMessage(cid, 27, "voce precisa ter a storage") end return false end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())