Ir para conteúdo
  • Cadastre-se

Posts Recomendados

local focus = 0
local talk_start = 0
local target = 0
local days = 0

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
  	if focus == cid then
          selfSay('Good bye then.')
          focus = 0
          talk_start = 0
  	end
end


function onCreatureTurn(creature)

end


function msgcontains(txt, str)
  	return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function msgcontains(txt, str)
  	return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
  	msg = string.lower(msg)

  	if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
 		selfSay('Hi ' .. creatureGetName(cid) .. '! what you want mortal?')
 		focus = cid
 		talk_start = os.clock()

	elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
  		selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

  	elseif focus == cid then
		talk_start = os.clock()


		if msgcontains(msg, 'energyze necklace') or msgcontains(msg, 'energyze') then
			selfSay('I can energyze your necklace for 50k, do you want energyze?')
			talk_state = 1

		elseif talk_state == 1 then
			if msgcontains(msg, 'yes') then
                        if doPlayerRemoveItem(cid,2197,1) == 1 then
 			doPlayerSendTextMessage(cid,22,"Voce Energizou seu Elemental necklace.")
  			buy(cid,13682,getCount(msg),50000)
					selfSay('energyze the elemental necklace sucessfull.')
				else
					selfSay('Sorry, you do not have elemental necklace.')
				end
			end
			talk_state = 0

		elseif msgcontains(msg, 'energyze spirit amulet') or msgcontains(msg, 'energyze') then
			selfSay('I can energyze your amulet for 100k, do you want energyze?')
			talk_state = 2

		elseif talk_state == 2 then
			if msgcontains(msg, 'yes') then
                        if doPlayerRemoveItem(cid,2173,1) == 1 then
  			buy(cid,13683,getCount(msg),100000)
 			doPlayerSendTextMessage(cid,22,"Voce Energizou seu Spirit elemental necklace.")
					selfSay('energyze the spirit necklace sucessfull.')
				else
					selfSay('Sorry, you do not have one spirit elemental necklace.')
				end
			end
			talk_state = 0

		elseif msgcontains(msg, 'energyze magic amulet') or msgcontains(msg, 'energyze') then
			selfSay('I can energyze your magic amulet for 150k, do you want energyze?')
			talk_state = 3

		elseif talk_state == 3 then
			if msgcontains(msg, 'yes') then
                        if doPlayerRemoveItem(cid,2125,1) == 1 then
  			buy(cid,13684,getCount(msg),150000)
 			doPlayerSendTextMessage(cid,22,"Voce Energizou seu Magic elemental amulet.")
					selfSay('energyze the magic amulet sucessfull.')
				else
					selfSay('Sorry, you do not have one magic amulet.')
				end
			end
			talk_state = 0


		elseif msgcontains(msg, 'elemental necklace') then
			selfSay('You change a mysterious, dragon breath, scorpion, platinum, fluids and vampire tooth,change all for a Elemental necklace?')
			talk_state = 4

		elseif talk_state == 4 then
			if msgcontains(msg, 'yes') then
            if doPlayerRemoveItem(cid,2201,1) == 0 then 
                elseif doPlayerRemoveItem(cid,2198,1) == 0 then
                elseif doPlayerRemoveItem(cid,2170,1) == 0 then
                elseif doPlayerRemoveItem(cid,2171,1) == 0 then
                elseif doPlayerRemoveItem(cid,2172,1) == 0 then 
                elseif doPlayerRemoveItem(cid,2161,1) == 0 then 
  		elseif doPlayerAddItem(cid,2197,1) == 0 then 
					selfSay('change the amulet\'s for one elemental necklace sucessfull.')
				else
					selfSay('change the amulet\'s for one elemental necklace sucessfull.')
				end
			end
			talk_state = 0


		elseif msgcontains(msg, 'spirit elemental necklace') then
			selfSay('You change a need a Ialamar, frozzen, sickness, Samantha, Mastafar, priest and eletric, change for a Spirit Elemental amulet?')
			talk_state = 5

		elseif talk_state == 5 then
			if msgcontains(msg, 'yes') then
            if doPlayerRemoveItem(cid,2129,1) == 0 then 
                elseif doPlayerRemoveItem(cid,2199,1) == 0 then
                elseif doPlayerRemoveItem(cid,2135,1) == 0 then
                elseif doPlayerRemoveItem(cid,2126,1) == 0 then
                elseif doPlayerRemoveItem(cid,2131,1) == 0 then 
                elseif doPlayerRemoveItem(cid,2130,1) == 0 then 
                elseif doPlayerRemoveItem(cid,2133,1) == 0 then 
		elseif doPlayerAddItem(cid,2173,1) == 0 then 
					selfSay('change the amulet\'s for one spirit elemental necklace sucessfull.')
				else
					selfSay('change the amulet\'s for one spirit elemental necklace sucessfull.')
				end
			end
			talk_state = 0

		elseif msgcontains(msg, 'magic elemental amulet') then
			selfSay('You change a Merlian, relic of the hell, Broonier, Thordain, dark wyzard, angel and gaya,change all for Elemental magic amulet?')
			talk_state = 6

		elseif talk_state == 6 then
			if msgcontains(msg, 'yes') then
            if doPlayerRemoveItem(cid,2138,1) == 0 then 
                elseif doPlayerRemoveItem(cid,2139,1) == 0 then
                elseif doPlayerRemoveItem(cid,2142,1) == 0 then
                elseif doPlayerRemoveItem(cid,2200,1) == 0 then
                elseif doPlayerRemoveItem(cid,2196,1) == 0 then 
                elseif doPlayerRemoveItem(cid,2132,1) == 0 then 
                elseif doPlayerRemoveItem(cid,2136,1) == 0 then 
		elseif doPlayerAddItem(cid,2125,1) == 0 then 
					selfSay('change the amulet\'s for one elemental magic amulet sucessfull.')
				else
					selfSay('change the amulet\'s for one elemental magic amulet sucessfull.')
				end
			end
			talk_state = 0

		elseif msgcontains(msg, 'bless') or msgcontains(msg, 'blessing') then
		getPlayerBlessing(cid,1)
		getPlayerBlessing(cid,2)
		getPlayerBlessing(cid,3)
		getPlayerBlessing(cid,4)
		getPlayerBlessing(cid,5)
			selfSay('deseja compra o bless ?')
			talk_state = 7

		elseif talk_state == 7 then
			if msgcontains(msg, 'yes') then
			if pay(cid,1000000) then
			doPlayerAddBlessing(cid, 1)
			doPlayerAddBlessing(cid, 2)
			doPlayerAddBlessing(cid, 3)
			doPlayerAddBlessing(cid, 4)
			doPlayerAddBlessing(cid, 5)
			doPlayerSendTextMessage(cid,22,"Você recebeu a benção de Isolda.")
				else
					selfSay('Desculpe, mas voce não tem Ruby Coin suficiente.')
				end
			end
			talk_state = 0
			
			elseif msgcontains(msg, 'reset') then
			selfSay('You realy want reset your character?')
			talk_state = 8

		elseif msgcontains(msg, 'yes') then
 			if getPlayerVocation(cid) < 13 then
 				selfSay('Sorry, only gods can reset.')
 				talk_state = 0
 			elseif getPlayerLevel(cid) < 500 then
				selfSay('Sorry, you need level 500 to reset your character.')
				talk_state = 0
			elseif not isPremium(cid) then
				selfSay('Sorry, you must be premium to reset.')
				talk_state = 0
                        elseif doPlayerRemoveItem(cid,13685,50) == 1 then
				doPlayerSetLevel(cid, -(getPlayerLevel(cid)-8))
				doSendAnimatedText(getPlayerPosition(cid), "Reseted", TEXTCOLOR_LIGHTGREEN)
				doSendMagicEffect(getPlayerPosition(cid),14)
				doPlayerSendTextMessage(cid,21,"You are returned to level 8.")
				talk_state = 0
			else
				selfSay('You dont have money for reset your character.')
				talk_state = 1
			end

			talk_state = 0
			

	elseif msgcontains(msg, 'offer') then
                selfSay('I can do an element item or energyze your element item, i only need all "necklace", "amulet" ou "magics" amulet, also can bless a little mortal and reset a god!')

        elseif msgcontains(msg, 'necklace') then
                selfSay('I only need a mysterious, dragon breath, scorpion, platinum, fluids and vampire tooth, accept change all for a Elemental necklace?')
        elseif msgcontains(msg, 'amulet') then
                selfSay('I only need a Ialamar, frozzen, sickness, Samantha, Mastafar, priest and eletric, accept change all for a Spirit Elemental amulet?')
        elseif msgcontains(msg, 'magics') then
                selfSay('I only need a Merlian, relic of the hell, Broonier, Thordain, dark wyzard, angel and gaya, accept change all for a Elemental magic amulet?')


				
  		elseif msgcontains(msg, 'bye')  and getDistanceToCreature(cid) < 4 then
  			selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
  			focus = 0
  			talk_start = 0
  		end
  	end


function onCreatureChangeOutfit(creature)

end


function onThink()
	doNpcSetCreatureFocus(focus)
  	if (os.clock() - talk_start) > 30 then
  		if focus > 0 then
  			selfSay('Next Please...')
  		end
  			focus = 0
  	end
 	if focus ~= 0 then
 		if getDistanceToCreature(focus) > 5 then
 			selfSay('Good bye then.')
 			focus = 0
 		end
 	end
end
end

deu erro na hora de setar o level, alguem ajude em uma função de 7.92 onde eu consiga voltar o level pra 8.

lembrando o servidor é 7.92..

por favor alguem me ajuda

 

Lua Script Error: [Npc interface]
data/npc/scripts/isolda.lua:onCreatureSay
 
data/npc/scripts/isolda.lua:206: attempt to call global 'doPlayerSetLevel' (a nil value)
Editado por azzouks (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Teste assim:

 

local focus = 0
local talk_start = 0
local target = 0
local days = 0

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
      if focus == cid then
          selfSay('Good bye then.')
          focus = 0
          talk_start = 0
      end
end


function onCreatureTurn(creature)

end


function msgcontains(txt, str)
      return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function msgcontains(txt, str)
      return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
      msg = string.lower(msg)

      if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
         selfSay('Hi ' .. creatureGetName(cid) .. '! what you want mortal?')
         focus = cid
         talk_start = os.clock()

    elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
          selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

      elseif focus == cid then
        talk_start = os.clock()


        if msgcontains(msg, 'energyze necklace') or msgcontains(msg, 'energyze') then
            selfSay('I can energyze your necklace for 50k, do you want energyze?')
            talk_state = 1

        elseif talk_state == 1 then
            if msgcontains(msg, 'yes') then
                        if doPlayerRemoveItem(cid,2197,1) == 1 then
             doPlayerSendTextMessage(cid,22,"Voce Energizou seu Elemental necklace.")
              buy(cid,13682,getCount(msg),50000)
                    selfSay('energyze the elemental necklace sucessfull.')
                else
                    selfSay('Sorry, you do not have elemental necklace.')
                end
            end
            talk_state = 0

        elseif msgcontains(msg, 'energyze spirit amulet') or msgcontains(msg, 'energyze') then
            selfSay('I can energyze your amulet for 100k, do you want energyze?')
            talk_state = 2

        elseif talk_state == 2 then
            if msgcontains(msg, 'yes') then
                        if doPlayerRemoveItem(cid,2173,1) == 1 then
              buy(cid,13683,getCount(msg),100000)
             doPlayerSendTextMessage(cid,22,"Voce Energizou seu Spirit elemental necklace.")
                    selfSay('energyze the spirit necklace sucessfull.')
                else
                    selfSay('Sorry, you do not have one spirit elemental necklace.')
                end
            end
            talk_state = 0

        elseif msgcontains(msg, 'energyze magic amulet') or msgcontains(msg, 'energyze') then
            selfSay('I can energyze your magic amulet for 150k, do you want energyze?')
            talk_state = 3

        elseif talk_state == 3 then
            if msgcontains(msg, 'yes') then
                        if doPlayerRemoveItem(cid,2125,1) == 1 then
              buy(cid,13684,getCount(msg),150000)
             doPlayerSendTextMessage(cid,22,"Voce Energizou seu Magic elemental amulet.")
                    selfSay('energyze the magic amulet sucessfull.')
                else
                    selfSay('Sorry, you do not have one magic amulet.')
                end
            end
            talk_state = 0


        elseif msgcontains(msg, 'elemental necklace') then
            selfSay('You change a mysterious, dragon breath, scorpion, platinum, fluids and vampire tooth,change all for a Elemental necklace?')
            talk_state = 4

        elseif talk_state == 4 then
            if msgcontains(msg, 'yes') then
            if doPlayerRemoveItem(cid,2201,1) == 0 then
                elseif doPlayerRemoveItem(cid,2198,1) == 0 then
                elseif doPlayerRemoveItem(cid,2170,1) == 0 then
                elseif doPlayerRemoveItem(cid,2171,1) == 0 then
                elseif doPlayerRemoveItem(cid,2172,1) == 0 then
                elseif doPlayerRemoveItem(cid,2161,1) == 0 then
          elseif doPlayerAddItem(cid,2197,1) == 0 then
                    selfSay('change the amulet\'s for one elemental necklace sucessfull.')
                else
                    selfSay('change the amulet\'s for one elemental necklace sucessfull.')
                end
            end
            talk_state = 0


        elseif msgcontains(msg, 'spirit elemental necklace') then
            selfSay('You change a need a Ialamar, frozzen, sickness, Samantha, Mastafar, priest and eletric, change for a Spirit Elemental amulet?')
            talk_state = 5

        elseif talk_state == 5 then
            if msgcontains(msg, 'yes') then
            if doPlayerRemoveItem(cid,2129,1) == 0 then
                elseif doPlayerRemoveItem(cid,2199,1) == 0 then
                elseif doPlayerRemoveItem(cid,2135,1) == 0 then
                elseif doPlayerRemoveItem(cid,2126,1) == 0 then
                elseif doPlayerRemoveItem(cid,2131,1) == 0 then
                elseif doPlayerRemoveItem(cid,2130,1) == 0 then
                elseif doPlayerRemoveItem(cid,2133,1) == 0 then
        elseif doPlayerAddItem(cid,2173,1) == 0 then
                    selfSay('change the amulet\'s for one spirit elemental necklace sucessfull.')
                else
                    selfSay('change the amulet\'s for one spirit elemental necklace sucessfull.')
                end
            end
            talk_state = 0

        elseif msgcontains(msg, 'magic elemental amulet') then
            selfSay('You change a Merlian, relic of the hell, Broonier, Thordain, dark wyzard, angel and gaya,change all for Elemental magic amulet?')
            talk_state = 6

        elseif talk_state == 6 then
            if msgcontains(msg, 'yes') then
            if doPlayerRemoveItem(cid,2138,1) == 0 then
                elseif doPlayerRemoveItem(cid,2139,1) == 0 then
                elseif doPlayerRemoveItem(cid,2142,1) == 0 then
                elseif doPlayerRemoveItem(cid,2200,1) == 0 then
                elseif doPlayerRemoveItem(cid,2196,1) == 0 then
                elseif doPlayerRemoveItem(cid,2132,1) == 0 then
                elseif doPlayerRemoveItem(cid,2136,1) == 0 then
        elseif doPlayerAddItem(cid,2125,1) == 0 then
                    selfSay('change the amulet\'s for one elemental magic amulet sucessfull.')
                else
                    selfSay('change the amulet\'s for one elemental magic amulet sucessfull.')
                end
            end
            talk_state = 0

        elseif msgcontains(msg, 'bless') or msgcontains(msg, 'blessing') then
        getPlayerBlessing(cid,1)
        getPlayerBlessing(cid,2)
        getPlayerBlessing(cid,3)
        getPlayerBlessing(cid,4)
        getPlayerBlessing(cid,5)
            selfSay('deseja compra o bless ?')
            talk_state = 7

        elseif talk_state == 7 then
            if msgcontains(msg, 'yes') then
            if pay(cid,1000000) then
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
            doPlayerAddBlessing(cid, 4)
            doPlayerAddBlessing(cid, 5)
            doPlayerSendTextMessage(cid,22,"Você recebeu a benção de Isolda.")
                else
                    selfSay('Desculpe, mas voce não tem Ruby Coin suficiente.')
                end
            end
            talk_state = 0
            
            elseif msgcontains(msg, 'reset') then
            selfSay('You realy want reset your character?')
            talk_state = 8

        elseif msgcontains(msg, 'yes') then
             if getPlayerVocation(cid) < 13 then
                 selfSay('Sorry, only gods can reset.')
                 talk_state = 0
             elseif getPlayerLevel(cid) < 500 then
                selfSay('Sorry, you need level 500 to reset your character.')
                talk_state = 0
            elseif not isPremium(cid) then
                selfSay('Sorry, you must be premium to reset.')
                talk_state = 0
            elseif doPlayerRemoveItem(cid,13685,50) == 1 then
        local CheckExp = getPlayerExperience(cid)
                doPlayerAddExperience(cid, -CheckExp)
                doSendAnimatedText(getPlayerPosition(cid), "Reseted", TEXTCOLOR_LIGHTGREEN)
                doSendMagicEffect(getPlayerPosition(cid),14)
                doPlayerSendTextMessage(cid,21,"You are returned to level 8.")
                doPlayerAddExperience(cid, 800)
                talk_state = 0
            else
                selfSay('You dont have money for reset your character.')
                talk_state = 1
            end

            talk_state = 0
            

    elseif msgcontains(msg, 'offer') then
                selfSay('I can do an element item or energyze your element item, i only need all "necklace", "amulet" ou "magics" amulet, also can bless a little mortal and reset a god!')

        elseif msgcontains(msg, 'necklace') then
                selfSay('I only need a mysterious, dragon breath, scorpion, platinum, fluids and vampire tooth, accept change all for a Elemental necklace?')
        elseif msgcontains(msg, 'amulet') then
                selfSay('I only need a Ialamar, frozzen, sickness, Samantha, Mastafar, priest and eletric, accept change all for a Spirit Elemental amulet?')
        elseif msgcontains(msg, 'magics') then
                selfSay('I only need a Merlian, relic of the hell, Broonier, Thordain, dark wyzard, angel and gaya, accept change all for a Elemental magic amulet?')


                
          elseif msgcontains(msg, 'bye')  and getDistanceToCreature(cid) < 4 then
              selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
              focus = 0
              talk_start = 0
          end
      end


function onCreatureChangeOutfit(creature)

end


function onThink()
    doNpcSetCreatureFocus(focus)
      if (os.clock() - talk_start) > 30 then
          if focus > 0 then
              selfSay('Next Please...')
          end
              focus = 0
      end
     if focus ~= 0 then
         if getDistanceToCreature(focus) > 5 then
             selfSay('Good bye then.')
             focus = 0
         end
     end
end
end

 

Boa sorte.

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

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites
desse jeito da esse erro 
Lua Script Error: [Npc interface]
data/npc/scripts/isolda.lua:onCreatureSay
 
data/npc/scripts/isolda.lua:206: attempt to call global 'getPlayerExperience' (a nil value)
 
coloquei assim:
local focus = 0
local talk_start = 0
local target = 0
local days = 0

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
      if focus == cid then
          selfSay('Good bye then.')
          focus = 0
          talk_start = 0
      end
end


function onCreatureTurn(creature)

end


function msgcontains(txt, str)
      return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function msgcontains(txt, str)
      return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
      msg = string.lower(msg)

      if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
         selfSay('Hi ' .. creatureGetName(cid) .. '! what you want mortal?')
         focus = cid
         talk_start = os.clock()

    elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
          selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

      elseif focus == cid then
        talk_start = os.clock()


        if msgcontains(msg, 'energyze necklace') or msgcontains(msg, 'energyze') then
            selfSay('I can energyze your necklace for 50k, do you want energyze?')
            talk_state = 1

        elseif talk_state == 1 then
            if msgcontains(msg, 'yes') then
                        if doPlayerRemoveItem(cid,2197,1) == 1 then
             doPlayerSendTextMessage(cid,22,"Voce Energizou seu Elemental necklace.")
              buy(cid,13682,getCount(msg),50000)
                    selfSay('energyze the elemental necklace sucessfull.')
                else
                    selfSay('Sorry, you do not have elemental necklace.')
                end
            end
            talk_state = 0

        elseif msgcontains(msg, 'energyze spirit amulet') or msgcontains(msg, 'energyze') then
            selfSay('I can energyze your amulet for 100k, do you want energyze?')
            talk_state = 2

        elseif talk_state == 2 then
            if msgcontains(msg, 'yes') then
                        if doPlayerRemoveItem(cid,2173,1) == 1 then
              buy(cid,13683,getCount(msg),100000)
             doPlayerSendTextMessage(cid,22,"Voce Energizou seu Spirit elemental necklace.")
                    selfSay('energyze the spirit necklace sucessfull.')
                else
                    selfSay('Sorry, you do not have one spirit elemental necklace.')
                end
            end
            talk_state = 0

        elseif msgcontains(msg, 'energyze magic amulet') or msgcontains(msg, 'energyze') then
            selfSay('I can energyze your magic amulet for 150k, do you want energyze?')
            talk_state = 3

        elseif talk_state == 3 then
            if msgcontains(msg, 'yes') then
                        if doPlayerRemoveItem(cid,2125,1) == 1 then
              buy(cid,13684,getCount(msg),150000)
             doPlayerSendTextMessage(cid,22,"Voce Energizou seu Magic elemental amulet.")
                    selfSay('energyze the magic amulet sucessfull.')
                else
                    selfSay('Sorry, you do not have one magic amulet.')
                end
            end
            talk_state = 0


        elseif msgcontains(msg, 'elemental necklace') then
            selfSay('You change a mysterious, dragon breath, scorpion, platinum, fluids and vampire tooth,change all for a Elemental necklace?')
            talk_state = 4

        elseif talk_state == 4 then
            if msgcontains(msg, 'yes') then
            if doPlayerRemoveItem(cid,2201,1) == 0 then
                elseif doPlayerRemoveItem(cid,2198,1) == 0 then
                elseif doPlayerRemoveItem(cid,2170,1) == 0 then
                elseif doPlayerRemoveItem(cid,2171,1) == 0 then
                elseif doPlayerRemoveItem(cid,2172,1) == 0 then
                elseif doPlayerRemoveItem(cid,2161,1) == 0 then
          elseif doPlayerAddItem(cid,2197,1) == 0 then
                    selfSay('change the amulet\'s for one elemental necklace sucessfull.')
                else
                    selfSay('change the amulet\'s for one elemental necklace sucessfull.')
                end
            end
            talk_state = 0


        elseif msgcontains(msg, 'spirit elemental necklace') then
            selfSay('You change a need a Ialamar, frozzen, sickness, Samantha, Mastafar, priest and eletric, change for a Spirit Elemental amulet?')
            talk_state = 5

        elseif talk_state == 5 then
            if msgcontains(msg, 'yes') then
            if doPlayerRemoveItem(cid,2129,1) == 0 then
                elseif doPlayerRemoveItem(cid,2199,1) == 0 then
                elseif doPlayerRemoveItem(cid,2135,1) == 0 then
                elseif doPlayerRemoveItem(cid,2126,1) == 0 then
                elseif doPlayerRemoveItem(cid,2131,1) == 0 then
                elseif doPlayerRemoveItem(cid,2130,1) == 0 then
                elseif doPlayerRemoveItem(cid,2133,1) == 0 then
        elseif doPlayerAddItem(cid,2173,1) == 0 then
                    selfSay('change the amulet\'s for one spirit elemental necklace sucessfull.')
                else
                    selfSay('change the amulet\'s for one spirit elemental necklace sucessfull.')
                end
            end
            talk_state = 0

        elseif msgcontains(msg, 'magic elemental amulet') then
            selfSay('You change a Merlian, relic of the hell, Broonier, Thordain, dark wyzard, angel and gaya,change all for Elemental magic amulet?')
            talk_state = 6

        elseif talk_state == 6 then
            if msgcontains(msg, 'yes') then
            if doPlayerRemoveItem(cid,2138,1) == 0 then
                elseif doPlayerRemoveItem(cid,2139,1) == 0 then
                elseif doPlayerRemoveItem(cid,2142,1) == 0 then
                elseif doPlayerRemoveItem(cid,2200,1) == 0 then
                elseif doPlayerRemoveItem(cid,2196,1) == 0 then
                elseif doPlayerRemoveItem(cid,2132,1) == 0 then
                elseif doPlayerRemoveItem(cid,2136,1) == 0 then
        elseif doPlayerAddItem(cid,2125,1) == 0 then
                    selfSay('change the amulet\'s for one elemental magic amulet sucessfull.')
                else
                    selfSay('change the amulet\'s for one elemental magic amulet sucessfull.')
                end
            end
            talk_state = 0

        elseif msgcontains(msg, 'bless') or msgcontains(msg, 'blessing') then
        getPlayerBlessing(cid,1)
        getPlayerBlessing(cid,2)
        getPlayerBlessing(cid,3)
        getPlayerBlessing(cid,4)
        getPlayerBlessing(cid,5)
            selfSay('deseja compra o bless ?')
            talk_state = 7

        elseif talk_state == 7 then
            if msgcontains(msg, 'yes') then
            if pay(cid,1000000) then
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
            doPlayerAddBlessing(cid, 4)
            doPlayerAddBlessing(cid, 5)
            doPlayerSendTextMessage(cid,22,"Você recebeu a benção de Isolda.")
                else
                    selfSay('Desculpe, mas voce não tem Ruby Coin suficiente.')
                end
            end
            talk_state = 0
            
            elseif msgcontains(msg, 'reset') then
            selfSay('You realy want reset your character?')
            talk_state = 8

        elseif msgcontains(msg, 'yes') then
             if getPlayerVocation(cid) < 13 then
                 selfSay('Sorry, only gods can reset.')
                 talk_state = 0
             elseif getPlayerLevel(cid) < 500 then
                selfSay('Sorry, you need level 500 to reset your character.')
                talk_state = 0
            elseif not isPremium(cid) then
                selfSay('Sorry, you must be premium to reset.')
                talk_state = 0
            elseif doPlayerRemoveItem(cid,13685,50) == 1 then
                doPlayerAddExp(cid, -1800000000)
                doSendAnimatedText(getPlayerPosition(cid), "Reseted", TEXTCOLOR_LIGHTGREEN)
                doSendMagicEffect(getPlayerPosition(cid),14)
                doPlayerSendTextMessage(cid,21,"You are returned to level 8.")
                talk_state = 0
            else
                selfSay('You dont have money for reset your character.')
                talk_state = 1
            end

            talk_state = 0
            

    elseif msgcontains(msg, 'offer') then
                selfSay('I can do an element item or energyze your element item, i only need all "necklace", "amulet" ou "magics" amulet, also can bless a little mortal and reset a god!')

        elseif msgcontains(msg, 'necklace') then
                selfSay('I only need a mysterious, dragon breath, scorpion, platinum, fluids and vampire tooth, accept change all for a Elemental necklace?')
        elseif msgcontains(msg, 'amulet') then
                selfSay('I only need a Ialamar, frozzen, sickness, Samantha, Mastafar, priest and eletric, accept change all for a Spirit Elemental amulet?')
        elseif msgcontains(msg, 'magics') then
                selfSay('I only need a Merlian, relic of the hell, Broonier, Thordain, dark wyzard, angel and gaya, accept change all for a Elemental magic amulet?')


                
          elseif msgcontains(msg, 'bye')  and getDistanceToCreature(cid) < 4 then
              selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
              focus = 0
              talk_start = 0
          end
      end


function onCreatureChangeOutfit(creature)

end


function onThink()
    doNpcSetCreatureFocus(focus)
      if (os.clock() - talk_start) > 30 then
          if focus > 0 then
              selfSay('Next Please...')
          end
              focus = 0
      end
     if focus ~= 0 then
         if getDistanceToCreature(focus) > 5 then
             selfSay('Good bye then.')
             focus = 0
         end
     end
end
end

mas nao volta a exp :/ aparece "reseted" "you returned to level 8" pega o money mas nao volta o level nem tira a exp

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

Tem que testar se o seu está como:

doPlayerAddExp

ou

doPlayerAddExperience

 

Teste o dois modos..

Lembre-se de que não é bom por para remover este número enorme de experiência, e sim usar o modo que checa quanto o player tem e remove o necessário.

 

Editei o meu post, teste-o novamente.

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites

é doplayeraddexp, mas da valor invalido, com o "getPlayerExperience" / como se nao tivesse essa função / nem getPlayerExp

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

opa eu tenho uma isolda aki mais não sei como edita para ela reseta


--------------------------------------------------------------------------------------------
------------------------------------ Advanced Addon NPC ------------------------------------
-------------------------------- Script made by teh_pwnage ---------------------------------
--------------- Special thanks to: mokerhamer, Xidaozu and Jiddo, deaths'life --------------
------------------------------- Thanks also to everyone else -------------------------------
------------------------------ NPC based on Evolutions V0.7.7 ------------------------------
--------------------------------------------------------------------------------------------

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

function creatureSayCallback(cid, type, msg)
	-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
	if(npcHandler.focus ~= cid) then
		return false
	end

	preco = getPlayerLevel(cid)*3
    	bless = getPlayerBlessing(cid,1)
	vezes = getPlayerStorageValue(cid,7777)
	rubys = (getPlayerLevel(cid)*4000)*(vezes*30*2)/1000000
	
		if msgcontains(msg, 'necklace') then
			selfSay('I only need a mysterious, dragon breath, scorpion, platinum, fluids and vampire tooth, accept change all for a Elemental necklace?')
			talk_state = 1

		elseif msgcontains(msg, 'amulet') then
			selfSay('I only need a Ialamar, frozzen, sickness, Samantha, Mastafar, priest and eletric, accept change all for a Spirit Elemental amulet?')
			talk_state = 2

		elseif msgcontains(msg, 'magic') then
			selfSay('I only need a Merlian, relic of the hell, Broonier, Thordain, dark wyzard, angel and gaya, accept change all for a Elemental magic amulet?')
			talk_state = 3

		elseif msgcontains(msg, 'energyze') then
			selfSay('I can energyze your necklace for 50k, amulet for 100k or your magic amulet for 150k, do you want energyze?')
			talk_state = 4

		elseif msgcontains(msg, 'bless') or msgcontains(msg, 'blessing') then
			selfSay('Bless a mortal? Hmm... Sure I can bless, but it will not be cheap, what do you say about ' .. preco .. 'k?')
			talk_state = 5

		elseif msgcontains(msg, 'reset') then
		if vezes == -1 or vezes == 0 then
			selfSay('Reset a god? Hmm... First time? Ok, i will do it free this time!')
			talk_state = 6
		else
			selfSay('Reset a god? Hmm... Sure I can, but it will not be cheap, what do you say about ' .. rubys .. ' ruby coins?')
			talk_state = 6
		end


		elseif msgcontains(msg, 'job') then
			selfSay('I am a servent of Merlian!')

		elseif msgcontains(msg, 'offer') then
			selfSay('I can do an element item or energyze your element item, i only need all "necklace", "amulet" ou "magic" amulet, also can bless a little mortal and reset a god!')

		elseif msgcontains(msg, 'sell') then
			selfSay('I am not a merchant!')

		elseif msgcontains(msg, 'buy') then
			selfSay('I am not a merchant!')

		elseif msgcontains(msg, 'quest') then
			selfSay('Ha! You are only a novice!')

		elseif msgcontains(msg, 'mission') then
			selfSay('Ha! You are only a novice!')

-- neck
	elseif talk_state == 1 then
	if msgcontains(msg, 'yes') then
		if getPlayerItemCount(cid,2198) >= 1 and getPlayerItemCount(cid,2161) >= 1 and getPlayerItemCount(cid,2170) >= 1 and getPlayerItemCount(cid,2171) >= 1 and getPlayerItemCount(cid,2172) >= 1 and getPlayerItemCount(cid,2201) >= 1 then
			selfSay('Its all yours!')
			doPlayerSendTextMessage(cid,22,"Voce recebeu um Elemental necklace.")
  			doSendMagicEffect(getPlayerPosition(cid),12)
			doPlayerTakeItem(cid,2198,1)
			doPlayerTakeItem(cid,2161,1)
			doPlayerTakeItem(cid,2170,1)
			doPlayerTakeItem(cid,2171,1)
			doPlayerTakeItem(cid,2172,1)
			doPlayerTakeItem(cid,2201,1)
			doPlayerAddItem(cid,2197,1)
			talk_state = 0
			else
			selfSay('You dont have this itens!')
			talk_state = 0
			end
		end
-- amulet

	elseif talk_state == 2 then
	if msgcontains(msg, 'yes') then
		if getPlayerItemCount(cid,2129) >= 1 and getPlayerItemCount(cid,2133) >= 1 and getPlayerItemCount(cid,2130) >= 1 and getPlayerItemCount(cid,2199) >= 1 and getPlayerItemCount(cid,2135) >= 1 and getPlayerItemCount(cid,2126) >= 1 and getPlayerItemCount(cid,2131) >= 1 then
			selfSay('Its all yours!')
			doPlayerSendTextMessage(cid,22,"Voce recebeu um Spirit Elemental amulet.")
  			doSendMagicEffect(getPlayerPosition(cid),12)
			doPlayerTakeItem(cid,2129,1)
			doPlayerTakeItem(cid,2133,1)
			doPlayerTakeItem(cid,2130,1)
			doPlayerTakeItem(cid,2199,1)
			doPlayerTakeItem(cid,2135,1)
			doPlayerTakeItem(cid,2126,1)
			doPlayerTakeItem(cid,2131,1)
			doPlayerAddItem(cid,2173,1)
			talk_state = 0
			else
			selfSay('You dont have this itens!')
			talk_state = 5
			end
		end

	elseif talk_state == 3 then
	if msgcontains(msg, 'yes') then
		if getPlayerItemCount(cid,2218) >= 1 and getPlayerItemCount(cid,2142) >= 1 and getPlayerItemCount(cid,2132) >= 1 and getPlayerItemCount(cid,2136) >= 1 and getPlayerItemCount(cid,2138) >= 1 and getPlayerItemCount(cid,2200) >= 1 and getPlayerItemCount(cid,2196) >= 1 then
			selfSay('Its all yours!')
			doPlayerSendTextMessage(cid,22,"Voce recebeu um Elemental magic amulet.")
  			doSendMagicEffect(getPlayerPosition(cid),12)
			doPlayerTakeItem(cid,2218,1)
			doPlayerTakeItem(cid,2142,1)
			doPlayerTakeItem(cid,2132,1)
			doPlayerTakeItem(cid,2136,1)
			doPlayerTakeItem(cid,2138,1)
			doPlayerTakeItem(cid,2200,1)
			doPlayerTakeItem(cid,2196,1)
			doPlayerAddItem(cid,2125,1)
			talk_state = 0
			else
			selfSay('You dont have this itens!')
			talk_state = 5
			end
		end
-- energ

	elseif talk_state == 4 then
	if msgcontains(msg, 'yes') and getPlayerItemCount(cid,2197) >= 1 then
		if pay(cid,50000) then
			selfSay('Its all yours!')
			doPlayerSendTextMessage(cid,22,"Voce recebeu Energizou seu Elemental necklace.")
  			doSendMagicEffect(getPlayerPosition(cid),12)
			doPlayerTakeItem(cid,2197,1)
			doPlayerAddItem(cid,13682,1)
			talk_state = 0
			else
			selfSay('You dont have this money!')
			talk_state = 0
			end

	elseif msgcontains(msg, 'yes') and getPlayerItemCount(cid,2173) >= 1 then
		if pay(cid,100000) then
			selfSay('Its all yours!')
			doPlayerSendTextMessage(cid,22,"Voce recebeu Energizou seu Spirit Elemental amulet.")
  			doSendMagicEffect(getPlayerPosition(cid),12)
			doPlayerTakeItem(cid,2173,1)
			doPlayerAddItem(cid,13683,1)
			talk_state = 0
			else
			selfSay('You dont have this money!')
			talk_state = 0
			end

	elseif msgcontains(msg, 'yes') and getPlayerItemCount(cid,2125) >= 1 then
		if pay(cid,150000) then
			selfSay('Its all yours!')
			doPlayerSendTextMessage(cid,22,"Voce recebeu Energizou seu Elemental magic amulet.")
  			doSendMagicEffect(getPlayerPosition(cid),12)
			doPlayerTakeItem(cid,2125,1)
			doPlayerAddItem(cid,13684,1)
			talk_state = 0
			else
			selfSay('You dont have this money!')
			talk_state = 0
			end

	elseif msgcontains(msg, 'yes') and getPlayerItemCount(cid,2197) >= 0 and getPlayerItemCount(cid,2125) >= 0 and getPlayerItemCount(cid,2173) >= 0 then
			selfSay('You dont have this item!')
			talk_state = 0



		end

-- bless

	elseif talk_state == 5 then
	if msgcontains(msg, 'yes') then
	if bless then
		selfSay('You are already blessed my little mortal.')
		talk_state = 0
		else
        if isPremium(cid) then
	if pay(cid,preco*1000) then
		selfSay('Receive this bless mortal, with the gods touch i bless you!')
		doPlayerSendTextMessage(cid,22,"Voce recebeu a benção de Isolda.")
                doPlayerAddBlessing(cid, 1)
                doPlayerAddBlessing(cid, 2)
  		doSendMagicEffect(getPlayerPosition(cid),12)
		talk_state = 0
		else
		selfSay('Sorry mortal, but you dont have this monney!')
		talk_state = 0
		end
		else
		selfSay('Sorry but only can bless a mortal premmy.')
		talk_state = 0
		end

		end
		end

-- reset

	elseif talk_state == 6 then
	--rubys = (getPlayerLevel(cid)*4000)*(vezes*10)/1000000)
	if msgcontains(msg, 'yes') then
        if isPremium(cid) then
        if getPlayerLevel(cid) >= 400 then
        if getPlayerVocation(cid) >= 9 then
	--if pay(cid,(getPlayerLevel(cid)*4000)*(vezes*10)) then
	

        if getPlayerVocation(cid) == 13 then	-- deuses
        if getPlayerLevel(cid) >= 500 then
	if getPlayerItemCount(cid,13685) >= rubys then
		selfSay('Welcome new god!')
		doPlayerSendTextMessage(cid,22,"Você resetou seu personagem.")
		health = getCreatureMaxHealth(cid)
		mana = getCreatureMaxMana(cid)
		doPlayerAddExp(cid,-10000000000)
		doCreatureChangeMaxHealth(cid, (health/10)*(vezes+1))
		doCreatureAddHealth(cid,(health/10)*(vezes+1))
		doCreatureChangeMaxMana(cid, (mana/15)*(vezes+1))
		doPlayerAddMana(cid,(mana/15)*(vezes+1))
		doPlayerMagicLevel(cid,25)
  		doSendMagicEffect(getPlayerPosition(cid),12)
		setPlayerStorageValue(cid,7777,vezes+1)
		doPlayerTakeItem(cid,13685,rubys)
		talk_state = 0
		else
		selfSay('Sorry mortal, but you dont have this monney!')
		talk_state = 0
		end
		else
		selfSay('Sorry, but only gods level 500 or above can do that!')
		talk_state = 0
		end
	end
        if getPlayerVocation(cid) == 14 then
        if getPlayerLevel(cid) >= 500 then
	if getPlayerItemCount(cid,13685) >= rubys then
		selfSay('Welcome new god!')
		doPlayerSendTextMessage(cid,22,"Você resetou seu personagem.")
		health = getCreatureMaxHealth(cid)
		mana = getCreatureMaxMana(cid)
		doPlayerAddExp(cid,-10000000000)
		doCreatureChangeMaxHealth(cid, (health/10)*(vezes+1))
		doCreatureAddHealth(cid,(health/10)*(vezes+1))
		doCreatureChangeMaxMana(cid, (mana/15)*(vezes+1))
		doPlayerAddMana(cid,(mana/15)*(vezes+1))
		doPlayerMagicLevel(cid,25)
  		doSendMagicEffect(getPlayerPosition(cid),12)
		setPlayerStorageValue(cid,7777,vezes+1)
		doPlayerTakeItem(cid,13685,rubys)
		talk_state = 0
		else
		selfSay('Sorry mortal, but you dont have this monney!')
		talk_state = 0
		end
		else
		selfSay('Sorry, but only gods level 500 or above can do that!')
		talk_state = 0
		end
	end
        if getPlayerVocation(cid) == 15 then
        if getPlayerLevel(cid) >= 500 then
	if getPlayerItemCount(cid,13685) >= rubys then
		selfSay('Welcome new god!')
		doPlayerSendTextMessage(cid,22,"Você resetou seu personagem.")
		health = getCreatureMaxHealth(cid)
		mana = getCreatureMaxMana(cid)
		doPlayerAddExp(cid,-10000000000)
		doCreatureChangeMaxHealth(cid, (health/10)*(vezes+1))
		doCreatureAddHealth(cid,(health/10)*(vezes+1))
		doCreatureChangeMaxMana(cid, (mana/10)*(vezes+1))
		doPlayerAddMana(cid,(mana/10)*(vezes+1))
		doPlayerMagicLevel(cid,5)
		doPlayerAddSkill(cid,4,25)
		doPlayerAddSkill(cid,5,25)
  		doSendMagicEffect(getPlayerPosition(cid),12)
		setPlayerStorageValue(cid,7777,vezes+1)
		doPlayerTakeItem(cid,13685,rubys)
		talk_state = 0
		else
		selfSay('Sorry mortal, but you dont have this monney!')
		talk_state = 0
		end
		else
		selfSay('Sorry, but only gods level 500 or above can do that!')
		talk_state = 0
		end
	end

        if getPlayerVocation(cid) == 16 then
        if getPlayerLevel(cid) >= 500 then
	if getPlayerItemCount(cid,13685) >= rubys then
		selfSay('Welcome new god!')
		doPlayerSendTextMessage(cid,22,"Você resetou seu personagem.")
		health = getCreatureMaxHealth(cid)
		mana = getCreatureMaxMana(cid)
		doPlayerAddExp(cid,-10000000000)
		doCreatureChangeMaxHealth(cid, (health/10)*(vezes+1))
		doCreatureAddHealth(cid,(health/10)*(vezes+1))
		doCreatureChangeMaxMana(cid, (mana/10)*(vezes+1))
		doPlayerAddMana(cid,(mana/10)*(vezes+1))
		doPlayerAddSkill(cid,0,25)
		doPlayerAddSkill(cid,1,25)
		doPlayerAddSkill(cid,2,25)
		doPlayerAddSkill(cid,3,25)
		doPlayerAddSkill(cid,5,25)
  		doSendMagicEffect(getPlayerPosition(cid),12)
		setPlayerStorageValue(cid,7777,vezes+1)
		doPlayerTakeItem(cid,13685,rubys)
		talk_state = 0
		else
		selfSay('Sorry mortal, but you dont have this monney!')
		talk_state = 0
		end
		else
		selfSay('Sorry, but only gods level 500 or above can do that!')
		talk_state = 0
		end
	end

	if getPlayerStorageValue(cid,7777) <= 0 and getPlayerVocation(cid) >= 13 and getPlayerLevel(cid) >= 500 then
		setPlayerStorageValue(cid,7777,1)
	end
	
        if getPlayerVocation(cid) >= 9 and getPlayerVocation(cid) < 13 then	-- semis
	if getPlayerItemCount(cid,6500) >= 1000 then
		selfSay('Oh! Now you are a god!')

        	if getPlayerVocation(cid) >= 9 and getPlayerVocation(cid) < 11 then
		doPlayerMagicLevel(cid,10)
		end
        	if getPlayerVocation(cid) == 11 then
		doPlayerMagicLevel(cid,2)
		doPlayerAddSkill(cid,4,10)
		doPlayerAddSkill(cid,5,10)
		end
        	if getPlayerVocation(cid) == 12 then
		doPlayerAddSkill(cid,0,10)
		doPlayerAddSkill(cid,1,10)
		doPlayerAddSkill(cid,2,10)
		doPlayerAddSkill(cid,3,10)
		doPlayerAddSkill(cid,5,10)
		end

		doPlayerSendTextMessage(cid,22,"Você evoluiu seu espírito a Deus.")
		doPlayerAddExp(cid,-10000000000)
		doCreatureChangeMaxHealth(cid,185)
		doCreatureAddHealth(cid,185)
		doCreatureChangeMaxMana(cid,35)
		doPlayerAddMana(cid,35)
		doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
  		doSendMagicEffect(getPlayerPosition(cid),12)
		doPlayerTakeItem(cid,6500,100)
		talk_state = 0

		else
		selfSay('Sorry, but you dont have the 100 demoniac essense!')
		talk_state = 0
		end
	end

		else
		selfSay('Sorry, but only gods i can do that!')
		talk_state = 0
		end
		else
		selfSay('Sorry, but only gods level 500 or above can do that!')
		talk_state = 0
		end
		else
		selfSay('Sorry but only can reset a god premmy.')
		talk_state = 0
		end

		end
		--end

------------------------------------------------ confirm no ------------------------------------------------
		elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 34) then
			selfSay('Ok than.')
			talk_state = 0
		end
	-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
	return true
end

function teste(cid)

end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Link para o post
Compartilhar em outros sites

isso nunca vai funcionar em 7.92 se nao colocar as funções na sua distro.. isso requer compilação, porque essas funções são de 8.1 +

Link para o post
Compartilhar em outros sites

O tópico foi movido para a área correta, preste mais atenção da próxima vez!

Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

Este tópico foi movido:

De: "OTServScriptingMonsters e NPCs"

Para: "OTServSuporte OTServSuporte de Scripts"

Bruno de Carvalho Câmara / Administrador TibiaKing

[email protected]


 

btn_donateCC_LG.gif

 

Em 26/12/2016 em 03:47, Spraypaint disse:

A força da alienação vem dessa fragilidade dos indivíduos, quando apenas conseguem identificar o que os separa e não o que os une.

-miltinho

 

wMwSJFE.png?1

 

Link para o post
Compartilhar em outros sites

E creio que para adicionar estas funções, nem seja tão difícil, pois são poucas novas.

Basta alguém que saiba, pois em C++ só sei onde fica a parte principal de Códigos em LUA, mas nem sei onde mais precisará adicionar as "tags".

E é claro, tem que ter o server descompilado e dosponível para editar.

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites
  • 4 years later...

Alguém conseguiu copilar essas funções? poderia passa o executável. 

Preciso destas funções:

doPlayerAddExperience
doPlayerSetMaxCapacity
setPlayerMaxHealth
setPlayerMaxMana
getPlayerHealth
getPlayerExperience

Editado por BrunoLeo (veja o histórico de edições)
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