Jump to content

Recommended Posts

Hello guys,

 

I'm thinking about a quest, I'd need to spawn npc on some event for example player login or kill then allow only this player who spawned npc to interact with its and after some time or interaction purge the npc back.

 

To be specific i would like to do something like:

when kill begin
-- spawn npc
end


when npc.click begin -- only usable by player who spawned the npc before
-- do something and purge
end


-- after sometime purge it anyways

 

Can you help me please ? :)

 

Kind regards.

Link to comment
https://metin2.dev/topic/15548-spawn-npc-for-a-player-and-then-purge-it-back/
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

when xxx.kill begin
 mob.spawn(......)
 game.set_event_flag("player", pc.get_player_id())
end

when npc.click with game.get_eventflag("player") == pc.get_player_id() begin

game.set_event_flag("player",0)
 whatever....
end

Try with this (Non tested)

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.