president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
On my script is error help
photo:
script:
photo:
script:
Code:
local script =~ arenakill.lua
return TRUE
end
LUA:
function onKill(cid, target)
local room = getArenaMonsterIdByName(getCreatureName(target))
if room > 0 then
setPlayerStorageValue(cid, room, 1)
doPlayerSendTextMessage(cid,22,"You can enter next room!")
end
return TRUE
end
Code:
local script =~ vip1.lua
return TRUE
end
LUA:
function onSay(cid, words, param, channel)
local shop = {
["50cc"] = {
id = 2160, count = 50, points = 30
},
["100cc"] = {
id = 2160, count = 100, points = 50
},
["sacredS"] = {
id = 7409, count = 1, points = 120
},
["sacredS"] = {
id = 2408, count = 1, points = 120
},
["sacredA"] = {
id = 8925, count = 1, points = 120
},
["kaiserA"] = {
id = 2503, count = 1, points = 135
},
["kaiserL"] = {
id = 2504, count = 1, points = 135
},
["magicianR"] = {
id = 7897, count = 1, points = 135
},
["magicianL"] = {
id = 7896, count = 1, points = 135
},
["sacred"] = {
id = 2646, count = 1, points = 150
},
["addon"] = {
id = 9693, count = 1, points = 100
},
["soft"] = {
id = 6132, count = 1, points = 100
},
["light-bow"] = {
id = 8858, count = 1, points = 80
},
["light-arrow"] = {
id = 2352, count = 1, points = 80
},
["vip"] = {
id = 5785, count = 1, points = 110
}
}
local v = shop[param]
local check = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = '" .. getPlayerAccountId(cid) .. "' LIMIT 1;")
if check >= v.points then
local item = doCreateItemEx(v.id, v.count)
if doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR then
doPlayerSendCancel(cid, "Desculpa,você não tem cap.")
else
doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Shop: Added " .. v.count .."x " .. getItemInfo(v.id).name .. " to your inventory.")
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` - " .. v.points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end
else
doPlayerSendCancel(cid, "Desculpa,você não tem premium points,compre seus points no shop.")
end
return true
end