Postado Fevereiro 2, 2016 9 anos Eu Queria Uma Spell Que Prendesse o Player Por Certo Tempo e Com Um Efeito Encima do Player Paralisado .
Postado Fevereiro 3, 2016 9 anos Vá na pasta: data/spells/scripts/custom/ E crie um 'script' chamado 'jailrune' com a extensão '.lua' e coloque isto dentro: Spoiler local unjailableGroup = 3 local jailStorage = 100000 local jailTime = 5 -- Minutes, this time will be added upon each jail time e.g player jailed fourth time will have to wait two times longer than the one jailed for the second time. local teleportTo = { x = 48, y = 48, z = 7 } local teleportBack = { x = 50, y = 50, z = 7 } local jailCounter = { [1] = "first", [2] = "second", [3] = "third", [4] = "fourth", [5] = "fifth", [6] = "sixth", [7] = "seventh", [8] = "eighth", [9] = "ninth", [10] = "tenth", [11] = "eleventh", [12] = "twelveth" } local function jailPlayer(cid, pos) pos.stackpos = 255 local target = getThingfromPos(pos) local pPos = getCreaturePosition(cid) if isPlayer(target.uid) == TRUE then if getPlayerGroupId(target.uid) < unjailableGroup then local function teleportBackF(cid) return doTeleportThing(target.uid, teleportBack, 0) end addEvent(teleportBackF, jailTime * 60000 * getPlayerStorageValue(target.uid, jailStorage), target.uid) setPlayerStorageValue(target.uid, jailStorage, getPlayerStorageValue(target.uid, jailStorage) + 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getCreatureName(target.uid).." has been jailed for the "..jailCounter[getPlayerStorageValue(target.uid, jailStorage)].." time and will remain in prison for ".. jailTime * getPlayerStorageValue(target.uid, jailStorage) .." minutes.") doTeleportThing(target.uid, teleportTo, 0) return LUA_NO_ERROR else doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You may not jail this player!") return LUA_ERROR end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You may jail only players.") return LUA_ERROR end end function onCastSpell(cid, var) local pos = variantToPosition(var) if(pos.x ~= 0 and pos.y ~= 0 and pos.z ~= 0) then return jailPlayer(cid, pos) end doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return LUA_ERROR end E depois, dentro do arquivo data > spells > spells.xml coloque isto: <rune name="Jail Rune" id="2295" allowfaruse="1" charges="5" lvl="1" maglv="0" exhaustion="2000" needtarget="1" script="custom/jail rune.lua"/> Aqui está sendo usado o id 2295, mas mude aí se encontrar outra 'rune' disponívle. Ajudei? REP+ The Last Man Standing - 100% funcional
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.