Tudo que Mathias Kenfi postou
-
Bug no script promotion
Eu só editei o script que você me passou
-
Bug no script promotion
function onUse(cid, item, fromPosition, itemEx, toPosition) local voc = getPlayerVocation(cid) if voc = 1 then doPlayerSetVocation(cid, 5) doPlayerSendTextMessage(cid, 19, "Você foi promovido para ".. getPlayerVocationName(cid) ..".") doSendDistanceShoot({x=getCreaturePos(cid).x-3, y=getCreaturePos(cid).y-3, z=getCreaturePos(cid).z}, getCreaturePos(cid), 4) doSendMagicEffect(getCreaturePos(cid), 47) doPlayerSendTextMessage(cid, 19, "Você foi promovido para ".. getPlayerVocationName(cid) ..".") doRemoveItem(item.uid, 1) elseif voc = 2 then doPlayerSetVocation(cid, 6) doSendDistanceShoot({x=getCreaturePos(cid).x-3, y=getCreaturePos(cid).y-3, z=getCreaturePos(cid).z}, getCreaturePos(cid), 30) doSendMagicEffect(getCreaturePos(cid), 49) doPlayerSendTextMessage(cid, 19, "Você foi promovido para ".. getPlayerVocationName(cid) ..".") doRemoveItem(item.uid, 1) elseif voc = 3 then doPlayerSetVocation(cid, 7) doSendDistanceShoot({x=getCreaturePos(cid).x-3, y=getCreaturePos(cid).y-3, z=getCreaturePos(cid).z}, getCreaturePos(cid), 27) doSendMagicEffect(getCreaturePos(cid), 48) doPlayerSendTextMessage(cid, 19, "Você foi promovido para ".. getPlayerVocationName(cid) ..".") doRemoveItem(item.uid, 1) elseif voc = 4 then doPlayerSetVocation(cid, 8) doSendDistanceShoot({x=getCreaturePos(cid).x-3, y=getCreaturePos(cid).y-3, z=getCreaturePos(cid).z}, getCreaturePos(cid), 37) doSendMagicEffect(getCreaturePos(cid), 3) doPlayerSendTextMessage(cid, 19, "Você foi promovido para ".. getPlayerVocationName(cid) ..".") doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid, "Você já foi promovido.") end return TRUE end
-
ERRO MaxLevel
Olá galera do TibiaKing, estou tendo um problema no meu servidor em que toda vez que um Player ACIMA do LEVELMAX 903637 upa ou morre, ele retorna ao Level 1 e perde todos os itens. Já tentei procurar algo no Login.lua ou no Config.lua, já retirei as Bless do servidor e arrumei o LostPercent, mas o erro ainda persiste e não sei mais como arrumar este erro. REP++
-
(Resolvido)Adaptar um script a outro
function onLogin(cid) local rate = 1.20 -- 20% local config = { vip = "Você tem "..((rate - 1)*100).."% de exp a mais agora!", notvip = "Tornesse vip e ganhe "..((rate - 1)*100).."% a mais de experiencia!", } if not isPlayer(cid) then return true end if getPlayerPremiumDays(cid) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, config.notvip) else doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, config.vip) end return TRUE end
-
(Resolvido)Adaptar um script a outro
O script do Item não está dando Vip e sim Premium doPlayerAddPremiumDays(cid, config.dias) E o script da Exp está checando se o player é Vip if vip.hasVip(cid) == FALSE then Você precisa fazer com que o Player receba Vip ao dar use no Item. Troque:doPlayerAddPremiumDays(cid, config.dias) Por: doPlayerAddVipDays(cid, config.dias) Se não der certo, tente usar um sistema de Vip por Storage que é mais simples
-
(Resolvido)[PEDIDO] Spell que aumenta ataque speed
function onCastSpell(cid, var) local male = 350 local female = 351 local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 22 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 25) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doSetCreatureOutfit(cid, male, -1) elseif sex == 1 and getPlayerVocation(cid) == 22 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 25) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doSetCreatureOutfit(cid, female, -1) else doPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada") end return true end function onCastSpell(cid, var) local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 25 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 22) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doSetCreatureOutfit(cid, male, -1) elseif sex == 1 and getPlayerVocation(cid) == 25 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 22) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doSetCreatureOutfit(cid, female, -1) else doPlayerSendCancel(cid, "Você não pode usar esta magia") end return true end SE NAO DER CERTO TENTA ESSE Para se transformar: function onCastSpell(cid, var) local male = 350 local female = 351 local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 22 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 25) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doSetCreatureOutfit(cid, male, -1) elseif sex == 1 and getPlayerVocation(cid) == 22 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 25) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doSetCreatureOutfit(cid, female, -1) else doPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada") end return doCombat(cid, combat, var) end Para reverter: function onCastSpell(cid, var) local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 25 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 22) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doSetCreatureOutfit(cid, male, -1) elseif sex == 1 and getPlayerVocation(cid) == 25 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 22) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doSetCreatureOutfit(cid, female, -1) else doPlayerSendCancel(cid, "Você não pode usar esta magia") end return doCombat(cid, combat, var) end
-
(Resolvido)[PEDIDO] Spell que aumenta ataque speed
Poste o script completo das magia
-
(Resolvido)[PEDIDO] Spell que aumenta ataque speed
function onCastSpell(cid, var) local male = 350 local female = 351 local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 7) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doCreatureChangeOutfit(cid, male) elseif sex == 1 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 7) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doCreatureChangeOutfit(cid, female) else doPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada") end return true end Magia que cancela function onCastSpell(cid, var) local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 3) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doCreatureChangeOutfit(cid, male) elseif sex == 1 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 3) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doCreatureChangeOutfit(cid, female) else doPlayerSendCancel(cid, "Você não pode usar esta magia") end return true end
-
[SCRIPT] Weapon Atk com skill
local dano = 5 --- Aqui é a % da skill, ou seja, ele irá causar 5% do Distance dele de dano local w = { [1] = {ef = 15, sh = 33, dmg = COMBAT_FIREDAMAGE}, [2] = {ef = 43, sh = 34, dmg = COMBAT_ICEDAMAGE}, [3] = {ef = 8, sh = 39, dmg = COMBAT_POISONDAMAGE}, [4] = {ef = 38, sh = 23, dmg = COMBAT_DEATHDAMAGE}, [5] = {ef = 47, sh = 32, dmg = COMBAT_ENERGYDAMAGE}, [6] = {ef = 9, sh = 21, dmg = COMBAT_PHYSICALDAMAGE}, [7] = {ef = 48, sh = 17, dmg = COMBAT_HOLYDAMAGE} } function onUseWeapon(cid, var) local skill = getPlayerSkill(cid, 4) local min, max = (dano * skill), (dano * skill/100) local effect = getPlayerStorageValue(cid, 4561) local target = getCreatureTarget(cid) if target ~= 0 then local wx = w[effect] or w[math.random(#w)] doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh) addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef) end return true end
-
(Resolvido)[PEDIDO] Spell que aumenta ataque speed
function onCastSpell(cid, var)local male = 350local female = 351local sex = getPlayerSex(cid)if sex == 0 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 thendoPlayerSetVocation(cid, 7)setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1)doSetCreatureOutfit(cid, male)elseif sex == 1 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 thendoPlayerSetVocation(cid, 7)setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1)doSetCreatureOutfit(cid, female)elsedoPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada")endreturn doCombat(cid, combat, var)endMagia que cancelafunction onCastSpell(cid, var)local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}local sex = getPlayerSex(cid)if sex == 0 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 thendoPlayerSetVocation(cid, 3)setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1)doSetCreatureOutfit(cid, male)elseif sex == 1 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 thendoPlayerSetVocation(cid, 3)setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1)doSetCreatureOutfit(cid, female)elsedoPlayerSendCancel(cid, "Você não pode usar esta magia")endreturn doCombat(cid, combat, var)end
-
Quest de entregar item
É um sistema de task diferenciado, tem isso no fórum
-
Quest de entregar item
Você quer que o NPC entrege o item para o Player e receba x Storage? Depois o player vá no final da quest e entregue os itens para outro NPC?
-
(Resolvido)[PEDIDO] Spell que aumenta ataque speed
function onCastSpell(cid, var) local male = 350 local female = 351 local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 7) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doSetCreatureOutfit(cid, male) elseif sex == 1 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 7) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doSetCreatureOutfit(cid, female) else doPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada") end return doCombat(cid, combat, var) end Magia que cancela function onCastSpell(cid, var) local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 doPlayerSetVocation(cid, 3) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doSetCreatureOutfit(cid, male) elseif sex == 1 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 3) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doSetCreatureOutfit(cid, female) else doPlayerSendCancel(cid, "Você não pode usar esta magia") end return doCombat(cid, combat, var) end
-
(Resolvido)[PEDIDO] Spell que aumenta ataque speed
function onCastSpell(cid, var) local tempo = 1 local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local sex = getPlayerSex(cid) local voc = doPlayerSetVocation if sex == 0 and getPlayerVocation(cid) == 3 then addEvent(voc, 10*1000, cid, 7) setPlayerStorageValue(cid, store, os.time()+exausted) doSetCreatureOutfit(cid, male, tempo*1000) else if sex == 1 and getPlayerVocation(cid) == 3 then addEvent(voc, 10*1000, cid, 7) setPlayerStorageValue(cid, store, os.time()+exausted) doSetCreatureOutfit(cid, female, tempo*1000) end return true end
-
Erro ao compilar Source
- Erro ao compilar Source
Não, como eu instalo?- Erro ao compilar Source
Olá TibiaKing, estou tendo problemas ao compilar as Sources TFS 0.4 REV 3884 Sempre que vou compilar o DEV da o seguinte erro: Já troquei de programa e de source, mas nenhum funcionou até agora, alguém consegue me ajudar? REP +++- (Resolvido)Magia por Itens
Ao invés de registrar em uma função de Action, registre-o como uma runa (Sudden Death Rune por exemplo E no local do "idrune" você coloque o id de uma Sword (use with)- ITEM QUE USA EFEITO+DANO AO DA TARGET
Você quer que seja em uma arma específica? Em uma spell específica? Em todas as armas? Qual seria o tempo de intervalo entre o dano adicional? Você quer que funcione como uma segunda arma?- Item único
Você quer que o player não perca este item específico? Mas se o item estiver dentro da Backpack e e ela cair não tem aonde o item ir... Você pode criar um talkaction para o player criar o item Também não precisa ser um item, pode ser um storage, que ai ele não perde se morrer- (Resolvido)Script First Item
- (Resolvido)[PEDIDO] Spell que aumenta ataque speed
Cria um vocação com ID 7 e coloque a attackspeed dele em "100" e edite a attackspeed da vocação de ID 3 e coloque 500 O script muda a vocação do player para simular uma mudança de attackspeed Essa é uma maneira de burlar isso, eu não sei como mudar attackspeed sem ser desse jeito- (Resolvido)[PEDIDO] Spell que aumenta ataque speed
Aumente o attackspeed da vocacao 7 e simples Segue o script \/ function onCastSpell (cid, var) local store,exausted = 156201,30 -- exaust na talk if getPlayerStorageValue(cid, store) >= os.time() then doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.") return true end If getPlayerVocation(cid) = 3 then local voc = doPlayerSetVocation addEvent(voc, 10*1000, cid, 7) setPlayerStorageValue(cid, store, os.time()+exausted) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ativado 10 segundos.") else doPlayerSendCancel(cid, "Apenas Padins utilizam esta spell") end return true end- (Resolvido)Script First Item
Voce apenas precisa adicionar uma função que verifique se o player é Rook function onLogin(cid) if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then if isRook(cid) then setPlayerStorageValue(cid, 50000, 1) elseif isSorcerer(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2190, 1) doPlayerAddItem(cid, 2463, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2643, 1) setPlayerStorageValue(cid, 50000, 1) elseif isDruid(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2182, 1) doPlayerAddItem(cid, 2463, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2643, 1) setPlayerStorageValue(cid, 50000, 1) elseif isPaladin(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doPlayerAddItem(cid, 2389, 3) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2643, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2463, 1) setPlayerStorageValue(cid, 50000, 1) elseif isKnight(cid) then local bag = doPlayerAddItem(cid, 9774, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2160, 3) doAddContainerItem(bag, 8601, 1) doAddContainerItem(bag, 2383, 1) doAddContainerItem(bag, 2417, 1) doPlayerAddItem(cid, 2525, 1) doPlayerAddItem(cid, 2463, 1) doPlayerAddItem(cid, 2457, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 2643, 1) setPlayerStorageValue(cid, 50000, 1) end end return TRUE end Veja que apenas tem a função que identifica se o Player é Rook, se for Rook irá apenas adicionar a storage 50000 (apague se não for necessário)- AJUDA Colocando Site Online
Galera fui instalar o site GesiorACC 2012 e estou preso, não sei o que fazer Se alguém puder ajudar REP + xD LINK do Gesior que estou usando: - Erro ao compilar Source
Informação Importante
Confirmação de Termo