NPC Prestige/rebirth System with onlook working

StreamSide

Joseluis Gonzalez
Support Team
Joined
Aug 31, 2007
Messages
3,352
Best answers
34
Reaction score
852
Location
Arica - Chile
I'm getting the errors too:

Lua Script Error: [Npc interface]
data/npc/scripts/Prestiger.lua:eek:nCreatureSay
data/npc/scripts/Prestiger.lua:30: attempt to call global 'getCreatureStorage' (a nil value)
stack traceback:
[C]: in function 'getCreatureStorage'
data/npc/scripts/Prestiger.lua:30: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:411: <data/npc/scripts/Prestiger.lua:8>

Lua Script Error: [Npc interface]
data/npc/scripts/Prestiger.lua:eek:nCreatureSay
data/npc/scripts/Prestiger.lua:30: attempt to call global 'getCreatureStorage' (a nil value)
stack traceback:
[C]: in function 'getCreatureStorage'
data/npc/scripts/Prestiger.lua:30: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay'
data/npc/scripts/Prestiger.lua:8: in function <data/npc/scripts/Prestiger.lua:8>

Lua Script Error: [Npc interface]
data/npc/scripts/Prestiger.lua:eek:nCreatureSay
data/npc/scripts/Prestiger.lua:30: attempt to call global 'getCreatureStorage' (a nil value)
stack traceback:
[C]: in function 'getCreatureStorage'
data/npc/scripts/Prestiger.lua:30: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay'
data/npc/scripts/Prestiger.lua:8: in function <data/npc/scripts/Prestiger.lua:8>

Since I've seen 4 people with similar problems as me, I'll say the code doesn't work xD.
this post was seven years ago and as the first line says: This is tested on 0.3.6
there is no longer getCreatureStorage but Player
 
OP
Tjay

Tjay

Retired Hoster
Joined
Nov 25, 2009
Messages
588
Best answers
0
Reaction score
52
Location
Behind you. Look out!
Yeah this like really old.. I havent messed with running a server or any code in years.
 

SarcasticMoy23

New Member
Joined
Aug 25, 2018
Messages
3
Best answers
0
Reaction score
0
Can you help me out with this issue?
Please

Code:
[17:10:21.020] [Error - LuaInterface::loadFile] data/creaturescripts/scripts/RebirthDescription.lua:1: unexpected symbol near ' '
[17:10:21.036] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/RebirthDescription.lua)
[17:10:21.051] data/creaturescripts/scripts/RebirthDescription.lua:1: unexpected symbol near ' '
 

changos

Member
Joined
Feb 13, 2012
Messages
70
Best answers
5
Reaction score
21
Use this bro is shortly
Lua:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
   doPlayerSetSpecialDescription(thing.uid, '\n[Rebirths: '..getPlayerStorageValue(thing.uid, 85987)..']')
--doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ''..getCreatureName(thing.uid)..' | [STATS] Health: '.. getCreatureHealth(thing.uid) ..'/'.. getCreatureMaxHealth(thing.uid) ..' | Mana: '.. getCreatureMana(thing.uid) ..'/'.. getCreatureMaxMana(thing.uid) ..' || VIP: ' .. (getPlayerStorageValue(cid, 23123) == -1 and "NO" or getCreatureStorage(cid, 23123) >= 1 and "YES") .. '')
end
return true
end
 
Top