#1 2008-02-27 15:41:13

reeay

http://i37.tinypic.com/sb1sbd.jpg

Skąd: Warszawa
Zarejestrowany: 2007-12-04
Posty: 172
WWW

(Problem/Pytanie - NPC

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 !


http://zanimnapiszesz.ovh.org/img/zanimnapiszesz6.gif

Offline

 

#2 2008-02-29 21:42:41

Mefrac

http://i38.tinypic.com/avakh.gif

Zarejestrowany: 2008-02-29
Posty: 72

Re: (Problem/Pytanie - NPC

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


Pomogłem daj Mi +

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi

[ Generated in 0.016 seconds, 8 queries executed ]


Darmowe Forum | Ciekawe Fora | Darmowe Fora
Pampang usługi sądowe audio wideo