AI help

Discussion in 'Help' started by Jamie2006, Nov 17, 2010.

  1. Jamie2006

    Jamie2006 AdvExt64 Customers (IL)

    Trying to learn AI.

    could someon explain me what those GM_ID's mean :

    i0 = myself::GetGlobalMap(GM_ID1);
    i1 = myself::GetGlobalMap(GM_ID2);
    i2 = myself::GetGlobalMap(GM_ID3);
    if( i0 != -1 && ( i1 != -1 && i2 != -1 ) )

    Thanks in advance
     
  2. loest

    loest New Member

    some raid boss, have this parameter, you can set them at npcposs or npcdata i think, and they are saved at sql
     
  3. FidoW

    FidoW AdvExt64 Customers (IL)

    that piece of AI is from antharas if i'm right, each GM_ID refers to one npc

    GM_ID = Global Map ID


    about what loest say... have nothing to do with saving data, is a way to refer in AI to a "Global MAP ID", so you can check and link to a uniquie npc from AI even if isnt the handler of the monster itself.

    The saving thing is another history totally different to this but usually all npc that use global maps ids are also stored in db.
     
  4. loest

    loest New Member

    well thx for share the information, im quiet new at AI yet, something i naver had to look into, so to me it was just one id that can be set ^^.

    either way i only see them at big raids, so probably for security reasons, idk.
     
  5. Jamie2006

    Jamie2006 AdvExt64 Customers (IL)

    Thanks Fidow, indeed this is antaras, ours seem to be bugged atm and it goes wrong on that part I starter the topic with.
    Instead of passing the " if( i0 != -1 && ( i1 != -1 && i2 != -1 ) ) " the player always gets "kicked" out the ai-script here, so no one can enter antaras.
    Antaras, is alive inside, enough time has passed, the player does have the requested portal stone and no one else is raiding.
     
  6. loest

    loest New Member

    perhaps if you past more than 4 line from the code we can help more, but in advance my antharas ai don't have those lines
     
  7. lightmare

    lightmare New Member

    I looked into COEP scripts, the lines you posted are there. I believe the Heart of Warding checks that all 3 forms of Antharas are alive before it lets players in (because which form comes out depends on the number of players inside?). For that to work, each form must register itself with unique GM_ID (RegisterGlobalMap is called from ai_boss04_antaras::CREATED). You should be able to set that in npcdata:
    Code:
    [antaras1]  npc_ai={[antaras];{[GM_ID]=4}}
    [antaras2]  npc_ai={[antaras];{[GM_ID]=5}}
    [antaras3]  npc_ai={[antaras];{[GM_ID]=6}}
    
     
  8. Jamie2006

    Jamie2006 AdvExt64 Customers (IL)

    Thanks then I know exactly what is wrong now.
     
  9. demo

    demo New Member

    God damn Lightmare you're a beast xD thumbs up