
Tudo que Dwarfer postou
-
(Resolvido)Npc Points Event e Item Points
Os players podem vender o item que compram do Npc.
-
(Resolvido)Npc Points Event e Item Points
Qual a ideia de adicionar os pontos ao player ele ter que converter para ir ao Npc que aceita o item convertido a partir dos pontos se o Npc já aceita os pontos?
-
(Resolvido)Npc Points Event e Item Points
Bom, aqui não crashou não, mas faltava uma verificação lá. Já editei.
-
20% more exp from pvp
@Yusuf As I said before, you have to define a criterion. That's what I meant by "gain experience formula". If you know the experience that will be added to the killer based on level difference, you can do an approximation. The code I have sent you is based on dead player level and, consequently, on dead player experience approximately. You can define others like: function getGainExp(target, ratios) return math.random(ratios[1], ratios[2])*getPlayerExperience(target) end And use like this: getGainExp(target, {0.5, 0.7}) -- a value between 50% and 70% dead player experience Or: function getGainExp(cid, target, maxlevel, bigdiff, bigdiffratio) local diff = getPlayerLevel(target) - getPlayerLevel(cid) local exp = getPlayerExperience(target) if (diff + 30 <= 0) or (getPlayerLevel(cid) >= maxlevel) then return 0 elseif (diff >= bigdiff) then return bigdiffratio*exp else return (diff/10000)*exp end end And use like this: getGainExp(cid, target, 5000, 3000, 0.5) if killer level is 30 higher than dead player level -- it won't added exp if killer level is 5000 or higher -- it won't added exp if (dead player level - killer level) is 3000 or higher -- it will be added (0.5*dead player exp) that means 50% if none the before conditions occurs -- it will be added ((level difference)/10000)*dead player exp For example: level difference = 1000 It will be added 0.1*dead player exp that means 10% And so on, you can create a criterion.
-
(Resolvido)ALAVANCA DE TREINER
Se você fizer no seu servidor semelhante ao modo como esse mapa está: Em actions/scripts crie um arquivo: trainerlever.lua Em actions.xml, adicione a tag: <action actionid="ACTIONID_DA_ALAVANCA" script="trainerlever.lua" />
-
(Resolvido)2 script de potion
@jNo Sim, o exausthed é o mesmo dos potions. Da segunda forma que você colocou aí funcionaria, mas faça assim:
-
(Resolvido)2 script de potion
Você consegue editar o valor de heal da mana potion no seu script de potions. Essa parte mana = {750, 1000} é o {valor mínimo, valor máximo} para healar. Sobre o outro, crie um arquivo em actions/scripts: potionifinito.lua Em actions.xml: <action itemid="ID_DO_ITEM" script="potioninfinito.lua" />
-
Spells Effect
@Messe Não entendi bem. Um item na posição do player? Vê se é isso aí.
-
(Resolvido)Npc Points Event e Item Points
Talkaction: Tag no talkactions.xml: <talkaction words="!converteventpoints" event="script" value="NOMEDOARQUIVO.lua"/> Você já me pediu isso e o NPC em outro tópico: Além disso, criou outro tópico com a mesma questão.
-
A runa só pode ser usada sem pz
-
(Resolvido)Erro ao mudar automaticamente uma outifit quando logar
Tinha esquecido uma parte, já editei, vai trocar o outfit.
-
(Resolvido)Erro ao mudar automaticamente uma outifit quando logar
function onLogin(cid) visual = { [0] = {lookType = 24}, [1] = {lookType = 28}, [6] = {lookType = 31} } local checkvisual = visual[getPlayerVocation(cid)] if not checkvisual then return true end local outfit = getCreatureOutfit(cid) outfit.lookType = checkvisual.lookType doSetCreatureOutfit(cid, outfit, -1) doCreatureSay(cid, "Welcome!", TALKTYPE_ORANGE_1) return true end
-
[PEDIDO/AJUDA] System Reset
Está dando errado porque esse script de reset não tem isso, procure um mais completo. Existem vários aqui no fórum Enviado de meu GT-S7582L usando Tapatalk
-
(Resolvido)Bau De Quest e Porta Que precisa dele
Em actions/scripts crie um arquivo: baulivro.lua local bookid = 1111 -- id do livro aqui local info = "Hiho, my name is Dwarfer. Bye!" function onUse(cid, item, fromPosition, itemEx, toPosition) local p = getPlayerPosition(cid) if getPlayerStorageValue(cid, 19056) ~= -1 then doPlayerSendCancel(cid, "You have already done this quest.") doSendMagicEffect(p, CONST_ME_POFF) return true end local book = doPlayerAddItem(cid, bookid, 1) doItemSetAttribute(book, "text", info) setPlayerStorageValue(cid, 19056, 1) return true end Adicione a tag em actions.xml: <action actionid="ACTION_ID_DO_BAÚ" script="baulivro.lua" /> Caso queira fazer algo maior, dê uma olhada: Para a porta, crie outro arquivo: portacheck.lua function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 19056) == -1 then doPlayerSendCancel(cid, "You don't have the necessary permission to enter.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition) return true end Em actions.xml: <action actionid="ACTION_ID_DO_BAÚ" script="portacheck.lua" />
-
20% more exp from pvp
Hi. This could be difficult to do in tfs 0.4. I think it could be possible if you have a "gain experience formula" for dead player level. Even so, it would be an approximation. Additionally, you can try to add extra exp during a time if player kills another player, according to dead player level. If you think this could be useful, here you go. In actions/scripts, create a file: expkill.lua Add the tag in actions.xml: <action itemid="ITEMID" script="expkill.lua" /> In creaturescripts/scripts, create a file: killexp.lua In creaturescripts.xml, add the tag: <event type="kill" name="KillExp" event="script" value="killexp.lua"/> And register the event in the login.lua: registerCreatureEvent(cid, "KillExp")
-
(Resolvido)Ao matar um player ganha item
Então funcionou, você não disse que era para checar se está de mc?
-
(Resolvido)Script ,Falante.
Em creaturescripts/scripts crie um arquivo: staffeffect.lua local t = {access = 3, -- acesso mínimo para sair o efeito text = "STAFF", textcolor = COLOR_ORANGE, effect = CONST_ME_FIREWORK_YELLOW, interval = 10} function onLogin(cid) if getPlayerAccess(cid) >= t.access then SendEffect(cid, t.effect, t.text, t.interval, t.textcolor) end return true end function SendEffect(cid, effect, text, time, color) if isPlayer(cid) then doSendMagicEffect(getPlayerPosition(cid), effect) doSendAnimatedText(getPlayerPosition(cid), text, color) addEvent(SendEffect, time*1000, cid, effect, text, time, color) end return true end Em creaturescripts.xml, adicione a tag: <event type="login" name="StaffEffect" event="script" value="staffeffect.lua"/>
-
Spells Effect
-
(Resolvido)Ao matar um player ganha item
Em creaturescripts/scripts, crie um arquivo.lua: local item,count = 2160,1 function onDeath(cid, corpse, deathList) local player = deathList[1] if not isPlayer(player) then return true end if getPlayerIp(cid) ~= getPlayerIp(player) then addEvent(doPlayerAddItem,1,player,item,count) end return true end Em creaturescripts.xml: <event type="death" name="DeathItem" event="script" value="NOMEDOARQUIVO.lua"/> No login.lua, registre o evento: registerCreatureEvent(cid, "DeathItem") O npc procura aí que tem.
-
[PEDIDO/AJUDA] System Reset
local point_id = 9970 local point_count = 20 function onSay(cid, words, param) local level = 1500 --level pra ser resetado local RemainingLvl = 8 --lvl que ele ficara depois do reset local pid = getPlayerGUID(cid) function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid,1020,resets+1) return true end function getResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end if getPlayerLevel(cid) >= level then addReset(cid) doPlayerAddItem(cid, point_id, point_count) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid).." reset.") doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..RemainingLvl..", `experience` = 0 WHERE `id` = "..pid) else doPlayerSendCancel(cid, "You need to have level "..level.." or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end
-
(Resolvido)Remover repetição de fala
-- ASSIM if getPlayerLevel(cid) < 250 then doPlayerSendTextMessage(cid, 20, "Blessings free up to level 250.") for i = 1, 5 do doPlayerAddBlessing(cid, i) end end -- OU ASSIM if getPlayerLevel(cid) < 250 then doSendAnimatedText(getPlayerPosition(cid), "Bless!", COLOR_ORANGE) for i = 1, 5 do doPlayerAddBlessing(cid, i) end end
-
A runa só pode ser usada sem pz
function onCastSpell(cid, item, fromPosition, itemEx, toPosition) local hpmax = getCreatureMaxHealth(cid) local min = 15.0 -- this means 15% minimum healing local max = 15.0 -- this means 15% maximum healing local hp_add = math.random((hpmax * (min/100)), (hpmax * (max/100))) if(hasCondition(cid, CONDITION_EXHAUST)) then doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "You are exhausted") return true end if isPlayerPzLocked(cid) then doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Murderes can not use this.") return true end doCreatureAddHealth(cid, hp_add) doSendMagicEffect(getThingPos(cid), 12) doSendAnimatedText(getPlayerPosition(cid),"+"..hp_add.."", TEXTCOLOR_GREEN) return true end
-
(Resolvido)Exana All
local conditions = {CONDITION_FIRE, CONDITION_ENERGY, CONDITION_POISON} -- adicione as conditions que você quer remover local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) function onCastSpell(cid, var) for i, v in pairs(conditions) do doRemoveCondition(cid, v) end doSendMagicEffect(getPlayerPosition(cid), CONST_ME_STUN) return doCombat(cid, combat, var) end
-
ANTI MC - EVENTOS - GLOBALEVENTS
Se não tiver acesso maior que 3, vai funcionar Enviado de meu GT-S7582L usando Tapatalk
-
ANTI MC - EVENTOS - GLOBALEVENTS
Fiz um mais completo aqui. Nesse caso, vai verificar todos os andares configurados e vai deixar somente um player de cada ip na área, ou seja, removerá todos os MC's. Além disso, é possível fazer a verificação para mais de uma área. Você pode escolher se vai kickar e/ou teleportar o player para o templo. Em globalevents/scripts, crie um arquivo: removeMC.lua Em globalevents.xml, adicione a tag: <globalevent name="RemoveAllMc" interval="30000" event="script" value="removeMC.lua"/> Edite o intervalo para o desejo, coloquei como exemplo 30 segundos.