Jump to content

[Share]Ενα εορταστικο event για L2J servers απο G1 και πανω


Recommended Posts

Το έγραψα χθες... το δοκιμασα σε freya

Ολα τα items, mobs ειναι L2 client και δεν απαιτουν patch.

Παιρνεις ενα quest απο τον Holiday Santa.

Οποιο npc και αν σκοτώσεις κανει drop καποια event items (παλιες περιοχές λιγα λιγοτερα).

Τα ανταλλασεις στον Holiday Santa για tickets αγορών από την Cat of christmas.

Τα ανταλλασεις στον Holiday Santa για item που σου δίνει ο ίδιος και εχουν Random δωρα (πολλα και ολα εορταστικά).

Το quest ειναι μονιμο για τις γιορτές ή επεναλαμβανόμενο.

Το quest το έγραψα και για solo και για party, το κάνετε όπως θέλετε.

Δεν επιρέζει την ροή του game, οπως exparoume μας κανει drop extra χριστουγεννιάτικα items.

 

NPC id = 4 - Holiday Santa

NPC id = 32633 - Cat of christmas

 

BHMA A

 

διαδρομη = gameserver/data/html/default/

Δημιουργήστε τα εξής html

 

1o -- στο διαδρομη/4.htm

<html><body>Holiday Santa:<br>
Hi ... Santa asked me to I will give gifts to surprise, to make you happy holidays in this city.<br><br>
<a action="bypass -h npc_%objectId%_multisell 90099">Exchange Santa's items.</a><br><br>
<a action="bypass -h npc_%objectId%_Chat 1">Quest</a><br>
</body></html>

 

2o -- στο διαδρομη/4-1.htm

<html><body>Holiday Santa:<br>
Will be happy Santa Claus to cleanse the area of hazardous elements that threaten the peace of the place.<br1>
In exchange for your services will provide you with various items that will enhance your options.<br><br>
<a action="bypass -h Quest 11105_SantasEvent 4-11.htm">Santa's event.</a>
</body></html>

 

3o -- στο διαδρομη/32633.htm

<html><body>Cat of Christmas:<br>
Hello ... I'm the cat for Christmas. I am one of Santa's helpers. From me you can find various festive items ...<br>
Merry Christmas and happy new year.<br><br>
<a action="bypass -h npc_%objectId%_multisell 90100">Exchange event items.</a>
</body></html>

 

ΒΗΜΑ Β

 

Δημιουργήστε τα Multisell sto data/multisell

 

1o 90099.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- Santas event items by Tr@C3R -->
<list>
<!-- drop to kaltsa-->
<item id="1">
	<ingredient id="16383" count="1" />
	<production id="14612" count="1" />
</item>
<item id="2">
	<ingredient id="16383" count="1" />
	<production id="14620" count="1" />
</item>
<!-- Santa\'s Buff Gift Set -->
<item id="3">
	<ingredient id="16383" count="5" />
	<production id="14614" count="1" />
</item>
<!-- Santa Claus\' Gift - Joyt -->
<item id="4">
	<ingredient id="16383" count="30" />
	<production id="20075" count="1" />
</item>
<!-- Santa Claus\' Gift - Enjoyment-->
<item id="5">
	<ingredient id="16383" count="30" />
	<production id="20076" count="1" />
</item>
<!-- Santa Claus\' Gift - Luck -->
<item id="6">
	<ingredient id="16383" count="500" />
	<production id="20077" count="1" />
</item>
<!--Santa Claus\' Gift Set -->
<item id="7">
	<ingredient id="16383" count="100" />
	<production id="20101" count="1" />
</item>
<item id="8">
	<ingredient id="16383" count="10" />
	<production id="20753" count="1" />
</item>
<item id="9">
	<ingredient id="16383" count="15" />
	<production id="20754" count="1" />
</item>
<!--Santa\'s Shirt Exchange Coupon -->
<item id="10">
	<ingredient id="16383" count="25" />
	<production id="20756" count="1" />
</item>
<!-- kaltsa to drop-->
<item id="11">
	<ingredient id="14612" count="1" />
	<production id="16383" count="1" />
</item>

</list>

 

2o 90100.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- Cat event items by Tr@C3R -->
<list>
<!-- Santa\'s Hat -->
<item id="1">
	<ingredient id="20756" count="2" />
	<production id="7836" count="1" />
</item>
<!-- Santa\'s Antlers -->
<item id="2">
	<ingredient id="20756" count="2" />
	<production id="8936" count="1" />
