Ir para conteúdo

Sttorm

Membro
  • Total de itens

    461
  • Registro em

  • Última visita

  • Dias Ganhos

    21

Sttorm venceu a última vez em Maio 25

Sttorm teve o conteúdo mais curtido!

Sobre Sttorm

  • Rank
    Baronete

Informação de Perfil

  • Genero
    Masculino
  • Eu sou
    Scripter
  • Meu personagem
    Sttorm

Últimos Visitantes

749 visualizações
  1. @Jociel local t = { [255] = {256, 50, 3000, 3000} -- {old vocation} = {New vocation, looktype, life extra, mana extra} } local itemid, count = 2150 , 5 -- ID do item que precisa local level = 100 -- level necessario para a promotion 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local a = t[getPlayerVocation(cid)] if msgcontains(msg, "yes") then if a then if getPlayerLevel(cid) >= level then if doPlayerRemoveItem(cid, itemid, count) then local outfit = {lookType = a[2]} doPlayerSetVocation(cid, a[1]) doCreatureChangeOutfit(cid, outfit) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + a[3]) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + a[4]) addEvent(doRemoveCreature, 1000, cid) else selfSay('Voce precisa de '.. count ..' '.. getItemInfo(itemid).name ..' para fazer a super promotion.', cid) end else selfSay('Você precisa estar no level '.. level ..'.', cid) end else selfSay('Sua vocation não tem promotion disponivel', cid) end return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  2. @Jociel local t = { [255] = {256, 50, 3000, 3000} -- {old vocation} = {New vocation, looktype, life extra, mana extra} } local itemid, count = 2150 , 5 -- ID do item que precisa local level = 100 -- level necessario para a promotion 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local a = t[getPlayerVocation(cid)] local outfit = {lookType = a[2]} if msgcontains(msg, "yes") then if a then if getPlayerLevel(cid) >= level then if doPlayerRemoveItem(cid, itemid, count) then doPlayerSetVocation(cid, a[1]) doCreatureChangeOutfit(cid, outfit) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + a[3]) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + a[4]) addEvent(doRemoveCreature, 1000, cid) else selfSay('Voce precisa de '.. count ..' '.. getItemInfo(itemid).name ..' para fazer a super promotion.', cid) end else selfSay('Você precisa estar no level '.. level ..'.', cid) end else selfSay('Sua vocation não tem promotion disponivel', cid) end return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  3. @bismarkzika local v = {1, 2, 3, 5} -- Vocations que poderão usar a spell function onSay(cid, words, param, channel) local pos = getCreaturePosition(cid) local t = string.explode(param, ",") local a = getPlayerByNameWildcard(t[1]) local voc = getPlayerVocation(cid) if not isInArray(v, voc) then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Sua vocation não pode usar essa spell") return true end if (param == '') or (not t[1]) or (not t[2]) or (not isNumber(t[2])) then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Parametros incorretos") return true end if not a then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Player não encontrado") return true end if tonumber(t[2]) >= 101 or tonumber(t[2]) == 0 then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Somente de 1 a 100") return true end local b = getCreatureMana(cid) / 100 * t[2] doCreatureAddMana(cid, -b) doCreatureAddMana(a, b) return true end
  4. Posta a script pra a galera te ajudar , ninguem é vidente.
  5. @bismarkzika -- Os parâmentros do comando são : !transfer NOME DO PLAYER, QUANTIDADE DE MANA A SER DOADA -- Exemplo : !transferencia Storrm, 1 -- <talkaction words="!transferencia" event="script" value="transfer.lua"/> function onSay(cid, words, param, channel) local pos = getCreaturePosition(cid) local t = string.explode(param, ",") local a = getPlayerByNameWildcard(t[1]) if (param == '') or (not t[1]) or (not t[2]) or (not isNumber(t[2])) then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Parametros incorretos") return true end if not a then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Player não encontrado") return true end if tonumber(t[2]) >= 101 or tonumber(t[2]) == 0 then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Somente de 1 a 100") return true end local b = getCreatureMana(cid) / 100 * t[2] doCreatureAddMana(cid, -b) doCreatureAddMana(a, b) return true end
  6. local key = 378378 -- Storage do reset 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) function onGetFormulaValues(cid, level, maglevel) min = -((level / 5) + (maglevel * 4.5) + 20 + (getCreatureStorage(cid, key) * 5)) max = -((level / 5) + (maglevel * 7.6) + 48 + (getCreatureStorage(cid, key) * 5)) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  7. local t = { [255] = {256, 50, 3000, 3000} -- {old vocation} = {New vocation, looktype, life extra, mana extra} } local itemid, count = 2150 , 5 -- ID do item que precisa local level = 100 -- level necessario para a promotion 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local a = t[getPlayerVocation(cid)] local outfit = {lookType = a[2]} if msgcontains(msg, "yes") then if a then if getPlayerLevel(cid) >= level then if doPlayerRemoveItem(cid, itemid, count) then doPlayerSetVocation(cid, a[1]) doCreatureChangeOutfit(cid, outfit) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + a[3]) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + a[4]) addEvent(doRemoveCreature, 1000, cid) else selfSay("voce nao tem o item necessario", cid) end else selfSay("Voce nao tem o level necessario", cid) end else selfSay("Sua vocation não tem promotion", cid) end end return TRUE end
  8. local key = 378378 -- Storage do reset 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) function onGetFormulaValues(cid, level, skill, attack, factor) local k = getPlayerStorageValue(cid, key) local skillTotal, levelTotal = skill + attack, level / 5 return -(skillTotal * 1.5 + levelTotal)-(skillTotal * 1.5 + levelTotal)*(k*0.1), -(skillTotal * 2.5 + levelTotal)-(skillTotal * 2.5 + levelTotal)*(k*0.1) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  9. O player tem que relogar para que a vida/mana mude.
  10. @Toulouse Tenta assim 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, -60, -1, -80, 85, 100, 105, 120) local key = 378378 function onCastSpell(cid, var) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1 * getCreatureStorage(cid, key), -80 * getCreatureStorage(cid, key), 85, 100, 105, 120) if getCreatureStorage(cid, key) >= 1 then return doCombat(cid, combat2, var) end return doCombat(cid, combat, var) end
  11. @Jociel Tenta assim local t = { [255] = {256, 50, 3000, 3000} -- {old vocation} = {New vocation, looktype, life extra, mana extra} } local itemid, count = 2150 , 5 -- ID do item que precisa 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local a = t[getPlayerVocation(cid)] local outfit = {lookType = a[2]} if msgcontains(msg, "yes") then if a then if doPlayerRemoveItem(cid, itemid, count) then doPlayerSetVocation(cid, a[1]) doCreatureChangeOutfit(cid, outfit) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + a[3]) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + a[4]) selfSay("Congratulations!!", cid) else selfSay("Sua vocation não tem promotion", cid) end else selfSay("Sua vocation não tem promotion", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  12. @Jociel Cheque se configurou a tabela corretamente , cada vocation terá um tipo de looktype [255] = {256, 50, 3000, 3000} -- {old vocation} = {New vocation, looktype, life extra, mana extra}
  13. Tenta mudar doSetCreatureOutfit(cid, a[2], -1) Para doSetCreatureOutfit(cid, { looktype = a[2] }, -1)
  14. Seria por porcentagem ou pela quantidade maxima de vida ?
  15. local storage = 43214 function onUse(cid, item, frompos, item2, topos) if getCreatureStorage(cid, storage) == 1 then doPlayerSendTextMessage(cid, 27, "Você só pode usar esse item uma vez") return true end if item.itemid == item.itemid then doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doRemoveItem(item.uid,1) doCreatureSetStorage(cid, storage, 1) doSendMagicEffect(frompos, 28) doSendAnimatedText(getPlayerPosition(cid), "Skill Up", TEXTCOLOR_BLUE) return true end end
×
Close