allanzinh 4 Postado Fevereiro 24, 2014 Share Postado Fevereiro 24, 2014 Então eo vi um Topico com ese Scrip . depois eo vi o topico do slicer como criar spells e fui seguindo pq eo to com o serv dele . Eo fiz tudo "certo" não deo erro no server só que Não aconteceo nada com o misdreavuss . Eo quero um igual ow parecido com o da pxg que o pokemon quando está cendo atacado fica se multiplicando passivamente . --/////////////////////// PASSIVAS /////////////////////////-- elseif spell == "Illusion Team" then local function RemoveTeam(cid, master) if isCreature(cid) then local p = getThingPosWithDebug(cid) doSendMagicEffect(p, 211) doRemoveCreature(cid) end end local function sendEff(cid, master, t) if isCreature(cid) and isCreature(master) and t > 0 and #getCreatureSummons(master) >= 2 then doSendMagicEffect(getThingPosWithDebug(cid), 86, master) addEvent(sendEff, 1000, cid, master, t-1) --alterado v1.9 end end if getPlayerStorageValue(cid, 637500) >= 1 then return true end local s = { ["Misdreavus"] = "MisdreavusTeam", ["Shiny Stantler"] = "ShinyStantlerTeam", } local master = getCreatureMaster(cid) local item = getPlayerSlotItem(master, 8) local pos = getThingPosWithDebug(cid) local time = 5 local pokelife = (getCreatureHealth(cid) / getCreatureMaxHealth(cid)) local random = math.random(5, 10) local dir = getCreatureLookDir(cid) --------- doItemSetAttribute(item.uid, "hp", pokelife) --------- doDisapear(cid) doTeleportThing(cid, {x=4, y=3, z=10}, false) doAppear(cid) --------- doSummonMonster(master, s[getSubName(cid, target)]) --alterado v1.6.1 local pk = getCreatureSummons(master)[2] adjustStatus(pk, item.uid, true, true, true) --------- doTeleportThing(pk, getClosestFreeTile(pk, pos), false) doTeleportThing(cid, getClosestFreeTile(cid, pos), false) doCreatureSetLookDir(pk, dir) doCreatureSetLookDir(cid, dir) doSendMagicEffect(getThingPosWithDebug(pk), 211) doSendMagicEffect(getThingPosWithDebug(cid), 211) if getPlayerStorageValue(cid, 9658783) >= 1 then --gambiarra doSetCreatureOutfit(cid, {lookType = 1446}, -1) end sendEff(cid, master, time) --alterado v1.9 -------- setPlayerStorageValue(pk, 637500, 1) setPlayerStorageValue(master, 637501, 1) addEvent(RemoveTeam, time*1000, pk, master) addEvent(setPlayerStorageValue, time*1000, master, 637501, -2) --alterado v1.6 ALGUEM PODER ME AJUDAR COM ESE SCRIPT DO 5 REP+ Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/ Compartilhar em outros sites More sharing options...
Shoguns 119 Postado Fevereiro 24, 2014 Share Postado Fevereiro 24, 2014 Tente esse: elseif spell == "" then local time = 5 * 1000 local name = getCreatureName(cid) local status = getPokemonStatus(name, getOffense(creature) / pokes[name].off) local newSummon = doSummonMonster(cid, name) if not isCreature(newSummon) then return end setWildPokemonLevel(newSummon, getLevel(cid), status) doTeleportThing(newSummon, getThingPos(cid), false) doSendMagicEffect(getThingPos(newSummon), CONST_ME_TELEPORT) addEvent(function(uid) if isCreature(uid) then doSendMagicEffect(getThingPos(uid), CONST_ME_TELEPORT) doRemoveCreature(uid) end end, time, newSummon) Informe se o seu Server e com Lvl ou Sem Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616337 Compartilhar em outros sites More sharing options...
zipter98 1102 Postado Fevereiro 24, 2014 Share Postado Fevereiro 24, 2014 Área incorreta, tópico movido. Mais cuidado da próxima vez. Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616387 Compartilhar em outros sites More sharing options...
allanzinh 4 Postado Fevereiro 25, 2014 Autor Share Postado Fevereiro 25, 2014 Me Desculpe ese é o meo primeiro topico . é sem lv PDA Slicer Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616528 Compartilhar em outros sites More sharing options...
Shoguns 119 Postado Fevereiro 25, 2014 Share Postado Fevereiro 25, 2014 (editado) Tenta assim: function onThink(cid, interval) elseif spell == "" then local storage = 124239 if getPlayerStorageValue(cid, storage) - os.time() > 0 then return end setPlayerStorageValue(cid, storage, os.time() + 6) local time = 5 * 1000 local name = getCreatureName(cid) local status = getPokemonStatus(name, getOffense(creature) / pokes[name].off) local newSummon = doSummonMonster(cid, name) if not isCreature(newSummon) then return end setWildPokemonLevel(newSummon, getLevel(cid), status) doTeleportThing(newSummon, getThingPos(cid), false) doSendMagicEffect(getThingPos(newSummon), CONST_ME_TELEPORT) addEvent(function(uid) if isCreature(uid) then doSendMagicEffect(getThingPos(uid), CONST_ME_TELEPORT) doRemoveCreature(uid) end end, time, newSummon) Editado Fevereiro 25, 2014 por Shoguns Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616530 Compartilhar em outros sites More sharing options...
allanzinh 4 Postado Fevereiro 25, 2014 Autor Share Postado Fevereiro 25, 2014 Eo Subistitui o seo Script pelo o meo e nada aconteceo denovo eo jah colkei o passive no atks Spels e no data/lib/configuração e adicionei a passive no Pokemon Misdreavus Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616531 Compartilhar em outros sites More sharing options...
Shoguns 119 Postado Fevereiro 25, 2014 Share Postado Fevereiro 25, 2014 a Tag no creature scripts? registrou no login.lua? Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616533 Compartilhar em outros sites More sharing options...
allanzinh 4 Postado Fevereiro 25, 2014 Autor Share Postado Fevereiro 25, 2014 (editado) [25/02/2014 06:10:46] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:4035: 'end' expected (to close 'function' at line 4034) near 'elseif' [25/02/2014 06:10:46] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ [25/02/2014 06:10:46] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:4035: 'end' expected (to close 'function' at line 4034) near 'elseif' [25/02/2014 06:10:46] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ [25/02/2014 06:10:46] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:4035: 'end' expected (to close 'function' at line 4034) near 'elseif' [25/02/2014 06:10:46] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ [25/02/2014 06:10:47] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:4035: 'end' expected (to close 'function' at line 4034) near 'elseif' [25/02/2014 06:10:47] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ [25/02/2014 06:10:47] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:4035: 'end' expected (to close 'function' at line 4034) near 'elseif' [25/02/2014 06:10:47] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ [25/02/2014 06:10:48] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:4035: 'end' expected (to close 'function' at line 4034) near 'elseif' [25/02/2014 06:10:48] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ [25/02/2014 06:10:48] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:4035: 'end' expected (to close 'function' at line 4034) near 'elseif' [25/02/2014 06:10:48] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ o Erro que deo primeiro e depois deo ese erro aki e deo um erro no [Creaturescript Interface] data/creaturesscrip/scrips/spaw.lua77 Editado Fevereiro 25, 2014 por allanzinh Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616537 Compartilhar em outros sites More sharing options...
Shoguns 119 Postado Fevereiro 25, 2014 Share Postado Fevereiro 25, 2014 (editado) Arquivo.lua elseif spell == "" then local storage = 124239 if getPlayerStorageValue(cid, storage) - os.time() > 0 then return end setPlayerStorageValue(cid, storage, os.time() + 6) local time = 5 * 1000 local name = getCreatureName(cid) local status = getPokemonStatus(name, getOffense(creature) / pokes[name].off) local newSummon = doSummonMonster(cid, name) if not isCreature(newSummon) then return end setWildPokemonLevel(newSummon, getLevel(cid), status) doTeleportThing(newSummon, getThingPos(cid), false) doSendMagicEffect(getThingPos(newSummon), CONST_ME_TELEPORT) addEvent(function(uid) if isCreature(uid) then doSendMagicEffect(getThingPos(uid), CONST_ME_TELEPORT) doRemoveCreature(uid) end end, time, newSummon) Tag.xml <event type="statschange" name="PassiveMis" event="script" value="arquivo.lua"/> Registre a Tag no login.lua: registerCreatureEvent(cid, "PassiveMis") Editado Fevereiro 25, 2014 por Shoguns Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616538 Compartilhar em outros sites More sharing options...
allanzinh 4 Postado Fevereiro 25, 2014 Autor Share Postado Fevereiro 25, 2014 Deo ese agr [25/02/2014 07:02:01] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/passive.lua:1: '<eof>' expected near 'elseif' [25/02/2014 07:02:01] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/passive.lua) [25/02/2014 07:02:01] data/creaturescripts/scripts/passive.lua:1: '<eof>' expected near 'elseif' Deo ese Erro pq eo mudei o nome da pasta pra passive ? mais na tag eo coloquei passive tbm Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616540 Compartilhar em outros sites More sharing options...
Shoguns 119 Postado Fevereiro 25, 2014 Share Postado Fevereiro 25, 2014 Tenta assim o script: elseif spell == "" then local storage = 124239 return true if getPlayerStorageValue(cid, storage) - os.time() > 0 then return end setPlayerStorageValue(cid, storage, os.time() + 6) local time = 5 * 1000 local name = getCreatureName(cid) local status = getPokemonStatus(name, getOffense(creature) / pokes[name].off) local newSummon = doSummonMonster(cid, name) if not isCreature(newSummon) then return end setWildPokemonLevel(newSummon, getLevel(cid), status) doTeleportThing(newSummon, getThingPos(cid), false) doSendMagicEffect(getThingPos(newSummon), CONST_ME_TELEPORT) addEvent(function(uid) if isCreature(uid) then doSendMagicEffect(getThingPos(uid), CONST_ME_TELEPORT) doRemoveCreature(uid) end end, time, newSummon) Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616541 Compartilhar em outros sites More sharing options...
allanzinh 4 Postado Fevereiro 25, 2014 Autor Share Postado Fevereiro 25, 2014 [25/02/2014 07:36:02] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/passive.lua:1: '<eof>' expected near 'elseif' [25/02/2014 07:36:02] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/passive.lua) [25/02/2014 07:36:02] data/creaturescripts/scripts/passive.lua:1: '<eof>' expected near 'elseif' Deo ese Erro Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616543 Compartilhar em outros sites More sharing options...
DuuhCarvalho 327 Postado Fevereiro 25, 2014 Share Postado Fevereiro 25, 2014 testa ae.. if spell == "" then local time = 5 * 1000 local name = getCreatureName(cid) local status = getPokemonStatus(name, getOffense(creature) / pokes[name].off) local newSummon = doSummonMonster(cid, name) elseif not isCreature(newSummon) then return end setWildPokemonLevel(newSummon, getLevel(cid), status) doTeleportThing(newSummon, getThingPos(cid), false) doSendMagicEffect(getThingPos(newSummon), CONST_ME_TELEPORT) addEvent(function(uid) if isCreature(uid) then doSendMagicEffect(getThingPos(uid), CONST_ME_TELEPORT) doRemoveCreature(uid) end end, time, newSummon) Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616544 Compartilhar em outros sites More sharing options...
allanzinh 4 Postado Fevereiro 25, 2014 Autor Share Postado Fevereiro 25, 2014 [25/02/2014 14:46:26] [Warning - Event::loadScript] Event onStatsChange not found (data/creaturescripts/scripts/passive.lua) apareceo Isso não sei deo Erro . mais o Misdreavuss continua sem se Multiplicar . Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616662 Compartilhar em outros sites More sharing options...
Shoguns 119 Postado Fevereiro 25, 2014 Share Postado Fevereiro 25, 2014 function onThink(cid, interval) if spell == "" then local time = 5 * 1000 local name = getCreatureName(cid) local status = getPokemonStatus(name, getOffense(creature) / pokes[name].off) local newSummon = doSummonMonster(cid, name) elseif not isCreature(newSummon) then return end setWildPokemonLevel(newSummon, getLevel(cid), status) doTeleportThing(newSummon, getThingPos(cid), false) doSendMagicEffect(getThingPos(newSummon), CONST_ME_TELEPORT) addEvent(function(uid) if isCreature(uid) then doSendMagicEffect(getThingPos(uid), CONST_ME_TELEPORT) doRemoveCreature(uid) end end, time, newSummon) Agora troca la na tag do xml o StatsChange por think Link para o comentário https://xtibia.com/forum/topic/229157-alguem-poderia-me-ajudar-com-ese-scrip-de-passive-illusion/#findComment-1616663 Compartilhar em outros sites More sharing options...
Posts Recomendados