Jump to content
  • 0

npc dont showing hi page [epilogue]


Question

Posted (edited)

my buffer npc have no reaction when i try to talk, its not showing buffer_npc001.htm

 

here is my ai script.
 

class 0 buffer : citizen
parameter_define_begin
    string fnHi "buffer_npc001.htm"
    string fnYouAreChaotic "buffer_npc002.htm"
    string fnNotEnoughAdena "buffer_npc003.htm"
    string fnWait "buffer_npc004.htm"
    int ItemBuff 57
    int Amount 1000
    int Delay 500
parameter_define_end


handler 13 11 // CREATED
    variable_begin
        "myself"
        "_choiceN"
        "_code"
        "_from_choice"
    variable_end


    push_event // myself
    push_const 728
    add
    fetch_i // i_ai0
    push_const 308
    add
    push_reg_sp
    fetch_i
    push_const 0
    assign4
    shift_sp -1
handler_end


handler 3 38 // TALKED
    variable_begin
        "talker"
        "myself"
        "_choiceN"
        "_code"
        "_from_choice"
    variable_end


    push_event // talker
    push_const 40
    add
    fetch_i // karma
    push_const 468
    add
    fetch_i4
    push_const 0
    greater
    branch_false L2
L1
    push_event // myself
    push_const 728
    add
    fetch_i
    push_event // talker
    push_const 40
    add
    fetch_i
    push_parameter fnYouAreChaotic
    func_call 235012165 // func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L3
L2
    push_event // myself
    push_const 728
    add
    fetch_i
    push_event // talker
    push_const 40
    add
    fetch_i
    push_parameter fnHi
    func_call 235012165 // func[ShowPage]
    shift_sp -2
    shift_sp -1
L3
handler_end


handler 32 134 // MENU_SELECTED
    variable_begin
        "talker"
        "ask"
        "reply"
        "myself"
        "_choiceN"
        "_code"
        "_from_choice"
    variable_end


    push_event // ask
    push_const 160
    add
    fetch_i4
    push_const 201
    negate
    equal
    push_reg_sp
    fetch_i
    branch_false L4
    shift_sp 1
    push_event // myself
    push_const 704
    add
    fetch_i
    push_event // talker
    push_const 40
    add
    fetch_i
    push_parameter ItemBuff
    func_call 184680579 // func[OwnItemCount]
    shift_sp -2
    push_parameter Amount
    greater_equal
    and
L4
    branch_false L5
L6
    push_event // myself
    push_const 704
    add
    fetch_i // i_ai0
    push_const 308
    add
    fetch_i4
    push_const 0
    equal
    branch_false L8
L7
    push_event // myself
    push_const 704
    add
    fetch_i // i_ai0
    push_const 308
    add
    push_reg_sp
    fetch_i
    push_const 1
    assign4
    shift_sp -1
    push_event // myself
    push_const 704
    add
    fetch_i
    push_event // talker
    push_const 40
    add
    fetch_i
    push_parameter ItemBuff
    push_parameter Amount
    func_call 184746114 // func[DeleteItem1]
    shift_sp -3
    shift_sp -1
    push_event // myself
    push_const 704
    add
    fetch_i
    push_event // talker
    push_const 40
    add
    fetch_i
    push_event // reply
    push_const 164
    add
    fetch_i
    push_const 1
    push_const 1
    push_const 1000000
    func_call 184877074 // func[AddUseSkillDesire]
    shift_sp -5
    shift_sp -1
    push_event // myself
    push_const 704
    add
    fetch_i
    push_event // talker
    push_const 40
    add
    fetch_i
    push_parameter fnHi
    func_call 235012165 // func[ShowPage]
    shift_sp -2
    shift_sp -1
    push_event // myself
    push_const 704
    add
    fetch_i
    push_const 1
    push_parameter Delay
    func_call 184680487 // func[AddTimerEx]
    shift_sp -2
    shift_sp -1
    jump L9
L8
    shift_sp 1
    push_event // myself
    push_const 704
    add
    fetch_i
    push_event // talker
    push_const 40
    add
    fetch_i
    push_parameter fnWait
    func_call 235012165 // func[ShowPage]
    shift_sp -2
    shift_sp -1
L9
    jump L10
L5
    shift_sp 1
    push_event // myself
    push_const 704
    add
    fetch_i
    push_event // talker
    push_const 40
    add
    fetch_i
    push_parameter fnNotEnoughAdena
    func_call 235012165 // func[ShowPage]
    shift_sp -2
    shift_sp -1
L10
handler_end


handler 12 20 // TIMER_FIRED_EX
    variable_begin
        "timer_id"
        "myself"
        "_choiceN"
        "_code"
        "_from_choice"
    variable_end


    push_event // timer_id
    push_const 236
    add
    fetch_i4
    push_const 1
    equal
    branch_false L12
    L11
    push_event // myself
    push_const 704
    add
    fetch_i // i_ai0
    push_const 308
    add
    push_reg_sp
    fetch_i
    push_const 0
    assign4
    shift_sp -1
L12
handler_end


class_end

 

Edited by Vision

Recommended Posts

  • 0
Posted (edited)
16 minutes ago, slavergigi said:

for server part i only use note++

 

Untitled.jpg

 

 

🥳🥳🥳🥳🥳

 

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 ❤️

 

 

 

Edited by girogius
  • 0
Posted
3 hours ago, slavergigi said:

Maybe the htm havent right skill pch number?

No, i just deleted everything and wrote hi in htm for testing but still nothing

  • 0
Posted
19 minutes ago, girogius said:

ara dzma epilogue aris

ui ho, ver davinaxe kai 🙂 da vivaraudeb hi-shi welcomes gulisxmob? interludeshi welcome configidan unda charto manda ar vici magram iqneb raime msgavsi iyos..

  • 0
Posted (edited)
10 minutes ago, dramaa93 said:

ui ho, ver davinaxe kai 🙂 da vivaraudeb hi-shi welcomes gulisxmob? interludeshi welcome configidan unda charto manda ar vici magram iqneb raime msgavsi iyos..

ara ra welcome :d npc bufferis ai s vwer :d mgoni gavaswore funqciis id ebi iyo araswori, tan shen mgoni l2j ze ambob es pts aris,

buffebis magivrad hi chavwere prosta htm shi tu gamochndeboda mainteresebda skilebis brali xoaraatqo metqi

1 hour ago, Nightw0lf said:

can you show the decoded language it will help alot to understand where is the mistake.

I copied ai code from this topic but looks like its not for epilogue.

function ids and everything is incorrect

[Guide] [L2Off]: Gmshop,teleporter,buffer Creation.(All In One) - Server Development Discussion [L2OFF] - MaxCheaters.com | Lineage 2 Development Marketplace Bots and Cheats

 

I will try to write my own

 

 

Edited by girogius
  • 0
Posted (edited)
14 minutes ago, slavergigi said:

if you want i have right file for you and html too

 

 

I created new ai now window is showing but window is empty 😕 

 

this is my html:

<html>
<head>
<title>Server Manager</title>
<body>
<button value="Shop" align="CENTER" action="bypass -h menu_select?ask=-601&reply=1" width=100 height=30 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"><br>
</body>
</html>

 

do you see something wrong?

 

Untitled.jpg

 

I saved that file as .htm not .html i see other files are also htm but working well.

 

this is a server manager i will put buffer and class master into this npc later ai programming is not problem i know how to do it but this empty windows are headache

Edited by girogius
  • 0
Posted
On 1/22/2021 at 11:42 PM, MasterToma said:

Add new pet to the category strider, here

 



category_define_begin

name=[strider]

category={@wind_strider;@star_strider;@twilight_strider}

category_define_end

 

 

3 hours ago, girogius said:

ara ra welcome :d npc bufferis ai s vwer :d mgoni gavaswore funqciis id ebi iyo araswori, tan shen mgoni l2j ze ambob es pts aris,

buffebis magivrad hi chavwere prosta htm shi tu gamochndeboda mainteresebda skilebis brali xoaraatqo metqi

I copied ai code from this topic but looks like its not for epilogue.

function ids and everything is incorrect

[Guide] [L2Off]: Gmshop,teleporter,buffer Creation.(All In One) - Server Development Discussion [L2OFF] - MaxCheaters.com | Lineage 2 Development Marketplace Bots and Cheats

 

