-
Posts
1,403 -
Credits
0 -
Joined
-
Last visited
-
Days Won
32 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by melron
-
Players in Mxc or only server Staff?
melron replied to Rengo's topic in General Discussion [English]
For real now... if you want to advertise your server you have to make topics in every damn l2 forum. Even with 5 ppl activity... Especially if you dont want to pay ... About banners here, i can say thay i received a lot ppl from here Edit: my question: Seems like you are a kind of dev/admin too and you dont know what maxcheaters is? -
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
I didn't noticed this way because you didn't registered the 'first id' at your code thats why. Alright thank you for your instructions -
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
thats exactly what i was talking about. So the monsterId mustn't be registered at all and its usefull only for spawning purposes because we need to register the id 1 as registered id, or just register in new line the 1st id -
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
my point isn't the ++ logic. im trying to understand how you thought about it and i'm asking some questions in order to learn some new things. When you have registered 3 IDS (1,2,3) at event onKill and the mob with ID 1 will die, onKill function will spawn the list.poll right? the list.poll will return the ID of the head so for first time is the 1 . @Override protected void registerNpcs() { monsterIds.add(1009); Lets say the 1009 will die ok? public String onKill(Npc npc, Player killer, boolean isPet) { if(monsterIds.size() == 0) return super.onKill(npc, killer, isPet); Attackable newNpc = (Attackable) addSpawn(monsterIds.poll(), npc, true, 0, false); What id will have the newNpc ? if my questions are bothering you i will stop my stupid questions -
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
-
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
yeah it does as i checked with my script some days ago. 'I think' Your code as code could work like that: package net.sf.l2j; import net.sf.l2j.gameserver.model.actor.Attackable; import net.sf.l2j.gameserver.model.actor.Npc; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.scripting.EventType; import net.sf.l2j.gameserver.scripting.scripts.ai.L2AttackableAIScript; import java.util.LinkedList; import java.util.Queue; /** * @author Reborn12 * */ public class PartyZonePolymorph extends L2AttackableAIScript { private final Queue<Integer> monsterIds = new LinkedList<>(); public PartyZonePolymorph() { super("ai/group"); } @Override protected void registerNpcs() { monsterIds.add(1009); monsterIds.add(1010); addEventIds(monsterIds, EventType.ON_KILL); } @Override public String onKill(Npc npc, Player killer, boolean isPet) { if(monsterIds.size() == 0) return super.onKill(npc, killer, isPet); Attackable newNpc = (Attackable) addSpawn(monsterIds.poll() +1, npc, true, 0, false); attack(newNpc, killer); return super.onKill(npc, killer, isPet); } } correct me if im wrong. The one you posted will spawn the same mob when a mob die (we need the next upgrade) +1 also the monsterIds.add(1011); is useless :P -
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
You need if because if the mob with ID 1011 will die we dont want upgrade thats why i used my if and checking 2 ints also i have two questions that i dont understand. 1) why you used poll since you get the head of the list 2) where do you spawn the next id based on the previous one? p.s actually the 3rd id is useless to register it on kill case... and its about 2-3 lines the whole code -
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
i didn't say it isn't :P -
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
it is actually useless check since onKill function is called based on MONSTER_IDS ids . so its always true this line and we dont want it. addEventIds(MONSTER_IDS, EventType.ON_KILL); it can be in one line as you mentioned (i thought it too) but he wants to skip the MONSTER_ID[2] polymorph since it is the last morph :p another struture of this function: public String onKill(Npc npc, Player killer, boolean isPet) { if (npc.getNpcId() == MONSTER_IDS[0] || npc.getNpcId() == MONSTER_IDS[1]) attack((Attackable) addSpawn(npc.getNpcId()+1, npc, true, 0, false), killer); return super.onKill(npc, killer, isPet); } -
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
Sure yeah. You will just receive some pms to add this thing for them :D p.s move 'break' inside of cases -
Code Polymorph Monsters After Death Spawn New
melron replied to Reborn12's topic in Server Shares & Files [L2J]
Nice one reborn ;) You could add a despawn in case they dont kill the next mob (this can be like the classic anti-bot protection where a mob appearing with 1kk p.def and 1kk p.atk :P ) finally you can write your onKill like this @Override public String onKill(Npc npc, Player killer, boolean isPet) { switch (npc.getNpcId()) { case 1009: case 1010: { final Attackable newNpc = (Attackable) addSpawn(npc.getNpcId()+1, npc, true, 0, false); attack(newNpc, killer); break; } } return super.onKill(npc, killer, isPet); } -
-
Search -> which is not allowed <-
-
There isn't any retail upgrade shop. Learn to explain what you need. 2 options. A) merchant B) check blacksmith how SA/sealed/ unsealed working Move on
-
Help gameserver error on killing pk
melron replied to Xenokage's question in Request Server Development Help [L2J]
you're welcome. locked -
Help gameserver error on killing pk
melron replied to Xenokage's question in Request Server Development Help [L2J]
indeed, but you changed the max level :) -
Help gameserver error on killing pk
melron replied to Xenokage's question in Request Server Development Help [L2J]
-
Thank you guys!
-
Help problem with skills
melron replied to martys723's question in Request Server Development Help [L2J]
1.2) -
If you can see the npc and the html but you cant teleport, the bypass is wrong for the specific instance
-
Help ArmorSets 16 question code
melron replied to Xenokage's question in Request Server Development Help [L2J]
Well, like @Solomun said you could test it wihtout write your finally code. onTopic: It wont work because your checks about enchant value are wrong. If you can see for method isEnchanted6() the checks are item.getEnchantLevel() > 5 by default, when you have a set 6,6,6,6 or 7,8,6,10 is the same and the method isEnchanted6() will return true. Your check is > 15 (if you let this method as the last one is ok , but if you will add more like isEnchanted20() , isEnchanted25() you have to edit your checks ) for example if the method is isEnchanted15() and there is another method isEnchanted20() you could code it like: if (legsItem != null && legsItem.getEnchantLevel() > 15 && legsItem.getEnchantLevel() < 20) i believe you got my point -
Just opinions. I used it 2 times for live servers without problem. No, IPN is sending informations that you can handle with the following table DROP TABLE IF EXISTS `tableA`; CREATE TABLE `tableA` ( `id` int(11) NOT NULL, `status` tinyint(1) NOT NULL, `date` varchar(250) NOT NULL DEFAULT '', `gross` decimal(10,2) NOT NULL, `fee` decimal(10,2) NOT NULL, `custom` varchar(45) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; No api keys and no Runnables
-
I thought you said something about api...
-
I would go with paypal IPN.... you getting all the informations from the payment instant , after that a good query + a good code (server side) can handle all the donations...
-
Thanks mate