diff --git a/data/actions/actions.xml b/data/actions/actions.xml index 72566eb..c31a15c 100644 --- a/data/actions/actions.xml +++ b/data/actions/actions.xml @@ -196,6 +196,8 @@ + + diff --git a/data/actions/scripts/misc/shop_points_scroll.lua b/data/actions/scripts/misc/shop_points_scroll.lua new file mode 100644 index 0000000..71ad2f4 --- /dev/null +++ b/data/actions/scripts/misc/shop_points_scroll.lua @@ -0,0 +1,15 @@ +local hundredPoints = 6554 +local fiftyPoints = 6555 + +function onUse(player, item, fromPosition, target, toPosition) + if item:getId() == hundredPoints then + db.query("UPDATE znote_accounts SET points = points + 100 WHERE account_id = ".. player:getAccountId() .."") + elseif item:getId() == fiftyPoints then + db.query("UPDATE znote_accounts SET points = points + 50 WHERE account_id = ".. player:getAccountId() .."") + end + + item:getPosition():sendMagicEffect(3) + item:remove() + player:save() + return true +end diff --git a/data/items792/items.srv b/data/items792/items.srv index 483b084..acbe57e 100644 --- a/data/items792/items.srv +++ b/data/items792/items.srv @@ -26947,7 +26947,7 @@ Attributes = {Weight=250} TypeID = 5952 Name = "a poem scroll" -Description = "It contains a love poem, written by an unknown elven poet." +Description = "It contains a love poem, written by an unknown elven poet" Flags = {Take} Attributes = {Weight=120} @@ -29752,10 +29752,16 @@ Flags = {MultiUse,Take,Weapon} Attributes = {Weight=5800,SlotType=TWOHANDED,WeaponType=AXE,Attack=49,Defense=15} TypeID = 6554 -Name = "" # this is nothing in client +Name = "a 100 points scroll" +Description = "It grants you 100 shop points" +Flags = {Take} +Attributes = {Weight=120} TypeID = 6555 -Name = "" # this is nothing in client +Name = "a 50 points scroll" +Description = "It grants you 50 shop points" +Flags = {Take} +Attributes = {Weight=120} TypeID = 6556 Name = "a tic-tac-toe token"