corydurban
New Member
- Joined
- Jul 21, 2007
- Messages
- 43
- Reaction score
- 1
I wanted it set to where if in prison(with storage 1339) it shows as a prisoner from hell
well it works the problem is if i'm looking at anything else other then another person it dosent work as in it won't allow me to look
this is my script
and i get this error when i try to look at something that is not a person
[3:26:36.343] stack traceback:
[3:26:36.346] data/creaturescripts/scripts/prison.lua:4: in function <data/cre
aturescripts/scripts/prison.lua:3>
I'm new to scripting so >.> excuse me being a noob
i really need to get this working >.>
well it works the problem is if i'm looking at anything else other then another person it dosent work as in it won't allow me to look
this is my script
Lua:
local storage = 1339
function onLook(cid, thing, position, lookDistance)
if (isPlayer(thing.uid) ~= cid and getPlayerStorageValue(thing.uid, storage) > 0) then
doPlayerSetSpecialDescription(thing.uid,'.\n'..(getPlayerSex(thing.uid) == 0 and 'She' or 'He')..' is a prisoner of hell')
end
if (isPlayer(thing.uid) == cid and getPlayerStorageValue(thing.uid, storage) > 0) then
doPlayerSetSpecialDescription(thing.uid,'.\n is a prisoner of hell')
end
return true
end
[3:26:36.343] stack traceback:
[3:26:36.346] data/creaturescripts/scripts/prison.lua:4: in function <data/cre
aturescripts/scripts/prison.lua:3>
I'm new to scripting so >.> excuse me being a noob
i really need to get this working >.>
Last edited: