• 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 Banker NPC (transfer!, deposit, withdraw, balance)

It wouldn't be this hard to make one for TFS 0.3, since it's already got all the bankTransfer, deposit and withdrawal functions included.
 
I'll see what I can do. But it won't be today since I haven't got the time today, we'll see about tomorrow. If nobody else preceeds me, that is.
 
Code:
	elseif msgcontains(msg, 'balance') then
		n = getPlayerBalance(cid)
		if n < 100000 then
			selfSay('Your account balance is {'..n..'} gold.', cid)
			talkState[talkUser] = 0
		elseif (n >= 100000 and n < 1000000) then 
			selfSay('You certainly have made a pretty penny. Your account balance is {'..n..'} gold.', cid)
			talkState[talkUser] = 0
		elseif (n >= 1000000 and n < 10000000) then 
			selfSay('Wow, you\'ve reached the magic number of one million gold! Your account balance is {'..n..'} gold.', cid)
			talkState[talkUser] = 0
		elseif n >= 10000000 then 
			selfSay('I think you must be one of the richest inhabitants of Empire! Your account balance is {'..n..'} gold.', cid)
			talkState[talkUser] = 0
		end

To make it looks like RL Tibia :D
 
Polish:
Jak zrobić, aby Bankier odpisywał na kanał NPCs, a nie na Default?

@EDIT:
Już sobie poradziłem, wystarczyło zamienić wszystkie selfSay('*') na selfSay('*', cid)
 
[02/02/2009 15:06:23] data/npc/scripts/gesiorbank.lua:43: in function <data/npc/scripts/gesiorbank.lua:36>
 
Many congratulations for you, and REP++ fou you too, this NPC work fine on 0.2 versions, and i'm search for a long time for this...
 
Lol
A player on my ot said "hi deposit 99999999999999 yes withdraw 10000" and 0wn3d, he had a lot of money, bug plz?
 
[24/02/2009 14:46:07] luaDoCreateNpc(). Npc name(banker) not found
[24/02/2009 14:47:38] Reloaded npcs.
[24/02/2009 14:47:43] [Notice - Npc::Npc] NPC Name: Banker - autowalk has been deprecated, use walkinterval.
[24/02/2009 14:47:43] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/bankerr.lua
[24/02/2009 14:47:43] data/npc/scripts/bankerr.lua:434: unexpected symbol near ')'
 
Back
Top