Ir para conteúdo
  • Cadastre-se

Normal (Resolvido)Modificar Reset System


Ir para solução Resolvido por Sekk,

Posts Recomendados

Gente, sei que não to contribuindo muito com a comunidade nos ultimos meses, mas peço que me ajudem:

O @xWhiteWolf postou um Reset System por NPC que tem todas as configurações que eu quero, mas é por NPC e eu queria deixar como talkaction... To tentando modificar o script ha 1 dia e não consigo, alguém me da uma luz pfv?

 

Spoiler

--[[Script made 100% by Nogard and Night Wolf.
   You can feel free to edit anything you want, but don't remove the credits]] 


local config = {
minlevel = 150, --- level inical para resetar
price = 10000, --- preço inicial para resetar
newlevel = 20, --- level após reset
priceByReset = 0, --- preço acrescentado por reset
percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total)
maxresets = 50,
levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset
}
--- end config

function getResets(uid)
resets = getPlayerStorageValue(uid, 378378)
  if resets < 0 then
            resets = 0
          end
return resets
end

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


 function addReset(cid)
	if(npcHandler:isFocused(cid)) then
		npcHandler:releaseFocus(cid)
	end		
	talkState[talkUser] = 0
	resets = getResets(cid)
	setPlayerStorageValue(cid, 378378, resets+1) 
	doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
	local hp = getCreatureMaxHealth(cid)
	local resethp = hp*(config.percent/100)
	setCreatureMaxHealth(cid, resethp)
	local differencehp = (hp - resethp)
	doCreatureAddHealth(cid, -differencehp)
	local mana = getCreatureMaxMana(cid)
	local resetmana = mana*(config.percent/100)
	setCreatureMaxMana(cid, resetmana)
	local differencemana = (mana - resetmana)
	doCreatureAddMana(cid, -differencemana)
    doRemoveCreature(cid)		
	local description = resets+1
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..description.."]' WHERE `players`.`id`= ".. playerid .."")
	db.executeQuery("UPDATE `players` SET `level`="..config.newlevel..",`experience`= 0 WHERE `players`.`id`= ".. playerid .."")
    return true
end


local newPrice = config.price + (getResets(cid) * config.priceByReset)
local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset)

if msgcontains(msg, 'reset') then
	if getResets(cid) < config.maxresets then
		selfSay('You want to reset your character? It will cost '..newPrice..' gp\'s!', cid)
		talkState[talkUser] = 1
	else
		selfSay('You already reached the maximum reset level!', cid)
	end
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
	if getPlayerMoney(cid) < newPrice then
		selfSay('Its necessary to have at least '..newPrice..' gp\'s for reseting!', cid)
	elseif getPlayerLevel(cid) < newminlevel then
		selfSay('The minimum level for reseting is '..newminlevel..'!', cid)
	else
		doPlayerRemoveMoney(cid,newPrice)
		playerid = getPlayerGUID(cid)
		addEvent(function()
			if isPlayer(cid) then
				addReset(cid)
			end
		end, 3000)
		local number = getResets(cid)+1
		local msg ="---[Reset: "..number.."]-- You have reseted!  You'll be disconnected in 3 seconds."
		doPlayerPopupFYI(cid, msg) 
		talkState[talkUser] = 0
		npcHandler:releaseFocus(cid)
	end
talkState[talkUser] = 0
elseif(msgcontains(msg, 'no')) and isInArray({1}, talkState[talkUser]) == TRUE then
	talkState[talkUser] = 0
	npcHandler:releaseFocus(cid)
	selfSay('Ok.', cid)
elseif msgcontains(msg, 'quantity') then
	selfSay('You have a total of '..getResets(cid)..' reset(s).', cid)
	talkState[talkUser] = 0
end

return true
end

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

 

 

 

@xWhiteWolf @Fir3element @Vodkart @Absolute

 

Agradeço!

Link para o post
Compartilhar em outros sites

fiz em 5 min aq, nem testei

 


local config = {
    minlevel = 150, --- level inical para resetar
    price = 10000, --- preço inicial para resetar
    newlevel = 20, --- level após reset
    priceByReset = 0, --- preço acrescentado por reset
    percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total)
    maxresets = 50,
    levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset
}
--- end config

local function getResets(uid)
    local resets = getPlayerStorageValue(uid, 378378)
    if resets < 0 then
        resets = 0
    end
    return resets
end

local function addReset(cid)
    local resets = getResets(cid)
    setPlayerStorageValue(cid, 378378, resets+1) 
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    local hp = getCreatureMaxHealth(cid)
    local resethp = hp*(config.percent/100)
    setCreatureMaxHealth(cid, resethp)
    local differencehp = (hp - resethp)
    doCreatureAddHealth(cid, -differencehp)
    local mana = getCreatureMaxMana(cid)
    local resetmana = mana*(config.percent/100)
    setCreatureMaxMana(cid, resetmana)
    local differencemana = (mana - resetmana)
    doCreatureAddMana(cid, -differencemana)
    local guid = getPlayerGUID(cid)
    doRemoveCreature(cid)        
    local description = resets+1
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..description.."]' WHERE `players`.`id`= ".. guid)
    db.executeQuery("UPDATE `players` SET `level`="..config.newlevel..",`experience`= 0 WHERE `players`.`id`= ".. guid)
    return true
end

function onSay(cid, words, param, channel)
    local newPrice = config.price + (getResets(cid) * config.priceByReset)
    local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset)
    if param == "quantity" then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a total of '..getResets(cid)..' reset(s).')
    end

    if getResets(cid) < config.maxresets then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'You want to reset your character? It will cost '..newPrice..' gp\'s!')
    elseif getPlayerMoney(cid) < newPrice then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'Its necessary to have at least '..newPrice..' gp\'s for reseting!')
    elseif getPlayerLevel(cid) < newminlevel then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'The minimum level for reseting is '..newminlevel..'!')
    end

    doPlayerRemoveMoney(cid,newPrice)
    addEvent(function()
        if isPlayer(cid) then
            addReset(cid)
        end
        end, 3000)
    local number = getResets(cid)+1
    local msg ="---[Reset: "..number.."]-- You have reseted!  You'll be disconnected in 3 seconds."
    doPlayerPopupFYI(cid, msg)
    return true
end

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

@Fir3element testei, não tem nenhum erro no tfs, mas quando eu falo !reset acontece isso uehuehe

 

e5gwgz.png

 

 

Edit:

Sei que é nessa parte:

Citar

if getResets(cid) < config.maxresets then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'You want to reset your character? It will cost '..newPrice..' gp\'s!')
    elseif getPlayerMoney(cid) < newPrice then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'Its necessary to have at least '..newPrice..' gp\'s for reseting!')
    elseif getPlayerLevel(cid) < newminlevel then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'The minimum level for reseting is '..newminlevel..'!')
    end

 

Mas não sei se posso apenas retirar ou tenho que editar pra mandar a msg por exemplo "voce precisa de x de money" etc :/

 

 

Muito tempo parado me deixou mais lesado q antes uahauh

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

o problema é no return que tá encerrando o callback antes de executar o reset. Vou modificar.

o problema é no return que tá encerrando o callback antes de executar o reset. Vou modificar.

o problema é no return que tá encerrando o callback antes de executar o reset. Vou modificar.

 

Spoiler


local config = {
    minlevel = 150, --- level inical para resetar
    price = 10000, --- preço inicial para resetar
    newlevel = 20, --- level após reset
    priceByReset = 0, --- preço acrescentado por reset
    percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total)
    maxresets = 50,
    levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset
}
--- end config

local function getResets(uid)
    local resets = getPlayerStorageValue(uid, 378378)
    if resets < 0 then
        resets = 0
    end
    return resets
end

local function addReset(cid)
    local resets = getResets(cid)
    setPlayerStorageValue(cid, 378378, resets+1) 
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    local hp = getCreatureMaxHealth(cid)
    local resethp = hp*(config.percent/100)
    setCreatureMaxHealth(cid, resethp)
    local differencehp = (hp - resethp)
    doCreatureAddHealth(cid, -differencehp)
    local mana = getCreatureMaxMana(cid)
    local resetmana = mana*(config.percent/100)
    setCreatureMaxMana(cid, resetmana)
    local differencemana = (mana - resetmana)
    doCreatureAddMana(cid, -differencemana)
    local guid = getPlayerGUID(cid)
    doRemoveCreature(cid)        
    local description = resets+1
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..description.."]' WHERE `players`.`id`= ".. guid)
    db.executeQuery("UPDATE `players` SET `level`="..config.newlevel..",`experience`= 0 WHERE `players`.`id`= ".. guid)
    return true
end

function onSay(cid, words, param, channel)
    local newPrice = config.price + (getResets(cid) * config.priceByReset)
    local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset)
    if param == "quantity" then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a total of '..getResets(cid)..' reset(s).')
    end

    if getResets(cid) >= config.maxresets then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'You already have reached the maximum of '.. config.maxresets.. ' resets!')
    elseif getPlayerMoney(cid) < newPrice then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'Its necessary to have at least '..newPrice..' gp\'s for reseting!')
    elseif getPlayerLevel(cid) < newminlevel then
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'The minimum level for reseting is '..newminlevel..'!')
    end

    doPlayerRemoveMoney(cid,newPrice)
    addEvent(function()
        if isPlayer(cid) then
            addReset(cid)
        end
        end, 3000)
    local number = getResets(cid)+1
    local msg ="---[Reset: "..number.."]-- You have reseted!  You'll be disconnected in 3 seconds."
    doPlayerPopupFYI(cid, msg)
    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

