Histórico de Curtidas
-
xBen recebeu reputação de LeoTK em [Pedido] Magia de Tirar life por segundoFiz bem explicativo qualquer duvida só perguntar a configuração esta em local config
se ajudei rep+
local function kor(cid, target, time, percent, count, i, storage) if not isCreature(target) then return true end if getPlayerStorageValue(target, storage) > os.time() then if count <= i then if isCreature(target) then doTargetCombatHealth(cid, target, COMBAT_FIREDAMAGE, -percent, -percent, CONST_ME_FIREATTACK) end end else return true end addEvent(kor, time*1000, cid, target, time, percent, count + 1, i, storage) end function onCastSpell(cid, var) local config = { count = 1, i = 15, time = 1, percent = 1, target = getCreatureTarget(cid), storage = 2020, } if not isCreature(config.target) then return doPlayerSendTextMessage(cid, 24, "Select this target.") end if(getPlayerStorageValue(config.target, config.storage) > os.time() and getPlayerStorageValue(config.target, config.storage) < 100+os.time()) then return doPlayerSendTextMessage(cid, 24, "Your target already burning.") end local health = math.ceil(getCreatureMaxHealth(config.target) * (config.percent / 100)) -- não mecha nessa linha setPlayerStorageValue(config.target, config.storage, os.time() + config.i) kor(cid, config.target, config.time, health, config.count, config.i, config.storage) -- count = sempre deixe 1 -- i = o numero de vezes que ira acontecer -- time = de quantos segundos ele vai acontecer exemplo 1 em 1 -- percent = percentagem da vida que vai tirar. -- storage = storage usada para poder parar o evento return true end Spell para remover:
function onCastSpell(cid, var) local config = { storage = 2020, } if getPlayerStorageValue(cid, config.storage) > os.time() then setPlayerStorageValue(cid, config.storage, 0) doSendMagicEffect(getThingPos(cid), 11) doPlayerSendCancel(cid, "You healed.") else doSendMagicEffect(getThingPos(cid), 11) end return true end -
xBen recebeu reputação de Lurk em [Pedido] Magia de Tirar life por segundoFiz bem explicativo qualquer duvida só perguntar a configuração esta em local config
se ajudei rep+
local function kor(cid, target, time, percent, count, i, storage) if not isCreature(target) then return true end if getPlayerStorageValue(target, storage) > os.time() then if count <= i then if isCreature(target) then doTargetCombatHealth(cid, target, COMBAT_FIREDAMAGE, -percent, -percent, CONST_ME_FIREATTACK) end end else return true end addEvent(kor, time*1000, cid, target, time, percent, count + 1, i, storage) end function onCastSpell(cid, var) local config = { count = 1, i = 15, time = 1, percent = 1, target = getCreatureTarget(cid), storage = 2020, } if not isCreature(config.target) then return doPlayerSendTextMessage(cid, 24, "Select this target.") end if(getPlayerStorageValue(config.target, config.storage) > os.time() and getPlayerStorageValue(config.target, config.storage) < 100+os.time()) then return doPlayerSendTextMessage(cid, 24, "Your target already burning.") end local health = math.ceil(getCreatureMaxHealth(config.target) * (config.percent / 100)) -- não mecha nessa linha setPlayerStorageValue(config.target, config.storage, os.time() + config.i) kor(cid, config.target, config.time, health, config.count, config.i, config.storage) -- count = sempre deixe 1 -- i = o numero de vezes que ira acontecer -- time = de quantos segundos ele vai acontecer exemplo 1 em 1 -- percent = percentagem da vida que vai tirar. -- storage = storage usada para poder parar o evento return true end Spell para remover:
function onCastSpell(cid, var) local config = { storage = 2020, } if getPlayerStorageValue(cid, config.storage) > os.time() then setPlayerStorageValue(cid, config.storage, 0) doSendMagicEffect(getThingPos(cid), 11) doPlayerSendCancel(cid, "You healed.") else doSendMagicEffect(getThingPos(cid), 11) end return true end -
xBen recebeu reputação de detoneitormen em oldKorelin - AvatarOlá estou desenvolvendo um projeto para relembrar um dos primeiros otserver em que se pode falar de inovação. (isso se não for o primeiro)
Pra quem não sabe Korelin é um servidor baseado no anime Avatar a lenda de Aang no protocolo 8.00, onde é possivel escolher entre os 4 Elementos e poder usar suas dobras (spells).
TERRA - AGUA - FOGO - AR
E com isso cada elemento tem suas vantagens.
Alem dos 4 elementos atualmente existem 3 vocações secundarias sendo elas: Knight - Paladin - Berserker.
As vocações secundarias são perfeitas para aqueles que gostam de treinar skills e também te ajuda em combate com spells exclusivas com a utilização de armas
Nosso mapa está o mais parecido possivel com o do verdadeiro KoreliN.
Já fizemos todos os sistemas como
Castle War
Forja
Water Pouch e Water Ambient
(Dobradores de agua precisam de uma bolsa de agua ou estar perto de mar ou rio para utilizar suas dobras)
Sistema Avatar
(O player que conseguir destravar a alavanca vira o novo avatar por 24horas sendo assim podendo usar os 4 elementos)
Bosses e Quest
Acompanhe nossa pagina no facebook para mais informações, postamos videos diariamente mostrando o desenvolvimento deem uma conferida.
Facebook
Show off
-
xBen recebeu reputação de kaioboyy em [Pedido] Magia de Tirar life por segundoFiz bem explicativo qualquer duvida só perguntar a configuração esta em local config
se ajudei rep+
local function kor(cid, target, time, percent, count, i, storage) if not isCreature(target) then return true end if getPlayerStorageValue(target, storage) > os.time() then if count <= i then if isCreature(target) then doTargetCombatHealth(cid, target, COMBAT_FIREDAMAGE, -percent, -percent, CONST_ME_FIREATTACK) end end else return true end addEvent(kor, time*1000, cid, target, time, percent, count + 1, i, storage) end function onCastSpell(cid, var) local config = { count = 1, i = 15, time = 1, percent = 1, target = getCreatureTarget(cid), storage = 2020, } if not isCreature(config.target) then return doPlayerSendTextMessage(cid, 24, "Select this target.") end if(getPlayerStorageValue(config.target, config.storage) > os.time() and getPlayerStorageValue(config.target, config.storage) < 100+os.time()) then return doPlayerSendTextMessage(cid, 24, "Your target already burning.") end local health = math.ceil(getCreatureMaxHealth(config.target) * (config.percent / 100)) -- não mecha nessa linha setPlayerStorageValue(config.target, config.storage, os.time() + config.i) kor(cid, config.target, config.time, health, config.count, config.i, config.storage) -- count = sempre deixe 1 -- i = o numero de vezes que ira acontecer -- time = de quantos segundos ele vai acontecer exemplo 1 em 1 -- percent = percentagem da vida que vai tirar. -- storage = storage usada para poder parar o evento return true end Spell para remover:
function onCastSpell(cid, var) local config = { storage = 2020, } if getPlayerStorageValue(cid, config.storage) > os.time() then setPlayerStorageValue(cid, config.storage, 0) doSendMagicEffect(getThingPos(cid), 11) doPlayerSendCancel(cid, "You healed.") else doSendMagicEffect(getThingPos(cid), 11) end return true end -
xBen recebeu reputação de leliofritsch em (Resolvido)Arma que evolui (wtf)Crie um arquivo lua em creaturescripts/scripts , coloque o nome de weaponLevelup.lua e adicione o script dentro.
depois vai em creaturescripts.xml adicione a tag, depois va no script login e adicione o registro
tag:
<event type="kill" name="weaponLevelUp" event="script" value="weaponLevelUp.lua"/> script:
function onKill(cid, target, lastHit) local monster = { --["nome do monstro minuscuolo"] = {storage = storage de contagem, reward = arma que vai ser transformar, weapon = arma necessaria, kill = quantidade de monstro que tem que matar} ["bat"] = {storage = 10376, reward = 2392, weapon = 2376, kill = 5}, ["rat"] = {storage = 10377, reward = 1255, weapon = 2376, kill = 20}, } if isPlayer(cid) then if isMonster(target) then local name = getCreatureName(target) local name_monster = monster[string.lower(name)] if name_monster then local weapon = monster[name:lower()].weapon if getPlayerSlotItem(cid, 6).itemid == weapon then local reward = monster[name:lower()].reward local storage = monster[name:lower()].storage local count = getPlayerStorageValue(cid, storage) local kill = monster[name:lower()].kill if count == -1 then count = 0 end count = count+1 setPlayerStorageValue(cid, storage, count) doSendAnimatedText(getPlayerPosition(target), " #"..count.." / #"..kill.." ", 65) if count == kill then doPlayerSendTextMessage(cid, 27, "Success! You have upgraded your weapon.") setPlayerStorageValue(cid, storage, -1) doTransformItem(getPlayerSlotItem(cid, 6).uid, reward) doSendMagicEffect(getPlayerPosition(cid), 7) doSendAnimatedText(getPlayerPosition(cid), " Done ", 32) end end end end end return true end registro:
registerCreatureEvent(cid, "weaponLevelUp") lembrando que a arma tem que estar no slot 6 que é o esquerdo, qualquer duvida só perguntar que eu respondo se ajudei REP+
EDIT - faltava uma verificação e estava causando bug, já foi concertado
-
xBen recebeu reputação de pedrizito15 em Spells de transformação e... Modificar magia exori1*
local outfit = 126 -- numero da outfit local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, 300000) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, 20) local function healthTime(cid, time, percent, count, i, storage) if not isPlayer(cid) then return true end if getPlayerStorageValue(cid, storage) > os.time() then if count <= i then if isPlayer(cid) then doCreatureAddHealth(cid, percent) doSendMagicEffect(getThingPos(cid), 14) print(percent) end end else doRemoveCondition(cid, CONDITION_OUTFIT) return true end addEvent(healthTime, time*1000, cid, time, percent, count + 1, i, storage) end function onCastSpell(cid, var) if not isPlayer(cid) then return true end local config = { count = 1, i = 300, time = 5, percent = 60, storage = 2020, } if(getPlayerStorageValue(cid, config.storage) > os.time() and getPlayerStorageValue(cid, config.storage) < 400+os.time()) then return doPlayerSendTextMessage(cid, 24, "You are buffed.") end doSetCreatureOutfit(cid, {lookType = outfit}, -1) doAddCondition(cid, condition) setPlayerStorageValue(cid, config.storage, os.time() + config.i) healthTime(cid, config.time, config.percent, config.count, config.i, config.storage) return true end 2*
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) local area = createCombatArea(AREA_SQUARE1X1) setCombatArea(combat, area) function onGetFormulaValues(cid, level, skill, attack, element, factor) local levelTotal, formula = level / 5, 0.0496 local normal, elemental = -(skill * attack * formula + levelTotal), math.ceil((skill * element * formula + levelTotal)) return normal/2, normal, -math.random(elemental/2, elemental) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) local config = { storage = 2020, } if getPlayerStorageValue(cid, config.storage) > os.time() then doCombat(cid, combat, var) else doPlayerSendCancel(cid, "You need activated buff.") end return true end -
xBen recebeu reputação de YuirtReta em (Resolvido)O que eu fiz de errado? NPC simplesse não der tenta isso
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 if not npcHandler:isFocused(cid) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local config = { strg1 = 200201, -- storage começando a task strg2 = 91001, -- storage finalizou a task (ganha qnd matar os monstros) idiom = 8971 } if msgcontains(msg:lower(),'task') or msgcontains(msg:lower(),'hi') then if getPlayerStorageValue(cid, config.strg2) < 1 then if getPlayerStorageValue(cid, config.strg1) < 1 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('Good one more coming soul of {portal}! Welcome, I hope you can help!', cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Que bom mais uma alma vinda do {portal}! Seja bem vindo, espero que possa nos ajudar!.', cid) talkState[talkUser] = 1 end else selfSay('you have to finish the task', cid) talkState[talkUser] = 0 end else selfSay('Voce concluiu a missao, tome aqui um Sabre, use ele ate chegar no nivel 8 e fale com o Oraculo no templo!', cid) selfSay('Ele ira te mandar para Aurea, la fale com !', cid) doPlayerAddItem(cid, 2385, 1) talkState[talkUser] = 0 end elseif msgcontains(msg:lower(), 'portal') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('Crystal angel one came down here and Aurea and opened a portal of humans who comes from another dimension for us {save}.', cid) talkState[talkUser] = 2 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Crystal uma anja desceu até aqui e em Aurea e abriu um portal de humanos que vem de outra dimensão para nós {salvar}.', cid) talkState[talkUser] = 2 end elseif msgcontains(msg:lower(), 'salvar') or msgcontains(msg:lower(), 'save') and talkState[talkUser] == 2 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('We are in an apocalyptic world, at war with several races. And you can be! {the chosen}', cid) talkState[talkUser] = 3 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Estamos em um mundo apocalíptico, em guerra com varias raças. E voce pode ser o {escolhido}!', cid) talkState[talkUser] = 3 end elseif msgcontains(msg:lower(), 'escolhido') or msgcontains(msg:lower(), 'the chosen') and talkState[talkUser] == 3 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('Congratulations, now with permission.', cid) selfSay('Such as our plague of {rats} in the city that are climbing down the drain!', cid) talkState[talkUser] = 4 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Calma primeiro precisamos treinar, voce deve nos ajudar com coisas {simples}, ate estar bem treinado!', cid) selfSay('Como por exemplo a nossa praga de {rats} na cidade que estão subindo pelos bueiros!', cid) talkState[talkUser] = 4 end elseif msgcontains(msg:lower, 'rats') and talkState[talkUser] == 4 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('Okay, so help us get this over with and kill 10 rats in the gutter in front here.', cid) setPlayerStorageValue(cid, strg1, 1) talkState[talkUser] = 0 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Ok, então ajuda-nos a acabar com isso e mate 10 ratos no bueiro aqui na frente.', cid) setPlayerStorageValue(cid, strg1, 1) talkState[talkUser] = 0 end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
xBen recebeu reputação de Sekk em [Pedido] Magia de Tirar life por segundoFiz bem explicativo qualquer duvida só perguntar a configuração esta em local config
se ajudei rep+
local function kor(cid, target, time, percent, count, i, storage) if not isCreature(target) then return true end if getPlayerStorageValue(target, storage) > os.time() then if count <= i then if isCreature(target) then doTargetCombatHealth(cid, target, COMBAT_FIREDAMAGE, -percent, -percent, CONST_ME_FIREATTACK) end end else return true end addEvent(kor, time*1000, cid, target, time, percent, count + 1, i, storage) end function onCastSpell(cid, var) local config = { count = 1, i = 15, time = 1, percent = 1, target = getCreatureTarget(cid), storage = 2020, } if not isCreature(config.target) then return doPlayerSendTextMessage(cid, 24, "Select this target.") end if(getPlayerStorageValue(config.target, config.storage) > os.time() and getPlayerStorageValue(config.target, config.storage) < 100+os.time()) then return doPlayerSendTextMessage(cid, 24, "Your target already burning.") end local health = math.ceil(getCreatureMaxHealth(config.target) * (config.percent / 100)) -- não mecha nessa linha setPlayerStorageValue(config.target, config.storage, os.time() + config.i) kor(cid, config.target, config.time, health, config.count, config.i, config.storage) -- count = sempre deixe 1 -- i = o numero de vezes que ira acontecer -- time = de quantos segundos ele vai acontecer exemplo 1 em 1 -- percent = percentagem da vida que vai tirar. -- storage = storage usada para poder parar o evento return true end Spell para remover:
function onCastSpell(cid, var) local config = { storage = 2020, } if getPlayerStorageValue(cid, config.storage) > os.time() then setPlayerStorageValue(cid, config.storage, 0) doSendMagicEffect(getThingPos(cid), 11) doPlayerSendCancel(cid, "You healed.") else doSendMagicEffect(getThingPos(cid), 11) end return true end -
xBen recebeu reputação de Sekk em [Pedido] Magia de Tirar life por segundo@Disturbbed não, não é retirado pois é dano constante de fogo e não é uma condição, então não tem como remover com exana flam
-
xBen recebeu reputação de rizen em Erro de script@rizen ta aí se ajudei rep +
local outfits = { [348] = 385, [349] = 390, } function onAttack(cid, target) doCreatureSetLookDirection(cid, getDirectionTo(getPlayerPosition(cid), getPlayerPosition(target))) if getDistanceBetween(getPlayerPosition(cid), getPlayerPosition(target)) > 1 then return true end local tmp = getCreatureOutfit(cid) if outfits[tmp.lookType] then tmp.lookType = outfits[tmp.lookType] doSetCreatureOutfit(cid, tmp, 900) end return true end @vinicius xxgamexx
isso não existe
if getDistanceBetween(getPlayerPosition(cid), getPlayerPosition(target)) > 1 then do doCreatureSetLookDirection(cid, getDirectionTo(getPlayerPosition(cid), getPlayerPosition(target))) end -
xBen recebeu reputação de fezeRa em [Pedido] Magia de Tirar life por segundoFiz bem explicativo qualquer duvida só perguntar a configuração esta em local config
se ajudei rep+
local function kor(cid, target, time, percent, count, i, storage) if not isCreature(target) then return true end if getPlayerStorageValue(target, storage) > os.time() then if count <= i then if isCreature(target) then doTargetCombatHealth(cid, target, COMBAT_FIREDAMAGE, -percent, -percent, CONST_ME_FIREATTACK) end end else return true end addEvent(kor, time*1000, cid, target, time, percent, count + 1, i, storage) end function onCastSpell(cid, var) local config = { count = 1, i = 15, time = 1, percent = 1, target = getCreatureTarget(cid), storage = 2020, } if not isCreature(config.target) then return doPlayerSendTextMessage(cid, 24, "Select this target.") end if(getPlayerStorageValue(config.target, config.storage) > os.time() and getPlayerStorageValue(config.target, config.storage) < 100+os.time()) then return doPlayerSendTextMessage(cid, 24, "Your target already burning.") end local health = math.ceil(getCreatureMaxHealth(config.target) * (config.percent / 100)) -- não mecha nessa linha setPlayerStorageValue(config.target, config.storage, os.time() + config.i) kor(cid, config.target, config.time, health, config.count, config.i, config.storage) -- count = sempre deixe 1 -- i = o numero de vezes que ira acontecer -- time = de quantos segundos ele vai acontecer exemplo 1 em 1 -- percent = percentagem da vida que vai tirar. -- storage = storage usada para poder parar o evento return true end Spell para remover:
function onCastSpell(cid, var) local config = { storage = 2020, } if getPlayerStorageValue(cid, config.storage) > os.time() then setPlayerStorageValue(cid, config.storage, 0) doSendMagicEffect(getThingPos(cid), 11) doPlayerSendCancel(cid, "You healed.") else doSendMagicEffect(getThingPos(cid), 11) end return true end -
xBen recebeu reputação de fezeRa em [Pedido] Magia de Tirar life por segundo@Disturbbed não, não é retirado pois é dano constante de fogo e não é uma condição, então não tem como remover com exana flam
-
xBen recebeu reputação de Lyon em [Pedido] Magia de Tirar life por segundo@Disturbbed não, não é retirado pois é dano constante de fogo e não é uma condição, então não tem como remover com exana flam
-
xBen recebeu reputação de xWhiteWolf em [Pedido] Magia de Tirar life por segundo@Disturbbed não, não é retirado pois é dano constante de fogo e não é uma condição, então não tem como remover com exana flam
-
xBen recebeu reputação de xWhiteWolf em [Pedido] Magia de Tirar life por segundoFiz bem explicativo qualquer duvida só perguntar a configuração esta em local config
se ajudei rep+
local function kor(cid, target, time, percent, count, i, storage) if not isCreature(target) then return true end if getPlayerStorageValue(target, storage) > os.time() then if count <= i then if isCreature(target) then doTargetCombatHealth(cid, target, COMBAT_FIREDAMAGE, -percent, -percent, CONST_ME_FIREATTACK) end end else return true end addEvent(kor, time*1000, cid, target, time, percent, count + 1, i, storage) end function onCastSpell(cid, var) local config = { count = 1, i = 15, time = 1, percent = 1, target = getCreatureTarget(cid), storage = 2020, } if not isCreature(config.target) then return doPlayerSendTextMessage(cid, 24, "Select this target.") end if(getPlayerStorageValue(config.target, config.storage) > os.time() and getPlayerStorageValue(config.target, config.storage) < 100+os.time()) then return doPlayerSendTextMessage(cid, 24, "Your target already burning.") end local health = math.ceil(getCreatureMaxHealth(config.target) * (config.percent / 100)) -- não mecha nessa linha setPlayerStorageValue(config.target, config.storage, os.time() + config.i) kor(cid, config.target, config.time, health, config.count, config.i, config.storage) -- count = sempre deixe 1 -- i = o numero de vezes que ira acontecer -- time = de quantos segundos ele vai acontecer exemplo 1 em 1 -- percent = percentagem da vida que vai tirar. -- storage = storage usada para poder parar o evento return true end Spell para remover:
function onCastSpell(cid, var) local config = { storage = 2020, } if getPlayerStorageValue(cid, config.storage) > os.time() then setPlayerStorageValue(cid, config.storage, 0) doSendMagicEffect(getThingPos(cid), 11) doPlayerSendCancel(cid, "You healed.") else doSendMagicEffect(getThingPos(cid), 11) end return true end -
xBen recebeu reputação de Alienbear em Ajuda em Magias Novas@Alienbear já estou terminando, na de heal coloquei pra healar 20% do health
local config = {
soul = soul necessaria para usar a spell
percent = porcentagem de health que vai healar
effect = efeito que ira aparecer ao utilizar
}
heal_party
function onCastSpell(cid, var) local config = { soul = 10, percent = 20, effect = 12, } if getPlayerSoul(cid) >= config.soul then if isInParty(cid) == true then for _, party in ipairs(getPartyMembers(cid)) do local health = math.ceil(getCreatureMaxHealth(party) * (config.percent / 100)) if getDistanceBetween(getThingPos(cid), getThingPos(party)) <= 4 then doSendMagicEffect(getThingPos(party), config.effect) doCreatureAddHealth(party, health) doPlayerAddSoul(cid, -config.soul) else doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(getThingPos(cid), config.effect) doCreatureAddHealth(cid, health) end end else doPlayerSendCancel(cid, "you need in party to use this spell.") end else doPlayerSendCancel(cid, "don't have soul.") end return true end haste_party
local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_TICKS, 22000) setConditionFormula(condition, 0.7, -56, 0.7, -56) function onCastSpell(cid, var) local config = { soul = 10, effect = 14, } if getPlayerSoul(cid) >= config.soul then if isInParty(cid) == true then for _, party in ipairs(getPartyMembers(cid)) do if getDistanceBetween(getThingPos(cid), getThingPos(party)) <= 5 then doSendMagicEffect(getThingPos(party), config.effect) doAddCondition(party, condition) doPlayerAddSoul(cid, -config.soul) else doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(getThingPos(cid), config.effect) doAddCondition(cid, condition) end end else doPlayerSendCancel(cid, "you need in party to use this spell.") end else doPlayerSendCancel(cid, "don't have soul.") end return true end buff_party
local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, 3000) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, 15) function onCastSpell(cid, var) local config = { soul = 10, effect = 13, } if getPlayerSoul(cid) >= config.soul then if isInParty(cid) == true then for _, party in ipairs(getPartyMembers(cid)) do if getDistanceBetween(getThingPos(cid), getThingPos(party)) <= 3 then doSendMagicEffect(getThingPos(party), config.effect) doAddCondition(party, condition) doPlayerAddSoul(cid, -config.soul) else doPlayerAddSoul(cid, -config.soul) doSendMagicEffect(getThingPos(cid), config.effect) doAddCondition(cid, condition) end end else doPlayerSendCancel(cid, "you need in party to use this spell.") end else doPlayerSendCancel(cid, "don't have soul.") end return true end se ajudei rep+ , foi interessante fazer essas spells rs
EDIT - não tinha visto a 4 e.e, vou fazer um minuto.
Bom a 4 spell fiz por talkaction era o unico modo lembrando que só funciona (talkaction "parametro) se tu usar (talkaction parametro) não vai achar o jogador
crie uma talkaction e coloque esse script
4° spell
function onSay(cid, words, param) local config = { percent = 60, -- % que o usuario irá perder de vida storage = 5890, -- storage usada effect = 13, -- efeito time = 5, -- tempo que o parceiro ira ficar protegido // segundos soul = 30, exaust = 10 -- tempo que o usuario ira poder usar de novo a spell } local health = math.ceil(getCreatureMaxHealth(cid) * (config.percent / 100)) local pos = getThingPos(cid) local t = string.explode(param, '"') if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local pid = getPlayerByNameWildcard(t[2]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") return true end if(t[2]) then if(getPlayerStorageValue(cid, config.exaust) > os.time() and getPlayerStorageValue(cid, config.exaust) < 100+os.time()) then return doPlayerSendTextMessage(cid, 24, "You are exausted.") else if getPlayerSoul(cid) >= config.soul then doCreatureAddHealth(cid, -health) setPlayerStorageValue(pid, config.storage, os.time() + config.time) setPlayerStorageValue(cid, config.exaust, os.time() + config.exaust) doPlayerSendCancel(pid, ""..getPlayerName(cid).." bless you.") doSendMagicEffect(getThingPos(pid), 14) doPlayerAddSoul(cid, -config.soul) else doPlayerSendCancel(cid, "You don't have soul.") end end end return true end depois vá em creaturescript crie um arquivo .lua e renomeie para protect.lua e adicione esse script
function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and type == STATSCHANGE_HEALTHLOSS and getPlayerStorageValue(cid, 5890) > os.time() then doSendMagicEffect(getThingPos(cid), 12) doSendAnimatedText(getThingPos(cid), "Protect ["..value.."]", COLOR_WHITE) return false else return true end return true end function onLogin(cid) registerCreatureEvent(cid, "protect") setPlayerStorageValue(cid, 5890, 0) return true end depois adicione as tag no creaturescripts.xml
<event type="statschange" name="protect" event="script" value="protect.lua"/> <event type="login" name="registerProtect" event="script" value="protect.lua"/> -
xBen recebeu reputação de Drazyn1291 em (Resolvido)Pedido Modificação de Npc de Vocation@danihcv tanto faz, por isso me desanimo em ajudar os outros nesses forums
-
xBen recebeu reputação de Drazyn1291 em (Resolvido)Pedido Modificação de Npc de Vocation@fywell tu não tem noção do que ta postando, obvio que não vai funcionar.
Ta ai amigo, testado e tudo ok, se ajudei REP +
<?xml version="1.0" encoding="UTF-8"?> <npc name="Jordan" floorchange="0" walkinterval="0"> <health now="150" max="150"/> <look type="324"/> <interaction range="3" idletime="30" defaultpublic="0"> <interact keywords="hi" focus="1"> <!--These are the keywords will trigger this interaction--> <keywords>hello</keywords> <keywords>greet</keywords> <response> <action name="script"> if(getPlayerVocation(cid) ~= 0) then selfSay("Desculpe, mas voce ja fez sua escolha!!", cid) _state.isidle = true return end if(getPlayerLevel(cid)) >= 1 then selfSay(getCreatureName(cid) .. ", qual vocation voce vai querer ser? Escolha entre {Guardian}, {Mage}, {Archer} e {Ninja}", cid) _state.b1 = (isPremium(cid) == false) _state.topic = 1 else selfSay("CHILD! COME BACK WHEN YOU HAVE GROWN UP!", cid) _state.isidle = true end </action> </response> </interact> <interact keywords="guardian" topic="2"> <response text="um Guardian! voce tem certeza? esta decisao e inreversivel!"> <!--n2: 1 = guardian, 2 = mage, 3 = ninja, 4 = archer--> <action name="script"> _state.n2 = 1 _state.topic = 3 </action> </response> </interact> <interact keywords="mage" topic="2"> <response text="um Mage! voce tem certeza? esta decisao e inreversivel!"> <!--n2: 1 = guardian, 2 = mage, 3 = ninja, 4 = archer--> <action name="script"> _state.n2 = 2 _state.topic = 3 </action> </response> </interact> <interact keywords="ninja" topic="2"> <response text="um Ninja! voce tem certeza? esta decisao e inreversivel!"> <!--n2: 1 = guardian, 2 = mage, 3 = ninja, 4 = archer--> <action name="script"> _state.n2 = 3 _state.topic = 3 </action> </response> </interact> <interact keywords="archer" topic="2"> <response text="um Archer! voce tem certeza? esta decisao e inrreversivel!"> <!--n2: 1 = guardian, 2 = mage, 3 = ninja, 4 = archer --> <action name="script"> _state.n2 = 4 _state.topic = 3 </action> </response> </interact> <!--If the player does not say any profession, repeat our question--> <interact keywords="|*|" topic="2"> <response text="Guardian, Mage, ninja, ou archer?"/> </interact> <interact keywords="yes" topic="3"> <response> <!--n1: 1 = carlin, 2 = edron, 3 = thais, 4 = venore--> <!--n2: 1 = guardian, 2 = mage, 3 = ninja, 4 = archer--> <action name="script"> selfSay("Que assim seja!", cid) doSendMagicEffect(getCreaturePosition(cid), 13) doPlayerSetVocation(cid, _state.n2) </action> <action name="idle" value="1"/> </response> </interact> <interact keywords="bye" focus="0"> <keywords>farewell</keywords> <response text="Adeus. Recomende-nos, se voce estivesse satisfeito com nosso servico."/> </interact> <!-- If the event onBusy exists, the npc will make a queue like Tibia, if the event is removed the npc will be able to talk to all customers at the same time without problems. --> <interact event="onBusy"> <response text="WAIT UNTIL IT IS YOUR TURN!"/> <action name="addqueue" value="|PLAYER|"/> </interact> <!--This event triggers if the player goes to far away from the npc/logout/idle timeout--> <interact event="onPlayerLeave" focus="0"> <response text="Volte quando estão preparados para enfrentar seu destino!!"/> </interact> </interaction> </npc> Edit - bug arrumado
-
xBen recebeu reputação de CreatServer em (Resolvido)Script Do VideoCrie um arquivo lua em creaturescripts/scripts , coloque o nome de monsterTransform.lua e adicione o script dentro.
depois vai em creaturescripts.xml adicione a tag, depois va no script login e adicione o registro
tag:
<event type="kill" name="monsterTransform" event="script" value="monsterTransform.lua"/> script:
function onKill(cid, target, lastHit) local monster = { --[["nome do monstro minusculo"] = {name = 'nome do monstro que vai se transformar'}] ["bat"] = {name = 'rat'}, ["rat"] = {name = 'bat'}, } if isPlayer(cid) then if isMonster(target) then local name = getCreatureName(target) local name_monster = monster[string.lower(name)] if name_monster then local changeMonster = monster[name:lower()].name if lastHit == true then local pos = getThingPos(target) addEvent(doCreateMonster, 50, changeMonster, pos) end end end end return true end registro:
registerCreatureEvent(cid, "monsterTransform") o Script ta bem simples e funcional e bem explicativo
eu disparei um evento na hora de criar o segundo monstro, pra ele criar na pos exata do monstro antigo
você pode adicionar varios monstros diferente só adcionar na tabela o primeiro nome é o nome do monstro que você vai matar e o segundo é o monstro que vai ser transformar, sempre use nome em minusculo
exemplo:
["dragon"] = {name = 'dragon lord'},
-
xBen recebeu reputação de Flavio S. Cabral em (Resolvido)Arma que evolui (wtf)Crie um arquivo lua em creaturescripts/scripts , coloque o nome de weaponLevelup.lua e adicione o script dentro.
depois vai em creaturescripts.xml adicione a tag, depois va no script login e adicione o registro
tag:
<event type="kill" name="weaponLevelUp" event="script" value="weaponLevelUp.lua"/> script:
function onKill(cid, target, lastHit) local monster = { --["nome do monstro minuscuolo"] = {storage = storage de contagem, reward = arma que vai ser transformar, weapon = arma necessaria, kill = quantidade de monstro que tem que matar} ["bat"] = {storage = 10376, reward = 2392, weapon = 2376, kill = 5}, ["rat"] = {storage = 10377, reward = 1255, weapon = 2376, kill = 20}, } if isPlayer(cid) then if isMonster(target) then local name = getCreatureName(target) local name_monster = monster[string.lower(name)] if name_monster then local weapon = monster[name:lower()].weapon if getPlayerSlotItem(cid, 6).itemid == weapon then local reward = monster[name:lower()].reward local storage = monster[name:lower()].storage local count = getPlayerStorageValue(cid, storage) local kill = monster[name:lower()].kill if count == -1 then count = 0 end count = count+1 setPlayerStorageValue(cid, storage, count) doSendAnimatedText(getPlayerPosition(target), " #"..count.." / #"..kill.." ", 65) if count == kill then doPlayerSendTextMessage(cid, 27, "Success! You have upgraded your weapon.") setPlayerStorageValue(cid, storage, -1) doTransformItem(getPlayerSlotItem(cid, 6).uid, reward) doSendMagicEffect(getPlayerPosition(cid), 7) doSendAnimatedText(getPlayerPosition(cid), " Done ", 32) end end end end end return true end registro:
registerCreatureEvent(cid, "weaponLevelUp") lembrando que a arma tem que estar no slot 6 que é o esquerdo, qualquer duvida só perguntar que eu respondo se ajudei REP+
EDIT - faltava uma verificação e estava causando bug, já foi concertado
-
xBen recebeu reputação de otteN em (Resolvido)Arma que evolui (wtf)Crie um arquivo lua em creaturescripts/scripts , coloque o nome de weaponLevelup.lua e adicione o script dentro.
depois vai em creaturescripts.xml adicione a tag, depois va no script login e adicione o registro
tag:
<event type="kill" name="weaponLevelUp" event="script" value="weaponLevelUp.lua"/> script:
function onKill(cid, target, lastHit) local monster = { --["nome do monstro minuscuolo"] = {storage = storage de contagem, reward = arma que vai ser transformar, weapon = arma necessaria, kill = quantidade de monstro que tem que matar} ["bat"] = {storage = 10376, reward = 2392, weapon = 2376, kill = 5}, ["rat"] = {storage = 10377, reward = 1255, weapon = 2376, kill = 20}, } if isPlayer(cid) then if isMonster(target) then local name = getCreatureName(target) local name_monster = monster[string.lower(name)] if name_monster then local weapon = monster[name:lower()].weapon if getPlayerSlotItem(cid, 6).itemid == weapon then local reward = monster[name:lower()].reward local storage = monster[name:lower()].storage local count = getPlayerStorageValue(cid, storage) local kill = monster[name:lower()].kill if count == -1 then count = 0 end count = count+1 setPlayerStorageValue(cid, storage, count) doSendAnimatedText(getPlayerPosition(target), " #"..count.." / #"..kill.." ", 65) if count == kill then doPlayerSendTextMessage(cid, 27, "Success! You have upgraded your weapon.") setPlayerStorageValue(cid, storage, -1) doTransformItem(getPlayerSlotItem(cid, 6).uid, reward) doSendMagicEffect(getPlayerPosition(cid), 7) doSendAnimatedText(getPlayerPosition(cid), " Done ", 32) end end end end end return true end registro:
registerCreatureEvent(cid, "weaponLevelUp") lembrando que a arma tem que estar no slot 6 que é o esquerdo, qualquer duvida só perguntar que eu respondo se ajudei REP+
EDIT - faltava uma verificação e estava causando bug, já foi concertado
-
xBen recebeu reputação de andreswmsoto em (Resolvido)[AJUDA]Erro de Script De Pokemon!Mude isso
local monster = getItemName(itemEx.uid):match("dead (.*)") Para isso
local monster = getItemName(itemEx.uid):match("fainted (.*)") quando der look no corpo ve se está fainted charmander mesmo, caso não esteja deixe como está.
Se ajudei REP+
-
xBen recebeu reputação de MarceLoko em [ShowOff] -- Shinobi World Online // xBenOlá, sou o benegrip do shinobi world hoje vim mostrar a pequena cdbar que nós criamos para os jutsus, ela só mostra os jutsus que o usuario já aprendeu e cada jutsu tem 5 niveis, e dependendo do nivel o cooldown pode diminuir ou aumentar, diferente das cdBar de pokemon e tudo mais, essa só server pra ver o tempo que o jutsu esta pronto novamente, pois ela é executada quando é usado algum jutsu no caso action.
-
xBen recebeu reputação de Omegas em [ShowOff] -- Shinobi World Online // xBenSistema de autoloot estilo PXG, fizemos para facilitar a jogabilidade.
-
xBen recebeu reputação de libanori1 em [ShowOff] -- Shinobi World Online // xBenSistema de autoloot estilo PXG, fizemos para facilitar a jogabilidade.