Forum
Scripts
Tibia script thread (Post tibia requests here)Alright. First put this:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
elseif command =='g' then 	if PLAYERS[id].tmp.god ~= 1 then 		PLAYERS[id].tmp.god = 1 		msg2(id,'God mode on') 	else 		PLAYERS[id].tmp.god = 0 		msg2(id,'God mode off') 	end 	return 1
Under "return 1" in admin.lua around at line 182
1
2
3
4
2
3
4
elseif command =='v' then 	saveserver() 	msg2(id,'Saved server!') 	return 1
==hooks.lua==
Put this:
1
, god = 0
in: ( line 8 )
1
PLAYERS[id].tmp = {hp = 100, atk = 1, def = 1, spd = 0, usgn = player(id, "usgn"), equip = {}, exhaust = {}}
and this:
1
if PLAYERS[id].tmp.god == 1 then return 1 end
under:
1
2
2
addhook("hit","EXPhit")
function EXPhit(id,source,weapon,hpdmg,apdmg)
==monsters.lua==
Put this:
1
if PLAYERS[id].tmp.god == 1 then return end
Under:
1
function Monster:hit(id, dmg)
Use !g in game to get god mode
Kantos has writtenkenvo do u know how to what restart level just from 50 lvl on npc ?:D
What do you want to get after restart? If money then how much?
1
[18] = {"Reset level", pos={464,560}, rot=0, 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[18].func = function(npc, id, words, state)
	if words == "hi" then
		NPCspeak(npc, "Greetings! Say 'reset' if you need to reset your level for $10000.")
		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 >= 50 then
				addmoney(id, 10000)
				message(id, "You have gained $10000.", "255255255")
				PLAYERS[id].Equipment={}
				PLAYERS[id].tmp = {hp = 100, atk = 1, def = 1, spd = 0, usgn = player(id, "usgn"), equip = {}, 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 50!")
				PLAYERS[id].tmp.npcstate = nil
			end
		elseif contains(words, "no") then
			NPCspeak(npc, "Alright then.")
			PLAYERS[id].tmp.npcstate = nil
		end
	end
end
File does not exist (7827) to the tibia script?
Fossil has writtenHey dude all these new function commands are great! I've got one last favor to ask.. how can I add this script:
File does not exist (7827) to the tibia script?
File does not exist (7827) to the tibia script?A challenge for you: Remove the serveraction hook and create a command that turn on/off PK
I will make this script and show you how to do that eventually

I'm going to make a "PK" system now
Kantos has writtenjust find if choose == 1 then then chanche it with 3 then server.lua add pk.lua and press f4 to open it
Why not better to use an
1
if text == !pkmode
PS - I'm at school so don't pm jsut after 4 hours i think
1
STATS = {'Experience', 'Level', 'Money', '..new..'},
Glix has writtenHow i can add new stats i mean After this where i need to add what stats does?
1
STATS = {'Experience', 'Level', 'Money', '..new..'},
Try to add 'Mana' in that table, then see what happens. Also, you only can add the initial stats in PLAYERINIT = {} in configs.lua or else it won't work unless you delete all your players.lua saves because when someone join a game, only stuffs that been made in PLAYERINIT={} are saved to players.lua.
Q: i was looking a tibia script that it was really work in 1.1.9 or the lastest version
Tibia script thread (Post tibia requests here)


Offline