I got another problem :S
I have added level reset-er NPC, and it works but in the lua i have put this
1
PLAYERS[id].tmp = {hp = 100, atk = 1, def = 1, spd = 0, usgn = player(id, "usgn"), equip = {1250}, exhaust = {}}
Look at in equip... i have put 1250, it's the id of the items[Gift]
This will be gifted only for level rested players,
And i want to he keep the item,
Like he can't remove it or give it to another
P.S i want the same but like this:
First level reset : white little wings
2nd """"""""""""""" : blue little wings
3rd """"""""""""""" : multicolor little wings
etc...
and this is the whole lua
1
[41] = {"Reset level", pos={2699,1324}, rot=180, image="npc3"},
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
30
31
32
33
34
35
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
30
31
32
33
34
35
NPCs[41].func = function(npc, id, words, state) if words == "hi" then NPCspeak(npc, "Greetings! Say 'reset' if you need to reset your level for $1000000.") 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, "Please un-equip your items then say 'yes'.") PLAYERS[id].tmp.npcstate = {npc, 2} end elseif state == 2 then if contains(words, "yes") then if PLAYERS[id].Level >= 100 then addmoney(id, -1000000) message(id, "You have lost $1000000.", "255255255") PLAYERS[id].Equipment={} PLAYERS[id].tmp = {hp = 100, atk = 1, def = 1, spd = 0, usgn = player(id, "usgn"), equip = {1250}, exhaust = {}} PLAYERS[id].Level = 1 PLAYERS[id].Experience = 1 updateEQ(id, newitems, previtems) updateHUD(id) NPCspeak(npc, "Enjoy! Re-join after you reset your level.") PLAYERS[id].tmp.npcstate = nil else NPCspeak(npc, "You need to be level 100!") PLAYERS[id].tmp.npcstate = nil end elseif contains(words, "no") then NPCspeak(npc, "Alright then.") PLAYERS[id].tmp.npcstate = nil end end end
Thank you,
-playo.