Ir para conteúdo
  • Cadastre-se

Posts Recomendados

claro que não, eu só posto até onde eu consegui chegar aqui.. se vc quiser fazer qualquer coisa com esse script vc é livre!! 

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites
  • Respostas 233
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Fala galera, hoje vim trazer o projeto pronto do Magnus Challenger pra vocês instalarem no servidor de vocês!    Pra quem não conhece é um sistema de Tasks baseado no Zezenia onde você pode escolher

vc precisa achar a função que removeItem no 1.0, parece que tiraram ela em 1.0 e substituiram por outra.. o mesmo vale pra onCreatureSay 

@gmstrikker, O tamanho da task fica nesse storage: getPlayerStorageValue(cid, storages.length) e varia de 2 até 4 (pequena - media e grande) @maikons, embaixo de qnt coloca print(qnt) pra verificar q

Posted Images

Valeu, caso ele tenha sucesso em atualizar para 1.2 te aviso :D

Link para o post
Compartilhar em outros sites
  • 2 weeks later...

até dá mas teria que mudar o script pra cada monstro ser um storage diferente, se vc faz 3 dificuldades com 9 monstros cada você perde 27 storages :/ mas vou dar uma olhada certinho pra confirmar se é isso mesmo.

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites

até dá mas teria que mudar o script pra cada monstro ser um storage diferente, se vc faz 3 dificuldades com 9 monstros cada você perde 27 storages :/ mas vou dar uma olhada certinho pra confirmar se é isso mesmo.

 

Ah ai quebra, mas se tive-se isso ia ficar bem mais bonito, podia até tirar a msg onkill pra n floodar no chat, pq o cara olhava nas quests qnd ele quise-se

Link para o post
Compartilhar em outros sites
  • 2 months later...

troca o seu script do npc por esse daqui, acho q removi tudo q era necessário:

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

-- 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

-------------------------------- EXTERN CONFIG --------------------------------
local config = {
	levelcollect = 30, --- level pra poder fazer tasks do tipo collect
	time = 8 * 60 * 60, --- tempo que vc vai ficar sem poder falar com ele caso abandone uma task (em segundos)
	bonus = 1.2, --- bonus de exp/gold caso a task escolhida seja random (1.2 = 20% a mais)
	multiplicator = 1 --- multiplicador de exp/gold/skills (coloque de acordo com a necessidade do seu server)
}

local easy = {
	[1] = "Goblin",
	[2] = "Troll",
	[3] = "Rotworm",
	[4] = "Dwarf",
	[5] = "Amazon",
	[6] = "Elf",
	[7] = "Wolf",
	[8] = "Orc",
	[9] = "Minotaur"
}


local medium = {
	[1] = "Cyclops",
	[2] = "Ghoul",
	[3] = "Dragon",
	[4] = "Mammoth",
	[5] = "Vampire",
	[6] = "Fire Devil",
	[7] = "Fire Elemental",
	[8] = "Valkyrie",
	[9] = "Monk"
}


local hard = {
	[1] = "Giant Spider",
	[2] = "Dragon Lord",
	[3] = "Grim Reaper",
	[4] = "Demon",
	[5] = "Crystal Spider",
	[6] = "Demon Skeleton",
	[7] = "Juggernaut",
	[8] = "Destroyer",
	[9] = "Hand of Cursed Fate"
}


local storages = {
	name = 95672,
	count = 95673,
	maxcount = 95674,
	difficult = 95675,
	length = 95676,
	delay = 95677,
	type = 95678,
}
-------------------------------- END OF EXTERN CONFIG --------------------------------
function creatureSayCallback(cid, type, msg)
    if (not npcHandler:isFocused(cid)) then
        return false
    end
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
-------------------------------- INTERN CONFIG CAN BE DONE HERE --------------------------
local short = 0 + (math.random(1,3) * 50) -- quantidade de monstros no curto
local median = 100 + (math.random(1,3) * 50) -- quantidade de monstros no mediano
local long = 200 + (math.random(1,3) * 100) -- quantidade de monstros no longo

local gold = 1000 * ((getPlayerStorageValue(cid, storages.length)) + (getPlayerStorageValue(cid, storages.difficult))) * config.multiplicator
local experience = ((getExperienceForLevel(getPlayerLevel(cid) + 1) - getExperienceForLevel(getPlayerLevel(cid))) / 100) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult))) * config.multiplicator
-------------------------------- END OF INTERN CONFIG --------------------------

