-
Total de itens
322 -
Registro em
-
Última visita
-
Dias Ganhos
7
Histórico de Reputação
-
miguel223 recebeu reputação de UntFrc em [8.60] Rotworm Town!
Galerinha, to passando pra deixar um rotworm town pra vocês:
Rotworm Town.rar
Rotworm Town.rar
-
miguel223 recebeu reputação de kayk em SCRIPT para CheckPoint de teleports
Em movements.xml, adicione:
<movevent event="StepIn" itemid="ID DO TP" script="checkpoint.lua" />
Bom, explicando:
No tp que leva a quest, coloque action id 3000
no primeiro checkpoint coloque action id 3001
no segundo checkpoint coloque action id 3002
no terceiro checkpoint coloque action id 3003
no tp q leva a sala de premio coloque action id 3004
nas coordenadas:
inicio= local de inicio da quest
firstcheck = local para onde o primeiro checkpoint leva, ou seja, pra segunda parte da quest
...
fim = local da sala de premio
OBS: bugo o post de cima, tive q postar outro
OBS2: coloquei "fimcheck" ali no fim do script, eh só "fim"
-
miguel223 recebeu reputação de BrunooMaciell em (Duvida) Systema de Profiçao
Acabei de alterar todo o creaturescripts, para aparecer uma mensagem a parte, não só quando o player clica em si só, mas quando alguém clica nele.
Sobre sua dúvida, Bruno, isso é porque sua versão de NPCs é incompatível com a minha (8.6). Não sei a estrutura de sua versão. Mas basta abrir um .lua de algum npc seu e adaptar o início do código.
-
-
miguel223 recebeu reputação de Josegvb em Pedido Stafftime
Em creaturescripts.xml, adicione:
<event type="logout" name="time" event="script" value="time.lua"/>
Crie, em creaturescripts/scripts/, um arquivo de nome time.lua e adicione:
function onLogout(cid)
setPlayerStorageValue(cid, 19821, getPlayerStorageValue(cid, 19821) + os.time - getPlayerLastLogin(cid))
return true
end
Em talkactions/scripts/, crie um arquivo de nome time.lua e adicione:
function onSay(cid, words, param, channel)local t = param:explode(", ")if not(t[1]) thendoPlayerSendTextMessage(cid, 22, "This command need a param. Like: /time check, PLAYERNAME or /time clear, PLAYERNAME.")endif t[1] == "check" thenif not(t[2]) thendoPlayerSendTextMessage(cid, 22, "You need to put the players name in the command.")elseif getPlayerByName(t[2]) thenif getPlayerStorageValue(getPlayerByName(t[2]), 19821) < 0 thensetPlayerStorageValue(getPlayerByName(t[2]), 19821, 0)enddoPlayerSendTextMessage(cid, 22, "This player has "..(getPlayerStorageValue(getPlayerByName(t[2]), 19821)/60*60).." hours played until his left login.")elsedoPlayerSendTextMessage(cid, 22, "This player isnt online now or he doesnt exist.")endendendif t[1] == "clear" thenif not(t[2]) thendoPlayerSendTextMessage(cid, 22, "You need to put the players name in the command.")elseif getPlayerByName(t[2]) and getPlayerGroupId(cid) == 6 thensetPlayerStorageValue(getPlayerByName(t[2]), 19821, 0)doPlayerSendTextMessage(cid, 22, "You cleaned this players hours played.")elsedoPlayerSendTextMessage(cid, 22, "This player isnt online now or he doesnt exist. Or, you arent a GOD to use this command.")endendendreturn trueend
Em talkactions.xml, adicione:
<talkaction log="yes" words="/time;!time" access="2" event="script" value="time.lua" />
-
miguel223 recebeu reputação de Josegvb em [PEDIDO] item que da outfit (COM RESTRIÇOES)
Em actions.xml, adicione a tag:
<action itemid="15557;15558" script="outfititem.lua"/>
Em actions/scripts/, crie um arquivo de nome outfititem.lua e adicione:
local configs = {
{itemid = 15557, gender = 0, storage = 12987, value = 1, name = "Chun Li"};
{itemid = 15558, gender = 1, storage = 12988, value = 1, name = "NOMEDOOUTFIT2"}
}
function onUse(cid, item)
for _, outfit in ipairs(configs) do
if item.itemid == outfit.itemid then
if getPlayerStorageValue(cid, outfit.storage) <= 0 then
if getPlayerSex(cid) == outfit.gender then
setPlayerStorageValue(cid, outfit.storage, outfit.value)
doSendMagicEffect(getPlayerPosition(cid), 12)
doPlayerSendTextMessage(cid, 22, "You gained the "..outfit.name.." outfit.")
doRemoveItem(item.uid, 1)
return true
else
doSendMagicEffect(getPlayerPosition(cid), 2)
doPlayerSendTextMessage(cid, 22, "You arent of the correct gender.")
return true
end
else
doSendMagicEffect(getPlayerPosition(cid), 2)
doPlayerSendTextMessage(cid, 22, "You already has the "..outfit.name.." outfit.")
return true
end
end
end
return false
end
Em XML/outfits.xml, adicione, na frente de outfit id="IDDOOUTFIT":
storageId="12987" storageValue="1"
-
miguel223 recebeu reputação de brendoonh em Pedido Stafftime
Em creaturescripts.xml, adicione:
<event type="logout" name="time" event="script" value="time.lua"/>
Crie, em creaturescripts/scripts/, um arquivo de nome time.lua e adicione:
function onLogout(cid)
setPlayerStorageValue(cid, 19821, getPlayerStorageValue(cid, 19821) + os.time - getPlayerLastLogin(cid))
return true
end
Em talkactions/scripts/, crie um arquivo de nome time.lua e adicione:
function onSay(cid, words, param, channel)local t = param:explode(", ")if not(t[1]) thendoPlayerSendTextMessage(cid, 22, "This command need a param. Like: /time check, PLAYERNAME or /time clear, PLAYERNAME.")endif t[1] == "check" thenif not(t[2]) thendoPlayerSendTextMessage(cid, 22, "You need to put the players name in the command.")elseif getPlayerByName(t[2]) thenif getPlayerStorageValue(getPlayerByName(t[2]), 19821) < 0 thensetPlayerStorageValue(getPlayerByName(t[2]), 19821, 0)enddoPlayerSendTextMessage(cid, 22, "This player has "..(getPlayerStorageValue(getPlayerByName(t[2]), 19821)/60*60).." hours played until his left login.")elsedoPlayerSendTextMessage(cid, 22, "This player isnt online now or he doesnt exist.")endendendif t[1] == "clear" thenif not(t[2]) thendoPlayerSendTextMessage(cid, 22, "You need to put the players name in the command.")elseif getPlayerByName(t[2]) and getPlayerGroupId(cid) == 6 thensetPlayerStorageValue(getPlayerByName(t[2]), 19821, 0)doPlayerSendTextMessage(cid, 22, "You cleaned this players hours played.")elsedoPlayerSendTextMessage(cid, 22, "This player isnt online now or he doesnt exist. Or, you arent a GOD to use this command.")endendendreturn trueend
Em talkactions.xml, adicione:
<talkaction log="yes" words="/time;!time" access="2" event="script" value="time.lua" />
-
miguel223 recebeu reputação de leozinpbb em SCRIPT CLONE SEGUIR PLAYER
Em config.lua, procure esta linha:
teleportPlayerSummons = false
Troque false por true.
-
miguel223 recebeu reputação de Magraozinho em {PEDIDO} Comprar items em baús com 2 Tipos de moeda.
function onUse(cid, item)
local t = {
{actionala = 29182, gainitemid = {12123, 4343, 1212}, lostitemid = {2160, 2152}},
{actionala = 29182, gainitemid = {12123, 4343, 1212}, lostitemid = {2160, 2152}},
{actionala = 29182, gainitemid = {12123, 4343, 1212}, lostitemid = {2160, 2152}}
}
for _, push in ipairs(t) do
if item.actionid == push.actionala then
if doPlayerRemoveItem(cid, push.lostitemid[1], 1) == TRUE then
for i = 1, #push.gainitemid then
doPlayerAddItem(cid, push.gainitemid, 1)
doPlayerSendCancel(cid, "You bought the items.")
doSendMagicEffect(getPlayerPosition(cid), 12)
end
elseif doPlayerRemoveItem(cid, push.lostitemid[2], 1) == TRUE then
for i = 1, #push.gainitemid then
doPlayerAddItem(cid, push.gainitemid, 1)
doPlayerSendCancel(cid, "You bought the items.")
doSendMagicEffect(getPlayerPosition(cid), 12)
end
else
doPlayerSendCancel(cid, "You dont have the request items.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
end
end
return true
end
-
miguel223 recebeu reputação de Magraozinho em {PEDIDO} Comprar items em baús com 2 Tipos de moeda.
Ficou faltando o i entre [] após push.gainitemid, não tá aparecendo, então acrescenta ai no script.
-
miguel223 recebeu reputação de Elias Palermo em Npcs de quest(Drop e Kill) Diárias
Ta bem confuso esse script ai, mas posso tentar te ajudar, para voce conseguir fazer sozinho os outros depois: (essa eh a parte que esta o problema)
Ali em azul, coloque > os.time()
Ali em amarelo, coloque os.time() + 1*24*60*60
Ou seja, to colocando um valor padrao(os.time()) e adicionando o tempo(em segundos) de um dia. Se ainda tiver tempo, fala q a quest ja ta feita. Se tiver só o valor, eh pq o tempo ja passou e voce pode fazer de novo.
-
miguel223 recebeu reputação de Danihcv em Item que heala
Em actions.xml, adicione a seguinte linha:
<action itemid="7716" script="regitem.lua"/>
Em actions/scripts/, crie um arquivo chamado regitem.lua e adicione:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 12543) <= os.time() then
setPlayerStorageValue(cid, 12543, os.time() + 10*60)
setPlayerStorageValue(cid, 12544, 1)
doPlayerSendTextMessage(cid, 22, "Voce usou um regeneration item. Durante 10 min, voce invocara forcas e, depois, restaurara sua vida e mana maximas. Ate la, aguarde.")
doRemoveItem(item.uid, 1)
doCreateItem(7717, 1, fromPosition)
else
doPlayerSendCancel(cid, "Voce ainda esta invocando forcas jogador. Nao podera usar outro regeneration item ate acabar esta invocacao.")
end
return true
end
Em creaturescripts/scripts/, crie um arquivo chamado regitem.lua e adicione:
-
miguel223 recebeu reputação de Sirarcken em Loteria por item
Adicione a tag, em globalevents.xml:
<globalevent name="lottery" time="22:00:00" event="script" value="lottery.lua"/>
Crie, em globalevents/scripts/, um arquivo chamado lottery.lua e adicione:
function onThink(cid, interval, lastExecution)
if getPlayerStorageValue(cid, 13812) >= math.random(1, 100) then
doPlayerAddItem(cid, 2160, 100)
doPlayerSendTextMessage(cid, 22, "Voce foi um dos vencedores da loteria de hoje!")
setPlayerStorageValue(cid, 13812, 0)
setPlayerStorageValue(cid, 13813, 0)
else
setPlayerStorageValue(cid, 13812, 0)
setPlayerStorageValue(cid, 13813, 0)
doPlayerSendTextMessage(cid, 22, "Voce nao ganhou na loteria desta vez, ou por nao ter apostado, ou por falta de sorte. Aposte para o proximo sorteio!")
end
return true
end
Adicione a tag, em actions.xml:
<action itemid="IDDOITEM" script="lottery.lua"/>
Crie, em actions/scripts/, um arquivo chamado lottery.lua e adicione:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 13813) < 100 then
if getPlayerStorageValue(cid, 13812) >= 1 then
setPlayerStorageValue(cid, 13812, getPlayerStorageValue(cid, 13812) + 1)
setPlayerStorageValue(cid, 13813, getPlayerStorageValue(cid, 13813) + 1)
doPlayerSendTextMessage(cid, 22, "Voce acabou de aumentar suas chances para o sorteio da loteria!")
doSendMagicEffect(getPlayerPosition(cid), 12)
doRemoveItem(item.uid, 1)
else
setPlayerStorageValue(cid, 13812, 1)
setPlayerStorageValue(cid, 13812, 1)
doPlayerSendTextMessage(cid, 22, "Voce acabou de apostar para o sorteio da loteria!")
doSendMagicEffect(getPlayerPosition(cid), 12)
doRemoveItem(item.uid, 1)
end
else
doPlayerSendTextMessage(cid, 22, "Voce ja apostou o maximo possivel para o proximo sorteio!")
doSendMagicEffect(getPlayerPosition(cid), 12)
end
return true
end
Como o script funciona:
- A loteria é diária, pois pelo que eu me lembre, não existe mais o day no globalevents (até tem como fazer por storage, mas to com preguiça, sinceramente kkkk);
- O player ganha 1% a mais de chances de ganhar a cada x que usa o itemx (máximo de x que pode usar = 100, ou seja, ele com certeza ira ganhar se usar o item 100x. Mas se quiser alterar esse valor para, sei la, 10% altere o < 100 ali em cima para < 10, por exemplo);
- Um furo do script: como eu fiz levando em conta o player em si, devido a maior chance de 1 em relação ao outro, tem chance de varios players ganharem na loteria. Ou seja, o sorteio eh "por player".
-
miguel223 recebeu reputação de gusinhi em alguem porderia me da uma maozinha com esses dois scripts
Poc, se voce prestar bem atenção, você vai ver q o último end já eh do function e que eu nao alterei a porta, mas sim fiz o player tomar tp de um lado pra outro......
-
miguel223 recebeu reputação de gusinhi em alguem porderia me da uma maozinha com esses dois scripts
Creaturescripts (registre no login.lua e adicione a tag de kill no .xml):
function onKill(cid, target)
if isPlayer(cid) and isCreature(target) then
if getCreatureName(target) == "Ferumbras" then
setPlayerStorageValue(cid, 666, 1)
doPlayerSendTextMessage(cid, 22, "Voce liberou o acesso, jogador!")
doSendMagicEffect(getPlayerPosition(cid), 6)
end
end
return true
end
Actions (crie uma tag de actionid no .xml):
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 666) == 1 then
if getPlayerPosition(cid).x < getThingPosition(item.uid).x then
doTeleportThing(cid, {x = getThingPosition(item.uid).x + 1, y = getThingPosition(item.uid).y, z = getThingPosition(item.uid).z})
doSendMagicEffect(getPlayerPosition(cid), 12)
elseif getPlayerPosition(cid).x > getThingPosition(item.uid).x then
doTeleportThing(cid, {x = getThingPosition(item.uid).x - 1, y = getThingPosition(item.uid).y, z = getThingPosition(item.uid).z})
doSendMagicEffect(getPlayerPosition(cid), 12)
end
end
return true
end
-
miguel223 recebeu reputação de gusinhi em alguem porderia me da uma maozinha com esses dois scripts
Creaturescripts (registre no login.lua e adicione a tag de kill no .xml):
function onKill(cid, target)
if isPlayer(cid) and isCreature(target) then
if getCreatureName(target) == "Ferumbras" then
setPlayerStorageValue(cid, 666, 1)
doPlayerSendTextMessage(cid, 22, "Voce liberou o acesso, jogador!")
doSendMagicEffect(getPlayerPosition(cid), 6)
end
end
return true
end
Actions (crie uma tag de actionid no .xml):
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 666) == 1 then
if getPlayerPosition(cid).x < getThingPosition(item.uid).x then
doTeleportThing(cid, {x = getThingPosition(item.uid).x + 1, y = getThingPosition(item.uid).y, z = getThingPosition(item.uid).z})
doSendMagicEffect(getPlayerPosition(cid), 12)
elseif getPlayerPosition(cid).x > getThingPosition(item.uid).x then
doTeleportThing(cid, {x = getThingPosition(item.uid).x - 1, y = getThingPosition(item.uid).y, z = getThingPosition(item.uid).z})
doSendMagicEffect(getPlayerPosition(cid), 12)
end
end
return true
end
-
miguel223 recebeu reputação de luciano0223 em Npc que vende magia por level
Em spells/spells.xml, adicione na linha da spell:
storage="10293"
Em npcs/scripts/, crie um arquivo chamado speller.lua e adicione:
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 if(msgcontains(msg, 'exori gran')) then if(getPlayerStorageValue(cid, 10293) <= 0) then if(getPlayerLevel(cid) >= 80) then if(doPlayerRemoveMoney(cid, 20000) == TRUE) then setPlayerStorageValue(cid, 10293, 1) selfSay('Voce acabou de aprender como usar o exori gran, jogador.', cid) else selfSay('Voce precisa de 20000 golds para comprar esta magia jogador.', cid) end else selfSay('Voce ainda nao e level 80, para comprar esta magia.', cid) end else selfSay('Voce ja aprendeu esta magia, jogador.', cid) end end talkState[talkUser] = 0 return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
miguel223 recebeu reputação de Sirarcken em pedido ao clicar em bau ganhar mount
Vamos la:
Crie um arquivo chamado mountchest.lua em actions/scripts e adicione:
function onUse(cid, item, toPosition, itemEx, fromPosition)
if(item.actionid == 12663) then
if getPlayerStorageValue(cid, 13456) <= 0 then
doPlayerAddMount(cid, ID DA MOUNT)
doPlayerSendTextMessage(cid, 22, "Voce recebeu a NOME DA MONTARIA mount. Parabens!")
setPlayerStorageValue(cid, 12456, 1)
else
doPlayerSendTextMessage(cid, 22, "Voce ja abriu este bau, jogador.")
end
end
return true
end
Em actions.xml, adicione:
<action actionid="12663" script="mountchest.lua"/>
-
miguel223 recebeu reputação de davidvietro em Erro no Console (Referente a NPCS)
Voce provavelmente trocou de distro ou seu server veio com o distro errado. Baixe um server de mesmo distro que o seu e subistitua as pastas npcs/lib e npcs/scripts/lib pelas pastas baixadas.
-
miguel223 recebeu reputação de Furabio em (Action) Item que da dinheiro
Crie um arquivo .lua em actions/scripts e adicione:
function ingot(cid) setPlayerStorageValue(cid, 15971, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ja pode receber 10 gold ingots novamente!") end function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid,15971) <= 0 then doPlayerAddItem(cid,9971,10) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce recebeu 10 gold ingots! Clique no item novamente em 24 horas para receber a recompensa de novo.") setPlayerStorageValue(cid, 15971, 1) addEvent(ingot,24*60*60*1000,cid) elseif getPlayerStorageValue(cid,15971) == 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ja pegou seus 10 gold ingots diarios! ") end return TRUE end Agora vá em actions > actions.xml e adicione: action itemid="ITEMID" event="script" value="NOME DO ARQUIVO LUA.lua"/>
-
miguel223 recebeu reputação de morphred em [Pedido] Npc quest (com mais de 2 quests nele)
Crie um arquivo chamado npcquest.lua em npcs/scripts/ e adicione:
Agora, em npcs/, crie um arquivo chamado Missioner.xml e adicione: <?xml version="1.0" encoding="UTF-8"?> <npc name="Missioner" script="data/npc/scripts/npcquest.lua" walkinterval="0" lookdir="3"> <health now="100" max="100"/> <look type="130" head="0" body="10" legs="10" feet="0" addons="0"/> <parameters> <parameter key="message_greet" value="Bem-vindo, |PLAYERNAME|! Quer realizar minhas {quests}?"/> </parameters> </npc> -
miguel223 recebeu reputação de luciano0223 em Npc que dá storage e historia
Em npcs/scripts/, crie um arquivo chamado permission.lua e adicione:
Em npcs/, crie um arquivo chamado Permission.xml e adicione:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Permission" script="data/npc/scripts/permission.lua" walkinterval="0" lookdir="3">
<health now="100" max="100"/>
<look type="130" head="0" body="10" legs="10" feet="0" addons="0"/>
<parameters>
<parameter key="message_greet" value="Bem-vindo, |PLAYERNAME|! Posso te dar acesso a {quest} NOME DA QUEST."/>
</parameters>
</npc>
-
miguel223 recebeu reputação de luciano0223 em Npc que dá itens diferentes para as vocações
Crie um arquivo, em npcs/scripts/, de nome premiovoc.lua e adicione:
Agora crie, em npcs/, um arquivo chamado Reward Guardian.xml e adicione: <?xml version="1.0" encoding="UTF-8"?> <npc name="Reward Guardian" script="data/npc/scripts/premiovoc.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="251" head="0" body="0" legs="0" feet="0" addons="3"/> <parameters> <parameter key="message_greet" value="O que voce quer de mim, |PLAYERNAME|? Busca pelo seu {premio}?" /> </parameters> </npc> -
miguel223 recebeu reputação de UntFrc em Action - Item X que deixa com bless infinita
Bom, crie um arquivo .lua em actions/scripts e adicione:
function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 14450) == -1 then doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doPlayerRemoveItem(cid, ITEM, QUANTIDADE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Agora voce possui bless infinita!") setPlayerStorageValue(cid, 14450, 1) elseif getPlayerStorageValue(cid, 14450) == 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ja possui bless infinita!") end end Agora adicione, em actions.xml, a linha: <action itemid="ITEM" event="script" value="NOME DO ARQUIVO .LUA"/> Após isso, em creaturescripts/script, crie um arquivo .lua e adicione: function onLogin(cid) if getPlayerStorageValue(cid, 14450) == 1 then doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) end end Em creaturescripts.xml, adicione: <event type="login" name="InfiniteBless" event="script" value="ARQUIVO.lua"/> Em creaturescripts/scripts/login.lua, adicione: registerCreatureEvent(cid, "InfiniteBless")
-
miguel223 recebeu reputação de Danihcv em Npc que dá itens diferentes para as vocações
Crie um arquivo, em npcs/scripts/, de nome premiovoc.lua e adicione:
Agora crie, em npcs/, um arquivo chamado Reward Guardian.xml e adicione: <?xml version="1.0" encoding="UTF-8"?> <npc name="Reward Guardian" script="data/npc/scripts/premiovoc.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="251" head="0" body="0" legs="0" feet="0" addons="3"/> <parameters> <parameter key="message_greet" value="O que voce quer de mim, |PLAYERNAME|? Busca pelo seu {premio}?" /> </parameters> </npc>
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.