Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 2305 306 307338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Fehu
User Off Offline

Quote
Kostyan1996 has written
Say me plz, what im doing wrong?
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


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

old Re: Lua Scripts/Questions/Help

Glix
User Off Offline

Quote
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

old Re: Lua Scripts/Questions/Help

RyceR
User Off Offline

Quote
try change
1
2
3
addhook("say","tele") <----no work
function tele(id,txt)
if txt == "!menu" then <----no work
to
1
2
3
addhook("say","teleporter")
function teleporter(id,txt)
if(txt=="!menu") then

old Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Quote
RyceR has written
try change
1
2
3
addhook("say","tele") <----no work
function tele(id,txt)
if txt == "!menu" then <----no work
to
1
2
3
addhook("say","teleporter")
function teleporter(id,txt)
if(txt=="!menu") then


no, it works with any names, the problem is
1
function tele(id,txt)
change to
1
function tele(id,txt,b)

old Healing gun..

Yates
Reviewer Off Offline

Quote
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..

old Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Quote
lol( not tabbed, on ipod)

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

old Re: Lua Scripts/Questions/Help

Ethan3348
User Off Offline

Quote
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

old Re: Lua Scripts/Questions/Help

byengul
User Off Offline

Quote
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:
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

old Re: Lua Scripts/Questions/Help

Banaan
User Off Offline

Quote
Ethan3348 has written
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


1
parse("kick "..id)
Search the logs for errors next time.

old .YeaH.

FiiD
User Off Offline

Quote
•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...

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
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

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

old Re: Lua Scripts/Questions/Help

Yates
Reviewer Off Offline

Quote
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:
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

old Re: Lua Scripts/Questions/Help

Rainoth
Moderator Off Offline

Quote
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 >

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
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)

old Re: Lua Scripts/Questions/Help

Rainoth
Moderator Off Offline

Quote
what do you mean founded ?
Spoiler >


Should be like this ?

old Re: Lua Scripts/Questions/Help

FiiD
User Off Offline

Quote
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...

old Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Quote
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 2305 306 307338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview