Ir para conteúdo
  • Cadastre-se

Player free ta conseguindo ir pra Edron :(


Posts Recomendados

Como arrumo isso? ate quem é free account ta conseguindo ir pra edron
tfs 0.3.0
script do barco de carlin

---Edron----------------------------------------------------------------------------------------------------------------------------------------- 
local EdronText = 'Do you want to Travel to Edron for 110 gold coins?' 
local EdronTextNo = 'Ok, come back when you want then!' 
local NoTravel = 'Sorry, i do not travel to this city..' 
local EdronLvl = 8 
local EdronPremium = true --True/false 

--Edron-- 
if Edron == true then 
local travelNode = keywordHandler:addKeyword({'edron'},  
StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = EdronText }) 
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = EdronPremium, level = EdronLvl, cost = EdronCost, destination = EdronPosition }) 
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = EdronTextNo }) 
else 
local travelNode = keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) 
end 
Link para o post
Compartilhar em outros sites
local pos = {x=1, y=2, z=3}
local Topic = {}
if isPremium(cid) then
    if getPlayerLevel(cid) > 7 then
        if msgcontains(msg, 'edron') then
            selfSay('Do you want to Travel to Edron for 110 gold coins?', cid)
            Topic[cid] = 1
        elseif Topic[cid] == 1 and msgcontains(msg, 'yes') then
                if not isPlayerPzLocked(cid) then
                    if doPlayerRemoveMoney(cid, 110) then
                        selfSay('Set the sails!', cid)
                        doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
                        doTeleportThing(cid, pos)
                        doSendMagicEffect(pos, CONST_ME_TELEPORT)
                        Topic[cid] = 0
                    else
                        selfSay('You need pay the travel.', cid)
                        Topic[cid] = 0
                    end
                else
                    selfSay('First get rid of those blood stains! You are not going to ruin my vehicle!', cid)
                    Topic[cid] = 0
                end
        elseif Topic[cid] == 1 and msgcontains(msg, 'no') then
            selfSay('Ok, come back when you want then!', cid)
            Topic[cid] = 0
        end
    else
        selfSay('You need to be level 8 up to travel in this boat.', cid)
        Topic[cid] = 0
    end
else
    selfSay('You need be premium account to travel with me.', cid)
    Topic[cid] = 0
end
Editado por vankk
Msg se nao tiver money. (veja o histórico de edições)

discord.pngDiscord: vankk #7765

Precisando de ajuda? Entre em contato comigo via Discord.

 

Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.

Link para o post
Compartilhar em outros sites
local pos = {x=1, y=2, z=3}
local Topic = {}
if isPremium(cid) then
    if getPlayerLevel(cid) > 7 then
        if msgcontains(msg, 'edron') then
            selfSay('Do you want to Travel to Edron for 110 gold coins?', cid)
            Topic[cid] = 1
        elseif Topic[cid] == 1 and msgcontains(msg, 'yes') then
                if not isPlayerPzLocked(cid) then
                    if doPlayerRemoveMoney(cid, 110) then
                        selfSay('Set the sails!', cid)
                        doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
                        doTeleportThing(cid, pos)
                        doSendMagicEffect(pos, CONST_ME_TELEPORT)
                        Topic[cid] = 0
                    else
                        selfSay('You need pay the travel.', cid)
                        Topic[cid] = 0
                    end
                else
                    selfSay('First get rid of those blood stains! You are not going to ruin my vehicle!', cid)
                    Topic[cid] = 0
                end
        elseif Topic[cid] == 1 and msgcontains(msg, 'no') then
            selfSay('Ok, come back when you want then!', cid)
            Topic[cid] = 0
        end
    else
        selfSay('You need to be level 8 up to travel in this boat.', cid)
        Topic[cid] = 0
    end
else
    selfSay('You need be premium account to travel with me.', cid)
    Topic[cid] = 0
end

crash tfs 0.3.0

Link para o post
Compartilhar em outros sites
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 pos = {x=1, y=2, z=3}
	local ppos = getCreaturePosition(cid)
	
	if isPremium(cid) then
		if getPlayerLevel(cid) > 7 then
			if msgcontains(msg, 'edron') then
				selfSay('Do you want to Travel to Edron for 110 gold coins?', cid)
				talkState[talkUser] = 1
			elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
				if not isPlayerPzLocked(cid) then
					if (doPlayerRemoveMoney(cid, 110)) then
						selfSay('Set the sails!', cid)
                        doSendMagicEffect(ppos, CONST_ME_TELEPORT)
                        doTeleportThing(cid, pos)
                        doSendMagicEffect(ppos, CONST_ME_TELEPORT)
						talkState[talkUser] = 0
					else
						selfSay('Sorry, you don\'t have enough gold.', cid)
					end
				else
                    selfSay('First get rid of those blood stains! You are not going to ruin my vehicle!', cid)
                    talkState[talkUser] = 0
                end
			elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then
				talkState[talkUser] = 0
				selfSay('Ok then.', cid)
			end
		else
			selfSay('You need to be level 8 up to travel in this boat.', cid)
			talkState[talkUser] = 0
		end
	else
		selfSay('You need be premium account to travel with me.', cid)
		talkState[talkUser] = 0
	end

	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Editado por vankk (veja o histórico de edições)

discord.pngDiscord: vankk #7765

Precisando de ajuda? Entre em contato comigo via Discord.

 

Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.

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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo