Tudo que poko360 postou
-
[NPC] Resetador!
vou te mandar um que eu uso, ai voce configura ele --[[Script made 100% by Nogard and Night Wolf. You can feel free to edit anything you want, but don't remove the credits]] local config = { minlevel = 100000, --- level inical para resetar price = 50000000, --- preço inicial para resetar newlevel = 8, --- level após reset priceByReset = 10000000, --- preço acrescentado por reset percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total) maxresets = 5, levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset } --- end config function getResets(uid) resets = getPlayerStorageValue(uid, 2310) if resets < 0 then resets = 0 end return resets end 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid function addReset(cid) if(npcHandler:isFocused(cid)) then npcHandler:releaseFocus(cid) end talkState[talkUser] = 0 resets = getResets(cid) setPlayerStorageValue(cid, 2310, resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) local hp = getCreatureMaxHealth(cid) local resethp = hp*(config.percent/100) setCreatureMaxHealth(cid, resethp) local differencehp = (hp - resethp) doCreatureAddHealth(cid, -differencehp) local mana = getCreatureMaxMana(cid) local resetmana = mana*(config.percent/100) setCreatureMaxMana(cid, resetmana) local differencemana = (mana - resetmana) doCreatureAddMana(cid, -differencemana) doRemoveCreature(cid) local description = resets+1 db.query("UPDATE `players` SET `description` = ' [Reset: "..description.."]' WHERE `players`.`id`= ".. playerid .."") db.query("UPDATE `players` SET `level`="..config.newlevel..",`experience`= 0 WHERE `players`.`id`= ".. playerid .."") return true end local newPrice = config.price + (getResets(cid) * config.priceByReset) local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset) if msgcontains(msg, 'reset') then if getResets(cid) < config.maxresets then selfSay('Voce quer resetar seu char?', cid) talkState[talkUser] = 1 else selfSay('You already reached the maximum reset level!', cid) end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerMoney(cid) < newPrice then selfSay('Voce precisa de '..newPrice..' gold coins para resetar!', cid) elseif getPlayerLevel(cid) < newminlevel then selfSay('Voce precisa ser level '..newminlevel..' para resetar!', cid) else doPlayerRemoveMoney(cid,newPrice) playerid = getPlayerGUID(cid) addEvent(function() if isPlayer(cid) then addReset(cid) end end, 3000) local number = getResets(cid)+1 local msg ="---[Reset: "..number.."]-- You have reseted! You'll be disconnected in 3 seconds." doPlayerPopupFYI(cid, msg) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no')) and isInArray({1}, talkState[talkUser]) == TRUE then talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Ok.', cid) elseif msgcontains(msg, 'quantity') then selfSay('You have a total of '..getResets(cid)..' reset(s).', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
[NPC] Resetador!
em npc/scripts/resetador.lua tente mudar todas as db.query por db.executeQuery ou db.Query
-
Talkaction !promotion
local config = { promotion = 1, -- promotion level, default = 1 . Ignore if you don't have new vocations. minLevel = 20, -- Level needed to buy promotion cost = 20000, -- Promotion cost in gp premium = "yes" -- is premium needed to buy promotion? } local disabledVocations = {0} config.premium = getBooleanFromString(config.premium) function onSay(cid, words, param) if(isInArray(disabledVocations, getPlayerVocation(cid)) == TRUE) then doPlayerSendCancel(cid, "Your vocation cannot buy promotion.") elseif(config.premium == TRUE and isPremium(cid) == FALSE) then doPlayerSendCancel(cid, "Voce precisa ser donate para comprar promotion.") elseif(getPlayerPromotionLevel(cid) >= config.promotion) then doPlayerSendCancel(cid, "You are already promoted.") elseif(getPlayerLevel(cid) < config.minLevel) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need level " .. config.minLevel .. " to get promotion.") elseif(doPlayerRemoveMoney(cid, config.cost) ~= TRUE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You do not have enought money! (Promotion cost " .. config.cost .. " gp.") else setPlayerPromotionLevel(cid, config.promotion) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been succesful promoted to " .. getVocationInfo(getPlayerVocation(cid)).name .. ".") end return TRUE end
-
[NPC] Resetador!
adicione na primeira linha em libs/function function getResets(uid) resets = getPlayerStorageValue(uid, 36378) if resets < 0 then resets = 0 end return resets end
-
(Resolvido)[Pedido] Globalevent que executa talkactions
Alguem poderia me ajudar? queria um global events que executassem comandos de god por que os eventos do meu server eh por talkactions (uns 5) EXEMPLO ai eu queria tipo, q o global event desse um comando "/zombie 10" as 15:00h da tarde, se alguem puder ajudar vlws!
-
Magic walls e wild growth em tile Non-PVP bugadas
up
- (Resolvido)pvp não funciona
-
(Resolvido)[pedido] spells por reset
muito obrigado, REP++
-
Magic walls e wild growth em tile Non-PVP bugadas
nao amigo, nao é isso, é quando voce solta uma magic wall numa area NO PVP que ela nao funciona, em area PVP funciona normalmente
-
Magic walls e wild growth em tile Non-PVP bugadas
bom, eu tenho um evento zombie que q quando os players usam magic wall ou wild growth viram totalmente outros itens [EM SQM NO PVP], alguem poderia me informar onde eu posso mudar esses ids?
-
(Resolvido)[pedido] spells por reset
@Caronte, tipo, eu vi um problema no meu server, são os mages, ficaria desequilibrado porque mage usa SD teria como editar o dano dessa sd pra cada reset ser o dobro do dano? aqui meu script da sd 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*2.5) max = -(level*2.5) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
-
(Resolvido)[pedido] spells por reset
sim, isso seria uma boa ideia, só que tipo, esse script só pode escolher 1 vocação dps que reseta =/
-
(Resolvido)[pedido] spells por reset
é com esse storage mesmo? o storage do meu reset é 2310
-
(Resolvido)[pedido] spells por reset
attenpt to call global 'getResets' <a nil value>
-
(Resolvido)[pedido] spells por reset
deu error =s in fuction
-
(Resolvido)[pedido] spells por reset
eu testei aqui e nao funcionou deu um error tipo assim "end" to close function at line 28 <eof> local config = { hits = 2, -- quantos hits vai dar effect = 0, -- efeito distance_effect = 39, -- efeito de distance delay = 300, -- tempo entre os hits damage = COMBAT_POISONDAMAGE -- tipo de combat } local combat = createCombatObject() local function doHitCreature(target, cid, times) if isCreature(cid) and isCreature(target) and times ~= 0 then local min = math.ceil(getPlayerLevel(cid) * 1.4) doTargetCombatHealth(cid, target, config.damage, -min, -min, config.effect) doSendDistanceShoot(getThingPos(cid), getThingPos(target), config.distance_effect) addEvent(doHitCreature, config.delay, target, cid, times-1) end return true end function onTargetCreature(cid, target) return addEvent(doHitCreature, 1, target, cid, config.hits) end setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") local resetmin = 1 function onCastSpell(cid, var) if getResets(cid) >= resetmin then return doCombat(cid, combat, var) else return doPlayerSendCancel(cid, "Sorry, you need ".. resetmin .." reset to use this spell.") and doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end
-
[Pedido] Rank reset e look reset
positivo
-
(Resolvido)[pedido] spells por reset
desculpe nao responder mais cedo, eu mudei de sistema de reset pra esse --[[ SCRIPTING> MarcelloMkez <scriptING ]] --[[ [supreme Reset System] Autor: rafhael Versión: 1.0 TFS: 0.3.6 Testeado en: 8.60 Fórum: [Características] ~ Versión 1.0 ~ - Resets no Look; - Premium Account ou não; - Mudar Vocação; - Limite de Resets; - Opções para Abilitar e Desabilitar Condições; [Em Construção] - Stages Free e Premium; - 'Talvez' um novo sistema de mudar Vocação; sem data para postagem. ]] function onSay(cid, words, param) --[Configurações de Condição]__ config = { --[[verdadeiro / Falso]] needPa = false, -- Precisa de Premium Account? [true / false] needPz = true, -- Precisa estar em Protection Zone? [true / false] battle = true, -- Precisa estar sem Batlle para Resetar? [true / false] withe = false, -- Players PK Withe pode Resetar? [true / false] red = false, -- Players PK Red pode Resetar? [true / false] tp = true, -- Teleportar para o Templo após o reset? [true / false] look = true, -- Mostrar Resets no Look do Player? [true / false] addLimite = true, -- Abilitar Limite de Resets? [true / false] setClasse = false, -- Mudar Vocação do player quando resetar? [true / false] storage = 2310, -- Storage [valor] --[Configurações do Reset]__ resetStatus = { player = getPlayerGUID(cid), -- Não Mude. lvl = 100000 , -- Level Necessário para Resetar. [valor] lvlreset = 100, -- Level que retornará após o Reset. [valor] limite = 5, -- Máximo de resets que um player pode chegar. [valor] newClasse = 0, -- Id da Nova Vocação após o Reset. [valor] tempo= 3 -- Tempo para o Player deslogar para Resetar. Em segundos. [valor] }, } --[Funções]__ function Reseting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function noAll(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noTeleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noLook(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function setClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function look(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function teleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function getResets(cid) resets = getPlayerStorageValue(cid,config.storage) if resets < 1 then resets = 1 end return resets end local resets = getResets(cid) local needLvl ="Você precisa de "..config.resetStatus.lvl-getPlayerLevel(cid).." level's para resetar." local msg ="~~[Reset: "..getResets(cid).."]~~ 'Sucesso ao Resetar! Você será deslogado em "..config.resetStatus.tempo.." Segundos." --[Condiçoes]__ if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid,22,"Você Precisa estar em Protection Zone Para Resetar.") return TRUE elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then doPlayerSendTextMessage(cid, 22, "Você ja atingiu o Limite de Resets.") return TRUE elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid,22,"Você ta PK White, por isso não pode resetar.") return TRUE elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"Você ta PK Red, por isso não pode resetar.") return TRUE elseif(config.needPa == true) and not isPremium(cid) then doPlayerSendTextMessage(cid,22,"Você Precisa ser Premium Account para Resetar.") return TRUE elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"Você Precisa estar sem Battle para Resetar.") return TRUE elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then addEvent(Reseting, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then addEvent(noAll, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then addEvent(noLook, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then addEvent(noClasse, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then addEvent(setClasse, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then addEvent(look, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == false) then addEvent(teleporting, config.resetStatus.tempo* 1000, cid) elseif doPlayerSendCancel(cid, needLvl) then doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end if doPlayerPopupFYI(cid, msg) then end return TRUE end --[By: rafhael]__ qual eu devo colocar nos spells? ( aproveitando o post, se voce puder me ajuda pra criar 1 rank reset pra esse script ? obrigado !)
-
[Pedido] Rank reset e look reset
Alguem poderia disponibilizar 1 rank reset e look mostrando resets?, nao achei um que funcione =\ reset system que eu uso: --[[Script made 100% by Nogard and Night Wolf. You can feel free to edit anything you want, but don't remove the credits]] local config = { minlevel = 150, --- level inical para resetar price = 10000, --- preço inicial para resetar newlevel = 20, --- level após reset priceByReset = 0, --- preço acrescentado por reset percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total) maxresets = 50, levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset } --- end config function getResets(uid) resets = getPlayerStorageValue(uid, 378378) if resets < 0 then resets = 0 end return resets end 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid function addReset(cid) if(npcHandler:isFocused(cid)) then npcHandler:releaseFocus(cid) end talkState[talkUser] = 0 resets = getResets(cid) setPlayerStorageValue(cid, 378378, resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) local hp = getCreatureMaxHealth(cid) local resethp = hp*(config.percent/100) setCreatureMaxHealth(cid, resethp) local differencehp = (hp - resethp) doCreatureAddHealth(cid, -differencehp) local mana = getCreatureMaxMana(cid) local resetmana = mana*(config.percent/100) setCreatureMaxMana(cid, resetmana) local differencemana = (mana - resetmana) doCreatureAddMana(cid, -differencemana) doRemoveCreature(cid) local description = resets+1 db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..description.."]' WHERE `players`.`id`= ".. playerid .."") db.executeQuery("UPDATE `players` SET `level`="..config.newlevel..",`experience`= 0 WHERE `players`.`id`= ".. playerid .."") return true end local newPrice = config.price + (getResets(cid) * config.priceByReset) local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset) if msgcontains(msg, 'reset') then if getResets(cid) < config.maxresets then selfSay('You want to reset your character? It will cost '..newPrice..' gp\'s!', cid) talkState[talkUser] = 1 else selfSay('You already reached the maximum reset level!', cid) end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerMoney(cid) < newPrice then selfSay('Its necessary to have at least '..newPrice..' gp\'s for reseting!', cid) elseif getPlayerLevel(cid) < newminlevel then selfSay('The minimum level for reseting is '..newminlevel..'!', cid) else doPlayerRemoveMoney(cid,newPrice) playerid = getPlayerGUID(cid) addEvent(function() if isPlayer(cid) then addReset(cid) end end, 3000) local number = getResets(cid)+1 local msg ="---[Reset: "..number.."]-- You have reseted! You'll be disconnected in 3 seconds." doPlayerPopupFYI(cid, msg) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no')) and isInArray({1}, talkState[talkUser]) == TRUE then talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Ok.', cid) elseif msgcontains(msg, 'quantity') then selfSay('You have a total of '..getResets(cid)..' reset(s).', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
- Sistema de Reset 100%
- Sistema de Reset 100%
- Sistema de Reset 100%
- Sistema de Reset 100%
-
(Resolvido)[pedido] spells por reset
amigo, eu vo trocar de sistema de reset, se eu trocar pra outro, e colocar essas configurações das spells ainda vai funcionar?
-
(Resolvido)[pedido] spells por reset
é tudo diferente, eu ja tenho tudo editado ja, so falta botar por reset