Search the Community
Showing results for tags 'cmd'.
-
pena de morte v1 data\talkactions\scripts\nomedoarquivo.lua function onSay(cid, words, param) local t = string.explode(param, ",") local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "exemplo de como usar comando !cmd NomeDoPlayer") return true end doCreatureAddHealth(getPlayerByName(t[1]), -getCreatureMaxHealth(getPlayerByName(t[1]))) doPlayerSendTextMessage(getPlayerByName(t[1]), MESSAGE_STATUS_CONSOLE_RED, "edita aqui que player vai ver quando morre") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você Matou "..t[1].." Sem Do") return true end talkactions.xml <talkaction log="yes" words="!cmd" access="5" event="script" value="nomedoarquivo.lua"/> modo de usar !cmd nomedoplayer se usar corretamente vai acontecer isso com player
-
data\talkactions\scripts\nomedoarquivo.lua function onSay(cid, words, param, channel) --configuration by notle local i = {qnt = 3, --Quantia de summons permitida level = 10, -- level pra usa summons mana = 250, -- quanto de mana que vai perde assim que usa voc = {1,2,3,4,5,6,7,8,9,10,11,12}, -- ID das vocations ignore = {"demon","apocalypse","treiner"}} -- summon que não pode ser criandos --configuration by notle local pid = cid local t = string.explode(param, ",") if getPlayerMana(cid) > i.mana then if(t[2]) then pid = getPlayerByNameWildcard(t[2]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) and doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.") then return true end elseif #getCreatureSummons(cid) == i.qnt and doPlayerSendCancel(cid, "Máximo de summons atingido.") then return true elseif getPlayerLevel(cid) <= i.level and doPlayerSendCancel(cid, "sorry insufficient level [up ate " ..i.level.. "].") then return true elseif not isInArray(i.voc, getPlayerVocation(cid)) and doPlayerSendCancel(cid, " Your vocation can not create summons.") then return true elseif isInArray(i.ignore, string.lower(t[1])) and doPlayerSendCancel(cid, "you can not summon this creature.") then return true end for o = 1,i.qnt and doSummonMonster(pid, t[1]) do doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you invoked a "..t[1].."") return doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) and doPlayerAddMana(cid, -i.mana) and true end else return doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, "sorry insufficient mana.") end end talkactions.xml <talkaction words="!cmd" event="script" value="nomedoarquivo.lua"/> pra usa comando !cmd dragon só editar a o gosto --configuration by notle local i = {qnt = 3, --Quantia de summons permitida level = 10, -- level pra usa summons mana = 250, -- quanto de mana que vai perde assim que usa voc = {1,2,3,4,5,6,7,8,9,10,11,12}, -- ID das vocations ignore = {"demon","apocalypse","treiner"}} -- summon que não pode ser criandos --configuration by notle