mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-05 11:39:21 +02:00
introduce christmas items and santa claus
This commit is contained in:
parent
0cb7e94bf8
commit
6de5259bff
@ -240,6 +240,7 @@
|
|||||||
<action itemid="3035" script="misc/changegold.lua" />
|
<action itemid="3035" script="misc/changegold.lua" />
|
||||||
<action itemid="3043" script="misc/changegold.lua" />
|
<action itemid="3043" script="misc/changegold.lua" />
|
||||||
<action fromaid="17724" toaid="17728" script="misc/skill_trainer.lua" />
|
<action fromaid="17724" toaid="17728" script="misc/skill_trainer.lua" />
|
||||||
|
<action fromid="6506" toid="6508" script="misc/christmas_bundle.lua" />
|
||||||
|
|
||||||
<!-- Chests -->
|
<!-- Chests -->
|
||||||
<action itemid="2479" script="misc/chests.lua" />
|
<action itemid="2479" script="misc/chests.lua" />
|
||||||
|
50
data/actions/scripts/misc/christmas_bundle.lua
Normal file
50
data/actions/scripts/misc/christmas_bundle.lua
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||||
|
|
||||||
|
local bundleTypes = {
|
||||||
|
[6506] = { -- red christmas bundle
|
||||||
|
6503
|
||||||
|
},
|
||||||
|
[6507] = { -- blue christmas bundle
|
||||||
|
6504
|
||||||
|
},
|
||||||
|
[6508] = { -- green christmas bundle
|
||||||
|
6502
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
local common = {
|
||||||
|
{6569, 15}, {3598, 20}, {3599, 10}, {3586, 10}, {3585, 5}, 6500, 6501, 6489, 6387
|
||||||
|
}
|
||||||
|
|
||||||
|
local targetItem = bundleTypes[item.itemid]
|
||||||
|
if not targetItem then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
targetItem = common
|
||||||
|
|
||||||
|
-- In case there's going to be more than one unique item per bundle
|
||||||
|
for i = 1, #bundleTypes[item.itemid] do
|
||||||
|
table.insert(targetItem, bundleTypes[item.itemid][i])
|
||||||
|
end
|
||||||
|
|
||||||
|
local rewards = {}
|
||||||
|
repeat
|
||||||
|
local count = 1
|
||||||
|
local rand = math.random(#targetItem)
|
||||||
|
local gift = targetItem[rand]
|
||||||
|
if type(gift) == "table" then
|
||||||
|
count = gift[2]
|
||||||
|
gift = gift[1]
|
||||||
|
end
|
||||||
|
rewards[#rewards + 1] = {gift, count}
|
||||||
|
table.remove(targetItem, rand)
|
||||||
|
until #rewards == 7
|
||||||
|
|
||||||
|
for i = 1, #rewards do
|
||||||
|
player:addItem(rewards[i][1], rewards[i][2])
|
||||||
|
end
|
||||||
|
item:remove(1)
|
||||||
|
fromPosition:sendMagicEffect(CONST_ME_GIFT_WRAPS)
|
||||||
|
return true
|
||||||
|
end
|
@ -13,21 +13,34 @@ VANISH,! -> "Good bye, little %N!"
|
|||||||
"farewell" -> *
|
"farewell" -> *
|
||||||
"job" -> "Ho ho ho! You don't know Santa Claus? Never mind. You may ask me for a present."
|
"job" -> "Ho ho ho! You don't know Santa Claus? Never mind. You may ask me for a present."
|
||||||
"name" -> "Sorry, I don't have time to chat. Please ask for your present."
|
"name" -> "Sorry, I don't have time to chat. Please ask for your present."
|
||||||
|
"thank" -> "You had a few hard times last year, I know. Considering all that you did well and I'm proud of you."
|
||||||
|
"thank",amount>9000 -> "You're one of my favourite children, little %N. But pssht, don't tell the others! I love all of you, of course."
|
||||||
|
|
||||||
#verteilt orange
|
"present",QuestValue(217)<999,amount<2000,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3599, Amount=10,Create(Type),Type=6506, Amount=1,Create(Type),Idle
|
||||||
"present",QuestValue(217)<3,amount<1000,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3586, Amount=10,Create(Type),Idle
|
"present",QuestValue(217)<999,amount<4000,amount>1999,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3599, Amount=10,Create(Type),Type=6507, Amount=1,Create(Type),Idle
|
||||||
#verteilt candy canes
|
"present",QuestValue(217)<999,amount<6000,amount>3999,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3599, Amount=10,Create(Type),Type=6508, Amount=1,Create(Type),Idle
|
||||||
"present",QuestValue(217)<3,amount<3500,amount>999,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3599, Amount=8,Create(Type),Idle
|
"present",QuestValue(217)<999,amount<8000,amount>5999,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3599, Amount=10,Create(Type),Type=2992, Amount=10,Create(Type),Idle
|
||||||
#verteilt apfel
|
"present",QuestValue(217)<999,Level>20,amount<9000,amount>7999,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3039, Amount=1,Create(Type),Idle
|
||||||
"present",QuestValue(217)<3,amount<5000,amount>3499,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3585, Amount=15,Create(Type),Idle
|
"present",QuestValue(217)<999,Level>20,amount<9500,amount>8999,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3036, Amount=1,Create(Type),Idle
|
||||||
#verteilt kekse
|
"present",QuestValue(217)<999,amount<9982,amount>9499,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=2991, Amount=1,Create(Type),Idle
|
||||||
"present",QuestValue(217)<3,amount<6000,amount>4999,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3598, Amount=8,Create(Type),Idle
|
"present",QuestValue(217)<999,Level>20,amount=9983,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3382, Amount=1,Create(Type),Idle
|
||||||
#verteilt schneeball
|
"present",QuestValue(217)<999,Level>20,amount=9984,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3419, Amount=1,Create(Type),Idle
|
||||||
"present",QuestValue(217)<3,amount<9950,amount>5999,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=2992, Amount=5,Create(Type),Idle
|
"present",QuestValue(217)<999,Level>20,amount=9985,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3381, Amount=1,Create(Type),Idle
|
||||||
#verteilt doll
|
"present",QuestValue(217)<999,Level>20,amount=9986,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3420, Amount=1,Create(Type),Idle
|
||||||
"present",QuestValue(217)<3,amount<9999,amount>9949,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=2991, Amount=1,Create(Type),Idle
|
"present",QuestValue(217)<999,Level>20,amount=9987,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3279, Amount=1,Create(Type),Idle
|
||||||
#verteilt teddy
|
"present",QuestValue(217)<999,Level>20,amount=9988,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3079, Amount=1,Create(Type),Idle
|
||||||
"present",QuestValue(217)<3,amount=10000,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=2993, Amount=1,Create(Type),Idle
|
"present",QuestValue(217)<999,Level>20,amount=9989,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3386, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9990,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3567, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9991,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3364, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9992,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3366, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9993,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3389, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9994,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3001, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9995,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3570, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9996,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=5919, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9997,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3553, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9998,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=3057, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=9999,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=5080, Amount=1,Create(Type),Idle
|
||||||
|
"present",QuestValue(217)<999,Level>20,amount=10000,! -> "Here is your present! Enjoy!",SetQuestValue(217,3),Type=2993, Amount=1,Create(Type),Idle
|
||||||
|
|
||||||
|
|
||||||
"present",QuestValue(217)=3 -> "You already got your present! Next please!", Idle
|
"present",QuestValue(217)=3 -> "You already got your present! Next please!", Idle
|
||||||
|
11
data/npc/santaclaus.npc
Normal file
11
data/npc/santaclaus.npc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# GIMUD - Graphical Interface Multi User Dungeon
|
||||||
|
# 17608 - any task in progress
|
||||||
|
|
||||||
|
Name = "Santa Claus"
|
||||||
|
Outfit = (160,0-112-93-95-0)
|
||||||
|
Home = [32362,32207,7]
|
||||||
|
Radius = 3
|
||||||
|
|
||||||
|
Behaviour = {
|
||||||
|
@"gen-xmas.ndb"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user