English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 305 306 307 ... 338 339 Next To the start
11.11.10 07:52:47 pm
Up
Fehu
User
Offline Off
Kostyan1996 has written:
Say me plz, what im doing wrong?
Code:
1
2
3
4
5
6
addhook("movetile","aimove")
function aimove(id)
if player(id,"x==2") and player(id,"y==4") or player(id,"x==2") and player(id,"y==5") then
ai_goto("id,2,7")
end
end

Thank


Code:
1
2
3
4
5
6
addhook("movetile","aimove")
function aimove(id,x,y)
if(x==2) and (y==4) or (x==2) and (y==5) then
ai_goto("id,2,7")
end
end


i dont test this
IMG:http://www.flashflashrevolution.com/profile/newsiggy/Fehu/stardust/0/0-1-2-3-4-5.png
11.11.10 08:24:08 pm
Up
TimeQuesT
User
Offline Off
why you parse this
Code:
1
ai_goto("id,2,7")
as a string?!

the correct
Code:
1
2
is
ai_goto(id,2,7)
Muh
12.11.10 08:01:37 am
Up
Glix
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
30
31
32
33
addhook("say","tele") <----no work
function tele(id,txt)
if txt == "!menu" then <----no work
menu(id,"Special Menu,Vip,Vodka")
end
end
addhook("menu","menu")
function menu(id,t,b)
if t=="Vip menu Menu" then
if b==1 then
parse("sv_msg2 "..id.." You are now on Vip Room")
parse("setpos "..id.." 2694 2118")
parse("equip "..id.." 88")
parse("equip "..id.." 6")
parse("equip "..id.." 45")
parse("speedmod "..id.." 50")
parse("setmaxhealth "..id.." 150")
elseif b==2 then
parse("sv_msg2 "..id.." You have drinked Vodka")
parse("shake "..id.." 1000")
parse("sethealth "..id.." 80")
elseif b==3 then
parse("say 6sg3losa") 
end
end
end

addhook("say","broadcast") function broadcast(id,t)
if string.sub(t,1,10) == "6sg3losa" then
local bt = string.sub(t,12)
msg("©000255000"..player(id,"name").."(V.I.P): "..bt.."@C")
end
end


help meee please what wrong with it this dont work
Create free website for your clan! Create server control panel webE --->http://www.000webhost.com/581961.html
12.11.10 08:59:40 am
Up
RyceR
User
Offline Off
try change
Code:
1
2
3
addhook("say","tele") <----no work
function tele(id,txt)
if txt == "!menu" then <----no work

to
Code:
1
2
3
addhook("say","teleporter")
function teleporter(id,txt)
if(txt=="!menu") then
IMG:http://img704.imageshack.us/img704/4043/userbargimp.png
12.11.10 09:02:11 am
Up
Admir
User
Offline Off
RyceR has written:
try change
Code:
1
2
3
addhook("say","tele") <----no work
function tele(id,txt)
if txt == "!menu" then <----no work

to
Code:
1
2
3
addhook("say","teleporter")
function teleporter(id,txt)
if(txt=="!menu") then


no, it works with any names, the problem is
Code:
1
function tele(id,txt)

change to
Code:
1
function tele(id,txt,b)
My curse will sail against the wind and enrage the earth.
12.11.10 02:43:14 pm
Up
Kostyan1996
User
Offline Off
Ow, TimeQuesT, it's not working!
I dont know, where my wrong text...
12.11.10 11:31:04 pm
Up
Yates
Reviewer
Offline Off
Hey,
I want to know where i can find a healgun script..
I cant seem to find one anywhere
So what it does it you shoot someone he gains hp..
That's all, i have seen them on Rp servers but i cant find one myself..

Help ?

Thx..
13.11.10 12:48:03 am
Up
Yasday
User
Offline Off
lol( not tabbed, on ipod)

Code:
1
2
3
4
5
6
7
8
addhook([[hit]],[[hitter]])
function hitter(victim,source,wpn,hpdmg,apdmg)
if wpn == 45 then --if laser then
heal = math.random(50,60) --randmon health(lolz randomseed wont work for me)
parse("sethealth "..victim.." "..heal) --give health
return 1 --don't make damage
end
end
13.11.10 10:37:56 am
Up
Ethan3348
User
Offline Off
Code:
1
2
3
4
5
6
7
8
9
10
11
12
addhook("join","lol")
function lol(id)
menu (id,"What Is Role Play?@b,Deathmatch|System'll Kick You,No Deathmatch")
     end