local type = getPlayerStorageValue(cid, storages.type)
	if (msgcontains(msg, 'task') or msgcontains(msg, 'challenge')) and (getPlayerStorageValue(cid, storages.delay) - os.time()) <= 0 then
		if getPlayerStorageValue(cid, storages.maxcount) > 3 and getPlayerStorageValue(cid, storages.type) == 1 then
			talkState[talkUser] = 6
			selfSay('Your task is to kill {'..getPlayerStorageValue(cid, storages.maxcount)..' '..getPlayerStorageValue(cid, storages.name)..'s}. Hurry with this or you want to {give up}?!', cid)		
		else
			talkState[talkUser] = 1
			selfSay('You want to {kill} selected monsters for me? You can also let me choose a {random} task for you, garanting a final bonus in your reward.', cid)
		end
	elseif (msgcontains(msg, 'kill') and talkState[talkUser] == 1) then
		talkState[talkUser] = 2
		setPlayerStorageValue(cid, storages.type, 1)
		selfSay('I have all kinds of tasks, you want a {easy}, {medium} or are you up to a {hard} one?', cid)	
	------- difficult ---------
	elseif (msgcontains(msg, 'random') and talkState[talkUser] == 1) then
		talkState[talkUser] = 4
		selfSay('Are you sure about this?', cid)
		setPlayerStorageValue(cid, storages.type, 1)
		setPlayerStorageValue(cid, storages.difficult, math.random(2,4) * config.bonus)
		setPlayerStorageValue(cid, storages.length, math.random(2,4) * config.bonus)
	elseif (msgcontains(msg, 'hard') and talkState[talkUser] == 2) then
		talkState[talkUser] = 3
		selfSay('I have all kinds of tasks, you want a {short}, {median} or are you up to a {long} one?.', cid)
		setPlayerStorageValue(cid, storages.difficult, 4)
	elseif (msgcontains(msg, 'medium') and talkState[talkUser] == 2) then
		talkState[talkUser] = 3
		selfSay('I have all kinds of tasks, you want a {short}, {median} or are you up to a {long} one?.', cid)
		setPlayerStorageValue(cid, storages.difficult, 3)
	elseif (msgcontains(msg, 'easy') and talkState[talkUser] == 2) then
		talkState[talkUser] = 3
		selfSay('I have all kinds of tasks, you want a {short}, {median} or are you up to a {long} one?.', cid)
		setPlayerStorageValue(cid, storages.difficult, 2)
	------- bye ---------
	elseif (msgcontains(msg, 'no')) and isInArray({1, 6, 7}, talkState[talkUser]) then
		talkState[talkUser] = 0
		selfSay('Clearly you are not ready. We can talk later...', cid)
	------- length ---------
	elseif (msgcontains(msg, 'short') and talkState[talkUser] == 3) then
		talkState[talkUser] = 4
		selfSay('Are you sure about this?', cid)
		setPlayerStorageValue(cid, storages.length, 2)
	elseif (msgcontains(msg, 'median') and talkState[talkUser] == 3) then
		talkState[talkUser] = 4
		selfSay('Are you sure about this?', cid)
		setPlayerStorageValue(cid, storages.length, 3)
	elseif (msgcontains(msg, 'long') and talkState[talkUser] == 3) then
		talkState[talkUser] = 4
		selfSay('Are you sure about this?', cid)
		setPlayerStorageValue(cid, storages.length, 4)
	----------- give up option -----------
	elseif (msgcontains(msg, 'give up') and talkState[talkUser] == 6) then
		selfSay('Are you saying that you want to give up this task? I will not give you any other task in the next '.. (config.time/3600) ..' hour(s).', cid)
		talkState[talkUser] = 7
	elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 7) then
		selfSay('Since you will not help me, get out of here.', cid)
		setPlayerStorageValue(cid, storages.maxcount, 0)
		setPlayerStorageValue(cid, storages.delay, os.time() + config.time)
		talkState[talkUser] = 0
	-----------------------
	------- checking ---------
	elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 4) then
		local length = getPlayerStorageValue(cid, storages.length)
		local difficult = getPlayerStorageValue(cid, storages.difficult)
		if type == 1 then
			if length == 2 then
				setPlayerStorageValue(cid, storages.maxcount, short)
			elseif length == 3 then
				setPlayerStorageValue(cid, storages.maxcount, median)
			else
				setPlayerStorageValue(cid, storages.maxcount, long)
			end
			if difficult == 2 then
				setPlayerStorageValue(cid, storages.name, easy[math.random(1, #easy)])
			elseif difficult == 3 then
				setPlayerStorageValue(cid, storages.name, medium[math.random(1, #medium)])
			else
				setPlayerStorageValue(cid, storages.name, hard[math.random(1, #hard)])
			end
			setPlayerStorageValue(cid, storages.count, 0)	
			talkState[talkUser] = 0
			selfSay('OK then.. your task is to kill '..getPlayerStorageValue(cid, storages.maxcount)..' '..getPlayerStorageValue(cid, storages.name)..'s. Do not spare any monster!', cid)
		end
	elseif (msgcontains(msg, 'no') and talkState[talkUser] == 4) then
		talkState[talkUser] = 0
		selfSay('Ok, come back when you have the guts.', cid)
	------- reward ---------
	elseif msgcontains(msg, 'reward') then
		if type == 1 then
			if getPlayerStorageValue(cid, storages.count) >= getPlayerStorageValue(cid, storages.maxcount) and getPlayerStorageValue(cid, storages.maxcount) > 3  then
				selfSay('You finished the quest, now you want to receive your reward in {gold}, {trainning} or in {experience}?', cid)
				talkState[talkUser] = 5
			else
				selfSay('There is no reward for those who did not complete a challenge.', cid)
				talkState[talkUser] = 0
			end
		else
			selfSay('There is no reward for those who did not complete a challenge.', cid)
			talkState[talkUser] = 0
		end
		---------- checking rewards ---------------
	elseif (msgcontains(msg, 'gold') and talkState[talkUser] == 5 ) then
		if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
			for k, v in pairs(storages) do
				setPlayerStorageValue(cid, v, 0)
			end
			doPlayerAddMoney(cid, gold)
			talkState[talkUser] = 0
			selfSay('Thanks for your help, here is your prize..', cid)
		else
			selfSay('Something went wrong..', cid)
		end
	elseif (msgcontains(msg, 'experience') and talkState[talkUser] == 5) then
			if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
				for k, v in pairs(storages) do
					setPlayerStorageValue(cid, v, 0)
				end
				doPlayerAddExperience(cid, experience)
				talkState[talkUser] = 0	
				selfSay('Thanks for your help, here is your prize..', cid)
			else
				selfSay('Something went wrong..', cid)
			end			
	elseif (msgcontains(msg, 'trainning') and talkState[talkUser] == 5) then
		talkState[talkUser] = 8
		selfSay('Which skill you want to train with me? choose between {axe}, {distance}, {club}, {sword} and {shield}', cid)
	----------------------- SKILL REWARD -----------------------	
	elseif (SKILL_IDS[msg] and talkState[talkUser] == 8) then
		if (type == 1) or (doPlayerRemoveItem(cid, getPlayerStorageValue(cid, storages.name), getPlayerStorageValue(cid, storages.maxcount)) and type == 2) then
		-- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
		local qnt = math.ceil(getPlayerRequiredSkillTries(cid, SKILL_IDS[msg], getPlayerSkillLevel(cid, SKILL_IDS[msg]) + 1)/3000) * ((getPlayerStorageValue(cid, storages.length)) * (getPlayerStorageValue(cid, storages.difficult)) * config.multiplicator) 
			for k, v in pairs(storages) do
				setPlayerStorageValue(cid, v, 0)
			end
			doPlayerAddSkillTry(cid, SKILL_IDS[msg], qnt)
			doSendMagicEffect(getCreaturePosition(cid), 39)
			talkState[talkUser] = 0	
			selfSay('Thanks for your help, here is your prize..', cid)
		else
			selfSay('Something went wrong..', cid)
		end		
	----------------------- msg when blocked --------------
	elseif (msgcontains(msg, 'task') or msgcontains(msg, 'challenge')) and (getPlayerStorageValue(cid, storages.delay) - os.time()) > 0 then
		talkState[talkUser] = 0	
		selfSay('I can not trust you since you failed in the last job. You will have to wait until I feel that I can trust you again..', cid)
	end
return true
end

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

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites
  • 2 weeks later...

esses erros são na sua talkaction de criar monstro.. tá dizendo q vc tentou criar uma criatura que não existe (isso pq vc errou o nome do monstro).. o script tá certinho

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites
3 horas atrás, xWhiteWolf disse:

esses erros são na sua talkaction de criar monstro.. tá dizendo q vc tentou criar uma criatura que não existe (isso pq vc errou o nome do monstro).. o script tá certinho

eu sei que seus scripts são certos eu que sou burro kkkkk.

 

 

olha vou fazer um server baseado em você eu vou colocar no meu site seu nome no canto em kkkk decha eu aprender o site tá até on já http://www.tibia24horas.com/

 

 

Citar

local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
accountManager = "Account Manager"                       
managerCounter = 0

   for i, player in ipairs(getOnlinePlayers()) do
      if accountManager:lower() == player:lower() then             
      managerCounter = managerCounter + 1
      end 
   end
 
   if managerCounter >= 3 then
      return false
   end
    local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
    end

    local accountManager = getPlayerAccountManager(cid)
    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str .. " Please choose your outfit."
            doPlayerSendOutfitWindow(cid)
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
    end

    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

    registerCreatureEvent(cid, "Mail")
    registerCreatureEvent(cid, "GuildMotd")

    registerCreatureEvent(cid, "Idle")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
    end

registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "attackguild")    
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "bluelegs")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "Promot")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "PythiusDead")
registerCreatureEvent(cid, "ExpVip")
registerCreatureEvent(cid, "levelplayer")
registerCreatureEvent(cid, "PlayerAdvance")
-----------GRAN CASTLE -----------
registerCreatureEvent(cid, "Gran Tower")
registerCreatureEvent(cid, "Gran Aura")
registerCreatureEvent(cid, "Gran Aura Stats")
registerCreatureEvent(cid, "Gran Aura Logout")
registerCreatureEvent(cid, "Gran Tower Target")
registerCreatureEvent(cid,"tasksystem")
registerCreatureEvent(cid, "dodge")

    if (InitArenaScript ~= 0) then
    InitArenaScript = 1

        for i = 42300, 42309 do
            setGlobalStorageValue(i, 0)
            setGlobalStorageValue(i+100, 0)
        end
    end

    if getPlayerStorageValue(cid, 42309) < 1 then
        for i = 42300, 42309 do
            setPlayerStorageValue(cid, i, 0)
        end
    end

    if getPlayerStorageValue(cid, 42319) < 1 then
        for i = 42310, 42319 do
            setPlayerStorageValue(cid, i, 0)
        end
    end

    if getPlayerStorageValue(cid, 42329) < 1 then
        for i = 42320, 42329 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42355) == -1 then
       setPlayerStorageValue(cid, 42355, 0)
    end   
       setPlayerStorageValue(cid, 42350, 0)
       setPlayerStorageValue(cid, 42352, 0)
    
    
     -------------- TASK SYSTEM --------------
    if getPlayerStorageValue(cid, 95673) < 0 then
       setPlayerStorageValue(cid, 95673, 0) 
    end
    if getPlayerStorageValue(cid, 95674) < 0 then
       setPlayerStorageValue(cid, 95674, 0) 
    end
     ----------------dodge-------------------
    if getPlayerStorageValue(cid, 48902) == -1 then
       setPlayerStorageValue(cid, 48902, 0) 
    return true
end

 

 

edit :

oque eu fiz de errado?

http://prntscr.com/8zjsx1

 

 

desculpa ficar perguntando tanto mais é porque eu sou novo mais irei requisitar dos seus serviços em troca lhe pagarei.

Editado por di12345d (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

@di12345d faltou um end pra fechar o if do dodge:

 

local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
accountManager = "Account Manager"                       
managerCounter = 0
   for i, player in ipairs(getOnlinePlayers()) do
      if accountManager:lower() == player:lower() then             
      managerCounter = managerCounter + 1
      end 
   end
 
   if managerCounter >= 3 then
      return false
   end
    local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
    end
    local accountManager = getPlayerAccountManager(cid)
    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str .. " Please choose your outfit."
            doPlayerSendOutfitWindow(cid)
        end
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
    end
    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end
    registerCreatureEvent(cid, "Mail")
    registerCreatureEvent(cid, "GuildMotd")
    registerCreatureEvent(cid, "Idle")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
    end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "attackguild")    
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "bluelegs")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "Promot")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "PythiusDead")
registerCreatureEvent(cid, "ExpVip")
registerCreatureEvent(cid, "levelplayer")
registerCreatureEvent(cid, "PlayerAdvance")
-----------GRAN CASTLE -----------
registerCreatureEvent(cid, "Gran Tower")
registerCreatureEvent(cid, "Gran Aura")
registerCreatureEvent(cid, "Gran Aura Stats")
registerCreatureEvent(cid, "Gran Aura Logout")
registerCreatureEvent(cid, "Gran Tower Target")
registerCreatureEvent(cid,"tasksystem")
registerCreatureEvent(cid, "dodge")
    if (InitArenaScript ~= 0) then
    InitArenaScript = 1
        for i = 42300, 42309 do
            setGlobalStorageValue(i, 0)
            setGlobalStorageValue(i+100, 0)
        end
    end
    if getPlayerStorageValue(cid, 42309) < 1 then
        for i = 42300, 42309 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42319) < 1 then
        for i = 42310, 42319 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42329) < 1 then
        for i = 42320, 42329 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42355) == -1 then
       setPlayerStorageValue(cid, 42355, 0)
    end   
       setPlayerStorageValue(cid, 42350, 0)
       setPlayerStorageValue(cid, 42352, 0)
    
    
     -------------- TASK SYSTEM --------------
    if getPlayerStorageValue(cid, 95673) < 0 then
       setPlayerStorageValue(cid, 95673, 0) 
    end
    if getPlayerStorageValue(cid, 95674) < 0 then
       setPlayerStorageValue(cid, 95674, 0) 
    end
     ----------------dodge-------------------
    if getPlayerStorageValue(cid, 48902) == -1 then
       setPlayerStorageValue(cid, 48902, 0) 
	 end
    return true