</item>
<!-- Santa\'s Hat -->
<item id="3">
	<ingredient id="20756" count="2" />
	<production id="9138" count="1" />
</item>
<!-- Rock-Paper-Scissors Santa Hat -->
<item id="4">
	<ingredient id="20756" count="3" />
	<production id="14613" count="1" />
</item>
<!-- Santa Horn Hat -->
<item id="5">
	<ingredient id="20756" count="3" />
	<production id="20095" count="1" />
</item>
<!-- Saving Santa Hat -->
<item id="6">
	<ingredient id="20756" count="3" />
	<production id="20100" count="1" />
</item>
<!--Santa Hat -->
<item id="7">
	<ingredient id="20756" count="3" />
	<production id="20900" count="1" />
</item>
<!--newbie weapons -->
<item id="8">
	<ingredient id="14620" count="1" />
	<production id="14621" count="1" />
</item>
<item id="9">
	<ingredient id="14620" count="1" />
	<production id="14622" count="1" />
</item>
<item id="10">
	<ingredient id="14620" count="1" />
	<production id="14623" count="1" />
</item>
<item id="11">
	<ingredient id="14620" count="1" />
	<production id="14624" count="1" />
</item>
<item id="12">
	<ingredient id="14620" count="1" />
	<production id="14625" count="1" />
</item>
<item id="13">
	<ingredient id="14620" count="1" />
	<production id="14626" count="1" />
</item>
<item id="14">
	<ingredient id="14620" count="1" />
	<production id="14627" count="1" />
</item>
<item id="15">
	<ingredient id="14620" count="1" />
	<production id="14628" count="1" />
</item>
<item id="16">
	<ingredient id="14620" count="1" />
	<production id="14629" count="1" />
</item>
<item id="17">
	<ingredient id="14620" count="1" />
	<production id="14630" count="1" />
</item>
<item id="18">
	<ingredient id="14620" count="1" />
	<production id="14631" count="1" />
</item>
<item id="19">
	<ingredient id="14620" count="1" />
	<production id="14632" count="1" />
</item>
<item id="20">
	<ingredient id="14612" count="1" />
	<production id="14633" count="1" />
</item>
<item id="21">
	<ingredient id="14620" count="1" />
	<production id="14634" count="1" />
</item>
<item id="22">
	<ingredient id="14620" count="1" />
	<production id="14674" count="1" />
</item>
<item id="23">
	<ingredient id="20756" count="3" />
	<production id="20759" count="1" />
</item>
<item id="24">
	<ingredient id="14614" count="1" />
	<production id="17005" count="1" />
</item>
<!-- Icarus special weapons-->
<item id="25">
	<ingredient id="20107" count="1" />
	<production id="11300" count="1" />
</item>
<item id="26">
	<ingredient id="20107" count="1" />
	<production id="11301" count="1" />
</item>
<item id="27">
	<ingredient id="20107" count="1" />
	<production id="11305" count="1" />
</item>
<item id="28">
	<ingredient id="20107" count="1" />
	<production id="11309" count="1" />
</item>
<item id="29">
	<ingredient id="20107" count="1" />
	<production id="11313" count="1" />
</item>
<item id="30">
	<ingredient id="20107" count="1" />
	<production id="11317" count="1" />
</item>
<item id="31">
	<ingredient id="20107" count="1" />
	<production id="11321" count="1" />
</item>
<item id="32">
	<ingredient id="20107" count="1" />
	<production id="11325" count="1" />
</item>
<item id="33">
	<ingredient id="20107" count="1" />
	<production id="11329" count="1" />
</item>
<item id="34">
	<ingredient id="20107" count="1" />
	<production id="11333" count="1" />
</item>
<item id="35">
	<ingredient id="20107" count="1" />
	<production id="11337" count="1" />
</item>
<item id="36">
	<ingredient id="20107" count="1" />
	<production id="11341" count="1" />
</item>
</list>

 

Link to comment
Share on other sites

BHMA Γ

 

το quest ... στο data/scripts/quests φακελο

 

δημιουργήστε τον φακελο 11105_SantasEvent

 

δημιουργήστε ενα text αρχείο με ονομα __init__.py

copy-paste κωδικα:

 

# 2010-12-13 by Tr@C3R

import sys
from com.l2jserver.gameserver.model.quest import State
from com.l2jserver.gameserver.model.quest import QuestState
from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
from com.l2jserver.util import Rnd

qn = "11105_SantasEvent"

# NPCs
HOLIDAY_SANTA = 4

#MOBS
MOBS = range(12077,36599)