I will try to write my own

 

 

 

Just now, girogius said:

 

this html that i shared is a fnHi.. i dont know where chat is coming from

You need put fnhi to the npc file 

 

  • 0
Posted
Just now, slavergigi said:

 

 

You need put fnhi to the npc file 

 

 

this is a decompiled code:

handler:
    EventHandler TALKED(talker) {

        if(talker.karma > 0){
            ShowPage(talker, fnYouAreChaotic);
        }
        else{
            ShowPage(talker, fnHi);
        }
        
    } 

 

just ai name is not enough in npcdata file? fn hi will not show from talked event? 

  • 0
Posted

Man... go in npcdata.txt and go to on the npc where you want put the ai .... and search npc_ai={[yourainameforbuffer]};{[fnHi]=[yourhtm.htm]};{[MoveAroundSocia ect.....]}

npc_begin	merchant	7100	[__emilia]	level=70	acquire_exp_rate=0	acquire_sp=0	unsowing=1	clan={}	ignore_clan_list={}	clan_help_range=300	slot_chest=[]	slot_rhand=[]	slot_lhand=[]	shield_defense_rate=0	shield_defense=0	skill_list={@s_race_undead;@s_full_magic_defence}	npc_ai={[npc_buffer];{[fnHi]=[npc_buffer_main.htm]};{[MoveAroundSocial]=0};{[MoveAroundSocial1]=0};{[MoveAroundSocial2]=0}}	category={}	race=human	sex=female	undying=1	can_be_attacked=0	corpse_time=7	no_sleep_mode=0	agro_range=1000	ground_high={120;0;0}	ground_low={50;0;0}	exp=429634528	org_hp=2444.46819	org_hp_regen=7.5	org_mp=10000	org_mp_regen=200	collision_radius={7;7}	collision_height={23;23}	str=60	int=90	dex=50	wit=90	con=60	men=40	base_attack_type=sword	base_attack_range=40	base_damage_range={0;0;80;120}	base_rand_dam=30	base_physical_attack=688.86373	base_critical=4	physical_hit_modify=4.75	base_attack_speed=253	base_reuse_delay=0	base_magic_attack=470.40463	base_defend=295.91597	base_magic_defend=216.53847	physical_avoid_modify=0	soulshot_count=0	spiritshot_count=0	hit_time_factor=0.6	item_make_list={}	corpse_make_list={}	additional_make_list={}	additional_make_multi_list={}	hp_increase=0	mp_increase=0	safe_height=100	npc_end

This is my npc.. see?

