Ir para conteúdo
  • Cadastre-se

Posts Recomendados

tinha postado a imagem errada agora editei vo mandar aki o script do mount

 

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
local msg = string.lower(msg)
if isInArray({'rent', 'mount', 'horse'}, msg) then
npcHandler:say("You can rent a {rented horse}!", cid)
talkState[talkUser] = 1
elseif talkState[talkUser] == 1 then
if rent_mounts[msg] then
if rent_mounts[msg].premium == true and not isPremium(cid) then
npcHandler:say('You need to be premium to rent this mount.', cid) return true
elseif getPlayerLevel(cid) < rent_mounts[msg].level then
npcHandler:say('You need level ' .. rent_mounts[msg].level .. ' or more to rent this mount.', cid) return true
elseif getPlayerStorageValue(cid, rent_mounts[msg].storage) >= os.time() then
npcHandler:say('you already have rented this mount!', cid) return true
end
name,price,stor,days,mountid = msg,rent_mounts[msg].price,rent_mounts[msg].storage,rent_mounts[msg].days,rent_mounts[msg].mountid
npcHandler:say('You want to rent the mount '..name..' for '..days..' day'..(days > 1 and 's' or '')..' the price '..price..' gps? {yes}', cid)
talkState[talkUser] = 2
else
npcHandler:say('Sorry, I do not sell this mount.', cid)
end
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 2) then
if doPlayerRemoveMoney(cid, price) then
doPlayerAddMount(cid, mountid)
setPlayerStorageValue(cid, stor, os.time()+days*86400)
npcHandler:say('Here is your mount '..name..', it will last until '..os.date("%d %B %Y %X", getPlayerStorageValue(cid,stor))..'.', cid)
else
npcHandler:say('you do not have enough money to rent the mount!', cid)
talkState[talkUser] = 0 
end
elseif msg == "no" then 
selfSay("Then not", cid) 
talkState[talkUser] = 0 
npcHandler:releaseFocus(cid) 
end
 
local travelNode = keywordHandler:addKeyword({'palomino'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a passage to Palomino for 125 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 125, destination = {x=32449, y=32226, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
return TRUE
end
 
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Poste para nós o arquivo offlinetraining.lua e informe qual versão do TFS você está usando...

tfs 1.0


uppppppp

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por ILex WilL
      Olá, Alguém poderia me ajudar com uns Scripts? nem que seja cobrando, dependendo eu pago para me ajudar...
    • Por zLockey9
      Estou com alguns erros em umas SPR que adicionei recentemente , como o titulo já diz ...
      elas estão saindo do lado do char em vez de em cima. (Obs:Não é spell e sim só o effect do comando /z)
       
      Se alguém puder ajudar dou REP+
       
      ALGUMAS PRINT'S
       
       
    • Por llucas75
      Oi tudo bem pessoal?
       
      Meu problema é o seguinte eu tenho um otserver 8.60, mas quero rodá-lo em linux ai precisando compilar... Compilei um Rev3777(0.4), mas quando ligo o servidor aparecem uma imensidão de erros no console, além de mau funcionamento do server...
      Tentei pegar as libs da pasta data do rev3777 e colocalos no lugar das libs do meu server... Mas dai o server nem abre...
       
       
      Queria muito executar esse server em linux, por causa da proteção adicional que ele oferece, alguem sabe como eu faço para ele rodar de maneira adequada com o meu executavel da rev3777?
    • Por lucasmacaca
      e o seguinte meu server ta em mysql mais pra testa as coisas prefiro usar ele em sqlite mais fica aparecendo esses erro ...
        
    • Por Mr. Crimson Prince
      -bash: ./autogen.sh: No such file or directory    
      root@testeserver:~# ./configure --enable-mysql -bash: ./configure: No such file or directory
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo