GE

[npc]quero Um Npc Que So Player Vips Poderao Viajar Com Ele.

Por geovanejr, 24 de out. de 2009 em Archived

5
1.1k
geovanejrG
24 de outubro de 2009 às 17:32

Quero um npc que so player vips poderao viajar com ele.

VildenV
24 de outubro de 2009 às 18:47

Sua vip é de que tipo?? estilo premium (global)??

geovanejrG
24 de outubro de 2009 às 23:11
Sua vip é de que tipo?? estilo premium (global)??

 

tpw... o npc vai leva so players vip pra cidade vip. e a vip e paga tpw... Premium do Dragon Souls por Vsp=Vip Souls Point.

ID: 6527

 

kkk111K
25 de outubro de 2009 às 00:17

Eu acho que ele não quiz perguntar como que se paga, ou com que se paga, e sim como é o sistema vip.

Vip é "Premium" ou Vip é um char com "Storage", ou sei la...???

 

 

Se for STORAGE:

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

-- Config
	PosCityVip = {x=100, y=100, z=7} -- pos da cidade vip
	vip = getPlayerStorageValue(cid, 9999) -- storage vip
	msgErro = 'Você não tem {Vip}.' -- mensage de erro
              CityVip = 'yalahar' -- nome da cidade vip
-- Config

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, CityVip)) then
	if vip >= 1 then
		doTeleportThing(cid,PosCityVip) 
		doSendMagicEffect(getCreaturePosition(cid),10)
	else
		npcHandler:say(msgErro, cid)
		npcHandler:resetNpc()
		return true
	end
end
return true
end

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

 

Se for por PREMIUM:

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

-- Config
	PosCityVip = {x=100, y=100, z=7} -- pos da cidade vip
	vip = getPlayerPremiumDays(cid) -- dias premium - vip
	msgErro = 'Você não tem {Vip}.' -- mensage de erro
               CityVip = 'yalahar' -- nome da cidade vip
-- Config

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, CityVip)) then
	if vip >= 1 then
		doTeleportThing(cid,PosCityVip) 
		doSendMagicEffect(getCreaturePosition(cid),10)
	else
		npcHandler:say(msgErro, cid)
		npcHandler:resetNpc()
		return true
	end
end
return true
end

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

 

Só edita oque está entre -- Config...

Editado Outubro 25 por kkk11111

geovanejrG
25 de outubro de 2009 às 02:23

kkk11111

 

tpw... eu kero um npc ki eli vai cobra uma tal taxa pra poder levar o player vip para a cidade vip.