Postado Outubro 5, 2020 4 anos Alguém sabe explicar este código ? Quem fez ele não soube explicar muito bem (pelo menos eu não entendi). Eu não sei onde deve ir os respectivos AID, a explicação está bem raza. Não consigo entender se o AID é em X local ou N local... Tentei instalar mas foi só dor de cabeça. Se alguém puder pelo menos falar onde deve ser colocado os AIDS e a função deles no script, seria ótimo !! Muito obrigado desde já. O autor do script é o zakius, postado e explicado por Conde e mal interpretado por mim (kk) Citar Em data/lib adicione: function doCreatureSayWithDelay(cid,text,type,delay,e,pcid) if delay<=0 then doCreatureSay(cid,text,type, false,pcid) else local func=function(pars) doCreatureSay(pars.cid,pars.text,pars.type, false,pars.pcid) pars.e.done=TRUE end e.done=FALSE e.event=addEvent(func,delay,{cid=cid, text=text, type=type, e=e,pcid=pcid}) end end Em movements crie o arquivo inquisition.lua e adicione: local config = { bosses={---actionid, posicao para onde ira, valor que colocara, texto de entrada [1001] = {pos={x=1173, y=1137, z=12, stackpos=1}, value=1, text="Entering The Crystal Caves"}, [1002] = {pos={x=1128, y=1151, z=12, stackpos=1}, value=2, text="Entering The Blood Halls"}, [1003] = {pos={x=1045, y=1204, z=13, stackpos=1}, value=3, text="Entering The Vats"}, [1004] = {pos={x=1152, y=1195, z=13, stackpos=1}, value=4, text="Entering The Arcanum"}, [1005] = {pos={x=1247, y=1295, z=12, stackpos=1}, value=5, text="Entering The Hive"}, [1006] = {pos={x=1064, y=1308, z=13, stackpos=1}, value=6, text="Entering The Shadow Nexus. All hope desapear!"} }, mainroom={---actionid, posicao que ira,menor valor de storage que poder entrar, texto de entrada [2001] = {pos={x=1173, y=1137, z=12, stackpos=1}, value=1, text="Entering The Crystal Caves"}, [2002] = {pos={x=1128, y=1151, z=12, stackpos=1}, value=2, text="Entering The Blood Halls"}, [2003] = {pos={x=1045, y=1204, z=13, stackpos=1}, value=3, text="Entering The Vats"}, [2004] = {pos={x=1152, y=1195, z=13, stackpos=1}, value=4, text="Entering The Arcanum"}, [2005] = {pos={x=1247, y=1295, z=12, stackpos=1}, value=5, text="Entering The Hive"} }, portals={---actionid,texto de entrada [3000] = {pos={x=1065, y=1086, z=14}, text="Entering Inquisition Portals Room"}, [3001] = {pos={x=1098, y=1214, z=12}, text="Entering The Ward of Ushuriel"}, [3002] = {pos={x=1185, y=1067, z=12}, text="Entering The Undersea Kingdom"}, [3003] = {pos={x=1130, y=1213, z=12}, text="Entering The Ward of Zugurosh"}, [3004] = {pos={x=1148, y=1127, z=12}, text="Entering The Foundry"}, [3005] = {pos={x=1113, y=1254, z=12}, text="Entering The Ward of Madareth"}, [3006] = {pos={x=1043, y=1133, z=13}, text="Entering The Battlefield"}, [3007] = {pos={x=1148, y=1254, z=12}, text="Entering The Ward of The Demon Twins"}, [3008] = {pos={x=1195, y=1201, z=13}, text="Entering The Soul Wells"}, [3009] = {pos={x=1187, y=1213, z=12}, text="Entering The Ward of Annihilon"}, [3010] = {pos={x=1193, y=1254, z=12}, text="Entering The Ward of Hellgorak"} }, storage=56123,---storage usado nos teleportes da sala central walkback="You don't have enough energy to enter this portal",---Messagem que aparece se vc nao poder entrar no teleport da sala central e={} }----nao modificar, se nao tiver o creaturesaywithdelay} function onStepIn(cid, item, position, fromPosition) if isPlayer(cid) == TRUE then if(config.bosses[item.actionid]) then local t= config.bosses[item.actionid] if getPlayerStorageValue(cid, config.storage)< t.value then setPlayerStorageValue(cid, config.storage, t.value) end doTeleportThing(cid, t.pos) doCreatureSayWithDelay(cid,t.text,19,1, config.e) elseif(config.mainroom[item.actionid]) then local t= config.mainroom[item.actionid] if getPlayerStorageValue(cid, config.storage)>=t.value then doTeleportThing(cid, t.pos) doCreatureSayWithDelay(cid,t.text,19,1,config.e) else doTeleportThing(cid, fromPosition) doCreatureSay(cid, config.walkback, 19) end elseif(config.portals[item.actionid]) then local t= config.portals[item.actionid] doTeleportThing(cid, t.pos) doCreatureSayWithDelay(cid,t.text,19,1,config.e) end end end <movevent type="StepIn" itemid="9773" event="script" value="inquisition.lua"/> E em data/creaturescripts adicione o inquisition.lua e coloque: local config = { timeToRemove = 180, -- segundos message = "Go into the teleport in 180 seconds, else it will disappear.", teleportId = 9773, bosses = { -- Nome do monstro, Posicao do teleporte ["Ushuriel"] = { pos={x=1097, y=1214, z=12, stackpos=1}, aid=1001 }, ["Zugurosh"] = { pos={x=1129, y=1213, z=12, stackpos=1}, aid=1002}, ["Madareth"] = { pos={x=1112, y=1254, z=12, stackpos=1}, aid=1003}, ["Annihilon"] = { pos={x=1187, y=1214, z=12, stackpos=1}, aid=1005}, ["Hellgorak"] = { pos={x=1192, y=1256, z=12, stackpos=1}, aid=1006} }, brothers ={ ["Golgordan"] = {pos={x=1147, y=1254, z=12, stackpos=1},aid=1004, brother = "Latrivan"}, ["Latrivan"] = {pos={x=1147, y=1254, z=12, stackpos=1},aid=1004, brother = "Golgordan"}, brothersArea ={ fromPos = {x = 1139, y = 1244, z = 12}, toPos = {x = 1155, y = 1254, z = 12} } } } local function change(position) doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", 3000) return TRUE end function onKill(cid, target, lastHit) if(config.bosses[getCreatureName(target)]) then local t = config.bosses[getCreatureName(target)] local position = t.pos doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid) doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1) addEvent(change, config.timeToRemove * 1000, position) elseif(config.brothers[getCreatureName(target)]) then local t = config.brothers[getCreatureName(target)] local brother = getCreatureByName(t.brother) if(isMonster(brother) == true) then if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then return TRUE end else local position = t.pos doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", t.aid) doItemSetAttribute(teleport, "aid", t.aid) doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1) addEvent(removal, config.timeToRemove * 1000, position) end end return TRUE end <event type="kill" name="Inquisition" event="script" value="inquisition.lua"/> Adicione este código em cada XML dos bosses na pasta monsters: <script> <event name="Inquisition"/> </script> Explicação do autor a respeito do script: Os teleportes da sala principal deverão ter os Actionid respectivos no script. Sendo que cada um levará ao seu devido lugar apenas se o player já tiver passado nele. Quando o boss morre, o script modifica o teleporte para o player poder voltar para a sala principal. -Todo teleporte de Boss deverá ter o actionid 3000 como default. Pois senão o player não poderá voltar. -Existem maiores explicações no proprio arquivo. Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. Editado Outubro 5, 2020 4 anos por Rogex Joyz (veja o histórico de edições) mídias sociais talk to me vídeos
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.