REP+ para os dois ja! Só mais uma coisa lobo, ao invés de fazer com que o script registre os resets na description, tem como eu fazer com q ele altere o valor de uma coluna chamada 'resets' na table 'players'? Ja tenho essa coluna na table

 

Obs.: Isso e manter o Reset no look do player(quando ele der look nele msm tambem)

 

Obg :3

Editado por Sekk (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
5 horas atrás, Sekk disse:

REP+ para os dois ja! Só mais uma coisa lobo, ao invés de fazer com que o script registre os resets na description, tem como eu fazer com q ele altere o valor de uma coluna chamada 'resets' na table 'players'? Ja tenho essa coluna na table

 

Obs.: Isso e manter o Reset no look do player(quando ele der look nele msm tambem)

 

Obg :3

ele ja usa storage pra salvar os resets (mantém numa tabela dentro do banco de dados), colocar pra salvar em outra tabela seria executar alvo duas vezes. 
Os resets no look qnd vc mesmo da look receio que não seja possível sem source editing, eu uso uma função de atualizar a description no banco de dados mas quando vc dá look em si mesmo você não vê sua description, então tem que mudar na source pra você ver.. por isso eu fiz de uma forma que se vc digita !reset quantity vc recebe o valor dos resets que você tem.

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

não sei.. eu poderia fuçar aqui e descobrir mas da mesma forma que eu poderia fazer isso você também poderia haha o mais dificil é achar aonde fica as descrições, o resto é uma linha que vc cola de um if no outro.

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
Link para o post
Compartilhar em outros sites
local config = {
	minlevel = 150, --- level inical para resetar
	price = 10000, --- preço inicial para resetar
	newlevel = 20, --- level após reset
	priceByReset = 0, --- preço acrescentado por reset
	percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total)
	maxresets = 50,
	levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset
}
local function getResets(cid)
	local query = db.getResult("SELECT `resets` FROM `players` WHERE `id`= "..getPlayerGUID(cid))
	return query:getDataInt("resets") <= 0 and 0 or query:getDataInt("resets")
end
local function addReset(cid)
	local resets = getResets(cid)
	doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
	local hp = getCreatureMaxHealth(cid)
	local resethp = hp*(config.percent/100)
	setCreatureMaxHealth(cid, resethp)
	local differencehp = (hp - resethp)
	doCreatureAddHealth(cid, -differencehp)
	local mana = getCreatureMaxMana(cid)
	local resetmana = mana*(config.percent/100)
	setCreatureMaxMana(cid, resetmana)
	local differencemana = (mana - resetmana)
	doCreatureAddMana(cid, -differencemana)
	local guid = getPlayerGUID(cid)
	doRemoveCreature(cid) 
	local description = resets+1
	db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..description.."]', `level` = "..config.newlevel..", `experience`= 0, `resets`= "..description.." WHERE `players`.`id`= ".. guid)
	return true
end

function onSay(cid, words, param, channel)
	local var = getResets(cid)
	local newPrice = config.price + (var * config.priceByReset)
	local newminlevel = config.minlevel + (var * config.levelbyreset)
	if param == "quantity" then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a total of '..var..' reset(s).')
	end
	if var >= config.maxresets then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'You already have reached the maximum of '.. config.maxresets.. ' resets!')
	elseif getPlayerMoney(cid) < newPrice then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'Its necessary to have at least '..newPrice..' gp\'s for reseting!')
	elseif getPlayerLevel(cid) < newminlevel then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'The minimum level for reseting is '..newminlevel..'!')
	end
	doPlayerRemoveMoney(cid,newPrice)
	addEvent(function()
		if isPlayer(cid) then
			addReset(cid)
		end
	end, 3000)
	local number = var+1
	local msg ="---[Reset: "..number.."]-- You have reseted! You'll be disconnected in 3 seconds."
	doPlayerPopupFYI(cid, msg)
	return true
end

 

Editado por Vodkart (veja o histórico de edições)

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
  • Solução

O Vodkart me ajudou por PM, ele conseguiu resolver o problema e deixou o script como eu queria haha, ai vai a solução:

 

data/talkactions/scripts crie um arquivo chamado reset.lua e adicione isso nele:

Spoiler

local config = {
	minlevel = 150, --- level inical para resetar
	price = 10000, --- preço inicial para resetar
	newlevel = 20, --- level após reset
	priceByReset = 0, --- preço acrescentado por reset
	percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total)
	maxresets = 50,
	levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset
}
local function getResets(cid)
	local query = db.getResult("SELECT `resets` FROM `players` WHERE `id`= "..getPlayerGUID(cid))
	return query:getDataInt("resets") <= 0 and 0 or query:getDataInt("resets")
