-
Posts
368 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by xMaylox
-
Here is a script i found: [move][glow=red,2,300]CREDITS GOES TO THEONE[/glow][/move] This is a simple automatic events manager to give your players something to do when they get bored. This one only has 1 event: It spawns 1 raidboss(random) in a location(random) and announces to all the players which raidboss has been spawned where. If it's not killed within 2 hours, it erases that raidboss. Automatic events are set for every 2 hours but can be set differently. Also, I made the script so it's expandable. I use with 5 different random events on my servers, a timed collect the drop, raidboss spawn, a few PvP events, etc... You only need some imagination. So here it is: import math import sys from net.sf.l2j.gameserver import Announcements from net.sf.l2j.util import Rnd from java.lang import System from net.sf.l2j.gameserver.model.actor.appearance import PcAppearance from net.sf.l2j.gameserver import GameTimeController 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 from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance from net.sf.l2j.gameserver.model.actor.instance import L2NpcInstance MANAGER = 100400 TOPNPC = 100401 Raids = [ 25514,22216,25286,25283,25319 ] #Mountain protected zone MX = 55312 MY = 219168 MZ = -3223 #Mountain top NPC coords MNPCX = 144291 MNPCY = 157446 MNPCZ = -466 #Mountain bottom and giran NPC coords MBX1 = 82698 MBY1 = 148638 MBZ1 = -3468 MBX = 143370 MBY = 161135 MBZ = -1925 #number of participants MountainMinPlayers = 6 MountainMaxPlayers = 30 EventNpcs = [ 100400, 100401 ] #time between events in milliseconds eventInterval = 7200000 # 2 hours after the first event there is the second one and the others after are 2 hours too FirstStart = 2700000 #45 minutes after each restart there is the first event class eventmanager (JQuest): def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) self.RaidBosses ={ 0: {'name':"Queen Shyeed" , 'id':25514}, 1: {'name':"Tyrannosaurus" , 'id':22216}, 2: {'name':"Anakim" , 'id':25286}, 3: {'name':"Lilith" , 'id':25283}, 4: {'name':"Ember" , 'id':25319}, } self.RbCoords ={ 0: {'name':"in the colliseum" , 'X':150086 , 'Y':46733 , 'Z':-3407}, 1: {'name':"near the entrance of the Garden of Eva" , 'X':84805 , 'Y':233832 , 'Z':-3669}, 2: {'name':"close to the western entrance of the Cemetary" , 'X':161385 , 'Y':21032 , 'Z':-3671}, 3: {'name':"at Gludin's Harbor" , 'X':89199 , 'Y':149962 , 'Z':-3581}, } self.startQuestTimer("EventTrigger", FirstStart, None, None) self.RbSpawn = [] self.rewards ={ 0: {'prize':4357 , 'number':1}, #King of the hill event, dont forget to change the reward } self.Teams = [] self.Event = [] self.True = True self.False = False self.Group = [] self.EventManager1 = [] self.EventManager = [] self.Registration = [] self.numberPlayers = [] self.One = 1 self.Team1 = [] self.Team2 = [] self.numberOfTeams = [] self.Trigger = 1 self.Count = 2 self.Add = 1 self.Full = False self.TopNpc = [] self.EventNames = {0:"King of the hill", 1:"kill the Raidboss"} def onAdvEvent (self,event,npc,player): if event == "EventTrigger" : rr = int(Rnd.get(2)) Announcestart = "The " + self.EventNames[rr] + " event is about to start!!!" Announcements.getInstance().announceToAll(Announcestart) if rr == 0: self.Event = 0 eventmanager1 = self.addSpawn(MANAGER,MBX1,MBY1,MBZ1,0,False,0) self.EventManager1 = eventmanager1 topnpc = self.addSpawn(TOPNPC,MNPCX,MNPCY,MNPCZ,0,False,0) self.TopNpc = topnpc Announcements.getInstance().announceToAll("All those who wish to participate should come to meet me in Giran town") Announcements.getInstance().announceToAll("Registration will last 15 minutes") self.startQuestTimer("MountainSelect", 900000, npc, player) self.startQuestTimer("10minutes", 300000, npc, player) self.startQuestTimer("5minutes", 600000, npc, player) self.startQuestTimer("2minutes", 780000, npc, player) self.startQuestTimer("1minute", 840000, npc, player) if rr == 1: self.Event = 1 #the spawn coords and which raidboss are both random and #independant from each other ra = int(Rnd.get(5)) rb = int(Rnd.get(4)) self.RbSpawn = [] raidboss = self.RaidBosses[ra]['name'] location = self.RbCoords[rb]['name'] Announcements.getInstance().announceToAll(raidboss + " has just been spawned " + location + " and will disappear in 2 hours, hurry!") self.RbSpawn = self.addSpawn(self.RaidBosses[ra]['id'],self.RbCoords[rb]['X'],self.RbCoords[rb]['Y'],self.RbCoords[rb]['Z'],0,False,0) self.startQuestTimer("RbDespawn", 7150000, npc, player) self.startQuestTimer("EventTrigger", eventInterval, npc, player) if event == "10minutes": Announcements.getInstance().announceToAll("10 minutes left for event registration in Giran") if event == "5minutes": Announcements.getInstance().announceToAll("5 minutes left for event registration in Giran") if event == "2minutes": Announcements.getInstance().announceToAll("2 minutes left for event registration in Giran") if event == "1minutes": Announcements.getInstance().announceToAll("1 minute left for event registration in Giran") if event == "MountainSelect" : self.EventManager1.deleteMe() self.startQuestTimer("MountainStart", 60000, npc, player) totalplayers = len(self.Registration) if totalplayers >= MountainMinPlayers: #5 players per team, max 6 teams can participate self.numberOfTeams = int((len(self.Registration))/2) numberOfTeams = int((len(self.Registration))/2) playerList = list(self.Registration) Team1 = [] Team2 = [] for i in range(len(playerList)/2) : Team1.append(playerList.pop(Rnd.get(len(playerList)))) Team2 = playerList for i in Team1: i.teleToLocation(MNPCX,MNPCY,MNPCZ)#tele to top of mountain i.getAppearance().setNameColor(0x005de2) #orange i.getAppearance().setTitleColor(0x005de2) #orange i.getQuestState("eventmanager").set("cond","3") for i in Team2: i.teleToLocation(144428,161151,-2460)#tele to location A i.getAppearance().setNameColor(0xd5e200) #yellow i.getAppearance().setTitleColor(0xd5e200) #yellow i.getQuestState("eventmanager").set("cond","4") Announcements.getInstance().announceToAll("Team 1 - blue - has 20 minutes to take control of the mountain and talk to the Flag NPC to win this event.") Announcements.getInstance().announceToAll("Team 2 - orange - has to defend the mountain to win. Event starts in 1 minute, wait for the signal.") self.Team1 = Team1 self.Team2 = Team2 self.numberOfTeams = numberOfTeams else: Announcements.getInstance().announceToAll("Event cancelled due to lack of participation.") self.EventManager1.deleteMe() self.TopNpc.deleteMe() self.cancelQuestTimer("round_finish", None, None) self.cancelQuestTimer("15Tofinish", None, None) self.cancelQuestTimer("10Tofinish", None, None) self.cancelQuestTimer("5Tofinish", None, None) self.cancelQuestTimer("1Tofinish", None, None) if event == "MountainStart": for i in self.Team2: i.teleToLocation(MBX,MBY,MBZ)#tele to location A Announcements.getInstance().announceToAll("Start the event!!! Team 2, ATTACK!!! Good luck to both teams!") self.Attacker = self.Team2 self.Defender = self.Team1 self.startQuestTimer("round_finish", 1200000, npc, player) #sera 1200000 self.startQuestTimer("15Tofinish", 300000, npc, player) self.startQuestTimer("10Tofinish", 600000, npc, player) self.startQuestTimer("5Tofinish", 900000, npc, player) self.startQuestTimer("1Tofinish", 1140000, npc, player) if event == "15Tofinish": Announcements.getInstance().announceToAll("15 minutes until the end of the event") if event == "10Tofinish": Announcements.getInstance().announceToAll("10 minutes until the end of the event") if event == "5Tofinish": Announcements.getInstance().announceToAll("5 minutes until the end of the event") if event == "1Tofinish": Announcements.getInstance().announceToAll("1 minute until the end of the event") if event == "round_finish" and npc and player: self.TopNpc.deleteMe() self.startQuestTimer("EventTrigger", eventInterval, npc, player) self.cancelQuestTimer("15Tofinish", None, None) self.cancelQuestTimer("10Tofinish", None, None) self.cancelQuestTimer("5Tofinish", None, None) self.cancelQuestTimer("1Tofinish", None, None) Announcements.getInstance().announceToAll("Orange team wins!") rr = self.Event reward = self.rewards for i in self.Team2: i.teleToLocation(MBX1,MBY1,MBZ1)#tele back to town i.getAppearance().setNameColor(0xffffff) i.getAppearance().setTitleColor(0xffffff) i.getQuestState("eventmanager").set("cond","0") for i in self.Team1: i.teleToLocation(MBX1,MBY1,MBZ1)#tele back to town i.getQuestState("eventmanager").giveItems(reward[rr]['prize'],reward[rr]['number']) i.getQuestState("eventmanager").playSound("ItemSound.quest_fanfare_1") i.getAppearance().setNameColor(0xffffff) i.getAppearance().setTitleColor(0xffffff) i.getQuestState("eventmanager").set("cond","0") if event == "RbDespawn": self.RbSpawn.deleteMe() def onTalk (self,npc,player) : npcId = npc.getNpcId() cond = player.getQuestState("eventmanager").getInt("cond") if npcId == MANAGER : if not cond == 2: if self.Event == 0: if len(self.Registration) < MountainMaxPlayers: player.getQuestState("eventmanager").set("cond","2") self.Registration.append(player) Reg = list(self.Registration) return "<html><body>You have been added to the event list, teams will be made randomly 1 minute before the start of the event</body></html>" else: Announcements.getInstance().announceToAll("Event is now full, no more registration accepted.") self.Full = True return "<html><body>Event is full, try again next time</body></html>" else: return "<html><body>You are already registered</body></html>" if npcId == TOPNPC : if not cond == 3: self.TopNpc.deleteMe() self.cancelQuestTimer("round_finish", None, None) self.cancelQuestTimer("15Tofinish", None, None) self.cancelQuestTimer("10Tofinish", None, None) self.cancelQuestTimer("5Tofinish", None, None) self.cancelQuestTimer("1Tofinish", None, None) Announcements.getInstance().announceToAll("Blue team wins!") rr = self.Event reward = self.rewards self.startQuestTimer("EventTrigger", eventInterval, npc, player) for i in self.Team1: i.teleToLocation(MBX1,MBY1,MBZ1)#tele back to town i.getAppearance().setNameColor(0xffffff) i.getAppearance().setTitleColor(0xffffff) i.getQuestState("eventmanager").set("cond","0") for i in self.Team2: i.teleToLocation(MBX1,MBY1,MBZ1)#tele back to town i.getQuestState("eventmanager").playSound("ItemSound.quest_fanfare_1") i.getQuestState("eventmanager").giveItems(reward[rr]['prize'],reward[rr]['number']) i.getAppearance().setNameColor(0xffffff) i.getAppearance().setTitleColor(0xffffff) i.getQuestState("eventmanager").set("cond","0") else: return "<html><body>You are on the defending team!!! defend me, stop talking!</body></html>" def onKill (self,npc,player,isPet): if npc in self.RbSpawn: self.cancelQuestTimer("RbDespawn", None, None) # Quest class and state definition QUEST = eventmanager(-1, "eventmanager", "ai") for i in Raids: QUEST.addKillId(i) for i in EventNpcs: QUEST.addTalkId(i) QUEST.addStartNpc(i) print "Event Manager loaded!!!" 100400.htm <html> <body> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32> <br>So... you want to participate in the event? <br><br> <button value="Yes!" action="bypass -h npc_%objectId%_Quest eventmanager" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"> <img src=Sek.start_logo width=256 height=256 align=center> </center></body> </html> 100401.htm <html> <body> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32> <br>hmmm... it seems you have defeted my defenders... So, you want your reward then? <br><br> <button value="Yes we do!" action="bypass -h npc_%objectId%_Quest eventmanager" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"> <img src=Sek.start_logo width=256 height=256 align=center> </center></body> </html> Do not forget to create 2 NPCs with IDs 100400 and 100401 as they are needed for the King of the Hill event! ** note: DO NOT spawn these NPCs, the script will spawn them when needed ** Also you need this(to prevent karma during the event): insert into zone_vertices values ('25100', '0', '143314', '164544'), ('25100', '1', '144215', '160270'), ('25100', '2', '145877', '159158'), ('25100', '3', '145397', '158735'), ('25100', '4', '142822', '155102'), ('25100', '5', '140831', '158004'), ('25100', '6', '141794', '160570'); this part goes in zone.xml: <zone id='25100' type='Arena' shape='Npoly' minZ='-2100' maxZ='-100'> <stat name='name' val='Special Mountain Arena'/> <stat name='spawnX' val='-59858'/> <stat name='spawnY' val='-57495'/> <stat name='spawnZ' val='-2039'/> </zone>
-
**please delete this. double posted by mistake***
-
well, i dont mean a program. i mean a ready droplist.sql file;)
-
Hello guys, i just wanted to ask if someone has a modified list for normal drops. i mean i need all mobs to drop only adena, and raidbosses to drop their jewls. thanks anyway Respect, xmaylox
-
[Share] DataBase Cleanup SQL Script
xMaylox replied to xMaylox's topic in Server Development Discussion [L2J]
set @dt :D specify there the days! and just run the bat file;) -
@whitedevil020 you use CT2 server?
-
[Help] gia ena gm-epic shop
xMaylox replied to denis1992's question in Request Server Development Help [Greek]
nai, xreiaseze ta .utx files outes oste na min tws error. logika tha iparxoun mesa sto file p katevases. copy paste them sto systextures folder mesa ston fakello tou L2 s (default C:\Program Files\Lineage 2) -
8a i8ela ligo help
xMaylox replied to baltadaki's question in Request Server Development Help [Greek]
yparxei ena topic sto l2jfree.com sxetika me afto p thes. den xerw an mporw na to kanw post edw so s to stelnw me pm;) -
{UPDATED} [GUIDE]CTF,TvT,DM Events
xMaylox replied to ZeRo*'s topic in Server Development Discussion [Greek]
exereto guide file! nase kala. sigoura afto tha voithise pollous! @Strike : ipotheto pws oxi den ehoun diafora to CTF tou CT2 me to CT1.5. logika tha ehi diafora se oti einai database related :D -
Help me Buffer pedia!!!
xMaylox replied to sabas's question in Request Server Development Help [Greek]
try paste your _init_.py file. maybe there is something wrong with the imports. if you have further information that will help devs to see what the problem is, please provide them. Respect, xMaylox -
[Guide] Machine that can handle 1000+ online
xMaylox replied to Maker's topic in Server Development Discussion [L2J]
@Maker : man, please send me the website address of that company which provides 1tb via pm. ------------------------------------------------------------------------------------------- now to the topic. true, that machine can handle 1000+ players, BUT, you need to spend a lot of money to build that dream machine. although i dont think that someone can build a server now, that will become so much popular to have 1000+ all time. As you may notice lots of new server are up, or even are under construction and gona be up. So in my opinion its a bit difficult to have in your server 1000+ players. if any server will be that good and have so much players in it then, yes that monster can handle them quite easy. Repect, xMaylox (g13h4ck3r) -
dtapack: CT2 GRACIA 1.2.3
-
pedia enas filos m perni afto to error kai den xerw gt.. Error on: dist\data\scripts\custom\9999_NPCBuffer\__init__.py.error.log Line: -1 - Column: -1 Traceback (innermost last): File "__init__.py", line 2, in ? ImportError: no module named net thanks in advance!!! opios xeri kati please as apantisi
-
ok, this will clean all account which are inactive for specified days. [glow=red,2,300]ALL CREDITS GOES TO NE@FLAX FROM 2JFREE.COM[/glow] -- more than ... days SET @dt = 60; DELETE FROM accounts WHERE DATEDIFF( CURRENT_DATE( ) , FROM_UNIXTIME( `lastactive` /1000 ) ) > @dt; DELETE FROM accounts WHERE login NOT IN (SELECT account_name FROM characters); DELETE FROM account_data WHERE account_name NOT IN (SELECT login FROM accounts); DELETE FROM characters WHERE account_name NOT IN (SELECT login FROM accounts); DELETE FROM character_friends WHERE char_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM character_hennas WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM character_macroses WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM character_quests WHERE char_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM character_recipebook WHERE char_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM character_shortcuts WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM character_skills WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM character_skills_save WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM clan_data WHERE leader_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM clan_privs WHERE clan_id NOT IN (SELECT clan_id FROM clan_data); DELETE FROM clan_skills WHERE clan_id NOT IN (SELECT clan_id FROM clan_data); DELETE FROM pets WHERE item_obj_id NOT IN (SELECT object_id FROM items WHERE owner_id IN (SELECT obj_Id FROM characters)); DELETE FROM items WHERE owner_id NOT IN (SELECT obj_Id FROM characters) AND owner_id NOT IN (SELECT clan_id FROM clan_data); DELETE FROM seven_signs WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters); DELETE FROM augmentations WHERE item_id NOT IN (SELECT item_id FROM items); UPDATE characters SET clanid=0,title="",clan_privs=0 where clanid NOT IN (SELECT clan_id FROM clan_data); UPDATE clanhall SET ownerID=0,paidUntil=0 where ownerID NOT IN (SELECT clan_id FROM clan_data);
-
omg very nice share yiannis93! keep up the good work! btw dark elf with underwear is sooooo cool too:D but i prefer the weapon! xD again nice work man. *wonder if i can modify it for CT2*
-
sta quest ta apoia den doulevoun tha yparxei ena _init_.py.error file. an yparxei paste edw ti s leei. dokimase omws kai afto p ipe o sabas isos doulepsi den eixa pote afto to provlima.
-
g13h4ck3r@hotmail.com . den diorthonis kai tipota to simantiko. apla pernis ena line apo to gracia kai allazis to id to idtemplate to onoma tou npc to title to class kai to type. gennikotera apla perne apo to SQL tou gracia ena line kai allaze ta prwta 8 pedia simfwna me tis anagges s:)
-
ta NPC apo to CT1.5 den teriazoun akrivos sto CT2. to mono p ehis na kaneis einai na xrisimopioisis ola ta files (HTML,jscripts,py) opws kanonika tha eprepe alla to SQL na to kaneis kapos etsi INSERT IGNORE `custom_npc` (`id`,`idTemplate`,`name`,`serverSideName`,`title`,`serverSideTitle`,`class`,`collision_radius`,`collision_height`,`level`,`sex`,`type`,`attackrange`,`hp`,`mp`,`hpreg`,`mpreg`,`str`,`con`,`dex`,`int`,`wit`,`men`,`exp`,`sp`,`patk`,`pdef`,`matk`,`mdef`,`atkspd`,`aggro`,`matkspd`,`rhand`,`lhand`,`armor`,`walkspd`,`runspd`,`faction_id`,`faction_range`,`isUndead`,`absorb_level`,`absorb_type`) VALUES ('8412','31520','Buffer',1,'~MaxCheaters~',1,'NPC.a_traderA_MHuman',10.00,24.00,70,'Female','L2Npc', 40, 3862, 1493, NULL, NULL, 40, 43, 30, 21, 20, 10, 0, 0, 1314, 470, 780, 382, 278, 0, 253, 0, 0, 0, 80, 120, NULL, 0, 0, 0,'LAST_HIT'); ase ola ta alla p evales opws ehoun apla alaxe to sql me afto p s ekana paste. elpizw na voithisa Respect, xMaylox
-
[SHARE] Epic Wings For Gracia {CT2}
xMaylox replied to Stefoulis15's topic in Client Development Discussion
cool thanks man i was waiting for some wings in gracia! most of them are in hellbound clients -
e tote aplos kane afto p s eipa kane to system se .rar file kai kanto upload! extos kai an thes na allaxis merika messages p vgazi tote mporis na katevasis to L2encdec apo edw http://www.l2wh.com/dstuff/public/common/l2encdec_292.zip kai na allaxis merika files opws to servername-e.dat g na prosthesis to onoma tou server s. an kapoios mpori na prosthesi kati plz na to kanei. thanks Respect, xMaylox
-
cool one but i dont suggest that one for a newbie admin. and sometimes it can lag the server. just use a more simple one.
-
[Share]An item to become hero untill restart
xMaylox replied to Vago's topic in Server Shares & Files [L2J]
fakoykas i think it must be a problem on datapack. maybe it does not support this handlers. which one you are using? -
this command is not supported by all kind of datapacks. here is a NPC i modified. i dont know if it works try it and reply here plzzz :D http://rapidshare.com/files/158098621/nobl.rar.html
-
exartate ti ennoas me ton oro "system" filos. an ennoeis oti thes apla na enonese apefthias me ton server s apla me system folder xoris na allaxis ta hosts tote mporeis na katevaseis to L2.ini Editor (den xerw akrivos link an vrw tha to post) kai na vris ena line p grafei ServerAddr=****** kai na to kaneis replace me ServerAddr=YOUR_SERVERS_IP kai eisai ok;) an den einai afto p epsaxnes tote postare akrivos ti ennoas kai isos kapoios mpori na se voithisi! Respect, xMaylox
-
i already said that this is NOT mine:D i was just sharing it with ya guys:D