Postado Novembro 16, 2021 3 anos Quando eu dou use ele sumona o poke, porém o poke fica como se fosse um pokemon selvagem normal, e não como se ele fosse meu ou seja, ao invez de ele me ajudar, ele vira um pokemon selvagem e me ataca 33 minutos atrás, sharen disse: Quando eu dou use ele sumona o poke, porém o poke fica como se fosse um pokemon selvagem normal, e não como se ele fosse meu ou seja, ao invez de ele me ajudar, ele vira um pokemon selvagem e me ataca deve ser pq não tem a função no meu servidor por ser tfs 1.2, poderia publicar a função "setmaster" pfv? pq não achei na net
Postado Dezembro 13, 2021 3 anos Em 25/04/2021 em 02:19, najatheus disse: Em actions criei um arquivo chamado guardian.lua, dentro dele coloque : local lendas = { -- id dos item / nome do guardian [3000] = {"Mew"}, [3001] = {"Mewtwo"}, [3002] = {"Articuno"}, [3003] = {"Zapdos"}, [3004] = {"Moltres"}, [3005] = {"Entei"}, [3006] = {"Suicune"}, [3007] = {"Raikou"}, [3008] = {"Ho-oh"}, [30010] = {"Lugia"}, } function onUse(player, item, fromPosition, target, toPosition, ishotkey) slot = player:getSlotItem(CONST_SLOT_AMMO) if not slot then player:sendTextMessage(MESSAGE_STATUS_SMALL, "" .. player:getName() .. " Put the Guardian in the right slot" .." ") return true end local lenda = lendas[item.itemid] if not lenda then player:sendTextMessage(MESSAGE_STATUS_SMALL, "" .. player:getName() .. " Sorry, ask adm to set up the guardian string!" .." ") return true elseif(player:getStorageValue(28723) == 1)then player:sendTextMessage(MESSAGE_STATUS_SMALL, "Have you ever used this guardian") return true else local postion = player:getPosition() local monster = Game.createMonster(lenda[1], postion) if not monster then player:sendTextMessage(MESSAGE_STATUS_SMALL,"" ..player:getName() .." Sorry you can't summon, contact a member of staff!.") return true end local message = {"" .. player:getName() .. " Go Guardian : " .. lenda[1] .. ""} player:sendTextMessage(MESSAGE_INFO_DESCR, "Have you ever used this guardian") player:setStorageValue(28723, 1) player:say(message[1], TALKTYPE_MONSTER_SAY) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION,"[Name] : " .. lenda[1] .. "\n" .. "[Owner] : " .. player:getName() .. "\n" .. "[Last use] :" .. os.date() .. "") local guardians = MonsterType(lenda[1]) if not guardian then return false end guardians:nameDescription("Guardian " .. lenda[1] .. "") guardians:name("Guardian " .. lenda[1] .. "") monster:setMaster(player) monster:setMaxHealth(70000000) monster:setSkull(SKULL_GREEN) monster:getPosition():sendMagicEffect(6) monster:changeSpeed(600000) speed = monster:getSpeed() healt = monster:getHealth() monster:say("GUARDIAN!" .. lenda[1] .. "", TALKTYPE_MONSTER_SAY) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"You used the Guardian ( " .. lenda[1] .. " ).") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Your Guardian is alive: " .. healt .. " / " .. monster:getMaxHealth() .. " wait for his life to fully load.") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Guardian Speed " .. speed .. ".") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Guardian owner " .. player:getName() .. ".") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Last time the Guardian was used [" .. os.date() .. "].") return true end end Depois abra o action.xml, e registra : <action itemid="o id" script="guardian.lua" /> Sou leigo, pra que serve esse sistema?
Postado Março 28, 2022 3 anos Não tem nem explicação no tópico sore o que é o script ... STYLLER OT 2022
Postado Novembro 28, 2022 2 anos Em 13/12/2021 em 11:02, draco6 disse: up rep++ mas alguem conseguiria converter pra tfs 1.2? Alguém? kk
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.