Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

NPC NIE ODPOWIADA


bartessssssssss

Rekomendowane odpowiedzi

Opublikowano
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
 
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

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end
	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
 
	if(msgcontains(msg, "inquisitor")) then
		npcHandler:say("The churches of the gods entrusted me with the enormous and responsible 

task to lead the inquisition. I leave the field work to inquisitors who I recruit from fitting people that 

cross my way.", cid)
	elseif(msgcontains(msg, "join")) then
		if(getPlayerStorageValue(cid, 200) < 1) then
			npcHandler:say("Do you want to join the inquisition?", cid)
			talkState[talkUser] = 2
		end
	elseif(msgcontains(msg, "mission") or msgcontains(msg, "report")) then
		if(getPlayerStorageValue(cid, 200) == 1) then
			npcHandler:say("Let's see if you are worthy. Take an inquisitor's field guide from 

the box in the back room. ...","Follow the instructions in the guide to talk to the Thaian guards that 

protect the walls and gates of the city and test their loyalty. Then report to me about your mission.", 

cid,0, 1, 3000)
			talkState[talkUser] = 0
			setPlayerStorageValue(cid, 200, 2)
 

Witam, moze mi ktos powiedziec gdzie tu jest blad? Zamieszcze kawalek skryptu. Po napisaniu inquisitor, join pieknie odpisuje npc, ale gdy napisze mission wyswietla mi sie po prostu "Henricus: " Misje dostaje normalne, storage value nadaje ale problem w tym ze npc nic nie pisze.

Kocham mpcforum.pl!!!

18706.png

Opublikowano
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
 
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

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end
	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
 
	if(msgcontains(msg, "inquisitor")) then
		npcHandler:say("The churches of the gods entrusted me with the enormous and responsible 

task to lead the inquisition. I leave the field work to inquisitors who I recruit from fitting people that 

cross my way.", cid)
	elseif(msgcontains(msg, "join")) then
		if(getPlayerStorageValue(cid, 200) < 1) then
			npcHandler:say("Do you want to join the inquisition?", cid)
			talkState[talkUser] = 2
		end
	elseif(msgcontains(msg, "mission") or msgcontains(msg, "report")) then
		if(getPlayerStorageValue(cid, 200) == 1) then
			npcHandler:say("Let's see if you are worthy. Take an inquisitor's field guide from the box in the back room. ...Follow the instructions in the guide to talk to the Thaian guards that protect the walls and gates of the city and test their loyalty. Then report to me about your mission.", cid)
			talkState[talkUser] = 0
			setPlayerStorageValue(cid, 200, 2)

Powinno teraz dziłać

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...