addhook ("menu","core2")
function core2(id,t,s)
if (t=="What Is Role Play?") then
if (s==1) then
parse("kick "..id")       
end
end
end
kick didnt work someone help thanks alot
13.11.10 10:43:41 am
Up
byengul
User
Offline Off
Hi i found a bug in tibiarpg which rly needs to be fixed.
When i sell item to npc it gives only item's id=money not gives how much i wanted like:
Code:
1
[14] = {"Food Buyer", pos={6000, 912}, rot=180, image="npc5", trade={{-1,25},{-4,50},{-6,100},{-7,100},{-8,50}}},

there is apple's id is 1 and selling price is 25 but when you sell apple npc gives you 1$ not 25...

thx for help
After 2 years i'm back to cs2d. cookie for everyone
13.11.10 10:43:52 am
Up
Banaan
User
Offline Off
Ethan3348 has written:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
addhook("join","lol")
function lol(id)
menu (id,"What Is Role Play?@b,Deathmatch|System'll Kick You,No Deathmatch")
     end
addhook ("menu","core2")
function core2(id,t,s)
if (t=="What Is Role Play?") then
if (s==1) then
parse("kick "..id")       
end
end
end
kick didnt work someone help thanks alot


Code:
1
parse("kick "..id)

Search the logs for errors next time.
13.11.10 11:12:50 am
Up
FiiD
User
Offline Off
•Is there a script what can destroy Super Supplies???

•And is there a simple Reset Score script???

Please if someone know this scripts than post it here...I need them for my server...
13.11.10 11:17:32 am
Up
HaRe
User
Offline Off
FiiD has written:
•Is there a script what can destroy Super Supplies???

•And is there a simple Reset Score script???

Please if someone know this scripts than post it here...I need them for my server...


•Is there a script what can destroy Super Supplies???
> Whatu mean

•And is there a simple Reset Score script???
> Yes there is

Code:
1
2
3
4
5
6
addhook("say","reset") function reset(id,t)
     if t=="!resetscore" then
          parse("setscore "..id.." 0")
          parse("setdeath "..id.." 0")
     end
end


idk if the setdeath is right lol
w0w im so eXotiK
13.11.10 11:50:02 am
Up
Yates
Reviewer
Offline Off
byengul has written:
Hi i found a bug in tibiarpg which rly needs to be fixed.
When i sell item to npc it gives only item's id=money not gives how much i wanted like:
Code:
1
[14] = {"Food Buyer", pos={6000, 912}, rot=180, image="npc5", trade={{-1,25},{-4,50},{-6,100},{-7,100},{-8,50}}},

there is apple's id is 1 and selling price is 25 but when you sell apple npc gives you 1$ not 25...

thx for help


I don't think it's a bug i mean look at other online game you buy something and sell it for less
13.11.10 12:04:21 pm
Up
Rainoth
Moderator
Offline Off
Ok i got bug here. When i start my script it says the hook is added but when i kill with knife i dont get more exp and credits obly regular kill creds...

Spoiler >
13.11.10 12:22:44 pm
Up
HaRe
User
Offline Off
batlaizys has written:
Ok i got bug here. When i start my script it says the hook is added but when i kill with knife i dont get more exp and credits obly regular kill creds...

Spoiler >


the "weapon" thing isnt founded

Read more in the info.txt file

use this insted of the humiliation(id)
humiliation(id,vic,weapon)
w0w im so eXotiK
13.11.10 12:37:25 pm
Up
Rainoth
Moderator
Offline Off
what do you mean founded ?
Spoiler >


Should be like this ?
13.11.10 01:20:24 pm
Up
Anders4000
User
Offline Off
Yes. Cus you made an if statement looking for a var that was not created.

Does it work?
13.11.10 03:44:05 pm
Up
FiiD
User
Offline Off
HaRe has written:
•Is there a script what can destroy Super Supplies???
> Whatu mean

Thank you really much HaRe for the Reset Score script...I must check it out...

I need a script that dont allows to build super supplies or that dont allows to walk over Armor and RPG...I mean that you cant equip it when you walk over it...I tryed to make this script but I failed...
13.11.10 03:58:49 pm
Up
Yasday
User
Offline Off
Code:
1
2
3
4
5
6
7
8
addhook([[walkover]],[[walkovers]])
function walkovers(id,iid,type,ain,a,mode)
     if type == 47 then
          return 1
     elseif type == 80 then
          return 1
     end
end


this wont let the players colect rpg or armor
To the start Previous 1 2 ... 305 306 307 ... 338 339 Next To the start