- Joined
- Aug 31, 2005
- Messages
- 81
- Reaction score
- 0
can anyone tell me where can i get events like valentines day?
ty (or you can write code
)
ty (or you can write code
<Event ID="Christmas Event" Active="11 Nov 2005-24 Dec 2005">
<Droplist>
<AllDrop Items="5556-5557-5558-5559"
Count="1,1,1,1"
Chance="2%">
</AllDrop>
</Droplist>
<Message
Type="OnJoin"
Msg="Christmas Event:\nCollect all 4 Chritmas ornaments to recieve a gift!\n(Quest Item.. All monster's have a chance to drop.)">
</Message>
<Npc ID="12617-12618">
<Condition>
<Inventory Items="5556-5557-5558-5559" Count="1" Operation=">="></Inventory>
</Condition>
<Take>
<Item Items="5556-5557-5558-5559" Count="1" Type="OfEach"></Item>
</Take>
<Give>
<Item ItemID="5561" Count="1"></Item>
<Item ItemID="2136" Count="5"></Item>
</Give>
<SystemMessage
Msg="Congratulations. Receive your gift.">
</SystemMessage>
</Npc>
<EventEnd>
<Take From="AllPlayers">
<Item ItemID="5556-5557-5558-5559"></Item>
</Take>
</EventEnd>
</Event>
print "importing custom data: 5007_santa"
import sys
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent (self,event,st) :
htmltext = event
# Christmas
if event == "1":
if st.getQuestItemsCount(5556) >= 1 and st.getQuestItemsCount(5557) >= 1 and st.getQuestItemsCount(5558) >= 1 and st.getQuestItemsCount(5559) >= 1:
st.takeItems(5556,1)
st.takeItems(5557,1)
st.takeItems(5558,1)
st.takeItems(5559,1)
st.giveItems(5283,3)
htmltext = "Merry Christmas."
else:
htmltext = "You do not have all four ornaments."
if event == "0":
htmltext = "Trade has been canceled."
if htmltext != event:
st.setState(COMPLETED)
st.exitQuest(1)
return htmltext
def onTalk (Self,npc,st):
npcId = npc.getNpcId()
htmltext = "<html><head><body>I have nothing to say to you.</body></html>"
st.setState(STARTED)
return "1.htm"
QUEST = Quest(5007,"5007_santa","custom")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(12617)
QUEST.addStartNpc(12618)
STARTED.addTalkId(12617)
STARTED.addTalkId(12618)
<html>
<body>
<font color="LEVEL">So you got them for me?</font>
<table width=270>
<tr>
<td width=90> </td>
<td width=90><button value="OK" action="bypass -h Quest 5007_santa 1" width=60 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
<td width=90><button value="Cancel" action="bypass -h Quest 5007_santa 1 0" width=60 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
</tr>
</table>
<br>
</body>
</html>