GarQet
Own3d!
- Joined
- Feb 10, 2009
- Messages
- 1,381
- Solutions
- 14
- Reaction score
- 81
Hello OTlanders. I got small request. I don't how to create one additional to my script.
I got this:
And now:
I want this: If player is named GarQet then script took information from table a assigned to the number of which was the name of the table b.
So, If GarQet (from table B) then 0 (from table A).
If creature is named Script (from table B) then 55 (from table A).
Someone understand my request and can help me in this?
I got this:
LUA:
local a = {0, 10, 55}
local b = {"GarQet", "Otland", "Script"}
local l = 0
LUA:
for v = 1, 3 do
if getCreatureName(cid) == b[v] then
l = a[v]
end
end
doPlayerAddLevel(cid, l)
So, If GarQet (from table B) then 0 (from table A).
If creature is named Script (from table B) then 55 (from table A).
Someone understand my request and can help me in this?