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

[HELP] Outfit In X Zone No change Colors or Outfit

Bloody-War

New Member
Joined
Feb 9, 2016
Messages
88
Reaction score
1
Hello.

I request some special script from u guys. I need script do the next thing.

- In X Zone of map you will cant change ur outfit. And colors or enter in special tp you cant change outfit ir colors.

- Its Possible to create it?

- server 0.3.6

- thanks, reply soon has possible..
 
Last edited:
Wrong section
Pro tip: Use 'Report' and advise that thread should be moved to requests.
Hello.

I request some special script from u guys. I need script do the next thing.

- In X Zone of map you will cant change ur outfit. And colors or enter in special tp you cant change outfit ir colors.

- Its Possible to create it?

- server 0.3.6

- thanks, reply soon has possible..
Try this.
Code:
local top_left  = {x = 999, y = 999, 6}
local bot_right = {x = 1001, y = 1001, 8}

function onOutfit(cid, old, current)
    local pos = getCreaturePosition(cid)
    if pos.x >= top_left.x and pos.x <= bot_right.x then
        if pos.y >= top_left.y and pos.y <= bot_right.y then
            if pos.z <= top_left.z and pos.z >= bot_right.z then
                return false
            end
        end
    end
    return true
end
 
Pro tip: Use 'Report' and advise that thread should be moved to requests.

Try this.
Code:
local top_left  = {x = 999, y = 999, 6}
local bot_right = {x = 1001, y = 1001, 8}

function onOutfit(cid, old, current)
    local pos = getCreaturePosition(cid)
    if pos.x >= top_left.x and pos.x <= bot_right.x then
        if pos.y >= top_left.y and pos.y <= bot_right.y then
            if pos.z <= top_left.z and pos.z >= bot_right.z then
                return false
            end
        end
    end
    return true
end

Where i need to add this script? Movements?
 
creaturescripts.xml and also register in login.lua
error

[Error - CreatureScript Interface] |
data/creaturescripts/scripts/outfit.lua:eek:nOutfit |
Description: |
data/creaturescripts/scripts/outfit.lua:8: attempt to compare number with nil |
stack traceback: |
data/creaturescripts/scripts/outfit.lua:8: in function <data/creaturescr|
ipts/scripts/outfit.lua:4>
 
Sorry.
Code:
local top_left  = {x = 999, y = 999, 6}
local bot_right = {x = 1001, y = 1001, 8}

function onOutfit(cid, old, current)
    local pos = {x = 0, y = 0, z = 0}
    pos = getCreaturePosition(cid)
    if pos.x >= top_left.x and pos.x <= bot_right.x then
        if pos.y >= top_left.y and pos.y <= bot_right.y then
            if pos.z <= top_left.z and pos.z >= bot_right.z then
                return false
            end
        end
    end
    return true
end
 
Sorry.
Code:
local top_left  = {x = 999, y = 999, 6}
local bot_right = {x = 1001, y = 1001, 8}

function onOutfit(cid, old, current)
    local pos = {x = 0, y = 0, z = 0}
    pos = getCreaturePosition(cid)
    if pos.x >= top_left.x and pos.x <= bot_right.x then
        if pos.y >= top_left.y and pos.y <= bot_right.y then
            if pos.z <= top_left.z and pos.z >= bot_right.z then
                return false
            end
        end
    end
    return true
end

still getiing same error can you check my messege in private please
 
i think i know where is the problem but i dont know how to solv it.

1- i am using onStepIn : that script give u outfit blue and red then teleport the player to x map.
2- then i am uing ur script wich x map u cant change your outfit.
3- then now the problem is when u enter to tp get outfit and teleported to x map your script dosent let him get the outit blue or red.
4- its not poissible to do when u enter to tp Aand teleport to x map u get blue or red outfit from 1st script then 2ond script do when u get the outfit blue or red i will not choise or can change the outfit.
 
i think i know where is the problem but i dont know how to solv it.

1- i am using onStepIn : that script give u outfit blue and red then teleport the player to x map.
2- then i am uing ur script wich x map u cant change your outfit.
3- then now the problem is when u enter to tp get outfit and teleported to x map your script dosent let him get the outit blue or red.
4- its not poissible to do when u enter to tp Aand teleport to x map u get blue or red outfit from 1st script then 2ond script do when u get the outfit blue or red i will not choise or can change the outfit.
When do you receive the error?
Nevermind.
I'll test the script when I get home.
Clearly I'm missing something.

If anyone see's the issue before I get home in 10 hours, feel free to chime in.
 
When do you receive the error?
Nevermind.
I'll test the script when I get home.
Clearly I'm missing something.

If anyone see's the issue before I get home in 10 hours, feel free to chime in.

I recive the error when some wanna change his outfit in that zone where u cant change.
 
....
I apparently forgot "z ="
Code:
local top_left  = {x = 2841, y = 2964, z = 6}
local bot_right = {x = 2843, y = 2965, z = 6}

function onOutfit(cid, old, current)
     local pos = getCreaturePosition(cid)
     if pos.x >= top_left.x and pos.x <= bot_right.x then
         if pos.y >= top_left.y and pos.y <= bot_right.y then
             if pos.z <= top_left.z and pos.z >= bot_right.z then
                 return false
             end
         end
     end
     return true
end
 
....
I apparently forgot "z ="
Code:
local top_left  = {x = 2841, y = 2964, z = 6}
local bot_right = {x = 2843, y = 2965, z = 6}

function onOutfit(cid, old, current)
     local pos = getCreaturePosition(cid)
     if pos.x >= top_left.x and pos.x <= bot_right.x then
         if pos.y >= top_left.y and pos.y <= bot_right.y then
             if pos.z <= top_left.z and pos.z >= bot_right.z then
                 return false
             end
         end
     end
     return true
end
i cant see any different in first script and in last one!

what is the difference all is same
 
He added Z to the top_left and bot_right.
ye but if u check the first script and the last one there are not any difference!

first:

local top_left = {x = 999, y = 999, 6}
local bot_right = {x = 1001, y = 1001, 8}

function onOutfit(cid, old, current)
local pos = getCreaturePosition(cid)
if pos.x >= top_left.x and pos.x <= bot_right.x then
if pos.y >= top_left.y and pos.y <= bot_right.y then
if pos.z <= top_left.z and pos.z >= bot_right.z then
return false
end
end
end
return true
end

last one:

local top_left = {x = 2841, y = 2964, z = 6}
local bot_right = {x = 2843, y = 2965, z = 6}

function onOutfit(cid, old, current)
local pos = getCreaturePosition(cid)
if pos.x >= top_left.x and pos.x <= bot_right.x then
if pos.y >= top_left.y and pos.y <= bot_right.y then
if pos.z <= top_left.z and pos.z >= bot_right.z then
return false
end
end
end
return true
end
 
ye but if u check the first script and the last one there are not any difference!

first:

local top_left = {x = 999, y = 999, 6}
local bot_right = {x = 1001, y = 1001, 8}

function onOutfit(cid, old, current)
local pos = getCreaturePosition(cid)
if pos.x >= top_left.x and pos.x <= bot_right.x then
if pos.y >= top_left.y and pos.y <= bot_right.y then
if pos.z <= top_left.z and pos.z >= bot_right.z then
return false
end
end
end
return true
end

last one:

local top_left = {x = 2841, y = 2964, z = 6}
local bot_right = {x = 2843, y = 2965, z = 6}

function onOutfit(cid, old, current)
local pos = getCreaturePosition(cid)
if pos.x >= top_left.x and pos.x <= bot_right.x then
if pos.y >= top_left.y and pos.y <= bot_right.y then
if pos.z <= top_left.z and pos.z >= bot_right.z then
return false
end
end
end
return true
end
https://text-compare.com/
 
Are you arguing with them with the difference between the scripts?, They are helping you so try their scripts and tell them if there is error or not, Do no argue about stupid things please o.o
 
Back
Top