Cronox Aportadores
Posts : 15 Points : 39 Reputation : 0 Join date : 14/07/2012
| Tema: [SCRIPT] !go Sáb Jul 14, 2012 7:35 pm | |
| Bueno amigos este script sirve para que el leader de la guild cuando salen a pekear o algo diga !go y todos los de la guild usaran el mismo color que el leader.... empezemos :D Vamos a data/talkactions/script creamos un archivo llamado guildoutfit.lua y pegamos esto dentro : - Código:
-
local config = { exhaustionInSeconds = 30, storage = 34534 }
function onSay(cid, words, param) if(exhaustion.check(cid, config.storage) == TRUE) then doPlayerSendCancel(cid, "You can change outfit only 1 time per " .. config.exhaustionInSeconds .. " seconds.") return TRUE end
local playerGuild = getPlayerGuildId(cid) if(playerGuild == FALSE) then doPlayerSendCancel(cid, "Sorry, you're not in a guild.") return TRUE end
local playerGuildLevel = getPlayerGuildLevel(cid) if(playerGuildLevel < GUILDLEVEL_LEADER) then doPlayerSendCancel(cid, "You have to be Leader of your guild to change outfits!") return TRUE end
local players = getPlayersOnline() local outfit = getCreatureOutfit(cid) local message = "*Guild* Your outfit has been changed by leader. (" .. getCreatureName(cid) .. ")" local members = 0 local tmp = {} for i, tid in ipairs(players) do if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then tmp = outfit if(canPlayerWearOutfit(tid, outfit.lookType, outfit.lookAddons) ~= TRUE) then local tidOutfit = getCreatureOutfit(tid) tmp.lookType = tidOutfit.lookType tmp.lookAddons = tidOutfit.lookAddons end
doSendMagicEffect(getCreaturePosition(tid), 66) doCreatureChangeOutfit(tid, tmp) doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message) members = members + 1 end end
exhaustion.set(cid, config.storage, config.exhaustionInSeconds) doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")") return TRUE end Vamos a data/talkactions/talkactions.xml y agregamos esto : - Código:
-
<talkaction words="!go" event="script" value="guildoutfit.lua"/> Gracias amigos.. nos vemos en otro post | |
|
Guest Invitado
| Tema: Re: [SCRIPT] !go Sáb Jul 14, 2012 7:37 pm | |
| Buena amigo aunque creo que eso en todos los servers ya viene jejej +REP por el intento
Perdon por el spam pero esto debe ir en scripts no en sprites jeje :P
Última edición por Hazardous el Sáb Jul 14, 2012 7:43 pm, editado 1 vez (Razón : TEMA MOVIDO Y MENSAJE EDITADO :P) |
|