Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Joost

Members
  • Posts

    224
  • Joined

  • Last visited

    Never

Everything posted by Joost

  1. There is absolutely 0 security in your code, I can get admin access and remove yours by just sending a few packets to the server. Do a check if the admin access is high enough before setting/removing access, for examples of that just check the security for the other / commands. And do you have a friend called "Not Playing" that you really dislike? Otherwise Im guessing what you're trying to do is ``` If IsPlaying(name)=false then exit function ```
  2. Joost

    HPBar problem.

    That is the code for drawing the health bar under players, and is not really related. It's just something with my math is still fucked up, I will look into it tonight.
  3. Joost

    Salem

    i got 99 problems but a witch ain't one
  4. Joost

    Browser game?

    Short answer : It is possible but it is an absolutely terrible idea. VB6 was not designed for this.
  5. Joost

    HPBar problem.

    can you pm/post your source code so I can fix it properly? In my demo project the stuff seems to work so Im not really sure what's wrong.
  6. Respawning the map as a solution for this will result in a broken as fuck game. Imagine 3 elite NPC"s that can only be killed once every 24 hours. (Or once every hour, i dont care). You kill one, leave the map, all 3 respawn, you go back in, kill one, go out, all respawn. Or in examples where there are items on the map that are supposed to spawn every X minutes/hours you can just force the items to respawn. Making the monsters walk back would also require a lot of work.
  7. If I wanted my game to be successful, I'd make fucking sure the program doesn't get picked up as a virus by virusscanners. Not so that I know it's not a virus, but so that my players know it's not a virus.
  8. Joost

    HPBar problem.

    ``` Percentage = (GetPlayerVital(MyIndex, Vitals.HP / GetPlayerMaxVital(MyIndex, Vitals.HP) frmMain.ImgHpBar.Top = HpTop + (HpOffSet * Percentage) frmMain.ImgHpBar.Height = HpHeight - (HPOffset * Percentage) ``` That should fix that problem. ``` HpHeight = ImpHpBar.Height ```That was just a typo, but I assume you fixed that already ``` Percentage = GetPlayerVital(MyIndex, Vitals.HP) / GetPlayerMaxVital(MyIndex, Vitals.HP) ImgHpBar.Top = HpTop + (HpOffSet * Percentage) ImgHpBar.Height = HpHeight - (HPOffset * Percentage) ```That one is correct.
  9. If you add ``` If GetPlayerInvItemNum(Index, invNum)).BindType > 0 then Call PlayerMsg(index), "You cant drop this item, you douchebag", BrightCyan) Exit sub End if ``` To the HandleMapDropItem sub and to HandleAcceptTrade sub you'll make it impossible to drop/trade any item that is either BoE or BoP. To track BoE items properly we need to track if they have been equipped before and there's no code in Eclipse at the moment to do that.
  10. Joost

    HPBar problem.

    This was my proof of concept to make sure my math was ok. Make a new project, add a Picture1 and a Hscroll1 and you can test the math. So if there are any mistakes in the above code, it is probably something small and stupid. ``` Public A As Long Public B As Long Public C As Long Public Percentage As Long Private Sub Change() Picture1.Top = A - (C * Percentage / 100) Picture1.Height = B + (C * Percentage / 100) End Sub Private Sub Form_Load() A = Picture1.Top B = Picture1.Height C = (A - B) End Sub Private Sub HScroll1_Change() Percentage = HScroll1.Value Call Change End Sub ```
  11. Joost

    HPBar problem.

    In ModGlobal add ``` Public HPTop As Long Public HPHeight As Long Public HPOffset As Long ``` In``` Private Sub Form_Load() ```on frmMain add ``` HpTop = ImgHPBar.Top HpHeight = ImpHpBar.Height HpOffSet = HpHeight - HpTop ``` Replace ``` frmMain.ImgHPBar.top = ((GetPlayerVital(MyIndex, Vitals.HP) / frmMain.ImgHPBar.top) / (GetPlayerMaxVital(MyIndex, Vitals.HP) / frmMain.ImgHPBar.top)) * frmMain.ImgHPBar.top + 589 ```with ``` Percentage = (GetPlayerVital(MyIndex, Vitals.HP / GetPlayerMaxVital(MyIndex, Vitals.HP) ImgHpBar.Top = HpTop + (HpOffSet * Percentage) ImgHpBar.Height = HpHeight - (HPOffset * Percentage) ``` Add Dim Percentage As Long at the top of that sub.
  12. In my opinion you're trying to something clientside that should be handled serverside. Below sub is what I would use. Now all you have to do is send a packet when the client clicks on your SellAll thing and then call this sub serverside when receiving the packet. Search both client-side and server-side for "CSellItem" for an example, and set up an CSellAllItems packet yourself. Enjoy. ``` Sub HandleSellAllItems(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim invSlot As Long Dim itemnum As Long Dim price As Long Dim multiplier As Double Dim amount As Long Dim i As Long Dim y As Long Set Buffer = New clsBuffer Buffer.WriteBytes Data() invSlot = Buffer.ReadLong ' if invalid, exit out If invSlot < 1 Or invSlot > MAX_INV Then Exit Sub ' has item? If GetPlayerInvItemNum(Index, invSlot) < 1 Or GetPlayerInvItemNum(Index, invSlot) > MAX_ITEMS Then Exit Sub ' seems to be valid itemnum = GetPlayerInvItemNum(Index, invSlot) ' work out price multiplier = Shop(TempPlayer(Index).InShop).BuyRate / 100 price = Item(itemnum).price * multiplier ' item has cost? If price
  13. Joost

    [EO 2.0/3.0] Guilds

    You changed it into ``` Sub SaveGuild(ByVal Guildname As String) ```?
  14. Joost

    [EO 2.0/3.0] Guilds

    Guildname is a string, not a number
  15. Joost

    [EO 2.0/3.0] Guilds

    GuildData.Guild_Name is wrong
  16. Joost

    [EO 2.0/3.0] Guilds

    Sounds about right.
  17. Joost

    [EO 2.0/3.0] Guilds

    ``` 'Check to see if guild name exists. If not Write to file If FindGuild(True) Then PlayerMsg Founder_Index, "That Guild name already exists!", BrightRed Exit Sub End If 'Write to text file to save guild name. Call SaveGuild(Guildname) ```This sub is still broken. FindGuild(True) is not working because it needs to be FindGuild(Whatever variable is defined as the guild name) and SaveGuild(Guildname) should be SaveGuild(Whatever variable is defined as the guild name). I dont know what variable stores the guild name so youll have to find that yourself.
  18. Joost

    [EO 2.0/3.0] Guilds

    Did you add a file named Guildlist.txt in the guilds folder? Not sure if the code actually sets up the text if none if found.
  19. http://www.wowwiki.com/BoE http://www.wowwiki.com/BoP
  20. The code is 1 damage = 1 threat, but I think if you raelly want to use it to it's fullest potential you need things like taunts to get lots of aggrivation as warrior tank, since as the tank you should not do more damage than the mage, but you should still be the one with the threat. The basic tutorial is 1 damage = 1 threat though.
  21. Joost

    [EO 2.0/3.0] Guilds

    To be honest you're just messing it up more. Sub SaveGuild(ByVal Guildname As Long) That means you need to call that sub by using Call findguild(GUILDNAME) If you dont add the guild name the findguild sub wont know what its looking for.
  22. Joost

    [EO 2.0/3.0] Guilds

    I dont think you quite understand all the code. PS: For clarities sake, I changed Byval Index into Byval Guildname, this is because Index usually refers to the player's number, and in this case you want to use SaveGuild("GuildName"), so guildname is a more logical name. It doesnt change anything, just makes more sense. Oh, and yes, name should be index, but now that index = guildname it should be guildname ``` Sub SaveGuild(ByVal Guildname As Long) Dim F As Long Dim n As Long F = FreeFile Open App.Path & "\data\guilds\Guildlist.txt" For Append As #F 'this opens the file Print #F, GuildName 'this adds the guild name to the file Close #F 'this closes and saves the file (100% done) 'Call SavePlayer(Index) this is pointless End Sub ``` For your error, ``` Function FindGuild(ByVal Name As String) As Boolean ```Stare at that line until you see why what's below doesnt work ``` If FindGuild = True Then ```
  23. Joost

    [EO 2.0/3.0] Guilds

    ``` Sub SaveGuild(ByVal Index As Long) Dim F As Long Dim n As Long F = FreeFile Open App.Path & "\data\guilds\Guildlist.txt" For Append As #F Print #F, Name Close #F 'Call SavePlayer(Index) End Sub ``` This sub looks great and should be 100% functional, I really dont understand why you'd want to call SavePlayer there. As a hint for the error, check the byvals.
  24. Joost

    [EO 2.0/3.0] Guilds

    I'm not sure why you need that there? Why is it important to save the player after you've added the guild name to the guildlist?
  25. Joost

    [EO] Form Help

    Not to mention that every time you change a conversion you need to update the user's entire folder, stuff like this should always be kept serverside. It is an _incredibly_ shitty way to do it for all the reasons Soul mentioned + that.
×
×
  • Create New...