Postado Setembro 2, 2017 7 anos Um chat, onde se o player morrer para outro player, aparece em azul. Fulano level 500 died for Cilano level 100. E em vermelho Fulano level 500 died to Demon. E o outro script, quando o player entrar na house, exibir uma mensagem "Welcome to house number XXX", pois as houses no meu server são todas numeradas, tipo. It belongs to house 'Unnamed House #2'. Nobody owns this house. It costs 15700000 gold coins. ItemID: [1253]. Editado Setembro 2, 2017 7 anos por jNo (veja o histórico de edições) (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Setembro 2, 2017 7 anos Solução Em creaturescripts/scripts crie um arquivo: Mostrar conteúdo oculto function onThink(cid, interval) if not isPlayer(cid) then return true end local hid = getHouseFromPos(getPlayerPosition(cid)) if hid then name = getHouseInfo(hid).name end if hid and getPlayerStorageValue(cid, 19872) == -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Welcome to house number ".. name:match("%d") .. "!") setPlayerStorageValue(cid, 19872, 1) return true end if not hid and getPlayerStorageValue(cid, 19872) ~= -1 then setPlayerStorageValue(cid, 19872, -1) return true end return true end Em creaturescripts.xml, adicione a tag: <event type="think" name="Home" event="script" value="NOMEDOSEUARQUIVO.lua"/> E no login.lua, registre o evento: registerCreatureEvent(cid, "Home") O outro você encontra aqui mesmo no fórum, só é dar uma procurada. Editado Setembro 2, 2017 7 anos por Dwarfer (veja o histórico de edições) Contato: Email: dwarfer@sapo.pt Discord: Dwarfer#2715
Postado Setembro 2, 2017 7 anos Autor Em 02/09/2017 em 18:27, Dwarfer disse: Em creaturescripts/scripts crie um arquivo: Mostrar conteúdo oculto Mostrar conteúdo oculto function onThink(cid, interval) if not isPlayer(cid) then return true end local hid = getHouseFromPos(getPlayerPosition(cid)) if hid then name = getHouseInfo(hid).name end if hid and getPlayerStorageValue(cid, 19872) == -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Welcome to house number ".. name:match("%d") .. "!") setPlayerStorageValue(cid, 19872, 1) return true end if not hid and getPlayerStorageValue(cid, 19872) ~= -1 then setPlayerStorageValue(cid, 19872, -1) return true end return true end Em creaturescripts.xml, adicione a tag: <event type="think" name="Home" event="script" value="NOMEDOSEUARQUIVO.lua"/> E no login.lua, registre o evento: registerCreatureEvent(cid, "Home") O outro você encontra aqui mesmo no fórum, só é dar uma procurada. 17:10 Welcome to house number 2! Não encontrei um que mostre todos que atacaram, ou por monstros, mais enfim, obrigado. function onKill(cid, target, lastHit) if not isPlayer(target) or not isPlayer(cid) then return true end doBroadcastMessage(""..getCreatureName(target).." on level ["..getPlayerLevel(target).."] just got killed for "..getCreatureName(cid).." on level ["..getPlayerLevel(cid).."].", MESSAGE_STATUS_CONSOLE_BLUE) return true end Editado Setembro 2, 2017 7 anos por jNo (veja o histórico de edições) (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.