TIPO QUERIA UM NPC QUE LEVACE PRAS CIDADES E TIPO TEM A CIDADE FLGORI DAI QUERIA QUE SO PLAYERS VIP CONSEGUICE IR PARA ELA. POR FAVOR AJUDEM.
AGRADEÇO DES DE JA, REP+ A QUEM AJUDAR.
TIPO QUERIA UM NPC QUE LEVACE PRAS CIDADES E TIPO TEM A CIDADE FLGORI DAI QUERIA QUE SO PLAYERS VIP CONSEGUICE IR PARA ELA. POR FAVOR AJUDEM.
AGRADEÇO DES DE JA, REP+ A QUEM AJUDAR.
Sinceramente,
Não entendi sua pergunta, especifique melhor...
Me mande a mensagem no meu perfil, aguardando...
--------------------------------------------------------------------------------------------------------------------------
Sugestão,
Em (Data/Npc/timral.xml) coloque:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Timral" script="travel.lua" walkinterval="0" floorchange="0"> <health now="150" max="150"/> <look type="129" head="114" body="119" legs="114" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. If you don't know where to flow, say {travel}."/> </parameters> </npc>
Em (Data/Npc/travel.lua) coloque:
local price = 50 local config = { pos1 = {x=976,y=924,z=7}, pos2 = {x=980,y=924,z=7}, } 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, 'travel')) then if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then selfSay('Você não é VIP para viajar',cid) return TRUE end talkState[talkUser] = 1 selfSay('Você deseja ir pra qual cidade? {city1},{city2}',cid) elseif (msgcontains(msg, 'city1')) and talkState[talkUser] == 1 then if doPlayerRemoveMoney(cid, price)==true then doTeleportThing(cid, config.pos1) else return selfSay('Você não tem money para viajar',cid) end elseif (msgcontains(msg, 'city2')) and talkState[talkUser] == 1 then if doPlayerRemoveMoney(cid, price)==true then doTeleportThing(cid, config.pos2) else return selfSay('Você não tem money para viajar',cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-----------------------------------------------------------------------------------------------------------
Obs: Você deve mudar as configurações como (price, pos1, pos2 e as mensagem do NPC)
Os creditos não são meus é sim de um usuário de outro fórum...
TonyHanks, sua intenção foi boa mais tem alguns detalhes a mais do que só mudar as falas e os preços,
YuriNoMercy, pfv poste seu vip system para poder fazer um npc baseado nas informações dele, p
Olá, meu vip system o o vip system by mock que seria esse http://www.xtibia.com/forum/topic/151189-vip-system-by-mock-100/
se quiser fazer pra mim pode fazer por esse link porque o meu esta completamente igual.
Obrigado, não esqueçam que dou REP+ a quem conseguir me ajudar.