English Tibia level+money

41 replies
Goto Page
To the start Previous 1 2 3 Next To the start
29.08.13 05:43:29 pm
Up
Necr0
User
Offline Off
instructions >

This should work, the effects expire after the durations run off or the player leaves.
It's not stackable. Drinking another potion will reset the duration.
Only one potion type can be active. That means:
     If you drink a double exp potion and a tripple exp potion only the tripple exp potion has an effect
29.08.13 06:32:27 pm
Up
Jarates
User
Offline Off
How to add admin color+vip color in the chat? and command !text to enable and to disable please
If I edit the exp function I delete my image

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
function addexp(id, exp)
     local paths={"gfx/level_up_x.png","gfx/level_up_d.png"}          --edit
      local positions={{s={320,40},e={320,170}},{s={320,240},e={320,240}}}                                                 --edit
      local rotations={{s=0,e=0},{s=0,e=200}}                                                                           --edit
      local scales={{s={1.0,1.0},e={0.5,0.5}},{s={0.8,0.8},e={0,0}}}                                        --edit     
     local dtime=4000                                                                                                  --edit 1500ms=1.5s
     PLAYERS[id].Experience = PLAYERS[id].Experience + exp
     local prevlevel = PLAYERS[id].Level
     while PLAYERS[id].Experience >= EXPTABLE[PLAYERS[id].Level+1] do
          PLAYERS[id].Level = PLAYERS[id].Level + 1
     end
     if prevlevel ~= PLAYERS[id].Level then
          parse('effect "colorsmoke" ' .. player(id, 'x') .. ' ' .. player(id, 'y') .. ' 0 64 0 128 255')
          message(id, "You have leveled up to level " .. PLAYERS[id].Level .. "!")
          parse("sv_sound2 " .. id .. " fun/Victory_Fanfare.ogg")
          imgids={image(paths[1],positions[1]["s"][1],positions[1]["s"][2],2,id),image(paths[2],positions[2]["s"][1],positions[2]["s"][2],2,id)}
            imagepos(imgids[1],positions[1]["s"][1],positions[1]["s"][2],rotations[1]["s"])
            imagepos(imgids[2],positions[2]["s"][1],positions[2]["s"][2],rotations[2]["s"])
            imagescale(imgids[1],scales[1]["s"][1],scales[1]["s"][2])
            imagescale(imgids[2],scales[2]["s"][1],scales[2]["s"][2])
          tween_move(imgids[1],dtime,positions[1]["e"][1],positions[1]["e"][2])
          tween_move(imgids[2],dtime,positions[2]["e"][1],positions[2]["e"][2])
            tween_rotate(imgids[1],dtime,rotations[1]["e"])
            tween_rotate(imgids[2],dtime,rotations[2]["e"])
            tween_scale(imgids[1],dtime,scales[1]["e"][1],scales[1]["e"][2])
            tween_scale(imgids[2],dtime,scales[2]["e"][1],scales[2]["e"][2])
          timer(dtime,"freeimage",imgids[1])
          timer(dtime,"freeimage",imgids[2])
     end
     updateHUD(id)
     return true
end
edited 1×, last 29.08.13 07:45:24 pm
To the start Previous 1 2 3 Next To the start