• 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!

Script CRAAZY

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
The title says it all!

you go to the npc ... it takes you to the city, there is talking about talking you will have 10 minutes to find all statues.
after 10 minutes, it goes to the temple


rep+ :wub:
 
vqjrfd.jpg
 
quer que eu fale português?
OK!
Eu quero um script que o player vai ao npc o player fala:
"Hi"
"Addon"
"Yes" e ele leva para uma cidade que ele,tem que achar algumas statuas de ADDON's.Depois de 10 minutos ele vai para posição: 1000. 1000. 7

I spoke my language, know? :D
 
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local position = {x = 100, y = 100, z = 7}
local kickPos = {x = 100, y = 100, z = 7}

local Topic = {}

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 greetCallback(cid)
	Topic[cid] = 0
	return true
end

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	elseif msgcontains(msg, 'addon') then
		selfSay('Do you want to go to town?', cid)
		Topic[cid] = 1
	elseif Topic[cid] == 1 and msgcontains(msg, 'yes') then
		npcHandler:releaseFocus(cid)
		Topic[cid] = nil
		doTeleportThing(cid, position)
		doSendMagicEffect(position, CONST_ME_TELEPORT)
		addEvent(doTeleportThing, 10 * 60 * 1000, cid, kickPos)
	end
end

npcHandler:setMessage(MESSAGE_GREET, "Can I take you to the city to make {addons}? You have 10 minutes to find the statues, then you will be teleported back to the temple.")
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
OMG! i don't know Portuguese, but i think you made more sense in your language then in English, let me get this straight, you want a script that the player talks to an 'Addon' NPC and then he sends you to a 'special' place where you will have to place 10 statues? in their place?, then if 10 minutes expire the player gets teleported to that 'particular' location that you wrote?, am I wrong? anyways dude you need to calm down when you write English and think before writing, anyways if what i said is exacly what you wanted then anyone except me can make this(I suck at making NPC).
 
Back
Top