
Nie tylko o Tibii i OTS...
Jak moge zmienić to że npc tylko przepuszcza playerów z PACCIEM (npc od travel) - NA SQL !
Oto skrypt na niego tylko chce zeby bylo dla pacc, bo takto plywaja facci .
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, 'premy island') then
if pay(cid,50) then
selfSay('Let\'s go!')
travel(cid, 436, 624, 6)
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'goroma') then
if pay(cid,50) then
selfSay('Let\'s go!')
travel(cid, 618, 639, 6)
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'city') then
if pay(cid,50) then
selfSay('Let\'s go!')
travel(cid, 520, 533, 6)
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'tiquanda') then
if pay(cid,50) then
selfSay('Let\'s go!')
travel(cid, 559, 461, 6)
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'libera bay') then
if pay(cid,50) then
selfSay('Let\'s go!')
travel(cid, 566, 696, 6)
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())
Ktoś wie jak zmienic pisac na gg !
Offline

ściagnij se Silnik Yourka z mapą Yourots i tam jest dobry Kapitan ;]
Offline