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

Max Looktypes, Effect's

merfus

Member
Joined
Dec 27, 2011
Messages
214
Reaction score
5
Location
Poland
Hello guys, can anyone tell me in what file (Source C++) i can change max Looktypes and Effects?
Because i have already more than 352 looktypes but when i type /newtype 353 there is:
15:43 Such outfit does not exist.
The same with effect's,
Where i can enlarge it? in what line?
 
effects need to be added in sources to work, but the limit is in the talkactions

data/talkactions/newtype.lua

Lua:
function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
		return true
	end

	local t, pid = string.explode(param, ","), cid
	if(t[2]) then
		pid = getPlayerByNameWildcard(t[2])
		if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
			return true
		end
	end

	local period, tmp = -1, tonumber(t[3])
	if(t[3] and tmp) then
		period = tmp
	end

	t[1] = tonumber(t[1])
	if(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or (t[1] > 351 and t[1] < 366) or t[1] > 367) then
		local item = getItemInfo(t[1])
		if(item) then
			doSetItemOutfit(pid, t[1], period)
			return true
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")
		return true
	end

	local tmp = getCreatureOutfit(pid)
	tmp.lookType = t[1]

	doCreatureChangeOutfit(pid, tmp)
	return true
end

if(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or (t[1] > 351 and t[1] < 366) or t[1] > 367) then

change that line :>
 
effects need to be added in sources to work, but the limit is in the talkactions

data/talkactions/newtype.lua

Lua:
function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
		return true
	end

	local t, pid = string.explode(param, ","), cid
	if(t[2]) then
		pid = getPlayerByNameWildcard(t[2])
		if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
			return true
		end
	end

	local period, tmp = -1, tonumber(t[3])
	if(t[3] and tmp) then
		period = tmp
	end

	t[1] = tonumber(t[1])
	if(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or (t[1] > 351 and t[1] < 366) or t[1] > 367) then
		local item = getItemInfo(t[1])
		if(item) then
			doSetItemOutfit(pid, t[1], period)
			return true
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")
		return true
	end

	local tmp = getCreatureOutfit(pid)
	tmp.lookType = t[1]

	doCreatureChangeOutfit(pid, tmp)
	return true
end

if(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or (t[1] > 351 and t[1] < 366) or t[1] > 367) then

change that line :>

Looktype works REP++ For you.

For effect's i must add it to source tools.cpp? and later where i can change limit of it? or it will change itself?
 
to be able to use the command you change in
data/lib/000-constant.lua

CONST_ANI_LAST =

should be

Lua:
CONST_ANI_LAST = 666
if you have 666 effects hehe :p


-- effects in Source is in const.h
inside
[CPP]enum ShootEffect_t[/CPP]

example:
[CPP]
SHOOT_EFFECT_CAKE = 0x29, //41
SHOOT_EFFECT_NEW = 0x2A, //42
SHOOT_EFFECT_LAST = SHOOT_EFFECT_NEW,
[/CPP]

Its hex so it goes:

1 2 3 4 5 6 7 8 9 A B C D E F

^^
 
I have months looking for something but do not lay But I have this line in my NewType

if (t [1] <= 1 or t [1] == 135 or (t [1]> 160 and t [1] <192) or (t [1]> 351 and t [1] <366) or t [1]> 367) then

I get only so:
t [1] = tonumber (t [1])
if (not CheckType (t [1])) then
Local item = GetItemInfo (t [1])
if (item) then
doSetItemOutfit (pid, t [1], period)
return true
end

in this case as it gets?
 
For if you read it and try this option

t [1] = tonumber (t [1])
if (t [1] <= 1 or t [1] == 135 or (t [1]> 160 and t [1] <192) or (t [1]> 351 and t [1] <366) or t [1]> 600) then
Local item = GetItemInfo (t [1])
if (item) then
doSetItemOutfit (pid, t [1], period)
return true
end

But just charge me the error, not if bad edit lines or OTX not accept me that line
"(T [1] <= 1 or t [1] == 135 or (t [1]> 160 and t [1] <192) or (t [1]> 351 and t [1] <366) or t [1]> 600) "
 
Back
Top