• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TalkAction Easy way to put Outfits to your monsters or NPC

lokolokio

Well-Known Member
Joined
Jan 7, 2009
Messages
201
Solutions
13
Reaction score
78
Location
Mexico
Well this is my first aportation, to this server (own aportation, maybe someother got the same idea but im the first on post it, i hope you like and enjoy it)
My idea consist on the following thing:

Put in: data/talkactions.xml the next code:
Code:
<talkaction words="/outfit" access="5" event="script" value="outfit.lua"/>

after this, create a file in data/talkactions/scripts/ called: outfit.lua and paste the next code inside it:

Code:
function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '<look type="' .. getCreatureOutfit(cid).lookType ..'" head="' .. getCreatureOutfit(cid).lookHead ..'" body="' .. getCreatureOutfit(cid).lookBody ..'" legs="' .. getCreatureOutfit(cid).lookLegs ..'" feet="' .. getCreatureOutfit(cid).lookFeet ..'" addons="" />')
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '<look type="' .. getCreatureOutfit(cid).lookType ..'" head="' .. getCreatureOutfit(cid).lookHead ..'" body="' .. getCreatureOutfit(cid).lookBody ..'" legs="' .. getCreatureOutfit(cid).lookLegs ..'" feet="' .. getCreatureOutfit(cid).lookFeet ..'" addons="" />')
        return true
    end
    return true
end

and thats all mi script, its simple but useful XD enjoy it XD >.<

-.- just open the npc_file.xml and paste the code that the talkactions gaves you

on my case the msge returned was: 15:51 <look type="143" head="114" body="114" legs="114" feet="94" addons="" />

now ill open armor buyer.xml and paste the code:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Armor Buyer" script="data/npc/scripts/armor_buyer.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
     [B][COLOR="red"]<look type="131" head="114" body="20" legs="1" feet="58" addons="3" />[/COLOR][/B]
</npc>
Now just change these code with the code that the talkactions gaves you
 
Last edited:
easy way to get outfit of a creature i guess he meant
any creature: /outfit creaturename
Lua:
function onSay(cid, words, param, channel)

    if not isCreature(getCreatureByName(param)) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Creature not found.')
        return true
    end
    
    local outfit = getCreatureOutfit(getCreatureByName(param))
       
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '<look type="' .. outfit.lookType ..'" head="' .. outfit.lookHead ..'" body="' .. outfit.lookBody ..'" legs="' .. outfit.lookLegs ..'" feet="' .. outfit.lookFeet ..'" addons="'.. outfit.lookAddons..'" />')
    return true
end
 
i understand, you change your outfit to any outfit and says this talkaction. Gets your xml outfit, colors, addons, etc and put in monster or npc, ~~Cool idea~~ :peace:
 
I really like this idea because I can't find a reliable look type generator anywhere else. I followed the instructions, but when i try it, my char just says "/outfit" and nothing happens. Any idea why?
 
Yeah, that site is awesome when it works, but it only works a fraction of the time. :/
 
I really like this idea because I can't find a reliable look type generator anywhere else. I followed the instructions, but when i try it, my char just says "/outfit" and nothing happens. Any idea why?

Check your default channel, this talkactions just show on your screen the words but in default channel it gives a msge in purple font, check it
 
Back
Top