Tudo que Storm postou
-
[PEDIDO] Sistema de contagem para uma determinada arena de PVP
Aqui um exemplo, onde está toPos e fromPos você irá colocar as posições respectivas no Remeres : Esquece esse tile , é de outro sistema , onde está pos1 coloque a fromPos e onde está pos2 coloque a toPos
-
[PEDIDO] Sistema pra abrir inscrições torneio, fechar inscrições e iniciar torneio
@TicioMadara Você quer apenas as talkactions de mandarem o Broadcast ou quer o sistema de torneio completo ?
-
(Resolvido)Npc que dê outfitte por Quest
"You started the task" = Você já iniciou a missão , ou seja, está correto. 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 local storage = 35678 -- monster kill | local sto = 24529 -- don't pick premio | -- | Não mecha nessa gambiarra aqui , só certifique que nenhuma dessas storages sejam usadas em outros sistemas local rage = 24525 -- inicializate contage | local ok = 45651 -- don't inicializate | local exp = 100 -- Quantidade de XP local monster = 100 -- Quantos monstros terá que matar local outfit = { male = 10, -- ID da outfit male female = 11 -- ID da outfit female } local potion, count = 2139, 10 -- ID da potion , Count. local gold = 1000 -- quanto de money irá ganhar if(msgcontains(msg, 'premio')) then if getPlayerStorageValue(cid, sto) == -1 then if getPlayerStorageValue(cid, storage) >= 100 then selfSay("You have finished the task", cid) doPlayerAddItem(cid, potion, count) doPlayerAddMoney(cid, gold) doPlayerAddExp(cid, exp) doSendMagicEffect(getCreaturePosition(cid), 5) setPlayerStorageValue(cid, rage, -1) setPlayerStorageValue(cid, sto, 1) setPlayerStorageValue(cid, fuck, 1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, outfit.male, 0) else doPlayerAddOutfit(cid, outfit.female, 0) end else selfSay("You need kill 100 monsters do finish the task", cid) end else selfSay("back from here nigga", cid) end end if(msgcontains(msg, 'accept')) then if getPlayerStorageValue(cid, ok) == -1 then selfSay("voce iniciou a missao", cid) setPlayerStorageValue(cid, ok, 1) setPlayerStorageValue(cid, rage, 1) else selfSay("Voce ja iniciou a missao", cid) end end end
-
Tirar outfits
Exato
-
Tirar outfits
Você poderia colocar uma script no seu servidor que , ao avançar de level receber outfits e deixar só as básicas na outfit.xml
-
(Resolvido)Action Corpse Box
function onUse(cid, item, frompos, item2, topos) local exx = math.random(1,100) local chance = 10 -- De 1 a 100 , porcentagem de vir um item raro local raros = {2150, 2160, 3000} -- Tabela com o ID dos itens raros if doRemoveItem(item.uid, 1) then doPlayerSendTextMessage(cid, 25, "You have recieved "..exx.." platinum coins!") doPlayerAddItem(cid, 2152, exx, true) doSendMagicEffect(getThingPos(cid), 27) if math.random(1, 100) <= chance then doPlayerAddItem(cid, raros[math.random(1, #raros)], 1) doPlayerSendTextMessage(cid, 25, "You have recieved a rare item") return true end return TRUE end end
-
(Resolvido)Npc que dê outfitte por Quest
Bom , vou compartilhar com você uma gambiarra que fiz aqui a um tempo atras , você vai perceber que é velho pelas gambiarras e identação do código , aqui vamos nós : NPCS XML <?xml version="1.0" encoding="UTF-8"?> <npc name="Tasker" script="data/npc/scripts/task/task.lua" walkinterval="2000" speed="0" floorchange="0"> <health now="100" max="100"/> <look type="167" head="38" body="79" legs="107" feet="114"/> <parameters> <parameter key="message_greet" value="I' have a task for you. [{accept}] or [{premio}] "/> </parameters></npc> SCRIPT 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 local storage = 35678 -- monster kill | local sto = 24529 -- don't pick premio | -- | Não mecha nessa gambiarra aqui , só certifique que nenhuma dessas storages sejam usadas em outros sistemas local rage = 24525 -- inicializate contage | local ok = 45651 -- don't inicializate | local exp = 100 -- Quantidade de XP local monster = 100 -- Quantos monstros terá que matar local outfit = { male = 10, -- ID da outfit male female = 11 -- ID da outfit female } if(msgcontains(msg, 'premio')) then if getPlayerStorageValue(cid, sto) == -1 then if getPlayerStorageValue(cid, storage) >= 100 then selfSay("You have finished the task", cid) doPlayerAddExp(cid, exp) doSendMagicEffect(getCreaturePosition(cid), 5) setPlayerStorageValue(cid, rage, -1) setPlayerStorageValue(cid, sto, 1) setPlayerStorageValue(cid, fuck, 1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, outfit.male, 0) else doPlayerAddOutfit(cid, outfit.female, 0) end else selfSay("You need kill 100 monsters do finish the task", cid) end else selfSay("back from here nigga", cid) end end if(msgcontains(msg, 'accept')) then if getPlayerStorageValue(cid, ok) == -1 then selfSay("You have intialized the task", cid) setPlayerStorageValue(cid, ok, 1) setPlayerStorageValue(cid, rage, 1) else selfSay("You started the task", cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) CREATURESCRIPTS XML <event type="death" name="task" event="script" value="task.lua"/> Na XML do monstro <script> <event name="task"/> </script> Script local key = 35678 local rage = 24525 -- inicializate contage local monster = 100 -- Quantos monstros terá que matar function onDeath(cid, corpse, deathList) local killer = deathList[1] if not isPlayer(killer) then return true end if getPlayerStorageValue(killer, rage) == -1 then return true end setPlayerStorageValue(killer, key, getPlayerStorageValue(killer, key) + 1) doPlayerSendTextMessage(killer, 27, "Monster:: [".. getPlayerStorageValue(killer, key) .."//".. monster .."]") return true end
-
(Resolvido)Npc que venda Livro com Texto
XML <?xml version="1.0" encoding="UTF-8"?> <npc name="Bookero" script="book.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="142" head="114" body="0" legs="95" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. I sell book, say {yes}."/> </parameters> </npc> Script 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 local money = 1000 -- Custo local id = 7122 -- id do Book local text = "Livro misterioso" if(msgcontains(msg, 'yes')) then if doPlayerRemoveMoney(cid, money) then doSetItemText(doPlayerAddItem(cid, id, 1), text) selfSay('Obrigado', cid) else selfSay('Você precisa de '.. money ..' de money para comprar esse livro', cid) end end end
-
(Resolvido)Npc que venda Livro com Texto
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 money = 1000 -- Custo local id = 7122 -- id do Book local text = "Livro misterioso" local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'yes')) then if doPlayerRemoveMoney(cid, money) then doSetItemText(doPlayerAddItem(cid, id, 1), text) selfSay('Obrigado', cid) else selfSay('Você precisa de '.. money ..' de money para comprar esse livro', cid) end end end Vamos ver se isso resolve , você quer que o player compre o item somente uma vez ?
-
(Resolvido)Tile que passa apenas 1 player por IP!
È só você colocar na pos1 e pos2 as coodernadas do local onde o player é enviado ao entrar no teleport , colocar a action no piso em baixo do teleporte e no remeres colocar como uma area de no-logout.
-
doPlayerRemoveItem
function onUse(cid, item, fromPosition, itemEx, toPosition) local rewarditems = { {id = 2472, chance = 17, count = 1}, -- start with the lowest chances {id = 8977, chance = 2, count = 1} } local box = 6509 --ID da box. local chance = math.random(1,100) for i = 1, #rewarditems, 1 do if(chance < rewarditems[i].chance) then local info = getItemInfo(rewarditems[i].id) if(rewarditems[i].count > 1) then text = rewarditems[i].count .. " " .. info.plural else text = info.article .. " " .. info.name end if item.itemid == box then doPlayerAddItem(cid, rewarditems[i].id, rewarditems[i].count) doRemoveItem(item.uid) doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) text = "You have received " .. text .. "." else text = "You have failed to open your mystery box. The item is to heavy or you have not enough space to take it." end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, text) return true else chance = chance - rewarditems[i].chance end end end
-
(Resolvido)Tile que passa apenas 1 player por IP!
Antes , vamos as explicações : POS1 = Coloque as posições na script , igual na imagem que darei de exemplo POS2 = Coloque as posições na script , igual na imagem que darei de exemplo TILE = Tile que vai conter um action ID Movements.XML <movevent type="StepIn" actionid="43358" event="script" value="tileip.lua"/> Movements/scripts function getPlayersInArea(pos1, pos2) playersInArea = {} for x = pos1.x, pos2.x do for y = pos1.y, pos2.y do for z = pos1.z, pos2.z do totalArea = {x = x, y= y, z = z} playerz = getTopCreature(totalArea) if isPlayer(playerz.uid) then table.insert(playersInArea, getPlayerIp(playerz.uid)) end end end end return playersInArea end function onStepIn(cid, item, position, fromPosition) local pos1 = {x = 92, y = 114, z = 7} local pos2 = {x = 98, y = 120, z = 7} local t = getPlayersInArea(pos1, pos2) local value = getPlayerIp(cid) if not isPlayer(cid) then return true end if t then if isInArray(t, value) then doTeleportThing(cid, fromPosition, false) doSendMagicEffect(position, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não pode entrar aqui com mais de um IP") return false end end end
-
(request) spell that is learned with an item
Actions -- Actions.XML = <action itemid="ITEM ID" event="script" value="learnspell.lua"/> local name = "Exura" -- Spell name function onUse(cid, item, fromPosition, itemEx, toPosition) doPlayerLearnInstantSpell(cid, name) doRemoveItem(item.uid) doPlayerSendTextMessage(cid, 27, "You learned a spell ".. name ..".") doSendMagicEffect(getCreaturePosition(cid), 5) return true end In spells.XML , in the spell tag you want to teach, add : needlearn="1"
-
Duvida Rapida
Se veio o executável do servidor não precisa compilar , caso contrário irá precisar compilar.
-
Duvida Rapida
Source é todo o codigo fonte de seu trabalho/projeto, é lá onde fica todos os codigos utilizados para executar uma ação/função . Para isso se deve compilar a source , e essa compilação resulta no arquivo .exe que você liga o seu servidor.
-
(Resolvido)Npc que venda Livro com Texto
@peterson18 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 money = 1000 -- Custo local id = 7122 -- id do Book local text = "Livro misterioso" local item = doPlayerAddItem(cid, id, 1) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'yes')) then if doPlayerRemoveMoney(cid, money) then doSetItemText(item, text) selfSay('Obrigado', cid) else selfSay('Você precisa de '.. money ..' de money para comprar esse livro', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
[PEDIDO] Spell Transferência de MP
@bismarkzika -- Os parâmentros do comando são : !transfer NOME DO PLAYER, QUANTIDADE DO ITEM A SER DOADA -- Exemplo : !transferencia Storrm, 1 -- <talkaction words="!transferencia" event="script" value="transfer.lua"/> local id = 2150 -- ID da mana Potion function onSay(cid, words, param, channel) local pos = getCreaturePosition(cid) local t = string.explode(param, ",") local a = getPlayerByNameWildcard(t[1]) local item = getPlayerItemCount(cid, id) 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 not doPlayerRemoveItem(cid, id, t[2]) then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Você não tem MP suficientes") return true end doPlayerAddItem(a, id, t[2]) doPlayerRemoveItem(cid, id, t[2] - 1) doPlayerSendTextMessage(cid, 27, "Você doou ".. t[2] .." MP ao player ".. getCreatureName(a) .."") doPlayerSendTextMessage(a, 27, "Você recebeu ".. t[2] .." MP do player ".. getCreatureName(cid) .."") return true end
-
Does anyone have nice dragon ball sprites?
- [PEDIDO] Spell Transferência de MP
@bismarkzika O player vai poder escolher a quantidade ou será determinada na script ?- Dano Adicional Por Item
È só registrar varias vezes a mesma tag porém com a mesma script , por exemplo <melee id="Arma 1" event="script" value="raijin.lua"/> <melee id="Arma 2" event="script" value="raijin.lua"/> <melee id="Arma 3" event="script" value="raijin.lua"/> <melee id="Arma 4" event="script" value="raijin.lua"/>- Dano Adicional Por Item
Sim , cada arma uma script;- Dano Adicional Por Item
Muda de ring para AMMO ; esse ID é o da arma- (Resolvido)Recomendação de Distro para Servidor
@alezzo TFS: Se quiser um global, por exemplo, vai ter que editar bastante ou usar outro data. Nenhuma edição nas sources que não estão "perfeitamente otimizadas" são aceitas. Se quer uma distro que rode sem problemas (vamos dizer que você tenha restrição de RAM e rode com uns 500+ players) com certeza, escolha essa. Problema: algumas atualizações, fixes menos importantes e novas funções populares não estão disponíveis por padrão ou demoram mais para serem incorporadas. OTX: É BASEADO EM TFS, portanto não há tantas diferenças (quando falamos em versões atualizadas de ambos), mas é uma equipe diferente que gerencia. Não sei como é o gerenciamento de otimização deles. Eles querem se aproximar do global no DATA, então você provavelmente terá menos trabalho quanto a isso. As novas funções populares como cast, onMove, etc... provavelmente serão incorporadas antes. by Redseb9- adicionar % de hp no item em items.xml
<attribute key="maxhealthpercent" value="10"/>- Dano Adicional Por Item
@mullino Vai ser preciso usar o item mais de uma vez se o player tiver mais de um tipo de essencia local config = { ice = 3150, -- ID da essencia ICE fire = 3151, -- ID da essencia FIRE dice = 3150, -- ID da essencia ICE descarregada dfire = 3151 -- ID da essencia FIRE descarregada } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerItemCount(cid, config.dice) >= 1 then doPlayerAddItem(cid, config.ice, getPlayerItemCount(cid, config.dice)) doPlayerRemoveItem(cid, config.dice, getPlayerItemCount(cid, config.dice)) doPlayerSendTextMessage(cid, 27, "Você recarregou suas essencias ice") doSendMagicEffect(getCreaturePosition(cid), 5) return true end if getPlayerItemCount(cid, config.dfire) >= 1 then doPlayerAddItem(cid, config.fire, getPlayerItemCount(cid, config.dfire)) doPlayerRemoveItem(cid, config.dfire, getPlayerItemCount(cid, config.dfire)) doPlayerSendTextMessage(cid, 27, "Você recarregou suas essencias fire") doSendMagicEffect(getCreaturePosition(cid), 5) return true end return true end - [PEDIDO] Spell Transferência de MP
Informação Importante
Confirmação de Termo