president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Hi folks! How I transform the script below to a table?
I give a shot on it, check the code below, but I need the "or" if don't have it, everyone can bug the experience.
Thanks for the support.
Code:
if item.uid == 2213 then
doPlayerAddExp(player:getId(),250000, true)
elseif item.uid == 4015 or item.uid == 4016 or item.uid == 4017 or item.uid == 4018 then
doPlayerAddExp(player:getId(), 150000, true)
elseif item.uid == 4030 or item.uid == 4031 or item.uid == 4032 or item.uid == 4032 or item.uid == 4035 or item.uid == 4036 or item.uid == 4037 or item.uid == 4040 or item.uid == 4041 or item.uid == 4042 then
doPlayerAddExp(player:getId(),50000, true)
elseif item.uid == 4019 or item.uid == 4020 or item.uid == 4021 then
doPlayerAddExp(player:getId(),350000, true)
elseif item.uid == 9169 or item.uid == 9170 then
doPlayerAddExp(player:getId(),100000, true)
end
I give a shot on it, check the code below, but I need the "or" if don't have it, everyone can bug the experience.
Code:
local k = {
[2213] = {experience = 250000},
[4015] = {experience = 150000},
[4016] = {experience = 150000},
[4017] = {experience = 150000},
[4018] = {experience = 150000},
[4030] = {experience = 50000},
[4031] = {experience = 50000},
[4032] = {experience = 50000},
[4032] = {experience = 50000},
[4035] = {experience = 50000},
[4036] = {experience = 50000},
[4037] = {experience = 50000},
[4040] = {experience = 50000},
[4041] = {experience = 50000},
[4042] = {experience = 50000},
[4019] = {experience = 50000},
[4020] = {experience = 50000},
[4021] = {experience = 50000},
[9169] = {experience = 50000},
[9170] = {experience = 50000}
}
local t = k[item.uniqueid]
if t then
doPlayerAddExp(player:getId(), t.experience, true)
end
Thanks for the support.
Last edited: