krysteek
Advanced User
- Joined
- Sep 6, 2008
- Messages
- 273
- Reaction score
- 15
Oco chodzi je?li wyskakuje mi co? takiego?
Prosz? o mniej wiecej wyt?umaczenie o jaki b??d chodzi.
Oto skrypt
Prosz? o mniej wiecej wyt?umaczenie o jaki b??d chodzi.
Oto skrypt
Code:
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
function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
return false
end
if msgcontains(msg, 'xd') then
if pay(cid,50) then
doTeleportThing(cid, 400, 481, 6)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'xd') then
if pay(cid,50) then
doTeleportThing(cid, 400, 481, 6)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'xd') then
if pay(cid,50) then
doTeleportThing(cid, 400, 481, 6)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'xd') then
if pay(cid,50) then
doTeleportThing(cid, 400, 481, 6)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'xd') then
if pay(cid,50) then
doTeleportThing(cid, 400, 481, 6)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'xd') then
if pay(cid,50) then
doTeleportThing(cid, 400, 481, 6)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 34) then
selfSay('Ok than.')
talk_state = 0
end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())