Ir para conteúdo

Featured Replies

  • 1 month later...
  • Respostas 7
  • Visualizações 2.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Use aquele sistema que eu te passei por msn, fiz um npc simplezinho aqui pra você. Timral.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Timral" script="travel.lua" walki

  • Se você pretende criar OT Sério para que só os VIP's possam ir para tal cidade aqui segue algumas dicas Melhor sistema vip que existe é o de Premium Account do OTServ 1° - Remova a talkaction !

Postado

Se você pretende criar OT Sério para que só os VIP's possam ir para tal cidade aqui segue algumas dicas

Melhor sistema vip que existe é o de Premium Account do OTServ

1° - Remova a talkaction !buypremium do seu ot se ela tiver(pode esta na pasta mod se seu ot possuir)

2° - Libere as magias para os free account usarem, para isto vá até data/spells/spells.xml e procure as tags "premium"(ou algo parecido) e coloque todas elas para "0"

3° - Ultilize o npc tiral que vem com o server quando você baixa se não me engano

4° - Se você entende um pouqinho de lua você pode ultilizar a função isPremium(cid)

Eu ultilizo o servido da OpenTibia SVN

vou te mostrar um script ultilizando o premium da lib de npc sem usar isPremium(cid)


-- This is an example NPC script that can be used on Jiddo's NPC system

-- Coordinates are not real, same for the name of cities or other server-based things here


local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)




-- OTServ event handling functions start

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

-- OTServ event handling functions end


local travelNode = {}


-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!

travelNode = keywordHandler:addKeyword({'derelin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to Derelin for 119 gold coins?'})

	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 119, destination = {x=1367, y=403, z=7} })

	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'})


travelNode = keywordHandler:addKeyword({'drunia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to Drunia for 123 gold coins?'})

	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 123, destination = {x=967, y=247, z=7} })

	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})


keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to Derelin or Drunia for just a small fee.'})


-- Makes sure the npc reacts when you say hi, bye etc.

npcHandler:addModule(FocusModule:new())

Espero que te ajude, qualquer coisa clica ali no joinha xD

Dá um rep++ ali>>>>

Flw

  • 3 years later...

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520k

Informação Importante

Confirmação de Termo