English buy exp script

4 replies
Goto Page
To the start Previous 1 Next To the start
17.08.12 12:26:55 pm
Up
berserk
User
Offline Off
help me to make script, where said rune, opening menu and select buy exp(10000$) and get random exp. Please HELP!!! Sorry for my bad English)
17.08.12 01:44:59 pm
Up
LuaNewBie
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
22
23
24
25
26
27
28
29
function initArray(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end

exps = initArray(32)

addhook("say","say")
function say(id,text)
if text == "!rune" then
     menu(id,"Rune,Buy EXP|10000$")
     return 1
     end
end

addhook("menu","menu")
function menu(id,title,button)
if title == "Rune" then
     if button == 1 then
          if (player(id,"money")>=10000) then
               parse("setmoney "..id.." "..player(id, "money") - 10000)
               exps[id]=exps[id]+math.random(1,99999)
               end
          end
     end
end


Like this ? , Untest and unoptimize

Edit 1 : Sorry , i didn't notice that checker
edited 1×, last 17.08.12 07:26:00 pm
17.08.12 03:08:08 pm
Up
omg
User
Offline Off
doesnt check to see if they have 10000 money
will code for food
17.08.12 03:11:33 pm
Up
Suprise
BANNED
Offline Off
Code:
1
if (player(id,"money")>=10000) then


Add this after the "if button == 1 then"
17.08.12 08:23:15 pm
Up
RedizGaming
GAME 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
function Array(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end

exp = Array(32,0)

addhook("serveraction","a")
function a(id,action)
     if action==1 then
          menu(id,"Buy Exp,5 XP|1K,205 EXP|5K")
     end
end

addhook("menu","b")
function b(id,title,button)
if title=="Buy Exp" then
if button==1 and player(id,"money")==1000 then
parse('setmoney '..id..' '..player(id,'money')-1000)
exp[id]=exp[id]+5
elseif button==2 and player(id,"money")==5000 then
parse('setmoney '..id..' '..player(id,'money')-5000)
exp[id]=exp[id]+205
end
end
end


@user berserk:
Never use HACKS/CHEATS , see my status. I used hack 2 times , 1 year ago... i get game banned for be a stupid guy
To the start Previous 1 Next To the start