
Histórico de Curtidas
-
Infused deu reputação a QuebradaZN em Double Exp Potion CompletaEu Uso Essa, Ela Mostra o Tempo que falta pra acabar, Achei ela super Completona! Gostei!
Em Mods Coloque esse Arquivo!
<?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.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> e nessa Parte Configure ela como desejado:
configs = { time = 30, ---- TEMPO EM MINUTOS needpa = TRUE, --- NECESSITA DE PREMIUM ACCOUNT ? FALSE OU TRUE needlvl = {TRUE, level = 50}, --- LEVEL QUE MINIMO PARA USA-LÁ! costmana = {TRUE, mana = 300}, --- CUSTO DE MANA PARA USA-LÁ! addrate = 50, -- Exp que vai adicionar em % --- EXP QUE VAI DAR, 50 ESTA METADE! removeonuse = TRUE --- REMOVE A POTION APOS USAR! Vá na Script e Cace a Linha: <action itemid="7440" event="script"> e Troque o ID Pelo item ou Potion Desejado! é Isso ae! Se Ajudei Não Custa nada dar um REP né? -
Infused deu reputação a Wakon em (Resolvido)Pedido de Script que teleporta para casaScript casa:
Vá em "Data/talkactions/scripts" copie e cole 1 arquivo .lua e renomeie para gohouse.lua, apague tudo e cole isso:
Agora em "Data/talkactions" abra o arquivo talkactions.xml e adicione essa tag:
<talkaction words="!gohouse;/gohouse" script="gohouse.lua"/> Agora o teleport para o templo:
Vá em "Data/talkactions/scripts" copie e cole 1 arquivo .lua e renomeie para templo.lua, apague tudo e cole isso:
Agora em "Data/talkactions" abra o arquivo talkactions.xml e adicione essa tag:
<talkaction words="!templo;/templo" script="templo.lua"/> -
Infused deu reputação a Luquinha em [Pedido] Scripts ArmasTerceiro Pedido
Achei um script aqui, que ao dar use no item ele ganha a promotion.
Vamos lá.
Em actions/scripts crie um arquivo chamado promoitem.lua e cole isso dentro dele.
function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 9971) then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) doPlayerSendTextMessage(cid, 20, "You are a ".. getPlayerVocationName(cid) ..".") end doSendMagicEffect(fromPosition, CCONST_ME_MAGIC_RED) doRemoveItem(item.uid, 1) return TRUE end
Agora em actions.xml adicione essa tag
<action itemid="0000" event="script" value="promoitem.lua"/>
Explicação: Em 0000 é o id do item que vai ser o promote.
Créditos:Matheus
Não testado ,caso der erro avisa ai.
Segundo Script
CLICA AQUI
Primeiro Script
Vá em creaturescripts/scripts crie um arquivo chamado weaponpar.lua e adicione isso la dentro
-- <Script TK> -- local weaponpar = {2377, 2378, 2379, 2380} -- id dos items que darão paralize local chancepar = 5 -- chance de ocorrer o paralize (10 = 10%, 20 = 20%, 30 = 30%, 1 = 1%, 5 = 5%) e assim por diante local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) -- aqui edita os valores pro dano de paralize, vai mudando ae e testando até achar o desejado local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, 10000) -- aqui vai o tempo de paralyze, 1000 = 1 segundo setConditionParam(condition, CONDITION_PARAM_SPEED, -400) -- velocidade que o monstro irá perder setConditionFormula(condition, 0, 0, 0, 0) setCombatCondition(combat, condition) function onAttack(cid, target) if ((getCreaturePosition(target).x == getCreaturePosition(cid).x or getCreaturePosition(target).x == getCreaturePosition(cid).x+1 or getCreaturePosition(target).x == getCreaturePosition(cid).x-1) and (getCreaturePosition(target).y == getCreaturePosition(cid).y or getCreaturePosition(target).y == getCreaturePosition(cid).y+1 or getCreaturePosition(target).y == getCreaturePosition(cid).y-1)) then for i=0, #weaponpar do if (getPlayerSlotItem(cid, 5).itemid == weaponpar[i] or getPlayerSlotItem(cid, 6).itemid == weaponpar[i]) then if (math.random(1,100) > (100 - chancepar)) then doPlayerSendTextMessage(cid, 23, getCreatureName(target).." has paralized.") doAddCondition(target, condition) return true else return true end end end end return true end Agora vá em creaturescripts.xml e adicione essa tag
<event type="attack" name="WeaponPar" event="script" value="weaponpar.lua"/>
E pra finaliza vá em creaturescripts/scripts e abra o arquivo login.lua e adicone essa tag lá
registerCreatureEvent(cid, "WeaponPar")
Essa staff, ela tem chances de dar paralyze, está tudo explicado no começo do tópico.
Créditos : Jhon992
-
Infused deu reputação a thiagobji em [NPC] Vender Spells pelo NPCOlá galera do TibiaKing, a um tempo eu estava querendo um NPC que vendia spells (magias)
Porém, eu não achava, na época não tinha, então, eu fui no ##### e pedi lá esse NPC que vendia spells pelo NPC, ai o "VODKART", postou esse NPC lá e me ajudou, e se não me engano, não existe esse NPC aqui no TK, então agora irá ter.
Chega de papo/enrolação e vamos para o que interessa.
Abra a pasta do seu OT/data/npc/NOME DO SEU NPC.xml e coloque isso:
needlearn="0" Você coloca assim: needlearn="1"
EXPLICANDO SOBRE O NEEDLEARN:
needlearn="1" -- Aqui está que precisa comprar a magia no NPC para poder usa-la.
needlearn="0" -- Aqui está que não precisa comprar a magia no NPC para poder usa-la.
CRÉDITOS:
Vodkart (Pelo Script)
Thiagobji (Pelo Tópico, Pelo Pedido e por postar no TibiaKing.com)
É ISSO GALERA, QUALQUER DÚVIDA SÓ POSTAR.
-
Infused deu reputação a Vodkart em (Resolvido)EXHAUSTION SCRIPTfunction onUse(cid, item, frompos, item2, topos) local store,exausted = 986532,2 if item2.itemid == 2739 then doTransformItem(item2.uid,2737) doDecayItem(item2.uid) doCreateItem(2694,1,topos) elseif item2.itemid == 5471 then doTransformItem(item2.uid,5463) doDecayItem(item2.uid) doCreateItem(5467,1,topos) elseif item2.itemid == 806 then if math.random(1,5) == 1 and getPlayerStorageValue(cid, store) - os.time() <= 0 then doSummonCreature("Rotworm", topos) return setPlayerStorageValue(cid, store, os.time()+exausted) else return doSendMagicEffect(topos, 2) end end return true end
-
Infused deu reputação a Kimoszin em Problema /attr position x y zCria um teleport embaixo de você.
newteleport.lua
function onSay(cid, words, param, channel) local s = string.explode(param, ",") local topos = {x=s[1], y=s[2], z=s[3]} doCreateTeleport(1387, topos, getCreaturePosition(cid)) return TRUE end talkactions.xml <talkaction words="/newteleport" access="5" event="script" value="newteleport.lua"/> /newteleport 1017, 1027, 7
-
Infused deu reputação a brendoonh em [PEDIDO]4 Baus Que So pode Escolher 1Crie 1 arquivo com o nome 4bauQuest em data/actions/script cole isso dentro:
--- Made by Mazen --- function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid == 12901 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Demon Legs.") doPlayerAddItem(cid,2495,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.") end elseif item.uid == 12902 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Rainbow Shield.") doPlayerAddItem(cid,8905,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.") end elseif item.uid == 12903 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Spellbook of Dark Mysteries.") doPlayerAddItem(cid,8918,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.") end elseif item.uid == 12904 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Royal Crossbow.") doPlayerAddItem(cid,8851,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.") end end return 1 end
Adicione essa tag em action.xml
<action uniqueid="12901" script="4bauQuest.lua"/> <action uniqueid="12902" script="4bauQuest.lua"/> <action uniqueid="12903" script="4bauQuest.lua"/> <action uniqueid="12904" script="4bauQuest.lua"/> Mude o ID do item nessa parte:
doPlayerAddItem(cid,2495,1) = ID do bau 12901
doPlayerAddItem(cid,8905,1) = ID do bau 12902
doPlayerAddItem(cid,8918,1) = ID do bau 12903
doPlayerAddItem(cid,8851,1) = ID do bau 12904
Deu pra entender??
-
Infused deu reputação a Cat em Lista completa de Magic Effects e Shoot TypeMagicEffects CONST_ME_FIRST = 1, CONST_ME_DRAWBLOOD = CONST_ME_FIRST, CONST_ME_LOSEENERGY = 2, CONST_ME_POFF = 3, CONST_ME_BLOCKHIT = 4, CONST_ME_EXPLOSIONAREA = 5, CONST_ME_EXPLOSIONHIT = 6, CONST_ME_FIREAREA = 7, CONST_ME_YELLOW_RINGS = 8, CONST_ME_GREEN_RINGS = 9, CONST_ME_HITAREA = 10, CONST_ME_TELEPORT = 11, CONST_ME_ENERGYHIT = 12, CONST_ME_MAGIC_BLUE = 13, CONST_ME_MAGIC_RED = 14, CONST_ME_MAGIC_GREEN = 15, CONST_ME_HITBYFIRE = 16, CONST_ME_HITBYPOISON = 17, CONST_ME_MORTAREA = 18, CONST_ME_SOUND_GREEN = 19, CONST_ME_SOUND_RED = 20, CONST_ME_POISONAREA = 21, CONST_ME_SOUND_YELLOW = 22, CONST_ME_SOUND_PURPLE = 23, CONST_ME_SOUND_BLUE = 24, CONST_ME_SOUND_WHITE = 25, CONST_ME_BUBBLES = 26, CONST_ME_CRAPS = 27, CONST_ME_GIFT_WRAPS = 28, CONST_ME_FIREWORK_YELLOW = 29, CONST_ME_FIREWORK_RED = 30, CONST_ME_FIREWORK_BLUE = 31, CONST_ME_STUN = 32, CONST_ME_SLEEP = 33, CONST_ME_WATERCREATURE = 34, CONST_ME_GROUNDSHAKER = 35, CONST_ME_HEARTS = 36, CONST_ME_FIREATTACK = 37, CONST_ME_ENERGYAREA = 38, CONST_ME_SMALLCLOUDS = 39, CONST_ME_HOLYDAMAGE = 40, CONST_ME_BIGCLOUDS = 41, CONST_ME_ICEAREA = 42, CONST_ME_ICETORNADO = 43, CONST_ME_ICEATTACK = 44, CONST_ME_STONES = 45, CONST_ME_SMALLPLANTS = 46, CONST_ME_CARNIPHILA = 47, CONST_ME_PURPLEENERGY = 48, CONST_ME_YELLOWENERGY = 49, CONST_ME_HOLYAREA = 50, CONST_ME_BIGPLANTS = 51, CONST_ME_CAKE = 52, CONST_ME_GIANTICE = 53, CONST_ME_WATERSPLASH = 54, CONST_ME_PLANTATTACK = 55, CONST_ME_TUTORIALARROW = 56, CONST_ME_TUTORIALSQUARE = 57, CONST_ME_MIRRORHORIZONTAL = 58, CONST_ME_MIRRORVERTICAL = 59, CONST_ME_SKULLHORIZONTAL = 60, CONST_ME_SKULLVERTICAL = 61, CONST_ME_ASSASSIN = 62, CONST_ME_STEPSHORIZONTAL = 63, CONST_ME_BLOODYSTEPS = 64, CONST_ME_STEPSVERTICAL = 65, CONST_ME_YALAHARIGHOST = 66, CONST_ME_BATS = 67, CONST_ME_SMOKE = 68, CONST_ME_INSECTS = 69, CONST_ME_DRAGONHEAD = 70, CONST_ME_ORCSHAMAN = 71, CONST_ME_ORCSHAMAN_FIRE = 72, CONST_ME_THUNDER = 73, CONST_ME_FERUMBRAS = 74, CONST_ME_CONFETTI_HORIZONTAL = 75, CONST_ME_CONFETTI_VERTICAL = 76, // 77-157 are empty CONST_ME_BLACKSMOKE = 158, CONST_ME_LAST = CONST_ME_BLACKSMOKE, // 159-166 are empty CONST_ME_REDSMOKE = 167, CONST_ME_YELLOWSMOKE = 168, CONST_ME_GREENSMOKE = 169, CONST_ME_PURPLESMOKE = 170, CONST_ME_EARLY_THUNDER = 171, CONST_ME_RAGIAZ_BONECAPSULE = 172, CONST_ME_CRITICAL_DAMAGE = 173, // 174 is empty CONST_ME_PLUNGING_FISH = 175, ShootTypes CONST_ANI_NONE = 0, CONST_ANI_FIRST = 1, CONST_ANI_SPEAR = CONST_ANI_FIRST, CONST_ANI_BOLT = 2, CONST_ANI_ARROW = 3, CONST_ANI_FIRE = 4, CONST_ANI_ENERGY = 5, CONST_ANI_POISONARROW = 6, CONST_ANI_BURSTARROW = 7, CONST_ANI_THROWINGSTAR = 8, CONST_ANI_THROWINGKNIFE = 9, CONST_ANI_SMALLSTONE = 10, CONST_ANI_DEATH = 11, CONST_ANI_LARGEROCK = 12, CONST_ANI_SNOWBALL = 13, CONST_ANI_POWERBOLT = 14, CONST_ANI_POISON = 15, CONST_ANI_INFERNALBOLT = 16, CONST_ANI_HUNTINGSPEAR = 17, CONST_ANI_ENCHANTEDSPEAR = 18, CONST_ANI_REDSTAR = 19, CONST_ANI_GREENSTAR = 20, CONST_ANI_ROYALSPEAR = 21, CONST_ANI_SNIPERARROW = 22, CONST_ANI_ONYXARROW = 23, CONST_ANI_PIERCINGBOLT = 24, CONST_ANI_WHIRLWINDSWORD = 25, CONST_ANI_WHIRLWINDAXE = 26, CONST_ANI_WHIRLWINDCLUB = 27, CONST_ANI_ETHEREALSPEAR = 28, CONST_ANI_ICE = 29, CONST_ANI_EARTH = 30, CONST_ANI_HOLY = 31, CONST_ANI_SUDDENDEATH = 32, CONST_ANI_FLASHARROW = 33, CONST_ANI_FLAMMINGARROW = 34, CONST_ANI_SHIVERARROW = 35, CONST_ANI_ENERGYBALL = 36, CONST_ANI_SMALLICE = 37, CONST_ANI_SMALLHOLY = 38, CONST_ANI_SMALLEARTH = 39, CONST_ANI_EARTHARROW = 40, CONST_ANI_EXPLOSION = 41, CONST_ANI_CAKE = 42, CONST_ANI_TARSALARROW = 44, CONST_ANI_VORTEXBOLT = 45, CONST_ANI_PRISMATICBOLT = 48, CONST_ANI_CRYSTALLINEARROW = 49, CONST_ANI_DRILLBOLT = 50, CONST_ANI_ENVENOMEDARROW = 51, CONST_ANI_GLOOTHSPEAR = 53, CONST_ANI_SIMPLEARROW = 54, fonte: https://github.com/otland/forgottenserver/blob/master/src/const.h
Lista com Gif
CONST_ME_DRAWBLOOD = 0
CONST_ME_LOSEENERGY = 1
CONST_ME_POFF = 2
CONST_ME_BLOCKHIT = 3
CONST_ME_EXPLOSIONAREA = 4
CONST_ME_EXPLOSIONHIT = 5
CONST_ME_FIREAREA = 6
CONST_ME_YELLOW_RINGS = 7
CONST_ME_GREEN_RINGS = 8
CONST_ME_HITAREA = 9
CONST_ME_TELEPORT = 10
CONST_ME_ENERGYHIT = 11
CONST_ME_MAGIC_BLUE = 12
CONST_ME_MAGIC_RED = 13
CONST_ME_MAGIC_GREEN = 14
CONST_ME_HITBYFIRE = 15
CONST_ME_HITBYPOISON = 16
CONST_ME_MORTAREA = 17
CONST_ME_SOUND_GREEN = 18
CONST_ME_SOUND_RED = 19
CONST_ME_POISONAREA = 20
CONST_ME_SOUND_YELLOW = 21
CONST_ME_SOUND_PURPLE = 22
CONST_ME_SOUND_BLUE = 23
CONST_ME_SOUND_WHITE = 24
CONST_ME_BUBBLES = 25
CONST_ME_CRAPS = 26
CONST_ME_GIFT_WRAPS = 27
CONST_ME_FIREWORK_YELLOW = 28
CONST_ME_FIREWORK_RED = 29
CONST_ME_FIREWORK_BLUE = 30
CONST_ME_STUN = 31
CONST_ME_SLEEP = 32
CONST_ME_WATERCREATURE = 33
CONST_ME_GROUNDSHAKER = 34
CONST_ME_HEARTS = 35
CONST_ME_FIREATTACK = 36
CONST_ME_ENERGYAREA = 37
CONST_ME_SMALLCLOUDS = 38
CONST_ME_HOLYDAMAGE = 39
CONST_ME_BIGCLOUDS = 40 (OBS: são as nuvens do exevo gran mas vis)
CONST_ME_ICEAREA = 41
CONST_ME_ICETORNADO = 42
CONST_ME_ICEATTACK = 43
CONST_ME_STONES = 44
CONST_ME_SMALLPLANTS = 45
CONST_ME_CARNIPHILA = 46
CONST_ME_PURPLEENERGY = 47
CONST_ME_YELLOWENERGY = 48
CONST_ME_HOLYAREA = 49
CONST_ME_BIGPLANTS = 50 (é quase igual, só que cresce mais, não consegui gif)
CONST_ME_CAKE = 51
CONST_ME_GIANTICE = 52
CONST_ME_WATERSPLASH = 53
CONST_ME_PLANTATTACK = 54
CONST_ME_TUTORIALARROW = 55
CONST_ME_TUTORIALSQUARE = 56
CONST_ME_MIRRORHORIZONTAL = 57
CONST_ME_MIRRORVERTICAL = 58
CONST_ME_SKULLHORIZONTAL = 59
CONST_ME_SKULLVERTICAL = 60
CONST_ME_ASSASSIN = 61
CONST_ME_STEPSHORIZONTAL = 62 (Ignorado)
CONST_ME_BLOODYSTEPS = 63 (Ignorado)
CONST_ME_STEPSVERTICAL = 64 (Ignorado)
CONST_ME_YALAHARIGHOST = 65
CONST_ME_BATS = 66
CONST_ME_SMOKE = 67
CONST_ME_INSECTS = 68
-
Infused deu reputação a warotserv em [Movement] Tile TrainerOutro script que fiz e estou disponibilizando: Tile Trainer
O que ele faz? Enquanto o player estiver em um tile que possui determinada action id, ele vai ficar treinando suas habilidades.
Primeiro, em "movements\scripts" crie um arquivo chamado "skill.lua". Feito isso, coloque em seu conteúdo o seguinte texto:
local delay = 200 local FIST = 0 local CLUB = 1 local SWORD = 2 local AXE = 3 local DISTANCE = 4 local SHIELDING = 5 local FISHING = 6 function samePos(pos1, pos2) if pos1.x == pos2.x and pos1.y == pos2.y and pos1.z == pos2.z then return true else return false end end function addSkillFunction(cid, item, position) if not isPlayer(cid) == TRUE then return FALSE end local playerPos = getCreaturePosition(cid) if not samePos(position,playerPos) then return FALSE end if (isKnight(cid) == TRUE) then doPlayerAddSkillTry(cid, FIST, 1) doPlayerAddSkillTry(cid, CLUB, 1) doPlayerAddSkillTry(cid, SWORD, 1) doPlayerAddSkillTry(cid, AXE, 1) doPlayerAddSkillTry(cid, SHIELDING, 1) doPlayerAddMana(cid,80) doPlayerAddSpentMana(cid, 80) doSendMagicEffect(position, 2) addEvent(addSkillFunction,delay,cid, item, position) return TRUE end if (isPaladin(cid) == TRUE) then doPlayerAddSkillTry(cid, DISTANCE, 1) doPlayerAddSkillTry(cid, SHIELDING, 1) doPlayerAddMana(cid,80) doPlayerAddSpentMana(cid, 80) doSendMagicEffect(position, 5) addEvent(addSkillFunction,delay,cid, item, position) return TRUE end if (isSorcerer(cid) == TRUE or isDruid(cid)) then doPlayerAddMana(cid,80) doPlayerAddSpentMana(cid, 80) addEvent(addSkillFunction,delay,cid, item, position) return TRUE end return FALSE end function onStepIn(cid, item, position) if isPlayer(cid) then local playerPos = getCreaturePosition(cid) addEvent(addSkillFunction,delay,cid, item, position) doPlayerSendTextMessage(cid, 25, "TREINANDO") end return true end depois, em "movements.xml" adicione a seguinte linha:
<movevent type="StepIn" actionid="8585" script="skill.lua"/> Bom, é isso. Acho que não precisa explicar, está bem fácil de entender e alterar o código.
Espero ter ajudado.
P.S.: Não me importo que roubem meus créditos e/ou postem em outros fórums.
-
Infused deu reputação a Rusherzin em (Resolvido)SPELL TARGET - IMPOSSIVEL?Aaaah, okay. Usa assim então:
local healed = var.number if(healed == cid) then doPlayerSendTextMessage(cid, 27, "Não pode usar em si mesmo.") return false end
-
Infused deu reputação a Storm em (Resolvido)SCRIPT FISHING OT/EXAUSTexhaustion = { check = function (cid, storage) if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then return false end return getPlayerStorageValue(cid, storage) >= os.time(t) end, get = function (cid, storage) if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then return false end local exhaust = getPlayerStorageValue(cid, storage) if(exhaust > 0) then local left = exhaust - os.time(t) if(left >= 0) then return left end end return false end, set = function (cid, storage, time) setPlayerStorageValue(cid, storage, os.time(t) + time) end, make = function (cid, storage, time) local exhaust = exhaustion.get(cid, storage) if(not exhaust) then exhaustion.set(cid, storage, time) return true end return false end } local configg = { waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4820, 4821, 4822, 4823, 4824, 4825} } local monsters = { {'rat'}, {'rabit'} } local numero = 2 -- numero de monstros que você colocou /\ local number = 100 -- < quanto maior, mais dificil de pescar um monstro 175000 function onUse(cid, item, frompos, item2, topos) local config = { rateSkill = getConfigValue("rateSkill"), allowFromPz = false, useWorms = false } local waittime = 1.5 -- Tempo de exhaustion local storage = 250002 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "You are exhausted") return false end exhaustion.set(cid, storage, waittime) if isInArray(configg.waterIds, item2.itemid) == FALSE then return false end local chance = math.random(1,numero+number) -- if chance >= 1 and chance <= numero then create = monsters[chance][1] doSummonCreature(create, getCreaturePosition(cid)) doSendMagicEffect(topos, 11) doCreatureSay(cid, "A Big Monster Has Become Very Disgruntled Due To You !", TEXTCOLOR_BLUE) else doSendMagicEffect(topos, CONST_ME_LOSEENERGY) end if((config.allowFromPz or not getTileInfo(getCreaturePosition(cid)).protection) and item2.itemid ~= 493 and math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 10))) < getPlayerSkill(cid, SKILL_FISHING) and (not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1)))) then doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill) doSendMagicEffect(topos, CONST_ME_LOSEENERGY) else doSendMagicEffect(topos, CONST_ME_LOSEENERGY) end return true end