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

NPC travel player if storage == 1

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
Player: Hi
NPC: hello
Player: carlin
NPC check, if storage 9999 == 1 then
selfsay "ah, do you want to go to carlin?"
talkstate = 1
if msgcontains "yes" and talkstate = 1 then
dosendplayer carlin
elseif storage 9999 == -1 "sorry, you need storage 9999"

lol, just scripting +- what I want the npc to do =o

PS: no, this was not suppose to work, it's only to show what I'm trying to do :]
 
read /data/npc/lib/npcsystem/modules.lua
Code:
                local [COLOR=red]storage[/COLOR], pzLocked = parameters.[COLOR=red]storageValue[/COLOR] or (EMPTY_STORAGE + 1), parameters.allowLocked or false
                if(parameters.premium and not isPlayerPremiumCallback(cid)) then
                        npcHandler:say('I can only allow premium players to travel with me.', cid)
                elseif(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then
                        npcHandler:say('You must reach level ' .. parameters.level .. ' before I can let you go there.', cid)
                [COLOR=red]elseif(parameters.storageId ~= nil and getPlayerStorageValue(cid, parameters.storageId) < storage) then
                        npcHandler:say(parameters.storageInfo or 'You may not travel there!', cid)[/COLOR]
XML:
{npcHandler = npcHandler, storageId = 12345, storageValue = 1}
:p :p
 
Back
Top