GOD lolsito
New Member
- Joined
- Aug 16, 2010
- Messages
- 78
- Reaction score
- 1
Lua:
okay = "Outfits Añadidos." ----- Mensaje De confirmacion, en caso de que correctamente los outfits se añadieron.
cancelmsg = "Todos los outfits existentes han sido añadidos." ---- Mensaje, de estilo "Sorry not posible" que se mostrara al terminar correctamente.
already = "Antes de utilizar este comando ya tenias todos los outfits!" -- Mensaje que se mostrara si el usuario ya tenia todos los outfits existentes en el archivo XML.
local outfits = io.open (outfits.xml , r)
local outfitsid = tonumber (e , base])
for e in outfits:read(n) do
string.match (e, , <outfit id)
function onSay(cid, words, param, channel)
ppos = getCreaturePosition(cid)
for i = 1,41 do
if doPlayerRemoveOutfitId(cid, i, 2) then
doSendMagicEffect(ppos,2, yes)
doPlayerPopupFYI(cid,already)
doPlayerSendTextMessage(cid, 4, "Error ya tienes los outfits especificados.")
break
else
doPlayerAddOutfitId(cid, i, 2)
doSendMagicEffect(ppos,math.random(1,74), yes)
doPlayerSendTextMessage(cid, 4, okay)
return
end
end
end
The function of this script, is when you say !getoutfits, all outfits in your outfits.xml will get the gm.
But the problem it need to be configured, can someone give me the script to make it, automatically get the number of outfits.xml?
for example there is on the script:
Code:
for i = 1,41 do
i dont want this line, i want this script automatically give all outfits of the xml.