• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC [Release] Forgotten server Banker!

Nice ^^
Could you make a function for npcs so you dont need to bring cash with you, but you can pay with your bank account?
edit
nvm I can just change the value :O
 
Last edited:
Lua Script Error: [Npc interface]
data/npc/scripts/banker.lua:eek:nCreatureSay

luaGetPlayerStorageValue(). Player not found

can help me?
 
Lua Script Error: [Npc interface]
data/npc/scripts/banker.lua:eek:nCreatureSay

luaGetPlayerStorageValue(). Player not found

can help me?

are u sure you are using TFS latest version it works here fine..
 
Dont know if this is a big deal or if it came up but you spelled much wrong in there "much" not "mutch" :)

oh ty :p mutch is in an other type of english :p, anywais fixing some erros but i just got like 5 min to fix them since i'm "illigal" behoint the comp the are thinkin i'm learning for/ doing online exams
 
Hello mokerhamer

can you fix this bug
luaGetPlayerStorageValue(). Player not found

Plz :'(


as i promised you i will fix it just give me some time. the banker works 100% only it gives that error meanwhile just ignore it since it works good
 
Last edited:
The error was around line 80, this should fix it:
Code:
----------------------------------------------------------Made By MokerHamer----------------------------------------------
--------------------Special Thanks to: Talaturen and Jiddo  without them i coulden't have done this!------------------
------------------------------------------NOTE* THIS SCRIPT MAY ONLY BE RELEASED ON WWW.OTLAND.NET ONLY---------------------
------------------------------------This Script is specialde made for World Of Tramon V8.0-----------------------------
-----------------------------------------------------World Of Tramon Link: None Yet--------------------------------------
--------------------------------------------------------------------------------------------------------------------------------
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) 	npcHandler:onCreatureSay(cid, type, msg) end
function onThink() 						npcHandler:onThink() end
-- OTServ event handling functions end


---------Begin-Dont--Tough!--Noob--censative
function creatureSayCallback(cid, type, msg)
	if(npcHandler.focus ~= cid) then
		return false
	end
	
	local count = (getCount(msg))		
	local oldcount = getPlayerStorageValue(cid, 300)
    if(oldcount == -1) then
     oldcount = 0
	 setPlayerStorageValue(cid, 300, 0)
      end
---------End-Dont--Tough!--Noob--censative



---------------Begin  Crap that u can change it if u want-----------------------	
		bank_need_premium = 'Sorry, You need premium account to use the bank.'
		low_money_deposit = 'You do not have enough money in your deposit to withdraw, '..count..' Gold Pieces. '
		lost_track = 'Huh, What are you talking about?'
			
        if msgcontains(msg, 'banker') then
			selfSay('Hello. How can I help you? If you need some help just say information')
		elseif msgcontains(msg, 'information') then
			selfSay('Hello i am the city banker, you can do many things here like, Check your balance deposit and even withdraw!')
---------------End  Crap that u can change it if u want

-------------------------------------------------------------Begin of the Banker script---------------------------------------

------------------------Begin!--deposit--Crap----
            elseif msgcontains(msg, 'deposit') then
			if getPlayerPremiumDays(cid) > 0 then
			selfSay('How mutch would u like to deposit?')
					talk_state = 1
			else
				selfSay(bank_need_premium)
				talk_state = 0
			end
---deposit--Confurm--Yes
elseif isNumber(getCount(msg)) and talk_state == 1 then
talk_state = 0
if doPlayerRemoveMoney(cid, count) == TRUE then
setPlayerStorageValue(cid,300, oldcount+count)
selfSay('You have successfully deposit '..count..' Gold Pieces')
else
selfSay(lost_track)
end
------------------------End!--deposit--Crap----

------------------------Begin!--Balance--Crap----
            elseif msgcontains(msg, 'balance') then
			if getPlayerPremiumDays(cid) > 0 then
			selfSay('do u want to check your balance?')
					talk_state = 2
			else
				selfSay(bank_need_premium)
				talk_state = 0
			end
---Balance--Confurm--Yes
	elseif msgcontains(msg, 'yes') and talk_state == 2 then
		selfSay('You have '..oldcount..' Gold Pieces deposit.')

------------------------End!--Balance--Crap----

------------------------Begin!--withdraw--Crap----
            elseif msgcontains(msg, 'withdraw') then
			if getPlayerPremiumDays(cid) > 0 then
			selfSay('How mutch would u like to withdraw?')
					talk_state = 3
			else
				selfSay(bank_need_premium)
				talk_state = 0
			end
---withdraw--Confurm--Yes
elseif isNumber(getCount(msg)) and talk_state == 3 then
talk_state = 0
if count <= oldcount then
setPlayerStorageValue(cid,300, oldcount-count)
doPlayerAddMoney(cid, count)
selfSay('You have successfully withdrawed '..count..' Gold Pieces.')
else
selfSay(low_money_deposit)
end
------------------------End!--withdraw--Crap----

---No--To--All
		elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 3) then
			selfSay('Why the fuck dit you start this conversation anywais?')
			talk_state = 0
			end

	    return true
           end
	
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Back
Top