larissaots 163 Postado Maio 30, 2015 Share Postado Maio 30, 2015 Créditos à Kamii. Prévia https://vid.me/O1hJ Comando !rainbow on = Ligar o Rainbow Outfit !rainbow off = Desligar o Rainbow Outfit Tutorial Em talkactions/scripts crie um arquivo chamado rainbow.lua e então coloque esse conteúdo dentro: local colors = {94, 81, 79, 88, 18, 11, 92, 128} local storage = 65535 local time = 10 --in miliseconds function onSay(cid, words, param, channel) if(param == "on") then if getPlayerStorageValue(cid, storage) < 1 then if doPlayerRemoveMoney(cid, 0) == TRUE then local event = addEvent(changeOutfit, time, cid) setPlayerStorageValue(cid, storage, 1) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money.") return TRUE end else return TRUE end elseif(param == "off") then if getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have rainbow outfit on.") return TRUE end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Use !rainbow on-off.") return TRUE end return TRUE end function changeOutfit(cid) local randomHead = colors[math.random(#colors)] local randomLegs = colors[math.random(#colors)] local randomBody = colors[math.random(#colors)] local randomFeet = colors[math.random(#colors)] local tmp = {} if getPlayerStorageValue(cid, storage) > 0 then local outfit = getCreatureOutfit(cid) tmp = outfit tmp.lookType = outfit.lookType tmp.lookHead = randomHead tmp.lookLegs = randomLegs tmp.lookBody = randomBody tmp.lookFeet = randomFeet tmp.lookAddons = outfit.lookAddons doCreatureChangeOutfit(cid, tmp) local event = addEvent(repeatChangeOutfit, time, cid) return TRUE else stopEvent(event) return TRUE end end function repeatChangeOutfit(cid) local randomHead = colors[math.random(#colors)] local randomLegs = colors[math.random(#colors)] local randomBody = colors[math.random(#colors)] local randomFeet = colors[math.random(#colors)] local tmp = {} if getPlayerStorageValue(cid, storage) > 0 then local outfit = getCreatureOutfit(cid) tmp = outfit tmp.lookType = outfit.lookType tmp.lookHead = randomHead tmp.lookLegs = randomLegs tmp.lookBody = randomBody tmp.lookFeet = randomFeet tmp.lookAddons = outfit.lookAddons doCreatureChangeOutfit(cid, tmp) local event = addEvent(changeOutfit, time, cid) return TRUE else stopEvent(event) return TRUE end end No talkactions.xml coloque: <talkaction words="!rainbow" event="script" value="rainbow.lua"/> Link para o comentário Compartilhar em outros sites More sharing options...
Administrador Administrador 1434 Postado Maio 30, 2015 Administrador Share Postado Maio 30, 2015 Ai ta um script que eu nunca vi antes. Muito criativo.. Link para o comentário Compartilhar em outros sites More sharing options...
valakas 90 Postado Maio 30, 2015 Share Postado Maio 30, 2015 essa script eu vi em um subwat e tinha no meu servidor heroserv :v n sei quem realmente criou mais se foi você parabens Link para o comentário Compartilhar em outros sites More sharing options...
RigBy 285 Postado Maio 30, 2015 Share Postado Maio 30, 2015 essa script eu vi em um subwat e tinha no meu servidor heroserv :v n sei quem realmente criou mais se foi você parabens Foi à kami, olha la em cima nos credito. Link para o comentário Compartilhar em outros sites More sharing options...
valakas 90 Postado Maio 30, 2015 Share Postado Maio 30, 2015 Foi à kami, olha la em cima nos credito. n li :v mais só de ler o titulo eu ja sabia da script enfim creditos por trazer Link para o comentário Compartilhar em outros sites More sharing options...
CalistoKing 17 Postado Maio 30, 2015 Share Postado Maio 30, 2015 Belo script tem meu rep Link para o comentário Compartilhar em outros sites More sharing options...
leonardo macedo 5 Postado Junho 4, 2015 Share Postado Junho 4, 2015 Curti, lembrei dos otserver 8.10 kk parabéns! Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados