Jump to content

girogius

Members
  • Posts

    89
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Community Answers

  1. girogius's post in dont allow player to summon more than 1 npc at time was marked as the answer   
    I did not get answer here so I found little trick, maybe there is better ways I don't know.
     
    I needed to know if player have already summoned one NPC or not, I needed 1 property from players creature data, I used summoner_id for it because I don't think server will use this property,
    player don't have summoner right? so we can store summoned NPCs id temporary there. inside CREATED event i added this:
     
    if(myself.sm.master.summoner_id != 0){ SendScriptEventEx(GetCreatureFromID(myself.sm.master.summoner_id),0,0,-7); myself.sm.master.summoner_id = myself.sm.id; } else{ myself.sm.master.summoner_id = myself.sm.id; }  
     
    checking if masters.summoner_id != 0 then it = that summoned NPC id which means player already have one NPC buffer summoned so I decided to unsummon old one and summon new,
     
    I get creatureData of old NPC buffer and send script event  with -7, you can send whatever you want:
    this part > SendScriptEventEx(GetCreatureFromID(myself.sm.master.summoner_id),0,0,-7);
     
    and implemented SCRIPT_EVENT listener in buffer NPC ai
    EventHandler SCRIPT_EVENT(script_event_arg1, script_event_arg2, script_event_arg3) { if (script_event_arg3 == -7) { Despawn(); } }  
    if NPC will receive script event in my case with -7 it will despawn.
     
    thats it when player will use skill that summons this NPC, if player already have one summoned old will dissapear and new will be summoned.
     
    don't forget to set myself.sm.master.summoner_id = 0;
    to 0 again when unsummoning NPC by yourself, to be able summon NPC again...
    don't worry if player go offline when player restarts master.summoner_id will be 0 again.
     
     
    Admin Lock it.
     
     
     
  2. girogius's post in IL Server client can't login was marked as the answer   
    Try to write 127.0.0.1 in database as a ip of server and same in localip
  3. girogius's post in Open new window without closing parent was marked as the answer   
    FIXED:
     
    I added ShowPage again bottom of ShowMultisell;
     
    ShowMultisell(807,talker); ShowPage(talker, fnShop);  
  4. girogius's post in Npcgrp.dat corrupted error after edit was marked as the answer   
    I was using bad version of l2fileedit
  5. girogius's post in npc dont showing hi page [epilogue] was marked as the answer   
    🥳🥳🥳🥳🥳
     
    I guess you only editing existing htm files, i find out that when you creating new htm files   must be encoded as UCS-2 LE BOM, I was using UTF-8 
     
    that was the problem. The End. 😄 😄 
     
    Thank you for your help i appreciate it ❤️
     
     
     
×
×
  • Create New...