What's new

-LUA & XML Quest

Status
Not open for further replies.

R A H

Senior User
Joined
May 24, 2014
Messages
1,342
Reaction score
47
Skrzynka (zwyk?y quest) - zamiast nagrody w postaci przedmiotu punkty do sklepu.
 

buchaLL

bez spiny, luźno
Joined
Aug 2, 2011
Messages
1,013
Reaction score
68
Age
27
Odp: Quest

[lua]function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 5010 then
local queststatus = getPlayerStorageValue(cid,5010)
local count = 10 -- ilosc pkt
if queststatus == -1 then
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + '".. count .."' WHERE `name` ='"..getPlayerAccount(cid).."'")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ""..count.." premium points have been added to your account.")
setPlayerStorageValue(cid,5010,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
return true
end[/lua]
 
Last edited:
Status
Not open for further replies.
Top