English how to reset my lv in the tibia

9 replies
Goto Page
To the start Previous 1 Next To the start
Up
PlayerQ
User
Offline Off
Hello i need to reset my lv at the NPC
like this >

plese help and thank
13.10.13 04:47:52 am
Up
pbeloto
User
Offline Off
'-'

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[1] = {"Federigo", pos={2448 ,1331}, rot=0, image="npc3"}, 

NPCs[1].func = function(npc, id, words, state)
     if words == "hi" then
          NPCspeak(npc, "Do you want to reset your lvl?.")
          PLAYERS[id].tmp.npcstate = {npc, 1}
     elseif contains(words, "bye") then
          NPCspeak(npc,"Goodbye.")
          PLAYERS[id].tmp.npcstate = nil
     elseif state == 1 then
          if contains(words, "yes") then
               message(id, "You level reseted", "255255000")
               PLAYERS[id].Level = 0
               PLAYERS[id].Experience = 0
               PLAYERS[id].tmp.npcstate = nil
          elseif contains(words, "no") then
               NPCspeak(npc, "OK!, bye")
               PLAYERS[id].tmp.npcstate = nil
          end
     end
end



I no tested , have error? say me '-' , line error and line script
13.10.13 10:56:05 am
Up
Necr0
User
Offline Off
you should put all equiped items in the inventory of the player because they could still use weapon and armor they already equiped.
13.10.13 12:13:45 pm
Up
PlayerQ
User
Offline Off
@user pbeloto:
thank you but i cant see my 1 lv at HUD it is 2513 lv
but already i can be 1 lv but need rejoin sorry for my bad english
13.10.13 12:49:04 pm
Up
Necr0
User
Offline Off
you could also just kill a monster

and the fix:
More >
13.10.13 06:56:57 pm
Up
pbeloto
User
Offline Off
Fixed. no tested erro say me for pm or porst.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[1] = {"Federigo", pos={2448 ,1331}, rot=0, image="npc3"}, 

NPCs[1].func = function(npc, id, words, state)
     if words == "hi" then
          NPCspeak(npc, "Do you want to reset your lvl?.")
          PLAYERS[id].tmp.npcstate = {npc, 1}
     elseif contains(words, "bye") then
          NPCspeak(npc,"Goodbye.")
          PLAYERS[id].tmp.npcstate = nil
     elseif state == 1 then
          if contains(words, "yes") then
               message(id, "You level reseted", "255255000")
               PLAYERS[id].Level = 0
               PLAYERS[id].Experience = 0
               PLAYERS[id].tmp.npcstate = nil
               updateHUD(id)
          elseif contains(words, "no") then
               NPCspeak(npc, "OK!, bye")
               PLAYERS[id].tmp.npcstate = nil
          end
     end
end
13.10.13 07:00:41 pm
Up
Necr0
User
Offline Off
I already posted the exact same script about 6 hours ago. -.-
13.10.13 08:44:56 pm
Up
eduxd0707
BANNED
Offline Off
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
NPCs[31].func = function(npc, id, words, state)
     if words == "hi" then
          NPCspeak(npc, "Greetings! Say 'reset' if you need to reset your level.")
          PLAYERS[id].tmp.npcstate = {npc, 1}
     elseif contains(words, "bye") then
          NPCspeak(npc, "Goodbye.")
          PLAYERS[id].tmp.npcstate = nil
     elseif state == 1 then
          if contains(words, "reset") then
               NPCspeak(npc, "Would you like to reset your level for $10?")
               PLAYERS[id].tmp.npcstate = {npc, 2}     
          end
     elseif state == 2 then
          if contains(words, "yes") then
               if addmoney(id, -10) then
                    message(id, "You have lost $10.", "255255255")
                    PLAYERS[id].Level = 1
                    PLAYERS[id].Experience = 1
                    updateHUD(id)
                    NPCspeak(npc, "Enjoy!")
                    PLAYERS[id].tmp.npcstate = nil
               else
                    NPCspeak(npc, "Don't try to reset without paying!")
                    PLAYERS[id].tmp.npcstate = nil
               end
          elseif contains(words, "no") then
               NPCspeak(npc, "Alright then.")
               PLAYERS[id].tmp.npcstate = nil
          end
14.10.13 03:52:50 am
Up
PlayerQ
User
Offline Off
thank @user eduxd0707: but i fail your lua
then i thank @user pbeloto: the Hud can see my lv now
bye
14.12.13 10:07:12 pm
Up
Ryden
User
Offline Off
Oh easy metter man

go to cs2d folder
and
sys/lua/cs2dtibia/saves/players.lua

And search your usgn id and then in your usgn id line search experience and then put your experience to 0
And after search level and put it on 1

And save it and go to cs2d tada!

Enjoy!

Pm-For any tibia helps
To the start Previous 1 Next To the start