Postado Abril 10, 2016 9 anos Olá, amigos, acho que o título diz tudo, né? Pois bem, queria que um monstro desse storage para todo mundo, só que ele só dá para a pessoa que dá o last hit (ou pessoas), pois bem, como sou novo nos scripts, queria saber se tem alguma chance de ser algo na função onKill. Já tentei usar onDeath, mas não funcionou. Abaixo segue creaturescript: local bossForms = { ['snake god essence'] = { text = 'IT\'S NOT THAT EASY MORTALS! FEEL THE POWER OF THE GOD!', newForm = 'snake thing' }, ['snake thing'] = { text = 'NOOO! NOW YOU HERETICS WILL FACE MY GODLY WRATH!', newForm = 'lizard abomination' }, ['lizard abomination'] = { text = 'YOU ... WILL ... PAY WITH ETERNITY ... OF AGONY!', newForm = 'mutated zalamon' } } function onDeath(player, target) local pos = Creature(player:getPosition()) player:say('teste', TALKTYPE_MONSTER_SAY) player:setStorageValue(12361, 2) player:setStorageValue(12362, 1) end function onKill(player, target) local targetMonster = target:getMonster() if not targetMonster then return true end if targetMonster:getName():lower() == 'mutated zalamon' then Game.setStorageValue(Storage.WrathoftheEmperor.Mission11, -1) player:say('1', TALKTYPE_MONSTER_SAY) return true end local bossConfig = bossForms[targetMonster:getName():lower()] if not bossConfig then player:say('222', TALKTYPE_MONSTER_SAY) return true end Game.createMonster(bossConfig.newForm, targetMonster:getPosition(), false, true) player:say(bossConfig.text, TALKTYPE_MONSTER_SAY) return true end
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.