Postado Maio 16, 2015 10 anos Estou precisando de um script que ao acertar o target eu e ele fiquemos travado no sqm x tempo porem ao me virar com meu boneco com o ctrl para direita o oponente ande 1sqm > a cada 2 segundos para direita, alguem da uma força!
Postado Maio 17, 2015 9 anos thiagomotta [scripts]: Spell local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 10) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 10) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -100, 0, -3700) local exhauststorage = 10103 local exhauststorage1 = 10113 local tempo = 10 --tempo em que o player ficara sem se mover e sera controlado function onCastSpell(cid, combat, var) if isPlayer(cid) then setPlayerNoMove(cid, 1, os.time()+tempo) setPlayerNoMove(target, 1, os.time()+tempo) setPlayerStorageValue(cid, exhauststorage, os.time()+tempo) setPlayerStorageValue(target, exhauststorage1, os.time()+tempo) end return doCombat(cid, combat, var) end Creaturescripts: function onStatsChange(cid, target) local exhauststorage = 10103 local exhauststorage1 = 10113 local tempo = 2 -- delay em segundos entre que o target seja teleportado if(getPlayerStorageValue(cid, exhauststorage)) then elseif(getPlayerStorageValue(target, exhauststorage1)) then doPlayerSendTextMessage(cid,19,"Voce e seu alvo devem esperar "..(getPlayerStorageValue(cid, exhauststorage)-os.time()).." segundos para se movimentar novamente.") doPlayerSendTextMessage(target,19,"Voce deve esperar "..(getPlayerStorageValue(cid, exhauststorage1)-os.time()).." segundos para se movimentar novamente.") local function lookdirection(cid, target) elseif getCreatureLookDirection(cid) == 1 then setCreatureLookDirection(target, 1) doTeleportThink(target, getPlayerPosition(target)+1, os.time()+tempo) end elseif getCreatureLookDirection(cid) == 2 then setCreatureLookDirection(target, 2) doTeleportThink(target, getPlayerPosition(target)+1, os.time()+tempo) end elseif getCreatureLookDirection(cid) == 3 then setCreatureLookDirection(target, 3) doTeleportThink(target, getPlayerPosition(target)+1, os.time()+tempo) end elseif getCreatureLookDirection(cid) == 0 then setCreatureLookDirection(target, 0) doTeleportThink(target, getPlayerPosition(target)+1, os.time()+tempo) end return addEvent(cid, lookdirection) end end return true end tags: Spell <instant name="Control Mind" words="control mind" lvl="100" mana="100" needtarget="1" prem="1" range="5" blockwalls="0" exhaustion="10000" maglv="0" needlearn="0" script="exemplo.lua"> </instant> CreatureScripts <event type="statschange" name="Cmind" event="script" value="exemplo.lua"/> Login.lua registerCreatureEvent(cid, "Cmind") Editado Maio 17, 2015 9 anos por Vinicius Xxgamexx (veja o histórico de edições)
Postado Maio 17, 2015 9 anos Autor da esse erro [17:53:10.103] [Error - Spell Interface] [17:53:10.103] data/spells/scripts/controlar.lua:onCastSpell [17:53:10.104] Description: [17:53:10.104] data/spells/scripts/controlar.lua:11: attempt to call global 'setPlayerNoMove' (a nil value) [17:53:10.104]
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.