User Tag List

Page 2 of 31 FirstFirst 1 2 3 4 5 6 12 ... LastLast
Results 8 to 14 of 212

Thread: [Eluna] Grumbo`z Guild Warz 'Tides of Desolation'

  1. #8
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,497
    XP
    20,134,837
    Level
    500
    Thanks
    1,092
    Thanked 333 Times in 213 Posts
    you talking about making a single function that will do all updating to table and sql ? then just pass the values to the fuction when updating is needed?
    Last edited by Foereaper; 01-04-2014 at 06:07 PM.
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff Da Bomb!

  2. #9
    Founder <span style='color: #FF4500'>Foereaper</span>'s Avatar
    Join Date
    Apr 2013
    Posts
    926
    XP
    38,862
    Level
    60
    Thanks
    125
    Thanked 329 Times in 156 Posts
    Another thing I noticed you do a lot is this

    GWARZ[locid].X = player:GetX()
    GWARZ[locid].Y = player:GetY()
    GWARZ[locid].Z = player:GetZ()

    What you can do to cut down on line amt. is

    GWARZ[locid].X, GWARZ[locid].Y, GWARZ[locid].Z = player:GetLocation()

    This can also be done in a lot of the spawning you're doing:

    Nflag = PerformIngameSpawn(2, flagdispid+(player:GetTeam()), player:GetMapId(), 0, player:GetX(), player:GetY(), player:GetZ(), player:GetO(), 1, 0, 1):GetGUIDLow()

    Instead of that, you can do

    Nflag = PerformIngameSpawn(2, flagdispid+(player:GetTeam()), player:GetMapId(), 0, player:GetLocation(), 1, 0, 1):GetGUIDLow()

    as GetLocation returns X, Y Z and O, and even separates these already with a , :)

    - - - Updated - - -

    Quote Originally Posted by slp13at420 View Post
    you talking about making a single function that will do all updating to table and sql ? then just pass the values to the fuction when updating is needed?
    Yes :)

  3. The Following 2 Users Say Thank You to Foereaper For This Useful Post:


  4. #10
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,497
    XP
    20,134,837
    Level
    500
    Thanks
    1,092
    Thanked 333 Times in 213 Posts
    shhhhwwwwwweeeeeeeeet k I got it kewl ty :D

  5. The Following User Says Thank You to slp13at420 For This Useful Post:


  6. #11
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,497
    XP
    20,134,837
    Level
    500
    Thanks
    1,092
    Thanked 333 Times in 213 Posts
    ok changed it over so there is 1 function that handles all the sql/table updates. its errrm ... rather primitive tho lol but works. having issues with player:GetLocation() in a couple instances .. I just rem'd them out .

  7. #12
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,497
    XP
    20,134,837
    Level
    500
    Thanks
    1,092
    Thanked 333 Times in 213 Posts
    there are areas that I know could use some major refining of how it works.
    biggest and #1 is the fact that to get a players location id the script has to still query the sql causing a 1/4sec pause till response. there has to be some way to scan the table entries to find were a players map,area and zone match the entries ...
    if I can do that then I can also check if the location is even in the table/sql . that would eliminate the last to spots that still query the sql. then everything will only be updateing or initial table creation.

  8. #13
    Founder <span style='color: #FF4500'>Foereaper</span>'s Avatar
    Join Date
    Apr 2013
    Posts
    926
    XP
    38,862
    Level
    60
    Thanks
    125
    Thanked 329 Times in 156 Posts
    You can cache values in a table, then whenever you run an update, just update the cache as well :) that way you only have to load the table once into memory at server start up

  9. #14
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,497
    XP
    20,134,837
    Level
    500
    Thanks
    1,092
    Thanked 333 Times in 213 Posts
    It does create a table "GWARZ" when Eluna/Lua loads. but I don't know how to make it search the table to match the players MapId(),AreaId(), and zoneId() to the entries (map, area, zone) in the table to gain the LocId. so it still currently searches the sql.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •