- Joined
- Aug 6, 2007
- Messages
- 1,767
- Reaction score
- 36
REally good thx ;**
some rep would be nicer!
REally good thx ;**
To short, to nice, to cool! thx!
nice one thx alot.
thnx bro... nice job
Good work.
Lua Script Error: [Npc interface]
data/npc/scripts/banker.luanCreatureSay
luaGetPlayerStorageValue(). Player not found
can help me?
i'm using tfs 0.2.6 e don't work this
Dont know if this is a big deal or if it came up but you spelled much wrong in there "much" not "mutch"
Hello mokerhamer
can you fix this bug
luaGetPlayerStorageValue(). Player not found
Plz :'(
----------------------------------------------------------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())