-
Total de itens
254 -
Registro em
-
Última visita
-
Dias Ganhos
2
Community Answers
-
Noob II's post in (Resolvido)script de livro was marked as the answer
Crie um arquivo chamado Livro.lua na pasta data/actions/scripts e coloca isso:
function onUse(cid, item, frompos, item2, topos) doPlayerPopupFYI(cid, 'Coloque aqui\nOs Horarios.') return TRUE end
no actions.xml adicione essa tag com o ID do livro:
<action itemid="1950" event="script" value="Livro.lua"/>
Use \n para pular uma linha
-
Noob II's post in (Resolvido)Como criar Telepor que quando entrar ganha um pokemon. was marked as the answer
<movevent type="StepIn" actionid="8696;8697;8698;8699;8700;8701;" event="script" value="pokeinicial.lua"/>
SÓ ADICIONAR O ACTIONID NOS PORTAL AGORA
-
Noob II's post in (Resolvido)Globalevents Invasao was marked as the answer
Tudo que você citou tem nesse sistema:
-
Noob II's post in (Resolvido)[HELP] Creature not found was marked as the answer
local config = { level = 100, -- level que irá ganhar storage = 90100, -- storage cor = "green", -- de acordo com o constant.lua da lib msg = "Você ganhou 100k por avançar ao level 100.", qnt = 10; -- quantidade de crystal coin msgtp = MESSAGE_EVENT_ADVANCE, -- tipo da mensagem itemid = 2160, -- id do crystal coin (pode mudar se quiser) } function onAdvance(cid, oldLevel, newLevel) if getPlayerStorageValue(cid, config.storage) < 1 and getPlayerLevel(cid) >= config.level then doPlayerAddItem(cid, config.itemid, config.qnt) setPlayerStorageValue(cid, config.storage, 1) doPlayerSendTextMessage(cid, config.msgtp, config.msg) doBroadcastMessage(getCreatureName(cid).." atingiu o nível 100, Parabéns!", config.cor) end return TRUE end -
Noob II's post in (Resolvido)Como colocar mensagem automatica em uma posição do mapa was marked as the answer
Na pasta data\globalevents\scripts copie qualquer arquivo .lua e renomeio para info.lua
e adicione isso dentro:
local config = { positions = { ["Mensagem"] = { x = 1052, y = 1044, z = 5 }, } } function onThink(cid, interval, lastExecution) for text, pos in pairs(config.positions) do doSendAnimatedText(pos, text, 102) end return TRUE end
no globalevents.xml adicione essa tag:
<globalevent name="info" interval="1" script="info.lua"/>
você configura aqui o texto e posição que vai sair:
["Mensagem"] = { x = 1052, y = 1044, z = 5 },
-
Noob II's post in (Resolvido)Alavanca, storage e tile. was marked as the answer
Isso só acontece dps que adicionei as mensagens? tenta assim:
function onStepIn(cid, item, position, fromPosition) local config = { topos = {x=1408, y=1169, z=7}, -- Posição para onde o player será teleportado. strg = 33339 -- valor da storage. } if getPlayerStorageValue(cid, config.strg) == 0 then doTeleportThing(cid, config.topos) doPlayerSendTextMessage(cid, 27, "Parabéns, você tem acesso a este local") else return doPlayerSendCancel(cid, "Você não concluiu o acesso a este local.") end return true end
<movevent type="StepIn" actionid="13700" event="script" value="tiletibiaking.lua"/>
-
Noob II's post in (Resolvido)Premium Scroll was marked as the answer
Um script mais completo
function onUse(cid, item, fromPosition, itemEx, toPosition) local name = getCreatureName(cid) local days = 30 -- dias que serão adicionados local strg = 33339 -- valor da sua storage local strg_n = 12120 -- não precisa editar local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, strg) local timenow = os.time() if getPlayerStorageValue(cid, strg) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, strg, time) local quantity = math.floor((getPlayerStorageValue(cid, strg) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerAddPremiumDays(cid, days) doRemoveItem(item.uid, 1) if getPlayerStorageValue(cid, strg_n) < 1 then setPlayerStorageValue(cid, strg_n, 1) addEvent(doRemoveCreature, 5000, cid) end return TRUE end -
Noob II's post in (Resolvido)[HELP] msg em certo level was marked as the answer
Script upnoob.lua :
function onAdvance(cid, oldLevel, newLevel) if getPlayerLevel(cid) >= 50 then doPlayerPopupFYI(cid, "Você atingiu o nível 50 e agora pode fazer tal quest, fale com o npc 'tal' para ter permissão.") end return TRUE end
tag creaturescripts.xml:
<event type="advance" name="upnoob" event="script" value="upnoob.lua"/>
registra esse evento no login.lua:
registerCreatureEvent(cid, "upnoob")
-
Noob II's post in (Resolvido)Script was marked as the answer
Pasta data/creaturescripts/scripts cria um arquivo logout.lua
function onLogout(cid) if getPlayerStorageValue(cid, 12121) > -1 then doPlayerSendTextMessage(cid, 27, "You can't logout.") return false end return true end
no creaturevents.xml adiciona essa tag
<event type="logout" name="PlayerLogout" event="script" value="logout.lua"/>
12121 é a storage