• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Need help!

Shan Trus

New Member
Joined
May 7, 2009
Messages
67
Reaction score
0
Location
Poland
Hello, I need help for script. What I am supposed to write down into places XXXX?


Code:
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, "I have talons")) then
		if (getPlayerItemCount(cid, 2151) >= 100) then
			doPlayerRemoveItem(cid, 2151, 100)
			setPlayerStorageValue(cid, [SIZE="4"][COLOR="#9932cc"]xxxx[/COLOR][/SIZE], 1)
		else
			selfSay("You don\'t have any talons.", cid)
		end
	elseif (msgcontains(msg, "I want to travel")) then
		if (getPlayerStorageValue(cid, [COLOR="#9932cc"][SIZE="4"]xxxx[/SIZE][/COLOR]) == -1) then
			selfSay("You didn\'t bring me any talons.", cid)
		else
			doTeleportThing(cid {x = 418, y = 882, z = 1})
			selfSay("Go away!", cid)
		end
	end

	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Back
Top