• 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!

Solved Talkaction to change target outfit

Kiriito

New Member
Joined
Dec 5, 2014
Messages
23
Reaction score
2
Location
Argentina
Would like request someone to help me do a talkaction that change the target outfit (target player and monster).

Like the ADM talk action /looktype XXX.

Then something like: /target looktype YYY.

:);):cool:
 
he means when you say the command / spell it changes the monsters outfit you are attacking (Red Square on the target)
I think lol!
 
Code:
function onSay(cid, words, param)
     local player = Player(cid)
     if not player:getGroup():getAccess() then
         return true
     end

     local split = param:split(",")
     local name = split[2] and split[2]:gsub("^%s*", "")
     if Player(name) then
         player = Player(name)
     end
     local lookType = tonumber(split[1])
     if lookType >= 0 and lookType ~= 1 and lookType ~= 135 and lookType ~= 411 and lookType ~= 415 and lookType ~= 424 and (lookType <= 160 or lookType >= 192) and lookType ~= 439 and lookType ~= 440 and lookType ~= 468 and lookType ~= 469 and (lookType < 474 or lookType > 485) and lookType ~= 501 and lookType ~= 518 and lookType ~= 519 and lookType ~= 520 and lookType ~= 524 and lookType ~= 525 and lookType ~= 536 and lookType ~= 543 and lookType ~= 549 and lookType ~= 576 and lookType ~= 581 and lookType ~= 582 and lookType <= 595 then
         local playerOutfit = player:getOutfit()
         playerOutfit.lookType = lookType
         player:setOutfit(playerOutfit)
     else
         player:sendCancelMessage("A look type with that id does not exist.")
     end
     return false
end

Code:
/looktype 274, name
 
Last edited:
The script I posted is an edited version of looktype.lua, you can just replace it and it will have an extra option to change the outfit from an other player.
 
Atm it's just for changing players.

Is it a talkaction that is ment for players or for gods?
Edited looktype.lua that changes the monster you target.
Code:
function onSay(cid, words, param)
     local player = Player(cid)
     if not player:getGroup():getAccess() then
         return true
     end
  
     local target = player:getTarget()
     if target then
         player = target
     end

     local split = param:split(",")
     local name = split[2] and split[2]:gsub("^%s*", "")
     if Player(name) and not target then
         player = Player(name)
     end
     local lookType = tonumber(split[1])
     if lookType >= 0 and lookType ~= 1 and lookType ~= 135 and lookType ~= 411 and lookType ~= 415 and lookType ~= 424 and (lookType <= 160 or lookType >= 192) and lookType ~= 439 and lookType ~= 440 and lookType ~= 468 and lookType ~= 469 and (lookType < 474 or lookType > 485) and lookType ~= 501 and lookType ~= 518 and lookType ~= 519 and lookType ~= 520 and lookType ~= 524 and lookType ~= 525 and lookType ~= 536 and lookType ~= 543 and lookType ~= 549 and lookType ~= 576 and lookType ~= 581 and lookType ~= 582 and lookType <= 595 then
         local playerOutfit = player:getOutfit()
         playerOutfit.lookType = lookType
         player:setOutfit(playerOutfit)
     else
         player:sendCancelMessage("A look type with that id does not exist.")
     end
     return false
end
 
Back
Top