end
local function addReset(cid)
	local resets = getResets(cid)
	doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
	local hp = getCreatureMaxHealth(cid)
	local resethp = hp*(config.percent/100)
	setCreatureMaxHealth(cid, resethp)
	local differencehp = (hp - resethp)
	doCreatureAddHealth(cid, -differencehp)
	local mana = getCreatureMaxMana(cid)
	local resetmana = mana*(config.percent/100)
	setCreatureMaxMana(cid, resetmana)
	local differencemana = (mana - resetmana)
	doCreatureAddMana(cid, -differencemana)
	local guid = getPlayerGUID(cid)
	doRemoveCreature(cid) 
	local description = resets+1
	db.query("UPDATE `players` SET `level` = "..config.newlevel..", `experience`= 0, `resets`= "..description.." WHERE `players`.`id`= ".. guid)
	return true
end

function onSay(cid, words, param, channel)
	local var = getResets(cid)
	local newPrice = config.price + (var * config.priceByReset)
	local newminlevel = config.minlevel + (var * config.levelbyreset)
	if param == "quantity" then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a total of '..var..' reset(s).')
	end
	if var >= config.maxresets then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'You already have reached the maximum of '.. config.maxresets.. ' resets!')
	elseif getPlayerMoney(cid) < newPrice then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'Its necessary to have at least '..newPrice..' gp\'s for reseting!')
	elseif getPlayerLevel(cid) < newminlevel then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'The minimum level for reseting is '..newminlevel..'!')
	end
	doPlayerRemoveMoney(cid,newPrice)
	addEvent(function()
		if isPlayer(cid) then
			addReset(cid)
		end
	end, 3000)
	local number = var+1
	local msg ="---[Reset: "..number.."]-- You have reseted! You'll be disconnected in 3 seconds."
	doPlayerPopupFYI(cid, msg)
	return true
end

 

 

Em talkactions.xml adicione a seguinte tag:

<talkaction words="!reset" event="script" value="reset.lua"/>

 

 

Agora para mostrar o reset no look dos players e no seu próprio look, vá em:

data/creaturescripts/scripts e crie um arquivo chamado resetlook.lua e adicione isso nele:

Spoiler

function onLogin(cid)
	registerCreatureEvent(cid, "resetlook")
	return true
end
function getResets(cid)
	local query = db.getResult("SELECT `resets` FROM `players` WHERE `id`= "..getPlayerGUID(cid))
	return query:getDataInt("resets") <= 0 and 0 or query:getDataInt("resets")
end
function onLook(cid, thing, position, lookDistance)
	if isPlayer(thing.uid) and thing.uid ~= cid then
		doPlayerSetSpecialDescription(thing.uid,' [Resets: '..getResets(thing.uid)..']')
		return true
	elseif thing.uid == cid then
		doPlayerSetSpecialDescription(cid,' [Resets: '..getResets(cid)..']')
		local string = 'You see yourself. (Level: '..getPlayerLevel(thing.uid)..')'
		if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then
			string = string..' You are '.. getPlayerGroupName(cid) ..'.'
		elseif getPlayerVocation(cid) ~= 0 then
			string = string..' You are '.. getPlayerVocationName(cid) ..'.'
		else
			string = string..' You have no vocation.'
		end
		string = string..getPlayerSpecialDescription(cid)..''
		if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then
			string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.'
		end
		if getPlayerGuildId(cid) > 0 then
			string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid)
			string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.'
		end
		if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then
			string = string..' Health: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].'
			string = string..' IP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.'
		end
		if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then
			string = string..' Position: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].'
		end
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)  
		return false
	end
	return true
end

 

 

E em creaturescripts.xml adicione as tags:

<event type="login" name="resetlook_register" event="script" value="resetlook.lua"/>
<event type="look" name="resetlook" event="script" value="resetlook.lua"/>

 

Editado por Sekk (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 3 years later...

Este sistema por talkaction há um bug. Se o player falar !reset e sotar magia como exura no meio tempo em que leva para resetar, ele não desloga e continua no mesmo level (perdendo somente a life e mana configurada no script). S epuderem ajudar a resolver, ficaria imensamente grato.

                                                                                                               destinyshield.gif.9f031b59b026058f32a1c50da92ebe2a.gif  mídias sociais  destinyshield.gif.02fca81ab0615e050b2bcefd8a73a2e8.gif

                                                                                                                            talk to me              

                                                                                                                               vídeos           

                                                                                             

                                                                                                            LOGONORMAL.png.815b40b04ec583be88d8a1e2626fe430.png

                                                                                                           

                               

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 Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo