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

Need help with this script!

Figaro

Banned User
Joined
Jun 25, 2008
Messages
275
Reaction score
0
Location
696E 2079 6F75 7220 6265 64
Somebody can edit my script like this: When use switch outfit changes but when go to tp, outfit changes back to old?

Code:
local outfit = {lookType = 128, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local effect2 = 30
local effect3 = 27
local effect4 = 29
local effect = 28

	function onUse(cid, item, fromPosition, itemEx, toPosition) do
              doCreatureChangeOutfit(cid, outfit)
	        doSendMagicEffect(getCreaturePosition(cid), effect)
	        doSendMagicEffect(getCreaturePosition(cid), effect2)
	        doSendMagicEffect(getCreaturePosition(cid), effect3)
	        doSendMagicEffect(getCreaturePosition(cid), effect4)
		doPlayerSendTextMessage(cid,21,"Your outfit is changed!")
	end
    return true
end
Rly need help with this
 
Wouldn't that require to save the old outfit and then when walking on a special tile (With the teleporter on) it takes the old, and uses it? xD
 
try this:

Lua:
local outfit = {lookType = 128, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local effect2 = 30
local effect3 = 27
local effect4 = 29
local effect = 28
local storageValue = {1000,1001,1003,1004,1005,1006,1007}

function saveOutfit(cid)
setPlayerStorageValue(cid, storageValue[1], getCreatureOutfit(cid).lookType)
setPlayerStorageValue(cid, storageValue[2], getCreatureOutfit(cid).lookHead)
setPlayerStorageValue(cid, storageValue[3], getCreatureOutfit(cid).lookBody)
setPlayerStorageValue(cid, storageValue[4], getCreatureOutfit(cid).lookLegs)
setPlayerStorageValue(cid, storageValue[5], getCreatureOutfit(cid).lookFeet)
setPlayerStorageValue(cid, storageValue[6], getCreatureOutfit(cid).lookTypeEx)
setPlayerStorageValue(cid, storageValue[7], getCreatureOutfit(cid).lookAddons)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
        saveOutfit(cid)
	doCreatureChangeOutfit(cid, outfit)
	doSendMagicEffect(getCreaturePosition(cid), effect)
	doSendMagicEffect(getCreaturePosition(cid), effect2)
	doSendMagicEffect(getCreaturePosition(cid), effect3)
	doSendMagicEffect(getCreaturePosition(cid), effect4)
	doPlayerSendTextMessage(cid,21,"Your outfit is changed!")
	return TRUE
end

function onStepIn(cid, item, position, fromPosition)
local storageValue = {1000,1001,1003,1004,1005,1006,1007}
local outfit = {
lookType = getPlayerStorageValue(cid, storageValue[1]),
lookHead = getPlayerStorageValue(cid, storageValue[2]),
lookBody = getPlayerStorageValue(cid, storageValue[3]),
lookLegs = getPlayerStorageValue(cid, storageValue[4]),
lookFeet = getPlayerStorageValue(cid, storageValue[5]),
lookTypeEx = getPlayerStorageValue(cid, storageValue[6]),
lookAddons = getPlayerStorageValue(cid, storageValue[7])
}
	doCreatureChangeOutfit(cid, outfit)
	return TRUE
end

You just have to add the teleporting things etc. I think you can finish it on your own now.


kind regards, Evil Hero
 
rep++ :) Nice ty

EDIT: Is there possible to do this to that outfit changer script: When use switch your outfit changes, you cant change your outfit and you cant attack to player who have this same outfit? And when you step on that tp, you chan change out outfit and kill anybody you want.
 
Last edited:
Back
Top