• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua On look in Default Chanel Tfs 0.3.6

Bazi

Member
Joined
Oct 24, 2011
Messages
270
Reaction score
8
Location
Germany
Hey i need a onlook script whit reborn on look thats stand in the deafult chanel if i look :D thx
 
LUA:
function onLook(cid, thing)
	if isPlayer(thing.uid) then
		local n = getCreatureName(thing.uid)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You see " .. (thing.uid == cid and "yourself" or n) .. ". " .. (thing.uid == cid and "You" or "He/She") .." has " .. getRebornsFunction(thing.uid) .. " reborns.")
	end
	return true
end

Change the function to get reborns.
 
[10/08/2012 02:58:24] [Error - CreatureScript Interface]
[10/08/2012 02:58:24] data/creaturescripts/scripts/rebirthdescription.lua:onLook
[10/08/2012 02:58:24] Description:
[10/08/2012 02:58:24] data/creaturescripts/scripts/rebirthdescription.lua:4: attempt to call global 'getRebornsFunction' (a nil value)
[10/08/2012 02:58:24] stack traceback:
[10/08/2012 02:58:24] data/creaturescripts/scripts/rebirthdescription.lua:4: in function <data/creaturescripts/scripts/rebirthdescription.lua:1>
 
9162-triple-facepalm_f-jpg.5765


Goddam I have to use this again.
Just read my post again and see what part you did not do.
 
LUA:
function onLook(cid, thing)
	if isPlayer(thing.uid) then
		local n = getCreatureName(thing.uid)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You see " .. (thing.uid == cid and "yourself" or n) .. ". " .. (thing.uid == cid and "You" or "He/She") .." has " .. getRebornsFunction(thing.uid) .. " reborns.")
	end
	return true
end

Change the function to get reborns.

[10/08/2012 02:58:24] [Error - CreatureScript Interface]
[10/08/2012 02:58:24] data/creaturescripts/scripts/rebirthdescription.lua:onLook
[10/08/2012 02:58:24] Description:
[10/08/2012 02:58:24] data/creaturescripts/scripts/rebirthdescription.lua:4: attempt to call global 'getRebornsFunction' (a nil value)
[10/08/2012 02:58:24] stack traceback:
[10/08/2012 02:58:24] data/creaturescripts/scripts/rebirthdescription.lua:4: in function <data/creaturescripts/scripts/rebirthdescription.lua:1>

Did you not read what he said?

- - - Updated - - -

@Summ, don't even help him.. let him figure it out on his own
 
dont know what to do my english is very bad -.-

- - - Updated - - -

i deletet
getRebornsFunction(thing.uid) .. " reborns.")- to getReborns(thing.uid) .. " reborns.")

[10/08/2012 03:13:50] [Error - CreatureScript Interface]
[10/08/2012 03:13:50] data/creaturescripts/scripts/rebirthdescription.lua:onLook
[10/08/2012 03:13:50] Description:
[10/08/2012 03:13:50] data/creaturescripts/scripts/rebirthdescription.lua:4: attempt to call global 'getReborns' (a nil value)
[10/08/2012 03:13:50] stack traceback:
[10/08/2012 03:13:50] data/creaturescripts/scripts/rebirthdescription.lua:4: in function <data/creaturescripts/scripts/rebirthdescription.lua:1>

function onLook(cid, thing)
if isPlayer(thing.uid) then
local n = getCreatureName(thing.uid)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You see " .. (thing.uid == cid and "yourself" or n) .. ". " .. (thing.uid == cid and "You" or "He/She") .." has " .. getReborns(thing.uid) .. " reborns.")
end
return true
end
 
Back
Top