end

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites

@xWhiteWolf 

 

obrigado cara como sempre você prestando o suporte pros noobs kkkk

 

 

sabe me dizer se esses erro na distro pode me complicar em algo?

http://prntscr.com/8zr6x8

Editado por di12345d (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

podem, cria um tópico no suporte q o pessoal te ajuda a localizar onde estão esses erros e como solucioná-los

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites
9 horas atrás, xWhiteWolf disse:

podem, cria um tópico no suporte q o pessoal te ajuda a localizar onde estão esses erros e como solucioná-los

ok obrigado , me aceita skype gostaria de conversar com a respeito de eu ser seu cliente

 

 

 

Editado por di12345d (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

White, poderia me ajudar a modificar o script de storage, uso TFS 1.0 e quando mato os monstros não aparece a contagem

Spoiler

local storages = {
name = 95672,
count = 95673,
maxcount = 95674,
}

local config = {
partycount = true, --- true ou false pra ativar/desativar que os kills dos membros da party contem pra voce
killdistance = 7 --- distancia que conta os kills
}


function onKill(cid, target, lastHit)
    if isMonster(target) and getPlayerStorageValue(cid, storages.maxcount) > 3 and (type(getCreatureMaster(target)) == 'nil' or getCreatureMaster(target) == target) and (not(isInParty(cid)) or config.partycount ~= true) then
        if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(cid, storages.name)) then
            setPlayerStorageValue(cid, storages.count, getPlayerStorageValue(cid, storages.count) + 1)
            if getPlayerStorageValue(cid, storages.count) == getPlayerStorageValue(cid, storages.maxcount) then
                doPlayerSendTextMessage(cid, 19, "You finished your task.")
            elseif getPlayerStorageValue(cid, storages.count) < getPlayerStorageValue(cid, storages.maxcount) then
                doPlayerSendTextMessage(cid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(cid, storages.count) .."/".. getPlayerStorageValue(cid, storages.maxcount) .."].")
            end
        end
    elseif isMonster(target) and (type(getCreatureMaster(target)) == 'nil' or getCreatureMaster(target) == target) and isInParty(cid) and config.partycount == true then
    leader = getPartyLeader(cid)
    party = getPartyMembers(leader)
        for i = 1, #party do
        pid = party
        if getDistanceBetween(getThingPos(target), getThingPos(pid)) < config.killdistance then
            if getPlayerStorageValue(pid, storages.maxcount) > 3 then
                if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(pid, storages.name)) then
                    setPlayerStorageValue(pid, storages.count, getPlayerStorageValue(pid, storages.count) + 1)
                    if getPlayerStorageValue(pid, storages.count) == getPlayerStorageValue(pid, storages.maxcount) then
                        doPlayerSendTextMessage(pid, 19, "You finished your task.")
                    elseif getPlayerStorageValue(pid, storages.count) < getPlayerStorageValue(pid, storages.maxcount) then
                        doPlayerSendTextMessage(pid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(pid, storages.count) .."/".. getPlayerStorageValue(pid, storages.maxcount) .."].")
                    end
                end
            end
        end
        end
    end
return true
end

 

Link para o post
Compartilhar em outros sites

infelizmente não sei mexer com TFS 1.0, acredito que o problema seja muito mais complexo do que apenas storage :(

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites

gostaria de almentar a xp gold e skill.

 

 

mais só pra quem faz collect.

 

 

poderia me dizer onde?

 

porque local é para almentar em kills não? me ajuda a entender um pouco mais.

 

 

 

config = {
    levelcollect = 8, --- level pra poder fazer tasks do tipo collect
    time = 5 * 60 * 60, --- tempo que vc vai ficar sem poder falar com ele caso abandone uma task (em segundos)
    bonus = 1.2, --- bonus de exp/gold caso a task escolhida seja random (1.2 = 20% a mais)
    multiplicator = 1.2 --- multiplicador de exp/gold/skills (coloque de acordo com a necessidade do seu server)
}

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.


×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo