English Tibia script thread (Post tibia requests here)

347 replies
Goto Page
To the start Previous 1 2 3 ... 17 18 Next To the start
23.01.12 01:38:18 am
Up
Fossil
User
Offline Off
user KenVo has written:
user Fossil has written:
Can sum1 make a god mode command for admins? Like !god or sumthing like that?


What do you mean by god mode? (Like can't get hurt or what?)
yeah
IMG:http://i42.tinypic.com/14t8pvm.png
23.01.12 02:07:41 am
Up
Kantos
BANNED
Offline Off
if u want u can make admin item like def 9999999999 and add equip 82, then u can hurt but ur lifes back and u cannot die
23.01.12 02:19:53 am
Up
KenVo
User
Offline Off
==admin.lua==
Alright. First put this:
Code:
1
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
Code:
1
2
3
4
elseif command =='v' then
     saveserver()
     msg2(id,'Saved server!')
     return 1


==hooks.lua==
Put this:
Code:
1
, god = 0


in: ( line 8 )
Code:
1
PLAYERS[id].tmp = {hp = 100, atk = 1, def = 1, spd = 0, usgn = player(id, "usgn"), equip = {}, exhaust = {}}


and this:
Code:
1
if PLAYERS[id].tmp.god == 1 then return 1 end


under:
Code:
1
2
addhook("hit","EXPhit")
function EXPhit(id,source,weapon,hpdmg,apdmg)


==monsters.lua==
Put this:
Code:
1
if PLAYERS[id].tmp.god == 1 then return end


Under:
Code:
1
function Monster:hit(id, dmg)



√ Use !g in game to get god mode
23.01.12 02:26:57 am
Up
Kantos
BANNED
Offline Off
kenvo do u know how to what restart level just from 50 lvl on npc ?:D
23.01.12 02:32:18 am
Up
KenVo
User
Offline Off
user Kantos has written:
kenvo 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?
23.01.12 02:36:53 am
Up
Kantos
BANNED
Offline Off
like if u are 50 lv then u reset ur level and get 10000$
23.01.12 02:48:02 am
Up
Fossil
User
Offline Off
Cool, thanks man!
IMG:http://i42.tinypic.com/14t8pvm.png
23.01.12 03:11:39 am
Up
KenVo
User
Offline Off
==npcs.lua==
Code:
1
[18] = {"Reset level", pos={464,560}, rot=0, image="npc3"},

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
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
23.01.12 08:31:31 am
Up
Fossil
User
Offline Off
Hey dude all these new function commands are great! I've got one last favor to ask.. how can I add this script: file cs2d PK script (5) to the tibia script?
IMG:http://i42.tinypic.com/14t8pvm.png
24.01.12 12:53:48 am
Up
KenVo
User
Offline Off
user Fossil has written:
Hey dude all these new function commands are great! I've got one last favor to ask.. how can I add this script: file cs2d PK script (5) 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
24.01.12 04:59:26 am
Up
Fossil
User
Offline Off
Okie okie...
IMG:http://i42.tinypic.com/14t8pvm.png
24.01.12 08:36:27 pm
Up
Kantos
BANNED
Offline Off
just find if choose == 1 then then chanche it with 3 then server.lua add pk.lua and press f4 to open it
25.01.12 05:09:04 am
Up
KenVo
User
Offline Off
What I have been working on:
IMG:http://img822.imageshack.us/img822/8038/rpgmapb00005.jpg

I'm going to make a "PK" system now
25.01.12 11:44:43 am
Up
Bobakrome
User
Offline Off
user Kantos has written:
just 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
Code:
1
if text == !pkmode
I think that should help -.-


PS - I'm at school so don't pm jsut after 4 hours i think
“Be the change that you wish to see in the world.”
25.01.12 03:23:24 pm
Up
Glix
User
Offline Off
How i can add new stats i mean
Code:
1
STATS = {'Experience', 'Level', 'Money', '..new..'},
After this where i need to add what stats does?
Create free website for your clan! Create server control panel webE --->http://www.000webhost.com/581961.html
25.01.12 04:25:23 pm
Up
KenVo
User
Offline Off
user Glix has written:
How i can add new stats i mean
Code:
1
STATS = {'Experience', 'Level', 'Money', '..new..'},
After this where i need to add what stats does?


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.
25.01.12 11:04:56 pm
Up
agash
BANNED
Offline Off
how to add points like after level u get 2 points and u can use them on stats like attack speed
26.01.12 07:40:17 am
Up
ChuixGee
User
Offline Off
Very Good idea to help many people with these lua errors

Q: i was looking a tibia script that it was really work in 1.1.9 or the lastest version
26.01.12 02:30:27 pm
Up
Glix
User
Offline Off
Make tutorial how to add new stats.
Create free website for your clan! Create server control panel webE --->http://www.000webhost.com/581961.html
26.01.12 03:29:50 pm
Up
Bobakrome
User
Offline Off
Xiatr, more stats would be impossible to do without deleting all players, there are 4 stats: Exp, Level, Money, Mana. But you can add simple attributes
“Be the change that you wish to see in the world.”
To the start Previous 1 2 3 ... 17 18 Next To the start