Krumelz Posted December 24, 2010 Author Share Posted December 24, 2010 This is a tutorial for Eclipse Origins v.1.1.0\. It will allow you to set NPC's to Bosses, after you defeat them it'll warp you to the set map and give you the dropped items, so stronger players cant just camp at the boss and wait for it to respawn, while the less strong player have to wait until the stronger player's bored of killing it.Excuse my not perfect english, im german.Client Side:First you need to change the NpcRec, so Ctrl + F NpcRec and before```End Type```Add:``` Boss As Long BossMap As Integer BossX As Integer BossY As Integer```Do the same for the server's NpcRec!Next you'll add a few things to the NpcEditor, add:Type (Name)1 checkbox (chkBoss) Caption: Boss1 frame (frmBoss) Place the Frame above the one with the Npc's drop.on the frame:3 scrollbars (ScrlBossMap, ScrlBossX, ScrlBossY)3 Labels (lblBossMap, lblBossx, lblBossY)1 Button (cmdBoss)here's a little example pic of what mine looks like:![](http://www.freemmorpgmaker.com/files/imagehost/pics/f504fbd0f20e2903ed505298adaf65ed.JPG)Now doubleclick chkBoss and add:```If chkBoss.Value = 1 ThenfrmBoss.Visible = TrueElsefrmBoss.Visible = FalseEnd IfNpc(EditorIndex).Boss = chkBoss.Value```Doubleclick scrlBossMap and add:```If scrlBossMap.Value < 1 ThenscrlBossMap.Value = 1End IflblBossMap.Caption = "Map: " & scrlBossMap.ValueNpc(EditorIndex).BossMap = scrlBossMap.Value```Doubleclick ScrlBossX and add:```If scrlBossX.Value < 1 ThenscrlBossX.Value = 1End IflblBossX.Caption = "X: " & scrlBossX.ValueNpc(EditorIndex).BossX = scrlBossX.Value```Doubleclick ScrlBossY and add:```If scrlBossY.Value < 1 ThenscrlBossY.Value = 1End IflblBossY.Caption = "Y: " & scrlBossY.ValueNpc(EditorIndex).BossY = scrlBossY.Value```Doubleclick cmdBoss and add:```frmBoss.Visible = False```Ok, now search for```Public Sub NpcEditorInit()```and after```.txtEXP.text = Npc(EditorIndex).EXP```add``` .scrlBossMap.Value = Npc(EditorIndex).BossMap .scrlBossX.Value = Npc(EditorIndex).BossX .scrlBossY.Value = Npc(EditorIndex).BossY .chkBoss.Value = Npc(EditorIndex).Boss```Client side done.Server Sideok, I hope you've added the same code to the NpcRec as in the client.Now find```Sub AttackNpc(ByVal Attacker As Long, ByVal MapNpcNum As Long, ByVal Damage As Long, Optional ByVal spellnum As Long)```and replace:```' Drop the goods if they get it n = Int(Rnd * Npc(NpcNum).DropChance) + 1 If n = 1 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(MapNpcNum).x, MapNpc(MapNum).Npc(MapNpcNum).y) End If```with:```' Drop the goods if they get it n = Int(Rnd * Npc(NpcNum).DropChance) + 1 If n = 1 Then If Npc(NpcNum).Boss = 1 Then Call PlayerWarp(Attacker, Npc(NpcNum).BossMap, Npc(NpcNum).BossX, Npc(NpcNum).BossY) If FindOpenInvSlot(Attacker, Npc(NpcNum).DropItem) = 0 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, Player(Attacker).X, Player(Attacker).Y) Else Call GiveInvItem(Attacker, Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, True) End If Else Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(MapNpcNum).X, MapNpc(MapNum).Npc(MapNpcNum).Y) End If End If```EditRemove:```If Npc(NpcNum).Boss = 1 Then Call PlayerWarp(Attacker, Npc(NpcNum).BossMap, Npc(NpcNum).BossX, Npc(NpcNum).BossY) End If```Change:' Drop the goods if they get it n = Int(Rnd * Npc(NpcNum).DropChance) + 1 If n = 1 Then If Npc(NpcNum).Boss = 1 Then GiveInvItem Attacker, Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, True Else Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(MapNpcNum).X, MapNpc(MapNum).Npc(MapNpcNum).Y) End If End Ifto:```' Drop the goods if they get it n = Int(Rnd * Npc(NpcNum).DropChance) + 1 If n = 1 Then If Npc(NpcNum).Boss = 1 Then Call PlayerWarp(Attacker, Npc(NpcNum).BossMap, Npc(NpcNum).BossX, Npc(NpcNum).BossY) If FindOpenInvSlot(Attacker, Npc(NpcNum).DropItem) = 0 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, Player(Attacker).X, Player(Attacker).Y) Else Call GiveInvItem(Attacker, Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, True) End If Else Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(MapNpcNum).X, MapNpc(MapNum).Npc(MapNpcNum).Y) End If End If```With this edit it spawns the item you would've got at your new loaction if your inventory is full.Edit 2There was a little bug, it only warped you when you got the item, just change```' Drop the goods if they get it n = Int(Rnd * Npc(NpcNum).DropChance) + 1 If n = 1 Then If Npc(NpcNum).Boss = 1 Then Call PlayerWarp(Attacker, Npc(NpcNum).BossMap, Npc(NpcNum).BossX, Npc(NpcNum).BossY) If FindOpenInvSlot(Attacker, Npc(NpcNum).DropItem) = 0 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, Player(Attacker).X, Player(Attacker).Y) Else Call GiveInvItem(Attacker, Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, True) End If Else Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(MapNpcNum).X, MapNpc(MapNum).Npc(MapNpcNum).Y) End If End If```to:```' Drop the goods if they get it n = Int(Rnd * Npc(NpcNum).DropChance) + 1 If Npc(NpcNum).Boss = 1 Then Call PlayerWarp(Attacker, Npc(NpcNum).BossMap, Npc(NpcNum).BossX, Npc(NpcNum).BossY) If n = 1 Then If FindOpenInvSlot(Attacker, Npc(NpcNum).DropItem) = 0 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, Player(Attacker).x, Player(Attacker).Y) Else Call GiveInvItem(Attacker, Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, True) End If End If Else If n = 1 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(MapNpcNum).x, MapNpc(MapNum).Npc(MapNpcNum).Y) End If End If```Now it should work without any bugs. ^^Done, thats it.Hope some people like it, if there are any bugs please report them. ^^No credits needed.~Krumelz Link to comment Share on other sites More sharing options...
kibbelz Posted December 26, 2010 Share Posted December 26, 2010 a nice idea and a nice tutorial good job ^^ Link to comment Share on other sites More sharing options...
adr990 Posted January 1, 2011 Share Posted January 1, 2011 Woah, really impressive! :)Nice code, I like it.Works on EO (CE) 1.2.0 with just a little addition without problems here.I'll study this code, thanks for making this tutorial.Adr990 Link to comment Share on other sites More sharing options...
chuchoide Posted January 4, 2011 Share Posted January 4, 2011 Nice, will add soon. Link to comment Share on other sites More sharing options...
Krumelz Posted January 7, 2011 Author Share Posted January 7, 2011 @adr990:> Woah, really impressive! :)> Nice code, I like it.> > Works on EO (CE) 1.2.0 with just a little addition without problems here.> > I'll study this code, thanks for making this tutorial.> > Adr990@Chuchoide:> Nice, will add soon.thanks, glad you like it. ^^ Link to comment Share on other sites More sharing options...
GameMaker Posted January 8, 2011 Share Posted January 8, 2011 Hey, schönes Skript und ne gute Idee :) Link to comment Share on other sites More sharing options...
Krumelz Posted January 8, 2011 Author Share Posted January 8, 2011 @Taco:> Hey, schönes Skript und ne gute Idee :)danke ;DThere was a little bug, it only warped you when you got the item, just change```' Drop the goods if they get it n = Int(Rnd * Npc(NpcNum).DropChance) + 1 If n = 1 Then If Npc(NpcNum).Boss = 1 Then Call PlayerWarp(Attacker, Npc(NpcNum).BossMap, Npc(NpcNum).BossX, Npc(NpcNum).BossY) If FindOpenInvSlot(Attacker, Npc(NpcNum).DropItem) = 0 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, Player(Attacker).X, Player(Attacker).Y) Else Call GiveInvItem(Attacker, Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, True) End If Else Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(MapNpcNum).X, MapNpc(MapNum).Npc(MapNpcNum).Y) End If End If```to:```' Drop the goods if they get it n = Int(Rnd * Npc(NpcNum).DropChance) + 1 If Npc(NpcNum).Boss = 1 Then Call PlayerWarp(Attacker, Npc(NpcNum).BossMap, Npc(NpcNum).BossX, Npc(NpcNum).BossY) If n = 1 Then If FindOpenInvSlot(Attacker, Npc(NpcNum).DropItem) = 0 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, Player(Attacker).x, Player(Attacker).Y) Else Call GiveInvItem(Attacker, Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, True) End If End If Else If n = 1 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(MapNpcNum).x, MapNpc(MapNum).Npc(MapNpcNum).Y) End If End If```Now it should work without any bugs. ^^ Link to comment Share on other sites More sharing options...
pankaka Posted January 15, 2011 Share Posted January 15, 2011 I'm getting an error telling me that method or data member not found.If chkBoss.Value = 1 ThenfrmBoss.Visible = TrueElsefrmBoss.Visible = FalseEnd IfNpc(EditorIndex).Boss = chkBoss.ValueIt highlights .Boss = Link to comment Share on other sites More sharing options...
Displaced Posted January 15, 2011 Share Posted January 15, 2011 did you changed the NpcRec ? Link to comment Share on other sites More sharing options...
pankaka Posted January 15, 2011 Share Posted January 15, 2011 I just saw that I put it on MapNpcRec, must have pressed f3 several times.But I get the an error onPrivate Sub ScrlBossMap_Change(Index As Integer)If ScrlBossMap.Value < 1 ThenScrlBossMap.Value = 1End IflblBossMap.Caption = "Map: " & ScrlBossMap.ValueNpc(EditorIndex).BossMap = ScrlBossMap.ValueEnd Sub.Value Highlighted on the second line Link to comment Share on other sites More sharing options...
Displaced Posted January 15, 2011 Share Posted January 15, 2011 yeah but what error? Link to comment Share on other sites More sharing options...
pankaka Posted January 15, 2011 Share Posted January 15, 2011 method or data member not found. Link to comment Share on other sites More sharing options...
Displaced Posted January 15, 2011 Share Posted January 15, 2011 Stupid question: Is ScrlBossMap a scrollbar? Link to comment Share on other sites More sharing options...
pankaka Posted January 15, 2011 Share Posted January 15, 2011 yes Link to comment Share on other sites More sharing options...
Thor7 Posted January 17, 2011 Share Posted January 17, 2011 Will this work with parties?As in if there is a group of players in a party and fighting a boss what will happen when boss is killed? Will it warp all players in party to set location? And if so what will happen to the drops, as in will they get shared about the party members or put only in the player who killed the boss?Cheers and good tut btw :) Link to comment Share on other sites More sharing options...
Krumelz Posted January 26, 2011 Author Share Posted January 26, 2011 @Thor7:> Will this work with parties?> > As in if there is a group of players in a party and fighting a boss what will happen when boss is killed? Will it warp all players in party to set location? And if so what will happen to the drops, as in will they get shared about the party members or put only in the player who killed the boss?> > Cheers and good tut btw :)Didn't thought about that yet, but i'll try to add something like that.Thanks for the Question/Suggestion. ^^~Krumelz Link to comment Share on other sites More sharing options...
thezeus Posted January 26, 2011 Share Posted January 26, 2011 This is not compatible with 1.3.1 correct? Link to comment Share on other sites More sharing options...
TheRexion Posted January 27, 2011 Share Posted January 27, 2011 I have a small problem with this. When I go to load the NPC's it crashes saying someting about an "Invalid Property Value". I have looked through and everything I have is exactly as you have it. Not sure what could be causing it but it exists and I cannot find a way to fix it. Any help would be highly appreciated.~Ecclestio Link to comment Share on other sites More sharing options...
Krumelz Posted January 29, 2011 Author Share Posted January 29, 2011 @Ecclestio:> I have a small problem with this. When I go to load the NPC's it crashes saying someting about an "Invalid Property Value". I have looked through and everything I have is exactly as you have it. Not sure what could be causing it but it exists and I cannot find a way to fix it. Any help would be highly appreciated.> > ~Ecclestiohmm .. you may have to delete your npc's in order to get this to work.if that doesnt work run your server in debugging mode and tell me what line is highlighted.@thezeus:> This is not compatible with 1.3.1 correct?nope, its not, unfortunately. Im going to rewrite it for 1.3 tho.~Krumelz Link to comment Share on other sites More sharing options...
thezeus Posted January 29, 2011 Share Posted January 29, 2011 I triple doggy dare you to do it today, lol. Link to comment Share on other sites More sharing options...
Krumelz Posted February 2, 2011 Author Share Posted February 2, 2011 @thezeus:> I triple doggy dare you to do it today, lol.Got your request done and rewrote it in 1.3.1the problem simply was that theres no Npc Drops included in 1.3.1,ateast i didnt find it ..well, to get it to work simply go to Sub PlayerAttackNpc, find:```' Now set HP to 0 so we know to actually kill them in the server loop (this prevents subscript out of range)```and BEFORE that add:```' Drop the goods if they get it n = Int(Rnd * Npc(NpcNum).DropChance) + 1 If Npc(NpcNum).Boss = 1 Then Call PlayerWarp(Attacker, Npc(NpcNum).BossMap, Npc(NpcNum).BossX, Npc(NpcNum).BossY) If n = 1 Then If FindOpenInvSlot(Attacker, Npc(NpcNum).DropItem) = 0 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, Player(Attacker).x, Player(Attacker).Y) Else Call GiveInvItem(Attacker, Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, True) End If End If Else If n = 1 Then Call SpawnItem(Npc(NpcNum).DropItem, Npc(NpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(MapNpcNum).x, MapNpc(MapNum).Npc(MapNpcNum).Y) End If End If```This should 1) include Npc drops to 1.3.1 and 2) make the Boss npc's work.Hope it helps. ^^~Krumelz Link to comment Share on other sites More sharing options...
Domino_ Posted June 2, 2011 Share Posted June 2, 2011 Can someone make this for EO 2.0? :embarrassed: Link to comment Share on other sites More sharing options...
The New World Posted June 2, 2011 Share Posted June 2, 2011 @Domino_:> Can someone make this for EO 2.0? :embarrassed:Necro. http://www.touchofdeathforums.com/smf/index.php/topic,71638.0.html Link to comment Share on other sites More sharing options...
Domino_ Posted June 3, 2011 Share Posted June 3, 2011 Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now