Tudo que Storm postou
-
(Resolvido)modificação em spell
Código editado.
-
(Resolvido)modificação em spell
Código editado.
-
Nao consigo abrir o forgottenserver!
@Daniel Teixeira o arquivo a ser executado é o PO Dash World
-
Kill monster and get storage? please TFS 1.3
-- XML's of tfs 0.4 (the XML's not tested in tfs 1.3) -- <event type="kill" name="Death" event="script" value="death.lua"/> -- <event type="login" name="Deathh" event="script" value="death.lua"/> local t = { -- Example : ["Monster name"] = storage ["Goblin"] = {35567}, ["Spider"] = {45678}, } function onKill(cid, target) if not monster:isMonster(target) then return false end local monster = t[creature:getName(target)] if monster then player:setStorageValue(cid, monster[1], player:getStorageValue(cid, monster[1])+1) player:sendTextMessage(cid, 27, "".. monster ..": ".. player:getStorageValue(cid, monster[1])..".") end return true end function onLogin(cid) creature:registerEvent(cid, "Death") return true end
-
[Help] Regarding Command Script (talkaction)
@selenia.global Just use the condition to see if it's in battle if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendTextMessage(cid, 13, "You can only use the command without being in battle") return false end
-
Bug no Executavel
<?xml version="1.0" encoding="UTF-8"?> <creaturescripts> <event type="login" name="PlayerLogin" event="script" value="login.lua"/> <event type="logout" name="PlayerLogout" event="script" value="login.lua"/> <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/> <event type="receivemail" name="Mail" event="script" value="mail.lua"/> <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/> <event type="think" name="Idle" event="script" value="idle.lua"/> <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/> </creaturescripts> Removi todos as antigas scripts adicionadas , caso não funcione , volte com a antiga XML e execute o programa para ligar o servidor e tire um print nas primeiras linhas.
-
(Resolvido)modificação em spell
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -415.0, 0, -425.0, 0) arr1 = { {0, 3, 0} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1 } local target = getCreatureTarget(cid) -- Coloque na XML needtarget="1" local time = 2 -- segundos em que ficará paralizado if isMonster(target) then local position = {x=getThingPosition(getCreatureTarget(cid)).x+3, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} addEvent(onCastSpell1, 0, parameters) doSendMagicEffect(position, 265) return false end local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+3, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} addEvent(onCastSpell1, 0, parameters) doCreatureSetNoMove(target, true) addEvent(doCreatureSetNoMove, time * 1000, target, false) doPlayerSendTextMessage(cid, 13, "voce paralizou o player ".. getCreatureName(target) ..".") doPlayerSendTextMessage(target, 13, "voce foi paralizado pelo player ".. getCreatureName(cid) ..".") doSendMagicEffect(position1, 265) return true end
-
Bug no Executavel
@Lojons Pode postar sua creaturescripts.xml aqui ?
-
Bug no Executavel
@Lojons você adicionou alguma creaturescript recentemente ?
-
Modificar Spell
Está removendo sim ... ela remove o item necessário para executar a spell , está configurado corretamente , o problema é com você.
-
Script de transformar para !saga
Mas você pode cara , é só ir adicionando mais tabelas.
-
Script de transformar para !saga
local saga = { -- Naruto --- [1] = {840,91,841,676,842,40,842,40,305,677,686,179,683,397,607,752,875}, -- [ID DA VOCATION] = { ID DAS OUTFITS EM ORDEM } } local level = 5 -- Limite para liberar uma saga nova function onSay(cid, words, param, channel) if exhaustion.check(cid, 120) == TRUE then doPlayerSendCancel(cid, "You are exhausted.") doSendMagicEffect(getCreaturePosition(cid), 3) return TRUE end if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") exhaustion.set(cid, 120, 0.5) return true end if not saga[getPlayerVocation(cid)] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") exhaustion.set(cid, 120, 0.5) return true end local t = string.explode(param, ",") if(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Could not understand.") return true end if not (tonumber(t[1])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") exhaustion.set(cid, 120, 0.5) return true end if tonumber(t[1]) > #saga[getPlayerVocation(cid)] or tonumber(t[1]) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga não existe.") exhaustion.set(cid, 120, 0.5) return true end if getPlayerLevel(cid) >= (tonumber(t[1])*level) then doCreatureChangeOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[1])]}) doSendMagicEffect(getThingPos(cid), saga[getPlayerVocation(cid)].effect) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce escolheu uma nova saga!") doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1) exhaustion.set(cid, 120, 0.5) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa de level "..(tonumber(t[1]) * level).." usar essa saga.") end return true end
-
Modificar Spell
function doShowTimeByPos(uid, pos, duration, type) type = type or 20 for i = 0, (duration - 1) do addEvent(function() if isCreature(uid) then doSendAnimatedText(pos, tostring(duration - i), type) end end, i * 1000) end return true end local config = { storageID = 49615, storageID2 = 49620, tempo = 1, -- Tempo de duracao da marcacao itemID = 11502, -- item ID da sprite que fica no chao effectWhenTeleport = 82, -- Efeito que aparece no player quando é teleportado effectWhenExpired = 2, -- Efeito que aparece quando a skill expira } local errorMsg = { alreadyMarked = "Voce ja possui uma marcacao em andamento neste slot.", expired = "A skill de selamento expirou.", } function onCastSpell(cid, var) local markedPosition = getPlayerPosition(cid) if getPlayerStorageValue(cid, config.storageID) <= os.time() and not getPlayerStorageValue(cid, config.storageID) == -1 then doPlayerSendTextMessage(cid, 22, errorMsg.alreadyMarked) return false end local item = 2160 -- id do item local count = 1 -- qnt necessária pra usar a spell if getPlayerItemCount(cid, item) < count then doPlayerSendTextMessage(cid, 22, "voce n tem o item necessario") return false end local randomi = math.random(2000,35687) local item = doCreateItem(config.itemID, 1, markedPosition) doItemSetAttribute(item, "uid", randomi) doShowTimeByPos(cid, markedPosition, 60, 210) doPlayerRemoveItem(cid, item, count) setPlayerStorageValue(cid, config.storageID, os.time() + getTime()) setPlayerStorageValue(cid, config.storageID2, 1) doPlayerSendTextMessage(cid, 22, "Voce tem ".. config.tempo .." minutos para usar a spell antes que ela expire.") addEvent(doRemoveItem, 60000, randomi) local estrutura = { cid = cid, markedPosition = markedPosition, timeFinal = os.time() + getTime() } addEvent (teleportIsTrue, 100, estrutura) return true end function getTime () return config.tempo * 60 end function teleportIsTrue (st) if os.time() > st.timeFinal then setPlayerStorageValue(st.cid, config.storageID2, 0) doPlayerSendTextMessage(st.cid, 22, errorMsg.expired) return false elseif getPlayerStorageValue(st.cid, config.storageID2) == 2 then doTeleportThing(st.cid, st.markedPosition, true) setPlayerStorageValue(st.cid, config.storageID2, 1) doSendMagicEffect(getPlayerPosition(st.cid), config.effectWhenTeleport) end addEvent (teleportIsTrue, 100, st) return true end
-
Modificar Spell
Configure aqui local item = 2160 -- id do item local count = 1 -- qnt necessária pra usar a spell Está funcionando 100% , eu mesmo já testei.
-
Erro no executavel.exe
Cheque se você colocou as dlls corretamentes na pasta do servidor ; verifique se não está faltando alguma
-
Erro no executavel.exe
Cheque se as DLL's estão corretas.
-
Dungeon Finder
Eu vi na script que é onThink , porém na XML não está justificado o type do globalevent Mude de <globalevent name="dungeon" interval="1000" event="script" value="dungeon.lua"/> Para <globalevent name="dungeon" type="think" interval="1000" event="script" value="dungeon.lua"/> Não sei se é isso , porém já que não retorna erro na distro ...
-
Modificar Spell
function doShowTimeByPos(uid, pos, duration, type) type = type or 20 for i = 0, (duration - 1) do addEvent(function() if isCreature(uid) then doSendAnimatedText(pos, tostring(duration - i), type) end end, i * 1000) end return true end local config = { storageID = 49615, storageID2 = 49620, tempo = 1, -- Tempo de duracao da marcacao itemID = 11502, -- item ID da sprite que fica no chao effectWhenTeleport = 82, -- Efeito que aparece no player quando é teleportado effectWhenExpired = 2, -- Efeito que aparece quando a skill expira } local errorMsg = { alreadyMarked = "Voce ja possui uma marcacao em andamento neste slot.", expired = "A skill de selamento expirou.", } function onCastSpell(cid, var) local markedPosition = getPlayerPosition(cid) if getPlayerStorageValue(cid, config.storageID) <= os.time() and not getPlayerStorageValue(cid, config.storageID) == -1 then doPlayerSendTextMessage(cid, 22, errorMsg.alreadyMarked) return false end local item = 2160 -- id do item local count = 1 -- qnt necessária pra usar a spell if getPlayerItemCount(cid, item) < count then doPlayerSendTextMessage(cid, 22, "voce n tem o item necessario") return false end local randomi = math.random(2000,35687) local item = doCreateItem(config.itemID, 1, markedPosition) doItemSetAttribute(item, "uid", randomi) doShowTimeByPos(cid, markedPosition, 60, 210) setPlayerStorageValue(cid, config.storageID, os.time() + getTime()) setPlayerStorageValue(cid, config.storageID2, 1) doPlayerRemoveItem(cid, item, count) doPlayerSendTextMessage(cid, 22, "Voce tem ".. config.tempo .." minutos para usar a spell antes que ela expire.") addEvent(doRemoveItem, 60000, randomi) local estrutura = { cid = cid, markedPosition = markedPosition, timeFinal = os.time() + getTime() } addEvent (teleportIsTrue, 100, estrutura) return true end function getTime () return config.tempo * 60 end function teleportIsTrue (st) if os.time() > st.timeFinal then setPlayerStorageValue(st.cid, config.storageID2, 0) doPlayerSendTextMessage(st.cid, 22, errorMsg.expired) return false elseif getPlayerStorageValue(st.cid, config.storageID2) == 2 then doTeleportThing(st.cid, st.markedPosition, true) setPlayerStorageValue(st.cid, config.storageID2, 1) doSendMagicEffect(getPlayerPosition(st.cid), config.effectWhenTeleport) end addEvent (teleportIsTrue, 100, st) return true end
-
Modificar Spell
function doShowTimeByPos(uid, pos, duration, type) type = type or 20 for i = 0, (duration - 1) do addEvent(function() if isCreature(uid) then doSendAnimatedText(pos, tostring(duration - i), type) end end, i * 1000) end return true end local config = { storageID = 49615, storageID2 = 49620, tempo = 1, -- Tempo de duracao da marcacao itemID = 11502, -- item ID da sprite que fica no chao effectWhenTeleport = 82, -- Efeito que aparece no player quando é teleportado effectWhenExpired = 2, -- Efeito que aparece quando a skill expira } local errorMsg = { alreadyMarked = "Voce ja possui uma marcacao em andamento neste slot.", expired = "A skill de selamento expirou.", } local item = 2160 -- id do item local count = 1 -- qnt necessária pra usar a spell function onCastSpell(cid, var) local markedPosition = getPlayerPosition(cid) if getPlayerStorageValue(cid, config.storageID) <= os.time() and not getPlayerStorageValue(cid, config.storageID) == -1 then doPlayerSendTextMessage(cid, 22, errorMsg.alreadyMarked) return false end if getPlayerItemCount(cid, item) <= count then doPlayerSendTextMessage(cid, 22, "voce n tem o item necessario") return false end local randomi = math.random(2000,35687) local item = doCreateItem(config.itemID, 1, markedPosition) doItemSetAttribute(item, "uid", randomi) doShowTimeByPos(cid, markedPosition, 60, 210) setPlayerStorageValue(cid, config.storageID, os.time() + getTime()) setPlayerStorageValue(cid, config.storageID2, 1) doPlayerSendTextMessage(cid, 22, "Voce tem ".. config.tempo .." minutos para usar a spell antes que ela expire.") addEvent(doRemoveItem, 60000, randomi) local estrutura = { cid = cid, markedPosition = markedPosition, timeFinal = os.time() + getTime() } addEvent (teleportIsTrue, 100, estrutura) return true end function getTime () return config.tempo * 60 end function teleportIsTrue (st) if os.time() > st.timeFinal then setPlayerStorageValue(st.cid, config.storageID2, 0) doPlayerSendTextMessage(st.cid, 22, errorMsg.expired) return false elseif getPlayerStorageValue(st.cid, config.storageID2) == 2 then doTeleportThing(st.cid, st.markedPosition, true) setPlayerStorageValue(st.cid, config.storageID2, 1) doSendMagicEffect(getPlayerPosition(st.cid), config.effectWhenTeleport) end addEvent (teleportIsTrue, 100, st) return true end
-
Storage com X Tempo
function onSay(cid, words, param, channel) local sto = 24564 local time = 60 -- em seg setPlayerStorageValue(cid, storage + os.time + time * 1000, 1) return true end
-
Ao pisar em tile alterar a storage
Movements/script local storage = 14736 function onStepIn(cid, item, position, fromPosition) setPlayerStorageValue(cid, storage, 1) return true end function onStepOut(cid, item, position, fromPosition) setPlayerStorageValue(cid, storage, -1) return true end Movements/XML <movevent type="StepIn" itemid="1717" event="script" value="tiles.lua"/> <movevent type="StepOut" itemid="1718" event="script" value="tiles.lua"/>
-
(Pedido) Pesca
Inverta os Ids, onde está man coloque o outfit de girl e de girl coloca o de homem
-
(Resolvido)Modificar spell
Então faz assim , exclua no Object Builder o effect que aparece enquanto está de ghost.
-
(Resolvido)Modificar spell
doSendMagicEffect(position1, 83) Remova.
-
(Pedido) Pesca
Configure aqui local girl = 321 -- Outfit de pesca girl local man = 320 -- Outfit de pesca man Se não der certo , inverta o ID das outfits entre as duas variáveis.