#QUEST DROPS
STARTING_ADENA = 57
KOYTAKIA = 16383
KALTSES = 14612
ITEM_COUNT = 1

#QUEST REWARD
ADENA_EXP_ESP = 57

class Quest (JQuest) :
def __init__(self,id,name,descr):
	JQuest.__init__(self,id,name,descr)
	self.questItemIds = [sTARTING_ADENA]

def onAdvEvent(self, event, npc, player) :
	htmltext = event
	st = player.getQuestState(qn)
	if not st : return

	if event == "4-11.htm" :
		st.setState(State.STARTED)
		st.set("cond","1")
		st.playSound("ItemSound.quest_accept")
	return htmltext

def onTalk (self, npc, player) :
	htmltext = Quest.getNoQuestMsg(player)
	st = player.getQuestState(qn)
	if not st : return htmltext

	npcId = npc.getNpcId()
	cond = st.getInt("cond")

	if npcId == HOLIDAY_SANTA :
		if st.getState() == State.COMPLETED :
			htmltext = "4-13.htm"
		elif st.getQuestItemsCount(KALTSES) > 19 and cond == 1:
			htmltext = "4-15.htm"
			st.unset("cond")
			st.takeItems(KALTSES,20) 
			st.rewardItems(57,80000)
			st.addExpAndSp(3236600,118300)
			st.exitQuest(False)
			st.playSound("ItemSound.quest_finish")

	return htmltext

def onKill(self, npc, player, isPet) :
	npcId = npc.getNpcId()
	party = player.getParty()
	if party :
		PartyMembers = []
		for member in party.getPartyMembers().toArray() :
			st = member.getQuestState(qn)
			if st and st.getState() == State.STARTED and st.getInt("cond") == 1 :
				if npcId > 12000 :
					PartyMembers.append(st)
		if len(PartyMembers) == 0 : return
		winnerst = PartyMembers[Rnd.get(len(PartyMembers))]
		if npcId > 12000 :
			winnerst.giveItems(KOYTAKIA, 1)
			winnerst.playSound("ItemSound.quest_itemget")
		if npcId > 20000 :
			winnerst.giveItems(KALTSES,1)
			winnerst.playSound("ItemSound.quest_itemget")
	else :
		st = player.getQuestState(qn)
		if not st : return
		if st.getState() != State.STARTED : return

		if npcId > 12000 :
			st.giveItems(KOYTAKIA, 1)
			st.playSound("ItemSound.quest_itemget")
		if npcId > 20000 :
			st.giveItems(KALTSES,1)
			st.playSound("ItemSound.quest_itemget")
	return

QUEST	= Quest(11105,qn,"SantasEvent")

QUEST.addStartNpc(HOLIDAY_SANTA)
QUEST.addTalkId(HOLIDAY_SANTA)

for mobId in MOBS:
QUEST.addKillId(mobId)

 

 

Link to comment
Share on other sites

ΒΗΜΑ Δ και τελευταίο τα htm του quest

 

στο data/scripts/quests/11105_SantasEvent  φακελο

 

1o 4-11.htm

<html><body>Holiday Santa:<br>
I count on you and I think it will help much. There is nothing strange to be you know, just gave tone of calm in our town.<br1> 
Good luck!
</body></html>

 

2o 4-13.htm

<html><body>Holiday Santa:<br>
I realize you just completed a difficult task, but we still need your help!<br>
</body></html>

 

3o 4-15.htm

<html><body>Holiday Santa:<br>
Thank you very much!<br1>
Choose some gifts from me or they commuted to Cat of Christmas.<br>
</body></html>

 

και τελος στο gameserver/data/scripts.cfg προσθέστε:

quests/11105_SantasEvent/__init__.py

 

Link to comment
Share on other sites

Πολυ καλο

αλλα

Σε παρακαλω αν μπορεις να βαλεις [share]στο title του thread,και οπου πρεπει να βαλουμε κατι βαλτο μεσα σε [ code][/code ]

 

Link to comment
Share on other sites

Thanks

Παιδια δεν χρειάζεται να προσθέσετε κάτι εσεις. Finito εκανα διαχωρισμο του κωδικα όπως πρότεινες και είναι ποιο ευδιάγνωστο.. thanks

Μονο στο multisell 90100 μετα το <!-- Icarus special weapons--> μπορείτε να προσθέσετε ότι rewards θελετε.

Χρησιμοποίησα τα icarus τα masterwork αλαξτε τα με οτι θελετε. Ολα τα αλλα είναι αντικείμενα και buffs εορταστικά.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...