Ir para conteúdo

Duvida Sanada


doodles

Posts Recomendados

meu script ta assim.

local cost = 1000 -- custo do serviço

function broadcastIt(cid, message, keywords, parameters, node)
  if (doPlayerRemoveMoney(cid,cost) == TRUE) then broadcastMessage(''.. getCreatureName(cid) ..' says: '.. message ..'')
else selfSay('I\'m sorry, but you don\'t have the money.')
  end
end
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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
npcHandler:setMessage(1,'Hi, |PLAYERNAME|. I can {broadcast} any message for '..cost..'gps')
node = keywordHandler:addKeyword({'broadcast'},StdModule.say,{npcHandler=npcHandler,onlyFocus=true,text='What do you want to broadcast?'})
node:addChildKeyword({},broadcastIt,{npcHandler=npcHandler})
npcHandler:addModule(FocusModule:new())

 

preciso q qdo ele "broadcastar" a msg ja mande o player para x=684 y=606 z=7

 

tipo

o npc broadcasto a msg e ja teleporta ele..

plz ajuda ae galera o/

Editado por doodles
Link para o comentário
Compartilhar em outros sites

local cost = 1000 -- custo do serviço
local newpos = {x=684, y=606,z=7}

function broadcastIt(cid, message, keywords, parameters, node)
  if (doPlayerRemoveMoney(cid,cost) == TRUE) then 
broadcastMessage(''.. getCreatureName(cid) ..' says: '.. message ..'')
doTeleportThing(cid,newpos)
else 
selfSay('I\'m sorry, but you don\'t have the money.')
  end
end
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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
npcHandler:setMessage(1,'Hi, |PLAYERNAME|. I can {broadcast} any message for '..cost..'gps')
node = keywordHandler:addKeyword({'broadcast'},StdModule.say,{npcHandler=npcHandler,onlyFocus=true,text='What do you want to broadcast?'})
node:addChildKeyword({},broadcastIt,{npcHandler=npcHandler})
npcHandler:addModule(FocusModule:new())

 

 

 

 

Se sanou sua duvida reporte o topico como Dúvida Sanada

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...