mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-11-28 15:46:49 +01:00
implement juice squeezer and few new 781 items
This commit is contained in:
@@ -176,6 +176,7 @@
|
||||
<action itemid="3457" script="misc/shovel.lua" />
|
||||
<action itemid="5710" script="misc/shovel.lua" />
|
||||
<action itemid="3483" allowfaruse="1" script="misc/fishing_rod.lua" />
|
||||
<action itemid="5865" script="misc/juice_squeezer.lua" />
|
||||
|
||||
<!-- Miscellaneous -->
|
||||
<action itemid="4867" script="misc/botanist_container.lua" />
|
||||
@@ -214,6 +215,7 @@
|
||||
<action itemid="2524" script="misc/fluids.lua" />
|
||||
<action itemid="2873" script="misc/fluids.lua" />
|
||||
<action itemid="2874" script="misc/fluids.lua" />
|
||||
<action itemid="2875" script="misc/fluids.lua" />
|
||||
<action itemid="2876" script="misc/fluids.lua" />
|
||||
<action itemid="2877" script="misc/fluids.lua" />
|
||||
<action itemid="2879" script="misc/fluids.lua" />
|
||||
|
||||
@@ -23,7 +23,8 @@ local messages = {
|
||||
[FLUID_LIFEFLUID] = "Aaaah...",
|
||||
[FLUID_LEMONADE] = "Mmmh.",
|
||||
[FLUID_RUM] = "Aah...",
|
||||
[FLUID_COCONUTMILK] = "Mmmh."
|
||||
[FLUID_COCONUTMILK] = "Mmmh.",
|
||||
[FLUID_FRUITJUICE] = "Mmmh."
|
||||
}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition)
|
||||
@@ -34,8 +35,7 @@ function onUse(player, item, fromPosition, target, toPosition)
|
||||
item:transform(item:getId(), 0)
|
||||
return true
|
||||
elseif target:getFluidType() ~= 0 and item:getFluidType() == 0 then
|
||||
target:transform(target:getId(), 0)
|
||||
item:transform(item:getId(), target:getFluidType())
|
||||
player:sendCancelMessage("You cannot use this object.")
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
9
data/actions/scripts/misc/juice_squeezer.lua
Normal file
9
data/actions/scripts/misc/juice_squeezer.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
local fruits = {3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3595, 3596, 5096}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
if isInArray(fruits, target.itemid) and player:removeItem(2874, 1, 0) then
|
||||
target:remove(1)
|
||||
player:addItem(2874, target.itemid == 3589 and 14 or 15)
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -43,6 +43,9 @@ Name = "rum"
|
||||
TypeID = 14
|
||||
Name = "coconut milk"
|
||||
|
||||
TypeID = 15
|
||||
Name = "fruit juice"
|
||||
|
||||
# --- end of server specific object types ---
|
||||
|
||||
TypeID = 100
|
||||
@@ -26474,11 +26477,11 @@ Flags = {Unmove}
|
||||
|
||||
TypeID = 5864
|
||||
Name = "" # this is nothing in client
|
||||
# pradzia nuo cia jau reikia implementuoti juiceri
|
||||
|
||||
TypeID = 5865
|
||||
Name = "a juice squeezer"
|
||||
Flags = {Take}
|
||||
Attributes = {Weight=1500} # TODO: Implement like in tibia wiki
|
||||
Attributes = {Weight=1500}
|
||||
|
||||
TypeID = 5866
|
||||
Name = "rubble"
|
||||
@@ -26515,7 +26518,7 @@ Flags = {Unmove}
|
||||
TypeID = 5874
|
||||
Name = "a poison trickle"
|
||||
Flags = {Unmove}
|
||||
|
||||
# pradeti nuo cia ir nepamirsti implementuoti visiem npc ir monstram
|
||||
TypeID = 5875
|
||||
Name = "sniper gloves"
|
||||
Description = "They are the pride of the paladin guild"
|
||||
|
||||
@@ -59,6 +59,7 @@ VANISH,! -> "Asha Thrazi."
|
||||
"strawberry" -> Type=3591, Amount=1, Price=1, "Do you want to buy a strawberry for %P gold?", Topic=1
|
||||
"carrot" -> Type=3595, Amount=1, Price=3, "Do you want to buy a carrot for %P gold?", Topic=1
|
||||
"pumpkin" -> Type=3594, Amount=1, Price=10, "Do you want to buy a pumpkin for %P gold?", Topic=1
|
||||
"juice squeezer" -> Type=5865, Amount=1, Price=100, "Do you want to buy a juice squeezer for %P gold?", Topic=1
|
||||
|
||||
%1,1<%1,"corncob" -> Type=3597, Amount=%1, Price=3*%1, "Do you want to buy %A corncobs for %P gold?", Topic=1
|
||||
%1,1<%1,"cherr" -> Type=3590, Amount=%1, Price=1*%1, "Do you want to buy %A cherries for %P gold?", Topic=1
|
||||
@@ -68,6 +69,7 @@ VANISH,! -> "Asha Thrazi."
|
||||
%1,1<%1,"strawberries" -> Type=3591, Amount=%1, Price=1*%1, "Do you want to buy %A strawberries for %P gold?", Topic=1
|
||||
%1,1<%1,"carrot" -> Type=3595, Amount=%1, Price=3*%1, "Do you want to buy %A carrots for %P gold?", Topic=1
|
||||
%1,1<%1,"pumpkin" -> Type=3594, Amount=%1, Price=10*%1, "Do you want to buy %A pumpkins for %P gold?", Topic=1
|
||||
%1,1<%1,"juice squeezer" -> Type=5865, Amount=%1, Price=100*%1, "Do you want to buy %A juice squeezers for %P gold?", Topic=1
|
||||
|
||||
"bugmilk" -> Type=2875, Data=9, Amount=1, Price=15, "Do you want to buy a bottle of bugmilk for %P gold?", Topic=1
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ VANISH,! -> "Aww, I don't even deserve a farewell?"
|
||||
"pumpkin" -> Type=3594, Amount=1, Price=10, "Do you want to buy a pumpkin for %P gold?", Topic=1
|
||||
"blueberr" -> Type=3588, Amount=1, Price=1, "Do you want to buy a blueberry for %P gold?", Topic=1
|
||||
"mango" -> Type=5096, Amount=1, Price=10, "Do you want to buy a mango for %P gold?", Topic=1
|
||||
"juice squeezer" -> Type=5865, Amount=1, Price=100, "Do you want to buy a juice squeezer for %P gold?", Topic=1
|
||||
|
||||
%1,1<%1,"banana" -> Type=3587, Amount=%1, Price=5*%1, "Do you want to buy %A bananas for %P gold?", Topic=1
|
||||
%1,1<%1,"white","mushroom" -> Type=3723, Amount=%1, Price=10*%1, "Do you want to buy %A of the white mushrooms for %P gold?", Topic=1
|
||||
@@ -54,6 +55,7 @@ VANISH,! -> "Aww, I don't even deserve a farewell?"
|
||||
%1,1<%1,"pumpkin" -> Type=3594, Amount=%1, Price=10*%1, "Do you want to buy %A pumpkins for %P gold?", Topic=1
|
||||
%1,1<%1,"blueberr" -> Type=3588, Amount=%1, Price=1*%1, "Do you want to buy %A blueberries for %P gold?", Topic=1
|
||||
%1,1<%1,"mango" -> Type=5096, Amount=%1, Price=10*%1, "Do you want to buy %A mangos for %P gold?", Topic=1
|
||||
%1,1<%1,"juice squeezer" -> Type=5865, Amount=%1, Price=100*%1, "Do you want to buy %A juice squeezers for %P gold?", Topic=1
|
||||
|
||||
Topic=1,"yes",CountMoney>=Price -> "Merci, 'ere you go.", DeleteMoney, Create(Type)
|
||||
Topic=1,"yes" -> "Sorry, but that's not enough money, please count again."
|
||||
|
||||
Reference in New Issue
Block a user