- Joined
- Aug 6, 2007
- Messages
- 1,767
- Reaction score
- 36
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())
Lol i was just about to fix it when i saw your fix i remembered i had this in the top script
Code:
local oldcount = getPlayerStorageValue(cid,300)
if(oldcount == -1) then
oldcount = 0
end
so the same thing in balance would only bug it