Forum

> > CS2D > Scripts > Tibia RPG does not work on 1.2.0?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Tibia RPG does not work on 1.2.0?

4 replies
To the start Previous 1 Next To the start

old Re: Tibia RPG does not work on 1.2.0?

goldfish
GAME BANNED Off Offline

Quote
replace wrapper lua

with this
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
-------------------------------------------------------------------
-- Wrapper functions for easy usage of CS2D commands in Lua      --
-- 08.03.2009 - www.UnrealSoftware.de                            --
-------------------------------------------------------------------

-------------------------------------------------------------------
-- These functions make it easier to use CS2D commands in Lua    --
-- They call the parse functions with the fitting parameters     --
--                                                               --
-- Example without wrapper function:                             --
-- parse("spawnplayer "..id.." "..x.." " ..y)                    --
--                                                               --
-- Example with wrapper function:                                --
-- spawnplayer(id,x,y)                                           --
--                                                               --
-- Both examples do exactly the same but using the wrapper       --
-- function is much easier and not as error-prone as using parse.--
-- Therefore it is recommended to use the wrapper functions!     --
--                                                               --
-- Use the following line to include the wrapper:                --
-- if wrapper~=TRUE then dofile("sys/lua/wrapper.lua") end       --
-------------------------------------------------------------------

-- Wrapper loaded!
wrapper=TRUE

-- Kill a player
function killplayer(id)
	parse("killplayer "..id)
end

-- Spawn a player at a certain position
function spawnplayer(id,x,y)
	parse("spawnplayer "..id.." "..x.." "..y)
end

-- Set a player to a certain position
function setpos(id,x,y)
	parse("setpos "..id.." "..x.." "..y)
end

-- Set money
function setmoney(id,money)
	parse("setmoney "..id.." "..money)
end

-- Set health
function sethealth(id,health)
	parse("sethealth "..id.." "..health)
end

-- Set maximum health
function setmaxhealth(id,maxhealth)
	parse("setmaxhealth "..id.." "..maxhealth)
end

-- Set armor
function setarmor(id,armor)
	parse("setarmor "..id.." "..armor)
end

-- Set score
function setscore(id,score)
	parse("setscore "..id.." "..score)
end

-- Set deaths
function setdeaths(id,deaths)
	parse("setdeaths "..id.." "..deaths)
end

-- Equip a player with an item
function equip(id,itemtype)
	parse("equip "..id.." "..itemtype)
end

-- Remove an item from a player
function strip(id,itemtype)
	parse("strip "..id.." "..itemtype)
end

-- Modify speed of a player
function speedmod(id,value)
	parse("speedmod "..id.." "..value)
end

-- Spawn item on map
function spawnitem(itemtype,x,y)
	parse("spawnitem "..itemtype.." "..x.." "..y)
end

-- Remove item from map
function removeitem(itemid)
	parse("removeitem "..itemid)
end

-- Trigger entities
function trigger(name)
	parse("trigger "..name)
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview