
Tudo que Dwarfer postou
-
[Script] Movements
Eu entendi, realmente tem esse erro no código que eu te passei. É melhor você tentar encontrar outra forma, pois imagine muitos players colocando o looktype na variável global out, creio que poderia trazer algum problema ao servidor. Com relação a funcionar, me referi ao código que você mesmo postou.
-
[Script] Movements
Ahh sim. Pra ser sincero, eu nem testei isso, quando vi o tópico lembrei que uma vez tive essa mesma dúvida e lembrei que tinha algo a respeito disso, aí mandei pra você, mas nem lembrava se tinha dado errado em alguma coisa, nem sei porque eu testei dessa forma. Com relação a esse problema, creio que seja relacionado ao seu servidor, pois aqui o seu funcionou corretamente, mesmo ao deslogar.
-
(Resolvido)Invasao de Monsters Aleatorios
Crie um arquivo em globalevents.lua: E adicione a tag no globalevents.xml: <globalevent name="RandomInvasao" interval="10800000" event="script" value="NOMEDOSEUARQUIVO.lua"/> Edite o interval como queira. Tá configurado para acontecer de 3 em 3 horas e remover a cada 1h e meia.
-
(Resolvido)Npc Points Event e Item Points
local points = {15, 30, 50, 75, 100} function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 92431) == -1 then setPlayerStorageValue(cid, 92431, 0) end rand = points[math.random(1, #points)] doPlayerAddEventPoints(cid, rand) doCreatureSay(cid, "Parabéns! Você recebeu " .. rand .. " Event Points!", TALKTYPE_ORANGE_1) doRemoveItem(item.uid) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_STUN) return true end function doPlayerAddEventPoints(cid, amount) local current = getPlayerStorageValue(cid, 92431) setPlayerStorageValue(cid, 92431, current + amount) return true end
-
[Script] Movements
outfits = { [0] = {lookType = 159}, [1] = {lookType = 160} } out = {} function onEquip(cid, item, slot) outfit = getCreatureOutfit(cid) table.insert(out, tonumber(outfit.lookType)) outfit.lookType = outfits[getPlayerSex(cid)].lookType doSetCreatureOutfit(cid, outfit, -1) return true end function onDeEquip(cid, item, slot) outfit.lookType = out[1] out = {} doSetCreatureOutfit(cid, outfit, -1) return true end
-
(Resolvido)Npc Points Event e Item Points
Action: Em actions.xml: <action itemid="ID_DO_ITEM" event="script" value="NOMEDOARQUIVO.lua"/> NPC:
-
(Resolvido)Acrescentar função no sistema ppoints
3) Sim, todas no mysql. Você pediu para que resetasse os pontos, então é só apagar a coluna.
-
(Resolvido)Acrescentar função no sistema ppoints
Não é gambiarra. Você pode executar na sua database: Para excluir os p_points das contas: ALTER TABLE `accounts` DROP `p_points` Aí você pode adicionar novamente: ALTER TABLE `accounts` ADD `p_points` INTEGER NOT NULL DEFAULT 0 E para setar aos players o storage 1219 igual a -1: UPDATE `player_storage` SET `value`=-1 WHERE `key`= 1219
-
(Resolvido)Acrescentar função no sistema ppoints
Como você queria dar os pontos àqueles que ficaram X tempo online no seu servidor, o que eu fiz foi pegar o tempo online do player toda hora que ele entra no servidor. Esse problema aí aconteceu porque você não deslogou antes de dar o reload e já estava com o os.time() na storage. Então, ao somar o os.time() com o tempo que você ficou online pela última vez, deu esse número grande. Se você tivesse a storage de 1219 igual a -1 ou mesmo 0, funcionaria corretamente.
-
(Resolvido)Acrescentar função no sistema ppoints
Você vai substituir esses que você mandou aqui. Você tem que retirar a tag que o eventype = "logout" e deixar a tag que o eventype = "login" que você tinha adicionado antes quando configurando o sistema.
-
(Resolvido)Acrescentar função no sistema ppoints
No creaturescripts: E retire a tag <event type="logout" name="PlayerResetPointsTimer" event="script" value="points.lua"/> do creaturescripts.xml. No globalevents: No talkactions:
-
(Resolvido)Erro Login.lua
-
(Resolvido)[Pedido] NPC DA ITEM APENAS 1 VEZ
Não é que a gente não tenha entendido. Você que não falou nada disso, leia novamente o que você escreveu: Edite as falas como quiser:
-
(Resolvido)[Pedido] NPC DA ITEM APENAS 1 VEZ
-
quest
Como você quer que ensine como é, vou mostrar da forma mais simples: Claro que você também poderia fazer algo do tipo:
-
(Resolvido)Ajuda, Comprando via site dizendo que não tem cap!
Tente assim:
-
(Resolvido)Não se potar dentro do pz
if itemEx.uid ~= cid and getTilePzInfo(getThingPos(itemEx.uid)) then return doPlayerSendDefaultCancel(cid, RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE) end
-
(Resolvido)Não se potar dentro do pz
Agora entendi.
-
(Resolvido)Não se potar dentro do pz
...
-
(Resolvido)Não se potar dentro do pz
-
(Resolvido)Não se potar dentro do pz
Esse não é o seu arquivo potions.lua. Isso aí é um npc que vende potion. Procure em actions.
-
Estatua que teleporta
local t = { newpos = {x=1,y=1,z=1}, effect = CONST_ME_TELEPORT, vocations = {1,2,3,4}, id = 2160, remover = "yes", level = 10, tempo = 30 -- em segundos } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 19883) - os.time() > 0 then return doPlayerSendCancel(cid, "Você deve esperar "..t.tempo.." segundos para usar novamente.") end if getPlayerItemCount(cid, t.id) == 0 then return doPlayerSendCancel(cid, "Você não tem o item necessário.") end if getPlayerLevel(cid) < t.level then return doPlayerSendCancel(cid, "O level mínimo requerido é "..t.level.." .") end if not isInArray(t.vocations, getPlayerVocation(cid)) then return doPlayerSendCancel(cid, "Você não tem a vocação necessária.") end if not isPremium(cid) then return doPlayerSendCancel(cid, "Você não é premium.") end setPlayerStorageValue(cid, 19883, t.tempo + os.time()) doTeleportThing(cid, t.newpos) doSendMagicEffect(t.newpos, t.effect) if t.remover == "yes" then doPlayerRemoveItem(cid, t.id, 1) end return true end
-
(Resolvido)[PEDIDO] Limite de skill
Como assim, amigo? Tente explicar melhor seu problema.
-
Estatua que teleporta
Tente pedir tudo de uma só vez, amigo. local newpos, effect = {x=1,y=1,z=1}, CONST_ME_TELEPORT local vocations = {1,2,3,4} local id, remover = 2160, "yes" function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerItemCount(cid, id) == 0 then return doPlayerSendCancel(cid, "Você não tem o item necessário.") end if isInArray(vocations, getPlayerVocation(cid)) and isPremium(cid) then doTeleportThing(cid, newpos) doSendMagicEffect(newpos, effect) if remover == "yes" then doPlayerRemoveItem(cid, id, 1) end else doPlayerSendCancel(cid, "Você não tem a vocação necessária ou não é premium.") end return true end É só alterar o id 2160 para o seu.
-
Estatua que teleporta
local newpos, effect = {x=1,y=1,z=1}, CONST_ME_TELEPORT local vocations = {1,2,3,4} function onUse(cid, item, fromPosition, itemEx, toPosition) if isInArray(vocations, getPlayerVocation(cid)) and isPremium(cid) then doTeleportThing(cid, newpos) doSendMagicEffect(newpos, effect) else doPlayerSendCancel(cid, "Você não tem a vocação necessária ou não é premium.") end return true end