Guest
This topic is now closed to further replies.



  • Posts

    • what pack you use  send me on discord for it
    • package custom.events.RandomZoneEvent; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.concurrent.ScheduledFuture; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.commons.time.SchedulingPattern; import org.l2jmobius.commons.time.TimeUtil; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.managers.ZoneManager; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Event; import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.model.zone.type.RandomZone; import org.l2jmobius.gameserver.util.Broadcast; /** * Random Zone Event - Activates one random PvP zone temporarily. No modifica la clase de la zona: usa flags PvP en runtime. * @author Juan */ public class RandomZoneEvent extends Event { private static final String CONFIG_FILE = "data/scripts/custom/events/RandomZoneEvent/config.xml"; private static int EVENT_DURATION_MINUTES = 15; private static boolean _isActive = false; private ScheduledFuture<?> _eventTask = null; private final List<ZoneType> _availableZones = new ArrayList<>(); private ZoneType _activeZone = null; public RandomZoneEvent() { loadConfig(); loadZones(); registerZoneListeners(); } /** * Registra listeners a TODAS LAS ZONAS random */ private void registerZoneListeners() { for (ZoneType zone : _availableZones) { addEnterZoneId(zone.getId()); addExitZoneId(zone.getId()); LOGGER.info("[RandomZoneEvent] Registered listener for zone: " + zone.getName()); } } private void loadConfig() { new IXmlReader() { @Override public void load() { parseDatapackFile(CONFIG_FILE); } @Override public void parseDocument(Document doc, File file) { forEach(doc, "event", eventNode -> { final StatSet att = new StatSet(parseAttributes(eventNode)); final String name = att.getString("name"); for (Node node = eventNode.getFirstChild(); node != null; node = node.getNextSibling()) { if ("schedule".equals(node.getNodeName())) { final StatSet attributes = new StatSet(parseAttributes(node)); final String pattern = attributes.getString("pattern"); final SchedulingPattern schedulingPattern = new SchedulingPattern(pattern); final StatSet params = new StatSet(); params.set("Name", name); params.set("SchedulingPattern", pattern); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer("Schedule_" + name, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Event " + name + " scheduled at " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } }); } }.load(); } private void loadZones() { for (ZoneType zone : ZoneManager.getInstance().getAllZones(RandomZone.class)) { if ((zone.getName() != null) && zone.getName().toLowerCase().startsWith("random_zone")) { _availableZones.add(zone); LOGGER.info("[RandomZoneEvent] Loaded zone: " + zone.getName() + " (id=" + zone.getId() + ")"); } } LOGGER.info("[RandomZoneEvent] Total random zones loaded: " + _availableZones.size()); } @Override public void onTimerEvent(String event, StatSet params, Npc npc, Player player) { if (event.startsWith("Schedule_")) { eventStart(null); final SchedulingPattern schedulingPattern = new SchedulingPattern(params.getString("SchedulingPattern")); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer(event, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Rescheduled for " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } @Override public boolean eventStart(Player eventMaker) { if (_isActive) { if (eventMaker != null) { eventMaker.sendMessage("RandomZoneEvent already active."); } return false; } if (_availableZones.isEmpty()) { Broadcast.toAllOnlinePlayers("[RandomZoneEvent] No zones configured."); return false; } _isActive = true; Broadcast.toAllOnlinePlayers("⚔️ Random Zone Event has started!"); _eventTask = ThreadPool.schedule(this::activateRandomZone, 5_000); return true; } private void activateRandomZone() { _activeZone = _availableZones.get(new Random().nextInt(_availableZones.size())); _activeZone.setEnabled(true); Broadcast.toAllOnlinePlayers("🔥 Random Zone Event: " + _activeZone.getName() + " is now PvP for " + EVENT_DURATION_MINUTES + " minutes!"); _eventTask = ThreadPool.schedule(this::eventStop, EVENT_DURATION_MINUTES * 60 * 1000L); } @Override public boolean eventStop() { if (!_isActive) { return false; } _isActive = false; if (_eventTask != null) { _eventTask.cancel(true); _eventTask = null; } if (_activeZone != null) { _activeZone.setEnabled(false); Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended. " + _activeZone.getName() + " is back to normal."); _activeZone = null; } else { Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended."); } return true; } @Override public void onEnterZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, true); if (creature.isPlayer()) { creature.sendMessage("Esta zona está en modo PvP temporalmente."); } } } @Override public void onExitZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, false); if (creature.isPlayer()) { creature.sendMessage("Abandonaste la zona PvP temporal."); } } } @Override public boolean eventBypass(Player player, String bypass) { return true; } @Override public String onEvent(String event, Npc npc, Player player) { return super.onEvent(event, npc, player); } @Override public String onFirstTalk(Npc npc, Player player) { return null; } public static void main(String[] args) { new RandomZoneEvent(); } } i have this but its not working
    • ZonePvPSpawnBossRadio=0 ZonePvPSpawnBossBarakiel=0 at the Customs.ini in L2Server folder. Im prety sure this is it because i had the same problem with you in cruma 1 floor for example and i couldn't fix it but i fixed it finally by changing these 2 lines
    • Siege Reward Start PM Msg Rework Config root BossDieAnnounce and BossDieSound in the L24Team.properties and Config.java files for global raid boss death notifications and sounds. Adds a new reward_list table to the DB.sql file to track castle rewards. Improves character creation logic for thread safety and validation. Adds extensive state checks to the RequestEnchantItem method to prevent enchantments during inappropriate player states. Fixed auto-attack animation bug (there was no attack animation, only damage animation) Clean Code Other fixes I forgot to list! Java 14 Fixed issue where deleting a character would prevent it from leaving the screen or being removed, or even after a delete CD (it would only exit when re-logging in or creating a new character). Added Premium System from the other C2 project (Needs testing and improvement). Added the "Improved" Community Board (incomplete).
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock