-
Total de itens
904 -
Registro em
-
Última visita
-
Dias Ganhos
13
Tudo que Killua postou
-
http://www.xtibia.com/forum/topic/229871-sdt-killua-fishing-system-pesca-diferente/ Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
action [SDT] Killua Fishing System - Pesca diferente
um tópico no fórum postou Killua Actions e Talkactions
Olá a todos, hoje é terça, portanto venho trazer mais um script. Esse é bem simples, mas é legal... Fiz ele baseando-me em um pedido: http://www.xtibia.com/forum/topic/229539-sistema-de-pesca-de-itens/#entry1619129. Para ver os outros scripts de terça, clique aqui. O que ele faz? É um simples sistema de pesca (com efeitos bem legais), onde se pode configurar tudo a seu gosto. Quando se usa a vara na água aparece um efeito, espera-se um tempo (3 segundos) e começam a aparecer vários efeitos na água. Nesse momento, você pode ou não conseguir um peixe. Para instalar, crie Killua Fishing System.lua em data/actions/scripts e coloque: local waterIDs = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625} local config = { {level = {10,19}, fishes = {2667}, maxFish = 1, chance = 50}, -- {level = {Do level, Até o level}, fishes = {id dos peixes que podem vir}, maxFish = quantidade máxima de peixes que podem vir, chance = chance em % {level = {20,29}, fishes = {2667, 2669}, maxFish = 2, chance = 60}, {level = {30,39}, fishes = {2667, 2669}, maxFish = 3, chance = 70}, {level = {40,49}, fishes = {2667, 2669, 2668}, maxFish = 4, chance = 80}, {level = {50,59}, fishes = {2667, 2669, 2668}, maxFish = 5, chance = 80}, {level = {60,69}, fishes = {2667, 2669, 2668, 2670}, maxFish = 6, chance = 80}, {level = {70,79}, fishes = {2667, 2669, 2668, 2670, 2160}, maxFish = 6, chance = 80}, {level = {80,math.huge}, fishes = {2667, 2669, 2668, 2670, 2160, 2157}, maxFish = 7, chance = 90} } function onUse(cid, item, fromPosition, itemEx, toPosition) local worms = math.random(1, 5) if getPlayerStorageValue(cid, 381921) < os.time() then if isInArray(waterIDs, itemEx.itemid) then if getPlayerItemCount(cid, 3976) >= worms then doPlayerRemoveItem(cid, 3976, worms) doSendMagicEffect(toPosition, 1) local times = {2900, 3100, 3300, 3500, 3700, 3900, 4000} for i = 1, #times do addEvent(doSendMagicEffect, times[i], toPosition, 1) end addEvent(function() local random = math.random(1, 100) for _, fishing in pairs(config) do if random <= fishing.chance then if getPlayerSkillLevel(cid, 6) >= fishing.level[1] and getPlayerSkillLevel(cid, 6) <= fishing.level[2] then doPlayerAddItem(cid, fishing.fishes[math.random(1, #fishing.fishes)], math.random(1, fishing.maxFish)) doPlayerAddSkillTry(cid, 6, 6) doSendMagicEffect(toPosition, 53) break end else doSendMagicEffect(toPosition, 25) doPlayerAddSkillTry(cid, 6, 1) end end end, 4000) doPlayerSetStorageValue(cid, 381921, os.time() + 5) else doPlayerSendCancel(cid, "Voce precisa de mais minhocas!") end else doPlayerSendCancel(cid, "Voce nao pode pescar aqui") end else doPlayerSendCancel(cid, "Sua isca ainda esta na agua!") end return true end Em actions.xml, coloque essa tag: <action itemid="2580" script="Killua Fishing System.lua" allowfaruse="1"/> ATENÇAO: para evitar problemas, remova a seguinte tag do actions.xml <action itemid="2580" event="script" value="tools/fishing.lua" allowfaruse="1"/> Configure a tabela config a seu gosto (siga o comentário no script). -
Muito, muito bom mesmo E ainda ganha o prêmio de maior tópico do fórum ahuahuahua REP+
- 62 respostas
-
- tv system
- cast system
- (e 4 mais)
-
Decidi que vou usar o do SirPotter mesmo, obrigado a todos. Tópico fechado.
-
function onDeath(cid, corpse, deathList) for i = 1, 2 do if isPlayer(cid) and isPlayer(deathList[i]) then doPlayerAddExperience(deathList[i], getPlayerExperience(cid) / 3) end end return true end function onLogin(cid) registerCreatureEvent(cid, "Exp por player") return true end TAG: <event type="login" name="Explayer Login" event="script" value="Exp KIll.lua"/> <event type="death" name="Exp por player" event="script" value="Exp KIll.lua"/> Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
poketibia Duvida De Scripting Na Vip Do Meu Serve De Poketibia !
pergunta respondeu ao BackOfTheHell de Killua em Scripts
Tópico movido para a seção de dúvidas e pedidos resolvidos. -
É só configurar as chances que eu puis (é em porcentagem) function onUse(cid, item, item2, frompos, topos, pos) local config = { ["Magic Plate Armor"] = {t1=2476,t2=2464,t3=2472,chance=50}, -- t1 = ID do ITEM 1 |---| t2 = ID do ITEM 2 |---| t3 = ID do ITEM a ser FORJADO -- ["Dragon Scale Mail"] = {t1=2489,t2=2487,t3=2492,chance=50}, ["Fireborn Giant Armor"] = {t1=8886,t2=2486,t3=8881,chance=50}, } local r1 = {x = 966, y = 599, z = 6, stackpos= 2} -- Posição 1 ( NÃO MEXA NO stackpos= 2 ) local r2 = {x = 968, y = 599, z = 6, stackpos= 2} -- Posição 2 ( NÃO MEXA NO stackpos= 2 ) local r3 = {x = 967, y = 599, z = 6} -- Posição do Item a Ser Criado local q1 = getThingfromPos(r1) local q2 = getThingfromPos(r2) for i, x in pairs(config) do if (q1.itemid == x.t1 and q2.itemid == x.t2) or (q1.itemid == x.t2 and q2.itemid == x.t1) then local rand = math.random(1, 100) if rand <= x.chance then doRemoveItem(q1.uid, 1) doRemoveItem(q2.uid, 1) addEvent(doCreateItem, 1000, x.t3, 1, r3) doSendMagicEffect(r3, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "{ForgeSystem} Parabéns, Você Forjou Um " .. i .. ".") else doRemoveItem(q1.uid, 1) doRemoveItem(q2.uid, 1) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "{ForgeSystem} Voce falhou") end break end end return TRUE end
-
Tenta assim: function returnTransform(cid) local hp = 300 -- quantidade de hp que vai perde local mp = 300 -- quantidade de mp que vai perde if isCreature(cid) then setCreatureMaxHealth(cid, - hp) setCreatureMaxMana(cid, - mp) doChangeSpeed(cid, (getCreatureSpeed(cid)) - 400) setPlayerStorageValue(cid, 123123122, -1) doPlayerSendCancel(cid, "Voce volto ao normal.") end return true end function onUse(cid, item, fromPosition, itemEx, toPosition) local level = 0 -- level pra pode usa local outfit = 130 -- outfit que vai virar local timer = 1 -- quantos minutos vai demora pra perde a skill local effect = 1 -- efeito que vai sai local hp = 300 -- quantidade de hp que vai ganha local mp = 300 -- quantidade de mp que vai ganha if getPlayerLevel(cid) >= level then if getPlayerStorageValue(cid, 123123122) < 0 then doSendMagicEffect(getCreaturePosition(cid), effect) doCreatureSay(cid, "Ohhhhw", TALKTYPE_ORANGE_1) doSetCreatureOutfit(cid,{lookType = 52, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons},timer * 60 * 1000) setPlayerStorageValue(cid, 123123122, 1) setCreatureMaxHealth(cid, (getCreatureHealth(cid)) + hp) setCreatureMaxMana(cid, (getCreatureMana(cid)) + mp) doCreatureAddMana(cid, mp) doCreatureAddHealth(cid, hp) doChangeSpeed(cid, (getCreatureSpeed(cid)) + 400) addEvent(returnTransform, timer*1000*60, cid) else doPlayerSendCancel(cid, "Você ja ta transformado.") end else doPlayerSendCancel(cid, "Voce não tem level nessessario.") end return true end
-
Tópico movido para a seção de dúvidas e pedidos resolvidos. O tópico foi fechado e movido para lixeira por estar inativo a mais de 10 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe.
- 5 respostas
-
- runa bugada
- uh nao some
-
(e 2 mais)
Tags:
-
Tópico movido para a seção de dúvidas e pedidos resolvidos. O tópico foi fechado e movido para lixeira por estar inativo a mais de 10 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe. O tópico foi fechado e movido para lixeira por estar inativo a mais de 10 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe.
- 6 respostas
-
- ajuda por faovr
- bau que da addons
- (e 1 mais)
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
Hmm eu baixei o server e ele é realmente bom, mas tem muitos erros (arrumáveis)... Ainda aceito mais sugestões
-
Olá amigos, eu e um amigo estamos com vontade de abrir um servidor baiak, mas não sei qual servidor devo usar como base... Escolhemos baiak pq só queremos abrir pra nos divertir mesmo, sem muita dor de cabeça. Qual é o servidor baiak mais estável para usar como base? Obrigado, espero que me ajudem
-
Nossa, eu só editei seu script sem nem ler e ele estava bem errado rs, aqui está local danoMin, danoMax = 300, 400 function onCastSpell(cid, var) if isMonster(getCreatureTarget(cid)) or isPlayer(getCreatureTarget(cid)) then doSendMagicEffect(getThingPos(cid), 125) doTeleportThing(cid, getThingPos(getCreatureTarget(cid))) doCreatureAddHealth(getCreatureTarget(cid), math.random(danoMin, danoMax)) else doPlayerSendTextMessage(cid,20,'Precisa Selecionar um Alvo') end return true end
-
function onUse(cid, item, topos, item2, frompos) local myball = getPlayerSlotItem(cid, 8) local boost = getItemAttribute(myball.uid, "boost") or 0 local boosts = 100 local legendary = {"Moltress", "Zapdos", "Articuno"} if boost == 1500 then doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.") return true end if not isSummon(item2.uid) then doPlayerSendCancel(cid, "Use only in your pokemons.") return true end if isInArray(legendary, getCreatureName(item2.uid)) then doPlayerSendCancel(cid, "Voce nao pode usar em pokemons lendarios") return true end boosts = boosts local pokemon = getItemAttribute(myball.uid, "poke") local off = pokes[pokemon].offense * boost_rate * boosts local def = pokes[pokemon].defense * boost_rate * boosts local agi = pokes[pokemon].agility * boosts local spatk = pokes[pokemon].specialattack * boost_rate * boosts local vit = pokes[pokemon].vitality * boost_rate * boosts newBoost = boost + boosts if newBoost > 1500 then newBoost = 1500 end doSetItemAttribute(myball.uid, "boost", newBoost) doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off) doItemSetAttribute(myball.uid, "defense", getItemAttribute(myball.uid, "defense") + def) doItemSetAttribute(myball.uid, "speed", getItemAttribute(myball.uid, "speed") + agi) doItemSetAttribute(myball.uid, "specialattack", getItemAttribute(myball.uid, "specialattack") + spatk) doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit) doRemoveItem(item.uid) doSendMagicEffect(getThingPos(item2.uid), 103) doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +"..boosts..".") doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..newBoost..".") doSendAnimatedText(getThingPos(item2.uid), "+"..boosts.." Boost", 215) return true end Vc vai ter que adicionar todos os lendários nesta tabela local legendary = {"Moltress", "Zapdos", "Articuno"} Sempre com a inical maiúscula e tomando cuidado para não errar o nome.
-
kkkkkkkkkkkkkk
-
Tópico movido para a seção de Pedidos e dúvidas resolvidas.
-
Cria Exp Kill em data/creaturescripts/scripts e coloca function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) then doPlayerAddExperience(cid, getPlayerExperience(target) / 3) end return true end function onLogin(cid) registerCreatureEvent(cid, "Exp por player") return true end Em creaturescripts.xml vc bota <event type="login" name="Explayer Login" event="script" value="Exp KIll.lua"/> <event type="kill" name="Exp por player" event="script" value="Exp KIll.lua"/> Eu coloquei pro cara ganhar 1 terço da exp do cara que ele matou...
-
E como eu faço pra saber se um pokemon é legendário? Só pelo nome?
-
Os melhores estão destacados na seção de Tutorias, se vc tiver paciência para ler, vai aprender bastante. http://www.xtibia.com/forum/forum/572-tutoriais-de-scripting/ Mas lembre-se que o melhor jeito de aprender é fazendo, treinando.
-
Oi amigo, vc só precisa adicionar uma linha no script... Vou dar um exemplo com a sd (data/spells/scripts/attacks/sudden death.lua) local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -32, -1, -48, 5, 5, 9.29, 11.89) function onCastSpell(cid, var) if doPlayerRemoveItem(cid, 2268, 1) then return doCombat(cid, combat, var) end end Oq eu fiz? Só adicionei if doPlayerRemoveItem(cid, 2268, 1) then e um end no final. 2268 é o id da sd, se for outra runa, basta mudar o id.
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.